diff --git a/assets/index.4460a3e7.js b/assets/index.92958b8b.js similarity index 96% rename from assets/index.4460a3e7.js rename to assets/index.92958b8b.js index b76f473..e618960 100644 --- a/assets/index.4460a3e7.js +++ b/assets/index.92958b8b.js @@ -2,36 +2,36 @@ const wc=function(){const t=document.createElement("link").relList;if(t&&t.suppo * @vue/shared v3.4.15 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function hn(i,t){const e=new Set(i.split(","));return t?s=>e.has(s.toLowerCase()):s=>e.has(s)}const Me={},Ss=[],ct=()=>{},Sc=()=>!1,Xi=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&(i.charCodeAt(2)>122||i.charCodeAt(2)<97),pn=i=>i.startsWith("onUpdate:"),He=Object.assign,fn=(i,t)=>{const e=i.indexOf(t);e>-1&&i.splice(e,1)},Ec=Object.prototype.hasOwnProperty,Se=(i,t)=>Ec.call(i,t),fe=Array.isArray,Es=i=>ui(i)==="[object Map]",Yi=i=>ui(i)==="[object Set]",sa=i=>ui(i)==="[object Date]",me=i=>typeof i=="function",Be=i=>typeof i=="string",es=i=>typeof i=="symbol",Le=i=>i!==null&&typeof i=="object",xo=i=>(Le(i)||me(i))&&me(i.then)&&me(i.catch),bo=Object.prototype.toString,ui=i=>bo.call(i),Cc=i=>ui(i).slice(8,-1),Po=i=>ui(i)==="[object Object]",dn=i=>Be(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,Ei=hn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zi=i=>{const t=Object.create(null);return e=>t[e]||(t[e]=i(e))},vc=/-(\w)/g,At=Zi(i=>i.replace(vc,(t,e)=>e?e.toUpperCase():"")),Ic=/\B([A-Z])/g,Os=Zi(i=>i.replace(Ic,"-$1").toLowerCase()),Qi=Zi(i=>i.charAt(0).toUpperCase()+i.slice(1)),Tr=Zi(i=>i?`on${Qi(i)}`:""),ts=(i,t)=>!Object.is(i,t),Ci=(i,t)=>{for(let e=0;e{Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value:e})},jr=i=>{const t=parseFloat(i);return isNaN(t)?i:t};let ia;const mn=()=>ia||(ia=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function yn(i){if(fe(i)){const t={};for(let e=0;e{if(e){const s=e.split(kc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ti(i){let t="";if(Be(i))t=i;else if(fe(i))for(let e=0;eer(e,t))}const Fs=i=>Be(i)?i:i==null?"":fe(i)||Le(i)&&(i.toString===bo||!me(i.toString))?JSON.stringify(i,wo,2):String(i),wo=(i,t)=>t&&t.__v_isRef?wo(i,t.value):Es(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[s,r],n)=>(e[Ar(s,n)+" =>"]=r,e),{})}:Yi(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ar(e))}:es(t)?Ar(t):Le(t)&&!fe(t)&&!Po(t)?String(t):t,Ar=(i,t="")=>{var e;return es(i)?`Symbol(${(e=i.description)!=null?e:t})`:i};/** +**/function hn(i,t){const e=new Set(i.split(","));return t?s=>e.has(s.toLowerCase()):s=>e.has(s)}const Me={},Ss=[],ct=()=>{},Sc=()=>!1,Xi=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&(i.charCodeAt(2)>122||i.charCodeAt(2)<97),pn=i=>i.startsWith("onUpdate:"),He=Object.assign,fn=(i,t)=>{const e=i.indexOf(t);e>-1&&i.splice(e,1)},Ec=Object.prototype.hasOwnProperty,Se=(i,t)=>Ec.call(i,t),fe=Array.isArray,Es=i=>ui(i)==="[object Map]",Yi=i=>ui(i)==="[object Set]",sa=i=>ui(i)==="[object Date]",me=i=>typeof i=="function",Re=i=>typeof i=="string",es=i=>typeof i=="symbol",Le=i=>i!==null&&typeof i=="object",xo=i=>(Le(i)||me(i))&&me(i.then)&&me(i.catch),bo=Object.prototype.toString,ui=i=>bo.call(i),Cc=i=>ui(i).slice(8,-1),Po=i=>ui(i)==="[object Object]",dn=i=>Re(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,Ei=hn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zi=i=>{const t=Object.create(null);return e=>t[e]||(t[e]=i(e))},vc=/-(\w)/g,At=Zi(i=>i.replace(vc,(t,e)=>e?e.toUpperCase():"")),Ic=/\B([A-Z])/g,Os=Zi(i=>i.replace(Ic,"-$1").toLowerCase()),Qi=Zi(i=>i.charAt(0).toUpperCase()+i.slice(1)),Tr=Zi(i=>i?`on${Qi(i)}`:""),ts=(i,t)=>!Object.is(i,t),Ci=(i,t)=>{for(let e=0;e{Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value:e})},jr=i=>{const t=parseFloat(i);return isNaN(t)?i:t};let ia;const mn=()=>ia||(ia=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function yn(i){if(fe(i)){const t={};for(let e=0;e{if(e){const s=e.split(kc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ti(i){let t="";if(Re(i))t=i;else if(fe(i))for(let e=0;eer(e,t))}const Fs=i=>Re(i)?i:i==null?"":fe(i)||Le(i)&&(i.toString===bo||!me(i.toString))?JSON.stringify(i,wo,2):String(i),wo=(i,t)=>t&&t.__v_isRef?wo(i,t.value):Es(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[s,r],n)=>(e[Ar(s,n)+" =>"]=r,e),{})}:Yi(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ar(e))}:es(t)?Ar(t):Le(t)&&!fe(t)&&!Po(t)?String(t):t,Ar=(i,t="")=>{var e;return es(i)?`Symbol(${(e=i.description)!=null?e:t})`:i};/** * @vue/reactivity v3.4.15 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let pt;class Fc{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=pt,!t&&pt&&(this.index=(pt.scopes||(pt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=pt;try{return pt=this,t()}finally{pt=e}}}on(){pt=this}off(){pt=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),bs()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Xt,e=ds;try{return Xt=!0,ds=this,this._runnings++,ra(this),this.fn()}finally{na(this),this._runnings--,ds=e,Xt=t}}stop(){var t;this.active&&(ra(this),na(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Rc(i){return i.value}function ra(i){i._trackId++,i._depsLength=0}function na(i){if(i.deps&&i.deps.length>i._depsLength){for(let t=i._depsLength;t{const e=new Map;return e.cleanup=i,e.computed=t,e},Vr=new WeakMap,ms=Symbol(""),zr=Symbol("");function rt(i,t,e){if(Xt&&ds){let s=Vr.get(i);s||Vr.set(i,s=new Map);let r=s.get(e);r||s.set(e,r=No(()=>s.delete(e))),Co(ds,r)}}function Dt(i,t,e,s,r,n){const a=Vr.get(i);if(!a)return;let o=[];if(t==="clear")o=[...a.values()];else if(e==="length"&&fe(i)){const l=Number(s);a.forEach((u,c)=>{(c==="length"||!es(c)&&c>=l)&&o.push(u)})}else switch(e!==void 0&&o.push(a.get(e)),t){case"add":fe(i)?dn(e)&&o.push(a.get("length")):(o.push(a.get(ms)),Es(i)&&o.push(a.get(zr)));break;case"delete":fe(i)||(o.push(a.get(ms)),Es(i)&&o.push(a.get(zr)));break;case"set":Es(i)&&o.push(a.get(ms));break}xn();for(const l of o)l&&vo(l,2);bn()}const jc=hn("__proto__,__v_isRef,__isVue"),ko=new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(es)),aa=Uc();function Uc(){const i={};return["includes","indexOf","lastIndexOf"].forEach(t=>{i[t]=function(...e){const s=Ce(this);for(let n=0,a=this.length;n{i[t]=function(...e){xs(),xn();const s=Ce(this)[t].apply(this,e);return bn(),bs(),s}}),i}function Hc(i){const t=Ce(this);return rt(t,"has",i),t.hasOwnProperty(i)}class Lo{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const r=this._isReadonly,n=this._shallow;if(e==="__v_isReactive")return!r;if(e==="__v_isReadonly")return r;if(e==="__v_isShallow")return n;if(e==="__v_raw")return s===(r?n?tu:Do:n?Oo:_o).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=fe(t);if(!r){if(a&&Se(aa,e))return Reflect.get(aa,e,s);if(e==="hasOwnProperty")return Hc}const o=Reflect.get(t,e,s);return(es(e)?ko.has(e):jc(e))||(r||rt(t,"get",e),n)?o:nt(o)?a&&dn(e)?o:o.value:Le(o)?r?Fo(o):sr(o):o}}class Mo extends Lo{constructor(t=!1){super(!1,t)}set(t,e,s,r){let n=t[e];if(!this._shallow){const l=ks(n);if(!Ri(s)&&!ks(s)&&(n=Ce(n),s=Ce(s)),!fe(t)&&nt(n)&&!nt(s))return l?!1:(n.value=s,!0)}const a=fe(t)&&dn(e)?Number(e)i,tr=i=>Reflect.getPrototypeOf(i);function mi(i,t,e=!1,s=!1){i=i.__v_raw;const r=Ce(i),n=Ce(t);e||(ts(t,n)&&rt(r,"get",t),rt(r,"get",n));const{has:a}=tr(r),o=s?Pn:e?wn:si;if(a.call(r,t))return o(i.get(t));if(a.call(r,n))return o(i.get(n));i!==r&&i.get(t)}function yi(i,t=!1){const e=this.__v_raw,s=Ce(e),r=Ce(i);return t||(ts(i,r)&&rt(s,"has",i),rt(s,"has",r)),i===r?e.has(i):e.has(i)||e.has(r)}function gi(i,t=!1){return i=i.__v_raw,!t&&rt(Ce(i),"iterate",ms),Reflect.get(i,"size",i)}function oa(i){i=Ce(i);const t=Ce(this);return tr(t).has.call(t,i)||(t.add(i),Dt(t,"add",i,i)),this}function la(i,t){t=Ce(t);const e=Ce(this),{has:s,get:r}=tr(e);let n=s.call(e,i);n||(i=Ce(i),n=s.call(e,i));const a=r.call(e,i);return e.set(i,t),n?ts(t,a)&&Dt(e,"set",i,t):Dt(e,"add",i,t),this}function ca(i){const t=Ce(this),{has:e,get:s}=tr(t);let r=e.call(t,i);r||(i=Ce(i),r=e.call(t,i)),s&&s.call(t,i);const n=t.delete(i);return r&&Dt(t,"delete",i,void 0),n}function ua(){const i=Ce(this),t=i.size!==0,e=i.clear();return t&&Dt(i,"clear",void 0,void 0),e}function xi(i,t){return function(s,r){const n=this,a=n.__v_raw,o=Ce(a),l=t?Pn:i?wn:si;return!i&&rt(o,"iterate",ms),a.forEach((u,c)=>s.call(r,l(u),l(c),n))}}function bi(i,t,e){return function(...s){const r=this.__v_raw,n=Ce(r),a=Es(n),o=i==="entries"||i===Symbol.iterator&&a,l=i==="keys"&&a,u=r[i](...s),c=e?Pn:t?wn:si;return!t&&rt(n,"iterate",l?zr:ms),{next(){const{value:d,done:m}=u.next();return m?{value:d,done:m}:{value:o?[c(d[0]),c(d[1])]:c(d),done:m}},[Symbol.iterator](){return this}}}}function jt(i){return function(...t){return i==="delete"?!1:i==="clear"?void 0:this}}function qc(){const i={get(n){return mi(this,n)},get size(){return gi(this)},has:yi,add:oa,set:la,delete:ca,clear:ua,forEach:xi(!1,!1)},t={get(n){return mi(this,n,!1,!0)},get size(){return gi(this)},has:yi,add:oa,set:la,delete:ca,clear:ua,forEach:xi(!1,!0)},e={get(n){return mi(this,n,!0)},get size(){return gi(this,!0)},has(n){return yi.call(this,n,!0)},add:jt("add"),set:jt("set"),delete:jt("delete"),clear:jt("clear"),forEach:xi(!0,!1)},s={get(n){return mi(this,n,!0,!0)},get size(){return gi(this,!0)},has(n){return yi.call(this,n,!0)},add:jt("add"),set:jt("set"),delete:jt("delete"),clear:jt("clear"),forEach:xi(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(n=>{i[n]=bi(n,!1,!1),e[n]=bi(n,!0,!1),t[n]=bi(n,!1,!0),s[n]=bi(n,!0,!0)}),[i,e,t,s]}const[Gc,Jc,Xc,Yc]=qc();function Tn(i,t){const e=t?i?Yc:Xc:i?Jc:Gc;return(s,r,n)=>r==="__v_isReactive"?!i:r==="__v_isReadonly"?i:r==="__v_raw"?s:Reflect.get(Se(e,r)&&r in s?e:s,r,n)}const Zc={get:Tn(!1,!1)},Qc={get:Tn(!1,!0)},eu={get:Tn(!0,!1)},_o=new WeakMap,Oo=new WeakMap,Do=new WeakMap,tu=new WeakMap;function su(i){switch(i){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function iu(i){return i.__v_skip||!Object.isExtensible(i)?0:su(Cc(i))}function sr(i){return ks(i)?i:An(i,!1,zc,Zc,_o)}function ru(i){return An(i,!1,Wc,Qc,Oo)}function Fo(i){return An(i,!0,Kc,eu,Do)}function An(i,t,e,s,r){if(!Le(i)||i.__v_raw&&!(t&&i.__v_isReactive))return i;const n=r.get(i);if(n)return n;const a=iu(i);if(a===0)return i;const o=new Proxy(i,a===2?s:e);return r.set(i,o),o}function Cs(i){return ks(i)?Cs(i.__v_raw):!!(i&&i.__v_isReactive)}function ks(i){return!!(i&&i.__v_isReadonly)}function Ri(i){return!!(i&&i.__v_isShallow)}function $o(i){return Cs(i)||ks(i)}function Ce(i){const t=i&&i.__v_raw;return t?Ce(t):i}function Bo(i){return Bi(i,"__v_skip",!0),i}const si=i=>Le(i)?sr(i):i,wn=i=>Le(i)?Fo(i):i;class Ro{constructor(t,e,s,r){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new gn(()=>t(this._value),()=>vi(this,1),()=>this.dep&&Io(this.dep)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=Ce(this);return(!t._cacheable||t.effect.dirty)&&ts(t._value,t._value=t.effect.run())&&vi(t,2),jo(t),t.effect._dirtyLevel>=1&&vi(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function nu(i,t,e=!1){let s,r;const n=me(i);return n?(s=i,r=ct):(s=i.get,r=i.set),new Ro(s,r,n||!r,e)}function jo(i){Xt&&ds&&(i=Ce(i),Co(ds,i.dep||(i.dep=No(()=>i.dep=void 0,i instanceof Ro?i:void 0))))}function vi(i,t=2,e){i=Ce(i);const s=i.dep;s&&vo(s,t)}function nt(i){return!!(i&&i.__v_isRef===!0)}function us(i){return au(i,!1)}function au(i,t){return nt(i)?i:new ou(i,t)}class ou{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Ce(t),this._value=e?t:si(t)}get value(){return jo(this),this._value}set value(t){const e=this.__v_isShallow||Ri(t)||ks(t);t=e?t:Ce(t),ts(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:si(t),vi(this,2))}}function Ii(i){return nt(i)?i.value:i}const lu={get:(i,t,e)=>Ii(Reflect.get(i,t,e)),set:(i,t,e,s)=>{const r=i[t];return nt(r)&&!nt(e)?(r.value=e,!0):Reflect.set(i,t,e,s)}};function Uo(i){return Cs(i)?i:new Proxy(i,lu)}/** +**/let pt;class Fc{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=pt,!t&&pt&&(this.index=(pt.scopes||(pt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=pt;try{return pt=this,t()}finally{pt=e}}}on(){pt=this}off(){pt=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),bs()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Xt,e=ds;try{return Xt=!0,ds=this,this._runnings++,ra(this),this.fn()}finally{na(this),this._runnings--,ds=e,Xt=t}}stop(){var t;this.active&&(ra(this),na(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Bc(i){return i.value}function ra(i){i._trackId++,i._depsLength=0}function na(i){if(i.deps&&i.deps.length>i._depsLength){for(let t=i._depsLength;t{const e=new Map;return e.cleanup=i,e.computed=t,e},Vr=new WeakMap,ms=Symbol(""),zr=Symbol("");function rt(i,t,e){if(Xt&&ds){let s=Vr.get(i);s||Vr.set(i,s=new Map);let r=s.get(e);r||s.set(e,r=No(()=>s.delete(e))),Co(ds,r)}}function Dt(i,t,e,s,r,n){const a=Vr.get(i);if(!a)return;let o=[];if(t==="clear")o=[...a.values()];else if(e==="length"&&fe(i)){const l=Number(s);a.forEach((u,c)=>{(c==="length"||!es(c)&&c>=l)&&o.push(u)})}else switch(e!==void 0&&o.push(a.get(e)),t){case"add":fe(i)?dn(e)&&o.push(a.get("length")):(o.push(a.get(ms)),Es(i)&&o.push(a.get(zr)));break;case"delete":fe(i)||(o.push(a.get(ms)),Es(i)&&o.push(a.get(zr)));break;case"set":Es(i)&&o.push(a.get(ms));break}xn();for(const l of o)l&&vo(l,2);bn()}const jc=hn("__proto__,__v_isRef,__isVue"),ko=new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(es)),aa=Uc();function Uc(){const i={};return["includes","indexOf","lastIndexOf"].forEach(t=>{i[t]=function(...e){const s=Ce(this);for(let n=0,a=this.length;n{i[t]=function(...e){xs(),xn();const s=Ce(this)[t].apply(this,e);return bn(),bs(),s}}),i}function Hc(i){const t=Ce(this);return rt(t,"has",i),t.hasOwnProperty(i)}class Lo{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const r=this._isReadonly,n=this._shallow;if(e==="__v_isReactive")return!r;if(e==="__v_isReadonly")return r;if(e==="__v_isShallow")return n;if(e==="__v_raw")return s===(r?n?tu:Do:n?Oo:_o).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=fe(t);if(!r){if(a&&Se(aa,e))return Reflect.get(aa,e,s);if(e==="hasOwnProperty")return Hc}const o=Reflect.get(t,e,s);return(es(e)?ko.has(e):jc(e))||(r||rt(t,"get",e),n)?o:nt(o)?a&&dn(e)?o:o.value:Le(o)?r?Fo(o):sr(o):o}}class Mo extends Lo{constructor(t=!1){super(!1,t)}set(t,e,s,r){let n=t[e];if(!this._shallow){const l=ks(n);if(!Bi(s)&&!ks(s)&&(n=Ce(n),s=Ce(s)),!fe(t)&&nt(n)&&!nt(s))return l?!1:(n.value=s,!0)}const a=fe(t)&&dn(e)?Number(e)i,tr=i=>Reflect.getPrototypeOf(i);function mi(i,t,e=!1,s=!1){i=i.__v_raw;const r=Ce(i),n=Ce(t);e||(ts(t,n)&&rt(r,"get",t),rt(r,"get",n));const{has:a}=tr(r),o=s?Pn:e?wn:si;if(a.call(r,t))return o(i.get(t));if(a.call(r,n))return o(i.get(n));i!==r&&i.get(t)}function yi(i,t=!1){const e=this.__v_raw,s=Ce(e),r=Ce(i);return t||(ts(i,r)&&rt(s,"has",i),rt(s,"has",r)),i===r?e.has(i):e.has(i)||e.has(r)}function gi(i,t=!1){return i=i.__v_raw,!t&&rt(Ce(i),"iterate",ms),Reflect.get(i,"size",i)}function oa(i){i=Ce(i);const t=Ce(this);return tr(t).has.call(t,i)||(t.add(i),Dt(t,"add",i,i)),this}function la(i,t){t=Ce(t);const e=Ce(this),{has:s,get:r}=tr(e);let n=s.call(e,i);n||(i=Ce(i),n=s.call(e,i));const a=r.call(e,i);return e.set(i,t),n?ts(t,a)&&Dt(e,"set",i,t):Dt(e,"add",i,t),this}function ca(i){const t=Ce(this),{has:e,get:s}=tr(t);let r=e.call(t,i);r||(i=Ce(i),r=e.call(t,i)),s&&s.call(t,i);const n=t.delete(i);return r&&Dt(t,"delete",i,void 0),n}function ua(){const i=Ce(this),t=i.size!==0,e=i.clear();return t&&Dt(i,"clear",void 0,void 0),e}function xi(i,t){return function(s,r){const n=this,a=n.__v_raw,o=Ce(a),l=t?Pn:i?wn:si;return!i&&rt(o,"iterate",ms),a.forEach((u,c)=>s.call(r,l(u),l(c),n))}}function bi(i,t,e){return function(...s){const r=this.__v_raw,n=Ce(r),a=Es(n),o=i==="entries"||i===Symbol.iterator&&a,l=i==="keys"&&a,u=r[i](...s),c=e?Pn:t?wn:si;return!t&&rt(n,"iterate",l?zr:ms),{next(){const{value:d,done:m}=u.next();return m?{value:d,done:m}:{value:o?[c(d[0]),c(d[1])]:c(d),done:m}},[Symbol.iterator](){return this}}}}function jt(i){return function(...t){return i==="delete"?!1:i==="clear"?void 0:this}}function qc(){const i={get(n){return mi(this,n)},get size(){return gi(this)},has:yi,add:oa,set:la,delete:ca,clear:ua,forEach:xi(!1,!1)},t={get(n){return mi(this,n,!1,!0)},get size(){return gi(this)},has:yi,add:oa,set:la,delete:ca,clear:ua,forEach:xi(!1,!0)},e={get(n){return mi(this,n,!0)},get size(){return gi(this,!0)},has(n){return yi.call(this,n,!0)},add:jt("add"),set:jt("set"),delete:jt("delete"),clear:jt("clear"),forEach:xi(!0,!1)},s={get(n){return mi(this,n,!0,!0)},get size(){return gi(this,!0)},has(n){return yi.call(this,n,!0)},add:jt("add"),set:jt("set"),delete:jt("delete"),clear:jt("clear"),forEach:xi(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(n=>{i[n]=bi(n,!1,!1),e[n]=bi(n,!0,!1),t[n]=bi(n,!1,!0),s[n]=bi(n,!0,!0)}),[i,e,t,s]}const[Gc,Jc,Xc,Yc]=qc();function Tn(i,t){const e=t?i?Yc:Xc:i?Jc:Gc;return(s,r,n)=>r==="__v_isReactive"?!i:r==="__v_isReadonly"?i:r==="__v_raw"?s:Reflect.get(Se(e,r)&&r in s?e:s,r,n)}const Zc={get:Tn(!1,!1)},Qc={get:Tn(!1,!0)},eu={get:Tn(!0,!1)},_o=new WeakMap,Oo=new WeakMap,Do=new WeakMap,tu=new WeakMap;function su(i){switch(i){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function iu(i){return i.__v_skip||!Object.isExtensible(i)?0:su(Cc(i))}function sr(i){return ks(i)?i:An(i,!1,zc,Zc,_o)}function ru(i){return An(i,!1,Wc,Qc,Oo)}function Fo(i){return An(i,!0,Kc,eu,Do)}function An(i,t,e,s,r){if(!Le(i)||i.__v_raw&&!(t&&i.__v_isReactive))return i;const n=r.get(i);if(n)return n;const a=iu(i);if(a===0)return i;const o=new Proxy(i,a===2?s:e);return r.set(i,o),o}function Cs(i){return ks(i)?Cs(i.__v_raw):!!(i&&i.__v_isReactive)}function ks(i){return!!(i&&i.__v_isReadonly)}function Bi(i){return!!(i&&i.__v_isShallow)}function $o(i){return Cs(i)||ks(i)}function Ce(i){const t=i&&i.__v_raw;return t?Ce(t):i}function Ro(i){return Ri(i,"__v_skip",!0),i}const si=i=>Le(i)?sr(i):i,wn=i=>Le(i)?Fo(i):i;class Bo{constructor(t,e,s,r){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new gn(()=>t(this._value),()=>vi(this,1),()=>this.dep&&Io(this.dep)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=Ce(this);return(!t._cacheable||t.effect.dirty)&&ts(t._value,t._value=t.effect.run())&&vi(t,2),jo(t),t.effect._dirtyLevel>=1&&vi(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function nu(i,t,e=!1){let s,r;const n=me(i);return n?(s=i,r=ct):(s=i.get,r=i.set),new Bo(s,r,n||!r,e)}function jo(i){Xt&&ds&&(i=Ce(i),Co(ds,i.dep||(i.dep=No(()=>i.dep=void 0,i instanceof Bo?i:void 0))))}function vi(i,t=2,e){i=Ce(i);const s=i.dep;s&&vo(s,t)}function nt(i){return!!(i&&i.__v_isRef===!0)}function us(i){return au(i,!1)}function au(i,t){return nt(i)?i:new ou(i,t)}class ou{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Ce(t),this._value=e?t:si(t)}get value(){return jo(this),this._value}set value(t){const e=this.__v_isShallow||Bi(t)||ks(t);t=e?t:Ce(t),ts(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:si(t),vi(this,2))}}function Ii(i){return nt(i)?i.value:i}const lu={get:(i,t,e)=>Ii(Reflect.get(i,t,e)),set:(i,t,e,s)=>{const r=i[t];return nt(r)&&!nt(e)?(r.value=e,!0):Reflect.set(i,t,e,s)}};function Uo(i){return Cs(i)?i:new Proxy(i,lu)}/** * @vue/runtime-core v3.4.15 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Yt(i,t,e,s){let r;try{r=s?i(...s):i()}catch(n){ir(n,t,e)}return r}function mt(i,t,e,s){if(me(i)){const n=Yt(i,t,e,s);return n&&xo(n)&&n.catch(a=>{ir(a,t,e)}),n}const r=[];for(let n=0;n>>1,r=We[s],n=ri(r);nTt&&We.splice(t,1)}function fu(i){fe(i)?vs.push(...i):(!Wt||!Wt.includes(i,i.allowRecurse?hs+1:hs))&&vs.push(i),Vo()}function ha(i,t,e=ii?Tt+1:0){for(;eri(e)-ri(s));if(vs.length=0,Wt){Wt.push(...t);return}for(Wt=t,hs=0;hsi.id==null?1/0:i.id,du=(i,t)=>{const e=ri(i)-ri(t);if(e===0){if(i.pre&&!t.pre)return-1;if(t.pre&&!i.pre)return 1}return e};function Ko(i){Kr=!1,ii=!0,We.sort(du);const t=ct;try{for(Tt=0;TtBe(w)?w.trim():w)),d&&(r=e.map(jr))}let o,l=s[o=Tr(t)]||s[o=Tr(At(t))];!l&&n&&(l=s[o=Tr(Os(t))]),l&&mt(l,i,6,r);const u=s[o+"Once"];if(u){if(!i.emitted)i.emitted={};else if(i.emitted[o])return;i.emitted[o]=!0,mt(u,i,6,r)}}function Wo(i,t,e=!1){const s=t.emitsCache,r=s.get(i);if(r!==void 0)return r;const n=i.emits;let a={},o=!1;if(!me(i)){const l=u=>{const c=Wo(u,t,!0);c&&(o=!0,He(a,c))};!e&&t.mixins.length&&t.mixins.forEach(l),i.extends&&l(i.extends),i.mixins&&i.mixins.forEach(l)}return!n&&!o?(Le(i)&&s.set(i,null),null):(fe(n)?n.forEach(l=>a[l]=null):He(a,n),Le(i)&&s.set(i,a),a)}function rr(i,t){return!i||!Xi(t)?!1:(t=t.slice(2).replace(/Once$/,""),Se(i,t[0].toLowerCase()+t.slice(1))||Se(i,Os(t))||Se(i,t))}let it=null,qo=null;function ji(i){const t=it;return it=i,qo=i&&i.type.__scopeId||null,t}function yu(i,t=it,e){if(!t||i._n)return i;const s=(...r)=>{s._d&&Aa(-1);const n=ji(t);let a;try{a=i(...r)}finally{ji(n),s._d&&Aa(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function wr(i){const{type:t,vnode:e,proxy:s,withProxy:r,props:n,propsOptions:[a],slots:o,attrs:l,emit:u,render:c,renderCache:d,data:m,setupState:w,ctx:y,inheritAttrs:L}=i;let C,I;const k=ji(i);try{if(e.shapeFlag&4){const $=r||s,T=$;C=Pt(c.call(T,$,d,n,w,m,y)),I=l}else{const $=t;C=Pt($.length>1?$(n,{attrs:l,slots:o,emit:u}):$(n,null)),I=t.props?l:gu(l)}}catch($){Xs.length=0,ir($,i,1),C=Ue(gs)}let j=C;if(I&&L!==!1){const $=Object.keys(I),{shapeFlag:T}=j;$.length&&T&7&&(a&&$.some(pn)&&(I=xu(I,a)),j=Ls(j,I))}return e.dirs&&(j=Ls(j),j.dirs=j.dirs?j.dirs.concat(e.dirs):e.dirs),e.transition&&(j.transition=e.transition),C=j,ji(k),C}const gu=i=>{let t;for(const e in i)(e==="class"||e==="style"||Xi(e))&&((t||(t={}))[e]=i[e]);return t},xu=(i,t)=>{const e={};for(const s in i)(!pn(s)||!(s.slice(9)in t))&&(e[s]=i[s]);return e};function bu(i,t,e){const{props:s,children:r,component:n}=i,{props:a,children:o,patchFlag:l}=t,u=n.emitsOptions;if(t.dirs||t.transition)return!0;if(e&&l>=0){if(l&1024)return!0;if(l&16)return s?pa(s,a,u):!!a;if(l&8){const c=t.dynamicProps;for(let d=0;di.__isSuspense;function Eu(i,t){t&&t.pendingBranch?fe(i)?t.effects.push(...i):t.effects.push(i):fu(i)}const Cu=Symbol.for("v-scx"),vu=()=>ki(Cu),Pi={};function Gs(i,t,e){return Jo(i,t,e)}function Jo(i,t,{immediate:e,deep:s,flush:r,once:n,onTrack:a,onTrigger:o}=Me){if(t&&n){const K=t;t=(...Pe)=>{K(...Pe),T()}}const l=qe,u=K=>s===!0?K:fs(K,s===!1?1:void 0);let c,d=!1,m=!1;if(nt(i)?(c=()=>i.value,d=Ri(i)):Cs(i)?(c=()=>u(i),d=!0):fe(i)?(m=!0,d=i.some(K=>Cs(K)||Ri(K)),c=()=>i.map(K=>{if(nt(K))return K.value;if(Cs(K))return u(K);if(me(K))return Yt(K,l,2)})):me(i)?t?c=()=>Yt(i,l,2):c=()=>(w&&w(),mt(i,l,3,[y])):c=ct,t&&s){const K=c;c=()=>fs(K())}let w,y=K=>{w=j.onStop=()=>{Yt(K,l,4),w=j.onStop=void 0}},L;if(lr)if(y=ct,t?e&&mt(t,l,3,[c(),m?[]:void 0,y]):c(),r==="sync"){const K=vu();L=K.__watcherHandles||(K.__watcherHandles=[])}else return ct;let C=m?new Array(i.length).fill(Pi):Pi;const I=()=>{if(!(!j.active||!j.dirty))if(t){const K=j.run();(s||d||(m?K.some((Pe,p)=>ts(Pe,C[p])):ts(K,C)))&&(w&&w(),mt(t,l,3,[K,C===Pi?void 0:m&&C[0]===Pi?[]:C,y]),C=K)}else j.run()};I.allowRecurse=!!t;let k;r==="sync"?k=I:r==="post"?k=()=>st(I,l&&l.suspense):(I.pre=!0,l&&(I.id=l.uid),k=()=>En(I));const j=new gn(c,ct,k),$=Bc(),T=()=>{j.stop(),$&&fn($.effects,j)};return t?e?I():C=j.run():r==="post"?st(j.run.bind(j),l&&l.suspense):j.run(),L&&L.push(T),T}function Iu(i,t,e){const s=this.proxy,r=Be(i)?i.includes(".")?Xo(s,i):()=>s[i]:i.bind(s,s);let n;me(t)?n=t:(n=t.handler,e=t);const a=hi(this),o=Jo(r,n.bind(s),e);return a(),o}function Xo(i,t){const e=t.split(".");return()=>{let s=i;for(let r=0;r0){if(e>=t)return i;e++}if(s=s||new Set,s.has(i))return i;if(s.add(i),nt(i))fs(i.value,t,e,s);else if(fe(i))for(let r=0;r{fs(r,t,e,s)});else if(Po(i))for(const r in i)fs(i[r],t,e,s);return i}function $s(i,t){if(it===null)return i;const e=cr(it)||it.proxy,s=i.dirs||(i.dirs=[]);for(let r=0;rHe({name:i.name},t,{setup:i}))():i}const Ni=i=>!!i.type.__asyncLoader,Yo=i=>i.type.__isKeepAlive;function ku(i,t){Zo(i,"a",t)}function Lu(i,t){Zo(i,"da",t)}function Zo(i,t,e=qe){const s=i.__wdc||(i.__wdc=()=>{let r=e;for(;r;){if(r.isDeactivated)return;r=r.parent}return i()});if(nr(t,s,e),e){let r=e.parent;for(;r&&r.parent;)Yo(r.parent.vnode)&&Mu(s,t,e,r),r=r.parent}}function Mu(i,t,e,s){const r=nr(t,i,s,!0);Qo(()=>{fn(s[t],r)},e)}function nr(i,t,e=qe,s=!1){if(e){const r=e[i]||(e[i]=[]),n=t.__weh||(t.__weh=(...a)=>{if(e.isUnmounted)return;xs();const o=hi(e),l=mt(t,e,i,a);return o(),bs(),l});return s?r.unshift(n):r.push(n),n}}const $t=i=>(t,e=qe)=>(!lr||i==="sp")&&nr(i,(...s)=>t(...s),e),_u=$t("bm"),Ou=$t("m"),Du=$t("bu"),Fu=$t("u"),$u=$t("bum"),Qo=$t("um"),Bu=$t("sp"),Ru=$t("rtg"),ju=$t("rtc");function Uu(i,t=qe){nr("ec",i,t)}function Sr(i,t,e,s){let r;const n=e&&e[s];if(fe(i)||Be(i)){r=new Array(i.length);for(let a=0,o=i.length;at(a,o,void 0,n&&n[o]));else{const a=Object.keys(i);r=new Array(a.length);for(let o=0,l=a.length;oi?hl(i)?cr(i)||i.proxy:Wr(i.parent):null,Js=He(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>Wr(i.parent),$root:i=>Wr(i.root),$emit:i=>i.emit,$options:i=>Cn(i),$forceUpdate:i=>i.f||(i.f=()=>{i.effect.dirty=!0,En(i.update)}),$nextTick:i=>i.n||(i.n=uu.bind(i.proxy)),$watch:i=>Iu.bind(i)}),Er=(i,t)=>i!==Me&&!i.__isScriptSetup&&Se(i,t),Hu={get({_:i},t){const{ctx:e,setupState:s,data:r,props:n,accessCache:a,type:o,appContext:l}=i;let u;if(t[0]!=="$"){const w=a[t];if(w!==void 0)switch(w){case 1:return s[t];case 2:return r[t];case 4:return e[t];case 3:return n[t]}else{if(Er(s,t))return a[t]=1,s[t];if(r!==Me&&Se(r,t))return a[t]=2,r[t];if((u=i.propsOptions[0])&&Se(u,t))return a[t]=3,n[t];if(e!==Me&&Se(e,t))return a[t]=4,e[t];qr&&(a[t]=0)}}const c=Js[t];let d,m;if(c)return t==="$attrs"&&rt(i,"get",t),c(i);if((d=o.__cssModules)&&(d=d[t]))return d;if(e!==Me&&Se(e,t))return a[t]=4,e[t];if(m=l.config.globalProperties,Se(m,t))return m[t]},set({_:i},t,e){const{data:s,setupState:r,ctx:n}=i;return Er(r,t)?(r[t]=e,!0):s!==Me&&Se(s,t)?(s[t]=e,!0):Se(i.props,t)||t[0]==="$"&&t.slice(1)in i?!1:(n[t]=e,!0)},has({_:{data:i,setupState:t,accessCache:e,ctx:s,appContext:r,propsOptions:n}},a){let o;return!!e[a]||i!==Me&&Se(i,a)||Er(t,a)||(o=n[0])&&Se(o,a)||Se(s,a)||Se(Js,a)||Se(r.config.globalProperties,a)},defineProperty(i,t,e){return e.get!=null?i._.accessCache[t]=0:Se(e,"value")&&this.set(i,t,e.value,null),Reflect.defineProperty(i,t,e)}};function da(i){return fe(i)?i.reduce((t,e)=>(t[e]=null,t),{}):i}let qr=!0;function Vu(i){const t=Cn(i),e=i.proxy,s=i.ctx;qr=!1,t.beforeCreate&&ma(t.beforeCreate,i,"bc");const{data:r,computed:n,methods:a,watch:o,provide:l,inject:u,created:c,beforeMount:d,mounted:m,beforeUpdate:w,updated:y,activated:L,deactivated:C,beforeDestroy:I,beforeUnmount:k,destroyed:j,unmounted:$,render:T,renderTracked:K,renderTriggered:Pe,errorCaptured:p,serverPrefetch:X,expose:Y,inheritAttrs:f,components:P,directives:z,filters:H}=t;if(u&&zu(u,s,null),a)for(const g in a){const E=a[g];me(E)&&(s[g]=E.bind(e))}if(r){const g=r.call(e,e);Le(g)&&(i.data=sr(g))}if(qr=!0,n)for(const g in n){const E=n[g],W=me(E)?E.bind(e,e):me(E.get)?E.get.bind(e,e):ct,ee=!me(E)&&me(E.set)?E.set.bind(e):ct,ce=Lt({get:W,set:ee});Object.defineProperty(s,g,{enumerable:!0,configurable:!0,get:()=>ce.value,set:re=>ce.value=re})}if(o)for(const g in o)el(o[g],s,e,g);if(l){const g=me(l)?l.call(e):l;Reflect.ownKeys(g).forEach(E=>{Xu(E,g[E])})}c&&ma(c,i,"c");function N(g,E){fe(E)?E.forEach(W=>g(W.bind(e))):E&&g(E.bind(e))}if(N(_u,d),N(Ou,m),N(Du,w),N(Fu,y),N(ku,L),N(Lu,C),N(Uu,p),N(ju,K),N(Ru,Pe),N($u,k),N(Qo,$),N(Bu,X),fe(Y))if(Y.length){const g=i.exposed||(i.exposed={});Y.forEach(E=>{Object.defineProperty(g,E,{get:()=>e[E],set:W=>e[E]=W})})}else i.exposed||(i.exposed={});T&&i.render===ct&&(i.render=T),f!=null&&(i.inheritAttrs=f),P&&(i.components=P),z&&(i.directives=z)}function zu(i,t,e=ct){fe(i)&&(i=Gr(i));for(const s in i){const r=i[s];let n;Le(r)?"default"in r?n=ki(r.from||s,r.default,!0):n=ki(r.from||s):n=ki(r),nt(n)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>n.value,set:a=>n.value=a}):t[s]=n}}function ma(i,t,e){mt(fe(i)?i.map(s=>s.bind(t.proxy)):i.bind(t.proxy),t,e)}function el(i,t,e,s){const r=s.includes(".")?Xo(e,s):()=>e[s];if(Be(i)){const n=t[i];me(n)&&Gs(r,n)}else if(me(i))Gs(r,i.bind(e));else if(Le(i))if(fe(i))i.forEach(n=>el(n,t,e,s));else{const n=me(i.handler)?i.handler.bind(e):t[i.handler];me(n)&&Gs(r,n,i)}}function Cn(i){const t=i.type,{mixins:e,extends:s}=t,{mixins:r,optionsCache:n,config:{optionMergeStrategies:a}}=i.appContext,o=n.get(t);let l;return o?l=o:!r.length&&!e&&!s?l=t:(l={},r.length&&r.forEach(u=>Ui(l,u,a,!0)),Ui(l,t,a)),Le(t)&&n.set(t,l),l}function Ui(i,t,e,s=!1){const{mixins:r,extends:n}=t;n&&Ui(i,n,e,!0),r&&r.forEach(a=>Ui(i,a,e,!0));for(const a in t)if(!(s&&a==="expose")){const o=Ku[a]||e&&e[a];i[a]=o?o(i[a],t[a]):t[a]}return i}const Ku={data:ya,props:ga,emits:ga,methods:zs,computed:zs,beforeCreate:Ye,created:Ye,beforeMount:Ye,mounted:Ye,beforeUpdate:Ye,updated:Ye,beforeDestroy:Ye,beforeUnmount:Ye,destroyed:Ye,unmounted:Ye,activated:Ye,deactivated:Ye,errorCaptured:Ye,serverPrefetch:Ye,components:zs,directives:zs,watch:qu,provide:ya,inject:Wu};function ya(i,t){return t?i?function(){return He(me(i)?i.call(this,this):i,me(t)?t.call(this,this):t)}:t:i}function Wu(i,t){return zs(Gr(i),Gr(t))}function Gr(i){if(fe(i)){const t={};for(let e=0;e1)return e&&me(t)?t.call(s&&s.proxy):t}}function Yu(i,t,e,s=!1){const r={},n={};Bi(n,or,1),i.propsDefaults=Object.create(null),sl(i,t,r,n);for(const a in i.propsOptions[0])a in r||(r[a]=void 0);e?i.props=s?r:ru(r):i.type.props?i.props=r:i.props=n,i.attrs=n}function Zu(i,t,e,s){const{props:r,attrs:n,vnode:{patchFlag:a}}=i,o=Ce(r),[l]=i.propsOptions;let u=!1;if((s||a>0)&&!(a&16)){if(a&8){const c=i.vnode.dynamicProps;for(let d=0;d{l=!0;const[m,w]=il(d,t,!0);He(a,m),w&&o.push(...w)};!e&&t.mixins.length&&t.mixins.forEach(c),i.extends&&c(i.extends),i.mixins&&i.mixins.forEach(c)}if(!n&&!l)return Le(i)&&s.set(i,Ss),Ss;if(fe(n))for(let c=0;c-1,w[1]=L<0||y-1||Se(w,"default"))&&o.push(d)}}}const u=[a,o];return Le(i)&&s.set(i,u),u}function xa(i){return i[0]!=="$"}function ba(i){const t=i&&i.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:i===null?"null":""}function Pa(i,t){return ba(i)===ba(t)}function Ta(i,t){return fe(t)?t.findIndex(e=>Pa(e,i)):me(t)&&Pa(t,i)?0:-1}const rl=i=>i[0]==="_"||i==="$stable",vn=i=>fe(i)?i.map(Pt):[Pt(i)],Qu=(i,t,e)=>{if(t._n)return t;const s=yu((...r)=>vn(t(...r)),e);return s._c=!1,s},nl=(i,t,e)=>{const s=i._ctx;for(const r in i){if(rl(r))continue;const n=i[r];if(me(n))t[r]=Qu(r,n,s);else if(n!=null){const a=vn(n);t[r]=()=>a}}},al=(i,t)=>{const e=vn(t);i.slots.default=()=>e},eh=(i,t)=>{if(i.vnode.shapeFlag&32){const e=t._;e?(i.slots=Ce(t),Bi(t,"_",e)):nl(t,i.slots={})}else i.slots={},t&&al(i,t);Bi(i.slots,or,1)},th=(i,t,e)=>{const{vnode:s,slots:r}=i;let n=!0,a=Me;if(s.shapeFlag&32){const o=t._;o?e&&o===1?n=!1:(He(r,t),!e&&o===1&&delete r._):(n=!t.$stable,nl(t,r)),a=t}else t&&(al(i,t),a={default:1});if(n)for(const o in r)!rl(o)&&a[o]==null&&delete r[o]};function Xr(i,t,e,s,r=!1){if(fe(i)){i.forEach((m,w)=>Xr(m,t&&(fe(t)?t[w]:t),e,s,r));return}if(Ni(s)&&!r)return;const n=s.shapeFlag&4?cr(s.component)||s.component.proxy:s.el,a=r?null:n,{i:o,r:l}=i,u=t&&t.r,c=o.refs===Me?o.refs={}:o.refs,d=o.setupState;if(u!=null&&u!==l&&(Be(u)?(c[u]=null,Se(d,u)&&(d[u]=null)):nt(u)&&(u.value=null)),me(l))Yt(l,o,12,[a,c]);else{const m=Be(l),w=nt(l),y=i.f;if(m||w){const L=()=>{if(y){const C=m?Se(d,l)?d[l]:c[l]:l.value;r?fe(C)&&fn(C,n):fe(C)?C.includes(n)||C.push(n):m?(c[l]=[n],Se(d,l)&&(d[l]=c[l])):(l.value=[n],i.k&&(c[i.k]=l.value))}else m?(c[l]=a,Se(d,l)&&(d[l]=a)):w&&(l.value=a,i.k&&(c[i.k]=a))};r||y?L():(L.id=-1,st(L,e))}}}function sh(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(mn().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const st=Eu;function ih(i){return rh(i)}function rh(i,t){sh();const e=mn();e.__VUE__=!0;const{insert:s,remove:r,patchProp:n,createElement:a,createText:o,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:m,setScopeId:w=ct,insertStaticContent:y}=i,L=(x,S,M,_=null,D=null,J=null,B=void 0,q=null,V=!!S.dynamicChildren)=>{if(x===S)return;x&&!Bs(x,S)&&(_=ze(x),re(x,D,J,!0),x=null),S.patchFlag===-2&&(V=!1,S.dynamicChildren=null);const{type:R,ref:te,shapeFlag:ne}=S;switch(R){case ar:C(x,S,M,_);break;case gs:I(x,S,M,_);break;case vr:x==null&&k(S,M,_,B);break;case lt:P(x,S,M,_,D,J,B,q,V);break;default:ne&1?T(x,S,M,_,D,J,B,q,V):ne&6?z(x,S,M,_,D,J,B,q,V):(ne&64||ne&128)&&R.process(x,S,M,_,D,J,B,q,V,Qe)}te!=null&&D&&Xr(te,x&&x.ref,J,S||x,!S)},C=(x,S,M,_)=>{if(x==null)s(S.el=o(S.children),M,_);else{const D=S.el=x.el;S.children!==x.children&&u(D,S.children)}},I=(x,S,M,_)=>{x==null?s(S.el=l(S.children||""),M,_):S.el=x.el},k=(x,S,M,_)=>{[x.el,x.anchor]=y(x.children,S,M,_,x.el,x.anchor)},j=({el:x,anchor:S},M,_)=>{let D;for(;x&&x!==S;)D=m(x),s(x,M,_),x=D;s(S,M,_)},$=({el:x,anchor:S})=>{let M;for(;x&&x!==S;)M=m(x),r(x),x=M;r(S)},T=(x,S,M,_,D,J,B,q,V)=>{S.type==="svg"?B="svg":S.type==="math"&&(B="mathml"),x==null?K(S,M,_,D,J,B,q,V):X(x,S,D,J,B,q,V)},K=(x,S,M,_,D,J,B,q)=>{let V,R;const{props:te,shapeFlag:ne,transition:ae,dirs:pe}=x;if(V=x.el=a(x.type,J,te&&te.is,te),ne&8?c(V,x.children):ne&16&&p(x.children,V,null,_,D,Cr(x,J),B,q),pe&&as(x,null,_,"created"),Pe(V,x,x.scopeId,B,_),te){for(const G in te)G!=="value"&&!Ei(G)&&n(V,G,null,te[G],J,x.children,_,D,Te);"value"in te&&n(V,"value",null,te.value,J),(R=te.onVnodeBeforeMount)&&xt(R,_,x)}pe&&as(x,null,_,"beforeMount");const U=nh(D,ae);U&&ae.beforeEnter(V),s(V,S,M),((R=te&&te.onVnodeMounted)||U||pe)&&st(()=>{R&&xt(R,_,x),U&&ae.enter(V),pe&&as(x,null,_,"mounted")},D)},Pe=(x,S,M,_,D)=>{if(M&&w(x,M),_)for(let J=0;J<_.length;J++)w(x,_[J]);if(D){let J=D.subTree;if(S===J){const B=D.vnode;Pe(x,B,B.scopeId,B.slotScopeIds,D.parent)}}},p=(x,S,M,_,D,J,B,q,V=0)=>{for(let R=V;R{const q=S.el=x.el;let{patchFlag:V,dynamicChildren:R,dirs:te}=S;V|=x.patchFlag&16;const ne=x.props||Me,ae=S.props||Me;let pe;if(M&&os(M,!1),(pe=ae.onVnodeBeforeUpdate)&&xt(pe,M,S,x),te&&as(S,x,M,"beforeUpdate"),M&&os(M,!0),R?Y(x.dynamicChildren,R,q,M,_,Cr(S,D),J):B||E(x,S,q,null,M,_,Cr(S,D),J,!1),V>0){if(V&16)f(q,S,ne,ae,M,_,D);else if(V&2&&ne.class!==ae.class&&n(q,"class",null,ae.class,D),V&4&&n(q,"style",ne.style,ae.style,D),V&8){const U=S.dynamicProps;for(let G=0;G{pe&&xt(pe,M,S,x),te&&as(S,x,M,"updated")},_)},Y=(x,S,M,_,D,J,B)=>{for(let q=0;q{if(M!==_){if(M!==Me)for(const q in M)!Ei(q)&&!(q in _)&&n(x,q,M[q],null,B,S.children,D,J,Te);for(const q in _){if(Ei(q))continue;const V=_[q],R=M[q];V!==R&&q!=="value"&&n(x,q,R,V,B,S.children,D,J,Te)}"value"in _&&n(x,"value",M.value,_.value,B)}},P=(x,S,M,_,D,J,B,q,V)=>{const R=S.el=x?x.el:o(""),te=S.anchor=x?x.anchor:o("");let{patchFlag:ne,dynamicChildren:ae,slotScopeIds:pe}=S;pe&&(q=q?q.concat(pe):pe),x==null?(s(R,M,_),s(te,M,_),p(S.children||[],M,te,D,J,B,q,V)):ne>0&&ne&64&&ae&&x.dynamicChildren?(Y(x.dynamicChildren,ae,M,D,J,B,q),(S.key!=null||D&&S===D.subTree)&&ol(x,S,!0)):E(x,S,M,te,D,J,B,q,V)},z=(x,S,M,_,D,J,B,q,V)=>{S.slotScopeIds=q,x==null?S.shapeFlag&512?D.ctx.activate(S,M,_,B,V):H(S,M,_,D,J,B,V):v(x,S,V)},H=(x,S,M,_,D,J,B)=>{const q=x.component=yh(x,_,D);if(Yo(x)&&(q.ctx.renderer=Qe),gh(q),q.asyncDep){if(D&&D.registerDep(q,N),!x.el){const V=q.subTree=Ue(gs);I(null,V,S,M)}}else N(q,x,S,M,D,J,B)},v=(x,S,M)=>{const _=S.component=x.component;if(bu(x,S,M))if(_.asyncDep&&!_.asyncResolved){g(_,S,M);return}else _.next=S,pu(_.update),_.effect.dirty=!0,_.update();else S.el=x.el,_.vnode=S},N=(x,S,M,_,D,J,B)=>{const q=()=>{if(x.isMounted){let{next:te,bu:ne,u:ae,parent:pe,vnode:U}=x;{const Ne=ll(x);if(Ne){te&&(te.el=U.el,g(x,te,B)),Ne.asyncDep.then(()=>{x.isUnmounted||q()});return}}let G=te,se;os(x,!1),te?(te.el=U.el,g(x,te,B)):te=U,ne&&Ci(ne),(se=te.props&&te.props.onVnodeBeforeUpdate)&&xt(se,pe,te,U),os(x,!0);const ue=wr(x),ye=x.subTree;x.subTree=ue,L(ye,ue,d(ye.el),ze(ye),x,D,J),te.el=ue.el,G===null&&Pu(x,ue.el),ae&&st(ae,D),(se=te.props&&te.props.onVnodeUpdated)&&st(()=>xt(se,pe,te,U),D)}else{let te;const{el:ne,props:ae}=S,{bm:pe,m:U,parent:G}=x,se=Ni(S);if(os(x,!1),pe&&Ci(pe),!se&&(te=ae&&ae.onVnodeBeforeMount)&&xt(te,G,S),os(x,!0),ne&&rs){const ue=()=>{x.subTree=wr(x),rs(ne,x.subTree,x,D,null)};se?S.type.__asyncLoader().then(()=>!x.isUnmounted&&ue()):ue()}else{const ue=x.subTree=wr(x);L(null,ue,M,_,x,D,J),S.el=ue.el}if(U&&st(U,D),!se&&(te=ae&&ae.onVnodeMounted)){const ue=S;st(()=>xt(te,G,ue),D)}(S.shapeFlag&256||G&&Ni(G.vnode)&&G.vnode.shapeFlag&256)&&x.a&&st(x.a,D),x.isMounted=!0,S=M=_=null}},V=x.effect=new gn(q,ct,()=>En(R),x.scope),R=x.update=()=>{V.dirty&&V.run()};R.id=x.uid,os(x,!0),R()},g=(x,S,M)=>{S.component=x;const _=x.vnode.props;x.vnode=S,x.next=null,Zu(x,S.props,_,M),th(x,S.children,M),xs(),ha(x),bs()},E=(x,S,M,_,D,J,B,q,V=!1)=>{const R=x&&x.children,te=x?x.shapeFlag:0,ne=S.children,{patchFlag:ae,shapeFlag:pe}=S;if(ae>0){if(ae&128){ee(R,ne,M,_,D,J,B,q,V);return}else if(ae&256){W(R,ne,M,_,D,J,B,q,V);return}}pe&8?(te&16&&Te(R,D,J),ne!==R&&c(M,ne)):te&16?pe&16?ee(R,ne,M,_,D,J,B,q,V):Te(R,D,J,!0):(te&8&&c(M,""),pe&16&&p(ne,M,_,D,J,B,q,V))},W=(x,S,M,_,D,J,B,q,V)=>{x=x||Ss,S=S||Ss;const R=x.length,te=S.length,ne=Math.min(R,te);let ae;for(ae=0;aete?Te(x,D,J,!0,!1,ne):p(S,M,_,D,J,B,q,V,ne)},ee=(x,S,M,_,D,J,B,q,V)=>{let R=0;const te=S.length;let ne=x.length-1,ae=te-1;for(;R<=ne&&R<=ae;){const pe=x[R],U=S[R]=V?qt(S[R]):Pt(S[R]);if(Bs(pe,U))L(pe,U,M,null,D,J,B,q,V);else break;R++}for(;R<=ne&&R<=ae;){const pe=x[ne],U=S[ae]=V?qt(S[ae]):Pt(S[ae]);if(Bs(pe,U))L(pe,U,M,null,D,J,B,q,V);else break;ne--,ae--}if(R>ne){if(R<=ae){const pe=ae+1,U=peae)for(;R<=ne;)re(x[R],D,J,!0),R++;else{const pe=R,U=R,G=new Map;for(R=U;R<=ae;R++){const Ke=S[R]=V?qt(S[R]):Pt(S[R]);Ke.key!=null&&G.set(Ke.key,R)}let se,ue=0;const ye=ae-U+1;let Ne=!1,Bt=0;const ot=new Array(ye);for(R=0;R=ye){re(Ke,D,J,!0);continue}let Oe;if(Ke.key!=null)Oe=G.get(Ke.key);else for(se=U;se<=ae;se++)if(ot[se-U]===0&&Bs(Ke,S[se])){Oe=se;break}Oe===void 0?re(Ke,D,J,!0):(ot[Oe-U]=R+1,Oe>=Bt?Bt=Oe:Ne=!0,L(Ke,S[Oe],M,null,D,J,B,q,V),ue++)}const ns=Ne?ah(ot):Ss;for(se=ns.length-1,R=ye-1;R>=0;R--){const Ke=U+R,Oe=S[Ke],$e=Ke+1{const{el:J,type:B,transition:q,children:V,shapeFlag:R}=x;if(R&6){ce(x.component.subTree,S,M,_);return}if(R&128){x.suspense.move(S,M,_);return}if(R&64){B.move(x,S,M,Qe);return}if(B===lt){s(J,S,M);for(let ne=0;neq.enter(J),D);else{const{leave:ne,delayLeave:ae,afterLeave:pe}=q,U=()=>s(J,S,M),G=()=>{ne(J,()=>{U(),pe&&pe()})};ae?ae(J,U,G):G()}else s(J,S,M)},re=(x,S,M,_=!1,D=!1)=>{const{type:J,props:B,ref:q,children:V,dynamicChildren:R,shapeFlag:te,patchFlag:ne,dirs:ae}=x;if(q!=null&&Xr(q,null,M,x,!0),te&256){S.ctx.deactivate(x);return}const pe=te&1&&ae,U=!Ni(x);let G;if(U&&(G=B&&B.onVnodeBeforeUnmount)&&xt(G,S,x),te&6)Ie(x.component,M,_);else{if(te&128){x.suspense.unmount(M,_);return}pe&&as(x,null,S,"beforeUnmount"),te&64?x.type.remove(x,S,M,D,Qe,_):R&&(J!==lt||ne>0&&ne&64)?Te(R,S,M,!1,!0):(J===lt&&ne&384||!D&&te&16)&&Te(V,S,M),_&&he(x)}(U&&(G=B&&B.onVnodeUnmounted)||pe)&&st(()=>{G&&xt(G,S,x),pe&&as(x,null,S,"unmounted")},M)},he=x=>{const{type:S,el:M,anchor:_,transition:D}=x;if(S===lt){Re(M,_);return}if(S===vr){$(x);return}const J=()=>{r(M),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(x.shapeFlag&1&&D&&!D.persisted){const{leave:B,delayLeave:q}=D,V=()=>B(M,J);q?q(x.el,J,V):V()}else J()},Re=(x,S)=>{let M;for(;x!==S;)M=m(x),r(x),x=M;r(S)},Ie=(x,S,M)=>{const{bum:_,scope:D,update:J,subTree:B,um:q}=x;_&&Ci(_),D.stop(),J&&(J.active=!1,re(B,x,S,M)),q&&st(q,S),st(()=>{x.isUnmounted=!0},S),S&&S.pendingBranch&&!S.isUnmounted&&x.asyncDep&&!x.asyncResolved&&x.suspenseId===S.pendingId&&(S.deps--,S.deps===0&&S.resolve())},Te=(x,S,M,_=!1,D=!1,J=0)=>{for(let B=J;Bx.shapeFlag&6?ze(x.component.subTree):x.shapeFlag&128?x.suspense.next():m(x.anchor||x.el);let at=!1;const Ge=(x,S,M)=>{x==null?S._vnode&&re(S._vnode,null,null,!0):L(S._vnode||null,x,S,null,null,null,M),at||(at=!0,ha(),zo(),at=!1),S._vnode=x},Qe={p:L,um:re,m:ce,r:he,mt:H,mc:p,pc:E,pbc:Y,n:ze,o:i};let St,rs;return t&&([St,rs]=t(Qe)),{render:Ge,hydrate:St,createApp:Ju(Ge,St)}}function Cr({type:i,props:t},e){return e==="svg"&&i==="foreignObject"||e==="mathml"&&i==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:e}function os({effect:i,update:t},e){i.allowRecurse=t.allowRecurse=e}function nh(i,t){return(!i||i&&!i.pendingBranch)&&t&&!t.persisted}function ol(i,t,e=!1){const s=i.children,r=t.children;if(fe(s)&&fe(r))for(let n=0;n>1,i[e[o]]0&&(t[s]=e[n-1]),e[n]=s)}}for(n=e.length,a=e[n-1];n-- >0;)e[n]=a,a=t[a];return e}function ll(i){const t=i.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ll(t)}const oh=i=>i.__isTeleport,lt=Symbol.for("v-fgt"),ar=Symbol.for("v-txt"),gs=Symbol.for("v-cmt"),vr=Symbol.for("v-stc"),Xs=[];let ft=null;function ht(i=!1){Xs.push(ft=i?null:[])}function lh(){Xs.pop(),ft=Xs[Xs.length-1]||null}let ni=1;function Aa(i){ni+=i}function cl(i){return i.dynamicChildren=ni>0?ft||Ss:null,lh(),ni>0&&ft&&ft.push(i),i}function gt(i,t,e,s,r,n){return cl(be(i,t,e,s,r,n,!0))}function ch(i,t,e,s,r){return cl(Ue(i,t,e,s,r,!0))}function Yr(i){return i?i.__v_isVNode===!0:!1}function Bs(i,t){return i.type===t.type&&i.key===t.key}const or="__vInternal",ul=({key:i})=>i!=null?i:null,Li=({ref:i,ref_key:t,ref_for:e})=>(typeof i=="number"&&(i=""+i),i!=null?Be(i)||nt(i)||me(i)?{i:it,r:i,k:t,f:!!e}:i:null);function be(i,t=null,e=null,s=0,r=null,n=i===lt?0:1,a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:i,props:t,key:t&&ul(t),ref:t&&Li(t),scopeId:qo,slotScopeIds:null,children:e,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:it};return o?(In(l,e),n&128&&i.normalize(l)):e&&(l.shapeFlag|=Be(e)?8:16),ni>0&&!a&&ft&&(l.patchFlag>0||n&6)&&l.patchFlag!==32&&ft.push(l),l}const Ue=uh;function uh(i,t=null,e=null,s=0,r=null,n=!1){if((!i||i===Au)&&(i=gs),Yr(i)){const o=Ls(i,t,!0);return e&&In(o,e),ni>0&&!n&&ft&&(o.shapeFlag&6?ft[ft.indexOf(i)]=o:ft.push(o)),o.patchFlag|=-2,o}if(Ah(i)&&(i=i.__vccOpts),t){t=hh(t);let{class:o,style:l}=t;o&&!Be(o)&&(t.class=ti(o)),Le(l)&&($o(l)&&!fe(l)&&(l=He({},l)),t.style=yn(l))}const a=Be(i)?1:Su(i)?128:oh(i)?64:Le(i)?4:me(i)?2:0;return be(i,t,e,s,r,a,n,!0)}function hh(i){return i?$o(i)||or in i?He({},i):i:null}function Ls(i,t,e=!1){const{props:s,ref:r,patchFlag:n,children:a}=i,o=t?fh(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:i.type,props:o,key:o&&ul(o),ref:t&&t.ref?e&&r?fe(r)?r.concat(Li(t)):[r,Li(t)]:Li(t):r,scopeId:i.scopeId,slotScopeIds:i.slotScopeIds,children:a,target:i.target,targetAnchor:i.targetAnchor,staticCount:i.staticCount,shapeFlag:i.shapeFlag,patchFlag:t&&i.type!==lt?n===-1?16:n|16:n,dynamicProps:i.dynamicProps,dynamicChildren:i.dynamicChildren,appContext:i.appContext,dirs:i.dirs,transition:i.transition,component:i.component,suspense:i.suspense,ssContent:i.ssContent&&Ls(i.ssContent),ssFallback:i.ssFallback&&Ls(i.ssFallback),el:i.el,anchor:i.anchor,ctx:i.ctx,ce:i.ce}}function Zr(i=" ",t=0){return Ue(ar,null,i,t)}function ph(i="",t=!1){return t?(ht(),ch(gs,null,i)):Ue(gs,null,i)}function Pt(i){return i==null||typeof i=="boolean"?Ue(gs):fe(i)?Ue(lt,null,i.slice()):typeof i=="object"?qt(i):Ue(ar,null,String(i))}function qt(i){return i.el===null&&i.patchFlag!==-1||i.memo?i:Ls(i)}function In(i,t){let e=0;const{shapeFlag:s}=i;if(t==null)t=null;else if(fe(t))e=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),In(i,r()),r._c&&(r._d=!0));return}else{e=32;const r=t._;!r&&!(or in t)?t._ctx=it:r===3&&it&&(it.slots._===1?t._=1:(t._=2,i.patchFlag|=1024))}else me(t)?(t={default:t,_ctx:it},e=32):(t=String(t),s&64?(e=16,t=[Zr(t)]):e=8);i.children=t,i.shapeFlag|=e}function fh(...i){const t={};for(let e=0;e{let r;return(r=i[e])||(r=i[e]=[]),r.push(s),n=>{r.length>1?r.forEach(a=>a(n)):r[0](n)}};Vi=t("__VUE_INSTANCE_SETTERS__",e=>qe=e),Qr=t("__VUE_SSR_SETTERS__",e=>lr=e)}const hi=i=>{const t=qe;return Vi(i),i.scope.on(),()=>{i.scope.off(),Vi(t)}},wa=()=>{qe&&qe.scope.off(),Vi(null)};function hl(i){return i.vnode.shapeFlag&4}let lr=!1;function gh(i,t=!1){t&&Qr(t);const{props:e,children:s}=i.vnode,r=hl(i);Yu(i,e,r,t),eh(i,s);const n=r?xh(i,t):void 0;return t&&Qr(!1),n}function xh(i,t){const e=i.type;i.accessCache=Object.create(null),i.proxy=Bo(new Proxy(i.ctx,Hu));const{setup:s}=e;if(s){const r=i.setupContext=s.length>1?Ph(i):null,n=hi(i);xs();const a=Yt(s,i,0,[i.props,r]);if(bs(),n(),xo(a)){if(a.then(wa,wa),t)return a.then(o=>{Sa(i,o,t)}).catch(o=>{ir(o,i,0)});i.asyncDep=a}else Sa(i,a,t)}else pl(i,t)}function Sa(i,t,e){me(t)?i.type.__ssrInlineRender?i.ssrRender=t:i.render=t:Le(t)&&(i.setupState=Uo(t)),pl(i,e)}let Ea;function pl(i,t,e){const s=i.type;if(!i.render){if(!t&&Ea&&!s.render){const r=s.template||Cn(i).template;if(r){const{isCustomElement:n,compilerOptions:a}=i.appContext.config,{delimiters:o,compilerOptions:l}=s,u=He(He({isCustomElement:n,delimiters:o},a),l);s.render=Ea(r,u)}}i.render=s.render||ct}{const r=hi(i);xs();try{Vu(i)}finally{bs(),r()}}}function bh(i){return i.attrsProxy||(i.attrsProxy=new Proxy(i.attrs,{get(t,e){return rt(i,"get","$attrs"),t[e]}}))}function Ph(i){const t=e=>{i.exposed=e||{}};return{get attrs(){return bh(i)},slots:i.slots,emit:i.emit,expose:t}}function cr(i){if(i.exposed)return i.exposeProxy||(i.exposeProxy=new Proxy(Uo(Bo(i.exposed)),{get(t,e){if(e in t)return t[e];if(e in Js)return Js[e](i)},has(t,e){return e in t||e in Js}}))}function Th(i,t=!0){return me(i)?i.displayName||i.name:i.name||t&&i.__name}function Ah(i){return me(i)&&"__vccOpts"in i}const Lt=(i,t)=>nu(i,t,lr);function Ca(i,t,e){const s=arguments.length;return s===2?Le(t)&&!fe(t)?Yr(t)?Ue(i,null,[t]):Ue(i,t):Ue(i,null,t):(s>3?e=Array.prototype.slice.call(arguments,2):s===3&&Yr(e)&&(e=[e]),Ue(i,t,e))}const wh="3.4.15";/** +**/function Yt(i,t,e,s){let r;try{r=s?i(...s):i()}catch(n){ir(n,t,e)}return r}function mt(i,t,e,s){if(me(i)){const n=Yt(i,t,e,s);return n&&xo(n)&&n.catch(a=>{ir(a,t,e)}),n}const r=[];for(let n=0;n>>1,r=We[s],n=ri(r);nTt&&We.splice(t,1)}function fu(i){fe(i)?vs.push(...i):(!Wt||!Wt.includes(i,i.allowRecurse?hs+1:hs))&&vs.push(i),Vo()}function ha(i,t,e=ii?Tt+1:0){for(;eri(e)-ri(s));if(vs.length=0,Wt){Wt.push(...t);return}for(Wt=t,hs=0;hsi.id==null?1/0:i.id,du=(i,t)=>{const e=ri(i)-ri(t);if(e===0){if(i.pre&&!t.pre)return-1;if(t.pre&&!i.pre)return 1}return e};function Ko(i){Kr=!1,ii=!0,We.sort(du);const t=ct;try{for(Tt=0;TtRe(w)?w.trim():w)),d&&(r=e.map(jr))}let o,l=s[o=Tr(t)]||s[o=Tr(At(t))];!l&&n&&(l=s[o=Tr(Os(t))]),l&&mt(l,i,6,r);const u=s[o+"Once"];if(u){if(!i.emitted)i.emitted={};else if(i.emitted[o])return;i.emitted[o]=!0,mt(u,i,6,r)}}function Wo(i,t,e=!1){const s=t.emitsCache,r=s.get(i);if(r!==void 0)return r;const n=i.emits;let a={},o=!1;if(!me(i)){const l=u=>{const c=Wo(u,t,!0);c&&(o=!0,He(a,c))};!e&&t.mixins.length&&t.mixins.forEach(l),i.extends&&l(i.extends),i.mixins&&i.mixins.forEach(l)}return!n&&!o?(Le(i)&&s.set(i,null),null):(fe(n)?n.forEach(l=>a[l]=null):He(a,n),Le(i)&&s.set(i,a),a)}function rr(i,t){return!i||!Xi(t)?!1:(t=t.slice(2).replace(/Once$/,""),Se(i,t[0].toLowerCase()+t.slice(1))||Se(i,Os(t))||Se(i,t))}let it=null,qo=null;function ji(i){const t=it;return it=i,qo=i&&i.type.__scopeId||null,t}function yu(i,t=it,e){if(!t||i._n)return i;const s=(...r)=>{s._d&&Aa(-1);const n=ji(t);let a;try{a=i(...r)}finally{ji(n),s._d&&Aa(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function wr(i){const{type:t,vnode:e,proxy:s,withProxy:r,props:n,propsOptions:[a],slots:o,attrs:l,emit:u,render:c,renderCache:d,data:m,setupState:w,ctx:y,inheritAttrs:L}=i;let C,I;const k=ji(i);try{if(e.shapeFlag&4){const $=r||s,T=$;C=Pt(c.call(T,$,d,n,w,m,y)),I=l}else{const $=t;C=Pt($.length>1?$(n,{attrs:l,slots:o,emit:u}):$(n,null)),I=t.props?l:gu(l)}}catch($){Xs.length=0,ir($,i,1),C=Ue(gs)}let j=C;if(I&&L!==!1){const $=Object.keys(I),{shapeFlag:T}=j;$.length&&T&7&&(a&&$.some(pn)&&(I=xu(I,a)),j=Ls(j,I))}return e.dirs&&(j=Ls(j),j.dirs=j.dirs?j.dirs.concat(e.dirs):e.dirs),e.transition&&(j.transition=e.transition),C=j,ji(k),C}const gu=i=>{let t;for(const e in i)(e==="class"||e==="style"||Xi(e))&&((t||(t={}))[e]=i[e]);return t},xu=(i,t)=>{const e={};for(const s in i)(!pn(s)||!(s.slice(9)in t))&&(e[s]=i[s]);return e};function bu(i,t,e){const{props:s,children:r,component:n}=i,{props:a,children:o,patchFlag:l}=t,u=n.emitsOptions;if(t.dirs||t.transition)return!0;if(e&&l>=0){if(l&1024)return!0;if(l&16)return s?pa(s,a,u):!!a;if(l&8){const c=t.dynamicProps;for(let d=0;di.__isSuspense;function Eu(i,t){t&&t.pendingBranch?fe(i)?t.effects.push(...i):t.effects.push(i):fu(i)}const Cu=Symbol.for("v-scx"),vu=()=>ki(Cu),Pi={};function Gs(i,t,e){return Jo(i,t,e)}function Jo(i,t,{immediate:e,deep:s,flush:r,once:n,onTrack:a,onTrigger:o}=Me){if(t&&n){const K=t;t=(...Pe)=>{K(...Pe),T()}}const l=qe,u=K=>s===!0?K:fs(K,s===!1?1:void 0);let c,d=!1,m=!1;if(nt(i)?(c=()=>i.value,d=Bi(i)):Cs(i)?(c=()=>u(i),d=!0):fe(i)?(m=!0,d=i.some(K=>Cs(K)||Bi(K)),c=()=>i.map(K=>{if(nt(K))return K.value;if(Cs(K))return u(K);if(me(K))return Yt(K,l,2)})):me(i)?t?c=()=>Yt(i,l,2):c=()=>(w&&w(),mt(i,l,3,[y])):c=ct,t&&s){const K=c;c=()=>fs(K())}let w,y=K=>{w=j.onStop=()=>{Yt(K,l,4),w=j.onStop=void 0}},L;if(lr)if(y=ct,t?e&&mt(t,l,3,[c(),m?[]:void 0,y]):c(),r==="sync"){const K=vu();L=K.__watcherHandles||(K.__watcherHandles=[])}else return ct;let C=m?new Array(i.length).fill(Pi):Pi;const I=()=>{if(!(!j.active||!j.dirty))if(t){const K=j.run();(s||d||(m?K.some((Pe,p)=>ts(Pe,C[p])):ts(K,C)))&&(w&&w(),mt(t,l,3,[K,C===Pi?void 0:m&&C[0]===Pi?[]:C,y]),C=K)}else j.run()};I.allowRecurse=!!t;let k;r==="sync"?k=I:r==="post"?k=()=>st(I,l&&l.suspense):(I.pre=!0,l&&(I.id=l.uid),k=()=>En(I));const j=new gn(c,ct,k),$=Rc(),T=()=>{j.stop(),$&&fn($.effects,j)};return t?e?I():C=j.run():r==="post"?st(j.run.bind(j),l&&l.suspense):j.run(),L&&L.push(T),T}function Iu(i,t,e){const s=this.proxy,r=Re(i)?i.includes(".")?Xo(s,i):()=>s[i]:i.bind(s,s);let n;me(t)?n=t:(n=t.handler,e=t);const a=hi(this),o=Jo(r,n.bind(s),e);return a(),o}function Xo(i,t){const e=t.split(".");return()=>{let s=i;for(let r=0;r0){if(e>=t)return i;e++}if(s=s||new Set,s.has(i))return i;if(s.add(i),nt(i))fs(i.value,t,e,s);else if(fe(i))for(let r=0;r{fs(r,t,e,s)});else if(Po(i))for(const r in i)fs(i[r],t,e,s);return i}function $s(i,t){if(it===null)return i;const e=cr(it)||it.proxy,s=i.dirs||(i.dirs=[]);for(let r=0;rHe({name:i.name},t,{setup:i}))():i}const Ni=i=>!!i.type.__asyncLoader,Yo=i=>i.type.__isKeepAlive;function ku(i,t){Zo(i,"a",t)}function Lu(i,t){Zo(i,"da",t)}function Zo(i,t,e=qe){const s=i.__wdc||(i.__wdc=()=>{let r=e;for(;r;){if(r.isDeactivated)return;r=r.parent}return i()});if(nr(t,s,e),e){let r=e.parent;for(;r&&r.parent;)Yo(r.parent.vnode)&&Mu(s,t,e,r),r=r.parent}}function Mu(i,t,e,s){const r=nr(t,i,s,!0);Qo(()=>{fn(s[t],r)},e)}function nr(i,t,e=qe,s=!1){if(e){const r=e[i]||(e[i]=[]),n=t.__weh||(t.__weh=(...a)=>{if(e.isUnmounted)return;xs();const o=hi(e),l=mt(t,e,i,a);return o(),bs(),l});return s?r.unshift(n):r.push(n),n}}const $t=i=>(t,e=qe)=>(!lr||i==="sp")&&nr(i,(...s)=>t(...s),e),_u=$t("bm"),Ou=$t("m"),Du=$t("bu"),Fu=$t("u"),$u=$t("bum"),Qo=$t("um"),Ru=$t("sp"),Bu=$t("rtg"),ju=$t("rtc");function Uu(i,t=qe){nr("ec",i,t)}function Sr(i,t,e,s){let r;const n=e&&e[s];if(fe(i)||Re(i)){r=new Array(i.length);for(let a=0,o=i.length;at(a,o,void 0,n&&n[o]));else{const a=Object.keys(i);r=new Array(a.length);for(let o=0,l=a.length;oi?hl(i)?cr(i)||i.proxy:Wr(i.parent):null,Js=He(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>Wr(i.parent),$root:i=>Wr(i.root),$emit:i=>i.emit,$options:i=>Cn(i),$forceUpdate:i=>i.f||(i.f=()=>{i.effect.dirty=!0,En(i.update)}),$nextTick:i=>i.n||(i.n=uu.bind(i.proxy)),$watch:i=>Iu.bind(i)}),Er=(i,t)=>i!==Me&&!i.__isScriptSetup&&Se(i,t),Hu={get({_:i},t){const{ctx:e,setupState:s,data:r,props:n,accessCache:a,type:o,appContext:l}=i;let u;if(t[0]!=="$"){const w=a[t];if(w!==void 0)switch(w){case 1:return s[t];case 2:return r[t];case 4:return e[t];case 3:return n[t]}else{if(Er(s,t))return a[t]=1,s[t];if(r!==Me&&Se(r,t))return a[t]=2,r[t];if((u=i.propsOptions[0])&&Se(u,t))return a[t]=3,n[t];if(e!==Me&&Se(e,t))return a[t]=4,e[t];qr&&(a[t]=0)}}const c=Js[t];let d,m;if(c)return t==="$attrs"&&rt(i,"get",t),c(i);if((d=o.__cssModules)&&(d=d[t]))return d;if(e!==Me&&Se(e,t))return a[t]=4,e[t];if(m=l.config.globalProperties,Se(m,t))return m[t]},set({_:i},t,e){const{data:s,setupState:r,ctx:n}=i;return Er(r,t)?(r[t]=e,!0):s!==Me&&Se(s,t)?(s[t]=e,!0):Se(i.props,t)||t[0]==="$"&&t.slice(1)in i?!1:(n[t]=e,!0)},has({_:{data:i,setupState:t,accessCache:e,ctx:s,appContext:r,propsOptions:n}},a){let o;return!!e[a]||i!==Me&&Se(i,a)||Er(t,a)||(o=n[0])&&Se(o,a)||Se(s,a)||Se(Js,a)||Se(r.config.globalProperties,a)},defineProperty(i,t,e){return e.get!=null?i._.accessCache[t]=0:Se(e,"value")&&this.set(i,t,e.value,null),Reflect.defineProperty(i,t,e)}};function da(i){return fe(i)?i.reduce((t,e)=>(t[e]=null,t),{}):i}let qr=!0;function Vu(i){const t=Cn(i),e=i.proxy,s=i.ctx;qr=!1,t.beforeCreate&&ma(t.beforeCreate,i,"bc");const{data:r,computed:n,methods:a,watch:o,provide:l,inject:u,created:c,beforeMount:d,mounted:m,beforeUpdate:w,updated:y,activated:L,deactivated:C,beforeDestroy:I,beforeUnmount:k,destroyed:j,unmounted:$,render:T,renderTracked:K,renderTriggered:Pe,errorCaptured:p,serverPrefetch:X,expose:Y,inheritAttrs:f,components:P,directives:z,filters:H}=t;if(u&&zu(u,s,null),a)for(const g in a){const E=a[g];me(E)&&(s[g]=E.bind(e))}if(r){const g=r.call(e,e);Le(g)&&(i.data=sr(g))}if(qr=!0,n)for(const g in n){const E=n[g],W=me(E)?E.bind(e,e):me(E.get)?E.get.bind(e,e):ct,ee=!me(E)&&me(E.set)?E.set.bind(e):ct,ce=Lt({get:W,set:ee});Object.defineProperty(s,g,{enumerable:!0,configurable:!0,get:()=>ce.value,set:re=>ce.value=re})}if(o)for(const g in o)el(o[g],s,e,g);if(l){const g=me(l)?l.call(e):l;Reflect.ownKeys(g).forEach(E=>{Xu(E,g[E])})}c&&ma(c,i,"c");function N(g,E){fe(E)?E.forEach(W=>g(W.bind(e))):E&&g(E.bind(e))}if(N(_u,d),N(Ou,m),N(Du,w),N(Fu,y),N(ku,L),N(Lu,C),N(Uu,p),N(ju,K),N(Bu,Pe),N($u,k),N(Qo,$),N(Ru,X),fe(Y))if(Y.length){const g=i.exposed||(i.exposed={});Y.forEach(E=>{Object.defineProperty(g,E,{get:()=>e[E],set:W=>e[E]=W})})}else i.exposed||(i.exposed={});T&&i.render===ct&&(i.render=T),f!=null&&(i.inheritAttrs=f),P&&(i.components=P),z&&(i.directives=z)}function zu(i,t,e=ct){fe(i)&&(i=Gr(i));for(const s in i){const r=i[s];let n;Le(r)?"default"in r?n=ki(r.from||s,r.default,!0):n=ki(r.from||s):n=ki(r),nt(n)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>n.value,set:a=>n.value=a}):t[s]=n}}function ma(i,t,e){mt(fe(i)?i.map(s=>s.bind(t.proxy)):i.bind(t.proxy),t,e)}function el(i,t,e,s){const r=s.includes(".")?Xo(e,s):()=>e[s];if(Re(i)){const n=t[i];me(n)&&Gs(r,n)}else if(me(i))Gs(r,i.bind(e));else if(Le(i))if(fe(i))i.forEach(n=>el(n,t,e,s));else{const n=me(i.handler)?i.handler.bind(e):t[i.handler];me(n)&&Gs(r,n,i)}}function Cn(i){const t=i.type,{mixins:e,extends:s}=t,{mixins:r,optionsCache:n,config:{optionMergeStrategies:a}}=i.appContext,o=n.get(t);let l;return o?l=o:!r.length&&!e&&!s?l=t:(l={},r.length&&r.forEach(u=>Ui(l,u,a,!0)),Ui(l,t,a)),Le(t)&&n.set(t,l),l}function Ui(i,t,e,s=!1){const{mixins:r,extends:n}=t;n&&Ui(i,n,e,!0),r&&r.forEach(a=>Ui(i,a,e,!0));for(const a in t)if(!(s&&a==="expose")){const o=Ku[a]||e&&e[a];i[a]=o?o(i[a],t[a]):t[a]}return i}const Ku={data:ya,props:ga,emits:ga,methods:zs,computed:zs,beforeCreate:Ye,created:Ye,beforeMount:Ye,mounted:Ye,beforeUpdate:Ye,updated:Ye,beforeDestroy:Ye,beforeUnmount:Ye,destroyed:Ye,unmounted:Ye,activated:Ye,deactivated:Ye,errorCaptured:Ye,serverPrefetch:Ye,components:zs,directives:zs,watch:qu,provide:ya,inject:Wu};function ya(i,t){return t?i?function(){return He(me(i)?i.call(this,this):i,me(t)?t.call(this,this):t)}:t:i}function Wu(i,t){return zs(Gr(i),Gr(t))}function Gr(i){if(fe(i)){const t={};for(let e=0;e1)return e&&me(t)?t.call(s&&s.proxy):t}}function Yu(i,t,e,s=!1){const r={},n={};Ri(n,or,1),i.propsDefaults=Object.create(null),sl(i,t,r,n);for(const a in i.propsOptions[0])a in r||(r[a]=void 0);e?i.props=s?r:ru(r):i.type.props?i.props=r:i.props=n,i.attrs=n}function Zu(i,t,e,s){const{props:r,attrs:n,vnode:{patchFlag:a}}=i,o=Ce(r),[l]=i.propsOptions;let u=!1;if((s||a>0)&&!(a&16)){if(a&8){const c=i.vnode.dynamicProps;for(let d=0;d{l=!0;const[m,w]=il(d,t,!0);He(a,m),w&&o.push(...w)};!e&&t.mixins.length&&t.mixins.forEach(c),i.extends&&c(i.extends),i.mixins&&i.mixins.forEach(c)}if(!n&&!l)return Le(i)&&s.set(i,Ss),Ss;if(fe(n))for(let c=0;c-1,w[1]=L<0||y-1||Se(w,"default"))&&o.push(d)}}}const u=[a,o];return Le(i)&&s.set(i,u),u}function xa(i){return i[0]!=="$"}function ba(i){const t=i&&i.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:i===null?"null":""}function Pa(i,t){return ba(i)===ba(t)}function Ta(i,t){return fe(t)?t.findIndex(e=>Pa(e,i)):me(t)&&Pa(t,i)?0:-1}const rl=i=>i[0]==="_"||i==="$stable",vn=i=>fe(i)?i.map(Pt):[Pt(i)],Qu=(i,t,e)=>{if(t._n)return t;const s=yu((...r)=>vn(t(...r)),e);return s._c=!1,s},nl=(i,t,e)=>{const s=i._ctx;for(const r in i){if(rl(r))continue;const n=i[r];if(me(n))t[r]=Qu(r,n,s);else if(n!=null){const a=vn(n);t[r]=()=>a}}},al=(i,t)=>{const e=vn(t);i.slots.default=()=>e},eh=(i,t)=>{if(i.vnode.shapeFlag&32){const e=t._;e?(i.slots=Ce(t),Ri(t,"_",e)):nl(t,i.slots={})}else i.slots={},t&&al(i,t);Ri(i.slots,or,1)},th=(i,t,e)=>{const{vnode:s,slots:r}=i;let n=!0,a=Me;if(s.shapeFlag&32){const o=t._;o?e&&o===1?n=!1:(He(r,t),!e&&o===1&&delete r._):(n=!t.$stable,nl(t,r)),a=t}else t&&(al(i,t),a={default:1});if(n)for(const o in r)!rl(o)&&a[o]==null&&delete r[o]};function Xr(i,t,e,s,r=!1){if(fe(i)){i.forEach((m,w)=>Xr(m,t&&(fe(t)?t[w]:t),e,s,r));return}if(Ni(s)&&!r)return;const n=s.shapeFlag&4?cr(s.component)||s.component.proxy:s.el,a=r?null:n,{i:o,r:l}=i,u=t&&t.r,c=o.refs===Me?o.refs={}:o.refs,d=o.setupState;if(u!=null&&u!==l&&(Re(u)?(c[u]=null,Se(d,u)&&(d[u]=null)):nt(u)&&(u.value=null)),me(l))Yt(l,o,12,[a,c]);else{const m=Re(l),w=nt(l),y=i.f;if(m||w){const L=()=>{if(y){const C=m?Se(d,l)?d[l]:c[l]:l.value;r?fe(C)&&fn(C,n):fe(C)?C.includes(n)||C.push(n):m?(c[l]=[n],Se(d,l)&&(d[l]=c[l])):(l.value=[n],i.k&&(c[i.k]=l.value))}else m?(c[l]=a,Se(d,l)&&(d[l]=a)):w&&(l.value=a,i.k&&(c[i.k]=a))};r||y?L():(L.id=-1,st(L,e))}}}function sh(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(mn().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const st=Eu;function ih(i){return rh(i)}function rh(i,t){sh();const e=mn();e.__VUE__=!0;const{insert:s,remove:r,patchProp:n,createElement:a,createText:o,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:m,setScopeId:w=ct,insertStaticContent:y}=i,L=(x,S,M,_=null,D=null,J=null,R=void 0,q=null,V=!!S.dynamicChildren)=>{if(x===S)return;x&&!Rs(x,S)&&(_=ze(x),re(x,D,J,!0),x=null),S.patchFlag===-2&&(V=!1,S.dynamicChildren=null);const{type:B,ref:te,shapeFlag:ne}=S;switch(B){case ar:C(x,S,M,_);break;case gs:I(x,S,M,_);break;case vr:x==null&&k(S,M,_,R);break;case lt:P(x,S,M,_,D,J,R,q,V);break;default:ne&1?T(x,S,M,_,D,J,R,q,V):ne&6?z(x,S,M,_,D,J,R,q,V):(ne&64||ne&128)&&B.process(x,S,M,_,D,J,R,q,V,Qe)}te!=null&&D&&Xr(te,x&&x.ref,J,S||x,!S)},C=(x,S,M,_)=>{if(x==null)s(S.el=o(S.children),M,_);else{const D=S.el=x.el;S.children!==x.children&&u(D,S.children)}},I=(x,S,M,_)=>{x==null?s(S.el=l(S.children||""),M,_):S.el=x.el},k=(x,S,M,_)=>{[x.el,x.anchor]=y(x.children,S,M,_,x.el,x.anchor)},j=({el:x,anchor:S},M,_)=>{let D;for(;x&&x!==S;)D=m(x),s(x,M,_),x=D;s(S,M,_)},$=({el:x,anchor:S})=>{let M;for(;x&&x!==S;)M=m(x),r(x),x=M;r(S)},T=(x,S,M,_,D,J,R,q,V)=>{S.type==="svg"?R="svg":S.type==="math"&&(R="mathml"),x==null?K(S,M,_,D,J,R,q,V):X(x,S,D,J,R,q,V)},K=(x,S,M,_,D,J,R,q)=>{let V,B;const{props:te,shapeFlag:ne,transition:ae,dirs:pe}=x;if(V=x.el=a(x.type,J,te&&te.is,te),ne&8?c(V,x.children):ne&16&&p(x.children,V,null,_,D,Cr(x,J),R,q),pe&&as(x,null,_,"created"),Pe(V,x,x.scopeId,R,_),te){for(const G in te)G!=="value"&&!Ei(G)&&n(V,G,null,te[G],J,x.children,_,D,Te);"value"in te&&n(V,"value",null,te.value,J),(B=te.onVnodeBeforeMount)&&xt(B,_,x)}pe&&as(x,null,_,"beforeMount");const U=nh(D,ae);U&&ae.beforeEnter(V),s(V,S,M),((B=te&&te.onVnodeMounted)||U||pe)&&st(()=>{B&&xt(B,_,x),U&&ae.enter(V),pe&&as(x,null,_,"mounted")},D)},Pe=(x,S,M,_,D)=>{if(M&&w(x,M),_)for(let J=0;J<_.length;J++)w(x,_[J]);if(D){let J=D.subTree;if(S===J){const R=D.vnode;Pe(x,R,R.scopeId,R.slotScopeIds,D.parent)}}},p=(x,S,M,_,D,J,R,q,V=0)=>{for(let B=V;B{const q=S.el=x.el;let{patchFlag:V,dynamicChildren:B,dirs:te}=S;V|=x.patchFlag&16;const ne=x.props||Me,ae=S.props||Me;let pe;if(M&&os(M,!1),(pe=ae.onVnodeBeforeUpdate)&&xt(pe,M,S,x),te&&as(S,x,M,"beforeUpdate"),M&&os(M,!0),B?Y(x.dynamicChildren,B,q,M,_,Cr(S,D),J):R||E(x,S,q,null,M,_,Cr(S,D),J,!1),V>0){if(V&16)f(q,S,ne,ae,M,_,D);else if(V&2&&ne.class!==ae.class&&n(q,"class",null,ae.class,D),V&4&&n(q,"style",ne.style,ae.style,D),V&8){const U=S.dynamicProps;for(let G=0;G{pe&&xt(pe,M,S,x),te&&as(S,x,M,"updated")},_)},Y=(x,S,M,_,D,J,R)=>{for(let q=0;q{if(M!==_){if(M!==Me)for(const q in M)!Ei(q)&&!(q in _)&&n(x,q,M[q],null,R,S.children,D,J,Te);for(const q in _){if(Ei(q))continue;const V=_[q],B=M[q];V!==B&&q!=="value"&&n(x,q,B,V,R,S.children,D,J,Te)}"value"in _&&n(x,"value",M.value,_.value,R)}},P=(x,S,M,_,D,J,R,q,V)=>{const B=S.el=x?x.el:o(""),te=S.anchor=x?x.anchor:o("");let{patchFlag:ne,dynamicChildren:ae,slotScopeIds:pe}=S;pe&&(q=q?q.concat(pe):pe),x==null?(s(B,M,_),s(te,M,_),p(S.children||[],M,te,D,J,R,q,V)):ne>0&&ne&64&&ae&&x.dynamicChildren?(Y(x.dynamicChildren,ae,M,D,J,R,q),(S.key!=null||D&&S===D.subTree)&&ol(x,S,!0)):E(x,S,M,te,D,J,R,q,V)},z=(x,S,M,_,D,J,R,q,V)=>{S.slotScopeIds=q,x==null?S.shapeFlag&512?D.ctx.activate(S,M,_,R,V):H(S,M,_,D,J,R,V):v(x,S,V)},H=(x,S,M,_,D,J,R)=>{const q=x.component=yh(x,_,D);if(Yo(x)&&(q.ctx.renderer=Qe),gh(q),q.asyncDep){if(D&&D.registerDep(q,N),!x.el){const V=q.subTree=Ue(gs);I(null,V,S,M)}}else N(q,x,S,M,D,J,R)},v=(x,S,M)=>{const _=S.component=x.component;if(bu(x,S,M))if(_.asyncDep&&!_.asyncResolved){g(_,S,M);return}else _.next=S,pu(_.update),_.effect.dirty=!0,_.update();else S.el=x.el,_.vnode=S},N=(x,S,M,_,D,J,R)=>{const q=()=>{if(x.isMounted){let{next:te,bu:ne,u:ae,parent:pe,vnode:U}=x;{const Ne=ll(x);if(Ne){te&&(te.el=U.el,g(x,te,R)),Ne.asyncDep.then(()=>{x.isUnmounted||q()});return}}let G=te,se;os(x,!1),te?(te.el=U.el,g(x,te,R)):te=U,ne&&Ci(ne),(se=te.props&&te.props.onVnodeBeforeUpdate)&&xt(se,pe,te,U),os(x,!0);const ue=wr(x),ye=x.subTree;x.subTree=ue,L(ye,ue,d(ye.el),ze(ye),x,D,J),te.el=ue.el,G===null&&Pu(x,ue.el),ae&&st(ae,D),(se=te.props&&te.props.onVnodeUpdated)&&st(()=>xt(se,pe,te,U),D)}else{let te;const{el:ne,props:ae}=S,{bm:pe,m:U,parent:G}=x,se=Ni(S);if(os(x,!1),pe&&Ci(pe),!se&&(te=ae&&ae.onVnodeBeforeMount)&&xt(te,G,S),os(x,!0),ne&&rs){const ue=()=>{x.subTree=wr(x),rs(ne,x.subTree,x,D,null)};se?S.type.__asyncLoader().then(()=>!x.isUnmounted&&ue()):ue()}else{const ue=x.subTree=wr(x);L(null,ue,M,_,x,D,J),S.el=ue.el}if(U&&st(U,D),!se&&(te=ae&&ae.onVnodeMounted)){const ue=S;st(()=>xt(te,G,ue),D)}(S.shapeFlag&256||G&&Ni(G.vnode)&&G.vnode.shapeFlag&256)&&x.a&&st(x.a,D),x.isMounted=!0,S=M=_=null}},V=x.effect=new gn(q,ct,()=>En(B),x.scope),B=x.update=()=>{V.dirty&&V.run()};B.id=x.uid,os(x,!0),B()},g=(x,S,M)=>{S.component=x;const _=x.vnode.props;x.vnode=S,x.next=null,Zu(x,S.props,_,M),th(x,S.children,M),xs(),ha(x),bs()},E=(x,S,M,_,D,J,R,q,V=!1)=>{const B=x&&x.children,te=x?x.shapeFlag:0,ne=S.children,{patchFlag:ae,shapeFlag:pe}=S;if(ae>0){if(ae&128){ee(B,ne,M,_,D,J,R,q,V);return}else if(ae&256){W(B,ne,M,_,D,J,R,q,V);return}}pe&8?(te&16&&Te(B,D,J),ne!==B&&c(M,ne)):te&16?pe&16?ee(B,ne,M,_,D,J,R,q,V):Te(B,D,J,!0):(te&8&&c(M,""),pe&16&&p(ne,M,_,D,J,R,q,V))},W=(x,S,M,_,D,J,R,q,V)=>{x=x||Ss,S=S||Ss;const B=x.length,te=S.length,ne=Math.min(B,te);let ae;for(ae=0;aete?Te(x,D,J,!0,!1,ne):p(S,M,_,D,J,R,q,V,ne)},ee=(x,S,M,_,D,J,R,q,V)=>{let B=0;const te=S.length;let ne=x.length-1,ae=te-1;for(;B<=ne&&B<=ae;){const pe=x[B],U=S[B]=V?qt(S[B]):Pt(S[B]);if(Rs(pe,U))L(pe,U,M,null,D,J,R,q,V);else break;B++}for(;B<=ne&&B<=ae;){const pe=x[ne],U=S[ae]=V?qt(S[ae]):Pt(S[ae]);if(Rs(pe,U))L(pe,U,M,null,D,J,R,q,V);else break;ne--,ae--}if(B>ne){if(B<=ae){const pe=ae+1,U=peae)for(;B<=ne;)re(x[B],D,J,!0),B++;else{const pe=B,U=B,G=new Map;for(B=U;B<=ae;B++){const Ke=S[B]=V?qt(S[B]):Pt(S[B]);Ke.key!=null&&G.set(Ke.key,B)}let se,ue=0;const ye=ae-U+1;let Ne=!1,Rt=0;const ot=new Array(ye);for(B=0;B=ye){re(Ke,D,J,!0);continue}let Oe;if(Ke.key!=null)Oe=G.get(Ke.key);else for(se=U;se<=ae;se++)if(ot[se-U]===0&&Rs(Ke,S[se])){Oe=se;break}Oe===void 0?re(Ke,D,J,!0):(ot[Oe-U]=B+1,Oe>=Rt?Rt=Oe:Ne=!0,L(Ke,S[Oe],M,null,D,J,R,q,V),ue++)}const ns=Ne?ah(ot):Ss;for(se=ns.length-1,B=ye-1;B>=0;B--){const Ke=U+B,Oe=S[Ke],$e=Ke+1{const{el:J,type:R,transition:q,children:V,shapeFlag:B}=x;if(B&6){ce(x.component.subTree,S,M,_);return}if(B&128){x.suspense.move(S,M,_);return}if(B&64){R.move(x,S,M,Qe);return}if(R===lt){s(J,S,M);for(let ne=0;neq.enter(J),D);else{const{leave:ne,delayLeave:ae,afterLeave:pe}=q,U=()=>s(J,S,M),G=()=>{ne(J,()=>{U(),pe&&pe()})};ae?ae(J,U,G):G()}else s(J,S,M)},re=(x,S,M,_=!1,D=!1)=>{const{type:J,props:R,ref:q,children:V,dynamicChildren:B,shapeFlag:te,patchFlag:ne,dirs:ae}=x;if(q!=null&&Xr(q,null,M,x,!0),te&256){S.ctx.deactivate(x);return}const pe=te&1&&ae,U=!Ni(x);let G;if(U&&(G=R&&R.onVnodeBeforeUnmount)&&xt(G,S,x),te&6)Ie(x.component,M,_);else{if(te&128){x.suspense.unmount(M,_);return}pe&&as(x,null,S,"beforeUnmount"),te&64?x.type.remove(x,S,M,D,Qe,_):B&&(J!==lt||ne>0&&ne&64)?Te(B,S,M,!1,!0):(J===lt&&ne&384||!D&&te&16)&&Te(V,S,M),_&&he(x)}(U&&(G=R&&R.onVnodeUnmounted)||pe)&&st(()=>{G&&xt(G,S,x),pe&&as(x,null,S,"unmounted")},M)},he=x=>{const{type:S,el:M,anchor:_,transition:D}=x;if(S===lt){Be(M,_);return}if(S===vr){$(x);return}const J=()=>{r(M),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(x.shapeFlag&1&&D&&!D.persisted){const{leave:R,delayLeave:q}=D,V=()=>R(M,J);q?q(x.el,J,V):V()}else J()},Be=(x,S)=>{let M;for(;x!==S;)M=m(x),r(x),x=M;r(S)},Ie=(x,S,M)=>{const{bum:_,scope:D,update:J,subTree:R,um:q}=x;_&&Ci(_),D.stop(),J&&(J.active=!1,re(R,x,S,M)),q&&st(q,S),st(()=>{x.isUnmounted=!0},S),S&&S.pendingBranch&&!S.isUnmounted&&x.asyncDep&&!x.asyncResolved&&x.suspenseId===S.pendingId&&(S.deps--,S.deps===0&&S.resolve())},Te=(x,S,M,_=!1,D=!1,J=0)=>{for(let R=J;Rx.shapeFlag&6?ze(x.component.subTree):x.shapeFlag&128?x.suspense.next():m(x.anchor||x.el);let at=!1;const Ge=(x,S,M)=>{x==null?S._vnode&&re(S._vnode,null,null,!0):L(S._vnode||null,x,S,null,null,null,M),at||(at=!0,ha(),zo(),at=!1),S._vnode=x},Qe={p:L,um:re,m:ce,r:he,mt:H,mc:p,pc:E,pbc:Y,n:ze,o:i};let St,rs;return t&&([St,rs]=t(Qe)),{render:Ge,hydrate:St,createApp:Ju(Ge,St)}}function Cr({type:i,props:t},e){return e==="svg"&&i==="foreignObject"||e==="mathml"&&i==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:e}function os({effect:i,update:t},e){i.allowRecurse=t.allowRecurse=e}function nh(i,t){return(!i||i&&!i.pendingBranch)&&t&&!t.persisted}function ol(i,t,e=!1){const s=i.children,r=t.children;if(fe(s)&&fe(r))for(let n=0;n>1,i[e[o]]0&&(t[s]=e[n-1]),e[n]=s)}}for(n=e.length,a=e[n-1];n-- >0;)e[n]=a,a=t[a];return e}function ll(i){const t=i.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ll(t)}const oh=i=>i.__isTeleport,lt=Symbol.for("v-fgt"),ar=Symbol.for("v-txt"),gs=Symbol.for("v-cmt"),vr=Symbol.for("v-stc"),Xs=[];let ft=null;function ht(i=!1){Xs.push(ft=i?null:[])}function lh(){Xs.pop(),ft=Xs[Xs.length-1]||null}let ni=1;function Aa(i){ni+=i}function cl(i){return i.dynamicChildren=ni>0?ft||Ss:null,lh(),ni>0&&ft&&ft.push(i),i}function gt(i,t,e,s,r,n){return cl(be(i,t,e,s,r,n,!0))}function ch(i,t,e,s,r){return cl(Ue(i,t,e,s,r,!0))}function Yr(i){return i?i.__v_isVNode===!0:!1}function Rs(i,t){return i.type===t.type&&i.key===t.key}const or="__vInternal",ul=({key:i})=>i!=null?i:null,Li=({ref:i,ref_key:t,ref_for:e})=>(typeof i=="number"&&(i=""+i),i!=null?Re(i)||nt(i)||me(i)?{i:it,r:i,k:t,f:!!e}:i:null);function be(i,t=null,e=null,s=0,r=null,n=i===lt?0:1,a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:i,props:t,key:t&&ul(t),ref:t&&Li(t),scopeId:qo,slotScopeIds:null,children:e,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:it};return o?(In(l,e),n&128&&i.normalize(l)):e&&(l.shapeFlag|=Re(e)?8:16),ni>0&&!a&&ft&&(l.patchFlag>0||n&6)&&l.patchFlag!==32&&ft.push(l),l}const Ue=uh;function uh(i,t=null,e=null,s=0,r=null,n=!1){if((!i||i===Au)&&(i=gs),Yr(i)){const o=Ls(i,t,!0);return e&&In(o,e),ni>0&&!n&&ft&&(o.shapeFlag&6?ft[ft.indexOf(i)]=o:ft.push(o)),o.patchFlag|=-2,o}if(Ah(i)&&(i=i.__vccOpts),t){t=hh(t);let{class:o,style:l}=t;o&&!Re(o)&&(t.class=ti(o)),Le(l)&&($o(l)&&!fe(l)&&(l=He({},l)),t.style=yn(l))}const a=Re(i)?1:Su(i)?128:oh(i)?64:Le(i)?4:me(i)?2:0;return be(i,t,e,s,r,a,n,!0)}function hh(i){return i?$o(i)||or in i?He({},i):i:null}function Ls(i,t,e=!1){const{props:s,ref:r,patchFlag:n,children:a}=i,o=t?fh(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:i.type,props:o,key:o&&ul(o),ref:t&&t.ref?e&&r?fe(r)?r.concat(Li(t)):[r,Li(t)]:Li(t):r,scopeId:i.scopeId,slotScopeIds:i.slotScopeIds,children:a,target:i.target,targetAnchor:i.targetAnchor,staticCount:i.staticCount,shapeFlag:i.shapeFlag,patchFlag:t&&i.type!==lt?n===-1?16:n|16:n,dynamicProps:i.dynamicProps,dynamicChildren:i.dynamicChildren,appContext:i.appContext,dirs:i.dirs,transition:i.transition,component:i.component,suspense:i.suspense,ssContent:i.ssContent&&Ls(i.ssContent),ssFallback:i.ssFallback&&Ls(i.ssFallback),el:i.el,anchor:i.anchor,ctx:i.ctx,ce:i.ce}}function Zr(i=" ",t=0){return Ue(ar,null,i,t)}function ph(i="",t=!1){return t?(ht(),ch(gs,null,i)):Ue(gs,null,i)}function Pt(i){return i==null||typeof i=="boolean"?Ue(gs):fe(i)?Ue(lt,null,i.slice()):typeof i=="object"?qt(i):Ue(ar,null,String(i))}function qt(i){return i.el===null&&i.patchFlag!==-1||i.memo?i:Ls(i)}function In(i,t){let e=0;const{shapeFlag:s}=i;if(t==null)t=null;else if(fe(t))e=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),In(i,r()),r._c&&(r._d=!0));return}else{e=32;const r=t._;!r&&!(or in t)?t._ctx=it:r===3&&it&&(it.slots._===1?t._=1:(t._=2,i.patchFlag|=1024))}else me(t)?(t={default:t,_ctx:it},e=32):(t=String(t),s&64?(e=16,t=[Zr(t)]):e=8);i.children=t,i.shapeFlag|=e}function fh(...i){const t={};for(let e=0;e{let r;return(r=i[e])||(r=i[e]=[]),r.push(s),n=>{r.length>1?r.forEach(a=>a(n)):r[0](n)}};Vi=t("__VUE_INSTANCE_SETTERS__",e=>qe=e),Qr=t("__VUE_SSR_SETTERS__",e=>lr=e)}const hi=i=>{const t=qe;return Vi(i),i.scope.on(),()=>{i.scope.off(),Vi(t)}},wa=()=>{qe&&qe.scope.off(),Vi(null)};function hl(i){return i.vnode.shapeFlag&4}let lr=!1;function gh(i,t=!1){t&&Qr(t);const{props:e,children:s}=i.vnode,r=hl(i);Yu(i,e,r,t),eh(i,s);const n=r?xh(i,t):void 0;return t&&Qr(!1),n}function xh(i,t){const e=i.type;i.accessCache=Object.create(null),i.proxy=Ro(new Proxy(i.ctx,Hu));const{setup:s}=e;if(s){const r=i.setupContext=s.length>1?Ph(i):null,n=hi(i);xs();const a=Yt(s,i,0,[i.props,r]);if(bs(),n(),xo(a)){if(a.then(wa,wa),t)return a.then(o=>{Sa(i,o,t)}).catch(o=>{ir(o,i,0)});i.asyncDep=a}else Sa(i,a,t)}else pl(i,t)}function Sa(i,t,e){me(t)?i.type.__ssrInlineRender?i.ssrRender=t:i.render=t:Le(t)&&(i.setupState=Uo(t)),pl(i,e)}let Ea;function pl(i,t,e){const s=i.type;if(!i.render){if(!t&&Ea&&!s.render){const r=s.template||Cn(i).template;if(r){const{isCustomElement:n,compilerOptions:a}=i.appContext.config,{delimiters:o,compilerOptions:l}=s,u=He(He({isCustomElement:n,delimiters:o},a),l);s.render=Ea(r,u)}}i.render=s.render||ct}{const r=hi(i);xs();try{Vu(i)}finally{bs(),r()}}}function bh(i){return i.attrsProxy||(i.attrsProxy=new Proxy(i.attrs,{get(t,e){return rt(i,"get","$attrs"),t[e]}}))}function Ph(i){const t=e=>{i.exposed=e||{}};return{get attrs(){return bh(i)},slots:i.slots,emit:i.emit,expose:t}}function cr(i){if(i.exposed)return i.exposeProxy||(i.exposeProxy=new Proxy(Uo(Ro(i.exposed)),{get(t,e){if(e in t)return t[e];if(e in Js)return Js[e](i)},has(t,e){return e in t||e in Js}}))}function Th(i,t=!0){return me(i)?i.displayName||i.name:i.name||t&&i.__name}function Ah(i){return me(i)&&"__vccOpts"in i}const Lt=(i,t)=>nu(i,t,lr);function Ca(i,t,e){const s=arguments.length;return s===2?Le(t)&&!fe(t)?Yr(t)?Ue(i,null,[t]):Ue(i,t):Ue(i,null,t):(s>3?e=Array.prototype.slice.call(arguments,2):s===3&&Yr(e)&&(e=[e]),Ue(i,t,e))}const wh="3.4.15";/** * @vue/runtime-dom v3.4.15 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const Sh="http://www.w3.org/2000/svg",Eh="http://www.w3.org/1998/Math/MathML",Gt=typeof document!="undefined"?document:null,va=Gt&&Gt.createElement("template"),Ch={insert:(i,t,e)=>{t.insertBefore(i,e||null)},remove:i=>{const t=i.parentNode;t&&t.removeChild(i)},createElement:(i,t,e,s)=>{const r=t==="svg"?Gt.createElementNS(Sh,i):t==="mathml"?Gt.createElementNS(Eh,i):Gt.createElement(i,e?{is:e}:void 0);return i==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:i=>Gt.createTextNode(i),createComment:i=>Gt.createComment(i),setText:(i,t)=>{i.nodeValue=t},setElementText:(i,t)=>{i.textContent=t},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>Gt.querySelector(i),setScopeId(i,t){i.setAttribute(t,"")},insertStaticContent(i,t,e,s,r,n){const a=e?e.previousSibling:t.lastChild;if(r&&(r===n||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),e),!(r===n||!(r=r.nextSibling)););else{va.innerHTML=s==="svg"?`${i}`:s==="mathml"?`${i}`:i;const o=va.content;if(s==="svg"||s==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}t.insertBefore(o,e)}return[a?a.nextSibling:t.firstChild,e?e.previousSibling:t.lastChild]}},vh=Symbol("_vtc");function Ih(i,t,e){const s=i[vh];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?i.removeAttribute("class"):e?i.setAttribute("class",t):i.className=t}const Nh=Symbol("_vod"),kh=Symbol("");function Lh(i,t,e){const s=i.style,r=s.display,n=Be(e);if(e&&!n){if(t&&!Be(t))for(const a in t)e[a]==null&&en(s,a,"");for(const a in e)en(s,a,e[a])}else if(n){if(t!==e){const a=s[kh];a&&(e+=";"+a),s.cssText=e}}else t&&i.removeAttribute("style");Nh in i&&(s.display=r)}const Ia=/\s*!important$/;function en(i,t,e){if(fe(e))e.forEach(s=>en(i,t,s));else if(e==null&&(e=""),t.startsWith("--"))i.setProperty(t,e);else{const s=Mh(i,t);Ia.test(e)?i.setProperty(Os(s),e.replace(Ia,""),"important"):i[s]=e}}const Na=["Webkit","Moz","ms"],Ir={};function Mh(i,t){const e=Ir[t];if(e)return e;let s=At(t);if(s!=="filter"&&s in i)return Ir[t]=s;s=Qi(s);for(let r=0;rNr||(Bh.then(()=>Nr=0),Nr=Date.now());function jh(i,t){const e=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=e.attached)return;mt(Uh(s,e.value),t,5,[s])};return e.value=i,e.attached=Rh(),e}function Uh(i,t){if(fe(t)){const e=i.stopImmediatePropagation;return i.stopImmediatePropagation=()=>{e.call(i),i._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const _a=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)>96&&i.charCodeAt(2)<123,Hh=(i,t,e,s,r,n,a,o,l)=>{const u=r==="svg";t==="class"?Ih(i,s,u):t==="style"?Lh(i,e,s):Xi(t)?pn(t)||Fh(i,t,e,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Vh(i,t,s,u))?Oh(i,t,s,n,a,o,l):(t==="true-value"?i._trueValue=s:t==="false-value"&&(i._falseValue=s),_h(i,t,s,u))};function Vh(i,t,e,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in i&&_a(t)&&me(e));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&i.tagName==="INPUT"||t==="type"&&i.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=i.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return _a(t)&&Be(e)?!1:t in i}const zi=i=>{const t=i.props["onUpdate:modelValue"]||!1;return fe(t)?e=>Ci(t,e):t};function zh(i){i.target.composing=!0}function Oa(i){const t=i.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),Da={created(i,{modifiers:{lazy:t,trim:e,number:s}},r){i[Is]=zi(r);const n=s||r.props&&r.props.type==="number";ps(i,t?"change":"input",a=>{if(a.target.composing)return;let o=i.value;e&&(o=o.trim()),n&&(o=jr(o)),i[Is](o)}),e&&ps(i,"change",()=>{i.value=i.value.trim()}),t||(ps(i,"compositionstart",zh),ps(i,"compositionend",Oa),ps(i,"change",Oa))},mounted(i,{value:t}){i.value=t==null?"":t},beforeUpdate(i,{value:t,modifiers:{lazy:e,trim:s,number:r}},n){if(i[Is]=zi(n),i.composing)return;const a=r||i.type==="number"?jr(i.value):i.value,o=t==null?"":t;a!==o&&(document.activeElement===i&&i.type!=="range"&&(e||s&&i.value.trim()===o)||(i.value=o))}},kr={deep:!0,created(i,t,e){i[Is]=zi(e),ps(i,"change",()=>{const s=i._modelValue,r=Kh(i),n=i.checked,a=i[Is];if(fe(s)){const o=Ao(s,r),l=o!==-1;if(n&&!l)a(s.concat(r));else if(!n&&l){const u=[...s];u.splice(o,1),a(u)}}else if(Yi(s)){const o=new Set(s);n?o.add(r):o.delete(r),a(o)}else a(fl(i,n))})},mounted:Fa,beforeUpdate(i,t,e){i[Is]=zi(e),Fa(i,t,e)}};function Fa(i,{value:t,oldValue:e},s){i._modelValue=t,fe(t)?i.checked=Ao(t,s.props.value)>-1:Yi(t)?i.checked=t.has(s.props.value):t!==e&&(i.checked=er(t,fl(i,!0)))}function Kh(i){return"_value"in i?i._value:i.value}function fl(i,t){const e=t?"_trueValue":"_falseValue";return e in i?i[e]:t}const Wh=He({patchProp:Hh},Ch);let $a;function qh(){return $a||($a=ih(Wh))}const Gh=(...i)=>{const t=qh().createApp(...i),{mount:e}=t;return t.mount=s=>{const r=Xh(s);if(!r)return;const n=t._component;!me(n)&&!n.render&&!n.template&&(n.template=r.innerHTML),r.innerHTML="";const a=e(r,!1,Jh(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function Jh(i){if(i instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&i instanceof MathMLElement)return"mathml"}function Xh(i){return Be(i)?document.querySelector(i):i}var Nt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ur={};Object.defineProperty(ur,"__esModule",{value:!0});function dl(i,t){if(i==null)return{};var e={},s=Object.keys(i),r,n;for(n=0;n=0)&&(e[r]=i[r]);return e}class Zt{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}}class Ki{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}}function Ze(i,t){const{line:e,column:s,index:r}=i;return new Zt(e,s+t,r+t)}const Ba="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var Yh={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Ba},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Ba}};const Ra={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"},Mi=({type:i,prefix:t})=>i==="UpdateExpression"?Ra.UpdateExpression[String(t)]:Ra[i];var Zh={AccessorIsGenerator:({kind:i})=>`A ${i}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:i})=>`Missing initializer in ${i} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:i})=>`\`${i}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:i})=>`'import.${i}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:i,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`. +**/const Sh="http://www.w3.org/2000/svg",Eh="http://www.w3.org/1998/Math/MathML",Gt=typeof document!="undefined"?document:null,va=Gt&&Gt.createElement("template"),Ch={insert:(i,t,e)=>{t.insertBefore(i,e||null)},remove:i=>{const t=i.parentNode;t&&t.removeChild(i)},createElement:(i,t,e,s)=>{const r=t==="svg"?Gt.createElementNS(Sh,i):t==="mathml"?Gt.createElementNS(Eh,i):Gt.createElement(i,e?{is:e}:void 0);return i==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:i=>Gt.createTextNode(i),createComment:i=>Gt.createComment(i),setText:(i,t)=>{i.nodeValue=t},setElementText:(i,t)=>{i.textContent=t},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>Gt.querySelector(i),setScopeId(i,t){i.setAttribute(t,"")},insertStaticContent(i,t,e,s,r,n){const a=e?e.previousSibling:t.lastChild;if(r&&(r===n||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),e),!(r===n||!(r=r.nextSibling)););else{va.innerHTML=s==="svg"?`${i}`:s==="mathml"?`${i}`:i;const o=va.content;if(s==="svg"||s==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}t.insertBefore(o,e)}return[a?a.nextSibling:t.firstChild,e?e.previousSibling:t.lastChild]}},vh=Symbol("_vtc");function Ih(i,t,e){const s=i[vh];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?i.removeAttribute("class"):e?i.setAttribute("class",t):i.className=t}const Nh=Symbol("_vod"),kh=Symbol("");function Lh(i,t,e){const s=i.style,r=s.display,n=Re(e);if(e&&!n){if(t&&!Re(t))for(const a in t)e[a]==null&&en(s,a,"");for(const a in e)en(s,a,e[a])}else if(n){if(t!==e){const a=s[kh];a&&(e+=";"+a),s.cssText=e}}else t&&i.removeAttribute("style");Nh in i&&(s.display=r)}const Ia=/\s*!important$/;function en(i,t,e){if(fe(e))e.forEach(s=>en(i,t,s));else if(e==null&&(e=""),t.startsWith("--"))i.setProperty(t,e);else{const s=Mh(i,t);Ia.test(e)?i.setProperty(Os(s),e.replace(Ia,""),"important"):i[s]=e}}const Na=["Webkit","Moz","ms"],Ir={};function Mh(i,t){const e=Ir[t];if(e)return e;let s=At(t);if(s!=="filter"&&s in i)return Ir[t]=s;s=Qi(s);for(let r=0;rNr||(Rh.then(()=>Nr=0),Nr=Date.now());function jh(i,t){const e=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=e.attached)return;mt(Uh(s,e.value),t,5,[s])};return e.value=i,e.attached=Bh(),e}function Uh(i,t){if(fe(t)){const e=i.stopImmediatePropagation;return i.stopImmediatePropagation=()=>{e.call(i),i._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const _a=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)>96&&i.charCodeAt(2)<123,Hh=(i,t,e,s,r,n,a,o,l)=>{const u=r==="svg";t==="class"?Ih(i,s,u):t==="style"?Lh(i,e,s):Xi(t)?pn(t)||Fh(i,t,e,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Vh(i,t,s,u))?Oh(i,t,s,n,a,o,l):(t==="true-value"?i._trueValue=s:t==="false-value"&&(i._falseValue=s),_h(i,t,s,u))};function Vh(i,t,e,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in i&&_a(t)&&me(e));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&i.tagName==="INPUT"||t==="type"&&i.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=i.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return _a(t)&&Re(e)?!1:t in i}const zi=i=>{const t=i.props["onUpdate:modelValue"]||!1;return fe(t)?e=>Ci(t,e):t};function zh(i){i.target.composing=!0}function Oa(i){const t=i.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),Da={created(i,{modifiers:{lazy:t,trim:e,number:s}},r){i[Is]=zi(r);const n=s||r.props&&r.props.type==="number";ps(i,t?"change":"input",a=>{if(a.target.composing)return;let o=i.value;e&&(o=o.trim()),n&&(o=jr(o)),i[Is](o)}),e&&ps(i,"change",()=>{i.value=i.value.trim()}),t||(ps(i,"compositionstart",zh),ps(i,"compositionend",Oa),ps(i,"change",Oa))},mounted(i,{value:t}){i.value=t==null?"":t},beforeUpdate(i,{value:t,modifiers:{lazy:e,trim:s,number:r}},n){if(i[Is]=zi(n),i.composing)return;const a=r||i.type==="number"?jr(i.value):i.value,o=t==null?"":t;a!==o&&(document.activeElement===i&&i.type!=="range"&&(e||s&&i.value.trim()===o)||(i.value=o))}},kr={deep:!0,created(i,t,e){i[Is]=zi(e),ps(i,"change",()=>{const s=i._modelValue,r=Kh(i),n=i.checked,a=i[Is];if(fe(s)){const o=Ao(s,r),l=o!==-1;if(n&&!l)a(s.concat(r));else if(!n&&l){const u=[...s];u.splice(o,1),a(u)}}else if(Yi(s)){const o=new Set(s);n?o.add(r):o.delete(r),a(o)}else a(fl(i,n))})},mounted:Fa,beforeUpdate(i,t,e){i[Is]=zi(e),Fa(i,t,e)}};function Fa(i,{value:t,oldValue:e},s){i._modelValue=t,fe(t)?i.checked=Ao(t,s.props.value)>-1:Yi(t)?i.checked=t.has(s.props.value):t!==e&&(i.checked=er(t,fl(i,!0)))}function Kh(i){return"_value"in i?i._value:i.value}function fl(i,t){const e=t?"_trueValue":"_falseValue";return e in i?i[e]:t}const Wh=He({patchProp:Hh},Ch);let $a;function qh(){return $a||($a=ih(Wh))}const Gh=(...i)=>{const t=qh().createApp(...i),{mount:e}=t;return t.mount=s=>{const r=Xh(s);if(!r)return;const n=t._component;!me(n)&&!n.render&&!n.template&&(n.template=r.innerHTML),r.innerHTML="";const a=e(r,!1,Jh(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function Jh(i){if(i instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&i instanceof MathMLElement)return"mathml"}function Xh(i){return Re(i)?document.querySelector(i):i}var Nt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ur={};Object.defineProperty(ur,"__esModule",{value:!0});function dl(i,t){if(i==null)return{};var e={},s=Object.keys(i),r,n;for(n=0;n=0)&&(e[r]=i[r]);return e}class Zt{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}}class Ki{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}}function Ze(i,t){const{line:e,column:s,index:r}=i;return new Zt(e,s+t,r+t)}const Ra="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var Yh={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Ra},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Ra}};const Ba={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"},Mi=({type:i,prefix:t})=>i==="UpdateExpression"?Ba.UpdateExpression[String(t)]:Ba[i];var Zh={AccessorIsGenerator:({kind:i})=>`A ${i}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:i})=>`Missing initializer in ${i} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:i})=>`\`${i}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:i})=>`'import.${i}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:i,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`. - Did you mean \`export { '${i}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:i})=>`'${i==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:i})=>`Unsyntactic ${i==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:i})=>`A string literal cannot be used as an imported binding. -- Did you mean \`import { "${i}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:i})=>`\`import()\` requires exactly ${i===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:i})=>`Expected number in radix ${i}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:i})=>`Escape sequence in keyword ${i}.`,InvalidIdentifier:({identifierName:i})=>`Invalid identifier ${i}.`,InvalidLhs:({ancestor:i})=>`Invalid left-hand side in ${Mi(i)}.`,InvalidLhsBinding:({ancestor:i})=>`Binding invalid left-hand side in ${Mi(i)}.`,InvalidLhsOptionalChaining:({ancestor:i})=>`Invalid optional chaining in the left-hand side of ${Mi(i)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:i})=>`Unexpected character '${i}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:i})=>`Private name #${i} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:i})=>`Label '${i}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:i})=>`This experimental syntax requires enabling the parser plugin: ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:i})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:i})=>`Duplicate key "${i}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:i})=>`An export name cannot include a lone surrogate, found '\\u${i.toString(16)}'.`,ModuleExportUndefined:({localName:i})=>`Export '${i}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:i})=>`Private names are only allowed in property accesses (\`obj.#${i}\`) or in \`in\` expressions (\`#${i} in obj\`).`,PrivateNameRedeclaration:({identifierName:i})=>`Duplicate private name #${i}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:i})=>`Unexpected keyword '${i}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:i})=>`Unexpected reserved word '${i}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:i,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${i?`, expected "${i}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:i,onlyValidPropertyName:t})=>`The only valid meta property for ${i} is ${i}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:i})=>`Identifier '${i}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Qh={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:i})=>`Assigning to '${i}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:i})=>`Binding '${i}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."};const ep=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var tp={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:i})=>`Invalid topic token ${i}. In order to use ${i} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${i}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:i})=>`Hack-style pipe body cannot be an unparenthesized ${Mi({type:i})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'};const sp=["toMessage"],ip=["message"];function ja(i,t,e){Object.defineProperty(i,t,{enumerable:!1,configurable:!0,value:e})}function rp(i){let{toMessage:t}=i,e=dl(i,sp);return function s(r,n){const a=new SyntaxError;return Object.assign(a,e,{loc:r,pos:r.index}),"missingPlugin"in n&&Object.assign(a,{missingPlugin:n.missingPlugin}),ja(a,"clone",function(l={}){var u;const{line:c,column:d,index:m}=(u=l.loc)!=null?u:r;return s(new Zt(c,d,m),Object.assign({},n,l.details))}),ja(a,"details",n),Object.defineProperty(a,"message",{configurable:!0,get(){const o=`${t(n)} (${r.line}:${r.column})`;return this.message=o,o},set(o){Object.defineProperty(this,"message",{value:o,writable:!0})}}),a}}function Mt(i,t){if(Array.isArray(i))return s=>Mt(s,i[0]);const e={};for(const s of Object.keys(i)){const r=i[s],n=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:a}=n,o=dl(n,ip),l=typeof a=="string"?()=>a:a;e[s]=rp(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:l},t?{syntaxPlugin:t}:{},o))}return e}const b=Object.assign({},Mt(Yh),Mt(Zh),Mt(Qh),Mt`pipelineOperator`(tp)),{defineProperty:np}=Object,Ua=(i,t)=>np(i,t,{enumerable:!1,value:i[t]});function Rs(i){return i.loc.start&&Ua(i.loc.start,"index"),i.loc.end&&Ua(i.loc.end,"index"),i}var ap=i=>class extends i{parse(){const e=Rs(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(Rs)),e}parseRegExpLiteral({pattern:e,flags:s}){let r=null;try{r=new RegExp(e,s)}catch{}const n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:s},n}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}const r=this.estreeParseLiteral(s);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){const r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){const s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;const r=e;return r.type="ExpressionStatement",r.expression=s,r.directive=s.extra.rawValue,delete s.extra,r}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,r,n,a){super.parseBlockBody(e,s,r,n,a);const o=e.directives.map(l=>this.directiveToStmt(l));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,r,n,a,o){this.parseMethod(s,r,n,a,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){const e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){const s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){const r=super.parseLiteral(e,s);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,s,r=!1){super.parseFunctionBody(e,s,r),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,r,n,a,o,l=!1){let u=this.startNode();return u.kind=e.kind,u=super.parseMethod(u,s,r,n,a,o,l),u.type="FunctionExpression",delete u.kind,e.value=u,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){const s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){const s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,r,n,a){const o=super.parseObjectMethod(e,s,r,n,a);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,r,n){const a=super.parseObjectProperty(e,s,r,n);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,s,r){return e==="Property"?"value":super.isValidLVal(e,s,r)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){const{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,r){e.kind==="get"||e.kind==="set"?this.raise(b.PatternHasAccessor,e.key):e.method?this.raise(b.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,r)}finishCallExpression(e,s){const r=super.finishCallExpression(e,s);if(r.callee.type==="Import"){if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var n,a;r.options=(n=r.arguments[1])!=null?n:null,r.attributes=(a=r.arguments[1])!=null?a:null}delete r.arguments,delete r.callee}return r}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){const r=this.state.lastTokStartLoc,n=super.parseExport(e,s);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":n.specifiers.length===1&&n.specifiers[0].type==="ExportNamespaceSpecifier"&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var a;const{declaration:o}=n;(o==null?void 0:o.type)==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===n.start&&this.resetStartLocation(n,r)}break}return n}parseSubscript(e,s,r,n){const a=super.parseSubscript(e,s,r,n);if(n.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),n.stop){const o=this.startNodeAtNode(a);return o.expression=a,this.finishNode(o,"ChainExpression")}}else(a.type==="MemberExpression"||a.type==="CallExpression")&&(a.optional=!1);return a}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.method||e.kind==="get"||e.kind==="set"}finishNodeAt(e,s,r){return Rs(super.finishNodeAt(e,s,r))}resetStartLocation(e,s){super.resetStartLocation(e,s),Rs(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),Rs(e)}};class Ks{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}}const ve={brace:new Ks("{"),j_oTag:new Ks("...",!0)};ve.template=new Ks("`",!0);const xe=!0,Q=!0,Lr=!0,js=!0,Ut=!0,op=!0;class ml{constructor(t,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}}const Nn=new Map;function Ae(i,t={}){t.keyword=i;const e=oe(i,t);return Nn.set(i,e),e}function Xe(i,t){return oe(i,{beforeExpr:xe,binop:t})}let Ys=-1;const It=[],kn=[],Ln=[],Mn=[],_n=[],On=[];function oe(i,t={}){var e,s,r,n;return++Ys,kn.push(i),Ln.push((e=t.binop)!=null?e:-1),Mn.push((s=t.beforeExpr)!=null?s:!1),_n.push((r=t.startsExpr)!=null?r:!1),On.push((n=t.prefix)!=null?n:!1),It.push(new ml(i,t)),Ys}function ge(i,t={}){var e,s,r,n;return++Ys,Nn.set(i,Ys),kn.push(i),Ln.push((e=t.binop)!=null?e:-1),Mn.push((s=t.beforeExpr)!=null?s:!1),_n.push((r=t.startsExpr)!=null?r:!1),On.push((n=t.prefix)!=null?n:!1),It.push(new ml("name",t)),Ys}const lp={bracketL:oe("[",{beforeExpr:xe,startsExpr:Q}),bracketHashL:oe("#[",{beforeExpr:xe,startsExpr:Q}),bracketBarL:oe("[|",{beforeExpr:xe,startsExpr:Q}),bracketR:oe("]"),bracketBarR:oe("|]"),braceL:oe("{",{beforeExpr:xe,startsExpr:Q}),braceBarL:oe("{|",{beforeExpr:xe,startsExpr:Q}),braceHashL:oe("#{",{beforeExpr:xe,startsExpr:Q}),braceR:oe("}"),braceBarR:oe("|}"),parenL:oe("(",{beforeExpr:xe,startsExpr:Q}),parenR:oe(")"),comma:oe(",",{beforeExpr:xe}),semi:oe(";",{beforeExpr:xe}),colon:oe(":",{beforeExpr:xe}),doubleColon:oe("::",{beforeExpr:xe}),dot:oe("."),question:oe("?",{beforeExpr:xe}),questionDot:oe("?."),arrow:oe("=>",{beforeExpr:xe}),template:oe("template"),ellipsis:oe("...",{beforeExpr:xe}),backQuote:oe("`",{startsExpr:Q}),dollarBraceL:oe("${",{beforeExpr:xe,startsExpr:Q}),templateTail:oe("...`",{startsExpr:Q}),templateNonTail:oe("...${",{beforeExpr:xe,startsExpr:Q}),at:oe("@"),hash:oe("#",{startsExpr:Q}),interpreterDirective:oe("#!..."),eq:oe("=",{beforeExpr:xe,isAssign:js}),assign:oe("_=",{beforeExpr:xe,isAssign:js}),slashAssign:oe("_=",{beforeExpr:xe,isAssign:js}),xorAssign:oe("_=",{beforeExpr:xe,isAssign:js}),moduloAssign:oe("_=",{beforeExpr:xe,isAssign:js}),incDec:oe("++/--",{prefix:Ut,postfix:op,startsExpr:Q}),bang:oe("!",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),tilde:oe("~",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),doubleCaret:oe("^^",{startsExpr:Q}),doubleAt:oe("@@",{startsExpr:Q}),pipeline:Xe("|>",0),nullishCoalescing:Xe("??",1),logicalOR:Xe("||",1),logicalAND:Xe("&&",2),bitwiseOR:Xe("|",3),bitwiseXOR:Xe("^",4),bitwiseAND:Xe("&",5),equality:Xe("==/!=/===/!==",6),lt:Xe("/<=/>=",7),gt:Xe("/<=/>=",7),relational:Xe("/<=/>=",7),bitShift:Xe("<>/>>>",8),bitShiftL:Xe("<>/>>>",8),bitShiftR:Xe("<>/>>>",8),plusMin:oe("+/-",{beforeExpr:xe,binop:9,prefix:Ut,startsExpr:Q}),modulo:oe("%",{binop:10,startsExpr:Q}),star:oe("*",{binop:10}),slash:Xe("/",10),exponent:oe("**",{beforeExpr:xe,binop:11,rightAssociative:!0}),_in:Ae("in",{beforeExpr:xe,binop:7}),_instanceof:Ae("instanceof",{beforeExpr:xe,binop:7}),_break:Ae("break"),_case:Ae("case",{beforeExpr:xe}),_catch:Ae("catch"),_continue:Ae("continue"),_debugger:Ae("debugger"),_default:Ae("default",{beforeExpr:xe}),_else:Ae("else",{beforeExpr:xe}),_finally:Ae("finally"),_function:Ae("function",{startsExpr:Q}),_if:Ae("if"),_return:Ae("return",{beforeExpr:xe}),_switch:Ae("switch"),_throw:Ae("throw",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),_try:Ae("try"),_var:Ae("var"),_const:Ae("const"),_with:Ae("with"),_new:Ae("new",{beforeExpr:xe,startsExpr:Q}),_this:Ae("this",{startsExpr:Q}),_super:Ae("super",{startsExpr:Q}),_class:Ae("class",{startsExpr:Q}),_extends:Ae("extends",{beforeExpr:xe}),_export:Ae("export"),_import:Ae("import",{startsExpr:Q}),_null:Ae("null",{startsExpr:Q}),_true:Ae("true",{startsExpr:Q}),_false:Ae("false",{startsExpr:Q}),_typeof:Ae("typeof",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),_void:Ae("void",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),_delete:Ae("delete",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),_do:Ae("do",{isLoop:Lr,beforeExpr:xe}),_for:Ae("for",{isLoop:Lr}),_while:Ae("while",{isLoop:Lr}),_as:ge("as",{startsExpr:Q}),_assert:ge("assert",{startsExpr:Q}),_async:ge("async",{startsExpr:Q}),_await:ge("await",{startsExpr:Q}),_defer:ge("defer",{startsExpr:Q}),_from:ge("from",{startsExpr:Q}),_get:ge("get",{startsExpr:Q}),_let:ge("let",{startsExpr:Q}),_meta:ge("meta",{startsExpr:Q}),_of:ge("of",{startsExpr:Q}),_sent:ge("sent",{startsExpr:Q}),_set:ge("set",{startsExpr:Q}),_source:ge("source",{startsExpr:Q}),_static:ge("static",{startsExpr:Q}),_using:ge("using",{startsExpr:Q}),_yield:ge("yield",{startsExpr:Q}),_asserts:ge("asserts",{startsExpr:Q}),_checks:ge("checks",{startsExpr:Q}),_exports:ge("exports",{startsExpr:Q}),_global:ge("global",{startsExpr:Q}),_implements:ge("implements",{startsExpr:Q}),_intrinsic:ge("intrinsic",{startsExpr:Q}),_infer:ge("infer",{startsExpr:Q}),_is:ge("is",{startsExpr:Q}),_mixins:ge("mixins",{startsExpr:Q}),_proto:ge("proto",{startsExpr:Q}),_require:ge("require",{startsExpr:Q}),_satisfies:ge("satisfies",{startsExpr:Q}),_keyof:ge("keyof",{startsExpr:Q}),_readonly:ge("readonly",{startsExpr:Q}),_unique:ge("unique",{startsExpr:Q}),_abstract:ge("abstract",{startsExpr:Q}),_declare:ge("declare",{startsExpr:Q}),_enum:ge("enum",{startsExpr:Q}),_module:ge("module",{startsExpr:Q}),_namespace:ge("namespace",{startsExpr:Q}),_interface:ge("interface",{startsExpr:Q}),_type:ge("type",{startsExpr:Q}),_opaque:ge("opaque",{startsExpr:Q}),name:oe("name",{startsExpr:Q}),string:oe("string",{startsExpr:Q}),num:oe("num",{startsExpr:Q}),bigint:oe("bigint",{startsExpr:Q}),decimal:oe("decimal",{startsExpr:Q}),regexp:oe("regexp",{startsExpr:Q}),privateName:oe("#name",{startsExpr:Q}),eof:oe("eof"),jsxName:oe("jsxName"),jsxText:oe("jsxText",{beforeExpr:!0}),jsxTagStart:oe("jsxTagStart",{startsExpr:!0}),jsxTagEnd:oe("jsxTagEnd"),placeholder:oe("%%",{startsExpr:!0})};function Ee(i){return i>=93&&i<=132}function cp(i){return i<=92}function dt(i){return i>=58&&i<=132}function yl(i){return i>=58&&i<=136}function up(i){return Mn[i]}function tn(i){return _n[i]}function hp(i){return i>=29&&i<=33}function Ha(i){return i>=129&&i<=131}function pp(i){return i>=90&&i<=92}function Dn(i){return i>=58&&i<=92}function fp(i){return i>=39&&i<=59}function dp(i){return i===34}function mp(i){return On[i]}function yp(i){return i>=121&&i<=123}function gp(i){return i>=124&&i<=130}function Qt(i){return kn[i]}function _i(i){return Ln[i]}function xp(i){return i===57}function Wi(i){return i>=24&&i<=25}function vt(i){return It[i]}It[8].updateContext=i=>{i.pop()},It[5].updateContext=It[7].updateContext=It[23].updateContext=i=>{i.push(ve.brace)},It[22].updateContext=i=>{i[i.length-1]===ve.template?i.pop():i.push(ve.template)},It[142].updateContext=i=>{i.push(ve.j_expr,ve.j_oTag)};let Fn="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",gl="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";const bp=new RegExp("["+Fn+"]"),Pp=new RegExp("["+Fn+gl+"]");Fn=gl=null;const xl=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Tp=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function sn(i,t){let e=65536;for(let s=0,r=t.length;si)return!1;if(e+=t[s+1],e>=i)return!0}return!1}function kt(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&bp.test(String.fromCharCode(i)):sn(i,xl)}function Ns(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Pp.test(String.fromCharCode(i)):sn(i,xl)||sn(i,Tp)}const $n={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"]},Ap=new Set($n.keyword),wp=new Set($n.strict),Sp=new Set($n.strictBind);function bl(i,t){return t&&i==="await"||i==="enum"}function Pl(i,t){return bl(i,t)||wp.has(i)}function Tl(i){return Sp.has(i)}function Al(i,t){return Pl(i,t)||Tl(i)}function Ep(i){return Ap.has(i)}function Cp(i,t,e){return i===64&&t===64&&kt(e)}const vp=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 Ip(i){return vp.has(i)}class Bn{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}}class Rn{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){const t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new Bn(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let r=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(r,t,e,s);let n=r.names.get(t)||0;e&16?n=n|4:(r.firstLexicalName||(r.firstLexicalName=t),n=n|2),r.names.set(t,n),e&8&&this.maybeExportDefined(r,t)}else if(e&4)for(let n=this.scopeStack.length-1;n>=0&&(r=this.scopeStack[n],this.checkRedeclarationInScope(r,t,e,s),r.names.set(t,(r.names.get(t)||0)|1),this.maybeExportDefined(r,t),!(r.flags&387));--n);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,r){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(b.VarRedeclaration,r,{identifierName:e})}isRedeclaredInScope(t,e,s){if(!(s&1))return!1;if(s&8)return t.names.has(e);const r=t.names.get(e);return s&16?(r&2)>0||!this.treatFunctionsAsVarInScope(t)&&(r&1)>0:(r&2)>0&&!(t.flags&8&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(r&4)>0}checkLocalExport(t){const{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}}class Np extends Bn{constructor(...t){super(...t),this.declareFunctions=new Set}}class kp extends Rn{createScope(t){return new Np(t)}declareName(t,e,s){const r=this.currentScope();if(e&2048){this.checkRedeclarationInScope(r,t,e,s),this.maybeExportDefined(r,t),r.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){if(super.isRedeclaredInScope(t,e,s))return!0;if(s&2048&&!t.declareFunctions.has(e)){const r=t.names.get(e);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}}class Lp{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{const[e,s]=t;if(!this.hasPlugin(e))return!1;const r=this.plugins.get(e);for(const n of Object.keys(s))if((r==null?void 0:r[n])!==s[n])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}}function wl(i,t){i.trailingComments===void 0?i.trailingComments=t:i.trailingComments.unshift(...t)}function Mp(i,t){i.leadingComments===void 0?i.leadingComments=t:i.leadingComments.unshift(...t)}function ai(i,t){i.innerComments===void 0?i.innerComments=t:i.innerComments.unshift(...t)}function Us(i,t,e){let s=null,r=t.length;for(;s===null&&r>0;)s=t[--r];s===null||s.start>e.start?ai(i,e.comments):wl(s,e.comments)}class _p extends Lp{addComment(t){this.filename&&(t.loc.filename=this.filename);const{commentsLen:e}=this.state;this.comments.length!=e&&(this.comments.length=e),this.comments.push(t),this.state.commentsLen++}processComment(t){const{commentStack:e}=this.state,s=e.length;if(s===0)return;let r=s-1;const n=e[r];n.start===t.end&&(n.leadingNode=t,r--);const{start:a}=t;for(;r>=0;r--){const o=e[r],l=o.end;if(l>a)o.containingNode=t,this.finalizeComment(o),e.splice(r,1);else{l===a&&(o.trailingNode=t);break}}}finalizeComment(t){const{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&wl(t.leadingNode,e),t.trailingNode!==null&&Mp(t.trailingNode,e);else{const{containingNode:s,start:r}=t;if(this.input.charCodeAt(r-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Us(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":Us(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Us(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Us(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Us(s,s.specifiers,t);break;default:ai(s,e)}else ai(s,e)}}finalizeRemainingComments(){const{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){const{commentStack:e}=this.state,{length:s}=e;if(s===0)return;const r=e[s-1];r.leadingNode===t&&(r.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){const{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){const{commentStack:r}=this.state,n=r.length;if(n===0)return;let a=n-1;for(;a>=0;a--){const o=r[a],l=o.end;if(o.start===s)o.leadingNode=t;else if(l===e)o.trailingNode=t;else if(l0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:e,startLine:s,startColumn:r}){this.strict=t===!1?!1:t===!0?!0:e==="module",this.curLine=s,this.lineStart=-r,this.startLoc=this.endLoc=new Zt(s,r,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}curPosition(){return new Zt(this.curLine,this.pos-this.lineStart,this.pos)}clone(){const t=new jn;return t.flags=this.flags,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}}var Dp=function(t){return t>=48&&t<=57};const za={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Ai={bin:i=>i===48||i===49,oct:i=>i>=48&&i<=55,dec:i=>i>=48&&i<=57,hex:i=>i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102};function Ka(i,t,e,s,r,n){const a=e,o=s,l=r;let u="",c=null,d=e;const{length:m}=t;for(;;){if(e>=m){n.unterminated(a,o,l),u+=t.slice(d,e);break}const w=t.charCodeAt(e);if(Fp(i,w,t,e)){u+=t.slice(d,e);break}if(w===92){u+=t.slice(d,e);const y=$p(t,e,s,r,i==="template",n);y.ch===null&&!c?c={pos:e,lineStart:s,curLine:r}:u+=y.ch,{pos:e,lineStart:s,curLine:r}=y,d=e}else w===8232||w===8233?(++e,++r,s=e):w===10||w===13?i==="template"?(u+=t.slice(d,e)+` +- Did you mean \`import { "${i}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:i})=>`\`import()\` requires exactly ${i===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:i})=>`Expected number in radix ${i}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:i})=>`Escape sequence in keyword ${i}.`,InvalidIdentifier:({identifierName:i})=>`Invalid identifier ${i}.`,InvalidLhs:({ancestor:i})=>`Invalid left-hand side in ${Mi(i)}.`,InvalidLhsBinding:({ancestor:i})=>`Binding invalid left-hand side in ${Mi(i)}.`,InvalidLhsOptionalChaining:({ancestor:i})=>`Invalid optional chaining in the left-hand side of ${Mi(i)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:i})=>`Unexpected character '${i}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:i})=>`Private name #${i} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:i})=>`Label '${i}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:i})=>`This experimental syntax requires enabling the parser plugin: ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:i})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:i})=>`Duplicate key "${i}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:i})=>`An export name cannot include a lone surrogate, found '\\u${i.toString(16)}'.`,ModuleExportUndefined:({localName:i})=>`Export '${i}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:i})=>`Private names are only allowed in property accesses (\`obj.#${i}\`) or in \`in\` expressions (\`#${i} in obj\`).`,PrivateNameRedeclaration:({identifierName:i})=>`Duplicate private name #${i}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:i})=>`Unexpected keyword '${i}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:i})=>`Unexpected reserved word '${i}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:i,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${i?`, expected "${i}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:i,onlyValidPropertyName:t})=>`The only valid meta property for ${i} is ${i}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:i})=>`Identifier '${i}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Qh={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:i})=>`Assigning to '${i}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:i})=>`Binding '${i}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."};const ep=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var tp={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:i})=>`Invalid topic token ${i}. In order to use ${i} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${i}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:i})=>`Hack-style pipe body cannot be an unparenthesized ${Mi({type:i})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'};const sp=["toMessage"],ip=["message"];function ja(i,t,e){Object.defineProperty(i,t,{enumerable:!1,configurable:!0,value:e})}function rp(i){let{toMessage:t}=i,e=dl(i,sp);return function s(r,n){const a=new SyntaxError;return Object.assign(a,e,{loc:r,pos:r.index}),"missingPlugin"in n&&Object.assign(a,{missingPlugin:n.missingPlugin}),ja(a,"clone",function(l={}){var u;const{line:c,column:d,index:m}=(u=l.loc)!=null?u:r;return s(new Zt(c,d,m),Object.assign({},n,l.details))}),ja(a,"details",n),Object.defineProperty(a,"message",{configurable:!0,get(){const o=`${t(n)} (${r.line}:${r.column})`;return this.message=o,o},set(o){Object.defineProperty(this,"message",{value:o,writable:!0})}}),a}}function Mt(i,t){if(Array.isArray(i))return s=>Mt(s,i[0]);const e={};for(const s of Object.keys(i)){const r=i[s],n=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:a}=n,o=dl(n,ip),l=typeof a=="string"?()=>a:a;e[s]=rp(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:l},t?{syntaxPlugin:t}:{},o))}return e}const b=Object.assign({},Mt(Yh),Mt(Zh),Mt(Qh),Mt`pipelineOperator`(tp)),{defineProperty:np}=Object,Ua=(i,t)=>np(i,t,{enumerable:!1,value:i[t]});function Bs(i){return i.loc.start&&Ua(i.loc.start,"index"),i.loc.end&&Ua(i.loc.end,"index"),i}var ap=i=>class extends i{parse(){const e=Bs(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(Bs)),e}parseRegExpLiteral({pattern:e,flags:s}){let r=null;try{r=new RegExp(e,s)}catch{}const n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:s},n}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}const r=this.estreeParseLiteral(s);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){const r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){const s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;const r=e;return r.type="ExpressionStatement",r.expression=s,r.directive=s.extra.rawValue,delete s.extra,r}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,r,n,a){super.parseBlockBody(e,s,r,n,a);const o=e.directives.map(l=>this.directiveToStmt(l));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,r,n,a,o){this.parseMethod(s,r,n,a,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){const e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){const s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){const r=super.parseLiteral(e,s);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,s,r=!1){super.parseFunctionBody(e,s,r),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,r,n,a,o,l=!1){let u=this.startNode();return u.kind=e.kind,u=super.parseMethod(u,s,r,n,a,o,l),u.type="FunctionExpression",delete u.kind,e.value=u,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){const s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){const s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,r,n,a){const o=super.parseObjectMethod(e,s,r,n,a);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,r,n){const a=super.parseObjectProperty(e,s,r,n);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,s,r){return e==="Property"?"value":super.isValidLVal(e,s,r)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){const{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,r){e.kind==="get"||e.kind==="set"?this.raise(b.PatternHasAccessor,e.key):e.method?this.raise(b.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,r)}finishCallExpression(e,s){const r=super.finishCallExpression(e,s);if(r.callee.type==="Import"){if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var n,a;r.options=(n=r.arguments[1])!=null?n:null,r.attributes=(a=r.arguments[1])!=null?a:null}delete r.arguments,delete r.callee}return r}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){const r=this.state.lastTokStartLoc,n=super.parseExport(e,s);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":n.specifiers.length===1&&n.specifiers[0].type==="ExportNamespaceSpecifier"&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var a;const{declaration:o}=n;(o==null?void 0:o.type)==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===n.start&&this.resetStartLocation(n,r)}break}return n}parseSubscript(e,s,r,n){const a=super.parseSubscript(e,s,r,n);if(n.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),n.stop){const o=this.startNodeAtNode(a);return o.expression=a,this.finishNode(o,"ChainExpression")}}else(a.type==="MemberExpression"||a.type==="CallExpression")&&(a.optional=!1);return a}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.method||e.kind==="get"||e.kind==="set"}finishNodeAt(e,s,r){return Bs(super.finishNodeAt(e,s,r))}resetStartLocation(e,s){super.resetStartLocation(e,s),Bs(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),Bs(e)}};class Ks{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}}const ve={brace:new Ks("{"),j_oTag:new Ks("...",!0)};ve.template=new Ks("`",!0);const xe=!0,Q=!0,Lr=!0,js=!0,Ut=!0,op=!0;class ml{constructor(t,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}}const Nn=new Map;function Ae(i,t={}){t.keyword=i;const e=oe(i,t);return Nn.set(i,e),e}function Xe(i,t){return oe(i,{beforeExpr:xe,binop:t})}let Ys=-1;const It=[],kn=[],Ln=[],Mn=[],_n=[],On=[];function oe(i,t={}){var e,s,r,n;return++Ys,kn.push(i),Ln.push((e=t.binop)!=null?e:-1),Mn.push((s=t.beforeExpr)!=null?s:!1),_n.push((r=t.startsExpr)!=null?r:!1),On.push((n=t.prefix)!=null?n:!1),It.push(new ml(i,t)),Ys}function ge(i,t={}){var e,s,r,n;return++Ys,Nn.set(i,Ys),kn.push(i),Ln.push((e=t.binop)!=null?e:-1),Mn.push((s=t.beforeExpr)!=null?s:!1),_n.push((r=t.startsExpr)!=null?r:!1),On.push((n=t.prefix)!=null?n:!1),It.push(new ml("name",t)),Ys}const lp={bracketL:oe("[",{beforeExpr:xe,startsExpr:Q}),bracketHashL:oe("#[",{beforeExpr:xe,startsExpr:Q}),bracketBarL:oe("[|",{beforeExpr:xe,startsExpr:Q}),bracketR:oe("]"),bracketBarR:oe("|]"),braceL:oe("{",{beforeExpr:xe,startsExpr:Q}),braceBarL:oe("{|",{beforeExpr:xe,startsExpr:Q}),braceHashL:oe("#{",{beforeExpr:xe,startsExpr:Q}),braceR:oe("}"),braceBarR:oe("|}"),parenL:oe("(",{beforeExpr:xe,startsExpr:Q}),parenR:oe(")"),comma:oe(",",{beforeExpr:xe}),semi:oe(";",{beforeExpr:xe}),colon:oe(":",{beforeExpr:xe}),doubleColon:oe("::",{beforeExpr:xe}),dot:oe("."),question:oe("?",{beforeExpr:xe}),questionDot:oe("?."),arrow:oe("=>",{beforeExpr:xe}),template:oe("template"),ellipsis:oe("...",{beforeExpr:xe}),backQuote:oe("`",{startsExpr:Q}),dollarBraceL:oe("${",{beforeExpr:xe,startsExpr:Q}),templateTail:oe("...`",{startsExpr:Q}),templateNonTail:oe("...${",{beforeExpr:xe,startsExpr:Q}),at:oe("@"),hash:oe("#",{startsExpr:Q}),interpreterDirective:oe("#!..."),eq:oe("=",{beforeExpr:xe,isAssign:js}),assign:oe("_=",{beforeExpr:xe,isAssign:js}),slashAssign:oe("_=",{beforeExpr:xe,isAssign:js}),xorAssign:oe("_=",{beforeExpr:xe,isAssign:js}),moduloAssign:oe("_=",{beforeExpr:xe,isAssign:js}),incDec:oe("++/--",{prefix:Ut,postfix:op,startsExpr:Q}),bang:oe("!",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),tilde:oe("~",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),doubleCaret:oe("^^",{startsExpr:Q}),doubleAt:oe("@@",{startsExpr:Q}),pipeline:Xe("|>",0),nullishCoalescing:Xe("??",1),logicalOR:Xe("||",1),logicalAND:Xe("&&",2),bitwiseOR:Xe("|",3),bitwiseXOR:Xe("^",4),bitwiseAND:Xe("&",5),equality:Xe("==/!=/===/!==",6),lt:Xe("/<=/>=",7),gt:Xe("/<=/>=",7),relational:Xe("/<=/>=",7),bitShift:Xe("<>/>>>",8),bitShiftL:Xe("<>/>>>",8),bitShiftR:Xe("<>/>>>",8),plusMin:oe("+/-",{beforeExpr:xe,binop:9,prefix:Ut,startsExpr:Q}),modulo:oe("%",{binop:10,startsExpr:Q}),star:oe("*",{binop:10}),slash:Xe("/",10),exponent:oe("**",{beforeExpr:xe,binop:11,rightAssociative:!0}),_in:Ae("in",{beforeExpr:xe,binop:7}),_instanceof:Ae("instanceof",{beforeExpr:xe,binop:7}),_break:Ae("break"),_case:Ae("case",{beforeExpr:xe}),_catch:Ae("catch"),_continue:Ae("continue"),_debugger:Ae("debugger"),_default:Ae("default",{beforeExpr:xe}),_else:Ae("else",{beforeExpr:xe}),_finally:Ae("finally"),_function:Ae("function",{startsExpr:Q}),_if:Ae("if"),_return:Ae("return",{beforeExpr:xe}),_switch:Ae("switch"),_throw:Ae("throw",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),_try:Ae("try"),_var:Ae("var"),_const:Ae("const"),_with:Ae("with"),_new:Ae("new",{beforeExpr:xe,startsExpr:Q}),_this:Ae("this",{startsExpr:Q}),_super:Ae("super",{startsExpr:Q}),_class:Ae("class",{startsExpr:Q}),_extends:Ae("extends",{beforeExpr:xe}),_export:Ae("export"),_import:Ae("import",{startsExpr:Q}),_null:Ae("null",{startsExpr:Q}),_true:Ae("true",{startsExpr:Q}),_false:Ae("false",{startsExpr:Q}),_typeof:Ae("typeof",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),_void:Ae("void",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),_delete:Ae("delete",{beforeExpr:xe,prefix:Ut,startsExpr:Q}),_do:Ae("do",{isLoop:Lr,beforeExpr:xe}),_for:Ae("for",{isLoop:Lr}),_while:Ae("while",{isLoop:Lr}),_as:ge("as",{startsExpr:Q}),_assert:ge("assert",{startsExpr:Q}),_async:ge("async",{startsExpr:Q}),_await:ge("await",{startsExpr:Q}),_defer:ge("defer",{startsExpr:Q}),_from:ge("from",{startsExpr:Q}),_get:ge("get",{startsExpr:Q}),_let:ge("let",{startsExpr:Q}),_meta:ge("meta",{startsExpr:Q}),_of:ge("of",{startsExpr:Q}),_sent:ge("sent",{startsExpr:Q}),_set:ge("set",{startsExpr:Q}),_source:ge("source",{startsExpr:Q}),_static:ge("static",{startsExpr:Q}),_using:ge("using",{startsExpr:Q}),_yield:ge("yield",{startsExpr:Q}),_asserts:ge("asserts",{startsExpr:Q}),_checks:ge("checks",{startsExpr:Q}),_exports:ge("exports",{startsExpr:Q}),_global:ge("global",{startsExpr:Q}),_implements:ge("implements",{startsExpr:Q}),_intrinsic:ge("intrinsic",{startsExpr:Q}),_infer:ge("infer",{startsExpr:Q}),_is:ge("is",{startsExpr:Q}),_mixins:ge("mixins",{startsExpr:Q}),_proto:ge("proto",{startsExpr:Q}),_require:ge("require",{startsExpr:Q}),_satisfies:ge("satisfies",{startsExpr:Q}),_keyof:ge("keyof",{startsExpr:Q}),_readonly:ge("readonly",{startsExpr:Q}),_unique:ge("unique",{startsExpr:Q}),_abstract:ge("abstract",{startsExpr:Q}),_declare:ge("declare",{startsExpr:Q}),_enum:ge("enum",{startsExpr:Q}),_module:ge("module",{startsExpr:Q}),_namespace:ge("namespace",{startsExpr:Q}),_interface:ge("interface",{startsExpr:Q}),_type:ge("type",{startsExpr:Q}),_opaque:ge("opaque",{startsExpr:Q}),name:oe("name",{startsExpr:Q}),string:oe("string",{startsExpr:Q}),num:oe("num",{startsExpr:Q}),bigint:oe("bigint",{startsExpr:Q}),decimal:oe("decimal",{startsExpr:Q}),regexp:oe("regexp",{startsExpr:Q}),privateName:oe("#name",{startsExpr:Q}),eof:oe("eof"),jsxName:oe("jsxName"),jsxText:oe("jsxText",{beforeExpr:!0}),jsxTagStart:oe("jsxTagStart",{startsExpr:!0}),jsxTagEnd:oe("jsxTagEnd"),placeholder:oe("%%",{startsExpr:!0})};function Ee(i){return i>=93&&i<=132}function cp(i){return i<=92}function dt(i){return i>=58&&i<=132}function yl(i){return i>=58&&i<=136}function up(i){return Mn[i]}function tn(i){return _n[i]}function hp(i){return i>=29&&i<=33}function Ha(i){return i>=129&&i<=131}function pp(i){return i>=90&&i<=92}function Dn(i){return i>=58&&i<=92}function fp(i){return i>=39&&i<=59}function dp(i){return i===34}function mp(i){return On[i]}function yp(i){return i>=121&&i<=123}function gp(i){return i>=124&&i<=130}function Qt(i){return kn[i]}function _i(i){return Ln[i]}function xp(i){return i===57}function Wi(i){return i>=24&&i<=25}function vt(i){return It[i]}It[8].updateContext=i=>{i.pop()},It[5].updateContext=It[7].updateContext=It[23].updateContext=i=>{i.push(ve.brace)},It[22].updateContext=i=>{i[i.length-1]===ve.template?i.pop():i.push(ve.template)},It[142].updateContext=i=>{i.push(ve.j_expr,ve.j_oTag)};let Fn="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",gl="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";const bp=new RegExp("["+Fn+"]"),Pp=new RegExp("["+Fn+gl+"]");Fn=gl=null;const xl=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Tp=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function sn(i,t){let e=65536;for(let s=0,r=t.length;si)return!1;if(e+=t[s+1],e>=i)return!0}return!1}function kt(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&bp.test(String.fromCharCode(i)):sn(i,xl)}function Ns(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Pp.test(String.fromCharCode(i)):sn(i,xl)||sn(i,Tp)}const $n={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"]},Ap=new Set($n.keyword),wp=new Set($n.strict),Sp=new Set($n.strictBind);function bl(i,t){return t&&i==="await"||i==="enum"}function Pl(i,t){return bl(i,t)||wp.has(i)}function Tl(i){return Sp.has(i)}function Al(i,t){return Pl(i,t)||Tl(i)}function Ep(i){return Ap.has(i)}function Cp(i,t,e){return i===64&&t===64&&kt(e)}const vp=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 Ip(i){return vp.has(i)}class Rn{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}}class Bn{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){const t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new Rn(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let r=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(r,t,e,s);let n=r.names.get(t)||0;e&16?n=n|4:(r.firstLexicalName||(r.firstLexicalName=t),n=n|2),r.names.set(t,n),e&8&&this.maybeExportDefined(r,t)}else if(e&4)for(let n=this.scopeStack.length-1;n>=0&&(r=this.scopeStack[n],this.checkRedeclarationInScope(r,t,e,s),r.names.set(t,(r.names.get(t)||0)|1),this.maybeExportDefined(r,t),!(r.flags&387));--n);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,r){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(b.VarRedeclaration,r,{identifierName:e})}isRedeclaredInScope(t,e,s){if(!(s&1))return!1;if(s&8)return t.names.has(e);const r=t.names.get(e);return s&16?(r&2)>0||!this.treatFunctionsAsVarInScope(t)&&(r&1)>0:(r&2)>0&&!(t.flags&8&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(r&4)>0}checkLocalExport(t){const{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}}class Np extends Rn{constructor(...t){super(...t),this.declareFunctions=new Set}}class kp extends Bn{createScope(t){return new Np(t)}declareName(t,e,s){const r=this.currentScope();if(e&2048){this.checkRedeclarationInScope(r,t,e,s),this.maybeExportDefined(r,t),r.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){if(super.isRedeclaredInScope(t,e,s))return!0;if(s&2048&&!t.declareFunctions.has(e)){const r=t.names.get(e);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}}class Lp{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{const[e,s]=t;if(!this.hasPlugin(e))return!1;const r=this.plugins.get(e);for(const n of Object.keys(s))if((r==null?void 0:r[n])!==s[n])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}}function wl(i,t){i.trailingComments===void 0?i.trailingComments=t:i.trailingComments.unshift(...t)}function Mp(i,t){i.leadingComments===void 0?i.leadingComments=t:i.leadingComments.unshift(...t)}function ai(i,t){i.innerComments===void 0?i.innerComments=t:i.innerComments.unshift(...t)}function Us(i,t,e){let s=null,r=t.length;for(;s===null&&r>0;)s=t[--r];s===null||s.start>e.start?ai(i,e.comments):wl(s,e.comments)}class _p extends Lp{addComment(t){this.filename&&(t.loc.filename=this.filename);const{commentsLen:e}=this.state;this.comments.length!=e&&(this.comments.length=e),this.comments.push(t),this.state.commentsLen++}processComment(t){const{commentStack:e}=this.state,s=e.length;if(s===0)return;let r=s-1;const n=e[r];n.start===t.end&&(n.leadingNode=t,r--);const{start:a}=t;for(;r>=0;r--){const o=e[r],l=o.end;if(l>a)o.containingNode=t,this.finalizeComment(o),e.splice(r,1);else{l===a&&(o.trailingNode=t);break}}}finalizeComment(t){const{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&wl(t.leadingNode,e),t.trailingNode!==null&&Mp(t.trailingNode,e);else{const{containingNode:s,start:r}=t;if(this.input.charCodeAt(r-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Us(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":Us(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Us(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Us(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Us(s,s.specifiers,t);break;default:ai(s,e)}else ai(s,e)}}finalizeRemainingComments(){const{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){const{commentStack:e}=this.state,{length:s}=e;if(s===0)return;const r=e[s-1];r.leadingNode===t&&(r.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){const{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){const{commentStack:r}=this.state,n=r.length;if(n===0)return;let a=n-1;for(;a>=0;a--){const o=r[a],l=o.end;if(o.start===s)o.leadingNode=t;else if(l===e)o.trailingNode=t;else if(l0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:e,startLine:s,startColumn:r}){this.strict=t===!1?!1:t===!0?!0:e==="module",this.curLine=s,this.lineStart=-r,this.startLoc=this.endLoc=new Zt(s,r,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}curPosition(){return new Zt(this.curLine,this.pos-this.lineStart,this.pos)}clone(){const t=new jn;return t.flags=this.flags,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}}var Dp=function(t){return t>=48&&t<=57};const za={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Ai={bin:i=>i===48||i===49,oct:i=>i>=48&&i<=55,dec:i=>i>=48&&i<=57,hex:i=>i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102};function Ka(i,t,e,s,r,n){const a=e,o=s,l=r;let u="",c=null,d=e;const{length:m}=t;for(;;){if(e>=m){n.unterminated(a,o,l),u+=t.slice(d,e);break}const w=t.charCodeAt(e);if(Fp(i,w,t,e)){u+=t.slice(d,e);break}if(w===92){u+=t.slice(d,e);const y=$p(t,e,s,r,i==="template",n);y.ch===null&&!c?c={pos:e,lineStart:s,curLine:r}:u+=y.ch,{pos:e,lineStart:s,curLine:r}=y,d=e}else w===8232||w===8233?(++e,++r,s=e):w===10||w===13?i==="template"?(u+=t.slice(d,e)+` `,++e,w===13&&t.charCodeAt(e)===10&&++e,++r,d=s=e):n.unterminated(a,o,l):++e}return{pos:e,str:u,firstInvalidLoc:c,lineStart:s,curLine:r,containsInvalid:!!c}}function Fp(i,t,e,s){return i==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(i==="double"?34:39)}function $p(i,t,e,s,r,n){const a=!r;t++;const o=u=>({pos:t,ch:u,lineStart:e,curLine:s}),l=i.charCodeAt(t++);switch(l){case 110:return o(` -`);case 114:return o("\r");case 120:{let u;return{code:u,pos:t}=rn(i,t,e,s,2,!1,a,n),o(u===null?null:String.fromCharCode(u))}case 117:{let u;return{code:u,pos:t}=Cl(i,t,e,s,a,n),o(u===null?null:String.fromCodePoint(u))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:i.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);n.strictNumericEscape(t-1,e,s);default:if(l>=48&&l<=55){const u=t-1;let d=i.slice(u,t+2).match(/^[0-7]+/)[0],m=parseInt(d,8);m>255&&(d=d.slice(0,-1),m=parseInt(d,8)),t+=d.length-1;const w=i.charCodeAt(t);if(d!=="0"||w===56||w===57){if(r)return o(null);n.strictNumericEscape(u,e,s)}return o(String.fromCharCode(m))}return o(String.fromCharCode(l))}}function rn(i,t,e,s,r,n,a,o){const l=t;let u;return{n:u,pos:t}=El(i,t,e,s,16,r,n,!1,o,!a),u===null&&(a?o.invalidEscapeSequence(l,e,s):t=l-1),{code:u,pos:t}}function El(i,t,e,s,r,n,a,o,l,u){const c=t,d=r===16?za.hex:za.decBinOct,m=r===16?Ai.hex:r===10?Ai.dec:r===8?Ai.oct:Ai.bin;let w=!1,y=0;for(let L=0,C=n==null?1/0:n;L=97?k=I-97+10:I>=65?k=I-65+10:Dp(I)?k=I-48:k=1/0,k>=r){if(k<=9&&u)return{n:null,pos:t};if(k<=9&&l.invalidDigit(t,e,s,r))k=0;else if(a)k=0,w=!0;else break}++t,y=y*r+k}return t===c||n!=null&&t-c!==n||w?{n:null,pos:t}:{n:y,pos:t}}function Cl(i,t,e,s,r,n){const a=i.charCodeAt(t);let o;if(a===123){if(++t,{code:o,pos:t}=rn(i,t,e,s,i.indexOf("}",t)-t,!0,r,n),++t,o!==null&&o>1114111)if(r)n.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=rn(i,t,e,s,4,!1,r,n));return{code:o,pos:t}}function Hs(i,t,e){return new Zt(e,i-t,i)}const Bp=new Set([103,109,115,105,121,117,100,118]);class zt{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new Ki(t.startLoc,t.endLoc)}}class Rp extends _p{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,r,n,a)=>this.options.errorRecovery?(this.raise(b.InvalidDigit,Hs(s,r,n),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(b.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(b.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(b.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(b.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,r,n)=>{this.recordStrictModeErrors(b.StrictNumericEscape,Hs(s,r,n))},unterminated:(s,r,n)=>{throw this.raise(b.UnterminatedString,Hs(s-1,r,n))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(b.StrictNumericEscape),unterminated:(s,r,n)=>{throw this.raise(b.UnterminatedTemplate,Hs(s,r,n))}}),this.state=new jn,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new zt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){const t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return Mr.lastIndex=t,Mr.test(this.input)?Mr.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Oi.lastIndex=t,Oi.test(this.input)?Oi.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++tthis.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());const s=this.state.pos,r=this.input.indexOf(t,s+2);if(r===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+t.length,Ti.lastIndex=s+2;Ti.test(this.input)&&Ti.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Ti.lastIndex;if(this.isLookahead)return;const n={type:"CommentBlock",value:this.input.slice(s+2,r),start:s,end:r+t.length,loc:new Ki(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(n),n}skipLineComment(t){const e=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=t);if(this.state.post)){const n=this.skipLineComment(3);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){const r=this.state.pos;if(this.input.charCodeAt(r+1)===33&&this.input.charCodeAt(r+2)===45&&this.input.charCodeAt(r+3)===45){const n=this.skipLineComment(4);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else break e}}if(e.length>0){const s=this.state.pos,r={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(b.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?b.RecordExpressionHashIncorrectStartSyntaxType:b.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else kt(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;const e=this.state.pos;for(this.state.pos+=1;!Zs(t)&&++this.state.pos=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.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(b.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 e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(kt(t)){this.readWord(t);return}}throw this.raise(b.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,e){const s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){const t=this.state.startLoc,e=this.state.start+1;let s,r,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(b.UnterminatedRegExp,Ze(t,1));const u=this.input.charCodeAt(n);if(Zs(u))throw this.raise(b.UnterminatedRegExp,Ze(t,1));if(s)s=!1;else{if(u===91)r=!0;else if(u===93&&r)r=!1;else if(u===47&&!r)break;s=u===92}}const a=this.input.slice(e,n);++n;let o="";const l=()=>Ze(t,n+2-e);for(;n=2&&this.input.charCodeAt(e)===48;if(u){const w=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(b.StrictOctalLiteral,s),!this.state.strict){const y=w.indexOf("_");y>0&&this.raise(b.ZeroDigitNumericSeparator,Ze(s,y))}l=u&&!/[89]/.test(w)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!l&&(++this.state.pos,this.readInt(10),r=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!l&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(b.InvalidOrMissingExponent,s),r=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((r||u)&&this.raise(b.InvalidBigIntLiteral,s),++this.state.pos,n=!0),c===109&&(this.expectPlugin("decimal",this.state.curPosition()),(o||u)&&this.raise(b.InvalidDecimal,s),++this.state.pos,a=!0),kt(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());const d=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(n){this.finishToken(135,d);return}if(a){this.finishToken(136,d);return}const m=l?parseInt(d,8):parseFloat(d);this.finishToken(134,m)}readCodePoint(t){const{code:e,pos:s}=Cl(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){const{str:e,pos:s,curLine:r,lineStart:n}=Ka(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=n,this.state.curLine=r,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:r,curLine:n,lineStart:a}=Ka("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=n,s&&(this.state.firstInvalidTemplateEscapePos=new Zt(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(r)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,e){const s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,e):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="";const s=this.state.pos;let r=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos=0;o--){const l=a[o];if(l.loc.index===n)return a[o]=t(r,s);if(l.loc.indexthis.hasPlugin(e)))throw this.raise(b.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,s,r)=>{this.raise(t,Hs(e,s,r))}}}class jp{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class Up{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new jp)}exit(){const t=this.stack.pop(),e=this.current();for(const[s,r]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,r):this.parser.raise(b.InvalidPrivateFieldResolution,r,{identifierName:s})}declarePrivateName(t,e,s){const{privateNames:r,loneAccessors:n,undefinedPrivateNames:a}=this.current();let o=r.has(t);if(e&3){const l=o&&n.get(t);if(l){const u=l&4,c=e&4,d=l&3,m=e&3;o=d===m||u!==c,o||n.delete(t)}else o||n.set(t,e)}o&&this.parser.raise(b.PrivateNameRedeclaration,s,{identifierName:t}),r.add(t),a.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(b.InvalidPrivateFieldResolution,e,{identifierName:t})}}class hr{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class vl extends hr{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,e){const s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}}class Hp{constructor(t){this.parser=void 0,this.stack=[new hr],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){const s=e.loc.start,{stack:r}=this;let n=r.length-1,a=r[n];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(t,s);else return;a=r[--n]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,e){const{stack:s}=this,r=s[s.length-1],n=e.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(t,n);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(t,n);else return}recordAsyncArrowParametersError(t){const{stack:e}=this;let s=e.length-1,r=e[s];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(b.AwaitBindingIdentifier,t),r=e[--s]}validateAsPattern(){const{stack:t}=this,e=t[t.length-1];!e.canBeArrowParameterDeclaration()||e.iterateErrors(([s,r])=>{this.parser.raise(s,r);let n=t.length-2,a=t[n];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r.index),a=t[--n]})}}function Vp(){return new hr(3)}function zp(){return new vl(1)}function Kp(){return new vl(2)}function Il(){return new hr}class Wp{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}}function Di(i,t){return(i?2:0)|(t?1:0)}class qp extends Rp{addExtra(t,e,s,r=!0){if(!t)return;const n=t.extra=t.extra||{};r?n[e]=s:Object.defineProperty(n,e,{enumerable:r,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){const s=t+e.length;if(this.input.slice(t,s)===e){const r=this.input.charCodeAt(s);return!(Ns(r)||(r&64512)===55296)}return!1}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Sl.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Va.lastIndex=this.state.end,Va.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(b.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){const s={node:null};try{const r=t((n=null)=>{throw s.node=n,s});if(this.state.errors.length>e.errors.length){const n=this.state;return this.state=e,this.state.tokensLength=n.tokensLength,{node:r,error:n.errors[e.errors.length],thrown:!1,aborted:!1,failState:n}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){const n=this.state;if(this.state=e,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:n};if(r===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:n};throw r}}checkExpressionErrors(t,e){if(!t)return!1;const{shorthandAssignLoc:s,doubleProtoLoc:r,privateKeyLoc:n,optionalParametersLoc:a}=t,o=!!s||!!r||!!a||!!n;if(!e)return o;s!=null&&this.raise(b.InvalidCoverInitializedName,s),r!=null&&this.raise(b.DuplicateProto,r),n!=null&&this.raise(b.UnexpectedPrivateField,n),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return yl(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){const e=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const r=this.inModule;this.inModule=t;const n=this.scope,a=this.getScopeHandler();this.scope=new a(this,t);const o=this.prodParam;this.prodParam=new Wp;const l=this.classScope;this.classScope=new Up(this);const u=this.expressionScope;return this.expressionScope=new Hp(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=r,this.scope=n,this.prodParam=o,this.classScope=l,this.expressionScope=u}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){const{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}}class Fi{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class qi{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new Ki(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}}const Un=qi.prototype;Un.__clone=function(){const i=new qi(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e`Cannot overwrite reserved type ${i}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:i,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${i} = true,\` or \`${i} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:i,enumName:t})=>`Enum member names need to be unique, but the name \`${i}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:i})=>`Enum \`${i}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:i,enumName:t})=>`Enum type \`${i}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:i})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${i}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:i,memberName:t,explicitType:e})=>`Enum \`${i}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:i,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${i}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:i,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${i}\`.`,EnumInvalidMemberName:({enumName:i,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${i}\`.`,EnumNumberMemberNotInitialized:({enumName:i,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${i}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:i})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${i}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:i})=>`Unexpected reserved type ${i}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:i,suggestion:t})=>`\`declare export ${i}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Zp(i){return i.type==="DeclareExportAllDeclaration"||i.type==="DeclareExportDeclaration"&&(!i.declaration||i.declaration.type!=="TypeAlias"&&i.declaration.type!=="InterfaceDeclaration")}function Wa(i){return i.importKind==="type"||i.importKind==="typeof"}const Qp={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function ef(i,t){const e=[],s=[];for(let r=0;rclass extends i{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return kp}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){const s=tf.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){const s=this.state.inType;this.state.inType=!0,this.expect(e||14);const r=this.flowParseType();return this.state.inType=s,r}flowParsePredicate(){const e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(le.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[s,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const s=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);const a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,r.this=a._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(le.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const s=e.body=this.startNode(),r=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(le.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,le.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),r.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let n=null,a=!1;return r.forEach(o=>{Zp(o)?(n==="CommonJS"&&this.raise(le.AmbiguousDeclareModuleKind,o),n="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(le.DuplicateDeclareModuleExports,o),n==="ES"&&this.raise(le.AmbiguousDeclareModuleKind,o),n="CommonJS",a=!0)}),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){const r=this.state.value;throw this.raise(le.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:r,suggestion:Qp[r]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();const s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(le.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,s,r){!Yp.has(e)||this.raise(r?le.AssignReservedType:le.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const s=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return r.name=a.name,r.variance=n,r.bound=a.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(le.MissingTypeParamDefault,s),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let r=!1;do{const n=this.flowParseTypeParameter(r);s.params.push(n),n.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);const r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,r){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){const r=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:r,allowProto:n,allowInexact:a}){const o=this.state.inType;this.state.inType=!0;const l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let u,c,d=!1;for(s&&this.match(6)?(this.expect(6),u=9,c=!0):(this.expect(5),u=8,c=!1),l.exact=c;!this.match(u);){let w=!1,y=null,L=null;const C=this.startNode();if(n&&this.isContextual(118)){const k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),y=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){const k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),w=!0)}const I=this.flowParseVariance();if(this.eat(0))y!=null&&this.unexpected(y),this.eat(0)?(I&&this.unexpected(I.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(C,w))):l.indexers.push(this.flowParseObjectTypeIndexer(C,w,I));else if(this.match(10)||this.match(47))y!=null&&this.unexpected(y),I&&this.unexpected(I.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(C,w));else{let k="init";if(this.isContextual(99)||this.isContextual(104)){const $=this.lookahead();yl($.type)&&(k=this.state.value,this.next())}const j=this.flowParseObjectTypeProperty(C,w,y,I,k,r,a!=null?a:!c);j===null?(d=!0,L=this.state.lastTokStartLoc):l.properties.push(j)}this.flowObjectTypeSemicolon(),L&&!this.match(8)&&!this.match(9)&&this.raise(le.UnexpectedExplicitInexactInObject,L)}this.expect(u),r&&(l.inexact=d);const m=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,m}flowParseObjectTypeProperty(e,s,r,n,a,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(le.InexactInsideExact,this.state.lastTokStartLoc):this.raise(le.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(le.InexactVariance,n),null):(o||this.raise(le.UnexpectedSpreadType,this.state.lastTokStartLoc),r!=null&&this.unexpected(r),n&&this.raise(le.SpreadVariance,n),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=r!=null,e.kind=a;let u=!1;return this.match(47)||this.match(10)?(e.method=!0,r!=null&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(le.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(u=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=u,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const s=e.kind==="get"?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?le.GetterMayNotHaveThisParam:le.SetterMayNotHaveThisParam,e.value.this),r!==s&&this.raise(e.kind==="get"?b.BadGetterArity:b.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(b.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var r;(r=e)!=null||(e=this.state.startLoc);let n=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const a=this.startNodeAt(e);a.qualification=n,a.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(a,"QualifiedTypeIdentifier")}return n}flowParseGenericType(e,s){const r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(0);this.state.possuper.parseFunctionBody(e,!0,r));return}super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,s,r=!1){if(this.match(14)){const n=this.startNode();[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=n.typeAnnotation?this.finishNode(n,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){const r=this.lookahead();if(dt(r.type)){const n=this.startNode();return this.next(),this.flowParseInterface(n)}}else if(this.shouldParseEnums()&&this.isContextual(126)){const r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}const s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,r){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||Ee(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(Ee(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){const{type:e}=this.state;return Ha(e)||this.shouldParseEnums()&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return Ha(e)||this.shouldParseEnums()&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const m=this.lookaheadCharCode();if(m===44||m===61||m===58||m===41)return this.setOptionalParametersError(r),e}this.expect(17);const n=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(s);let{consequent:l,failed:u}=this.tryParseConditionalConsequent(),[c,d]=this.getArrowLikeExpressions(l);if(u||d.length>0){const m=[...a];if(d.length>0){this.state=n,this.state.noArrowAt=m;for(let w=0;w1&&this.raise(le.AmbiguousConditionalArrow,n.startLoc),u&&c.length===1&&(this.state=n,m.push(c[0].start),this.state.noArrowAt=m,{consequent:l,failed:u}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){const r=[e],n=[];for(;r.length!==0;){const a=r.pop();a.type==="ArrowFunctionExpression"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):n.push(a),r.push(a.body)):a.type==="ConditionalExpression"&&(r.push(a.consequent),r.push(a.alternate))}return s?(n.forEach(a=>this.finishArrowValidation(a)),[n,[]]):ef(n,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let r;return this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),r=s(),this.state.noArrowParamsConversionAt.pop()):r=s(),r}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){const r=this.startNodeAt(s);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";const s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";const s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";const s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.shouldParseEnums()&&this.isContextual(126)){e.exportKind="value";const s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){const{startLoc:s}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&e.exportKind==="type"&&this.unexpected(s),r}parseClassId(e,s,r){super.parseClassId(e,s,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,r){const{startLoc:n}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,r),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(le.DeclareClassElement,n):s.value&&this.raise(le.DeclareClassFieldInitializer,s.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){const e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(b.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){const s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):Cp(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,r){for(let n=0;n1||!s)&&this.raise(le.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,s,r,n){const a=super.parseArrayLike(e,s,r,n);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,s,r){return e==="TypeCastExpression"||super.isValidLVal(e,s,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,r,n,a,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,r,n,a,o),s.params&&a){const l=s.params;l.length>0&&this.isThisParam(l[0])&&this.raise(le.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&a&&s.value.params){const l=s.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(le.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,r,n){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();const s=e.implements=[];do{const r=this.startNode();r.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,s.push(this.finishNode(r,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const s=this.getObjectOrClassMethodParams(e);if(s.length>0){const r=s[0];this.isThisParam(r)&&e.kind==="get"?this.raise(le.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(le.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,r,n,a,o,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let u;this.match(47)&&!o&&(u=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const c=super.parseObjPropValue(e,s,r,n,a,o,l);return u&&((c.value||c).typeParameters=u),c}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(le.PatternIsOptional,e),this.isThisParam(e)&&this.raise(le.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(le.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(le.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,s){const r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.startsuper.parseMaybeAssign(e,s),n),!a.error)return a.node;const{context:u}=this.state,c=u[u.length-1];(c===ve.j_oTag||c===ve.j_expr)&&u.pop()}if((r=a)!=null&&r.error||this.match(47)){var o,l;n=n||this.state.clone();let u;const c=this.tryParse(m=>{var w;u=this.flowParseTypeParameterDeclaration();const y=this.forwardNoArrowParamsConversionAt(u,()=>{const C=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(C,u),C});(w=y.extra)!=null&&w.parenthesized&&m();const L=this.maybeUnwrapTypeCastExpression(y);return L.type!=="ArrowFunctionExpression"&&m(),L.typeParameters=u,this.resetStartLocationFromNode(L,u),y},n);let d=null;if(c.node&&this.maybeUnwrapTypeCastExpression(c.node).type==="ArrowFunctionExpression"){if(!c.error&&!c.aborted)return c.node.async&&this.raise(le.UnexpectedTypeParameterBeforeAsyncArrowFunction,u),c.node;d=c.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(d)return this.state=c.failState,d;throw(l=a)!=null&&l.thrown?a.error:c.thrown?c.error:this.raise(le.UnexpectedTokenAfterTypeParameter,u)}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){const s=this.tryParse(()=>{const r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=r,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,r,n=!0){if(!(r&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let a=0;a0&&this.raise(le.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,s,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,s,r){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(s.index)!==-1){this.next();const n=this.startNodeAt(s);n.callee=e,n.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(n,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){const n=this.state.clone(),a=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(s)||l(),n);if(!a.error&&!a.aborted)return a.node;const o=this.tryParse(()=>super.parseSubscripts(e,s,r),n);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,s,r)}parseSubscript(e,s,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();const a=this.startNodeAt(s);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11,!1),a.optional=!0,this.finishCallExpression(a,!0)}else if(!r&&this.shouldParseTypes()&&this.match(47)){const a=this.startNodeAt(s);a.callee=e;const o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11,!1),n.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,n.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,r,n)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){const s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){const s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){const r=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(le.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(le.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:e}=this.state;let s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;const r=this.input.charCodeAt(s+e),n=this.input.charCodeAt(s+e+1);return r===58&&n===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:r===58&&n!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:r}){this.raise(le.EnumBooleanMemberNotInitialized,e,{memberName:r,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?le.EnumInvalidMemberInitializerSymbolType:le.EnumInvalidMemberInitializerPrimaryType:le.EnumInvalidMemberInitializerUnknownType,e,s)}flowEnumErrorNumberMemberNotInitialized(e,s){this.raise(le.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitialized(e,s){this.raise(le.EnumStringMemberInconsistentlyInitialized,e,s)}flowEnumMemberInit(){const e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{const r=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 133:{const r=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{const r=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){const e=this.state.startLoc,s=this.parseIdentifier(!0),r=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:r}}flowEnumCheckExplicitTypeMismatch(e,s,r){const{explicitType:n}=s;n!==null&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){const r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}const o=this.startNode(),{id:l,init:u}=this.flowEnumMemberRaw(),c=l.name;if(c==="")continue;/^[a-z]/.test(c)&&this.raise(le.EnumInvalidMemberName,l,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),r.has(c)&&this.raise(le.EnumDuplicateMemberName,l,{memberName:c,enumName:e}),r.add(c);const d={enumName:e,explicitType:s,memberName:c};switch(o.id=l,u.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(u.loc,d,"boolean"),o.init=u.value,n.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(u.loc,d,"number"),o.init=u.value,n.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(u.loc,d,"string"),o.init=u.value,n.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(u.loc,d);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(u.loc,d);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(u.loc,d);break;default:n.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:a}}flowEnumStringMembers(e,s,{enumName:r}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(const n of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return s}else{for(const n of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!Ee(this.state.type))throw this.raise(le.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});const{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(le.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){const r=s.name,n=s.loc.start,a=this.flowEnumParseExplicitType({enumName:r});this.expect(5);const{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:r,explicitType:a});switch(e.hasUnknownMembers=l,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{const u=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const c=o.booleanMembers.length,d=o.numberMembers.length,m=o.stringMembers.length,w=o.defaultedMembers.length;if(!c&&!d&&!m&&!w)return u();if(!c&&!d)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!d&&!m&&c>=w){for(const y of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start,{enumName:r,memberName:y.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!c&&!m&&d>=w){for(const y of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(y.loc.start,{enumName:r,memberName:y.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(le.EnumInconsistentMemberValues,n,{enumName:r}),u()}}}flowParseEnumDeclaration(e){const s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){const e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){const s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}};const rf={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},ls=Mt`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:i})=>`Expected corresponding JSX closing tag for <${i}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:i,HTMLEntity:t})=>`Unexpected token \`${i}\`. Did you mean \`${t}\` or \`{'${i}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function Ht(i){return i?i.type==="JSXOpeningFragment"||i.type==="JSXClosingFragment":!1}function ws(i){if(i.type==="JSXIdentifier")return i.name;if(i.type==="JSXNamespacedName")return i.namespace.name+":"+i.name.name;if(i.type==="JSXMemberExpression")return ws(i.object)+"."+ws(i.property);throw new Error("Node had unexpected type: "+i.type)}var nf=i=>class extends i{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ls.UnterminatedJsxContent,this.state.startLoc);const r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(r);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:Zs(r)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const s=this.input.charCodeAt(this.state.pos);let r;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=e?` +`);case 114:return o("\r");case 120:{let u;return{code:u,pos:t}=rn(i,t,e,s,2,!1,a,n),o(u===null?null:String.fromCharCode(u))}case 117:{let u;return{code:u,pos:t}=Cl(i,t,e,s,a,n),o(u===null?null:String.fromCodePoint(u))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:i.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);n.strictNumericEscape(t-1,e,s);default:if(l>=48&&l<=55){const u=t-1;let d=i.slice(u,t+2).match(/^[0-7]+/)[0],m=parseInt(d,8);m>255&&(d=d.slice(0,-1),m=parseInt(d,8)),t+=d.length-1;const w=i.charCodeAt(t);if(d!=="0"||w===56||w===57){if(r)return o(null);n.strictNumericEscape(u,e,s)}return o(String.fromCharCode(m))}return o(String.fromCharCode(l))}}function rn(i,t,e,s,r,n,a,o){const l=t;let u;return{n:u,pos:t}=El(i,t,e,s,16,r,n,!1,o,!a),u===null&&(a?o.invalidEscapeSequence(l,e,s):t=l-1),{code:u,pos:t}}function El(i,t,e,s,r,n,a,o,l,u){const c=t,d=r===16?za.hex:za.decBinOct,m=r===16?Ai.hex:r===10?Ai.dec:r===8?Ai.oct:Ai.bin;let w=!1,y=0;for(let L=0,C=n==null?1/0:n;L=97?k=I-97+10:I>=65?k=I-65+10:Dp(I)?k=I-48:k=1/0,k>=r){if(k<=9&&u)return{n:null,pos:t};if(k<=9&&l.invalidDigit(t,e,s,r))k=0;else if(a)k=0,w=!0;else break}++t,y=y*r+k}return t===c||n!=null&&t-c!==n||w?{n:null,pos:t}:{n:y,pos:t}}function Cl(i,t,e,s,r,n){const a=i.charCodeAt(t);let o;if(a===123){if(++t,{code:o,pos:t}=rn(i,t,e,s,i.indexOf("}",t)-t,!0,r,n),++t,o!==null&&o>1114111)if(r)n.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=rn(i,t,e,s,4,!1,r,n));return{code:o,pos:t}}function Hs(i,t,e){return new Zt(e,i-t,i)}const Rp=new Set([103,109,115,105,121,117,100,118]);class zt{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new Ki(t.startLoc,t.endLoc)}}class Bp extends _p{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,r,n,a)=>this.options.errorRecovery?(this.raise(b.InvalidDigit,Hs(s,r,n),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(b.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(b.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(b.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(b.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,r,n)=>{this.recordStrictModeErrors(b.StrictNumericEscape,Hs(s,r,n))},unterminated:(s,r,n)=>{throw this.raise(b.UnterminatedString,Hs(s-1,r,n))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(b.StrictNumericEscape),unterminated:(s,r,n)=>{throw this.raise(b.UnterminatedTemplate,Hs(s,r,n))}}),this.state=new jn,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new zt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){const t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return Mr.lastIndex=t,Mr.test(this.input)?Mr.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Oi.lastIndex=t,Oi.test(this.input)?Oi.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++tthis.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());const s=this.state.pos,r=this.input.indexOf(t,s+2);if(r===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+t.length,Ti.lastIndex=s+2;Ti.test(this.input)&&Ti.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Ti.lastIndex;if(this.isLookahead)return;const n={type:"CommentBlock",value:this.input.slice(s+2,r),start:s,end:r+t.length,loc:new Ki(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(n),n}skipLineComment(t){const e=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=t);if(this.state.post)){const n=this.skipLineComment(3);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){const r=this.state.pos;if(this.input.charCodeAt(r+1)===33&&this.input.charCodeAt(r+2)===45&&this.input.charCodeAt(r+3)===45){const n=this.skipLineComment(4);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else break e}}if(e.length>0){const s=this.state.pos,r={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(b.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?b.RecordExpressionHashIncorrectStartSyntaxType:b.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else kt(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;const e=this.state.pos;for(this.state.pos+=1;!Zs(t)&&++this.state.pos=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.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(b.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 e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(kt(t)){this.readWord(t);return}}throw this.raise(b.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,e){const s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){const t=this.state.startLoc,e=this.state.start+1;let s,r,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(b.UnterminatedRegExp,Ze(t,1));const u=this.input.charCodeAt(n);if(Zs(u))throw this.raise(b.UnterminatedRegExp,Ze(t,1));if(s)s=!1;else{if(u===91)r=!0;else if(u===93&&r)r=!1;else if(u===47&&!r)break;s=u===92}}const a=this.input.slice(e,n);++n;let o="";const l=()=>Ze(t,n+2-e);for(;n=2&&this.input.charCodeAt(e)===48;if(u){const w=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(b.StrictOctalLiteral,s),!this.state.strict){const y=w.indexOf("_");y>0&&this.raise(b.ZeroDigitNumericSeparator,Ze(s,y))}l=u&&!/[89]/.test(w)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!l&&(++this.state.pos,this.readInt(10),r=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!l&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(b.InvalidOrMissingExponent,s),r=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((r||u)&&this.raise(b.InvalidBigIntLiteral,s),++this.state.pos,n=!0),c===109&&(this.expectPlugin("decimal",this.state.curPosition()),(o||u)&&this.raise(b.InvalidDecimal,s),++this.state.pos,a=!0),kt(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());const d=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(n){this.finishToken(135,d);return}if(a){this.finishToken(136,d);return}const m=l?parseInt(d,8):parseFloat(d);this.finishToken(134,m)}readCodePoint(t){const{code:e,pos:s}=Cl(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){const{str:e,pos:s,curLine:r,lineStart:n}=Ka(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=n,this.state.curLine=r,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:r,curLine:n,lineStart:a}=Ka("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=n,s&&(this.state.firstInvalidTemplateEscapePos=new Zt(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(r)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,e){const s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,e):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="";const s=this.state.pos;let r=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos=0;o--){const l=a[o];if(l.loc.index===n)return a[o]=t(r,s);if(l.loc.indexthis.hasPlugin(e)))throw this.raise(b.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,s,r)=>{this.raise(t,Hs(e,s,r))}}}class jp{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class Up{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new jp)}exit(){const t=this.stack.pop(),e=this.current();for(const[s,r]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,r):this.parser.raise(b.InvalidPrivateFieldResolution,r,{identifierName:s})}declarePrivateName(t,e,s){const{privateNames:r,loneAccessors:n,undefinedPrivateNames:a}=this.current();let o=r.has(t);if(e&3){const l=o&&n.get(t);if(l){const u=l&4,c=e&4,d=l&3,m=e&3;o=d===m||u!==c,o||n.delete(t)}else o||n.set(t,e)}o&&this.parser.raise(b.PrivateNameRedeclaration,s,{identifierName:t}),r.add(t),a.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(b.InvalidPrivateFieldResolution,e,{identifierName:t})}}class hr{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class vl extends hr{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,e){const s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}}class Hp{constructor(t){this.parser=void 0,this.stack=[new hr],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){const s=e.loc.start,{stack:r}=this;let n=r.length-1,a=r[n];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(t,s);else return;a=r[--n]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,e){const{stack:s}=this,r=s[s.length-1],n=e.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(t,n);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(t,n);else return}recordAsyncArrowParametersError(t){const{stack:e}=this;let s=e.length-1,r=e[s];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(b.AwaitBindingIdentifier,t),r=e[--s]}validateAsPattern(){const{stack:t}=this,e=t[t.length-1];!e.canBeArrowParameterDeclaration()||e.iterateErrors(([s,r])=>{this.parser.raise(s,r);let n=t.length-2,a=t[n];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r.index),a=t[--n]})}}function Vp(){return new hr(3)}function zp(){return new vl(1)}function Kp(){return new vl(2)}function Il(){return new hr}class Wp{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}}function Di(i,t){return(i?2:0)|(t?1:0)}class qp extends Bp{addExtra(t,e,s,r=!0){if(!t)return;const n=t.extra=t.extra||{};r?n[e]=s:Object.defineProperty(n,e,{enumerable:r,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){const s=t+e.length;if(this.input.slice(t,s)===e){const r=this.input.charCodeAt(s);return!(Ns(r)||(r&64512)===55296)}return!1}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Sl.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Va.lastIndex=this.state.end,Va.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(b.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){const s={node:null};try{const r=t((n=null)=>{throw s.node=n,s});if(this.state.errors.length>e.errors.length){const n=this.state;return this.state=e,this.state.tokensLength=n.tokensLength,{node:r,error:n.errors[e.errors.length],thrown:!1,aborted:!1,failState:n}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){const n=this.state;if(this.state=e,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:n};if(r===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:n};throw r}}checkExpressionErrors(t,e){if(!t)return!1;const{shorthandAssignLoc:s,doubleProtoLoc:r,privateKeyLoc:n,optionalParametersLoc:a}=t,o=!!s||!!r||!!a||!!n;if(!e)return o;s!=null&&this.raise(b.InvalidCoverInitializedName,s),r!=null&&this.raise(b.DuplicateProto,r),n!=null&&this.raise(b.UnexpectedPrivateField,n),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return yl(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){const e=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const r=this.inModule;this.inModule=t;const n=this.scope,a=this.getScopeHandler();this.scope=new a(this,t);const o=this.prodParam;this.prodParam=new Wp;const l=this.classScope;this.classScope=new Up(this);const u=this.expressionScope;return this.expressionScope=new Hp(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=r,this.scope=n,this.prodParam=o,this.classScope=l,this.expressionScope=u}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){const{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}}class Fi{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class qi{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new Ki(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}}const Un=qi.prototype;Un.__clone=function(){const i=new qi(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e`Cannot overwrite reserved type ${i}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:i,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${i} = true,\` or \`${i} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:i,enumName:t})=>`Enum member names need to be unique, but the name \`${i}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:i})=>`Enum \`${i}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:i,enumName:t})=>`Enum type \`${i}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:i})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${i}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:i,memberName:t,explicitType:e})=>`Enum \`${i}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:i,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${i}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:i,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${i}\`.`,EnumInvalidMemberName:({enumName:i,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${i}\`.`,EnumNumberMemberNotInitialized:({enumName:i,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${i}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:i})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${i}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:i})=>`Unexpected reserved type ${i}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:i,suggestion:t})=>`\`declare export ${i}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Zp(i){return i.type==="DeclareExportAllDeclaration"||i.type==="DeclareExportDeclaration"&&(!i.declaration||i.declaration.type!=="TypeAlias"&&i.declaration.type!=="InterfaceDeclaration")}function Wa(i){return i.importKind==="type"||i.importKind==="typeof"}const Qp={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function ef(i,t){const e=[],s=[];for(let r=0;rclass extends i{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return kp}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){const s=tf.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){const s=this.state.inType;this.state.inType=!0,this.expect(e||14);const r=this.flowParseType();return this.state.inType=s,r}flowParsePredicate(){const e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(le.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[s,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const s=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);const a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,r.this=a._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(le.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const s=e.body=this.startNode(),r=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(le.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,le.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),r.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let n=null,a=!1;return r.forEach(o=>{Zp(o)?(n==="CommonJS"&&this.raise(le.AmbiguousDeclareModuleKind,o),n="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(le.DuplicateDeclareModuleExports,o),n==="ES"&&this.raise(le.AmbiguousDeclareModuleKind,o),n="CommonJS",a=!0)}),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){const r=this.state.value;throw this.raise(le.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:r,suggestion:Qp[r]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();const s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(le.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,s,r){!Yp.has(e)||this.raise(r?le.AssignReservedType:le.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const s=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return r.name=a.name,r.variance=n,r.bound=a.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(le.MissingTypeParamDefault,s),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let r=!1;do{const n=this.flowParseTypeParameter(r);s.params.push(n),n.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);const r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,r){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){const r=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:r,allowProto:n,allowInexact:a}){const o=this.state.inType;this.state.inType=!0;const l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let u,c,d=!1;for(s&&this.match(6)?(this.expect(6),u=9,c=!0):(this.expect(5),u=8,c=!1),l.exact=c;!this.match(u);){let w=!1,y=null,L=null;const C=this.startNode();if(n&&this.isContextual(118)){const k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),y=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){const k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),w=!0)}const I=this.flowParseVariance();if(this.eat(0))y!=null&&this.unexpected(y),this.eat(0)?(I&&this.unexpected(I.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(C,w))):l.indexers.push(this.flowParseObjectTypeIndexer(C,w,I));else if(this.match(10)||this.match(47))y!=null&&this.unexpected(y),I&&this.unexpected(I.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(C,w));else{let k="init";if(this.isContextual(99)||this.isContextual(104)){const $=this.lookahead();yl($.type)&&(k=this.state.value,this.next())}const j=this.flowParseObjectTypeProperty(C,w,y,I,k,r,a!=null?a:!c);j===null?(d=!0,L=this.state.lastTokStartLoc):l.properties.push(j)}this.flowObjectTypeSemicolon(),L&&!this.match(8)&&!this.match(9)&&this.raise(le.UnexpectedExplicitInexactInObject,L)}this.expect(u),r&&(l.inexact=d);const m=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,m}flowParseObjectTypeProperty(e,s,r,n,a,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(le.InexactInsideExact,this.state.lastTokStartLoc):this.raise(le.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(le.InexactVariance,n),null):(o||this.raise(le.UnexpectedSpreadType,this.state.lastTokStartLoc),r!=null&&this.unexpected(r),n&&this.raise(le.SpreadVariance,n),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=r!=null,e.kind=a;let u=!1;return this.match(47)||this.match(10)?(e.method=!0,r!=null&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(le.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(u=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=u,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const s=e.kind==="get"?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?le.GetterMayNotHaveThisParam:le.SetterMayNotHaveThisParam,e.value.this),r!==s&&this.raise(e.kind==="get"?b.BadGetterArity:b.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(b.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var r;(r=e)!=null||(e=this.state.startLoc);let n=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const a=this.startNodeAt(e);a.qualification=n,a.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(a,"QualifiedTypeIdentifier")}return n}flowParseGenericType(e,s){const r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(0);this.state.possuper.parseFunctionBody(e,!0,r));return}super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,s,r=!1){if(this.match(14)){const n=this.startNode();[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=n.typeAnnotation?this.finishNode(n,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){const r=this.lookahead();if(dt(r.type)){const n=this.startNode();return this.next(),this.flowParseInterface(n)}}else if(this.shouldParseEnums()&&this.isContextual(126)){const r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}const s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,r){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||Ee(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(Ee(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){const{type:e}=this.state;return Ha(e)||this.shouldParseEnums()&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return Ha(e)||this.shouldParseEnums()&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const m=this.lookaheadCharCode();if(m===44||m===61||m===58||m===41)return this.setOptionalParametersError(r),e}this.expect(17);const n=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(s);let{consequent:l,failed:u}=this.tryParseConditionalConsequent(),[c,d]=this.getArrowLikeExpressions(l);if(u||d.length>0){const m=[...a];if(d.length>0){this.state=n,this.state.noArrowAt=m;for(let w=0;w1&&this.raise(le.AmbiguousConditionalArrow,n.startLoc),u&&c.length===1&&(this.state=n,m.push(c[0].start),this.state.noArrowAt=m,{consequent:l,failed:u}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){const r=[e],n=[];for(;r.length!==0;){const a=r.pop();a.type==="ArrowFunctionExpression"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):n.push(a),r.push(a.body)):a.type==="ConditionalExpression"&&(r.push(a.consequent),r.push(a.alternate))}return s?(n.forEach(a=>this.finishArrowValidation(a)),[n,[]]):ef(n,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let r;return this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),r=s(),this.state.noArrowParamsConversionAt.pop()):r=s(),r}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){const r=this.startNodeAt(s);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";const s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";const s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";const s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.shouldParseEnums()&&this.isContextual(126)){e.exportKind="value";const s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){const{startLoc:s}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&e.exportKind==="type"&&this.unexpected(s),r}parseClassId(e,s,r){super.parseClassId(e,s,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,r){const{startLoc:n}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,r),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(le.DeclareClassElement,n):s.value&&this.raise(le.DeclareClassFieldInitializer,s.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){const e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(b.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){const s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):Cp(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,r){for(let n=0;n1||!s)&&this.raise(le.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,s,r,n){const a=super.parseArrayLike(e,s,r,n);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,s,r){return e==="TypeCastExpression"||super.isValidLVal(e,s,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,r,n,a,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,r,n,a,o),s.params&&a){const l=s.params;l.length>0&&this.isThisParam(l[0])&&this.raise(le.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&a&&s.value.params){const l=s.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(le.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,r,n){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();const s=e.implements=[];do{const r=this.startNode();r.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,s.push(this.finishNode(r,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const s=this.getObjectOrClassMethodParams(e);if(s.length>0){const r=s[0];this.isThisParam(r)&&e.kind==="get"?this.raise(le.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(le.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,r,n,a,o,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let u;this.match(47)&&!o&&(u=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const c=super.parseObjPropValue(e,s,r,n,a,o,l);return u&&((c.value||c).typeParameters=u),c}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(le.PatternIsOptional,e),this.isThisParam(e)&&this.raise(le.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(le.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(le.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,s){const r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.startsuper.parseMaybeAssign(e,s),n),!a.error)return a.node;const{context:u}=this.state,c=u[u.length-1];(c===ve.j_oTag||c===ve.j_expr)&&u.pop()}if((r=a)!=null&&r.error||this.match(47)){var o,l;n=n||this.state.clone();let u;const c=this.tryParse(m=>{var w;u=this.flowParseTypeParameterDeclaration();const y=this.forwardNoArrowParamsConversionAt(u,()=>{const C=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(C,u),C});(w=y.extra)!=null&&w.parenthesized&&m();const L=this.maybeUnwrapTypeCastExpression(y);return L.type!=="ArrowFunctionExpression"&&m(),L.typeParameters=u,this.resetStartLocationFromNode(L,u),y},n);let d=null;if(c.node&&this.maybeUnwrapTypeCastExpression(c.node).type==="ArrowFunctionExpression"){if(!c.error&&!c.aborted)return c.node.async&&this.raise(le.UnexpectedTypeParameterBeforeAsyncArrowFunction,u),c.node;d=c.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(d)return this.state=c.failState,d;throw(l=a)!=null&&l.thrown?a.error:c.thrown?c.error:this.raise(le.UnexpectedTokenAfterTypeParameter,u)}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){const s=this.tryParse(()=>{const r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=r,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,r,n=!0){if(!(r&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let a=0;a0&&this.raise(le.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,s,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,s,r){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(s.index)!==-1){this.next();const n=this.startNodeAt(s);n.callee=e,n.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(n,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){const n=this.state.clone(),a=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(s)||l(),n);if(!a.error&&!a.aborted)return a.node;const o=this.tryParse(()=>super.parseSubscripts(e,s,r),n);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,s,r)}parseSubscript(e,s,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();const a=this.startNodeAt(s);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11,!1),a.optional=!0,this.finishCallExpression(a,!0)}else if(!r&&this.shouldParseTypes()&&this.match(47)){const a=this.startNodeAt(s);a.callee=e;const o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11,!1),n.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,n.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,r,n)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){const s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){const s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){const r=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(le.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(le.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:e}=this.state;let s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;const r=this.input.charCodeAt(s+e),n=this.input.charCodeAt(s+e+1);return r===58&&n===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:r===58&&n!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:r}){this.raise(le.EnumBooleanMemberNotInitialized,e,{memberName:r,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?le.EnumInvalidMemberInitializerSymbolType:le.EnumInvalidMemberInitializerPrimaryType:le.EnumInvalidMemberInitializerUnknownType,e,s)}flowEnumErrorNumberMemberNotInitialized(e,s){this.raise(le.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitialized(e,s){this.raise(le.EnumStringMemberInconsistentlyInitialized,e,s)}flowEnumMemberInit(){const e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{const r=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 133:{const r=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{const r=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){const e=this.state.startLoc,s=this.parseIdentifier(!0),r=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:r}}flowEnumCheckExplicitTypeMismatch(e,s,r){const{explicitType:n}=s;n!==null&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){const r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}const o=this.startNode(),{id:l,init:u}=this.flowEnumMemberRaw(),c=l.name;if(c==="")continue;/^[a-z]/.test(c)&&this.raise(le.EnumInvalidMemberName,l,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),r.has(c)&&this.raise(le.EnumDuplicateMemberName,l,{memberName:c,enumName:e}),r.add(c);const d={enumName:e,explicitType:s,memberName:c};switch(o.id=l,u.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(u.loc,d,"boolean"),o.init=u.value,n.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(u.loc,d,"number"),o.init=u.value,n.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(u.loc,d,"string"),o.init=u.value,n.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(u.loc,d);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(u.loc,d);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(u.loc,d);break;default:n.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:a}}flowEnumStringMembers(e,s,{enumName:r}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(const n of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return s}else{for(const n of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!Ee(this.state.type))throw this.raise(le.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});const{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(le.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){const r=s.name,n=s.loc.start,a=this.flowEnumParseExplicitType({enumName:r});this.expect(5);const{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:r,explicitType:a});switch(e.hasUnknownMembers=l,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{const u=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const c=o.booleanMembers.length,d=o.numberMembers.length,m=o.stringMembers.length,w=o.defaultedMembers.length;if(!c&&!d&&!m&&!w)return u();if(!c&&!d)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!d&&!m&&c>=w){for(const y of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start,{enumName:r,memberName:y.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!c&&!m&&d>=w){for(const y of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(y.loc.start,{enumName:r,memberName:y.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(le.EnumInconsistentMemberValues,n,{enumName:r}),u()}}}flowParseEnumDeclaration(e){const s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){const e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){const s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}};const rf={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},ls=Mt`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:i})=>`Expected corresponding JSX closing tag for <${i}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:i,HTMLEntity:t})=>`Unexpected token \`${i}\`. Did you mean \`${t}\` or \`{'${i}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function Ht(i){return i?i.type==="JSXOpeningFragment"||i.type==="JSXClosingFragment":!1}function ws(i){if(i.type==="JSXIdentifier")return i.name;if(i.type==="JSXNamespacedName")return i.namespace.name+":"+i.name.name;if(i.type==="JSXMemberExpression")return ws(i.object)+"."+ws(i.property);throw new Error("Node had unexpected type: "+i.type)}var nf=i=>class extends i{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ls.UnterminatedJsxContent,this.state.startLoc);const r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(r);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:Zs(r)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const s=this.input.charCodeAt(this.state.pos);let r;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=e?` `:`\r -`):r=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let s="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(b.UnterminatedString,this.state.startLoc);const n=this.input.charCodeAt(this.state.pos);if(n===e)break;n===38?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadEntity(),r=this.state.pos):Zs(n)?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}s+=this.input.slice(r,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){const e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);const r=this.readInt(s,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let s=0,r=!1;for(;s++<10&&this.state.pos1){for(let r=0;r0){if(s&256){const n=!!(s&512),a=(r&4)>0;return n!==a}return!0}return s&128&&(r&8)>0?t.names.get(e)&2?!!(s&1):!1:s&2&&(r&1)>0?!0:super.isRedeclaredInScope(t,e,s)}checkLocalExport(t){const{name:e}=t;if(this.hasImport(e))return;const s=this.scopeStack.length;for(let r=s-1;r>=0;r--){const a=this.scopeStack[r].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(t)}}const lf=(i,t)=>Object.hasOwnProperty.call(i,t)&&i[t],Nl=i=>i.type==="ParenthesizedExpression"?Nl(i.expression):i;class cf extends Xp{toAssignable(t,e=!1){var s,r;let n;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(n=Nl(t),e?n.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(b.InvalidParenthesizedAssignment,t):n.type!=="MemberExpression"&&!this.isOptionalMemberExpression(n)&&this.raise(b.InvalidParenthesizedAssignment,t):this.raise(b.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,l=t.properties.length,u=l-1;or.type!=="ObjectMethod"&&(n===s||r.type!=="SpreadElement")&&this.isAssignable(r))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(const s of t)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){const e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){const t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){const r=s&1,n=[];let a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(12),r&&this.match(12))n.push(null);else{if(this.eat(t))break;if(this.match(21)){if(n.push(this.parseAssignableListItemTypes(this.parseRestBinding(),s)),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{const o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(b.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());n.push(this.parseAssignableListItem(s,o))}}return n}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){const t=this.startNode(),{type:e,startLoc:s}=this.state;return e===21?this.parseBindingRestProperty(t):(e===138?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,s,!1,!1,!0,!1))}parseAssignableListItem(t,e){const s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s,t);const r=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),r}parseAssignableListItemTypes(t,e){return t}parseMaybeDefault(t,e){var s,r;if((s=t)!=null||(t=this.state.startLoc),e=(r=e)!=null?r:this.parseBindingAtom(),!this.eat(29))return e;const n=this.startNodeAt(t);return n.left=e,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(t,e,s){return lf({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},t)}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,{in:e,binding:s=64,checkClashes:r=!1,strictModeChanged:n=!1,hasParenthesizedAncestor:a=!1}){var o;const l=t.type;if(this.isObjectMethod(t))return;const u=this.isOptionalMemberExpression(t);if(u||l==="MemberExpression"){u&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(b.InvalidLhsOptionalChaining,t,{ancestor:e})),s!==64&&this.raise(b.InvalidPropertyBindingPattern,t);return}if(l==="Identifier"){this.checkIdentifier(t,s,n);const{name:y}=t;r&&(r.has(y)?this.raise(b.ParamDupe,t):r.add(y));return}const c=this.isValidLVal(l,!(a||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(c===!0)return;if(c===!1){const y=s===64?b.InvalidLhs:b.InvalidLhsBinding;this.raise(y,t,{ancestor:e});return}const[d,m]=Array.isArray(c)?c:[c,l==="ParenthesizedExpression"],w=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e;for(const y of[].concat(t[d]))y&&this.checkLVal(y,{in:w,binding:s,checkClashes:r,strictModeChanged:n,hasParenthesizedAncestor:m})}checkIdentifier(t,e,s=!1){this.state.strict&&(s?Al(t.name,this.inModule):Tl(t.name))&&(e===64?this.raise(b.StrictEvalArguments,t,{referenceName:t.name}):this.raise(b.StrictEvalArgumentsBinding,t,{bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(b.LetInLexicalBinding,t),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(b.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?b.RestTrailingComma:b.ElementAfterRest,this.state.startLoc),!0):!1}}const uf=(i,t)=>Object.hasOwnProperty.call(i,t)&&i[t];function hf(i){if(i==null)throw new Error(`Unexpected ${i} value.`);return i}function qa(i){if(!i)throw new Error("Assert fail")}const ie=Mt`typescript`({AbstractMethodHasImplementation:({methodName:i})=>`Method '${i}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:i})=>`Property '${i}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:i})=>`'declare' is not allowed in ${i}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:i})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:i})=>`Duplicate modifier: '${i}'.`,EmptyHeritageClauseType:({token:i})=>`'${i}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:i})=>`'${i[0]}' modifier cannot be used with '${i[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:i})=>`Index signatures cannot have an accessibility modifier ('${i}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:i})=>`'${i}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:i})=>`'${i}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:i})=>`'${i}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:i})=>`'${i[0]}' modifier must precede '${i[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:i})=>`Private elements cannot have an accessibility modifier ('${i}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:i})=>`Single type parameter ${i} should have a trailing comma. Example usage: <${i},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:i})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${i}.`});function pf(i){switch(i){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Ga(i){return i==="private"||i==="public"||i==="protected"}function ff(i){return i==="in"||i==="out"}var df=i=>class extends i{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ie.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ie.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ie.InvalidModifierOnTypeParameter})}getScopeHandler(){return of}tsIsIdentifier(){return Ee(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,s){if(!Ee(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;const r=this.state.value;if(e.indexOf(r)!==-1){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:r,errorTemplate:n=ie.InvalidModifierOnTypeMember},a){const o=(u,c,d,m)=>{c===d&&a[m]&&this.raise(ie.InvalidModifiersOrder,u,{orderedModifiers:[d,m]})},l=(u,c,d,m)=>{(a[d]&&c===m||a[m]&&c===d)&&this.raise(ie.IncompatibleModifiers,u,{modifiers:[d,m]})};for(;;){const{startLoc:u}=this.state,c=this.tsParseModifier(e.concat(s!=null?s:[]),r);if(!c)break;Ga(c)?a.accessibility?this.raise(ie.DuplicateAccessibilityModifier,u,{modifier:c}):(o(u,c,c,"override"),o(u,c,c,"static"),o(u,c,c,"readonly"),a.accessibility=c):ff(c)?(a[c]&&this.raise(ie.DuplicateModifier,u,{modifier:c}),a[c]=!0,o(u,c,"in","out")):(Object.hasOwnProperty.call(a,c)?this.raise(ie.DuplicateModifier,u,{modifier:c}):(o(u,c,"static","readonly"),o(u,c,"static","override"),o(u,c,"override","readonly"),o(u,c,"abstract","override"),l(u,c,"declare","override"),l(u,c,"static","abstract")),a[c]=!0),s!=null&&s.includes(c)&&this.raise(n,u,{modifier:c})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){const r=[];for(;!this.tsIsListTerminator(e);)r.push(s());return r}tsParseDelimitedList(e,s,r){return hf(this.tsParseDelimitedListWorker(e,s,!0,r))}tsParseDelimitedListWorker(e,s,r,n){const a=[];let o=-1;for(;!this.tsIsListTerminator(e);){o=-1;const l=s();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;r&&this.expect(12);return}return n&&(n.value=o),a}tsParseBracketedList(e,s,r,n,a){n||(r?this.expect(0):this.expect(47));const o=this.tsParseDelimitedList(e,s,a);return r?this.expect(3):this.expect(48),o}tsParseImportType(){const e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(ie.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let s=this.parseIdentifier(e);for(;this.eat(16);){const r=this.startNodeAtNode(s);r.left=s,r.right=this.parseIdentifier(e),s=this.finishNode(r,"TSQualifiedName")}return s}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){const s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){const s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();const r={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),s.params.length===0&&this.raise(ie.EmptyTypeParameters,s),r.value!==-1&&this.addExtra(s,"trailingComma",r.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){const r=e===19,n="parameters",a="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[n]=this.tsParseBindingListForSignature(),r?s[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(11,41,2);for(const s of e){const{type:r}=s;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(ie.UnsupportedSignatureParameterKind,s,{type:r})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),Ee(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);const s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);const r=e;if(this.match(10)||this.match(47)){s&&this.raise(ie.ReadonlyForMethodSignature,e);const n=r;n.kind&&this.match(47)&&this.raise(ie.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();const a="parameters",o="typeAnnotation";if(n.kind==="get")n[a].length>0&&(this.raise(b.BadGetterArity,this.state.curPosition()),this.isThisParam(n[a][0])&&this.raise(ie.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind==="set"){if(n[a].length!==1)this.raise(b.BadSetterArity,this.state.curPosition());else{const l=n[a][0];this.isThisParam(l)&&this.raise(ie.AccesorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(ie.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(ie.SetAccesorCannotHaveRestParameter,this.state.curPosition())}n[o]&&this.raise(ie.SetAccesorCannotHaveReturnType,n[o])}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}else{const n=r;s&&(n.readonly=!0);const a=this.tsTryParseTypeAnnotation();return a&&(n.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){const r=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(r,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);const s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){const e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){const e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(r=>{const{type:n}=r;s&&n!=="TSRestType"&&n!=="TSOptionalType"&&!(n==="TSNamedTupleMember"&&r.optional)&&this.raise(ie.OptionalTypeBeforeRequired,r),s||(s=n==="TSNamedTupleMember"&&r.optional||n==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const{startLoc:e}=this.state,s=this.eat(21);let r,n,a,o;const u=dt(this.state.type)?this.lookaheadCharCode():null;if(u===58)r=!0,a=!1,n=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(u===63){a=!0;const c=this.state.startLoc,d=this.state.value,m=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,n=this.createIdentifier(this.startNodeAt(c),d),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=m,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),r=this.eat(14);if(r){let c;n?(c=this.startNodeAtNode(n),c.optional=a,c.label=n,c.elementType=o,this.eat(17)&&(c.optional=!0,this.raise(ie.TupleOptionalAfterType,this.state.lastTokStartLoc))):(c=this.startNodeAtNode(o),c.optional=a,this.raise(ie.InvalidTupleMemberLabel,o),c.label=o,c.elementType=this.tsParseType()),o=this.finishNode(c,"TSNamedTupleMember")}else if(a){const c=this.startNodeAtNode(o);c.typeAnnotation=o,o=this.finishNode(c,"TSOptionalType")}if(s){const c=this.startNodeAt(e);c.typeAnnotation=o,o=this.finishNode(c,"TSRestType")}return o}tsParseParenthesizedType(){const e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){const r=this.startNode();return e==="TSConstructorType"&&(r.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,r)),this.finishNode(r,e)}tsParseLiteralTypeNode(){const e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const e=this.startNode(),s=this.lookahead();return s.type!==134&&s.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type:e}=this.state;if(Ee(e)||e===88||e===84){const s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":pf(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){const r=this.startNode();return this.next(),this.finishNode(r,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{const s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){const e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ie.UnexpectedReadonly,e)}}tsParseInferType(){const e=this.startNode();this.expectContextual(115);const s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return yp(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,r){const n=this.startNode(),a=this.eat(r),o=[];do o.push(s());while(this.eat(r));return o.length===1&&!a?o[0]:(n.types=o,this.finishNode(n,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Ee(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();const{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{const s=this.startNode();this.expect(e);const r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(r.parameterName=l,r.asserts=!0,r.typeAnnotation=null,l=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(l,r),l.asserts=!0),s.typeAnnotation=l,this.finishNode(s,"TSTypeAnnotation")}const a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,s.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);const o=this.tsParseTypeAnnotation(!1);return r.parameterName=a,r.typeAnnotation=o,r.asserts=n,s.typeAnnotation=this.finishNode(r,"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 e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;const e=this.state.containsEsc;return this.next(),!Ee(this.state.type)&&!this.match(78)?!1:(e&&this.raise(b.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){qa(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;const s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ie.ReservedTypeAssertion,this.state.startLoc);const e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const s=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{const n=this.startNode();return n.expression=this.tsParseEntityName(),this.match(47)&&(n.typeParameters=this.tsParseTypeArguments()),this.finishNode(n,"TSExpressionWithTypeArguments")});return r.length||this.raise(ie.EmptyHeritageClauseType,s,{token:e}),r}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),Ee(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(ie.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));const r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){const s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){const s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){const s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){const r=this.startNode();this.tsParseModuleOrNamespaceDeclaration(r,!0),e.body=r}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,r){e.isExport=r||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);const n=this.tsParseModuleReference();return e.importKind==="type"&&n.type!=="TSExternalModuleReference"&&this.raise(ie.ImportAliasHasImportType,n),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const s=this.state.clone(),r=e();return this.state=s,r}tsTryParseAndCatch(e){const s=this.tryParse(r=>e()||r());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){const s=this.state.clone(),r=e();if(r!==void 0&&r!==!1)return r;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,r;return this.isContextual(100)&&(s=74,r="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,r||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{const n=this.tsParseInterfaceDeclaration(e,{declare:!0});if(n)return n}default:if(Ee(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,r){switch(s.name){case"declare":{const n=this.tsTryParseDeclare(e);return n&&(n.declare=!0),n}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);const n=e;return n.global=!0,n.id=s,n.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,r)}}tsParseDeclaration(e,s,r,n){switch(s){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||Ee(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(Ee(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&Ee(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&Ee(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const r=this.tsTryParseAndCatch(()=>{const n=this.startNodeAt(e);return n.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(n),n.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),n});if(this.state.maybeInArrowParameters=s,!!r)return super.parseArrowExpression(r,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(ie.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===ve.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return gp(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){const r=this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);const a=n.accessibility,o=n.override,l=n.readonly;!(e&4)&&(a||l||o)&&this.raise(ie.UnexpectedParameterModifier,r);const u=this.parseMaybeDefault();this.parseAssignableListItemTypes(u,e);const c=this.parseMaybeDefault(u.loc.start,u);if(a||l||o){const d=this.startNodeAt(r);return s.length&&(d.decorators=s),a&&(d.accessibility=a),l&&(d.readonly=l),o&&(d.override=o),c.type!=="Identifier"&&c.type!=="AssignmentPattern"&&this.raise(ie.UnsupportedParameterPropertyKind,d),d.parameter=c,this.finishNode(d,"TSParameterProperty")}return s.length&&(u.decorators=s),c}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(ie.PatternIsOptional,s)}setArrowFunctionParameters(e,s,r){super.setArrowFunctionParameters(e,s,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const n=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):n==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ie.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(ie.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,r,n){const a=super.parseArrayLike(e,s,r,n);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,s,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(r)return n.stop=!0,e;n.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o;const l=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(e)){const m=this.tsTryParseGenericAsyncArrowFunction(s);if(m)return m}const u=this.tsParseTypeArgumentsInExpression();if(!u)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(Wi(this.state.type)){const m=super.parseTaggedTemplateExpression(e,s,n);return m.typeParameters=u,m}if(!r&&this.eat(10)){const m=this.startNodeAt(s);return m.callee=e,m.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(m.arguments),m.typeParameters=u,n.optionalChainMember&&(m.optional=a),this.finishCallExpression(m,n.optionalChainMember)}const c=this.state.type;if(c===48||c===52||c!==10&&tn(c)&&!this.hasPrecedingLineBreak())return;const d=this.startNodeAt(s);return d.expression=e,d.typeParameters=u,this.finishNode(d,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ie.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,s,r,n)}parseNewCallee(e){var s;super.parseNewCallee(e);const{callee:r}=e;r.type==="TSInstantiationExpression"&&!((s=r.extra)!=null&&s.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,s,r){let n;if(_i(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(120)))){const a=this.startNodeAt(s);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(n&&this.raise(b.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,s,r)}return super.parseExprOp(e,s,r)}checkReservedWord(e,s,r,n){this.state.isAmbientContext||super.checkReservedWord(e,s,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(ie.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){const s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,r,n){super.applyImportPhase(e,s,r,n),s?e.exportKind=r==="type"?"type":"value":e.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(Ee(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){const r=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,r);s=super.parseImportSpecifiersAndAfter(e,r)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ie.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(e,s){if(this.match(83)){this.next();let r=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?r=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,r,!0)}else if(this.eat(29)){const r=e;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(93)){const r=e;return this.expectContextual(128),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,r=!1){const{isAmbientContext:n}=this.state,a=super.parseVarStatement(e,s,r||n);if(!n)return a;for(const{id:o,init:l}of a.declarations)!l||(s!=="const"||!!o.typeAnnotation?this.raise(ie.InitializerNotAllowedInAmbientContext,l):yf(l,this.hasPlugin("estree"))||this.raise(ie.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){const r=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(r,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(r=>Ga(r)?e.accessibility===r:!!e[r])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,r){const n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ie.InvalidModifierOnTypeParameterPositions},s);const a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,n)&&this.raise(ie.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,r,!!s.static)};s.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,s,r,n){const a=this.tsTryParseIndexSignature(s);if(a){e.body.push(a),s.abstract&&this.raise(ie.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(ie.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(ie.IndexSignatureHasDeclare,s),s.override&&this.raise(ie.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(ie.NonAbstractClassHasAbstractMethod,s),s.override&&(r.hadSuperClass||this.raise(ie.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(e,s,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(ie.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(ie.ClassMethodHasDeclare,e)}parseExpressionStatement(e,s,r){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,r):void 0)||super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,r);const n=this.tryParse(()=>super.parseConditional(e,s));return n.node?(n.error&&(this.state=n.failState),n.node):(n.error&&super.setOptionalParametersError(r,n.error),e)}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){const r=this.startNodeAt(s);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));const s=this.state.startLoc,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ie.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const a=Ee(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(a,s),a.declare=!0),a):null}parseClassId(e,s,r,n){if((!s||r)&&this.isContextual(113))return;super.parseClassId(e,s,r,e.declare?1024:8331);const a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));const s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(ie.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){const{key:s}=e;this.raise(ie.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(ie.PrivateElementHasAbstract,e),e.accessibility&&this.raise(ie.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(ie.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,r,n,a,o){const l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(ie.ConstructorHasTypeParameters,l);const{declare:u=!1,kind:c}=s;u&&(c==="get"||c==="set")&&this.raise(ie.DeclareAccessor,s,{kind:c}),l&&(s.typeParameters=l),super.pushClassMethod(e,s,r,n,a,o)}pushClassPrivateMethod(e,s,r,n){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(s.typeParameters=a),super.pushClassPrivateMethod(e,s,r,n)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,r,n,a,o,l){const u=this.tsTryParseTypeParameters(this.tsParseConstModifier);return u&&(e.typeParameters=u),super.parseObjPropValue(e,s,r,n,a,o,l)}parseFunctionParams(e,s){const r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);const r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var r,n,a,o,l;let u,c,d;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(u=this.state.clone(),c=this.tryParse(()=>super.parseMaybeAssign(e,s),u),!c.error)return c.node;const{context:y}=this.state,L=y[y.length-1];(L===ve.j_oTag||L===ve.j_expr)&&y.pop()}if(!((r=c)!=null&&r.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!u||u===this.state)&&(u=this.state.clone());let m;const w=this.tryParse(y=>{var L,C;m=this.tsParseTypeParameters(this.tsParseConstModifier);const I=super.parseMaybeAssign(e,s);return(I.type!=="ArrowFunctionExpression"||(L=I.extra)!=null&&L.parenthesized)&&y(),((C=m)==null?void 0:C.params.length)!==0&&this.resetStartLocationFromNode(I,m),I.typeParameters=m,I},u);if(!w.error&&!w.aborted)return m&&this.reportReservedArrowTypeParam(m),w.node;if(!c&&(qa(!this.hasPlugin("jsx")),d=this.tryParse(()=>super.parseMaybeAssign(e,s),u),!d.error))return d.node;if((n=c)!=null&&n.node)return this.state=c.failState,c.node;if(w.node)return this.state=w.failState,m&&this.reportReservedArrowTypeParam(m),w.node;if((a=d)!=null&&a.node)return this.state=d.failState,d.node;throw((o=c)==null?void 0:o.error)||w.error||((l=d)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ie.ReservedArrowTypeParam,e)}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){const s=this.tryParse(r=>{const n=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&r(),n});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,s){if(!(s&2))return e;this.eat(17)&&(e.optional=!0);const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(ie.UnexpectedTypeCastInParameter,e):this.raise(ie.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,r){return uf({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(r!==64||!s)&&["expression",!0],TSSatisfiesExpression:(r!==64||!s)&&["expression",!0],TSTypeAssertion:(r!==64||!s)&&["expression",!0]},e)||super.isValidLVal(e,s,r)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){const s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=s,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){const r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.startthis.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){const s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const s=super.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e)[0];return n&&this.isThisParam(n)?s+1:s}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){const s=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=s}}parseClass(e,s,r){const n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(ie.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,r,n,a,o,l){const u=super.parseMethod(e,s,r,n,a,o,l);if(u.abstract&&(this.hasPlugin("estree")?!!u.value.body:!!u.body)){const{key:d}=u;this.raise(ie.AbstractMethodHasImplementation,u,{methodName:d.type==="Identifier"&&!u.computed?d.name:`[${this.input.slice(d.start,d.end)}]`})}return u}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,r,n){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,r,n))}parseImportSpecifier(e,s,r,n,a){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,r,n,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,r){const n=s?"imported":"local",a=s?"local":"exported";let o=e[n],l,u=!1,c=!0;const d=o.loc.start;if(this.isContextual(93)){const w=this.parseIdentifier();if(this.isContextual(93)){const y=this.parseIdentifier();dt(this.state.type)?(u=!0,o=w,l=s?this.parseIdentifier():this.parseModuleExportName(),c=!1):(l=y,c=!1)}else dt(this.state.type)?(c=!1,l=s?this.parseIdentifier():this.parseModuleExportName()):(u=!0,o=w)}else dt(this.state.type)&&(u=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());u&&r&&this.raise(s?ie.TypeModifierIsUsedInTypeImports:ie.TypeModifierIsUsedInTypeExports,d),e[n]=o,e[a]=l;const m=s?"importKind":"exportKind";e[m]=u?"type":"value",c&&this.eatContextual(93)&&(e[a]=s?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=Ft(e[n])),s&&this.checkIdentifier(e[a],u?4098:4096)}};function mf(i){if(i.type!=="MemberExpression")return!1;const{computed:t,property:e}=i;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:Ll(i.object)}function yf(i,t){var e;const{type:s}=i;if((e=i.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){const{value:r}=i;if(typeof r=="string"||typeof r=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(kl(i,t)||gf(i,t)||s==="TemplateLiteral"&&i.expressions.length===0||mf(i))}function kl(i,t){return t?i.type==="Literal"&&(typeof i.value=="number"||"bigint"in i):i.type==="NumericLiteral"||i.type==="BigIntLiteral"}function gf(i,t){if(i.type==="UnaryExpression"){const{operator:e,argument:s}=i;if(e==="-"&&kl(s,t))return!0}return!1}function Ll(i){return i.type==="Identifier"?!0:i.type!=="MemberExpression"||i.computed?!1:Ll(i.object)}const Ja=Mt`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});var xf=i=>class extends i{parsePlaceholder(e){if(this.match(144)){const s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){const r=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=s,r?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,r,n){e!==void 0&&super.checkReservedWord(e,s,r,n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,r){return e==="Placeholder"||super.isValidLVal(e,s,r)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var r;if(s.type!=="Placeholder"||(r=s.extra)!=null&&r.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){const n=e;return n.label=this.finishPlaceholder(s,"Identifier"),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,"LabeledStatement")}return this.semicolon(),e.name=s.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,s,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,r){const n=s?"ClassDeclaration":"ClassExpression";this.next();const a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(r||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,n);throw this.raise(Ja.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,s,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,n)}parseExport(e,s){const r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,s);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const n=this.startNode();return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(e,s)}isExportDefaultSpecifier(){if(this.match(65)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(Qt(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var r;return(r=e.specifiers)!=null&&r.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){const{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(r=>r.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){const s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const r=this.startNodeAtNode(s);return r.local=s,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(Ja.UnexpectedSpace,this.state.lastTokEndLoc)}},bf=i=>class extends i{parseV8Intrinsic(){if(this.match(54)){const e=this.state.startLoc,s=this.startNode();if(this.next(),Ee(this.state.type)){const r=this.parseIdentifierName(),n=this.createIdentifier(s,r);if(n.type="V8IntrinsicIdentifier",this.match(10))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function Fe(i,t){const[e,s]=typeof t=="string"?[t,{}]:t,r=Object.keys(s),n=r.length===0;return i.some(a=>{if(typeof a=="string")return n&&a===e;{const[o,l]=a;if(o!==e)return!1;for(const u of r)if(l[u]!==s[u])return!1;return!0}})}function Vt(i,t,e){const s=i.find(r=>Array.isArray(r)?r[0]===t:r===t);return s&&Array.isArray(s)&&s.length>1?s[1][e]:null}const Xa=["minimal","fsharp","hack","smart"],Ya=["^^","@@","^","%","#"],Za=["hash","bar"];function Pf(i){if(Fe(i,"decorators")){if(Fe(i,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const t=Vt(i,"decorators","decoratorsBeforeExport");if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const e=Vt(i,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(Fe(i,"flow")&&Fe(i,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Fe(i,"placeholders")&&Fe(i,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Fe(i,"pipelineOperator")){const t=Vt(i,"pipelineOperator","proposal");if(!Xa.includes(t)){const s=Xa.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}const e=Fe(i,["recordAndTuple",{syntaxType:"hash"}]);if(t==="hack"){if(Fe(i,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Fe(i,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const s=Vt(i,"pipelineOperator","topicToken");if(!Ya.includes(s)){const r=Ya.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${r}.`)}if(s==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(t==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(Fe(i,"moduleAttributes")){if(Fe(i,"importAssertions")||Fe(i,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(Vt(i,"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(Fe(i,"importAssertions")&&Fe(i,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Fe(i,"recordAndTuple")&&Vt(i,"recordAndTuple","syntaxType")!=null&&!Za.includes(Vt(i,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Za.map(t=>`'${t}'`).join(", "));if(Fe(i,"asyncDoExpressions")&&!Fe(i,"doExpressions")){const t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(Fe(i,"optionalChainingAssign")&&Vt(i,"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 Ml={estree:ap,jsx:nf,flow:sf,typescript:df,v8intrinsic:bf,placeholders:xf},Tf=Object.keys(Ml),_r={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function Af(i){if(i==null)return Object.assign({},_r);if(i.annexB!=null&&i.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");const t={};for(const s of Object.keys(_r)){var e;t[s]=(e=i[s])!=null?e:_r[s]}return t}class wf extends cf{checkProto(t,e,s,r){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;const n=t.key;if((n.type==="Identifier"?n.name:n.value)==="__proto__"){if(e){this.raise(b.RecordNoProto,n);return}s.used&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=n.loc.start):this.raise(b.DuplicateProto,n)),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();const t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){const e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){const r=this.startNodeAt(e);for(r.expressions=[s];this.eat(12);)r.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){const s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let r;t?r=!1:(t=new Fi,r=!0);const{type:n}=this.state;(n===10||Ee(n))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(t);if(e&&(a=e.call(this,a,s)),hp(this.state.type)){const o=this.startNodeAt(s),l=this.state.value;if(o.operator=l,this.match(29)){this.toAssignable(a,!0),o.left=a;const u=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=u&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=u&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=u&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,{in:this.finishNode(o,"AssignmentExpression")}),o}else r&&this.checkExpressionErrors(t,!0);return a}parseMaybeConditional(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprOps(t);return this.shouldExitDescending(r,s)?r:this.parseConditional(r,e,t)}parseConditional(t,e,s){if(this.eat(17)){const r=this.startNodeAt(e);return r.test=t,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(r,s)?r:this.parseExprOp(r,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){const n=this.getPrivateNameSV(t);(s>=_i(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(b.PrivateInExpectedIn,t,{identifierName:n}),this.classScope.usePrivateName(n,t.loc.start)}const r=this.state.type;if(fp(r)&&(this.prodParam.hasIn||!this.match(58))){let n=_i(r);if(n>s){if(r===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}const a=this.startNodeAt(e);a.left=t,a.operator=this.state.value;const o=r===41||r===42,l=r===40;if(l&&(n=_i(42)),this.next(),r===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(b.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(r,n);const u=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(l&&(c===41||c===42)||o&&c===40)throw this.raise(b.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(u,e,s)}}return t}parseExprOpRightExpr(t,e){const s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(b.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,xp(t)?e-1:e)}parseHackPipeBody(){var t;const{startLoc:e}=this.state,s=this.parseMaybeAssign();return ep.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(b.PipeUnparenthesizedBody,e,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipeTopicUnused,e),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(b.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){const s=this.state.startLoc,r=this.isContextual(96);if(r&&this.isAwaitAllowed()){this.next();const l=this.parseAwait(s);return e||this.checkExponentialAfterUnary(l),l}const n=this.match(34),a=this.startNode();if(mp(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&l){const u=a.argument;u.type==="Identifier"?this.raise(b.StrictDelete,a):this.hasPropertyAsPrivateName(u)&&this.raise(b.DeletePrivateField,a)}if(!n)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}const o=this.parseUpdate(a,n,t);if(r){const{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?tn(l):tn(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(b.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){const a=t;return this.checkLVal(a.argument,{in:this.finishNode(a,"UpdateExpression")}),t}const r=this.state.startLoc;let n=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return n;for(;dp(this.state.type)&&!this.canInsertSemicolon();){const a=this.startNodeAt(r);a.operator=this.state.value,a.prefix=!1,a.argument=n,this.next(),this.checkLVal(n,{in:n=this.finishNode(a,"UpdateExpression")})}return n}parseExprSubscripts(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprAtom(t);return this.shouldExitDescending(r,s)?r:this.parseSubscripts(r,e)}parseSubscripts(t,e,s){const r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,r),r.maybeAsyncArrow=!1;while(!r.stop);return t}parseSubscript(t,e,s,r){const{type:n}=this.state;if(!s&&n===15)return this.parseBind(t,e,s,r);if(Wi(n))return this.parseTaggedTemplateExpression(t,e,r);let a=!1;if(n===18){if(s&&(this.raise(b.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return r.stop=!0,t;r.optionalChainMember=a=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,r,a);{const o=this.eat(0);return o||a||this.eat(16)?this.parseMember(t,e,r,o,a):(r.stop=!0,t)}}parseMember(t,e,s,r,n){const a=this.startNodeAt(e);return a.object=t,a.computed=r,r?(a.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(b.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),s.optionalChainMember?(a.optional=n,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,r){const n=this.startNodeAt(e);return n.object=t,this.next(),n.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(n,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,r){const n=this.state.maybeInArrowParameters;let a=null;this.state.maybeInArrowParameters=!0,this.next();const o=this.startNodeAt(e);o.callee=t;const{maybeAsyncArrow:l,optionalChainMember:u}=s;l&&(this.expressionScope.enter(Kp()),a=new Fi),u&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,a);let c=this.finishCallExpression(o,u);return l&&this.shouldParseAsyncArrow()&&!r?(s.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),c)):(l&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(c)),this.state.maybeInArrowParameters=n,c}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){const r=this.startNodeAt(e);return r.tag=t,r.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(b.OptionalChainingNoTemplate,e),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),t.arguments.length===0||t.arguments.length>2)this.raise(b.ImportCallArity,t,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(const s of t.arguments)s.type==="SpreadElement"&&this.raise(b.ImportCallSpreadArgument,s);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,r,n){const a=[];let o=!0;const l=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(b.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),r&&this.addTrailingCommaExtraToNode(r),this.next();break}a.push(this.parseExprListItem(!1,n,s))}return this.state.inFSharpPipelineDirectBody=l,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&ai(t,e.innerComments),e.callee.trailingComments&&ai(t,e.callee.trailingComments),t}parseNoCallExpr(){const t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null;const{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(b.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{const n=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(n)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;const n=e.callee=this.parseNoCallExpr();if(n.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(b.UnsupportedBind,n)}case 138:return this.raise(b.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 n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.parseTopicReference(n);this.unexpected();break}case 47:{const n=this.input.codePointAt(this.nextTokenStart());kt(n)||n===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(Ee(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();const n=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){const{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(Ee(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return n&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=Ze(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){const e=this.startNode(),s=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(e,s,t,r)}finishTopicReference(t,e,s,r){if(this.testTopicReferenceConfiguration(s,e,r)){const n=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?b.PrimaryTopicNotAllowed:b.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,n)}else throw this.raise(b.PipeTopicUnconfiguredToken,e,{token:Qt(r)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Qt(s)}]);case"smart":return s===27;default:throw this.raise(b.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Di(!0,this.prodParam.hasYield));const e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(b.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();const s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(b.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(b.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(b.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){const t=this.startNode(),e=this.startNodeAt(Ze(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;const r=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||r)&&this.raise(b.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(b.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){const s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(b.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){const s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){const e=this.parseLiteral(t.value,"RegExpLiteral");return e.pattern=t.pattern,e.flags=t.flags,e}parseBooleanLiteral(t){const e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){const t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){const e=this.state.startLoc;let s;this.next(),this.expressionScope.enter(zp());const r=this.state.maybeInArrowParameters,n=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const a=this.state.startLoc,o=[],l=new Fi;let u=!0,c,d;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){d=this.state.startLoc;break}if(this.match(21)){const y=this.state.startLoc;if(c=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),y)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}const m=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=n;let w=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(w=this.parseArrow(w))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(w,o,!1),w):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),d&&this.unexpected(d),c&&this.unexpected(c),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(a),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,m)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;const s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(b.UnexpectedNewTarget,s),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){const e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){const e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(b.ImportCallNotNewExpression,s)}parseTemplateElement(t){const{start:e,startLoc:s,end:r,value:n}=this.state,a=e+1,o=this.startNodeAt(Ze(s,1));n===null&&(t||this.raise(b.InvalidEscapeSequenceTemplate,Ze(this.state.firstInvalidTemplateEscapePos,1)));const l=this.match(24),u=l?-1:-2,c=r+u;o.value={raw:this.input.slice(a,c).replace(/\r\n?/g,` -`),cooked:n===null?null:n.slice(1,u)},o.tail=l,this.next();const d=this.finishNode(o,"TemplateElement");return this.resetEndLocation(d,Ze(this.state.lastTokEndLoc,u)),d}parseTemplate(t){const e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let o=!0;const l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let c;e?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(r),this.checkProto(c,s,a,r)),s&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(b.InvalidRecordProperty,c),c.shorthand&&this.addExtra(c,"shorthand",!0),l.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=n;let u="ObjectExpression";return e?u="ObjectPattern":s&&(u="RecordExpression"),this.finishNode(l,u)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(b.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());const s=this.startNode();let r=!1,n=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);const l=this.state.containsEsc,u=this.parsePropertyName(s,t);if(!o&&!l&&this.maybeAsyncOrAccessorProp(s)){const c=u.name;c==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(u),o=this.eat(55),this.parsePropertyName(s)),(c==="get"||c==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(u),s.kind=c,this.match(55)&&(o=!0,this.raise(b.AccessorIsGenerator,this.state.curPosition(),{kind:c}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,a,o,r,!1,n,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const s=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==s&&this.raise(t.kind==="get"?b.BadGetterArity:b.BadSetterArity,t),t.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(b.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,r,n){if(n){const a=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(s||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,r){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,Ft(t.key));else if(this.match(29)){const n=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n):this.raise(b.InvalidCoverInitializedName,n),t.value=this.parseMaybeDefault(e,Ft(t.key))}else t.value=Ft(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,r,n,a,o){const l=this.parseObjectMethod(t,s,r,n,a)||this.parseObjectProperty(t,e,n,o);return l||this.unexpected(),l}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:s,value:r}=this.state;let n;if(dt(s))n=this.parseIdentifier(!0);else switch(s){case 134:n=this.parseNumericLiteral(r);break;case 133:n=this.parseStringLiteral(r);break;case 135:n=this.parseBigIntLiteral(r);break;case 136:n=this.parseDecimalLiteral(r);break;case 138:{const a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(b.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:this.unexpected()}t.key=n,s!==138&&(t.computed=!1)}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,r,n,a,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(n?32:0)),this.prodParam.enter(Di(s,t.generator)),this.parseFunctionParams(t,r);const l=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,r,a),this.state.inFSharpPipelineDirectBody=n,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,r){this.scope.enter(6);let n=Di(s,!1);!this.match(5)&&this.prodParam.hasIn&&(n|=8),this.prodParam.enter(n),this.initFunction(t,s);const a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){const r=e&&!this.match(5);if(this.expressionScope.enter(Il()),r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{const l=!this.isSimpleParamList(t.params);o&&l&&this.raise(b.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&!!t.key?t.key.loc.end:t);const u=!n&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!l,e,u),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,u)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e10||!Ip(t))return;if(s&&Ep(t)){this.raise(b.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?r?Al:Pl:bl)(t,this.inModule)){this.raise(b.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(b.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(b.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(b.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(b.ArgumentsInClass,e);return}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(t){const e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(b.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(b.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:t}=this.state;return t===53||t===10||t===0||Wi(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){const t=this.startNode();this.expressionScope.recordParameterInitializerError(b.YieldInParameter,t),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(b.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){const s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{const s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(b.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipelineTopicUnused,t)}withTopicBindingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){const e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const e=this.startNodeAt(this.state.endLoc);this.next();const s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}}const Or={kind:1},Sf={kind:2},Ef=/[\uD800-\uDFFF]/u,Dr=/in(?:stanceof)?/y;function Cf(i,t){for(let e=0;e0)for(const[n,a]of Array.from(this.scope.undefinedExports))this.raise(b.ModuleExportUndefined,a,{localName:n});let r;return e===139?r=this.finishNode(t,"Program"):r=this.finishNodeAt(t,"Program",Ze(this.state.startLoc,-1)),r}stmtToDirective(t){const e=t;e.type="Directive",e.value=e.expression,delete e.expression;const s=e.value,r=s.value,n=this.input.slice(s.start,s.end),a=s.value=n.slice(1,-1);return this.addExtra(s,"raw",n),this.addExtra(s,"rawValue",a),this.addExtra(s,"expressionValue",r),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(kt(t)){if(Dr.lastIndex=e,Dr.test(this.input)){const s=this.codePointAtPos(Dr.lastIndex);if(!Ns(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){const t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifier(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){const{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(Ee(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);const e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){const s=this.state.type,r=this.startNode(),n=!!(t&2),a=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?b.StrictFunction:this.options.annexB?b.SloppyFunctionAnnexB:b.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!n&&a);case 80:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?n||this.raise(b.UnexpectedLexicalDeclaration,r):this.raise(b.AwaitUsingNotInAsyncContext,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(b.UnexpectedUsingDeclaration,this.state.startLoc):n||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;const c=this.nextTokenStart(),d=this.codePointAtPos(c);if(d!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(d,c)&&d!==123))break}case 75:n||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const c=this.state.value;return this.parseVarStatement(r,c)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{const c=this.lookaheadCharCode();if(c===40||c===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(b.UnexpectedImportExport,this.state.startLoc),this.next();let c;return s===83?(c=this.parseImport(r),c.type==="ImportDeclaration"&&(!c.importKind||c.importKind==="value")&&(this.sawUnambiguousESM=!0)):(c=this.parseExport(r,e),(c.type==="ExportNamedDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportAllDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(c),c}default:if(this.isAsyncFunction())return n||this.raise(b.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!n&&a)}const l=this.state.value,u=this.parseExpression();return Ee(s)&&u.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,l,u,t):this.parseExpressionStatement(r,u,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(b.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(b.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){const e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(b.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(b.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){const e=this.state.startLoc;let s;if(this.match(10)){const r=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(r,s);const n=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(b.DecoratorArgumentsOutsideParentheses,n)}else{for(s=this.parseIdentifier(!1);this.eat(16);){const r=this.startNodeAt(e);r.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,s=this.finishNode(r,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;sthis.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(Or);let e=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(e=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);const s=this.isContextual(100);{const l=this.isContextual(96)&&this.startsAwaitUsing(),u=l||this.isContextual(107)&&this.startsUsingForOf(),c=s&&this.hasFollowingBindingAtom()||u;if(this.match(74)||this.match(75)||c){const d=this.startNode();let m;l?(m="await using",this.isAwaitAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):m=this.state.value,this.next(),this.parseVar(d,!0,m);const w=this.finishNode(d,"VariableDeclaration"),y=this.match(58);return y&&u&&this.raise(b.ForInUsing,w),(y||this.isContextual(102))&&w.declarations.length===1?this.parseForIn(t,w,e):(e!==null&&this.unexpected(e),this.parseFor(t,w))}}const r=this.isContextual(95),n=new Fi,a=this.parseExpression(!0,n),o=this.isContextual(102);if(o&&(s&&this.raise(b.ForOfLet,a),e===null&&r&&a.type==="Identifier"&&this.raise(b.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);const l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{in:{type:l}}),this.parseForIn(t,a,e)}else this.checkExpressionErrors(n,!0);return e!==null&&this.unexpected(e),this.parseFor(t,a)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(b.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];this.expect(5),this.state.labels.push(Sf),this.scope.enter(0);let s;for(let r;!this.match(8);)if(this.match(61)||this.match(65)){const n=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),n?s.test=this.parseExpression():(r&&this.raise(b.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(b.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{in:{type:"CatchClause"},binding:9}),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){const e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(b.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Or),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(b.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,r){for(const a of this.state.labels)a.name===e&&this.raise(b.LabelRedeclaration,s,{labelName:e});const n=pp(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){const o=this.state.labels[a];if(o.statementStart===t.start)o.statementStart=this.state.start,o.kind=n;else break}return this.state.labels.push({name:e,kind:n,statementStart:this.state.start}),t.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){const r=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,t,!1,8,s),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,r,n){const a=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,s,r,n)}parseBlockOrModuleBlockBody(t,e,s,r,n){const a=this.state.strict;let o=!1,l=!1;for(;!this.match(r);){const u=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(u)){const c=this.stmtToDirective(u);e.push(c),!o&&c.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}t.push(u)}n==null||n.call(this,o),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){const r=this.match(58);return this.next(),r?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(b.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(b.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,r=!1){const n=t.declarations=[];for(t.kind=s;;){const a=this.startNode();if(this.parseVarId(a,s),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):s==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"const"})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){const s=this.parseBindingAtom();this.checkLVal(s,{in:{type:"VariableDeclarator"},binding:e==="var"?5:8201}),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){const s=e&2,r=!!(e&1),n=r&&!(e&4),a=!!(e&8);this.initFunction(t,a),this.match(55)&&(s&&this.raise(b.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),r&&(t.id=this.parseFunctionId(n));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Di(a,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||Ee(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(Vp()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){!t.id||this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();const r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,r),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(t){return!t.computed&&!t.static&&(t.key.name==="constructor"||t.key.value==="constructor")}parseClassBody(t,e){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:t};let r=[];const n=this.startNode();if(n.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(b.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}const a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(n,a,s),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(b.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),r.length)throw this.raise(b.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(t,e){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const r=e;return r.kind="method",r.computed=!1,r.key=s,r.static=!1,this.pushClassMethod(t,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const r=e;return r.computed=!1,r.key=s,r.static=!1,t.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){const r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,r)}parseClassMemberWithIsStatic(t,e,s,r){const n=e,a=e,o=e,l=e,u=e,c=n,d=n;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){c.kind="method";const C=this.match(138);if(this.parseClassElementName(c),C){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsGenerator,n.key),this.pushClassMethod(t,n,!0,!1,!1,!1);return}const m=Ee(this.state.type)&&!this.state.containsEsc,w=this.match(138),y=this.parseClassElementName(e),L=this.state.startLoc;if(this.parsePostMemberNameModifiers(d),this.isClassMethod()){if(c.kind="method",w){this.pushClassPrivateMethod(t,a,!1,!1);return}const C=this.isNonstaticConstructor(n);let I=!1;C&&(n.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(b.DuplicateConstructor,y),C&&this.hasPlugin("typescript")&&e.override&&this.raise(b.OverrideOnConstructor,y),s.hadConstructor=!0,I=s.hadSuperClass),this.pushClassMethod(t,n,!1,!1,C,I)}else if(this.isClassProperty())w?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(m&&y.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(y);const C=this.eat(55);d.optional&&this.unexpected(L),c.kind="method";const I=this.match(138);this.parseClassElementName(c),this.parsePostMemberNameModifiers(d),I?this.pushClassPrivateMethod(t,a,C,!0):(this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsAsync,n.key),this.pushClassMethod(t,n,C,!0,!1,!1))}else if(m&&(y.name==="get"||y.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(y),c.kind=y.name;const C=this.match(138);this.parseClassElementName(n),C?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsAccessor,n.key),this.pushClassMethod(t,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(m&&y.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(y);const C=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,u,C)}else this.isLineTerminator()?w?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){const{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(b.StaticPrototype,this.state.startLoc),e===138){s==="constructor"&&this.raise(b.ConstructorClassPrivateField,this.state.startLoc);const r=this.parsePrivateName();return t.key=r,r}return this.parsePropertyName(t)}parseClassStaticBlock(t,e){var s;this.scope.enter(208);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const n=e.body=[];this.parseBlockOrModuleBlockBody(n,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(b.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&(e.key.name==="constructor"||e.key.value==="constructor")&&this.raise(b.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){if(!s&&!e.computed){const n=e.key;(n.name==="constructor"||n.value==="constructor")&&this.raise(b.ConstructorClassField,n)}const r=this.parseClassAccessorProperty(e);t.body.push(r),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(t,e,s,r,n,a){t.body.push(this.parseMethod(e,s,r,n,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,r){const n=this.parseMethod(e,s,r,!1,!1,"ClassPrivateMethod",!0);t.body.push(n);const a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(Il()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,r=8331){if(Ee(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,r);else if(s||!e)t.id=null;else throw this.raise(b.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){const s=this.parseMaybeImportPhase(t,!0),r=this.maybeParseExportDefaultSpecifier(t,s),n=!r||this.eat(12),a=n&&this.eatExportStar(t),o=a&&this.maybeParseExportNamespaceSpecifier(t),l=n&&(!o||this.eat(12)),u=r||a;if(a&&!o){if(r&&this.unexpected(),e)throw this.raise(b.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}const c=this.maybeParseExportNamedSpecifiers(t);r&&n&&!a&&!c&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let d;if(u||c){if(d=!1,e)throw this.raise(b.UnsupportedDecoratorExport,t);this.parseExportFrom(t,u)}else d=this.maybeParseExportDeclaration(t);if(u||c||d){var m;const w=t;if(this.checkExport(w,!0,!1,!!w.source),((m=w.declaration)==null?void 0:m.type)==="ClassDeclaration")this.maybeTakeDecorators(e,w.declaration,w);else if(e)throw this.raise(b.UnsupportedDecoratorExport,t);return this.finishNode(w,"ExportNamedDeclaration")}if(this.eat(65)){const w=t,y=this.parseExportDefaultExpression();if(w.declaration=y,y.type==="ClassDeclaration")this.maybeTakeDecorators(e,y,w);else if(e)throw this.raise(b.UnsupportedDecoratorExport,t);return this.checkExport(w,!0,!0),this.finishNode(w,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0:e.loc.start);const s=e||this.parseIdentifier(!0),r=this.startNodeAtNode(s);return r.exported=s,t.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){t.specifiers||(t.specifiers=[]);const e=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){t.specifiers||(t.specifiers=[]);const e=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(e)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.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(b.UnsupportedDefaultExport,this.state.startLoc);const e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:t}=this.state;if(Ee(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){const{type:r}=this.lookahead();if(Ee(r)&&r!==98||r===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||Ee(this.state.type)&&s)return!0;if(this.match(65)&&s){const r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,r){if(e){var n;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var a;const o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(b.ExportDefaultFromAsIdentifier,o)}}else if((n=t.specifiers)!=null&&n.length)for(const o of t.specifiers){const{exported:l}=o,u=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,u),!r&&o.local){const{local:c}=o;c.type!=="Identifier"?this.raise(b.ExportBindingIsString,o,{localName:c.value,exportName:u}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(t.declaration){if(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"){const o=t.declaration.id;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(t,o.name)}else if(t.declaration.type==="VariableDeclaration")for(const o of t.declaration.declarations)this.checkDeclaration(o.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(const e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(const e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(b.DuplicateDefaultExport,t):this.raise(b.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){const e=[];let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;const r=this.isContextual(130),n=this.match(133),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,n,t,r))}return e}parseExportSpecifier(t,e,s,r){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=Jp(t.local):t.exported||(t.exported=Ft(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){const t=this.parseStringLiteral(this.state.value),e=t.value.match(Ef);return e&&this.raise(b.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){const{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(b.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(b.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var r;s!=="ImportDefaultSpecifier"&&this.raise(b.ImportReflectionNotBinding,e[0].loc.start),((r=t.assertions)==null?void 0:r.length)>0&&this.raise(b.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){const{specifiers:e}=t;if(e!=null){const s=e.find(r=>{let n;if(r.type==="ExportSpecifier"?n=r.local:r.type==="ImportSpecifier"&&(n=r.imported),n!==void 0)return n.type==="Identifier"?n.name!=="default":n.value!=="default"});s!==void 0&&this.raise(b.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,r){e||(s==="module"?(this.expectPlugin("importReflection",r),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",r),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",r),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;const s=this.parseIdentifier(!0),{type:r}=this.state;return(dt(r)?r!==98||this.lookaheadCharCode()===102:r!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){const{type:e}=this.state;return Ee(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];const r=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(t);return r&&!n&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{in:{type:e},binding:s}),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);const t=[],e=new Set;do{if(this.match(8))break;const s=this.startNode(),r=this.state.value;if(e.has(r)&&this.raise(b.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(133)?s.key=this.parseStringLiteral(r):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){const t=[],e=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(b.ModuleAttributeDifferentFromType,s.key),e.has(s.key.name)&&this.raise(b.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e,s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(b.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){const s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(dt(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){const e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(b.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const s=this.startNode(),r=this.match(133),n=this.isContextual(130);s.imported=this.parseModuleExportName();const a=this.parseImportSpecifier(s,r,t.importKind==="type"||t.importKind==="typeof",n,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,e,s,r,n){if(this.eatContextual(93))t.local=this.parseIdentifier();else{const{imported:a}=t;if(e)throw this.raise(b.ImportBindingIsString,t,{importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=Ft(a))}return this.finishImportSpecifier(t,"ImportSpecifier",n)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}}class _l extends vf{constructor(t,e){t=Af(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=If(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return Rn}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}}function If(i){const t=new Map;for(const e of i){const[s,r]=Array.isArray(e)?e:[e,{}];t.has(s)||t.set(s,r||{})}return t}function Nf(i,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";const s=Ws(t,i),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",Ws(t,i).parse()}catch{}else r.program.sourceType="script";return r}catch(s){try{return t.sourceType="script",Ws(t,i).parse()}catch{}throw s}}else return Ws(t,i).parse()}function kf(i,t){const e=Ws(t,i);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Lf(i){const t={};for(const e of Object.keys(i))t[e]=vt(i[e]);return t}const Mf=Lf(lp);function Ws(i,t){let e=_l;return i!=null&&i.plugins&&(Pf(i.plugins),e=_f(i.plugins)),new e(i,t)}const Qa={};function _f(i){const t=Tf.filter(r=>Fe(i,r)),e=t.join("/");let s=Qa[e];if(!s){s=_l;for(const r of t)s=Ml[r](s);Qa[e]=s}return s}var Of=ur.parse=Nf;ur.parseExpression=kf;ur.tokTypes=Mf;var pi={},is={},ut={};Object.defineProperty(ut,"__esModule",{value:!0});function Ol(i){return{type:"concat",parts:i}}ut.concat=Ol;function Df(i,t){const e=[];return t.forEach((s,r)=>{r>0&&e.push(i),e.push(s)}),Ol(e)}ut.join=Df;ut.line={type:"line",hard:!1,soft:!1};ut.hardline={type:"line",hard:!0,soft:!1};ut.softline={type:"line",hard:!1,soft:!0};function Ff(i){return{type:"indent",content:i}}ut.indent=Ff;function $f(i){return{type:"lineSuffix",content:i}}ut.lineSuffix=$f;function Bf(i,t=!1){return{type:"group",content:i,willBreak:t}}ut.group=Bf;ut.breakParent={type:"breakParent"};function Rf(i){return typeof i=="string"&&i.length===0}ut.isEmpty=Rf;var Ve={};Object.defineProperty(Ve,"__esModule",{value:!0});function jf(i){return i.range[0]}Ve.locStart=jf;function Uf(i){return i.range[1]}Ve.locEnd=Uf;function Hf(i){if(!i||typeof i.type!="string")return!1;switch(i.type){case"LabelStatement":case"BreakStatement":case"GotoStatement":case"ReturnStatement":case"IfStatement":case"IfClause":case"ElseifClause":case"ElseClause":case"WhileStatement":case"DoStatement":case"RepeatStatement":case"LocalStatement":case"AssignmentStatement":case"CallStatement":case"FunctionDeclaration":case"ForNumericStatement":case"ForGenericStatement":case"Chunk":case"Identifier":case"BooleanLiteral":case"NilLiteral":case"NumericLiteral":case"StringLiteral":case"VarargLiteral":case"TableKey":case"TableKeyString":case"TableValue":case"TableConstructorExpression":case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"MemberExpression":case"IndexExpression":case"CallExpression":case"TableCallExpression":case"StringCallExpression":case"Comment":return!0;default:return!1}}Ve.isNode=Hf;function Hn(i,t,e,s={}){let r=0;return e.forEach(n=>{if((s.searchBackwards?i.substring(t-n.length,t):i.substring(t,t+n.length))===n){r=n.length;return}}),t+(s.searchBackwards?-r:r)}Ve.skipOnce=Hn;function Vn(i,t,e,s={}){let r=null;for(;r!==t;)r=t,t=Hn(i,t,e,s);return t}Ve.skipMany=Vn;function oi(i,t,e={}){return Hn(i,t,[` +`):r=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let s="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(b.UnterminatedString,this.state.startLoc);const n=this.input.charCodeAt(this.state.pos);if(n===e)break;n===38?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadEntity(),r=this.state.pos):Zs(n)?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}s+=this.input.slice(r,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){const e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);const r=this.readInt(s,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let s=0,r=!1;for(;s++<10&&this.state.pos1){for(let r=0;r0){if(s&256){const n=!!(s&512),a=(r&4)>0;return n!==a}return!0}return s&128&&(r&8)>0?t.names.get(e)&2?!!(s&1):!1:s&2&&(r&1)>0?!0:super.isRedeclaredInScope(t,e,s)}checkLocalExport(t){const{name:e}=t;if(this.hasImport(e))return;const s=this.scopeStack.length;for(let r=s-1;r>=0;r--){const a=this.scopeStack[r].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(t)}}const lf=(i,t)=>Object.hasOwnProperty.call(i,t)&&i[t],Nl=i=>i.type==="ParenthesizedExpression"?Nl(i.expression):i;class cf extends Xp{toAssignable(t,e=!1){var s,r;let n;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(n=Nl(t),e?n.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(b.InvalidParenthesizedAssignment,t):n.type!=="MemberExpression"&&!this.isOptionalMemberExpression(n)&&this.raise(b.InvalidParenthesizedAssignment,t):this.raise(b.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,l=t.properties.length,u=l-1;or.type!=="ObjectMethod"&&(n===s||r.type!=="SpreadElement")&&this.isAssignable(r))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(const s of t)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){const e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){const t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){const r=s&1,n=[];let a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(12),r&&this.match(12))n.push(null);else{if(this.eat(t))break;if(this.match(21)){if(n.push(this.parseAssignableListItemTypes(this.parseRestBinding(),s)),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{const o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(b.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());n.push(this.parseAssignableListItem(s,o))}}return n}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){const t=this.startNode(),{type:e,startLoc:s}=this.state;return e===21?this.parseBindingRestProperty(t):(e===138?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,s,!1,!1,!0,!1))}parseAssignableListItem(t,e){const s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s,t);const r=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),r}parseAssignableListItemTypes(t,e){return t}parseMaybeDefault(t,e){var s,r;if((s=t)!=null||(t=this.state.startLoc),e=(r=e)!=null?r:this.parseBindingAtom(),!this.eat(29))return e;const n=this.startNodeAt(t);return n.left=e,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(t,e,s){return lf({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},t)}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,{in:e,binding:s=64,checkClashes:r=!1,strictModeChanged:n=!1,hasParenthesizedAncestor:a=!1}){var o;const l=t.type;if(this.isObjectMethod(t))return;const u=this.isOptionalMemberExpression(t);if(u||l==="MemberExpression"){u&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(b.InvalidLhsOptionalChaining,t,{ancestor:e})),s!==64&&this.raise(b.InvalidPropertyBindingPattern,t);return}if(l==="Identifier"){this.checkIdentifier(t,s,n);const{name:y}=t;r&&(r.has(y)?this.raise(b.ParamDupe,t):r.add(y));return}const c=this.isValidLVal(l,!(a||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(c===!0)return;if(c===!1){const y=s===64?b.InvalidLhs:b.InvalidLhsBinding;this.raise(y,t,{ancestor:e});return}const[d,m]=Array.isArray(c)?c:[c,l==="ParenthesizedExpression"],w=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e;for(const y of[].concat(t[d]))y&&this.checkLVal(y,{in:w,binding:s,checkClashes:r,strictModeChanged:n,hasParenthesizedAncestor:m})}checkIdentifier(t,e,s=!1){this.state.strict&&(s?Al(t.name,this.inModule):Tl(t.name))&&(e===64?this.raise(b.StrictEvalArguments,t,{referenceName:t.name}):this.raise(b.StrictEvalArgumentsBinding,t,{bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(b.LetInLexicalBinding,t),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(b.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?b.RestTrailingComma:b.ElementAfterRest,this.state.startLoc),!0):!1}}const uf=(i,t)=>Object.hasOwnProperty.call(i,t)&&i[t];function hf(i){if(i==null)throw new Error(`Unexpected ${i} value.`);return i}function qa(i){if(!i)throw new Error("Assert fail")}const ie=Mt`typescript`({AbstractMethodHasImplementation:({methodName:i})=>`Method '${i}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:i})=>`Property '${i}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:i})=>`'declare' is not allowed in ${i}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:i})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:i})=>`Duplicate modifier: '${i}'.`,EmptyHeritageClauseType:({token:i})=>`'${i}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:i})=>`'${i[0]}' modifier cannot be used with '${i[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:i})=>`Index signatures cannot have an accessibility modifier ('${i}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:i})=>`'${i}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:i})=>`'${i}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:i})=>`'${i}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:i})=>`'${i[0]}' modifier must precede '${i[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:i})=>`Private elements cannot have an accessibility modifier ('${i}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:i})=>`Single type parameter ${i} should have a trailing comma. Example usage: <${i},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:i})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${i}.`});function pf(i){switch(i){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Ga(i){return i==="private"||i==="public"||i==="protected"}function ff(i){return i==="in"||i==="out"}var df=i=>class extends i{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ie.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ie.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ie.InvalidModifierOnTypeParameter})}getScopeHandler(){return of}tsIsIdentifier(){return Ee(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,s){if(!Ee(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;const r=this.state.value;if(e.indexOf(r)!==-1){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:r,errorTemplate:n=ie.InvalidModifierOnTypeMember},a){const o=(u,c,d,m)=>{c===d&&a[m]&&this.raise(ie.InvalidModifiersOrder,u,{orderedModifiers:[d,m]})},l=(u,c,d,m)=>{(a[d]&&c===m||a[m]&&c===d)&&this.raise(ie.IncompatibleModifiers,u,{modifiers:[d,m]})};for(;;){const{startLoc:u}=this.state,c=this.tsParseModifier(e.concat(s!=null?s:[]),r);if(!c)break;Ga(c)?a.accessibility?this.raise(ie.DuplicateAccessibilityModifier,u,{modifier:c}):(o(u,c,c,"override"),o(u,c,c,"static"),o(u,c,c,"readonly"),a.accessibility=c):ff(c)?(a[c]&&this.raise(ie.DuplicateModifier,u,{modifier:c}),a[c]=!0,o(u,c,"in","out")):(Object.hasOwnProperty.call(a,c)?this.raise(ie.DuplicateModifier,u,{modifier:c}):(o(u,c,"static","readonly"),o(u,c,"static","override"),o(u,c,"override","readonly"),o(u,c,"abstract","override"),l(u,c,"declare","override"),l(u,c,"static","abstract")),a[c]=!0),s!=null&&s.includes(c)&&this.raise(n,u,{modifier:c})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){const r=[];for(;!this.tsIsListTerminator(e);)r.push(s());return r}tsParseDelimitedList(e,s,r){return hf(this.tsParseDelimitedListWorker(e,s,!0,r))}tsParseDelimitedListWorker(e,s,r,n){const a=[];let o=-1;for(;!this.tsIsListTerminator(e);){o=-1;const l=s();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;r&&this.expect(12);return}return n&&(n.value=o),a}tsParseBracketedList(e,s,r,n,a){n||(r?this.expect(0):this.expect(47));const o=this.tsParseDelimitedList(e,s,a);return r?this.expect(3):this.expect(48),o}tsParseImportType(){const e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(ie.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let s=this.parseIdentifier(e);for(;this.eat(16);){const r=this.startNodeAtNode(s);r.left=s,r.right=this.parseIdentifier(e),s=this.finishNode(r,"TSQualifiedName")}return s}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){const s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){const s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();const r={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),s.params.length===0&&this.raise(ie.EmptyTypeParameters,s),r.value!==-1&&this.addExtra(s,"trailingComma",r.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){const r=e===19,n="parameters",a="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[n]=this.tsParseBindingListForSignature(),r?s[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(11,41,2);for(const s of e){const{type:r}=s;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(ie.UnsupportedSignatureParameterKind,s,{type:r})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),Ee(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);const s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);const r=e;if(this.match(10)||this.match(47)){s&&this.raise(ie.ReadonlyForMethodSignature,e);const n=r;n.kind&&this.match(47)&&this.raise(ie.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();const a="parameters",o="typeAnnotation";if(n.kind==="get")n[a].length>0&&(this.raise(b.BadGetterArity,this.state.curPosition()),this.isThisParam(n[a][0])&&this.raise(ie.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind==="set"){if(n[a].length!==1)this.raise(b.BadSetterArity,this.state.curPosition());else{const l=n[a][0];this.isThisParam(l)&&this.raise(ie.AccesorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(ie.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(ie.SetAccesorCannotHaveRestParameter,this.state.curPosition())}n[o]&&this.raise(ie.SetAccesorCannotHaveReturnType,n[o])}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}else{const n=r;s&&(n.readonly=!0);const a=this.tsTryParseTypeAnnotation();return a&&(n.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){const r=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(r,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);const s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){const e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){const e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(r=>{const{type:n}=r;s&&n!=="TSRestType"&&n!=="TSOptionalType"&&!(n==="TSNamedTupleMember"&&r.optional)&&this.raise(ie.OptionalTypeBeforeRequired,r),s||(s=n==="TSNamedTupleMember"&&r.optional||n==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const{startLoc:e}=this.state,s=this.eat(21);let r,n,a,o;const u=dt(this.state.type)?this.lookaheadCharCode():null;if(u===58)r=!0,a=!1,n=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(u===63){a=!0;const c=this.state.startLoc,d=this.state.value,m=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,n=this.createIdentifier(this.startNodeAt(c),d),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=m,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),r=this.eat(14);if(r){let c;n?(c=this.startNodeAtNode(n),c.optional=a,c.label=n,c.elementType=o,this.eat(17)&&(c.optional=!0,this.raise(ie.TupleOptionalAfterType,this.state.lastTokStartLoc))):(c=this.startNodeAtNode(o),c.optional=a,this.raise(ie.InvalidTupleMemberLabel,o),c.label=o,c.elementType=this.tsParseType()),o=this.finishNode(c,"TSNamedTupleMember")}else if(a){const c=this.startNodeAtNode(o);c.typeAnnotation=o,o=this.finishNode(c,"TSOptionalType")}if(s){const c=this.startNodeAt(e);c.typeAnnotation=o,o=this.finishNode(c,"TSRestType")}return o}tsParseParenthesizedType(){const e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){const r=this.startNode();return e==="TSConstructorType"&&(r.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,r)),this.finishNode(r,e)}tsParseLiteralTypeNode(){const e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const e=this.startNode(),s=this.lookahead();return s.type!==134&&s.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type:e}=this.state;if(Ee(e)||e===88||e===84){const s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":pf(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){const r=this.startNode();return this.next(),this.finishNode(r,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{const s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){const e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ie.UnexpectedReadonly,e)}}tsParseInferType(){const e=this.startNode();this.expectContextual(115);const s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return yp(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,r){const n=this.startNode(),a=this.eat(r),o=[];do o.push(s());while(this.eat(r));return o.length===1&&!a?o[0]:(n.types=o,this.finishNode(n,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Ee(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();const{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{const s=this.startNode();this.expect(e);const r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(r.parameterName=l,r.asserts=!0,r.typeAnnotation=null,l=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(l,r),l.asserts=!0),s.typeAnnotation=l,this.finishNode(s,"TSTypeAnnotation")}const a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,s.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);const o=this.tsParseTypeAnnotation(!1);return r.parameterName=a,r.typeAnnotation=o,r.asserts=n,s.typeAnnotation=this.finishNode(r,"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 e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;const e=this.state.containsEsc;return this.next(),!Ee(this.state.type)&&!this.match(78)?!1:(e&&this.raise(b.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){qa(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;const s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ie.ReservedTypeAssertion,this.state.startLoc);const e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const s=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{const n=this.startNode();return n.expression=this.tsParseEntityName(),this.match(47)&&(n.typeParameters=this.tsParseTypeArguments()),this.finishNode(n,"TSExpressionWithTypeArguments")});return r.length||this.raise(ie.EmptyHeritageClauseType,s,{token:e}),r}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),Ee(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(ie.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));const r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){const s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){const s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){const s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){const r=this.startNode();this.tsParseModuleOrNamespaceDeclaration(r,!0),e.body=r}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,r){e.isExport=r||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);const n=this.tsParseModuleReference();return e.importKind==="type"&&n.type!=="TSExternalModuleReference"&&this.raise(ie.ImportAliasHasImportType,n),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const s=this.state.clone(),r=e();return this.state=s,r}tsTryParseAndCatch(e){const s=this.tryParse(r=>e()||r());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){const s=this.state.clone(),r=e();if(r!==void 0&&r!==!1)return r;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,r;return this.isContextual(100)&&(s=74,r="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,r||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{const n=this.tsParseInterfaceDeclaration(e,{declare:!0});if(n)return n}default:if(Ee(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,r){switch(s.name){case"declare":{const n=this.tsTryParseDeclare(e);return n&&(n.declare=!0),n}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);const n=e;return n.global=!0,n.id=s,n.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,r)}}tsParseDeclaration(e,s,r,n){switch(s){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||Ee(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(Ee(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&Ee(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&Ee(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const r=this.tsTryParseAndCatch(()=>{const n=this.startNodeAt(e);return n.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(n),n.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),n});if(this.state.maybeInArrowParameters=s,!!r)return super.parseArrowExpression(r,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(ie.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===ve.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return gp(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){const r=this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);const a=n.accessibility,o=n.override,l=n.readonly;!(e&4)&&(a||l||o)&&this.raise(ie.UnexpectedParameterModifier,r);const u=this.parseMaybeDefault();this.parseAssignableListItemTypes(u,e);const c=this.parseMaybeDefault(u.loc.start,u);if(a||l||o){const d=this.startNodeAt(r);return s.length&&(d.decorators=s),a&&(d.accessibility=a),l&&(d.readonly=l),o&&(d.override=o),c.type!=="Identifier"&&c.type!=="AssignmentPattern"&&this.raise(ie.UnsupportedParameterPropertyKind,d),d.parameter=c,this.finishNode(d,"TSParameterProperty")}return s.length&&(u.decorators=s),c}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(ie.PatternIsOptional,s)}setArrowFunctionParameters(e,s,r){super.setArrowFunctionParameters(e,s,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const n=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):n==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ie.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(ie.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,r,n){const a=super.parseArrayLike(e,s,r,n);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,s,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(r)return n.stop=!0,e;n.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o;const l=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(e)){const m=this.tsTryParseGenericAsyncArrowFunction(s);if(m)return m}const u=this.tsParseTypeArgumentsInExpression();if(!u)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(Wi(this.state.type)){const m=super.parseTaggedTemplateExpression(e,s,n);return m.typeParameters=u,m}if(!r&&this.eat(10)){const m=this.startNodeAt(s);return m.callee=e,m.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(m.arguments),m.typeParameters=u,n.optionalChainMember&&(m.optional=a),this.finishCallExpression(m,n.optionalChainMember)}const c=this.state.type;if(c===48||c===52||c!==10&&tn(c)&&!this.hasPrecedingLineBreak())return;const d=this.startNodeAt(s);return d.expression=e,d.typeParameters=u,this.finishNode(d,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ie.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,s,r,n)}parseNewCallee(e){var s;super.parseNewCallee(e);const{callee:r}=e;r.type==="TSInstantiationExpression"&&!((s=r.extra)!=null&&s.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,s,r){let n;if(_i(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(120)))){const a=this.startNodeAt(s);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(n&&this.raise(b.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,s,r)}return super.parseExprOp(e,s,r)}checkReservedWord(e,s,r,n){this.state.isAmbientContext||super.checkReservedWord(e,s,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(ie.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){const s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,r,n){super.applyImportPhase(e,s,r,n),s?e.exportKind=r==="type"?"type":"value":e.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(Ee(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){const r=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,r);s=super.parseImportSpecifiersAndAfter(e,r)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ie.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(e,s){if(this.match(83)){this.next();let r=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?r=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,r,!0)}else if(this.eat(29)){const r=e;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(93)){const r=e;return this.expectContextual(128),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,r=!1){const{isAmbientContext:n}=this.state,a=super.parseVarStatement(e,s,r||n);if(!n)return a;for(const{id:o,init:l}of a.declarations)!l||(s!=="const"||!!o.typeAnnotation?this.raise(ie.InitializerNotAllowedInAmbientContext,l):yf(l,this.hasPlugin("estree"))||this.raise(ie.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){const r=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(r,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(r=>Ga(r)?e.accessibility===r:!!e[r])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,r){const n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ie.InvalidModifierOnTypeParameterPositions},s);const a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,n)&&this.raise(ie.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,r,!!s.static)};s.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,s,r,n){const a=this.tsTryParseIndexSignature(s);if(a){e.body.push(a),s.abstract&&this.raise(ie.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(ie.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(ie.IndexSignatureHasDeclare,s),s.override&&this.raise(ie.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(ie.NonAbstractClassHasAbstractMethod,s),s.override&&(r.hadSuperClass||this.raise(ie.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(e,s,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(ie.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(ie.ClassMethodHasDeclare,e)}parseExpressionStatement(e,s,r){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,r):void 0)||super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,r);const n=this.tryParse(()=>super.parseConditional(e,s));return n.node?(n.error&&(this.state=n.failState),n.node):(n.error&&super.setOptionalParametersError(r,n.error),e)}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){const r=this.startNodeAt(s);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));const s=this.state.startLoc,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ie.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const a=Ee(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(a,s),a.declare=!0),a):null}parseClassId(e,s,r,n){if((!s||r)&&this.isContextual(113))return;super.parseClassId(e,s,r,e.declare?1024:8331);const a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));const s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(ie.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){const{key:s}=e;this.raise(ie.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(ie.PrivateElementHasAbstract,e),e.accessibility&&this.raise(ie.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(ie.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,r,n,a,o){const l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(ie.ConstructorHasTypeParameters,l);const{declare:u=!1,kind:c}=s;u&&(c==="get"||c==="set")&&this.raise(ie.DeclareAccessor,s,{kind:c}),l&&(s.typeParameters=l),super.pushClassMethod(e,s,r,n,a,o)}pushClassPrivateMethod(e,s,r,n){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(s.typeParameters=a),super.pushClassPrivateMethod(e,s,r,n)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,r,n,a,o,l){const u=this.tsTryParseTypeParameters(this.tsParseConstModifier);return u&&(e.typeParameters=u),super.parseObjPropValue(e,s,r,n,a,o,l)}parseFunctionParams(e,s){const r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);const r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var r,n,a,o,l;let u,c,d;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(u=this.state.clone(),c=this.tryParse(()=>super.parseMaybeAssign(e,s),u),!c.error)return c.node;const{context:y}=this.state,L=y[y.length-1];(L===ve.j_oTag||L===ve.j_expr)&&y.pop()}if(!((r=c)!=null&&r.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!u||u===this.state)&&(u=this.state.clone());let m;const w=this.tryParse(y=>{var L,C;m=this.tsParseTypeParameters(this.tsParseConstModifier);const I=super.parseMaybeAssign(e,s);return(I.type!=="ArrowFunctionExpression"||(L=I.extra)!=null&&L.parenthesized)&&y(),((C=m)==null?void 0:C.params.length)!==0&&this.resetStartLocationFromNode(I,m),I.typeParameters=m,I},u);if(!w.error&&!w.aborted)return m&&this.reportReservedArrowTypeParam(m),w.node;if(!c&&(qa(!this.hasPlugin("jsx")),d=this.tryParse(()=>super.parseMaybeAssign(e,s),u),!d.error))return d.node;if((n=c)!=null&&n.node)return this.state=c.failState,c.node;if(w.node)return this.state=w.failState,m&&this.reportReservedArrowTypeParam(m),w.node;if((a=d)!=null&&a.node)return this.state=d.failState,d.node;throw((o=c)==null?void 0:o.error)||w.error||((l=d)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ie.ReservedArrowTypeParam,e)}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){const s=this.tryParse(r=>{const n=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&r(),n});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,s){if(!(s&2))return e;this.eat(17)&&(e.optional=!0);const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(ie.UnexpectedTypeCastInParameter,e):this.raise(ie.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,r){return uf({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(r!==64||!s)&&["expression",!0],TSSatisfiesExpression:(r!==64||!s)&&["expression",!0],TSTypeAssertion:(r!==64||!s)&&["expression",!0]},e)||super.isValidLVal(e,s,r)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){const s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=s,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){const r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.startthis.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){const s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const s=super.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e)[0];return n&&this.isThisParam(n)?s+1:s}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){const s=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=s}}parseClass(e,s,r){const n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(ie.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,r,n,a,o,l){const u=super.parseMethod(e,s,r,n,a,o,l);if(u.abstract&&(this.hasPlugin("estree")?!!u.value.body:!!u.body)){const{key:d}=u;this.raise(ie.AbstractMethodHasImplementation,u,{methodName:d.type==="Identifier"&&!u.computed?d.name:`[${this.input.slice(d.start,d.end)}]`})}return u}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,r,n){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,r,n))}parseImportSpecifier(e,s,r,n,a){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,r,n,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,r){const n=s?"imported":"local",a=s?"local":"exported";let o=e[n],l,u=!1,c=!0;const d=o.loc.start;if(this.isContextual(93)){const w=this.parseIdentifier();if(this.isContextual(93)){const y=this.parseIdentifier();dt(this.state.type)?(u=!0,o=w,l=s?this.parseIdentifier():this.parseModuleExportName(),c=!1):(l=y,c=!1)}else dt(this.state.type)?(c=!1,l=s?this.parseIdentifier():this.parseModuleExportName()):(u=!0,o=w)}else dt(this.state.type)&&(u=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());u&&r&&this.raise(s?ie.TypeModifierIsUsedInTypeImports:ie.TypeModifierIsUsedInTypeExports,d),e[n]=o,e[a]=l;const m=s?"importKind":"exportKind";e[m]=u?"type":"value",c&&this.eatContextual(93)&&(e[a]=s?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=Ft(e[n])),s&&this.checkIdentifier(e[a],u?4098:4096)}};function mf(i){if(i.type!=="MemberExpression")return!1;const{computed:t,property:e}=i;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:Ll(i.object)}function yf(i,t){var e;const{type:s}=i;if((e=i.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){const{value:r}=i;if(typeof r=="string"||typeof r=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(kl(i,t)||gf(i,t)||s==="TemplateLiteral"&&i.expressions.length===0||mf(i))}function kl(i,t){return t?i.type==="Literal"&&(typeof i.value=="number"||"bigint"in i):i.type==="NumericLiteral"||i.type==="BigIntLiteral"}function gf(i,t){if(i.type==="UnaryExpression"){const{operator:e,argument:s}=i;if(e==="-"&&kl(s,t))return!0}return!1}function Ll(i){return i.type==="Identifier"?!0:i.type!=="MemberExpression"||i.computed?!1:Ll(i.object)}const Ja=Mt`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});var xf=i=>class extends i{parsePlaceholder(e){if(this.match(144)){const s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){const r=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=s,r?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,r,n){e!==void 0&&super.checkReservedWord(e,s,r,n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,r){return e==="Placeholder"||super.isValidLVal(e,s,r)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var r;if(s.type!=="Placeholder"||(r=s.extra)!=null&&r.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){const n=e;return n.label=this.finishPlaceholder(s,"Identifier"),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,"LabeledStatement")}return this.semicolon(),e.name=s.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,s,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,r){const n=s?"ClassDeclaration":"ClassExpression";this.next();const a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(r||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,n);throw this.raise(Ja.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,s,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,n)}parseExport(e,s){const r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,s);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const n=this.startNode();return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(e,s)}isExportDefaultSpecifier(){if(this.match(65)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(Qt(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var r;return(r=e.specifiers)!=null&&r.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){const{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(r=>r.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){const s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const r=this.startNodeAtNode(s);return r.local=s,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(Ja.UnexpectedSpace,this.state.lastTokEndLoc)}},bf=i=>class extends i{parseV8Intrinsic(){if(this.match(54)){const e=this.state.startLoc,s=this.startNode();if(this.next(),Ee(this.state.type)){const r=this.parseIdentifierName(),n=this.createIdentifier(s,r);if(n.type="V8IntrinsicIdentifier",this.match(10))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function Fe(i,t){const[e,s]=typeof t=="string"?[t,{}]:t,r=Object.keys(s),n=r.length===0;return i.some(a=>{if(typeof a=="string")return n&&a===e;{const[o,l]=a;if(o!==e)return!1;for(const u of r)if(l[u]!==s[u])return!1;return!0}})}function Vt(i,t,e){const s=i.find(r=>Array.isArray(r)?r[0]===t:r===t);return s&&Array.isArray(s)&&s.length>1?s[1][e]:null}const Xa=["minimal","fsharp","hack","smart"],Ya=["^^","@@","^","%","#"],Za=["hash","bar"];function Pf(i){if(Fe(i,"decorators")){if(Fe(i,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const t=Vt(i,"decorators","decoratorsBeforeExport");if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const e=Vt(i,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(Fe(i,"flow")&&Fe(i,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Fe(i,"placeholders")&&Fe(i,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Fe(i,"pipelineOperator")){const t=Vt(i,"pipelineOperator","proposal");if(!Xa.includes(t)){const s=Xa.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}const e=Fe(i,["recordAndTuple",{syntaxType:"hash"}]);if(t==="hack"){if(Fe(i,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Fe(i,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const s=Vt(i,"pipelineOperator","topicToken");if(!Ya.includes(s)){const r=Ya.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${r}.`)}if(s==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(t==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(Fe(i,"moduleAttributes")){if(Fe(i,"importAssertions")||Fe(i,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(Vt(i,"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(Fe(i,"importAssertions")&&Fe(i,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Fe(i,"recordAndTuple")&&Vt(i,"recordAndTuple","syntaxType")!=null&&!Za.includes(Vt(i,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Za.map(t=>`'${t}'`).join(", "));if(Fe(i,"asyncDoExpressions")&&!Fe(i,"doExpressions")){const t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(Fe(i,"optionalChainingAssign")&&Vt(i,"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 Ml={estree:ap,jsx:nf,flow:sf,typescript:df,v8intrinsic:bf,placeholders:xf},Tf=Object.keys(Ml),_r={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function Af(i){if(i==null)return Object.assign({},_r);if(i.annexB!=null&&i.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");const t={};for(const s of Object.keys(_r)){var e;t[s]=(e=i[s])!=null?e:_r[s]}return t}class wf extends cf{checkProto(t,e,s,r){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;const n=t.key;if((n.type==="Identifier"?n.name:n.value)==="__proto__"){if(e){this.raise(b.RecordNoProto,n);return}s.used&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=n.loc.start):this.raise(b.DuplicateProto,n)),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();const t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){const e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){const r=this.startNodeAt(e);for(r.expressions=[s];this.eat(12);)r.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){const s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let r;t?r=!1:(t=new Fi,r=!0);const{type:n}=this.state;(n===10||Ee(n))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(t);if(e&&(a=e.call(this,a,s)),hp(this.state.type)){const o=this.startNodeAt(s),l=this.state.value;if(o.operator=l,this.match(29)){this.toAssignable(a,!0),o.left=a;const u=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=u&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=u&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=u&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,{in:this.finishNode(o,"AssignmentExpression")}),o}else r&&this.checkExpressionErrors(t,!0);return a}parseMaybeConditional(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprOps(t);return this.shouldExitDescending(r,s)?r:this.parseConditional(r,e,t)}parseConditional(t,e,s){if(this.eat(17)){const r=this.startNodeAt(e);return r.test=t,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(r,s)?r:this.parseExprOp(r,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){const n=this.getPrivateNameSV(t);(s>=_i(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(b.PrivateInExpectedIn,t,{identifierName:n}),this.classScope.usePrivateName(n,t.loc.start)}const r=this.state.type;if(fp(r)&&(this.prodParam.hasIn||!this.match(58))){let n=_i(r);if(n>s){if(r===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}const a=this.startNodeAt(e);a.left=t,a.operator=this.state.value;const o=r===41||r===42,l=r===40;if(l&&(n=_i(42)),this.next(),r===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(b.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(r,n);const u=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(l&&(c===41||c===42)||o&&c===40)throw this.raise(b.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(u,e,s)}}return t}parseExprOpRightExpr(t,e){const s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(b.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,xp(t)?e-1:e)}parseHackPipeBody(){var t;const{startLoc:e}=this.state,s=this.parseMaybeAssign();return ep.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(b.PipeUnparenthesizedBody,e,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipeTopicUnused,e),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(b.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){const s=this.state.startLoc,r=this.isContextual(96);if(r&&this.isAwaitAllowed()){this.next();const l=this.parseAwait(s);return e||this.checkExponentialAfterUnary(l),l}const n=this.match(34),a=this.startNode();if(mp(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&l){const u=a.argument;u.type==="Identifier"?this.raise(b.StrictDelete,a):this.hasPropertyAsPrivateName(u)&&this.raise(b.DeletePrivateField,a)}if(!n)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}const o=this.parseUpdate(a,n,t);if(r){const{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?tn(l):tn(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(b.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){const a=t;return this.checkLVal(a.argument,{in:this.finishNode(a,"UpdateExpression")}),t}const r=this.state.startLoc;let n=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return n;for(;dp(this.state.type)&&!this.canInsertSemicolon();){const a=this.startNodeAt(r);a.operator=this.state.value,a.prefix=!1,a.argument=n,this.next(),this.checkLVal(n,{in:n=this.finishNode(a,"UpdateExpression")})}return n}parseExprSubscripts(t){const e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprAtom(t);return this.shouldExitDescending(r,s)?r:this.parseSubscripts(r,e)}parseSubscripts(t,e,s){const r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,r),r.maybeAsyncArrow=!1;while(!r.stop);return t}parseSubscript(t,e,s,r){const{type:n}=this.state;if(!s&&n===15)return this.parseBind(t,e,s,r);if(Wi(n))return this.parseTaggedTemplateExpression(t,e,r);let a=!1;if(n===18){if(s&&(this.raise(b.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return r.stop=!0,t;r.optionalChainMember=a=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,r,a);{const o=this.eat(0);return o||a||this.eat(16)?this.parseMember(t,e,r,o,a):(r.stop=!0,t)}}parseMember(t,e,s,r,n){const a=this.startNodeAt(e);return a.object=t,a.computed=r,r?(a.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(b.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),s.optionalChainMember?(a.optional=n,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,r){const n=this.startNodeAt(e);return n.object=t,this.next(),n.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(n,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,r){const n=this.state.maybeInArrowParameters;let a=null;this.state.maybeInArrowParameters=!0,this.next();const o=this.startNodeAt(e);o.callee=t;const{maybeAsyncArrow:l,optionalChainMember:u}=s;l&&(this.expressionScope.enter(Kp()),a=new Fi),u&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,a);let c=this.finishCallExpression(o,u);return l&&this.shouldParseAsyncArrow()&&!r?(s.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),c)):(l&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(c)),this.state.maybeInArrowParameters=n,c}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){const r=this.startNodeAt(e);return r.tag=t,r.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(b.OptionalChainingNoTemplate,e),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),t.arguments.length===0||t.arguments.length>2)this.raise(b.ImportCallArity,t,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(const s of t.arguments)s.type==="SpreadElement"&&this.raise(b.ImportCallSpreadArgument,s);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,r,n){const a=[];let o=!0;const l=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(b.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),r&&this.addTrailingCommaExtraToNode(r),this.next();break}a.push(this.parseExprListItem(!1,n,s))}return this.state.inFSharpPipelineDirectBody=l,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&ai(t,e.innerComments),e.callee.trailingComments&&ai(t,e.callee.trailingComments),t}parseNoCallExpr(){const t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null;const{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(b.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{const n=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(n)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;const n=e.callee=this.parseNoCallExpr();if(n.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(b.UnsupportedBind,n)}case 138:return this.raise(b.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 n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.parseTopicReference(n);this.unexpected();break}case 47:{const n=this.input.codePointAt(this.nextTokenStart());kt(n)||n===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(Ee(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();const n=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){const{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(Ee(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return n&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=Ze(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){const e=this.startNode(),s=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(e,s,t,r)}finishTopicReference(t,e,s,r){if(this.testTopicReferenceConfiguration(s,e,r)){const n=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?b.PrimaryTopicNotAllowed:b.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,n)}else throw this.raise(b.PipeTopicUnconfiguredToken,e,{token:Qt(r)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Qt(s)}]);case"smart":return s===27;default:throw this.raise(b.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Di(!0,this.prodParam.hasYield));const e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(b.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();const s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(b.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(b.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(b.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){const t=this.startNode(),e=this.startNodeAt(Ze(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;const r=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||r)&&this.raise(b.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(b.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){const s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(b.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){const s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){const e=this.parseLiteral(t.value,"RegExpLiteral");return e.pattern=t.pattern,e.flags=t.flags,e}parseBooleanLiteral(t){const e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){const t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){const e=this.state.startLoc;let s;this.next(),this.expressionScope.enter(zp());const r=this.state.maybeInArrowParameters,n=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const a=this.state.startLoc,o=[],l=new Fi;let u=!0,c,d;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){d=this.state.startLoc;break}if(this.match(21)){const y=this.state.startLoc;if(c=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),y)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}const m=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=n;let w=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(w=this.parseArrow(w))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(w,o,!1),w):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),d&&this.unexpected(d),c&&this.unexpected(c),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(a),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,m)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;const s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(b.UnexpectedNewTarget,s),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){const e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){const e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(b.ImportCallNotNewExpression,s)}parseTemplateElement(t){const{start:e,startLoc:s,end:r,value:n}=this.state,a=e+1,o=this.startNodeAt(Ze(s,1));n===null&&(t||this.raise(b.InvalidEscapeSequenceTemplate,Ze(this.state.firstInvalidTemplateEscapePos,1)));const l=this.match(24),u=l?-1:-2,c=r+u;o.value={raw:this.input.slice(a,c).replace(/\r\n?/g,` +`),cooked:n===null?null:n.slice(1,u)},o.tail=l,this.next();const d=this.finishNode(o,"TemplateElement");return this.resetEndLocation(d,Ze(this.state.lastTokEndLoc,u)),d}parseTemplate(t){const e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let o=!0;const l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let c;e?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(r),this.checkProto(c,s,a,r)),s&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(b.InvalidRecordProperty,c),c.shorthand&&this.addExtra(c,"shorthand",!0),l.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=n;let u="ObjectExpression";return e?u="ObjectPattern":s&&(u="RecordExpression"),this.finishNode(l,u)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(b.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());const s=this.startNode();let r=!1,n=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);const l=this.state.containsEsc,u=this.parsePropertyName(s,t);if(!o&&!l&&this.maybeAsyncOrAccessorProp(s)){const c=u.name;c==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(u),o=this.eat(55),this.parsePropertyName(s)),(c==="get"||c==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(u),s.kind=c,this.match(55)&&(o=!0,this.raise(b.AccessorIsGenerator,this.state.curPosition(),{kind:c}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,a,o,r,!1,n,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const s=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==s&&this.raise(t.kind==="get"?b.BadGetterArity:b.BadSetterArity,t),t.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(b.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,r,n){if(n){const a=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(s||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,r){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,Ft(t.key));else if(this.match(29)){const n=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n):this.raise(b.InvalidCoverInitializedName,n),t.value=this.parseMaybeDefault(e,Ft(t.key))}else t.value=Ft(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,r,n,a,o){const l=this.parseObjectMethod(t,s,r,n,a)||this.parseObjectProperty(t,e,n,o);return l||this.unexpected(),l}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:s,value:r}=this.state;let n;if(dt(s))n=this.parseIdentifier(!0);else switch(s){case 134:n=this.parseNumericLiteral(r);break;case 133:n=this.parseStringLiteral(r);break;case 135:n=this.parseBigIntLiteral(r);break;case 136:n=this.parseDecimalLiteral(r);break;case 138:{const a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(b.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:this.unexpected()}t.key=n,s!==138&&(t.computed=!1)}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,r,n,a,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(n?32:0)),this.prodParam.enter(Di(s,t.generator)),this.parseFunctionParams(t,r);const l=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,r,a),this.state.inFSharpPipelineDirectBody=n,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,r){this.scope.enter(6);let n=Di(s,!1);!this.match(5)&&this.prodParam.hasIn&&(n|=8),this.prodParam.enter(n),this.initFunction(t,s);const a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){const r=e&&!this.match(5);if(this.expressionScope.enter(Il()),r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{const l=!this.isSimpleParamList(t.params);o&&l&&this.raise(b.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&!!t.key?t.key.loc.end:t);const u=!n&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!l,e,u),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,u)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e10||!Ip(t))return;if(s&&Ep(t)){this.raise(b.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?r?Al:Pl:bl)(t,this.inModule)){this.raise(b.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(b.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(b.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(b.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(b.ArgumentsInClass,e);return}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(t){const e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(b.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(b.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:t}=this.state;return t===53||t===10||t===0||Wi(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){const t=this.startNode();this.expressionScope.recordParameterInitializerError(b.YieldInParameter,t),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(b.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){const s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{const s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(b.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipelineTopicUnused,t)}withTopicBindingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){const e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const e=this.startNodeAt(this.state.endLoc);this.next();const s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}}const Or={kind:1},Sf={kind:2},Ef=/[\uD800-\uDFFF]/u,Dr=/in(?:stanceof)?/y;function Cf(i,t){for(let e=0;e0)for(const[n,a]of Array.from(this.scope.undefinedExports))this.raise(b.ModuleExportUndefined,a,{localName:n});let r;return e===139?r=this.finishNode(t,"Program"):r=this.finishNodeAt(t,"Program",Ze(this.state.startLoc,-1)),r}stmtToDirective(t){const e=t;e.type="Directive",e.value=e.expression,delete e.expression;const s=e.value,r=s.value,n=this.input.slice(s.start,s.end),a=s.value=n.slice(1,-1);return this.addExtra(s,"raw",n),this.addExtra(s,"rawValue",a),this.addExtra(s,"expressionValue",r),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(kt(t)){if(Dr.lastIndex=e,Dr.test(this.input)){const s=this.codePointAtPos(Dr.lastIndex);if(!Ns(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){const t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifier(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){const{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(Ee(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);const e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){const s=this.state.type,r=this.startNode(),n=!!(t&2),a=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?b.StrictFunction:this.options.annexB?b.SloppyFunctionAnnexB:b.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!n&&a);case 80:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?n||this.raise(b.UnexpectedLexicalDeclaration,r):this.raise(b.AwaitUsingNotInAsyncContext,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(b.UnexpectedUsingDeclaration,this.state.startLoc):n||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;const c=this.nextTokenStart(),d=this.codePointAtPos(c);if(d!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(d,c)&&d!==123))break}case 75:n||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const c=this.state.value;return this.parseVarStatement(r,c)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{const c=this.lookaheadCharCode();if(c===40||c===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(b.UnexpectedImportExport,this.state.startLoc),this.next();let c;return s===83?(c=this.parseImport(r),c.type==="ImportDeclaration"&&(!c.importKind||c.importKind==="value")&&(this.sawUnambiguousESM=!0)):(c=this.parseExport(r,e),(c.type==="ExportNamedDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportAllDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(c),c}default:if(this.isAsyncFunction())return n||this.raise(b.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!n&&a)}const l=this.state.value,u=this.parseExpression();return Ee(s)&&u.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,l,u,t):this.parseExpressionStatement(r,u,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(b.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(b.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){const e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(b.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(b.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){const e=this.state.startLoc;let s;if(this.match(10)){const r=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(r,s);const n=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(b.DecoratorArgumentsOutsideParentheses,n)}else{for(s=this.parseIdentifier(!1);this.eat(16);){const r=this.startNodeAt(e);r.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,s=this.finishNode(r,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;sthis.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(Or);let e=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(e=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);const s=this.isContextual(100);{const l=this.isContextual(96)&&this.startsAwaitUsing(),u=l||this.isContextual(107)&&this.startsUsingForOf(),c=s&&this.hasFollowingBindingAtom()||u;if(this.match(74)||this.match(75)||c){const d=this.startNode();let m;l?(m="await using",this.isAwaitAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):m=this.state.value,this.next(),this.parseVar(d,!0,m);const w=this.finishNode(d,"VariableDeclaration"),y=this.match(58);return y&&u&&this.raise(b.ForInUsing,w),(y||this.isContextual(102))&&w.declarations.length===1?this.parseForIn(t,w,e):(e!==null&&this.unexpected(e),this.parseFor(t,w))}}const r=this.isContextual(95),n=new Fi,a=this.parseExpression(!0,n),o=this.isContextual(102);if(o&&(s&&this.raise(b.ForOfLet,a),e===null&&r&&a.type==="Identifier"&&this.raise(b.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);const l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{in:{type:l}}),this.parseForIn(t,a,e)}else this.checkExpressionErrors(n,!0);return e!==null&&this.unexpected(e),this.parseFor(t,a)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(b.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];this.expect(5),this.state.labels.push(Sf),this.scope.enter(0);let s;for(let r;!this.match(8);)if(this.match(61)||this.match(65)){const n=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),n?s.test=this.parseExpression():(r&&this.raise(b.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(b.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{in:{type:"CatchClause"},binding:9}),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){const e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(b.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Or),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(b.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,r){for(const a of this.state.labels)a.name===e&&this.raise(b.LabelRedeclaration,s,{labelName:e});const n=pp(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){const o=this.state.labels[a];if(o.statementStart===t.start)o.statementStart=this.state.start,o.kind=n;else break}return this.state.labels.push({name:e,kind:n,statementStart:this.state.start}),t.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){const r=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,t,!1,8,s),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,r,n){const a=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,s,r,n)}parseBlockOrModuleBlockBody(t,e,s,r,n){const a=this.state.strict;let o=!1,l=!1;for(;!this.match(r);){const u=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(u)){const c=this.stmtToDirective(u);e.push(c),!o&&c.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}t.push(u)}n==null||n.call(this,o),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){const r=this.match(58);return this.next(),r?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(b.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(b.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,r=!1){const n=t.declarations=[];for(t.kind=s;;){const a=this.startNode();if(this.parseVarId(a,s),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):s==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"const"})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){const s=this.parseBindingAtom();this.checkLVal(s,{in:{type:"VariableDeclarator"},binding:e==="var"?5:8201}),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){const s=e&2,r=!!(e&1),n=r&&!(e&4),a=!!(e&8);this.initFunction(t,a),this.match(55)&&(s&&this.raise(b.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),r&&(t.id=this.parseFunctionId(n));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Di(a,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||Ee(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(Vp()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){!t.id||this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();const r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,r),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(t){return!t.computed&&!t.static&&(t.key.name==="constructor"||t.key.value==="constructor")}parseClassBody(t,e){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:t};let r=[];const n=this.startNode();if(n.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(b.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}const a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(n,a,s),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(b.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),r.length)throw this.raise(b.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(t,e){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const r=e;return r.kind="method",r.computed=!1,r.key=s,r.static=!1,this.pushClassMethod(t,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const r=e;return r.computed=!1,r.key=s,r.static=!1,t.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){const r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,r)}parseClassMemberWithIsStatic(t,e,s,r){const n=e,a=e,o=e,l=e,u=e,c=n,d=n;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){c.kind="method";const C=this.match(138);if(this.parseClassElementName(c),C){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsGenerator,n.key),this.pushClassMethod(t,n,!0,!1,!1,!1);return}const m=Ee(this.state.type)&&!this.state.containsEsc,w=this.match(138),y=this.parseClassElementName(e),L=this.state.startLoc;if(this.parsePostMemberNameModifiers(d),this.isClassMethod()){if(c.kind="method",w){this.pushClassPrivateMethod(t,a,!1,!1);return}const C=this.isNonstaticConstructor(n);let I=!1;C&&(n.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(b.DuplicateConstructor,y),C&&this.hasPlugin("typescript")&&e.override&&this.raise(b.OverrideOnConstructor,y),s.hadConstructor=!0,I=s.hadSuperClass),this.pushClassMethod(t,n,!1,!1,C,I)}else if(this.isClassProperty())w?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(m&&y.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(y);const C=this.eat(55);d.optional&&this.unexpected(L),c.kind="method";const I=this.match(138);this.parseClassElementName(c),this.parsePostMemberNameModifiers(d),I?this.pushClassPrivateMethod(t,a,C,!0):(this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsAsync,n.key),this.pushClassMethod(t,n,C,!0,!1,!1))}else if(m&&(y.name==="get"||y.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(y),c.kind=y.name;const C=this.match(138);this.parseClassElementName(n),C?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(b.ConstructorIsAccessor,n.key),this.pushClassMethod(t,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(m&&y.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(y);const C=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,u,C)}else this.isLineTerminator()?w?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){const{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(b.StaticPrototype,this.state.startLoc),e===138){s==="constructor"&&this.raise(b.ConstructorClassPrivateField,this.state.startLoc);const r=this.parsePrivateName();return t.key=r,r}return this.parsePropertyName(t)}parseClassStaticBlock(t,e){var s;this.scope.enter(208);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const n=e.body=[];this.parseBlockOrModuleBlockBody(n,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(b.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&(e.key.name==="constructor"||e.key.value==="constructor")&&this.raise(b.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){if(!s&&!e.computed){const n=e.key;(n.name==="constructor"||n.value==="constructor")&&this.raise(b.ConstructorClassField,n)}const r=this.parseClassAccessorProperty(e);t.body.push(r),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(t,e,s,r,n,a){t.body.push(this.parseMethod(e,s,r,n,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,r){const n=this.parseMethod(e,s,r,!1,!1,"ClassPrivateMethod",!0);t.body.push(n);const a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(Il()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,r=8331){if(Ee(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,r);else if(s||!e)t.id=null;else throw this.raise(b.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){const s=this.parseMaybeImportPhase(t,!0),r=this.maybeParseExportDefaultSpecifier(t,s),n=!r||this.eat(12),a=n&&this.eatExportStar(t),o=a&&this.maybeParseExportNamespaceSpecifier(t),l=n&&(!o||this.eat(12)),u=r||a;if(a&&!o){if(r&&this.unexpected(),e)throw this.raise(b.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}const c=this.maybeParseExportNamedSpecifiers(t);r&&n&&!a&&!c&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let d;if(u||c){if(d=!1,e)throw this.raise(b.UnsupportedDecoratorExport,t);this.parseExportFrom(t,u)}else d=this.maybeParseExportDeclaration(t);if(u||c||d){var m;const w=t;if(this.checkExport(w,!0,!1,!!w.source),((m=w.declaration)==null?void 0:m.type)==="ClassDeclaration")this.maybeTakeDecorators(e,w.declaration,w);else if(e)throw this.raise(b.UnsupportedDecoratorExport,t);return this.finishNode(w,"ExportNamedDeclaration")}if(this.eat(65)){const w=t,y=this.parseExportDefaultExpression();if(w.declaration=y,y.type==="ClassDeclaration")this.maybeTakeDecorators(e,y,w);else if(e)throw this.raise(b.UnsupportedDecoratorExport,t);return this.checkExport(w,!0,!0),this.finishNode(w,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0:e.loc.start);const s=e||this.parseIdentifier(!0),r=this.startNodeAtNode(s);return r.exported=s,t.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){t.specifiers||(t.specifiers=[]);const e=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){t.specifiers||(t.specifiers=[]);const e=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(e)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.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(b.UnsupportedDefaultExport,this.state.startLoc);const e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:t}=this.state;if(Ee(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){const{type:r}=this.lookahead();if(Ee(r)&&r!==98||r===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||Ee(this.state.type)&&s)return!0;if(this.match(65)&&s){const r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,r){if(e){var n;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var a;const o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(b.ExportDefaultFromAsIdentifier,o)}}else if((n=t.specifiers)!=null&&n.length)for(const o of t.specifiers){const{exported:l}=o,u=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,u),!r&&o.local){const{local:c}=o;c.type!=="Identifier"?this.raise(b.ExportBindingIsString,o,{localName:c.value,exportName:u}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(t.declaration){if(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"){const o=t.declaration.id;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(t,o.name)}else if(t.declaration.type==="VariableDeclaration")for(const o of t.declaration.declarations)this.checkDeclaration(o.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(const e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(const e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(b.DuplicateDefaultExport,t):this.raise(b.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){const e=[];let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;const r=this.isContextual(130),n=this.match(133),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,n,t,r))}return e}parseExportSpecifier(t,e,s,r){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=Jp(t.local):t.exported||(t.exported=Ft(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){const t=this.parseStringLiteral(this.state.value),e=t.value.match(Ef);return e&&this.raise(b.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){const{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(b.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(b.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var r;s!=="ImportDefaultSpecifier"&&this.raise(b.ImportReflectionNotBinding,e[0].loc.start),((r=t.assertions)==null?void 0:r.length)>0&&this.raise(b.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){const{specifiers:e}=t;if(e!=null){const s=e.find(r=>{let n;if(r.type==="ExportSpecifier"?n=r.local:r.type==="ImportSpecifier"&&(n=r.imported),n!==void 0)return n.type==="Identifier"?n.name!=="default":n.value!=="default"});s!==void 0&&this.raise(b.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,r){e||(s==="module"?(this.expectPlugin("importReflection",r),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",r),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",r),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;const s=this.parseIdentifier(!0),{type:r}=this.state;return(dt(r)?r!==98||this.lookaheadCharCode()===102:r!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){const{type:e}=this.state;return Ee(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];const r=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(t);return r&&!n&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{in:{type:e},binding:s}),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);const t=[],e=new Set;do{if(this.match(8))break;const s=this.startNode(),r=this.state.value;if(e.has(r)&&this.raise(b.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(133)?s.key=this.parseStringLiteral(r):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){const t=[],e=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(b.ModuleAttributeDifferentFromType,s.key),e.has(s.key.name)&&this.raise(b.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e,s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(b.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){const s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(dt(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){const e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(b.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const s=this.startNode(),r=this.match(133),n=this.isContextual(130);s.imported=this.parseModuleExportName();const a=this.parseImportSpecifier(s,r,t.importKind==="type"||t.importKind==="typeof",n,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,e,s,r,n){if(this.eatContextual(93))t.local=this.parseIdentifier();else{const{imported:a}=t;if(e)throw this.raise(b.ImportBindingIsString,t,{importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=Ft(a))}return this.finishImportSpecifier(t,"ImportSpecifier",n)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}}class _l extends vf{constructor(t,e){t=Af(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=If(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return Bn}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}}function If(i){const t=new Map;for(const e of i){const[s,r]=Array.isArray(e)?e:[e,{}];t.has(s)||t.set(s,r||{})}return t}function Nf(i,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";const s=Ws(t,i),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",Ws(t,i).parse()}catch{}else r.program.sourceType="script";return r}catch(s){try{return t.sourceType="script",Ws(t,i).parse()}catch{}throw s}}else return Ws(t,i).parse()}function kf(i,t){const e=Ws(t,i);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Lf(i){const t={};for(const e of Object.keys(i))t[e]=vt(i[e]);return t}const Mf=Lf(lp);function Ws(i,t){let e=_l;return i!=null&&i.plugins&&(Pf(i.plugins),e=_f(i.plugins)),new e(i,t)}const Qa={};function _f(i){const t=Tf.filter(r=>Fe(i,r)),e=t.join("/");let s=Qa[e];if(!s){s=_l;for(const r of t)s=Ml[r](s);Qa[e]=s}return s}var Of=ur.parse=Nf;ur.parseExpression=kf;ur.tokTypes=Mf;var pi={},is={},ut={};Object.defineProperty(ut,"__esModule",{value:!0});function Ol(i){return{type:"concat",parts:i}}ut.concat=Ol;function Df(i,t){const e=[];return t.forEach((s,r)=>{r>0&&e.push(i),e.push(s)}),Ol(e)}ut.join=Df;ut.line={type:"line",hard:!1,soft:!1};ut.hardline={type:"line",hard:!0,soft:!1};ut.softline={type:"line",hard:!1,soft:!0};function Ff(i){return{type:"indent",content:i}}ut.indent=Ff;function $f(i){return{type:"lineSuffix",content:i}}ut.lineSuffix=$f;function Rf(i,t=!1){return{type:"group",content:i,willBreak:t}}ut.group=Rf;ut.breakParent={type:"breakParent"};function Bf(i){return typeof i=="string"&&i.length===0}ut.isEmpty=Bf;var Ve={};Object.defineProperty(Ve,"__esModule",{value:!0});function jf(i){return i.range[0]}Ve.locStart=jf;function Uf(i){return i.range[1]}Ve.locEnd=Uf;function Hf(i){if(!i||typeof i.type!="string")return!1;switch(i.type){case"LabelStatement":case"BreakStatement":case"GotoStatement":case"ReturnStatement":case"IfStatement":case"IfClause":case"ElseifClause":case"ElseClause":case"WhileStatement":case"DoStatement":case"RepeatStatement":case"LocalStatement":case"AssignmentStatement":case"CallStatement":case"FunctionDeclaration":case"ForNumericStatement":case"ForGenericStatement":case"Chunk":case"Identifier":case"BooleanLiteral":case"NilLiteral":case"NumericLiteral":case"StringLiteral":case"VarargLiteral":case"TableKey":case"TableKeyString":case"TableValue":case"TableConstructorExpression":case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"MemberExpression":case"IndexExpression":case"CallExpression":case"TableCallExpression":case"StringCallExpression":case"Comment":return!0;default:return!1}}Ve.isNode=Hf;function Hn(i,t,e,s={}){let r=0;return e.forEach(n=>{if((s.searchBackwards?i.substring(t-n.length,t):i.substring(t,t+n.length))===n){r=n.length;return}}),t+(s.searchBackwards?-r:r)}Ve.skipOnce=Hn;function Vn(i,t,e,s={}){let r=null;for(;r!==t;)r=t,t=Hn(i,t,e,s);return t}Ve.skipMany=Vn;function oi(i,t,e={}){return Hn(i,t,[` `,`\r `],e)}Ve.skipNewLine=oi;function Ms(i,t,e={}){return Vn(i,t,[" "," "],e)}Ve.skipSpaces=Ms;function Dl(i,t,e={}){return Vn(i,Ms(i,t),[";"],e)}Ve.skipToLineEnd=Dl;function Fl(i,t,e={}){const s=Ms(i,t,e),r=oi(i,s,e);return s!==r}Ve.hasNewLine=Fl;function Vf(i,t,e){return i.substr(t,e-t).indexOf(` `)!==-1}Ve.hasNewLineInRange=Vf;function zf(i,t){t=Ms(i,t,{searchBackwards:!0}),t=oi(i,t,{searchBackwards:!0}),t=Ms(i,t,{searchBackwards:!0});const e=oi(i,t,{searchBackwards:!0});return t!==e}Ve.isPreviousLineEmpty=zf;function $l(i,t){if(i.charAt(t)==="-"&&i.charAt(t+1)==="-")for(t+=2;t>=0&&t=0&&!(_e.locStart(e[n])<=_e.locStart(r)&&_e.locEnd(e[n])<=_e.locEnd(i));--n);e.splice(n+1,0,r)}}for(const r of t){const n=i[r];Array.isArray(n)?n.forEach(s):n&&s(n)}return e}function qf(i,t){for(const e of i.comments){Bl(i,e);const s=e.precedingNode,r=e.enclosingNode,n=e.followingNode;_e.hasNewLine(t.sourceText,_e.locStart(e),{searchBackwards:!0})?ed(r,e)||td(s,r,e)||sd(s,r,n,e)||(n?eo(n,e):s?to(s,e):_t(r||i,e)):id(s,r,e)||rd(s,r,e)||(s?to(s,e):n?eo(n,e):_t(r||i,e))}}is.attachComments=qf;function Gf(i,t){if(!t.sourceText.startsWith("#!"))return;const e=t.sourceText.indexOf(` -`),s=t.sourceText.slice(0,e),r=t.sourceText.slice(2,e);i.comments.push({type:"Comment",loc:{start:{line:1,column:0},end:{line:1,column:e}},range:[0,e],raw:s,value:r})}is.injectShebang=Gf;function Jf(i,t=!1){const e=i.getValue();if(!e||!e.attachedComments)return"";const s=[];return i.forEach(r=>{const n=r.getValue();n.commentType===wt.Dangling&&s.push(n.raw)},"attachedComments"),s.length===0?"":t?De.join(De.hardline,s):De.indent(De.concat([De.hardline,De.join(De.hardline,s)]))}is.printDanglingComments=Jf;function Xf(i){const t=i.getValue();if(!t||!t.attachedComments)return"";const e=[];return i.forEach(s=>{const r=s.getValue();r.commentType===wt.DanglingStatement&&(e.push(" "),e.push(r.raw))},"attachedComments"),e.length===0?"":De.concat(e)}is.printDanglingStatementComments=Xf;function Yf(i,t){const e=i.getValue();if(e.raw.startsWith("--[["))return De.concat([e.raw,_e.hasNewLine(t.sourceText,_e.locEnd(e))?De.hardline:" "]);const r=[];return r.push(e.raw),r.push(De.hardline),_e.isNextLineEmpty(t.sourceText,_e.locEnd(e))&&r.push(De.hardline),De.concat(r)}function Zf(i,t){const e=i.getValue();if(_e.hasNewLine(t.sourceText,_e.locStart(e),{searchBackwards:!0})){const r=_e.isPreviousLineEmpty(t.sourceText,_e.locStart(e));return De.concat([De.hardline,r?De.hardline:"",e.raw])}if(e.raw.startsWith("--[["))return De.concat([" ",e.raw]);const s=[];return _e.isNextLineEmpty(t.sourceText,_e.locStart(e),{searchBackwards:!0})&&s.push(De.hardline),s.push(" "),s.push(e.raw),s.push(De.breakParent),De.lineSuffix(De.concat(s))}function Qf(i,t,e){const s=i.getValue(),r=e(i),n=s.attachedComments;if(!n||n.length===0)return r;const a=[],o=[r];return i.forEach(l=>{switch(l.getValue().commentType){case wt.Leading:a.push(Yf(i,t));break;case wt.Trailing:o.push(Zf(i,t));break}},"attachedComments"),De.concat(a.concat(o))}is.printComments=Qf;function Bl(i,t){const e=Wf(i);let s=null,r=null,n=0,a=e.length;for(;n0?!1:t.parameters.length>0&&t.parameters[t.parameters.length-1]===i||i&&i.type==="Identifier"?(_t(t,e),!0):!1}function sd(i,t,e,s){return!t||t.type!=="IfStatement"?!1:e&&(e.type==="ElseifClause"||e.type==="ElseClause")||i&&i.type==="ElseClause"?(_t(i,s),!0):!1}function id(i,t,e){if(e.raw.startsWith("--[[")||!t)return!1;switch(t.type){case"WhileStatement":if(i===t.condition)return Kt(t,e),!0;break;case"DoStatement":case"RepeatStatement":if(i==null)return Kt(t,e),!0;break;case"FunctionDeclaration":if(t.parameters.length&&i===t.parameters[t.parameters.length-1]||i===t.identifier)return Kt(t,e),!0;break;case"ForNumericStatement":if(i===t.end||i===t.step)return Kt(t,e),!0;break;case"ForGenericStatement":if(i===t.iterators[t.iterators.length-1])return Kt(t,e),!0;break;case"IfClause":case"ElseifClause":if(i===t.condition&&e.loc.start.column>i.loc.start.column)return Kt(t,e),!0;break;case"ElseClause":if(i==null)return Kt(t,e),!0;break}return!1}function rd(i,t,e){if(!i||!t||t.type!=="IfStatement")return!1;switch(i.type){case"IfClause":case"ElseifClause":case"ElseClause":if(i.body.length===0)return Kt(i,e),!0;break}return!1}var zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const nd=Ve;class ad{constructor(t){this.stack=[t]}getValue(){return this.stack[this.stack.length-1]}getNodeAtDepth(t){for(let e=this.stack.length-1;e>=0;e-=2){const s=this.stack[e];if(nd.isNode(s)&&--t<0)return s}return null}getParent(t=0){return this.getNodeAtDepth(t+1)}call(t,e){const s=this.getValue(),r=this.stack.length;this.stack.push(e,s[e]);const n=t(this);return this.stack.length=r,n}forEach(t,e=null){let s=this.getValue();const r=this.stack.length;e&&(s=s[e],this.stack.push(s));for(let n=0;n{this.stack.push(o,a),r.push(t(this,o)),this.stack.length-=2}),this.stack.length=n,r}needsParens(){const t=this.getParent(),e=this.getValue();let s=!1;switch(e.type){case"FunctionDeclaration":case"Chunk":case"Identifier":case"BooleanLiteral":case"NilLiteral":case"NumericLiteral":case"StringLiteral":case"VarargLiteral":case"TableConstructorExpression":case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"MemberExpression":case"IndexExpression":case"CallExpression":case"TableCallExpression":case"StringCallExpression":s=e.inParens||!1}return t&&e.type==="UnaryExpression"&&t.type==="UnaryExpression"&&(s=!0),s}}Kn.FastPath=ad;var fr={};Object.defineProperty(fr,"__esModule",{value:!0});function Rl(i,t,e){let s=!1;const r=n=>{if(t(n)){s=!0;return}if(!s&&typeof n!="string"){switch(n.type){case"concat":n.parts.forEach(r);break;case"indent":case"group":case"lineSuffix":r(n.content);break}e&&e(n)}};r(i)}function od(i,t){let e=!1;return Rl(i,s=>t(s)?(e=!0,!0):!1),e}function ld(i){return od(i,t=>{if(typeof t=="string")return!1;switch(t.type){case"line":if(t.hard)return!0;break;case"group":if(t.willBreak)return!0}return!1})}fr.willBreak=ld;function so(i){i.length>0&&(i[i.length-1].willBreak=!0)}function cd(i){const t=[];Rl(i,e=>{if(typeof e=="string")return!1;switch(e.type){case"breakParent":so(t);break;case"group":t.push(e);break}return!1},e=>{if(typeof e=="string")return!1;if(e.type==="group"){const s=t.pop();s&&s.willBreak&&so(t)}return!1})}fr.propagateBreaks=cd;var dr={};(function(i){Object.defineProperty(i,"__esModule",{value:!0});var t;(function(r){r.StdOut="stdout",r.Replace="replace",r.Diff="diff"})(t=i.WriteMode||(i.WriteMode={})),i.defaultOptions={sourceText:"",lineWidth:120,indentCount:4,useTabs:!1,linebreakMultipleAssignments:!1,quotemark:"double",writeMode:t.StdOut};function e(r){return r==="single"?"'":'"'}i.getStringQuotemark=e;function s(r){return r==="single"?'"':"'"}i.getAlternativeStringQuotemark=s})(dr);Object.defineProperty(zn,"__esModule",{value:!0});const ud=Kn,F=ut,jl=fr,Gi=is,nn=Ve,an=dr;function Ul(i,t,e){const s=[];return i.forEach(r=>{const n=[e(r)];nn.isNextLineEmpty(t.sourceText,nn.locEnd(r.getValue()))&&!fd(i)&&n.push(F.hardline),s.push(F.concat(n))}),F.join(F.hardline,s)}function Et(i,t,e,s){const r=i.call(n=>Ul(n,t,e),s);return F.indent(F.concat([F.hardline,r]))}function Ct(i){return i.getValue().attachedComments?F.concat([Gi.printDanglingStatementComments(i),Gi.printDanglingComments(i)]):""}function hd(i,t){const e=an.getStringQuotemark(t),s=an.getAlternativeStringQuotemark(t==="single"?"single":"double"),r=i.replace(/\\([\s\S])|(['"])/g,(n,a,o)=>a===s?a:o===e?"\\"+o:n);return e+r+e}function pd(i,t){const e=i.getValue();if(e.type!=="StringLiteral")throw new Error("printStringLiteral: Expected StringLiteral, got "+e.type);if(e.raw.startsWith("[[")||e.raw.startsWith("[="))return e.raw;const s=e.raw.slice(1,-1);let r=t.quotemark;const n=an.getStringQuotemark(r);return s.includes(n)&&(r=r==="single"?"double":"single"),hd(s,r)}function fd(i){const t=i.getParent(),e=i.getValue(),s=t.body;return s&&s[s.length-1]===e}function dd(i,t,e){const s=i.getValue();if(!s)return"";const r=[],n=s;switch(n.type){case"Chunk":return r.push(i.call(y=>Ul(y,t,e),"body")),r.push(Gi.printDanglingComments(i,!0)),(n.body.length||n.attachedComments)&&r.push(F.hardline),F.concat(r);case"LabelStatement":return F.concat(["::",i.call(e,"label"),"::"]);case"GotoStatement":return F.concat(["goto ",i.call(e,"label")]);case"BreakStatement":return"break";case"ReturnStatement":return r.push("return"),n.arguments.length>0&&(r.push(" "),r.push(F.join(", ",i.map(e,"arguments")))),F.concat(r);case"WhileStatement":return r.push("while "),r.push(i.call(e,"condition")),r.push(" do"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"DoStatement":return r.push("do"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"RepeatStatement":return r.push("repeat"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"until "])),r.push(i.call(e,"condition")),F.concat(r);case"LocalStatement":case"AssignmentStatement":{const y=[];n.type==="LocalStatement"&&y.push("local ");const L=t.linebreakMultipleAssignments;y.push(F.indent(F.join(F.concat([",",L?F.hardline:F.line]),i.map(e,"variables"))));let C="";const I=[];n.init.length&&(C=" =",n.init.length>1?I.push(F.indent(F.join(F.concat([",",F.line]),i.map(e,"init")))):I.push(F.join(F.concat([",",F.line]),i.map(e,"init"))));const k=n.init.some(j=>j!=null&&j.type!=="TableConstructorExpression"&&j.type!=="FunctionDeclaration");return F.group(F.concat([F.group(F.concat(y)),F.group(F.concat([C,k?F.indent(F.line):" ",F.concat(I)]))]))}case"CallStatement":return i.call(e,"expression");case"FunctionDeclaration":return n.isLocal&&r.push("local "),r.push("function"),n.identifier&&r.push(" ",i.call(e,"identifier")),r.push(F.concat(["(",F.group(F.indent(F.concat([F.softline,F.join(F.concat([",",F.line]),i.map(e,"parameters"))]))),")"])),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.hardline,"end"),F.concat(r);case"ForNumericStatement":return r.push("for "),r.push(i.call(e,"variable")),r.push(" = "),r.push(i.call(e,"start")),r.push(", "),r.push(i.call(e,"end")),n.step&&(r.push(", "),r.push(i.call(e,"step"))),r.push(" do"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"ForGenericStatement":return r.push("for "),r.push(F.join(", ",i.map(e,"variables"))),r.push(" in "),r.push(F.join(", ",i.map(e,"iterators"))),r.push(" do"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"IfStatement":const a=[];return i.forEach(y=>{a.push(e(y))},"clauses"),r.push(F.join(F.hardline,a)),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"IfClause":return r.push(F.concat(["if ",F.group(F.concat([F.indent(F.concat([F.softline,i.call(e,"condition")])),F.softline]))," then"])),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),F.concat(r);case"ElseifClause":return r.push(F.concat(["elseif ",F.group(F.concat([F.indent(F.concat([F.softline,i.call(e,"condition")])),F.softline]))," then"])),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),F.concat(r);case"ElseClause":return r.push("else"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),F.concat(r);case"BooleanLiteral":return n.raw;case"NilLiteral":return"nil";case"NumericLiteral":return n.raw;case"StringLiteral":return pd(i,t);case"VarargLiteral":return"...";case"Identifier":return n.name;case"BinaryExpression":case"LogicalExpression":const l=i.getParent().type!==n.type&&n.left.type!==n.type&&n.right.type!==n.type,u=F.concat([n.operator,F.line,i.call(e,"right")]);return F.group(F.concat([i.call(e,"left"),F.indent(F.concat([" ",l?F.group(u):u]))]));case"UnaryExpression":return r.push(n.operator),n.operator==="not"&&r.push(" "),r.push(i.call(e,"argument")),F.concat(r);case"MemberExpression":return F.concat([i.call(e,"base"),n.indexer,i.call(e,"identifier")]);case"IndexExpression":return F.concat([i.call(e,"base"),"[",F.group(F.concat([F.indent(F.concat([F.softline,i.call(e,"index")])),F.softline])),"]"]);case"CallExpression":const c=i.map(e,"arguments");return F.concat([i.call(e,"base"),F.group(F.concat(["(",F.indent(F.concat([F.softline,F.join(F.concat([",",F.line]),c)])),F.softline,")"]),c.some(jl.willBreak))]);case"TableCallExpression":return r.push(i.call(e,"base")),r.push(" "),r.push(i.call(e,"arguments")),F.concat(r);case"StringCallExpression":return r.push(i.call(e,"base")),r.push(" "),r.push(i.call(e,"argument")),F.concat(r);case"TableConstructorExpression":if(n.fields.length===0)return"{}";const d=[];let m=[];i.forEach(y=>{d.push(F.concat(m)),d.push(F.group(e(y))),m=[",",F.line]},"fields");const w=nn.hasNewLineInRange(t.sourceText,n.range[0],n.range[1]);return F.group(F.concat(["{",F.indent(F.concat([F.softline,F.concat(d)])),F.softline,"}"]),w);case"TableKeyString":return F.concat([i.call(e,"key")," = ",i.call(e,"value")]);case"TableKey":return F.concat(["[",i.call(e,"key"),"]"," = ",i.call(e,"value")]);case"TableValue":return i.call(e,"value")}throw new Error("Unhandled AST node: "+n.type)}function md(i,t,e){const s=dd(i,t,e),r=[],n=i.needsParens();return n&&r.push("("),r.push(s),n&&r.push(")"),F.concat(r)}function yd(i,t){const e=r=>Gi.printComments(r,t,n=>md(n,t,e)),s=e(new ud.FastPath(i));return jl.propagateBreaks(s),s}zn.buildDocFromAst=yd;var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});var Ot;(function(i){i[i.Flat=0]="Flat",i[i.Break=1]="Break"})(Ot||(Ot={}));function gd(i,t){const e={options:t,indentation:0,currentLineLength:0,mode:Ot.Break,lineSuffixes:[],renderedText:""};return qs(i,e),e.renderedText}Wn.printDocToString=gd;function $i(i,t){function e(s){return t.currentLineLength+s.length<=t.options.lineWidth?(t.currentLineLength+=s.length,!0):!1}if(typeof i=="string")return e(i);switch(i.type){case"concat":return i.parts.every(s=>$i(s,t));case"indent":return t.indentation++,$i(i.content,t)?(t.indentation--,!0):(t.indentation--,!1);case"group":return i.willBreak&&(t.mode=Ot.Break),$i(i.content,t);case"line":return t.mode===Ot.Flat&&!i.hard?i.soft?!0:e(" "):(t.currentLineLength=t.indentation,!0);case"lineSuffix":return!0}return!1}function qs(i,t){if(typeof i=="string")t.renderedText+=i,t.currentLineLength+=i.length;else switch(i.type){case"concat":for(const n of i.parts)qs(n,t);break;case"line":if(t.mode===Ot.Flat&&!i.hard){i.soft||(t.renderedText+=" ",t.currentLineLength+=1);break}if(t.lineSuffixes.length>0){const n=[...t.lineSuffixes];t.lineSuffixes.length=0;for(const a of n)qs(a.content,t)}t.renderedText.length>0&&(t.renderedText=t.renderedText.replace(/[^\S\n]*$/,""));const e=t.options.useTabs?" ".repeat(t.indentation):" ".repeat(t.indentation*t.options.indentCount);t.renderedText+=` -`+e,t.currentLineLength=e.length;break;case"indent":{t.indentation++,qs(i.content,t),t.indentation--;break}case"lineSuffix":t.lineSuffixes.push(i);break;case"group":const s=$i(i,Object.assign({},t,{mode:Ot.Flat})),r=t.mode;!i.willBreak&&s?t.mode=Ot.Flat:t.mode=Ot.Break,qs(i.content,t),t.mode=r;break}}var on={exports:{}};(function(i,t){(function(e,s,r){var n=t&&!t.nodeType&&t,a=i&&!i.nodeType&&i,o=n&&a&&typeof Nt=="object"&&Nt,l=a&&a.exports===n&&n;o&&(o.global===o||o.window===o||o.self===o)&&(e=o),r(n&&a?l?a.exports:n:e[s]={})})(Nt,"luaparse",function(e){e.version="0.2.1";var s,r,n,a=e.defaultOptions={wait:!1,comments:!0,scope:!1,locations:!1,ranges:!1,onCreateNode:null,onCreateScope:null,onDestroyScope:null,onLocalDeclaration:null,luaVersion:"5.1"},o=1,l=2,u=4,c=8,d=16,m=32,w=64,y=128,L=256;e.tokenTypes={EOF:o,StringLiteral:l,Keyword:u,Identifier:c,NumericLiteral:d,Punctuator:m,BooleanLiteral:w,NilLiteral:y,VarargLiteral:L};var C=e.errors={unexpected:"unexpected %1 '%2' near '%3'",expected:"'%1' expected near '%2'",expectedToken:"%1 expected near '%2'",unfinishedString:"unfinished string near '%1'",malformedNumber:"malformed number near '%1'",invalidVar:"invalid left-hand side of assignment near '%1'",decimalEscapeTooLarge:"decimal escape too large near '%1'",invalidEscape:"invalid escape sequence near '%1'",hexadecimalDigitExpected:"hexadecimal digit expected near '%1'",braceExpected:"missing '%1' near '%2'",tooLargeCodepoint:"UTF-8 value too large near '%1'",unfinishedLongString:"unfinished long string (starting at line %1) near '%2'",unfinishedLongComment:"unfinished long comment (starting at line %1) near '%2'"},I=e.ast={labelStatement:function(h){return{type:"LabelStatement",label:h}},breakStatement:function(){return{type:"BreakStatement"}},gotoStatement:function(h){return{type:"GotoStatement",label:h}},returnStatement:function(h){return{type:"ReturnStatement",arguments:h}},ifStatement:function(h){return{type:"IfStatement",clauses:h}},ifClause:function(h,A){return{type:"IfClause",condition:h,body:A}},elseifClause:function(h,A){return{type:"ElseifClause",condition:h,body:A}},elseClause:function(h){return{type:"ElseClause",body:h}},whileStatement:function(h,A){return{type:"WhileStatement",condition:h,body:A}},doStatement:function(h){return{type:"DoStatement",body:h}},repeatStatement:function(h,A){return{type:"RepeatStatement",condition:h,body:A}},localStatement:function(h,A){return{type:"LocalStatement",variables:h,init:A}},assignmentStatement:function(h,A){return{type:"AssignmentStatement",variables:h,init:A}},callStatement:function(h){return{type:"CallStatement",expression:h}},functionStatement:function(h,A,O,Z){return{type:"FunctionDeclaration",identifier:h,isLocal:O,parameters:A,body:Z}},forNumericStatement:function(h,A,O,Z,de){return{type:"ForNumericStatement",variable:h,start:A,end:O,step:Z,body:de}},forGenericStatement:function(h,A,O){return{type:"ForGenericStatement",variables:h,iterators:A,body:O}},chunk:function(h){return{type:"Chunk",body:h}},identifier:function(h){return{type:"Identifier",name:h}},literal:function(h,A,O){return h=h===l?"StringLiteral":h===d?"NumericLiteral":h===w?"BooleanLiteral":h===y?"NilLiteral":"VarargLiteral",{type:h,value:A,raw:O}},tableKey:function(h,A){return{type:"TableKey",key:h,value:A}},tableKeyString:function(h,A){return{type:"TableKeyString",key:h,value:A}},tableValue:function(h){return{type:"TableValue",value:h}},tableConstructorExpression:function(h){return{type:"TableConstructorExpression",fields:h}},binaryExpression:function(h,A,O){var Z=h==="and"||h==="or"?"LogicalExpression":"BinaryExpression";return{type:Z,operator:h,left:A,right:O}},unaryExpression:function(h,A){return{type:"UnaryExpression",operator:h,argument:A}},memberExpression:function(h,A,O){return{type:"MemberExpression",indexer:A,identifier:O,base:h}},indexExpression:function(h,A){return{type:"IndexExpression",base:h,index:A}},callExpression:function(h,A){return{type:"CallExpression",base:h,arguments:A}},tableCallExpression:function(h,A){return{type:"TableCallExpression",base:h,arguments:A}},stringCallExpression:function(h,A){return{type:"StringCallExpression",base:h,argument:A}},comment:function(h,A){return{type:"Comment",value:h,raw:A}}};function k(h){if($e){var A=Oe.pop();A.complete(),A.bless(h)}return r.onCreateNode&&r.onCreateNode(h),h}var j=Array.prototype.slice,$=function(A,O){for(var Z=0,de=A.length;Z=n)return{type:o,value:"",line:g,lineStart:E,range:[f,f]};var h=s.charCodeAt(f),A=s.charCodeAt(f+1);if(N=f,R(h))return re();switch(h){case 39:case 34:return Ie();case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return ze();case 46:return q(A)?ze():A===46?s.charCodeAt(f+2)===46?Re():he(".."):he(".");case 61:return he(A===61?"==":"=");case 62:return r.luaVersion==="5.3"&&A===62?he(">>"):he(A===61?">=":">");case 60:return r.luaVersion==="5.3"&&A===60?he("<<"):he(A===61?"<=":"<");case 126:if(A===61)return he("~=");if(r.luaVersion==="5.1"||r.luaVersion==="5.2")break;return he("~");case 58:return(r.luaVersion==="5.2"||r.luaVersion==="5.3")&&A===58?he("::"):he(":");case 91:return A===91||A===61?Te():he("[");case 47:return r.luaVersion==="5.3"&&A===47?he("//"):he("/");case 38:case 124:if(r.luaVersion==="5.1"||r.luaVersion==="5.2")break;case 42:case 94:case 37:case 44:case 123:case 125:case 93:case 40:case 41:case 59:case 35:case 45:case 43:return he(s.charAt(f))}return Y(s.charAt(f))}function ee(){var h=s.charCodeAt(f),A=s.charCodeAt(f+1);return B(h)?(h===10&&A===13&&++f,h===13&&A===10&&++f,++g,E=++f,!0):!1}function ce(){for(;f=n||B(we))&&(de+=s.slice(Z,f-1),p({},C.unfinishedString,de+String.fromCharCode(we)));return de+=s.slice(Z,f-1),{type:l,value:de,line:A,lineStart:O,lastLine:g,lastLineStart:E,range:[N,f]}}function Te(){var h=g,A=E,O=S(!1);return O===!1&&p(P,C.expected,"[",P.value),{type:l,value:O,line:h,lineStart:A,lastLine:g,lastLineStart:E,range:[N,f]}}function ze(){var h=s.charAt(f),A=s.charAt(f+1),O=h==="0"&&"xX".indexOf(A||null)>=0?at():Ge();return{type:d,value:O,line:g,lineStart:E,range:[N,f]}}function at(){var h=0,A=1,O=1,Z,de,we,Je;for(Je=f+=2,V(s.charCodeAt(f))||p({},C.malformedNumber,s.slice(N,f));V(s.charCodeAt(f));)++f;if(Z=parseInt(s.slice(Je,f),16),s.charAt(f)==="."){for(de=++f;V(s.charCodeAt(f));)++f;h=s.slice(de,f),h=de===f?0:parseInt(h,16)/Math.pow(16,f-de)}if("pP".indexOf(s.charAt(f)||null)>=0){for(++f,"+-".indexOf(s.charAt(f)||null)>=0&&(O=s.charAt(f++)==="+"?1:-1),we=f,q(s.charCodeAt(f))||p({},C.malformedNumber,s.slice(N,f));q(s.charCodeAt(f));)++f;A=s.slice(we,f),A=Math.pow(2,A*O)}return(Z+h)*A}function Ge(){for(;q(s.charCodeAt(f));)++f;if(s.charAt(f)===".")for(++f;q(s.charCodeAt(f));)++f;if("eE".indexOf(s.charAt(f)||null)>=0)for(++f,"+-".indexOf(s.charAt(f)||null)>=0&&++f,q(s.charCodeAt(f))||p({},C.malformedNumber,s.slice(N,f));q(s.charCodeAt(f));)++f;return parseFloat(s.slice(N,f))}function Qe(h){return h<128?String.fromCharCode(h):h<2048?String.fromCharCode(192|h>>6,128|h&63):h<65536?String.fromCharCode(224|h>>12,128|h>>6&63,128|h&63):h<1114112?String.fromCharCode(240|h>>18,128|h>>12&63,128|h>>6&63,128|h&63):null}function St(){var h=f++;for(s.charAt(f++)!=="{"&&p({},C.braceExpected,"{","\\"+s.slice(h,f)),V(s.charCodeAt(f))||p({},C.hexadecimalDigitExpected,"\\"+s.slice(h,f));s.charCodeAt(f)===48;)++f;for(var A=f;V(s.charCodeAt(f));)++f,f-A>6&&p({},C.tooLargeCodepoint,"\\"+s.slice(h,f));var O=s.charAt(f++);O!=="}"&&(O==='"'||O==="'"?p({},C.braceExpected,"}","\\"+s.slice(h,f--)):p({},C.hexadecimalDigitExpected,"\\"+s.slice(h,f)));var Z=parseInt(s.slice(A,f-1),16);return Z=Qe(Z),Z===null&&p({},C.tooLargeCodepoint,"\\"+s.slice(h,f)),Z}function rs(){var h=f;switch(s.charAt(f)){case"a":return++f,"\x07";case"n":return++f,` +`)return t;t++}return t}Ve.skipTrailingComment=$l;function Kf(i,t,e={searchBackwards:!1}){t=Dl(i,t,e);let s=null;for(;t!==s;)s=t,t=Ms(i,t,e);return t=$l(i,t),t=oi(i,t,e),Fl(i,t)}Ve.isNextLineEmpty=Kf;Object.defineProperty(is,"__esModule",{value:!0});const De=ut,_e=Ve;var wt;(function(i){i[i.Leading=0]="Leading",i[i.Trailing=1]="Trailing",i[i.Dangling=2]="Dangling",i[i.DanglingStatement=3]="DanglingStatement"})(wt||(wt={}));function Wf(i){const t=Object.keys(i),e=[];function s(r){if(r&&typeof r.type=="string"&&r.type!=="Comment"){let n;for(n=e.length-1;n>=0&&!(_e.locStart(e[n])<=_e.locStart(r)&&_e.locEnd(e[n])<=_e.locEnd(i));--n);e.splice(n+1,0,r)}}for(const r of t){const n=i[r];Array.isArray(n)?n.forEach(s):n&&s(n)}return e}function qf(i,t){for(const e of i.comments){Rl(i,e);const s=e.precedingNode,r=e.enclosingNode,n=e.followingNode;_e.hasNewLine(t.sourceText,_e.locStart(e),{searchBackwards:!0})?ed(r,e)||td(s,r,e)||sd(s,r,n,e)||(n?eo(n,e):s?to(s,e):_t(r||i,e)):id(s,r,e)||rd(s,r,e)||(s?to(s,e):n?eo(n,e):_t(r||i,e))}}is.attachComments=qf;function Gf(i,t){if(!t.sourceText.startsWith("#!"))return;const e=t.sourceText.indexOf(` +`),s=t.sourceText.slice(0,e),r=t.sourceText.slice(2,e);i.comments.push({type:"Comment",loc:{start:{line:1,column:0},end:{line:1,column:e}},range:[0,e],raw:s,value:r})}is.injectShebang=Gf;function Jf(i,t=!1){const e=i.getValue();if(!e||!e.attachedComments)return"";const s=[];return i.forEach(r=>{const n=r.getValue();n.commentType===wt.Dangling&&s.push(n.raw)},"attachedComments"),s.length===0?"":t?De.join(De.hardline,s):De.indent(De.concat([De.hardline,De.join(De.hardline,s)]))}is.printDanglingComments=Jf;function Xf(i){const t=i.getValue();if(!t||!t.attachedComments)return"";const e=[];return i.forEach(s=>{const r=s.getValue();r.commentType===wt.DanglingStatement&&(e.push(" "),e.push(r.raw))},"attachedComments"),e.length===0?"":De.concat(e)}is.printDanglingStatementComments=Xf;function Yf(i,t){const e=i.getValue();if(e.raw.startsWith("--[["))return De.concat([e.raw,_e.hasNewLine(t.sourceText,_e.locEnd(e))?De.hardline:" "]);const r=[];return r.push(e.raw),r.push(De.hardline),_e.isNextLineEmpty(t.sourceText,_e.locEnd(e))&&r.push(De.hardline),De.concat(r)}function Zf(i,t){const e=i.getValue();if(_e.hasNewLine(t.sourceText,_e.locStart(e),{searchBackwards:!0})){const r=_e.isPreviousLineEmpty(t.sourceText,_e.locStart(e));return De.concat([De.hardline,r?De.hardline:"",e.raw])}if(e.raw.startsWith("--[["))return De.concat([" ",e.raw]);const s=[];return _e.isNextLineEmpty(t.sourceText,_e.locStart(e),{searchBackwards:!0})&&s.push(De.hardline),s.push(" "),s.push(e.raw),s.push(De.breakParent),De.lineSuffix(De.concat(s))}function Qf(i,t,e){const s=i.getValue(),r=e(i),n=s.attachedComments;if(!n||n.length===0)return r;const a=[],o=[r];return i.forEach(l=>{switch(l.getValue().commentType){case wt.Leading:a.push(Yf(i,t));break;case wt.Trailing:o.push(Zf(i,t));break}},"attachedComments"),De.concat(a.concat(o))}is.printComments=Qf;function Rl(i,t){const e=Wf(i);let s=null,r=null,n=0,a=e.length;for(;n0?!1:t.parameters.length>0&&t.parameters[t.parameters.length-1]===i||i&&i.type==="Identifier"?(_t(t,e),!0):!1}function sd(i,t,e,s){return!t||t.type!=="IfStatement"?!1:e&&(e.type==="ElseifClause"||e.type==="ElseClause")||i&&i.type==="ElseClause"?(_t(i,s),!0):!1}function id(i,t,e){if(e.raw.startsWith("--[[")||!t)return!1;switch(t.type){case"WhileStatement":if(i===t.condition)return Kt(t,e),!0;break;case"DoStatement":case"RepeatStatement":if(i==null)return Kt(t,e),!0;break;case"FunctionDeclaration":if(t.parameters.length&&i===t.parameters[t.parameters.length-1]||i===t.identifier)return Kt(t,e),!0;break;case"ForNumericStatement":if(i===t.end||i===t.step)return Kt(t,e),!0;break;case"ForGenericStatement":if(i===t.iterators[t.iterators.length-1])return Kt(t,e),!0;break;case"IfClause":case"ElseifClause":if(i===t.condition&&e.loc.start.column>i.loc.start.column)return Kt(t,e),!0;break;case"ElseClause":if(i==null)return Kt(t,e),!0;break}return!1}function rd(i,t,e){if(!i||!t||t.type!=="IfStatement")return!1;switch(i.type){case"IfClause":case"ElseifClause":case"ElseClause":if(i.body.length===0)return Kt(i,e),!0;break}return!1}var zn={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const nd=Ve;class ad{constructor(t){this.stack=[t]}getValue(){return this.stack[this.stack.length-1]}getNodeAtDepth(t){for(let e=this.stack.length-1;e>=0;e-=2){const s=this.stack[e];if(nd.isNode(s)&&--t<0)return s}return null}getParent(t=0){return this.getNodeAtDepth(t+1)}call(t,e){const s=this.getValue(),r=this.stack.length;this.stack.push(e,s[e]);const n=t(this);return this.stack.length=r,n}forEach(t,e=null){let s=this.getValue();const r=this.stack.length;e&&(s=s[e],this.stack.push(s));for(let n=0;n{this.stack.push(o,a),r.push(t(this,o)),this.stack.length-=2}),this.stack.length=n,r}needsParens(){const t=this.getParent(),e=this.getValue();let s=!1;switch(e.type){case"FunctionDeclaration":case"Chunk":case"Identifier":case"BooleanLiteral":case"NilLiteral":case"NumericLiteral":case"StringLiteral":case"VarargLiteral":case"TableConstructorExpression":case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"MemberExpression":case"IndexExpression":case"CallExpression":case"TableCallExpression":case"StringCallExpression":s=e.inParens||!1}return t&&e.type==="UnaryExpression"&&t.type==="UnaryExpression"&&(s=!0),s}}Kn.FastPath=ad;var fr={};Object.defineProperty(fr,"__esModule",{value:!0});function Bl(i,t,e){let s=!1;const r=n=>{if(t(n)){s=!0;return}if(!s&&typeof n!="string"){switch(n.type){case"concat":n.parts.forEach(r);break;case"indent":case"group":case"lineSuffix":r(n.content);break}e&&e(n)}};r(i)}function od(i,t){let e=!1;return Bl(i,s=>t(s)?(e=!0,!0):!1),e}function ld(i){return od(i,t=>{if(typeof t=="string")return!1;switch(t.type){case"line":if(t.hard)return!0;break;case"group":if(t.willBreak)return!0}return!1})}fr.willBreak=ld;function so(i){i.length>0&&(i[i.length-1].willBreak=!0)}function cd(i){const t=[];Bl(i,e=>{if(typeof e=="string")return!1;switch(e.type){case"breakParent":so(t);break;case"group":t.push(e);break}return!1},e=>{if(typeof e=="string")return!1;if(e.type==="group"){const s=t.pop();s&&s.willBreak&&so(t)}return!1})}fr.propagateBreaks=cd;var dr={};(function(i){Object.defineProperty(i,"__esModule",{value:!0});var t;(function(r){r.StdOut="stdout",r.Replace="replace",r.Diff="diff"})(t=i.WriteMode||(i.WriteMode={})),i.defaultOptions={sourceText:"",lineWidth:120,indentCount:4,useTabs:!1,linebreakMultipleAssignments:!1,quotemark:"double",writeMode:t.StdOut};function e(r){return r==="single"?"'":'"'}i.getStringQuotemark=e;function s(r){return r==="single"?'"':"'"}i.getAlternativeStringQuotemark=s})(dr);Object.defineProperty(zn,"__esModule",{value:!0});const ud=Kn,F=ut,jl=fr,Gi=is,nn=Ve,an=dr;function Ul(i,t,e){const s=[];return i.forEach(r=>{const n=[e(r)];nn.isNextLineEmpty(t.sourceText,nn.locEnd(r.getValue()))&&!fd(i)&&n.push(F.hardline),s.push(F.concat(n))}),F.join(F.hardline,s)}function Et(i,t,e,s){const r=i.call(n=>Ul(n,t,e),s);return F.indent(F.concat([F.hardline,r]))}function Ct(i){return i.getValue().attachedComments?F.concat([Gi.printDanglingStatementComments(i),Gi.printDanglingComments(i)]):""}function hd(i,t){const e=an.getStringQuotemark(t),s=an.getAlternativeStringQuotemark(t==="single"?"single":"double"),r=i.replace(/\\([\s\S])|(['"])/g,(n,a,o)=>a===s?a:o===e?"\\"+o:n);return e+r+e}function pd(i,t){const e=i.getValue();if(e.type!=="StringLiteral")throw new Error("printStringLiteral: Expected StringLiteral, got "+e.type);if(e.raw.startsWith("[[")||e.raw.startsWith("[="))return e.raw;const s=e.raw.slice(1,-1);let r=t.quotemark;const n=an.getStringQuotemark(r);return s.includes(n)&&(r=r==="single"?"double":"single"),hd(s,r)}function fd(i){const t=i.getParent(),e=i.getValue(),s=t.body;return s&&s[s.length-1]===e}function dd(i,t,e){const s=i.getValue();if(!s)return"";const r=[],n=s;switch(n.type){case"Chunk":return r.push(i.call(y=>Ul(y,t,e),"body")),r.push(Gi.printDanglingComments(i,!0)),(n.body.length||n.attachedComments)&&r.push(F.hardline),F.concat(r);case"LabelStatement":return F.concat(["::",i.call(e,"label"),"::"]);case"GotoStatement":return F.concat(["goto ",i.call(e,"label")]);case"BreakStatement":return"break";case"ReturnStatement":return r.push("return"),n.arguments.length>0&&(r.push(" "),r.push(F.join(", ",i.map(e,"arguments")))),F.concat(r);case"WhileStatement":return r.push("while "),r.push(i.call(e,"condition")),r.push(" do"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"DoStatement":return r.push("do"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"RepeatStatement":return r.push("repeat"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"until "])),r.push(i.call(e,"condition")),F.concat(r);case"LocalStatement":case"AssignmentStatement":{const y=[];n.type==="LocalStatement"&&y.push("local ");const L=t.linebreakMultipleAssignments;y.push(F.indent(F.join(F.concat([",",L?F.hardline:F.line]),i.map(e,"variables"))));let C="";const I=[];n.init.length&&(C=" =",n.init.length>1?I.push(F.indent(F.join(F.concat([",",F.line]),i.map(e,"init")))):I.push(F.join(F.concat([",",F.line]),i.map(e,"init"))));const k=n.init.some(j=>j!=null&&j.type!=="TableConstructorExpression"&&j.type!=="FunctionDeclaration");return F.group(F.concat([F.group(F.concat(y)),F.group(F.concat([C,k?F.indent(F.line):" ",F.concat(I)]))]))}case"CallStatement":return i.call(e,"expression");case"FunctionDeclaration":return n.isLocal&&r.push("local "),r.push("function"),n.identifier&&r.push(" ",i.call(e,"identifier")),r.push(F.concat(["(",F.group(F.indent(F.concat([F.softline,F.join(F.concat([",",F.line]),i.map(e,"parameters"))]))),")"])),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.hardline,"end"),F.concat(r);case"ForNumericStatement":return r.push("for "),r.push(i.call(e,"variable")),r.push(" = "),r.push(i.call(e,"start")),r.push(", "),r.push(i.call(e,"end")),n.step&&(r.push(", "),r.push(i.call(e,"step"))),r.push(" do"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"ForGenericStatement":return r.push("for "),r.push(F.join(", ",i.map(e,"variables"))),r.push(" in "),r.push(F.join(", ",i.map(e,"iterators"))),r.push(" do"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"IfStatement":const a=[];return i.forEach(y=>{a.push(e(y))},"clauses"),r.push(F.join(F.hardline,a)),r.push(F.concat([F.hardline,"end"])),F.concat(r);case"IfClause":return r.push(F.concat(["if ",F.group(F.concat([F.indent(F.concat([F.softline,i.call(e,"condition")])),F.softline]))," then"])),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),F.concat(r);case"ElseifClause":return r.push(F.concat(["elseif ",F.group(F.concat([F.indent(F.concat([F.softline,i.call(e,"condition")])),F.softline]))," then"])),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),F.concat(r);case"ElseClause":return r.push("else"),r.push(Ct(i)),n.body.length&&r.push(Et(i,t,e,"body")),F.concat(r);case"BooleanLiteral":return n.raw;case"NilLiteral":return"nil";case"NumericLiteral":return n.raw;case"StringLiteral":return pd(i,t);case"VarargLiteral":return"...";case"Identifier":return n.name;case"BinaryExpression":case"LogicalExpression":const l=i.getParent().type!==n.type&&n.left.type!==n.type&&n.right.type!==n.type,u=F.concat([n.operator,F.line,i.call(e,"right")]);return F.group(F.concat([i.call(e,"left"),F.indent(F.concat([" ",l?F.group(u):u]))]));case"UnaryExpression":return r.push(n.operator),n.operator==="not"&&r.push(" "),r.push(i.call(e,"argument")),F.concat(r);case"MemberExpression":return F.concat([i.call(e,"base"),n.indexer,i.call(e,"identifier")]);case"IndexExpression":return F.concat([i.call(e,"base"),"[",F.group(F.concat([F.indent(F.concat([F.softline,i.call(e,"index")])),F.softline])),"]"]);case"CallExpression":const c=i.map(e,"arguments");return F.concat([i.call(e,"base"),F.group(F.concat(["(",F.indent(F.concat([F.softline,F.join(F.concat([",",F.line]),c)])),F.softline,")"]),c.some(jl.willBreak))]);case"TableCallExpression":return r.push(i.call(e,"base")),r.push(" "),r.push(i.call(e,"arguments")),F.concat(r);case"StringCallExpression":return r.push(i.call(e,"base")),r.push(" "),r.push(i.call(e,"argument")),F.concat(r);case"TableConstructorExpression":if(n.fields.length===0)return"{}";const d=[];let m=[];i.forEach(y=>{d.push(F.concat(m)),d.push(F.group(e(y))),m=[",",F.line]},"fields");const w=nn.hasNewLineInRange(t.sourceText,n.range[0],n.range[1]);return F.group(F.concat(["{",F.indent(F.concat([F.softline,F.concat(d)])),F.softline,"}"]),w);case"TableKeyString":return F.concat([i.call(e,"key")," = ",i.call(e,"value")]);case"TableKey":return F.concat(["[",i.call(e,"key"),"]"," = ",i.call(e,"value")]);case"TableValue":return i.call(e,"value")}throw new Error("Unhandled AST node: "+n.type)}function md(i,t,e){const s=dd(i,t,e),r=[],n=i.needsParens();return n&&r.push("("),r.push(s),n&&r.push(")"),F.concat(r)}function yd(i,t){const e=r=>Gi.printComments(r,t,n=>md(n,t,e)),s=e(new ud.FastPath(i));return jl.propagateBreaks(s),s}zn.buildDocFromAst=yd;var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});var Ot;(function(i){i[i.Flat=0]="Flat",i[i.Break=1]="Break"})(Ot||(Ot={}));function gd(i,t){const e={options:t,indentation:0,currentLineLength:0,mode:Ot.Break,lineSuffixes:[],renderedText:""};return qs(i,e),e.renderedText}Wn.printDocToString=gd;function $i(i,t){function e(s){return t.currentLineLength+s.length<=t.options.lineWidth?(t.currentLineLength+=s.length,!0):!1}if(typeof i=="string")return e(i);switch(i.type){case"concat":return i.parts.every(s=>$i(s,t));case"indent":return t.indentation++,$i(i.content,t)?(t.indentation--,!0):(t.indentation--,!1);case"group":return i.willBreak&&(t.mode=Ot.Break),$i(i.content,t);case"line":return t.mode===Ot.Flat&&!i.hard?i.soft?!0:e(" "):(t.currentLineLength=t.indentation,!0);case"lineSuffix":return!0}return!1}function qs(i,t){if(typeof i=="string")t.renderedText+=i,t.currentLineLength+=i.length;else switch(i.type){case"concat":for(const n of i.parts)qs(n,t);break;case"line":if(t.mode===Ot.Flat&&!i.hard){i.soft||(t.renderedText+=" ",t.currentLineLength+=1);break}if(t.lineSuffixes.length>0){const n=[...t.lineSuffixes];t.lineSuffixes.length=0;for(const a of n)qs(a.content,t)}t.renderedText.length>0&&(t.renderedText=t.renderedText.replace(/[^\S\n]*$/,""));const e=t.options.useTabs?" ".repeat(t.indentation):" ".repeat(t.indentation*t.options.indentCount);t.renderedText+=` +`+e,t.currentLineLength=e.length;break;case"indent":{t.indentation++,qs(i.content,t),t.indentation--;break}case"lineSuffix":t.lineSuffixes.push(i);break;case"group":const s=$i(i,Object.assign({},t,{mode:Ot.Flat})),r=t.mode;!i.willBreak&&s?t.mode=Ot.Flat:t.mode=Ot.Break,qs(i.content,t),t.mode=r;break}}var on={exports:{}};(function(i,t){(function(e,s,r){var n=t&&!t.nodeType&&t,a=i&&!i.nodeType&&i,o=n&&a&&typeof Nt=="object"&&Nt,l=a&&a.exports===n&&n;o&&(o.global===o||o.window===o||o.self===o)&&(e=o),r(n&&a?l?a.exports:n:e[s]={})})(Nt,"luaparse",function(e){e.version="0.2.1";var s,r,n,a=e.defaultOptions={wait:!1,comments:!0,scope:!1,locations:!1,ranges:!1,onCreateNode:null,onCreateScope:null,onDestroyScope:null,onLocalDeclaration:null,luaVersion:"5.1"},o=1,l=2,u=4,c=8,d=16,m=32,w=64,y=128,L=256;e.tokenTypes={EOF:o,StringLiteral:l,Keyword:u,Identifier:c,NumericLiteral:d,Punctuator:m,BooleanLiteral:w,NilLiteral:y,VarargLiteral:L};var C=e.errors={unexpected:"unexpected %1 '%2' near '%3'",expected:"'%1' expected near '%2'",expectedToken:"%1 expected near '%2'",unfinishedString:"unfinished string near '%1'",malformedNumber:"malformed number near '%1'",invalidVar:"invalid left-hand side of assignment near '%1'",decimalEscapeTooLarge:"decimal escape too large near '%1'",invalidEscape:"invalid escape sequence near '%1'",hexadecimalDigitExpected:"hexadecimal digit expected near '%1'",braceExpected:"missing '%1' near '%2'",tooLargeCodepoint:"UTF-8 value too large near '%1'",unfinishedLongString:"unfinished long string (starting at line %1) near '%2'",unfinishedLongComment:"unfinished long comment (starting at line %1) near '%2'"},I=e.ast={labelStatement:function(h){return{type:"LabelStatement",label:h}},breakStatement:function(){return{type:"BreakStatement"}},gotoStatement:function(h){return{type:"GotoStatement",label:h}},returnStatement:function(h){return{type:"ReturnStatement",arguments:h}},ifStatement:function(h){return{type:"IfStatement",clauses:h}},ifClause:function(h,A){return{type:"IfClause",condition:h,body:A}},elseifClause:function(h,A){return{type:"ElseifClause",condition:h,body:A}},elseClause:function(h){return{type:"ElseClause",body:h}},whileStatement:function(h,A){return{type:"WhileStatement",condition:h,body:A}},doStatement:function(h){return{type:"DoStatement",body:h}},repeatStatement:function(h,A){return{type:"RepeatStatement",condition:h,body:A}},localStatement:function(h,A){return{type:"LocalStatement",variables:h,init:A}},assignmentStatement:function(h,A){return{type:"AssignmentStatement",variables:h,init:A}},callStatement:function(h){return{type:"CallStatement",expression:h}},functionStatement:function(h,A,O,Z){return{type:"FunctionDeclaration",identifier:h,isLocal:O,parameters:A,body:Z}},forNumericStatement:function(h,A,O,Z,de){return{type:"ForNumericStatement",variable:h,start:A,end:O,step:Z,body:de}},forGenericStatement:function(h,A,O){return{type:"ForGenericStatement",variables:h,iterators:A,body:O}},chunk:function(h){return{type:"Chunk",body:h}},identifier:function(h){return{type:"Identifier",name:h}},literal:function(h,A,O){return h=h===l?"StringLiteral":h===d?"NumericLiteral":h===w?"BooleanLiteral":h===y?"NilLiteral":"VarargLiteral",{type:h,value:A,raw:O}},tableKey:function(h,A){return{type:"TableKey",key:h,value:A}},tableKeyString:function(h,A){return{type:"TableKeyString",key:h,value:A}},tableValue:function(h){return{type:"TableValue",value:h}},tableConstructorExpression:function(h){return{type:"TableConstructorExpression",fields:h}},binaryExpression:function(h,A,O){var Z=h==="and"||h==="or"?"LogicalExpression":"BinaryExpression";return{type:Z,operator:h,left:A,right:O}},unaryExpression:function(h,A){return{type:"UnaryExpression",operator:h,argument:A}},memberExpression:function(h,A,O){return{type:"MemberExpression",indexer:A,identifier:O,base:h}},indexExpression:function(h,A){return{type:"IndexExpression",base:h,index:A}},callExpression:function(h,A){return{type:"CallExpression",base:h,arguments:A}},tableCallExpression:function(h,A){return{type:"TableCallExpression",base:h,arguments:A}},stringCallExpression:function(h,A){return{type:"StringCallExpression",base:h,argument:A}},comment:function(h,A){return{type:"Comment",value:h,raw:A}}};function k(h){if($e){var A=Oe.pop();A.complete(),A.bless(h)}return r.onCreateNode&&r.onCreateNode(h),h}var j=Array.prototype.slice,$=function(A,O){for(var Z=0,de=A.length;Z=n)return{type:o,value:"",line:g,lineStart:E,range:[f,f]};var h=s.charCodeAt(f),A=s.charCodeAt(f+1);if(N=f,B(h))return re();switch(h){case 39:case 34:return Ie();case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return ze();case 46:return q(A)?ze():A===46?s.charCodeAt(f+2)===46?Be():he(".."):he(".");case 61:return he(A===61?"==":"=");case 62:return r.luaVersion==="5.3"&&A===62?he(">>"):he(A===61?">=":">");case 60:return r.luaVersion==="5.3"&&A===60?he("<<"):he(A===61?"<=":"<");case 126:if(A===61)return he("~=");if(r.luaVersion==="5.1"||r.luaVersion==="5.2")break;return he("~");case 58:return(r.luaVersion==="5.2"||r.luaVersion==="5.3")&&A===58?he("::"):he(":");case 91:return A===91||A===61?Te():he("[");case 47:return r.luaVersion==="5.3"&&A===47?he("//"):he("/");case 38:case 124:if(r.luaVersion==="5.1"||r.luaVersion==="5.2")break;case 42:case 94:case 37:case 44:case 123:case 125:case 93:case 40:case 41:case 59:case 35:case 45:case 43:return he(s.charAt(f))}return Y(s.charAt(f))}function ee(){var h=s.charCodeAt(f),A=s.charCodeAt(f+1);return R(h)?(h===10&&A===13&&++f,h===13&&A===10&&++f,++g,E=++f,!0):!1}function ce(){for(;f=n||R(we))&&(de+=s.slice(Z,f-1),p({},C.unfinishedString,de+String.fromCharCode(we)));return de+=s.slice(Z,f-1),{type:l,value:de,line:A,lineStart:O,lastLine:g,lastLineStart:E,range:[N,f]}}function Te(){var h=g,A=E,O=S(!1);return O===!1&&p(P,C.expected,"[",P.value),{type:l,value:O,line:h,lineStart:A,lastLine:g,lastLineStart:E,range:[N,f]}}function ze(){var h=s.charAt(f),A=s.charAt(f+1),O=h==="0"&&"xX".indexOf(A||null)>=0?at():Ge();return{type:d,value:O,line:g,lineStart:E,range:[N,f]}}function at(){var h=0,A=1,O=1,Z,de,we,Je;for(Je=f+=2,V(s.charCodeAt(f))||p({},C.malformedNumber,s.slice(N,f));V(s.charCodeAt(f));)++f;if(Z=parseInt(s.slice(Je,f),16),s.charAt(f)==="."){for(de=++f;V(s.charCodeAt(f));)++f;h=s.slice(de,f),h=de===f?0:parseInt(h,16)/Math.pow(16,f-de)}if("pP".indexOf(s.charAt(f)||null)>=0){for(++f,"+-".indexOf(s.charAt(f)||null)>=0&&(O=s.charAt(f++)==="+"?1:-1),we=f,q(s.charCodeAt(f))||p({},C.malformedNumber,s.slice(N,f));q(s.charCodeAt(f));)++f;A=s.slice(we,f),A=Math.pow(2,A*O)}return(Z+h)*A}function Ge(){for(;q(s.charCodeAt(f));)++f;if(s.charAt(f)===".")for(++f;q(s.charCodeAt(f));)++f;if("eE".indexOf(s.charAt(f)||null)>=0)for(++f,"+-".indexOf(s.charAt(f)||null)>=0&&++f,q(s.charCodeAt(f))||p({},C.malformedNumber,s.slice(N,f));q(s.charCodeAt(f));)++f;return parseFloat(s.slice(N,f))}function Qe(h){return h<128?String.fromCharCode(h):h<2048?String.fromCharCode(192|h>>6,128|h&63):h<65536?String.fromCharCode(224|h>>12,128|h>>6&63,128|h&63):h<1114112?String.fromCharCode(240|h>>18,128|h>>12&63,128|h>>6&63,128|h&63):null}function St(){var h=f++;for(s.charAt(f++)!=="{"&&p({},C.braceExpected,"{","\\"+s.slice(h,f)),V(s.charCodeAt(f))||p({},C.hexadecimalDigitExpected,"\\"+s.slice(h,f));s.charCodeAt(f)===48;)++f;for(var A=f;V(s.charCodeAt(f));)++f,f-A>6&&p({},C.tooLargeCodepoint,"\\"+s.slice(h,f));var O=s.charAt(f++);O!=="}"&&(O==='"'||O==="'"?p({},C.braceExpected,"}","\\"+s.slice(h,f--)):p({},C.hexadecimalDigitExpected,"\\"+s.slice(h,f)));var Z=parseInt(s.slice(A,f-1),16);return Z=Qe(Z),Z===null&&p({},C.tooLargeCodepoint,"\\"+s.slice(h,f)),Z}function rs(){var h=f;switch(s.charAt(f)){case"a":return++f,"\x07";case"n":return++f,` `;case"r":return++f,"\r";case"t":return++f," ";case"v":return++f,"\v";case"b":return++f,"\b";case"f":return++f,"\f";case"\r":case` `:return ee(),` -`;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;q(s.charCodeAt(f))&&f-h<3;)++f;var A=parseInt(s.slice(h,f),10);return A>255&&p({},C.decimalEscapeTooLarge,"\\"+A),String.fromCharCode(A);case"z":if(r.luaVersion==="5.2"||r.luaVersion==="5.3")return++f,ce(),"";case"x":if(r.luaVersion==="5.2"||r.luaVersion==="5.3"){if(V(s.charCodeAt(f+1))&&V(s.charCodeAt(f+2)))return f+=3,String.fromCharCode(parseInt(s.slice(h+1,f),16));p({},C.hexadecimalDigitExpected,"\\"+s.slice(h,f+2))}case"u":if(r.luaVersion==="5.3")return St();default:(r.luaVersion==="5.2"||r.luaVersion==="5.3")&&p({},C.invalidEscape,"\\"+s.slice(h,f+1));case"\\":case'"':case"'":return s.charAt(f++)}}function x(){N=f,f+=2;var h=s.charAt(f),A="",O=!1,Z=f,de=E,we=g;if(h==="["&&(A=S(!0),A===!1?A=h:O=!0),!O){for(;f")}function M(){z=P,P=H,H=W()}function _(h){return h===P.value?(M(),!0):!1}function D(h){h===P.value?M():p(P,C.expected,h,P.value)}function J(h){return h===9||h===32||h===11||h===12}function B(h){return h===10||h===13}function q(h){return h>=48&&h<=57}function V(h){return h>=48&&h<=57||h>=97&&h<=102||h>=65&&h<=70}function R(h){return h>=65&&h<=90||h>=97&&h<=122||h===95}function te(h){return h>=65&&h<=90||h>=97&&h<=122||h===95||h>=48&&h<=57}function ne(h){switch(h.length){case 2:return h==="do"||h==="if"||h==="in"||h==="or";case 3:return h==="and"||h==="end"||h==="for"||h==="not";case 4:return h==="else"||h==="then"?!0:r.luaVersion==="5.2"||r.luaVersion==="5.3"?h==="goto":!1;case 5:return h==="break"||h==="local"||h==="until"||h==="while";case 6:return h==="elseif"||h==="repeat"||h==="return";case 8:return h==="function"}return!1}function ae(h){return m===h.type?"#-~".indexOf(h.value)>=0:u===h.type?h.value==="not":!1}function pe(h){switch(h.type){case"CallExpression":case"TableCallExpression":case"StringCallExpression":return!0}return!1}function U(h){if(o===h.type)return!0;if(u!==h.type)return!1;switch(h.value){case"else":case"elseif":case"end":case"until":return!0;default:return!1}}var G,se,ue;function ye(){var h=Array.apply(null,G[se++]);G.push(h),r.onCreateScope&&r.onCreateScope()}function Ne(){G.pop(),se--,r.onDestroyScope&&r.onDestroyScope()}function Bt(h){r.onLocalDeclaration&&r.onLocalDeclaration(h),$(G[se],h)===-1&&G[se].push(h)}function ot(h){Bt(h.name),ns(h,!0)}function ns(h,A){!A&&T(ue,"name",h.name)===-1&&ue.push(h),h.isLocal=A}function Ke(h){return $(G[se],h)!==-1}var Oe=[],$e;function Rt(){return new fi(P)}function fi(h){r.locations&&(this.loc={start:{line:h.line,column:h.range[0]-h.lineStart},end:{line:0,column:0}}),r.ranges&&(this.range=[h.range[0],0])}fi.prototype.complete=function(){r.locations&&(this.loc.end.line=z.lastLine||z.line,this.loc.end.column=z.range[1]-(z.lastLineStart||z.lineStart)),r.ranges&&(this.range[1]=z.range[1])},fi.prototype.bless=function(h){if(this.loc){var A=this.loc;h.loc={start:{line:A.start.line,column:A.start.column},end:{line:A.end.line,column:A.end.column}}}this.range&&(h.range=[this.range[0],this.range[1]])};function Ts(){$e&&Oe.push(Rt())}function et(h){$e&&Oe.push(h)}function lc(){M(),Ts(),r.scope&&ye();var h=yt();return r.scope&&Ne(),o!==P.type&&Y(P),$e&&!h.length&&(z=P),k(I.chunk(h))}function yt(h){for(var A=[],O;!U(P);){if(P.value==="return"){A.push(Yn());break}O=Yn(),_(";"),O&&A.push(O)}return A}function Yn(){if(Ts(),u===P.type)switch(P.value){case"local":return M(),xc();case"if":return M(),yc();case"return":return M(),mc();case"function":M();var h=Pc();return yr(h);case"while":return M(),fc();case"for":return M(),gc();case"repeat":return M(),dc();case"break":return M(),uc();case"do":return M(),pc();case"goto":return M(),hc()}if(m===P.type&&_("::"))return cc();if($e&&Oe.pop(),!((r.luaVersion==="5.2"||r.luaVersion==="5.3")&&_(";")))return bc()}function cc(){var h=P.value,A=tt();return r.scope&&(Bt("::"+h+"::"),ns(A,!0)),D("::"),k(I.labelStatement(A))}function uc(){return k(I.breakStatement())}function hc(){P.value;var h=tt();return k(I.gotoStatement(h))}function pc(){r.scope&&ye();var h=yt();return r.scope&&Ne(),D("end"),k(I.doStatement(h))}function fc(){var h=je();D("do"),r.scope&&ye();var A=yt();return r.scope&&Ne(),D("end"),k(I.whileStatement(h,A))}function dc(){r.scope&&ye();var h=yt();D("until");var A=je();return r.scope&&Ne(),k(I.repeatStatement(A,h))}function mc(){var h=[];if(P.value!=="end"){var A=di();for(A!=null&&h.push(A);_(",");)A=je(),h.push(A);_(";")}return k(I.returnStatement(h))}function yc(){var h=[],A,O,Z;for($e&&(Z=Oe[Oe.length-1],Oe.push(Z)),A=je(),D("then"),r.scope&&ye(),O=yt(),r.scope&&Ne(),h.push(k(I.ifClause(A,O))),$e&&(Z=Rt());_("elseif");)et(Z),A=je(),D("then"),r.scope&&ye(),O=yt(),r.scope&&Ne(),h.push(k(I.elseifClause(A,O))),$e&&(Z=Rt());return _("else")&&($e&&(Z=new fi(z),Oe.push(Z)),r.scope&&ye(),O=yt(),r.scope&&Ne(),h.push(k(I.elseClause(O)))),D("end"),k(I.ifStatement(h))}function gc(){var h=tt(),A;if(r.scope&&(ye(),ot(h)),_("=")){var O=je();D(",");var Z=je(),de=_(",")?je():null;return D("do"),A=yt(),D("end"),r.scope&&Ne(),k(I.forNumericStatement(h,O,Z,de,A))}else{for(var we=[h];_(",");)h=tt(),r.scope&&ot(h),we.push(h);D("in");var Je=[];do{var Ds=je();Je.push(Ds)}while(_(","));return D("do"),A=yt(),D("end"),r.scope&&Ne(),k(I.forGenericStatement(we,Je,A))}}function xc(){var h;if(c===P.type){var A=[],O=[];do h=tt(),A.push(h);while(_(","));if(_("="))do{var Z=je();O.push(Z)}while(_(","));if(r.scope)for(var de=0,we=A.length;de",P)}function Zn(h){(h.inParens||["Identifier","MemberExpression","IndexExpression"].indexOf(h.type)===-1)&&p(P,C.invalidVar,P.value)}function bc(){var h=P,A,O;if($e&&(O=Rt()),A=xr(),A==null)return Y(P);if(",=".indexOf(P.value)>=0){var Z=[A],de=[],we;for(Zn(A);_(",");)we=xr(),we==null&&X("",P),Zn(we),Z.push(we);D("=");do we=je(),de.push(we);while(_(","));return et(O),k(I.assignmentStatement(Z,de))}return pe(A)?(et(O),k(I.callStatement(A))):Y(h)}function tt(){Ts();var h=P.value;return c!==P.type&&X("",P),M(),k(I.identifier(h))}function yr(h,A){var O=[];if(D("("),!_(")"))for(;;)if(c===P.type){var Z=tt();if(r.scope&&ot(Z),O.push(Z),_(","))continue;if(_(")"))break}else if(L===P.type){O.push(Pr()),D(")");break}else X(" or '...'",P);var de=yt();return D("end"),r.scope&&Ne(),A=A||!1,k(I.functionStatement(h,O,A,de))}function Pc(){var h,A,O;for($e&&(O=Rt()),h=tt(),r.scope&&(ns(h,Ke(h.name)),ye());_(".");)et(O),A=tt(),h=k(I.memberExpression(h,".",A));return _(":")&&(et(O),A=tt(),h=k(I.memberExpression(h,":",A)),r.scope&&Bt("self")),h}function Qn(){for(var h=[],A,O;;){if(Ts(),m===P.type&&_("["))A=je(),D("]"),D("="),O=je(),h.push(k(I.tableKey(A,O)));else if(c===P.type)H.value==="="?(A=tt(),M(),O=je(),h.push(k(I.tableKeyString(A,O)))):(O=je(),h.push(k(I.tableValue(O))));else{if((O=di())==null){Oe.pop();break}h.push(k(I.tableValue(O)))}if(",;".indexOf(P.value)>=0){M();continue}break}return D("}"),k(I.tableConstructorExpression(h))}function di(){var h=gr(0);return h}function je(){var h=di();if(h==null)X("",P);else return h}function Tc(h){var A=h.charCodeAt(0),O=h.length;if(O===1)switch(A){case 94:return 12;case 42:case 47:case 37:return 10;case 43:case 45:return 9;case 38:return 6;case 126:return 5;case 124:return 4;case 60:case 62:return 3}else if(O===2)switch(A){case 47:return 10;case 46:return 8;case 60:case 62:return h==="<<"||h===">>"?7:3;case 61:case 126:return 3;case 111:return 1}else if(A===97&&h==="and")return 2;return 0}function gr(h){var A=P.value,O,Z;if($e&&(Z=Rt()),ae(P)){Ts(),M();var de=gr(10);de==null&&X("",P),O=k(I.unaryExpression(A,de))}if(O==null&&(O=Pr(),O==null&&(O=xr())),O==null)return null;for(var we;A=P.value,we=m===P.type||u===P.type?Tc(A):0,!(we===0||we<=h);){(A==="^"||A==="..")&&we--,M();var Je=gr(we);Je==null&&X("",P),$e&&Oe.push(Z),O=k(I.binaryExpression(A,O,Je))}return O}function xr(){var h,A,O;if($e&&(O=Rt()),c===P.type)A=P.value,h=tt(),r.scope&&ns(h,Ke(A));else if(_("("))h=je(),D(")"),h.inParens=!0;else return null;for(var Z,de;;)if(m===P.type)switch(P.value){case"[":et(O),M(),Z=je(),D("]"),h=k(I.indexExpression(h,Z));break;case".":et(O),M(),de=tt(),h=k(I.memberExpression(h,".",de));break;case":":et(O),M(),de=tt(),h=k(I.memberExpression(h,":",de)),et(O),h=br(h);break;case"(":case"{":et(O),h=br(h);break;default:return h}else if(l===P.type)et(O),h=br(h);else break;return h}function br(h){if(m===P.type)switch(P.value){case"(":M();var A=[],O=di();for(O!=null&&A.push(O);_(",");)O=je(),A.push(O);return D(")"),k(I.callExpression(h,A));case"{":Ts(),M();var Z=Qn();return k(I.tableCallExpression(h,Z))}else if(l===P.type)return k(I.stringCallExpression(h,Pr()));X("function arguments",P)}function Pr(){var h=l|d|w|y|L,A=P.value,O=P.type,Z;if($e&&(Z=Rt()),O&h){et(Z);var de=s.slice(P.range[0],P.range[1]);return M(),k(I.literal(O,A,de))}else{if(u===O&&A==="function")return et(Z),M(),r.scope&&ye(),yr(null);if(_("{"))return et(Z),Qn()}}e.parse=Ac;function Ac(h,A){if(typeof A=="undefined"&&typeof h=="object"&&(A=h,h=void 0),A||(A={}),s=h||"",r=Pe(a,A),f=0,g=1,E=0,n=s.length,G=[[]],se=0,ue=[],Oe=[],!(r.luaVersion==="5.1"||r.luaVersion==="5.2"||r.luaVersion==="5.3"))throw new Error(K("Lua version '%1' not supported",r.luaVersion));return r.comments&&(v=[]),r.wait?e:ta()}e.write=ea;function ea(h){return s+=String(h),n=s.length,e}e.end=ta;function ta(h){typeof h!="undefined"&&ea(h),s&&s.substr(0,2)==="#!"&&(s=s.replace(/^.*/,function(O){return O.replace(/./g," ")})),n=s.length,$e=r.locations||r.ranges,H=W();var A=lc();if(r.comments&&(A.comments=v),r.scope&&(A.globals=ue),Oe.length>0)throw new Error("Location tracking failed. This is most likely a bug in luaparse");return A}})})(on,on.exports);var Hl={exports:{}};/*! +`;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;q(s.charCodeAt(f))&&f-h<3;)++f;var A=parseInt(s.slice(h,f),10);return A>255&&p({},C.decimalEscapeTooLarge,"\\"+A),String.fromCharCode(A);case"z":if(r.luaVersion==="5.2"||r.luaVersion==="5.3")return++f,ce(),"";case"x":if(r.luaVersion==="5.2"||r.luaVersion==="5.3"){if(V(s.charCodeAt(f+1))&&V(s.charCodeAt(f+2)))return f+=3,String.fromCharCode(parseInt(s.slice(h+1,f),16));p({},C.hexadecimalDigitExpected,"\\"+s.slice(h,f+2))}case"u":if(r.luaVersion==="5.3")return St();default:(r.luaVersion==="5.2"||r.luaVersion==="5.3")&&p({},C.invalidEscape,"\\"+s.slice(h,f+1));case"\\":case'"':case"'":return s.charAt(f++)}}function x(){N=f,f+=2;var h=s.charAt(f),A="",O=!1,Z=f,de=E,we=g;if(h==="["&&(A=S(!0),A===!1?A=h:O=!0),!O){for(;f")}function M(){z=P,P=H,H=W()}function _(h){return h===P.value?(M(),!0):!1}function D(h){h===P.value?M():p(P,C.expected,h,P.value)}function J(h){return h===9||h===32||h===11||h===12}function R(h){return h===10||h===13}function q(h){return h>=48&&h<=57}function V(h){return h>=48&&h<=57||h>=97&&h<=102||h>=65&&h<=70}function B(h){return h>=65&&h<=90||h>=97&&h<=122||h===95}function te(h){return h>=65&&h<=90||h>=97&&h<=122||h===95||h>=48&&h<=57}function ne(h){switch(h.length){case 2:return h==="do"||h==="if"||h==="in"||h==="or";case 3:return h==="and"||h==="end"||h==="for"||h==="not";case 4:return h==="else"||h==="then"?!0:r.luaVersion==="5.2"||r.luaVersion==="5.3"?h==="goto":!1;case 5:return h==="break"||h==="local"||h==="until"||h==="while";case 6:return h==="elseif"||h==="repeat"||h==="return";case 8:return h==="function"}return!1}function ae(h){return m===h.type?"#-~".indexOf(h.value)>=0:u===h.type?h.value==="not":!1}function pe(h){switch(h.type){case"CallExpression":case"TableCallExpression":case"StringCallExpression":return!0}return!1}function U(h){if(o===h.type)return!0;if(u!==h.type)return!1;switch(h.value){case"else":case"elseif":case"end":case"until":return!0;default:return!1}}var G,se,ue;function ye(){var h=Array.apply(null,G[se++]);G.push(h),r.onCreateScope&&r.onCreateScope()}function Ne(){G.pop(),se--,r.onDestroyScope&&r.onDestroyScope()}function Rt(h){r.onLocalDeclaration&&r.onLocalDeclaration(h),$(G[se],h)===-1&&G[se].push(h)}function ot(h){Rt(h.name),ns(h,!0)}function ns(h,A){!A&&T(ue,"name",h.name)===-1&&ue.push(h),h.isLocal=A}function Ke(h){return $(G[se],h)!==-1}var Oe=[],$e;function Bt(){return new fi(P)}function fi(h){r.locations&&(this.loc={start:{line:h.line,column:h.range[0]-h.lineStart},end:{line:0,column:0}}),r.ranges&&(this.range=[h.range[0],0])}fi.prototype.complete=function(){r.locations&&(this.loc.end.line=z.lastLine||z.line,this.loc.end.column=z.range[1]-(z.lastLineStart||z.lineStart)),r.ranges&&(this.range[1]=z.range[1])},fi.prototype.bless=function(h){if(this.loc){var A=this.loc;h.loc={start:{line:A.start.line,column:A.start.column},end:{line:A.end.line,column:A.end.column}}}this.range&&(h.range=[this.range[0],this.range[1]])};function Ts(){$e&&Oe.push(Bt())}function et(h){$e&&Oe.push(h)}function lc(){M(),Ts(),r.scope&&ye();var h=yt();return r.scope&&Ne(),o!==P.type&&Y(P),$e&&!h.length&&(z=P),k(I.chunk(h))}function yt(h){for(var A=[],O;!U(P);){if(P.value==="return"){A.push(Yn());break}O=Yn(),_(";"),O&&A.push(O)}return A}function Yn(){if(Ts(),u===P.type)switch(P.value){case"local":return M(),xc();case"if":return M(),yc();case"return":return M(),mc();case"function":M();var h=Pc();return yr(h);case"while":return M(),fc();case"for":return M(),gc();case"repeat":return M(),dc();case"break":return M(),uc();case"do":return M(),pc();case"goto":return M(),hc()}if(m===P.type&&_("::"))return cc();if($e&&Oe.pop(),!((r.luaVersion==="5.2"||r.luaVersion==="5.3")&&_(";")))return bc()}function cc(){var h=P.value,A=tt();return r.scope&&(Rt("::"+h+"::"),ns(A,!0)),D("::"),k(I.labelStatement(A))}function uc(){return k(I.breakStatement())}function hc(){P.value;var h=tt();return k(I.gotoStatement(h))}function pc(){r.scope&&ye();var h=yt();return r.scope&&Ne(),D("end"),k(I.doStatement(h))}function fc(){var h=je();D("do"),r.scope&&ye();var A=yt();return r.scope&&Ne(),D("end"),k(I.whileStatement(h,A))}function dc(){r.scope&&ye();var h=yt();D("until");var A=je();return r.scope&&Ne(),k(I.repeatStatement(A,h))}function mc(){var h=[];if(P.value!=="end"){var A=di();for(A!=null&&h.push(A);_(",");)A=je(),h.push(A);_(";")}return k(I.returnStatement(h))}function yc(){var h=[],A,O,Z;for($e&&(Z=Oe[Oe.length-1],Oe.push(Z)),A=je(),D("then"),r.scope&&ye(),O=yt(),r.scope&&Ne(),h.push(k(I.ifClause(A,O))),$e&&(Z=Bt());_("elseif");)et(Z),A=je(),D("then"),r.scope&&ye(),O=yt(),r.scope&&Ne(),h.push(k(I.elseifClause(A,O))),$e&&(Z=Bt());return _("else")&&($e&&(Z=new fi(z),Oe.push(Z)),r.scope&&ye(),O=yt(),r.scope&&Ne(),h.push(k(I.elseClause(O)))),D("end"),k(I.ifStatement(h))}function gc(){var h=tt(),A;if(r.scope&&(ye(),ot(h)),_("=")){var O=je();D(",");var Z=je(),de=_(",")?je():null;return D("do"),A=yt(),D("end"),r.scope&&Ne(),k(I.forNumericStatement(h,O,Z,de,A))}else{for(var we=[h];_(",");)h=tt(),r.scope&&ot(h),we.push(h);D("in");var Je=[];do{var Ds=je();Je.push(Ds)}while(_(","));return D("do"),A=yt(),D("end"),r.scope&&Ne(),k(I.forGenericStatement(we,Je,A))}}function xc(){var h;if(c===P.type){var A=[],O=[];do h=tt(),A.push(h);while(_(","));if(_("="))do{var Z=je();O.push(Z)}while(_(","));if(r.scope)for(var de=0,we=A.length;de",P)}function Zn(h){(h.inParens||["Identifier","MemberExpression","IndexExpression"].indexOf(h.type)===-1)&&p(P,C.invalidVar,P.value)}function bc(){var h=P,A,O;if($e&&(O=Bt()),A=xr(),A==null)return Y(P);if(",=".indexOf(P.value)>=0){var Z=[A],de=[],we;for(Zn(A);_(",");)we=xr(),we==null&&X("",P),Zn(we),Z.push(we);D("=");do we=je(),de.push(we);while(_(","));return et(O),k(I.assignmentStatement(Z,de))}return pe(A)?(et(O),k(I.callStatement(A))):Y(h)}function tt(){Ts();var h=P.value;return c!==P.type&&X("",P),M(),k(I.identifier(h))}function yr(h,A){var O=[];if(D("("),!_(")"))for(;;)if(c===P.type){var Z=tt();if(r.scope&&ot(Z),O.push(Z),_(","))continue;if(_(")"))break}else if(L===P.type){O.push(Pr()),D(")");break}else X(" or '...'",P);var de=yt();return D("end"),r.scope&&Ne(),A=A||!1,k(I.functionStatement(h,O,A,de))}function Pc(){var h,A,O;for($e&&(O=Bt()),h=tt(),r.scope&&(ns(h,Ke(h.name)),ye());_(".");)et(O),A=tt(),h=k(I.memberExpression(h,".",A));return _(":")&&(et(O),A=tt(),h=k(I.memberExpression(h,":",A)),r.scope&&Rt("self")),h}function Qn(){for(var h=[],A,O;;){if(Ts(),m===P.type&&_("["))A=je(),D("]"),D("="),O=je(),h.push(k(I.tableKey(A,O)));else if(c===P.type)H.value==="="?(A=tt(),M(),O=je(),h.push(k(I.tableKeyString(A,O)))):(O=je(),h.push(k(I.tableValue(O))));else{if((O=di())==null){Oe.pop();break}h.push(k(I.tableValue(O)))}if(",;".indexOf(P.value)>=0){M();continue}break}return D("}"),k(I.tableConstructorExpression(h))}function di(){var h=gr(0);return h}function je(){var h=di();if(h==null)X("",P);else return h}function Tc(h){var A=h.charCodeAt(0),O=h.length;if(O===1)switch(A){case 94:return 12;case 42:case 47:case 37:return 10;case 43:case 45:return 9;case 38:return 6;case 126:return 5;case 124:return 4;case 60:case 62:return 3}else if(O===2)switch(A){case 47:return 10;case 46:return 8;case 60:case 62:return h==="<<"||h===">>"?7:3;case 61:case 126:return 3;case 111:return 1}else if(A===97&&h==="and")return 2;return 0}function gr(h){var A=P.value,O,Z;if($e&&(Z=Bt()),ae(P)){Ts(),M();var de=gr(10);de==null&&X("",P),O=k(I.unaryExpression(A,de))}if(O==null&&(O=Pr(),O==null&&(O=xr())),O==null)return null;for(var we;A=P.value,we=m===P.type||u===P.type?Tc(A):0,!(we===0||we<=h);){(A==="^"||A==="..")&&we--,M();var Je=gr(we);Je==null&&X("",P),$e&&Oe.push(Z),O=k(I.binaryExpression(A,O,Je))}return O}function xr(){var h,A,O;if($e&&(O=Bt()),c===P.type)A=P.value,h=tt(),r.scope&&ns(h,Ke(A));else if(_("("))h=je(),D(")"),h.inParens=!0;else return null;for(var Z,de;;)if(m===P.type)switch(P.value){case"[":et(O),M(),Z=je(),D("]"),h=k(I.indexExpression(h,Z));break;case".":et(O),M(),de=tt(),h=k(I.memberExpression(h,".",de));break;case":":et(O),M(),de=tt(),h=k(I.memberExpression(h,":",de)),et(O),h=br(h);break;case"(":case"{":et(O),h=br(h);break;default:return h}else if(l===P.type)et(O),h=br(h);else break;return h}function br(h){if(m===P.type)switch(P.value){case"(":M();var A=[],O=di();for(O!=null&&A.push(O);_(",");)O=je(),A.push(O);return D(")"),k(I.callExpression(h,A));case"{":Ts(),M();var Z=Qn();return k(I.tableCallExpression(h,Z))}else if(l===P.type)return k(I.stringCallExpression(h,Pr()));X("function arguments",P)}function Pr(){var h=l|d|w|y|L,A=P.value,O=P.type,Z;if($e&&(Z=Bt()),O&h){et(Z);var de=s.slice(P.range[0],P.range[1]);return M(),k(I.literal(O,A,de))}else{if(u===O&&A==="function")return et(Z),M(),r.scope&&ye(),yr(null);if(_("{"))return et(Z),Qn()}}e.parse=Ac;function Ac(h,A){if(typeof A=="undefined"&&typeof h=="object"&&(A=h,h=void 0),A||(A={}),s=h||"",r=Pe(a,A),f=0,g=1,E=0,n=s.length,G=[[]],se=0,ue=[],Oe=[],!(r.luaVersion==="5.1"||r.luaVersion==="5.2"||r.luaVersion==="5.3"))throw new Error(K("Lua version '%1' not supported",r.luaVersion));return r.comments&&(v=[]),r.wait?e:ta()}e.write=ea;function ea(h){return s+=String(h),n=s.length,e}e.end=ta;function ta(h){typeof h!="undefined"&&ea(h),s&&s.substr(0,2)==="#!"&&(s=s.replace(/^.*/,function(O){return O.replace(/./g," ")})),n=s.length,$e=r.locations||r.ranges,H=W();var A=lc();if(r.comments&&(A.comments=v),r.scope&&(A.globals=ue),Oe.length>0)throw new Error("Location tracking failed. This is most likely a bug in luaparse");return A}})})(on,on.exports);var Hl={exports:{}};/*! diff v3.5.0 @@ -67,12 +67,12 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @license -*/(function(i,t){(function(s,r){i.exports=r()})(Nt,function(){return function(e){var s={};function r(n){if(s[n])return s[n].exports;var a=s[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}return r.m=e,r.c=s,r.p="",r(0)}([function(e,s,r){s.__esModule=!0,s.canonicalize=s.convertChangesToXML=s.convertChangesToDMP=s.merge=s.parsePatch=s.applyPatches=s.applyPatch=s.createPatch=s.createTwoFilesPatch=s.structuredPatch=s.diffArrays=s.diffJson=s.diffCss=s.diffSentences=s.diffTrimmedLines=s.diffLines=s.diffWordsWithSpace=s.diffWords=s.diffChars=s.Diff=void 0;var n=r(1),a=$(n),o=r(2),l=r(3),u=r(5),c=r(6),d=r(7),m=r(8),w=r(9),y=r(10),L=r(11),C=r(13),I=r(14),k=r(16),j=r(17);function $(T){return T&&T.__esModule?T:{default:T}}s.Diff=a.default,s.diffChars=o.diffChars,s.diffWords=l.diffWords,s.diffWordsWithSpace=l.diffWordsWithSpace,s.diffLines=u.diffLines,s.diffTrimmedLines=u.diffTrimmedLines,s.diffSentences=c.diffSentences,s.diffCss=d.diffCss,s.diffJson=m.diffJson,s.diffArrays=w.diffArrays,s.structuredPatch=I.structuredPatch,s.createTwoFilesPatch=I.createTwoFilesPatch,s.createPatch=I.createPatch,s.applyPatch=y.applyPatch,s.applyPatches=y.applyPatches,s.parsePatch=L.parsePatch,s.merge=C.merge,s.convertChangesToDMP=k.convertChangesToDMP,s.convertChangesToXML=j.convertChangesToXML,s.canonicalize=m.canonicalize},function(e,s){s.__esModule=!0,s.default=r;function r(){}r.prototype={diff:function(l,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=c.callback;typeof c=="function"&&(d=c,c={}),this.options=c;var m=this;function w(K){return d?(setTimeout(function(){d(void 0,K)},0),!0):K}l=this.castInput(l),u=this.castInput(u),l=this.removeEmpty(this.tokenize(l)),u=this.removeEmpty(this.tokenize(u));var y=u.length,L=l.length,C=1,I=y+L,k=[{newPos:-1,components:[]}],j=this.extractCommon(k[0],u,l,0);if(k[0].newPos+1>=y&&j+1>=L)return w([{value:this.join(u),count:u.length}]);function $(){for(var K=-1*C;K<=C;K+=2){var Pe=void 0,p=k[K-1],X=k[K+1],Y=(X?X.newPos:0)-K;p&&(k[K-1]=void 0);var f=p&&p.newPos+1=y&&Y+1>=L)return w(n(m,Pe.components,u,l,m.useLongestToken));k[K]=Pe}C++}if(d)(function K(){setTimeout(function(){if(C>I)return d();$()||K()},0)})();else for(;C<=I;){var T=$();if(T)return T}},pushComponent:function(l,u,c){var d=l[l.length-1];d&&d.added===u&&d.removed===c?l[l.length-1]={count:d.count+1,added:u,removed:c}:l.push({count:1,added:u,removed:c})},extractCommon:function(l,u,c,d){for(var m=u.length,w=c.length,y=l.newPos,L=y-d,C=0;y+1$.length?K:$}),C.value=o.join(I)}else C.value=o.join(u.slice(y,y+C.count));y+=C.count,C.added||(L+=C.count)}}var j=l[w-1];return w>1&&typeof j.value=="string"&&(j.added||j.removed)&&o.equals("",j.value)&&(l[w-2].value+=j.value,l.pop()),l}function a(o){return{newPos:o.newPos,components:o.components.slice(0)}}},function(e,s,r){s.__esModule=!0,s.characterDiff=void 0,s.diffChars=u;var n=r(1),a=o(n);function o(c){return c&&c.__esModule?c:{default:c}}var l=s.characterDiff=new a.default;function u(c,d,m){return l.diff(c,d,m)}},function(e,s,r){s.__esModule=!0,s.wordDiff=void 0,s.diffWords=m,s.diffWordsWithSpace=w;var n=r(1),a=l(n),o=r(4);function l(y){return y&&y.__esModule?y:{default:y}}var u=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,c=/\S/,d=s.wordDiff=new a.default;d.equals=function(y,L){return this.options.ignoreCase&&(y=y.toLowerCase(),L=L.toLowerCase()),y===L||this.options.ignoreWhitespace&&!c.test(y)&&!c.test(L)},d.tokenize=function(y){for(var L=y.split(/(\s+|\b)/),C=0;C2&&arguments[2]!==void 0?arguments[2]:{};if(typeof m=="string"&&(m=(0,n.parsePatch)(m)),Array.isArray(m)){if(m.length>1)throw new Error("applyPatch only works with a single input.");m=m[0]}var y=d.split(/\r\n|[\n\v\f\r\x85]/),L=d.match(/\r\n|[\n\v\f\r\x85]/g)||[],C=m.hunks,I=w.compareLine||function(Te,ze,at,Ge){return ze===Ge},k=0,j=w.fuzzFactor||0,$=0,T=0,K=void 0,Pe=void 0;function p(Te,ze){for(var at=0;at0?Ge[0]:" ",St=Ge.length>0?Ge.substr(1):Ge;if(Qe===" "||Qe==="-"){if(!I(ze+1,y[ze],Qe,St)&&(k++,k>j))return!1;ze++}}return!0}for(var X=0;X0?ee[0]:" ",re=ee.length>0?ee.substr(1):ee,he=g.linedelimiters[W];if(ce===" ")E++;else if(ce==="-")y.splice(E,1),L.splice(E,1);else if(ce==="+")y.splice(E,0,re),L.splice(E,0,he),E++;else if(ce==="\\"){var Re=g.lines[W-1]?g.lines[W-1][0]:null;Re==="+"?K=!0:Re==="-"&&(Pe=!0)}}}if(K)for(;!y[y.length-1];)y.pop(),L.pop();else Pe&&(y.push(""),L.push(` +*/(function(i,t){(function(s,r){i.exports=r()})(Nt,function(){return function(e){var s={};function r(n){if(s[n])return s[n].exports;var a=s[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}return r.m=e,r.c=s,r.p="",r(0)}([function(e,s,r){s.__esModule=!0,s.canonicalize=s.convertChangesToXML=s.convertChangesToDMP=s.merge=s.parsePatch=s.applyPatches=s.applyPatch=s.createPatch=s.createTwoFilesPatch=s.structuredPatch=s.diffArrays=s.diffJson=s.diffCss=s.diffSentences=s.diffTrimmedLines=s.diffLines=s.diffWordsWithSpace=s.diffWords=s.diffChars=s.Diff=void 0;var n=r(1),a=$(n),o=r(2),l=r(3),u=r(5),c=r(6),d=r(7),m=r(8),w=r(9),y=r(10),L=r(11),C=r(13),I=r(14),k=r(16),j=r(17);function $(T){return T&&T.__esModule?T:{default:T}}s.Diff=a.default,s.diffChars=o.diffChars,s.diffWords=l.diffWords,s.diffWordsWithSpace=l.diffWordsWithSpace,s.diffLines=u.diffLines,s.diffTrimmedLines=u.diffTrimmedLines,s.diffSentences=c.diffSentences,s.diffCss=d.diffCss,s.diffJson=m.diffJson,s.diffArrays=w.diffArrays,s.structuredPatch=I.structuredPatch,s.createTwoFilesPatch=I.createTwoFilesPatch,s.createPatch=I.createPatch,s.applyPatch=y.applyPatch,s.applyPatches=y.applyPatches,s.parsePatch=L.parsePatch,s.merge=C.merge,s.convertChangesToDMP=k.convertChangesToDMP,s.convertChangesToXML=j.convertChangesToXML,s.canonicalize=m.canonicalize},function(e,s){s.__esModule=!0,s.default=r;function r(){}r.prototype={diff:function(l,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=c.callback;typeof c=="function"&&(d=c,c={}),this.options=c;var m=this;function w(K){return d?(setTimeout(function(){d(void 0,K)},0),!0):K}l=this.castInput(l),u=this.castInput(u),l=this.removeEmpty(this.tokenize(l)),u=this.removeEmpty(this.tokenize(u));var y=u.length,L=l.length,C=1,I=y+L,k=[{newPos:-1,components:[]}],j=this.extractCommon(k[0],u,l,0);if(k[0].newPos+1>=y&&j+1>=L)return w([{value:this.join(u),count:u.length}]);function $(){for(var K=-1*C;K<=C;K+=2){var Pe=void 0,p=k[K-1],X=k[K+1],Y=(X?X.newPos:0)-K;p&&(k[K-1]=void 0);var f=p&&p.newPos+1=y&&Y+1>=L)return w(n(m,Pe.components,u,l,m.useLongestToken));k[K]=Pe}C++}if(d)(function K(){setTimeout(function(){if(C>I)return d();$()||K()},0)})();else for(;C<=I;){var T=$();if(T)return T}},pushComponent:function(l,u,c){var d=l[l.length-1];d&&d.added===u&&d.removed===c?l[l.length-1]={count:d.count+1,added:u,removed:c}:l.push({count:1,added:u,removed:c})},extractCommon:function(l,u,c,d){for(var m=u.length,w=c.length,y=l.newPos,L=y-d,C=0;y+1$.length?K:$}),C.value=o.join(I)}else C.value=o.join(u.slice(y,y+C.count));y+=C.count,C.added||(L+=C.count)}}var j=l[w-1];return w>1&&typeof j.value=="string"&&(j.added||j.removed)&&o.equals("",j.value)&&(l[w-2].value+=j.value,l.pop()),l}function a(o){return{newPos:o.newPos,components:o.components.slice(0)}}},function(e,s,r){s.__esModule=!0,s.characterDiff=void 0,s.diffChars=u;var n=r(1),a=o(n);function o(c){return c&&c.__esModule?c:{default:c}}var l=s.characterDiff=new a.default;function u(c,d,m){return l.diff(c,d,m)}},function(e,s,r){s.__esModule=!0,s.wordDiff=void 0,s.diffWords=m,s.diffWordsWithSpace=w;var n=r(1),a=l(n),o=r(4);function l(y){return y&&y.__esModule?y:{default:y}}var u=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,c=/\S/,d=s.wordDiff=new a.default;d.equals=function(y,L){return this.options.ignoreCase&&(y=y.toLowerCase(),L=L.toLowerCase()),y===L||this.options.ignoreWhitespace&&!c.test(y)&&!c.test(L)},d.tokenize=function(y){for(var L=y.split(/(\s+|\b)/),C=0;C2&&arguments[2]!==void 0?arguments[2]:{};if(typeof m=="string"&&(m=(0,n.parsePatch)(m)),Array.isArray(m)){if(m.length>1)throw new Error("applyPatch only works with a single input.");m=m[0]}var y=d.split(/\r\n|[\n\v\f\r\x85]/),L=d.match(/\r\n|[\n\v\f\r\x85]/g)||[],C=m.hunks,I=w.compareLine||function(Te,ze,at,Ge){return ze===Ge},k=0,j=w.fuzzFactor||0,$=0,T=0,K=void 0,Pe=void 0;function p(Te,ze){for(var at=0;at0?Ge[0]:" ",St=Ge.length>0?Ge.substr(1):Ge;if(Qe===" "||Qe==="-"){if(!I(ze+1,y[ze],Qe,St)&&(k++,k>j))return!1;ze++}}return!0}for(var X=0;X0?ee[0]:" ",re=ee.length>0?ee.substr(1):ee,he=g.linedelimiters[W];if(ce===" ")E++;else if(ce==="-")y.splice(E,1),L.splice(E,1);else if(ce==="+")y.splice(E,0,re),L.splice(E,0,he),E++;else if(ce==="\\"){var Be=g.lines[W-1]?g.lines[W-1][0]:null;Be==="+"?K=!0:Be==="-"&&(Pe=!0)}}}if(K)for(;!y[y.length-1];)y.pop(),L.pop();else Pe&&(y.push(""),L.push(` `));for(var Ie=0;Ie1&&arguments[1]!==void 0?arguments[1]:{},o=n.split(/\r\n|[\n\v\f\r\x85]/),l=n.match(/\r\n|[\n\v\f\r\x85]/g)||[],u=[],c=0;function d(){var y={};for(u.push(y);c0?k(N.lines.slice(-C.context)):[],$-=K.length,T-=K.length)}(v=K).push.apply(v,a(H.map(function(he){return(z.added?"+":"-")+he}))),z.added?p+=H.length:Pe+=H.length}else{if($)if(H.length<=C.context*2&&P=I.length-2&&H.length<=C.context){var ce=/\n$/.test(m),re=/\n$/.test(w);H.length==0&&!ce?K.splice(ee.oldLines,0,"\\ No newline at end of file"):(!ce||!re)&&K.push("\\ No newline at end of file")}j.push(ee),$=0,T=0,K=[]}Pe+=H.length,p+=H.length}},Y=0;Ya.length)return!1;for(var l=0;l"):u.removed&&o.push(""),o.push(n(u.value)),u.added?o.push(""):u.removed&&o.push("")}return o.join("")}function n(a){var o=a;return o=o.replace(/&/g,"&"),o=o.replace(//g,">"),o=o.replace(/"/g,"""),o}}])})})(Hl);Object.defineProperty(pi,"__esModule",{value:!0});const io=is,xd=zn,bd=Wn,Pd=dr,Td=on.exports,Ad=Hl.exports;var Vl=dr;pi.defaultOptions=Vl.defaultOptions;pi.WriteMode=Vl.WriteMode;function wd(i,t){const e=Td.parse(i,{comments:!0,locations:!0,ranges:!0,luaVersion:"5.3"});e.range[0]=0,e.range[1]=i.length;const s=Object.assign({},Pd.defaultOptions,t),r=Object.assign({},s,{sourceText:i});io.injectShebang(e,r),io.attachComments(e,r);const n=xd.buildDocFromAst(e,r);return bd.printDocToString(n,r)}var Sd=pi.formatText=wd;function Ed(i,t,e){return Ad.createPatch(i,t,e,"original","formatted")}pi.producePatch=Ed;const cs="_M",ke="__tmp",ro="esPairs",no="caseExp",ln={debug:!1,tagArrayExpression:!0,importStatementHoisting:!0,transformToString:!0,transformString:!0,transformJSONStringify:!0,transformJSONParse:!0,transformParseFloat:!0,transformParseInt:!0,transformNumber:!0,transformIsArray:!0,transformConsoleLog:!0,moduleExportsToReturn:!0,index0To1:!0,tryTranslateClass:!0,disableUpdateExpressionCallback:!0,renameCatchErrorIfNeeded:!0,disableClassCall:!0};function cn(){console.log.apply(this,arguments)}function un(i){return Of(i,{plugins:["typescript"],sourceType:"module"})}const Cd={and:"_and",break:"_break",do:"_do",else:"_else",elseif:"_elseif",end:"_end",false:"_false",for:"_for",function:"_function",if:"_if",in:"_in",local:"_local",nil:"_nil",not:"_not",or:"_or",repeat:"_repeat",return:"_return",then:"_then",true:"_true",until:"_until",while:"_while"},bt=i=>Object.prototype.hasOwnProperty.call(Cd,i),Fr={"!":"not","&&":"and","||":"or","===":"==","==":"==","!==":"~=","!=":"~="},$r=i=>i.length>0?"self,":"self",vd=i=>i&&typeof i=="object"&&i.type;function ss(i,t,e){const s=e===void 0?void 0:e-1,r=e>0||e===void 0;if(Array.isArray(i)){if(r)for(const n of i)ss(n,t,s)}else if(vd(i)){const n=t(i);if(n)return n;if(r)for(const a of Object.values(i))ss(a,t,s)}else return}function Id(i,t,e,s){ss(i,r=>{r.type=="Identifier"&&r.name==t&&(r.name=e)},s)}function Vs(i,t,e){let s;return ss(i,r=>{if(r.type=="Identifier"&&r.name==t)return s=r,!0},e),s}function ao(i){ss(i,t=>{t.type=="ThisExpression"&&(t.type="Identifier",t.name="cls")})}function zl(i,t,e){let s;return ss(i,n=>{if(t(n))return s=n,!0},e),s}function wi(i){return Qs(i,"ContinueStatement")?"::continue::":""}function Qs(i,t,e){return zl(i,s=>s.type===t,e)}const Br=i=>i=="ArrayPattern"||i=="ObjectPattern";function Nd(i){const t=Qs(i,"RestElement");return t?`local ${t.argument.name} = {...};`:""}function kd(i){const t=[];let e=[];for(const[n,a]of i.cases.entries())a.test?(e.push(a),a.consequent.length>0&&(t.push(e),e=[])):t.push([a]);e.length>0&&t.push(e);const s=[];for(const n of t)if(n.length===1)s.push(n[0]);else{const a=n[n.length-1];a.testGroup=n.map(o=>o.test),s.push(a)}const r=s.findIndex(n=>!n.test);r!==-1&&r!==s.length-1?i.cases=[...s.slice(0,r),...s.slice(r+1),s[r]]:i.cases=s}function Ld(i,t={}){var Pe;t={...ln,...t},t.debug&&cn((Pe=i==null?void 0:i.program)==null?void 0:Pe.body);const e=[],s=[],r=[];let n="",a="",o=!1,l=!1,u=!1,c=!1;const d=p=>p.filter(X=>X.type=="AssignmentPattern").map(X=>`if ${T(X.left)} == nil then ${T(X.left)} = ${T(X.right)} end`).join(";"),m=p=>{const X=[];for(const[P,z]of p.entries())Br(z.type)&&(X.push("local "+T(z)({type:"Identifier",name:`__tmp${P}`})),p[P]={type:"Identifier",name:`__tmp${P}`});const Y=Nd(p),f=d(p);return`${X.join(";")} +`}function u(c,d,m,w,y,L){return l(c,c,d,m,w,y,L)}},function(e,s){s.__esModule=!0,s.arrayEqual=r,s.arrayStartsWith=n;function r(a,o){return a.length!==o.length?!1:n(a,o)}function n(a,o){if(o.length>a.length)return!1;for(var l=0;l"):u.removed&&o.push(""),o.push(n(u.value)),u.added?o.push(""):u.removed&&o.push("")}return o.join("")}function n(a){var o=a;return o=o.replace(/&/g,"&"),o=o.replace(//g,">"),o=o.replace(/"/g,"""),o}}])})})(Hl);Object.defineProperty(pi,"__esModule",{value:!0});const io=is,xd=zn,bd=Wn,Pd=dr,Td=on.exports,Ad=Hl.exports;var Vl=dr;pi.defaultOptions=Vl.defaultOptions;pi.WriteMode=Vl.WriteMode;function wd(i,t){const e=Td.parse(i,{comments:!0,locations:!0,ranges:!0,luaVersion:"5.3"});e.range[0]=0,e.range[1]=i.length;const s=Object.assign({},Pd.defaultOptions,t),r=Object.assign({},s,{sourceText:i});io.injectShebang(e,r),io.attachComments(e,r);const n=xd.buildDocFromAst(e,r);return bd.printDocToString(n,r)}var Sd=pi.formatText=wd;function Ed(i,t,e){return Ad.createPatch(i,t,e,"original","formatted")}pi.producePatch=Ed;const cs="_M",ke="__tmp",ro="esPairs",no="caseExp",ln={debug:!1,tagArrayExpression:!0,importStatementHoisting:!0,transform$SymbolToDollar:!0,transformToString:!0,transformString:!0,transformJSONStringify:!0,transformJSONParse:!0,transformParseFloat:!0,transformParseInt:!0,transformNumber:!0,transformIsArray:!0,transformConsoleLog:!0,moduleExportsToReturn:!0,index0To1:!0,tryTranslateClass:!0,disableUpdateExpressionCallback:!0,renameCatchErrorIfNeeded:!0,disableClassCall:!0};function cn(){console.log.apply(this,arguments)}function un(i){return Of(i,{plugins:["typescript"],sourceType:"module"})}const Cd={and:"_and",break:"_break",do:"_do",else:"_else",elseif:"_elseif",end:"_end",false:"_false",for:"_for",function:"_function",if:"_if",in:"_in",local:"_local",nil:"_nil",not:"_not",or:"_or",repeat:"_repeat",return:"_return",then:"_then",true:"_true",until:"_until",while:"_while"},bt=i=>Object.prototype.hasOwnProperty.call(Cd,i),Fr={"!":"not","&&":"and","||":"or","===":"==","==":"==","!==":"~=","!=":"~="},$r=i=>i.length>0?"self,":"self",vd=i=>i&&typeof i=="object"&&i.type;function ss(i,t,e){const s=e===void 0?void 0:e-1,r=e>0||e===void 0;if(Array.isArray(i)){if(r)for(const n of i)ss(n,t,s)}else if(vd(i)){const n=t(i);if(n)return n;if(r)for(const a of Object.values(i))ss(a,t,s)}else return}function Id(i,t,e,s){ss(i,r=>{r.type=="Identifier"&&r.name==t&&(r.name=e)},s)}function Vs(i,t,e){let s;return ss(i,r=>{if(r.type=="Identifier"&&r.name==t)return s=r,!0},e),s}function ao(i){ss(i,t=>{t.type=="ThisExpression"&&(t.type="Identifier",t.name="cls")})}function zl(i,t,e){let s;return ss(i,n=>{if(t(n))return s=n,!0},e),s}function wi(i){return Qs(i,"ContinueStatement")?"::continue::":""}function Qs(i,t,e){return zl(i,s=>s.type===t,e)}const Rr=i=>i=="ArrayPattern"||i=="ObjectPattern";function Nd(i){const t=Qs(i,"RestElement");return t?`local ${t.argument.name} = {...};`:""}function kd(i){const t=[];let e=[];for(const[n,a]of i.cases.entries())a.test?(e.push(a),a.consequent.length>0&&(t.push(e),e=[])):t.push([a]);e.length>0&&t.push(e);const s=[];for(const n of t)if(n.length===1)s.push(n[0]);else{const a=n[n.length-1];a.testGroup=n.map(o=>o.test),s.push(a)}const r=s.findIndex(n=>!n.test);r!==-1&&r!==s.length-1?i.cases=[...s.slice(0,r),...s.slice(r+1),s[r]]:i.cases=s}function Ld(i,t={}){var Pe;t={...ln,...t},t.debug&&cn((Pe=i==null?void 0:i.program)==null?void 0:Pe.body);const e=[],s=[],r=[];let n="",a="",o=!1,l=!1,u=!1,c=!1;const d=p=>p.filter(X=>X.type=="AssignmentPattern").map(X=>`if ${T(X.left)} == nil then ${T(X.left)} = ${T(X.right)} end`).join(";"),m=p=>{const X=[];for(const[P,z]of p.entries())Rr(z.type)&&(X.push("local "+T(z)({type:"Identifier",name:`__tmp${P}`})),p[P]={type:"Identifier",name:`__tmp${P}`});const Y=Nd(p),f=d(p);return`${X.join(";")} ${f} ${Y}`},w=(p,X)=>(p=T(p),bt(p)?`["${p}"]`:X?`.${p}`:p),y=(p,X)=>{const Y=T(p.key);return p.computed||p.key.type=="StringLiteral"?`[${Y}]`:bt(Y)?`["${Y}"]`:X?`.${Y}`:Y},L=p=>{if(p.specifiers.length===1){const X=p.specifiers[0],Y=`require(${T(p.source)})`;return X.type=="ImportDefaultSpecifier"?`local ${T(X.local)} = ${Y}.default`:X.type=="ImportNamespaceSpecifier"?`local ${T(X.local)} = ${Y}`:`local ${T(X.local)} = ${Y}.${T(X.imported)}`}else{const X=p.specifiers.map(f=>T(f.local)).join(", "),Y=p.specifiers.map(f=>f.type=="ImportDefaultSpecifier"?`${T(f.local)} = _esModule.default`:f.type=="ImportNamespaceSpecifier"?`${T(f.local)} = _esModule`:`${T(f.local)} = _esModule.${T(f.imported)}`);return`local ${X}; do @@ -90,7 +90,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. `)} end)()`,P]},$=(p,X=",")=>p.map(T).join(X);function T(p){var X,Y,f,P,z,H;switch(p.type){case"File":return p.program.body.map(T).join(`; `);case"VariableDeclaration":{const v=p.noPrefix?"":"local ";return p.declarations.map(T).map(N=>`${v}${N}`).join(`; `)}case"VariableDeclarator":if(p.init)if(p.init.type=="AssignmentExpression"){const v=[`${T(p.id)} = ${T(p.init.left)}`];let N=p.init;for(;N.type=="AssignmentExpression";){N.right.type=="AssignmentExpression"?v.unshift(`${T(N.left)} = ${T(N.right.left)}`):v.unshift(`${T(N.left)} = ${T(N.right)}`);N=N.right}return v.join(`; -local `)}else return p.id.type=="ArrayPattern"||p.id.type=="ObjectPattern"?T(p.id)(p.init):`${T(p.id)} = ${T(p.init)}`;else return Br(p.id.type)?`${T(p.id)()}`:`${T(p.id)}`;case"Identifier":{const v=p.name;return v=="undefined"?"nil":v}case"NumericLiteral":return`${p.value}`;case"StringLiteral":return(X=p.extra)==null?void 0:X.raw;case"IfStatement":return`if ${T(p.test)} then ${T(p.consequent)} ${p.alternate?` else ${T(p.alternate)}`:""} end`;case"BlockStatement":return`${p.body.map(T).join(";")}`;case"CallExpression":if(p.callee.type=="MemberExpression"&&p.callee.object.type!=="Identifier"&&p.callee.object.type!=="Super"){const v=T(p.callee.object);return p.callee.object={type:"Identifier",name:ke},`(function() +local `)}else return p.id.type=="ArrayPattern"||p.id.type=="ObjectPattern"?T(p.id)(p.init):`${T(p.id)} = ${T(p.init)}`;else return Rr(p.id.type)?`${T(p.id)()}`:`${T(p.id)}`;case"Identifier":{const v=p.name;return v=="undefined"?"nil":v.startsWith("$")&&t.transform$SymbolToDollar?v.replace("$","_DOLLAR_"):v}case"NumericLiteral":return`${p.value}`;case"StringLiteral":return(X=p.extra)==null?void 0:X.raw;case"IfStatement":return`if ${T(p.test)} then ${T(p.consequent)} ${p.alternate?` else ${T(p.alternate)}`:""} end`;case"BlockStatement":return`${p.body.map(T).join(";")}`;case"CallExpression":if(p.callee.type=="MemberExpression"&&p.callee.object.type!=="Identifier"&&p.callee.object.type!=="Super"){const v=T(p.callee.object);return p.callee.object={type:"Identifier",name:ke},`(function() local ${ke} = ${v} return ${T(p)} end)()`}else{const[v,N]=k(p);return`${v}(${N})`}case"BinaryExpression":{const v=Fr[p.operator]||p.operator,N=T(p.left),g=T(p.right);return p.operator=="instanceof"?`getmetatable(${N}) == ${g}`:p.operator==">>"?(l=!0,`bit.rshift(${N}, ${g})`):p.operator=="<<"?(l=!0,`bit.lshift(${N}, ${g})`):p.operator=="&"?(l=!0,`bit.band(${N}, ${g})`):p.operator=="|"?(l=!0,`bit.bor(${N}, ${g})`):p.operator=="^"?(l=!0,`bit.bxor(${N}, ${g})`):p.operator=="**"?`math.pow(${N}, ${g})`:`${N} ${v} ${T(p.right)}`}case"UnaryExpression":{const v=Fr[p.operator]||p.operator,N=T(p.argument);return p.operator=="typeof"?`type(${N})`:p.operator=="delete"?`${N} = nil`:p.operator=="~"?(l=!0,`bit.bnot(${N})`):`${v} ${N}`}case"ThisExpression":return"self";case"BooleanLiteral":return`${p.value}`;case"ObjectExpression":return Qs(p.properties,"SpreadElement",1)?`(function() local ${ke} = {}; ${p.properties.map(v=>v.type=="SpreadElement"?`for k, v in pairs(${T(v.argument)}) do ${ke}[k] = v end`:v.type=="ObjectMethod"?(v.asMember=!0,`${ke}${T(v)}`):`${ke}${y(v,!0)} = ${T(v.value)}`).join(";")} return ${ke} end)()`:`{${$(p.properties)}}`;case"ObjectProperty":return`${y(p)} = ${T(p.value)}`;case"ArrayExpression":{const v=t.tagArrayExpression?"array":"";return Qs(p.elements,"SpreadElement",1)?`(function() local ${ke} = ${v}{}; ${p.elements.map(g=>g.type=="SpreadElement"?`for _, v in ipairs(${T(g.argument)}) do ${ke}[#${ke} + 1] = v end`:`${ke}[#${ke} + 1] = ${T(g)}`).join(";")} return ${ke} end)()`:`${v}{${$(p.elements)}}`}case"ForOfStatement":{const v=wi(p);if(p.left.noPrefix=!0,((Y=p.left.declarations[0])==null?void 0:Y.id.type)=="ArrayPattern"){const N=Vs(p.body,ro)?ke:ro;return`for _, ${N} in ipairs(${T(p.right)}) do @@ -117,20 +117,20 @@ function ${v}.new(cls) return setmetatable({}, cls) end function ${v}:constructor(${E}) ${N} ${g} -end`:`local function ${v}(${E}) ${N} ${g} end`}case"ReturnStatement":return p.argument?`return ${T(p.argument)}`:"return;";case"ArrayPattern":return C(p);case"ObjectPattern":return I(p);case"ClassDeclaration":{const v=T(p.id),N=p.body.body.filter(re=>re.type==="ClassMethod"&&re.kind!=="constructor");p.superClass&&ss(N,re=>{re.type==="MemberExpression"&&re.object.type=="Super"&&(re.object.superClass=p.superClass)});const g=N.map(re=>{const he=T(re.key),Re=m(re.params),Ie=bt(he)?`${v}["${he}"] = function`:`function ${v}:${he}`,Te=bt(he)?$r(re.params):"";return`${Ie}(${Te}${$(re.params)}) - ${Re} +end`:`local function ${v}(${E}) ${N} ${g} end`}case"ReturnStatement":return p.argument?`return ${T(p.argument)}`:"return;";case"ArrayPattern":return C(p);case"ObjectPattern":return I(p);case"ClassDeclaration":{const v=T(p.id),N=p.body.body.filter(re=>re.type==="ClassMethod"&&re.kind!=="constructor");p.superClass&&ss(N,re=>{re.type==="MemberExpression"&&re.object.type=="Super"&&(re.object.superClass=p.superClass)});const g=N.map(re=>{const he=T(re.key),Be=m(re.params),Ie=bt(he)?`${v}["${he}"] = function`:`function ${v}:${he}`,Te=bt(he)?$r(re.params):"";return`${Ie}(${Te}${$(re.params)}) + ${Be} ${T(re.body)} - end`}).join(";"),E=p.body.body.filter(re=>re.type==="ClassProperty"&&re.static).map(re=>{const he=T(re.key);return bt(he)?`${v}["${he}"] = ${T(re.value)}`:`${v}.${he} = ${T(re.value)}`}).join(";"),W=p.body.body.filter(re=>re.type==="ClassProperty"&&!re.static).map(re=>{const he=T(re.key);return bt(he)?`["${he}"] = ${T(re.value)}`:`${he} = ${T(re.value)}`}).join(","),ee=zl(p.body,re=>re.kind=="constructor"),ce=p.superClass?`__index = ${T(p.superClass)},`:"";if(ee){p.superClass&&ss(ee.body,Te=>{Te.type==="MemberExpression"&&Te.object.type=="Super"&&(Te.object.superClass=p.superClass),Te.type=="CallExpression"&&Te.callee.type=="Super"&&(Te.callee={type:"MemberExpression",object:{type:"Super",superClass:p.superClass},property:{type:"Identifier",name:"constructor"}})});const re=m(ee.params),he=T(ee.body),Re=$(ee.params),Ie=ee.params.length>0?", "+Re:Re;return` local ${v} = setmetatable({}, { + end`}).join(";"),E=p.body.body.filter(re=>re.type==="ClassProperty"&&re.static).map(re=>{const he=T(re.key);return bt(he)?`${v}["${he}"] = ${T(re.value)}`:`${v}.${he} = ${T(re.value)}`}).join(";"),W=p.body.body.filter(re=>re.type==="ClassProperty"&&!re.static).map(re=>{const he=T(re.key);return bt(he)?`["${he}"] = ${T(re.value)}`:`${he} = ${T(re.value)}`}).join(","),ee=zl(p.body,re=>re.kind=="constructor"),ce=p.superClass?`__index = ${T(p.superClass)},`:"";if(ee){p.superClass&&ss(ee.body,Te=>{Te.type==="MemberExpression"&&Te.object.type=="Super"&&(Te.object.superClass=p.superClass),Te.type=="CallExpression"&&Te.callee.type=="Super"&&(Te.callee={type:"MemberExpression",object:{type:"Super",superClass:p.superClass},property:{type:"Identifier",name:"constructor"}})});const re=m(ee.params),he=T(ee.body),Be=$(ee.params),Ie=ee.params.length>0?", "+Be:Be;return` local ${v} = setmetatable({}, { ${ce} __call = function(t${Ie}) local self = t:new(); - self:constructor(${Re}); + self:constructor(${Be}); return self; end}) ${v}.__index = ${v} ${E} function ${v}.new(cls) return setmetatable({${W}}, cls) end - function ${v}:constructor(${Re}) + function ${v}:constructor(${Be}) ${re} ${he} end @@ -158,7 +158,7 @@ end`:`local function ${v}(${E}) ${N} ${g} end`}case"ReturnStatement":return p.ar end)()`}case"MemberExpression":{const v=T(p.object),N=T(p.property);return p.object.type=="Super"?`${v}.${N}`:N=="length"?"#"+v:bt(N)?`${v}["${N}"]`:p.computed?t.index0To1&&((P=p.property)==null?void 0:P.type)=="NumericLiteral"&&p.property.value===0?`${v}[1]`:`${v}[${N}]`:`${v}.${N}`}case"OptionalMemberExpression":return j(p)[0];case"ExpressionStatement":return p.expression.ExpressionStatement=!0,`${T(p.expression)}`;case"AssignmentExpression":{if(p.right.type=="FunctionExpression"&&p.left.type=="MemberExpression"&&p.left.object.type=="MemberExpression"&&((z=p.left.object.property)==null?void 0:z.name)=="prototype"){const N=m(p.right.params),g=T(p.left.property);if(bt(g)){const E=`${T(p.left.object.object)}["${g}"]`,W=$r(p.right.params);return`${E} = function(${W}${$(p.right.params)}) ${N} ${T(p.right.body)} end`}else return`function ${`${T(p.left.object.object)}:${g}`}(${$(p.right.params)}) ${N} ${T(p.right.body)} end`}const v=T(p.left);if(t.moduleExportsToReturn&&p.left.type=="MemberExpression"&&(v=="module.exports"||v.startsWith("module.exports.")||v.startsWith("module.exports[")))return v=="module.exports"?a=`return ${T(p.right)}`:(c=!0,s.push(`${cs}${v.slice(14)} = ${T(p.right)}`)),"";if(p.right.type=="AssignmentExpression"){const N=T(p.left);return`${T(p.right)}; - local ${N} = ${T(p.right.left)}`}else{const N=p.operator;let g,E;return Br(p.left.type)?(g=T(p.left)(),E=`unpack(${T(p.right)})`):(g=T(p.left),E=T(p.right)),N=="+="?`${g} = ${g} + ${E}`:N=="-="?`${g} = ${g} - ${E}`:N=="*="?`${g} = ${g} * ${E}`:N=="/="?`${g} = ${g} / ${E}`:N=="%="?`${g} = ${g} % ${E}`:N=="&&="?`${g} = ${g} and ${E}`:N=="||="?`${g} = ${g} or ${E}`:N=="&="?(l=!0,`${g} = bit.band(${g}, ${E})`):N=="|="?(l=!0,`${g} = bit.bor(${g}, ${E})`):N=="^="?(l=!0,`${g} = bit.bxor(${g}, ${E})`):N=="**="?`${g} = math.pow(${g}, ${E})`:N=="??="?`${g} = (function() + local ${N} = ${T(p.right.left)}`}else{const N=p.operator;let g,E;return Rr(p.left.type)?(g=T(p.left)(),E=`unpack(${T(p.right)})`):(g=T(p.left),E=T(p.right)),N=="+="?`${g} = ${g} + ${E}`:N=="-="?`${g} = ${g} - ${E}`:N=="*="?`${g} = ${g} * ${E}`:N=="/="?`${g} = ${g} / ${E}`:N=="%="?`${g} = ${g} % ${E}`:N=="&&="?`${g} = ${g} and ${E}`:N=="||="?`${g} = ${g} or ${E}`:N=="&="?(l=!0,`${g} = bit.band(${g}, ${E})`):N=="|="?(l=!0,`${g} = bit.bor(${g}, ${E})`):N=="^="?(l=!0,`${g} = bit.bxor(${g}, ${E})`):N=="**="?`${g} = math.pow(${g}, ${E})`:N=="??="?`${g} = (function() if ${g} == nil then return ${E} else @@ -190,7 +190,7 @@ end`}case"AssignmentPattern":return`${T(p.left)}`;case"SpreadElement":return`unp ${e.join(";")} ${K} ${s.join(";")} - ${a}`}function Md(i,t){let e="";return e=Ld(un(i),t),t.debug&&cn(e),Sd(e)}var Kl={exports:{}};(function(i,t){(function(e,s){s()})(Nt,function(){function e(u,c){return typeof c=="undefined"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function s(u,c,d){var m=new XMLHttpRequest;m.open("GET",u),m.responseType="blob",m.onload=function(){l(m.response,c,d)},m.onerror=function(){console.error("could not download file")},m.send()}function r(u){var c=new XMLHttpRequest;c.open("HEAD",u,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function n(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(c)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Nt=="object"&&Nt.global===Nt?Nt:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(u,c,d){var m=a.URL||a.webkitURL,w=document.createElement("a");c=c||u.name||"download",w.download=c,w.rel="noopener",typeof u=="string"?(w.href=u,w.origin===location.origin?n(w):r(w.href)?s(u,c,d):n(w,w.target="_blank")):(w.href=m.createObjectURL(u),setTimeout(function(){m.revokeObjectURL(w.href)},4e4),setTimeout(function(){n(w)},0))}:"msSaveOrOpenBlob"in navigator?function(u,c,d){if(c=c||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(e(u,d),c);else if(r(u))s(u,c,d);else{var m=document.createElement("a");m.href=u,m.target="_blank",setTimeout(function(){n(m)})}}:function(u,c,d,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof u=="string")return s(u,c,d);var w=u.type==="application/octet-stream",y=/constructor/i.test(a.HTMLElement)||a.safari,L=/CriOS\/[\d]+/.test(navigator.userAgent);if((L||w&&y||o)&&typeof FileReader!="undefined"){var C=new FileReader;C.onloadend=function(){var j=C.result;j=L?j:j.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=j:location=j,m=null},C.readAsDataURL(u)}else{var I=a.URL||a.webkitURL,k=I.createObjectURL(u);m?m.location=k:location.href=k,m=null,setTimeout(function(){I.revokeObjectURL(k)},4e4)}});a.saveAs=l.saveAs=l,i.exports=l})})(Kl);var _d=Kl.exports;const Od="@xiangnanscu/js2lua",Dd="0.35.0",Fd="module",$d="Writing LuaJIT with the expressiveness of JavaScript.",Bd="src/js2lua.mjs",Rd={js2lua:"bin/js2lua.js"},jd={type:"git",url:"git+https://github.com/xiangnanscu/js2lua.git"},Ud="Nan Xiang",Hd="MIT",Vd={url:"https://github.com/xiangnanscu/js2lua/issues"},zd="https://github.xnscu.com/js2lua/",Kd={dev:"vite",build:"vite build",preview:"vite preview",commit:"git add . && git commit -am ",push:"yarn commit",postpush:"while true; do git push && { echo 'Git push succeeded'; break; } || echo 'Git push failed, retrying in 1 seconds'; sleep 1; done",pull:"while true; do git pull && { echo 'Git pull succeeded'; break; } || echo 'Git pull failed, retrying in 1 seconds'; sleep 1; done",prerelease:"npm --no-git-tag-version version minor",release:"node makeDocs.js && push_option=release npm run push",rc:"yarn release",replace:"find . -type d \\( -name .git -o -name node_modules \\) -prune -o -type f -exec sed -i s/js2lua/field/g {} \\;",test:"node test.mjs"},Wd={"yargs-parser":"^21.1.1","@babel/parser":"^7.22.14","lua-fmt":"^2.6.0"},qd={prettier:"^2.8.8","@prettier/plugin-lua":"^0.0.3",sass:"^1.52.1","source-map-support":"^0.5.21",yargs:"^17.7.2",vue:"^3.2.25",bootstrap:"^5.1.3","file-saver":"^2.0.5","highlight.js":"^11.5.1","@highlightjs/vue-plugin":"^2.1.0","@rushstack/eslint-patch":"^1.3.3","@vitejs/plugin-vue":"^2.3.3",eslint:"^8.47.0","eslint-plugin-vue":"^9.17.0",vite:"^2.9.9","vite-plugin-require-transform":"^1.0.21","vue-eslint-parser":"^9.3.1"};var oo={name:Od,version:Dd,type:Fd,description:$d,main:Bd,bin:Rd,repository:jd,author:Ud,license:Hd,bugs:Vd,homepage:zd,scripts:Kd,dependencies:Wd,devDependencies:qd};const Gd={style:{"margin-bottom":"1em","text-align":"center"}},Jd=["title"],Xd={class:"row"},Yd={class:"col-2"},Zd={class:"form-check"},Qd=be("label",{class:"form-check-label",for:"label-all",style:{color:"red"}}," show Js code ",-1),em={class:"form-check"},tm=be("label",{class:"form-check-label",for:"label-all",style:{color:"red"}}," all ",-1),sm=["id","value"],im=["for"],rm={class:"col-3"},nm={key:0,class:"col"},am={class:"form-check-inline"},om={class:"form-check-label"},lm=["value"],cm={key:0},um={key:1},hm={class:"col"},pm={class:"table table-bordered"},fm={colspan:"3"},dm=be("h1",null,"take a look at features:",-1),mm=["href"],ym={colspan:"3"},gm=["id"],xm={class:"td-wrap"},bm=["onUpdate:modelValue"],Pm={__name:"App",setup(i){const t=us(!1),e=us(!1);function s(I,k){try{return Md(I,k)}catch(j){return console.error(j),`-- ERROR: ${j.message}`}}function r(I,k){try{return un(I,k)}catch(j){return console.error(j),un(`throw new Error("ERROR: ${j.message}")`)}}const n=us(`class Child extends Parent { + ${a}`}function Md(i,t){let e="";return e=Ld(un(i),t),t.debug&&cn(e),Sd(e)}var Kl={exports:{}};(function(i,t){(function(e,s){s()})(Nt,function(){function e(u,c){return typeof c=="undefined"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function s(u,c,d){var m=new XMLHttpRequest;m.open("GET",u),m.responseType="blob",m.onload=function(){l(m.response,c,d)},m.onerror=function(){console.error("could not download file")},m.send()}function r(u){var c=new XMLHttpRequest;c.open("HEAD",u,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function n(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(c)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Nt=="object"&&Nt.global===Nt?Nt:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(u,c,d){var m=a.URL||a.webkitURL,w=document.createElement("a");c=c||u.name||"download",w.download=c,w.rel="noopener",typeof u=="string"?(w.href=u,w.origin===location.origin?n(w):r(w.href)?s(u,c,d):n(w,w.target="_blank")):(w.href=m.createObjectURL(u),setTimeout(function(){m.revokeObjectURL(w.href)},4e4),setTimeout(function(){n(w)},0))}:"msSaveOrOpenBlob"in navigator?function(u,c,d){if(c=c||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(e(u,d),c);else if(r(u))s(u,c,d);else{var m=document.createElement("a");m.href=u,m.target="_blank",setTimeout(function(){n(m)})}}:function(u,c,d,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof u=="string")return s(u,c,d);var w=u.type==="application/octet-stream",y=/constructor/i.test(a.HTMLElement)||a.safari,L=/CriOS\/[\d]+/.test(navigator.userAgent);if((L||w&&y||o)&&typeof FileReader!="undefined"){var C=new FileReader;C.onloadend=function(){var j=C.result;j=L?j:j.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=j:location=j,m=null},C.readAsDataURL(u)}else{var I=a.URL||a.webkitURL,k=I.createObjectURL(u);m?m.location=k:location.href=k,m=null,setTimeout(function(){I.revokeObjectURL(k)},4e4)}});a.saveAs=l.saveAs=l,i.exports=l})})(Kl);var _d=Kl.exports;const Od="@xiangnanscu/js2lua",Dd="0.36.0",Fd="module",$d="Writing LuaJIT with the expressiveness of JavaScript.",Rd="src/js2lua.mjs",Bd={js2lua:"bin/js2lua.js"},jd={type:"git",url:"git+https://github.com/xiangnanscu/js2lua.git"},Ud="Nan Xiang",Hd="MIT",Vd={url:"https://github.com/xiangnanscu/js2lua/issues"},zd="https://github.xnscu.com/js2lua/",Kd={dev:"vite",build:"vite build",preview:"vite preview",commit:"git add . && git commit -am ",push:"yarn commit",postpush:"while true; do git push && { echo 'Git push succeeded'; break; } || echo 'Git push failed, retrying in 1 seconds'; sleep 1; done",pull:"while true; do git pull && { echo 'Git pull succeeded'; break; } || echo 'Git pull failed, retrying in 1 seconds'; sleep 1; done",prerelease:"npm --no-git-tag-version version minor",release:"node makeDocs.js && push_option=release npm run push",rc:"yarn release",replace:"find . -type d \\( -name .git -o -name node_modules \\) -prune -o -type f -exec sed -i s/js2lua/field/g {} \\;",test:"node test.mjs"},Wd={"yargs-parser":"^21.1.1","@babel/parser":"^7.22.14","lua-fmt":"^2.6.0"},qd={prettier:"^2.8.8","@prettier/plugin-lua":"^0.0.3",sass:"^1.52.1","source-map-support":"^0.5.21",yargs:"^17.7.2",vue:"^3.2.25",bootstrap:"^5.1.3","file-saver":"^2.0.5","highlight.js":"^11.5.1","@highlightjs/vue-plugin":"^2.1.0","@rushstack/eslint-patch":"^1.3.3","@vitejs/plugin-vue":"^2.3.3",eslint:"^8.47.0","eslint-plugin-vue":"^9.17.0",vite:"^2.9.9","vite-plugin-require-transform":"^1.0.21","vue-eslint-parser":"^9.3.1"};var oo={name:Od,version:Dd,type:Fd,description:$d,main:Rd,bin:Bd,repository:jd,author:Ud,license:Hd,bugs:Vd,homepage:zd,scripts:Kd,dependencies:Wd,devDependencies:qd};const Gd={style:{"margin-bottom":"1em","text-align":"center"}},Jd=["title"],Xd={class:"row"},Yd={class:"col-2"},Zd={class:"form-check"},Qd=be("label",{class:"form-check-label",for:"label-all",style:{color:"red"}}," show Js code ",-1),em={class:"form-check"},tm=be("label",{class:"form-check-label",for:"label-all",style:{color:"red"}}," all ",-1),sm=["id","value"],im=["for"],rm={class:"col-3"},nm={key:0,class:"col"},am={class:"form-check-inline"},om={class:"form-check-label"},lm=["value"],cm={key:0},um={key:1},hm={class:"col"},pm={class:"table table-bordered"},fm={colspan:"3"},dm=be("h1",null,"take a look at features:",-1),mm=["href"],ym={colspan:"3"},gm=["id"],xm={class:"td-wrap"},bm=["onUpdate:modelValue"],Pm={__name:"App",setup(i){const t=us(!1),e=us(!1);function s(I,k){try{return Md(I,k)}catch(j){return console.error(j),`-- ERROR: ${j.message}`}}function r(I,k){try{return un(I,k)}catch(j){return console.error(j),un(`throw new Error("ERROR: ${j.message}")`)}}const n=us(`class Child extends Parent { static myMethod(msg) { super.myMethod(msg); } @@ -498,5 +498,5 @@ if (--i) { print(i) } -`};for(const[I,k]of Object.entries(u))u[I]=us(k);const c=sr([]);for(const I in u){const k=u[I],j=Lt(()=>s(k.value,l.value)),$=I.match(/\/(\w+)\.mjs$/)[1];c.push({name:$,jscode:k,luacode:j})}const d=Lt(()=>s(n.value,l.value)),m=Lt(()=>r(n.value,l.value));function w(){L("luacode")}function y(){_d.saveAs(new Blob([d.value]),"test11.lua")}function L(I){if(window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),document.selection){const k=document.body.createTextRange();k.moveToElementText(document.getElementById(I)),k.select().createTextRange(),document.execCommand("copy")}else if(window.getSelection){const k=document.createRange();k.selectNode(document.getElementById(I)),window.getSelection().addRange(k),document.execCommand("copy")}}const C=us(!1);return Gs(C,I=>{I?o.value=[...a]:o.value=[]}),(I,k)=>{const j=Tu("highlightjs");return ht(),gt("div",null,[be("h1",Gd,[be("a",{href:"https://github.com/xiangnanscu/js2lua",title:Ii(oo).version},Fs(Ii(oo).name),9,Jd),Zr(" - Writing LuaJIT with the expressiveness of JavaScript. ")]),be("div",Xd,[be("div",Yd,[be("div",{class:ti({"error-wrapper":I.error})},[be("div",Zd,[$s(be("input",{class:"form-check-input",type:"checkbox",id:"label-all","onUpdate:modelValue":k[0]||(k[0]=$=>e.value=$)},null,512),[[kr,e.value]]),Qd]),be("div",em,[$s(be("input",{class:"form-check-input",type:"checkbox",id:"label-all","onUpdate:modelValue":k[1]||(k[1]=$=>C.value=$)},null,512),[[kr,C.value]]),tm]),(ht(!0),gt(lt,null,Sr(Ii(a),($,T)=>(ht(),gt("div",{key:T,class:ti({"form-check":!0})},[$s(be("input",{class:"form-check-input",type:"checkbox",id:"label"+T,"onUpdate:modelValue":k[2]||(k[2]=K=>o.value=K),value:$},null,8,sm),[[kr,o.value]]),be("label",{class:"form-check-label",for:"label"+T},Fs($),9,im)]))),128))],2)]),be("div",rm,[be("button",{onClick:k[3]||(k[3]=$=>n.value="")},"clear textarea"),$s(be("textarea",{rows:"10",style:{height:"500px"},class:"form-control","onUpdate:modelValue":k[4]||(k[4]=$=>n.value=$)},null,512),[[Da,n.value]])]),e.value?(ht(),gt("div",nm,[be("div",am,[be("label",om,[be("input",{onInput:k[5]||(k[5]=$=>t.value=!t.value),value:t.value,type:"checkbox",class:"form-check-input"},null,40,lm),Zr("show js ast")])]),t.value?(ht(),gt("div",cm,[be("pre",null,Fs(m.value),1)])):(ht(),gt("div",um,[Ue(j,{language:"javascript",code:n.value},null,8,["code"])]))])):ph("",!0),be("div",hm,[be("button",{onClick:w},"copy lua"),be("button",{onClick:y},"save as"),Ue(j,{id:"luacode",language:"lua",code:d.value},null,8,["code"])])]),be("table",pm,[be("thead",null,[be("tr",null,[be("th",fm,[dm,(ht(!0),gt(lt,null,Sr(c,($,T)=>(ht(),gt("a",{key:T,class:"link-block",href:`#${$.name}`},Fs($.name),9,mm))),128))])])]),be("tbody",null,[(ht(!0),gt(lt,null,Sr(c,($,T)=>(ht(),gt(lt,{key:T},[be("tr",null,[be("td",ym,[be("h3",{id:$.name},Fs($.name),9,gm)])]),be("tr",null,[be("td",xm,[$s(be("textarea",{class:"td-textarea form-control","onUpdate:modelValue":K=>$.jscode=K},null,8,bm),[[Da,$.jscode]])]),be("td",null,[Ue(j,{language:"javascript",code:$.jscode},null,8,["code"])]),be("td",null,[Ue(j,{language:"lua",code:$.luacode},null,8,["code"])])])],64))),128))])])])}}};function Wl(i){return i instanceof Map?i.clear=i.delete=i.set=function(){throw new Error("map is read-only")}:i instanceof Set&&(i.add=i.clear=i.delete=function(){throw new Error("set is read-only")}),Object.freeze(i),Object.getOwnPropertyNames(i).forEach(t=>{const e=i[t],s=typeof e;(s==="object"||s==="function")&&!Object.isFrozen(e)&&Wl(e)}),i}class lo{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function ql(i){return i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Jt(i,...t){const e=Object.create(null);for(const s in i)e[s]=i[s];return t.forEach(function(s){for(const r in s)e[r]=s[r]}),e}const Tm="",co=i=>!!i.scope,Am=(i,{prefix:t})=>{if(i.startsWith("language:"))return i.replace("language:","language-");if(i.includes(".")){const e=i.split(".");return[`${t}${e.shift()}`,...e.map((s,r)=>`${s}${"_".repeat(r+1)}`)].join(" ")}return`${t}${i}`};class wm{constructor(t,e){this.buffer="",this.classPrefix=e.classPrefix,t.walk(this)}addText(t){this.buffer+=ql(t)}openNode(t){if(!co(t))return;const e=Am(t.scope,{prefix:this.classPrefix});this.span(e)}closeNode(t){!co(t)||(this.buffer+=Tm)}value(){return this.buffer}span(t){this.buffer+=``}}const uo=(i={})=>{const t={children:[]};return Object.assign(t,i),t};class qn{constructor(){this.rootNode=uo(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const e=uo({scope:t});this.add(e),this.stack.push(e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,e){return typeof e=="string"?t.addText(e):e.children&&(t.openNode(e),e.children.forEach(s=>this._walk(t,s)),t.closeNode(e)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(e=>typeof e=="string")?t.children=[t.children.join("")]:t.children.forEach(e=>{qn._collapse(e)})))}}class Sm extends qn{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,e){const s=t.root;e&&(s.scope=`language:${e}`),this.add(s)}toHTML(){return new wm(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function li(i){return i?typeof i=="string"?i:i.source:null}function Gl(i){return Ps("(?=",i,")")}function Em(i){return Ps("(?:",i,")*")}function Cm(i){return Ps("(?:",i,")?")}function Ps(...i){return i.map(e=>li(e)).join("")}function vm(i){const t=i[i.length-1];return typeof t=="object"&&t.constructor===Object?(i.splice(i.length-1,1),t):{}}function Gn(...i){const t=vm(i);return"("+(t.capture?"":"?:")+i.map(s=>li(s)).join("|")+")"}function Jl(i){return new RegExp(i.toString()+"|").exec("").length-1}function Im(i,t){const e=i&&i.exec(t);return e&&e.index===0}const Nm=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Jn(i,{joinWith:t}){let e=0;return i.map(s=>{e+=1;const r=e;let n=li(s),a="";for(;n.length>0;){const o=Nm.exec(n);if(!o){a+=n;break}a+=n.substring(0,o.index),n=n.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?a+="\\"+String(Number(o[1])+r):(a+=o[0],o[0]==="("&&e++)}return a}).map(s=>`(${s})`).join(t)}const km=/\b\B/,Xl="[a-zA-Z]\\w*",Xn="[a-zA-Z_]\\w*",Yl="\\b\\d+(\\.\\d+)?",Zl="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ql="\\b(0b[01]+)",Lm="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Mm=(i={})=>{const t=/^#![ ]*\//;return i.binary&&(i.begin=Ps(t,/.*\b/,i.binary,/\b.*/)),Jt({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,s)=>{e.index!==0&&s.ignoreMatch()}},i)},ci={begin:"\\\\[\\s\\S]",relevance:0},_m={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ci]},Om={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ci]},Dm={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},mr=function(i,t,e={}){const s=Jt({scope:"comment",begin:i,end:t,contains:[]},e);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=Gn("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:Ps(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},Fm=mr("//","$"),$m=mr("/\\*","\\*/"),Bm=mr("#","$"),Rm={scope:"number",begin:Yl,relevance:0},jm={scope:"number",begin:Zl,relevance:0},Um={scope:"number",begin:Ql,relevance:0},Hm={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ci,{begin:/\[/,end:/\]/,relevance:0,contains:[ci]}]},Vm={scope:"title",begin:Xl,relevance:0},zm={scope:"title",begin:Xn,relevance:0},Km={begin:"\\.\\s*"+Xn,relevance:0},Wm=function(i){return Object.assign(i,{"on:begin":(t,e)=>{e.data._beginMatch=t[1]},"on:end":(t,e)=>{e.data._beginMatch!==t[1]&&e.ignoreMatch()}})};var Si=Object.freeze({__proto__:null,APOS_STRING_MODE:_m,BACKSLASH_ESCAPE:ci,BINARY_NUMBER_MODE:Um,BINARY_NUMBER_RE:Ql,COMMENT:mr,C_BLOCK_COMMENT_MODE:$m,C_LINE_COMMENT_MODE:Fm,C_NUMBER_MODE:jm,C_NUMBER_RE:Zl,END_SAME_AS_BEGIN:Wm,HASH_COMMENT_MODE:Bm,IDENT_RE:Xl,MATCH_NOTHING_RE:km,METHOD_GUARD:Km,NUMBER_MODE:Rm,NUMBER_RE:Yl,PHRASAL_WORDS_MODE:Dm,QUOTE_STRING_MODE:Om,REGEXP_MODE:Hm,RE_STARTERS_RE:Lm,SHEBANG:Mm,TITLE_MODE:Vm,UNDERSCORE_IDENT_RE:Xn,UNDERSCORE_TITLE_MODE:zm});function qm(i,t){i.input[i.index-1]==="."&&t.ignoreMatch()}function Gm(i,t){i.className!==void 0&&(i.scope=i.className,delete i.className)}function Jm(i,t){!t||!i.beginKeywords||(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",i.__beforeBegin=qm,i.keywords=i.keywords||i.beginKeywords,delete i.beginKeywords,i.relevance===void 0&&(i.relevance=0))}function Xm(i,t){!Array.isArray(i.illegal)||(i.illegal=Gn(...i.illegal))}function Ym(i,t){if(!!i.match){if(i.begin||i.end)throw new Error("begin & end are not supported with match");i.begin=i.match,delete i.match}}function Zm(i,t){i.relevance===void 0&&(i.relevance=1)}const Qm=(i,t)=>{if(!i.beforeMatch)return;if(i.starts)throw new Error("beforeMatch cannot be used with starts");const e=Object.assign({},i);Object.keys(i).forEach(s=>{delete i[s]}),i.keywords=e.keywords,i.begin=Ps(e.beforeMatch,Gl(e.begin)),i.starts={relevance:0,contains:[Object.assign(e,{endsParent:!0})]},i.relevance=0,delete e.beforeMatch},ey=["of","and","for","in","not","or","if","then","parent","list","value"],ty="keyword";function ec(i,t,e=ty){const s=Object.create(null);return typeof i=="string"?r(e,i.split(" ")):Array.isArray(i)?r(e,i):Object.keys(i).forEach(function(n){Object.assign(s,ec(i[n],t,n))}),s;function r(n,a){t&&(a=a.map(o=>o.toLowerCase())),a.forEach(function(o){const l=o.split("|");s[l[0]]=[n,sy(l[0],l[1])]})}}function sy(i,t){return t?Number(t):iy(i)?0:1}function iy(i){return ey.includes(i.toLowerCase())}const ho={},ys=i=>{console.error(i)},po=(i,...t)=>{console.log(`WARN: ${i}`,...t)},As=(i,t)=>{ho[`${i}/${t}`]||(console.log(`Deprecated as of ${i}. ${t}`),ho[`${i}/${t}`]=!0)},Ji=new Error;function tc(i,t,{key:e}){let s=0;const r=i[e],n={},a={};for(let o=1;o<=t.length;o++)a[o+s]=r[o],n[o+s]=!0,s+=Jl(t[o-1]);i[e]=a,i[e]._emit=n,i[e]._multi=!0}function ry(i){if(!!Array.isArray(i.begin)){if(i.skip||i.excludeBegin||i.returnBegin)throw ys("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ji;if(typeof i.beginScope!="object"||i.beginScope===null)throw ys("beginScope must be object"),Ji;tc(i,i.begin,{key:"beginScope"}),i.begin=Jn(i.begin,{joinWith:""})}}function ny(i){if(!!Array.isArray(i.end)){if(i.skip||i.excludeEnd||i.returnEnd)throw ys("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ji;if(typeof i.endScope!="object"||i.endScope===null)throw ys("endScope must be object"),Ji;tc(i,i.end,{key:"endScope"}),i.end=Jn(i.end,{joinWith:""})}}function ay(i){i.scope&&typeof i.scope=="object"&&i.scope!==null&&(i.beginScope=i.scope,delete i.scope)}function oy(i){ay(i),typeof i.beginScope=="string"&&(i.beginScope={_wrap:i.beginScope}),typeof i.endScope=="string"&&(i.endScope={_wrap:i.endScope}),ry(i),ny(i)}function ly(i){function t(a,o){return new RegExp(li(a),"m"+(i.case_insensitive?"i":"")+(i.unicodeRegex?"u":"")+(o?"g":""))}class e{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=Jl(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(Jn(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const u=l.findIndex((d,m)=>m>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new e;return this.rules.slice(o).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(o);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(o)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function r(a){const o=new s;return a.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),a.terminatorEnd&&o.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&o.addRule(a.illegal,{type:"illegal"}),o}function n(a,o){const l=a;if(a.isCompiled)return l;[Gm,Ym,oy,Qm].forEach(c=>c(a,o)),i.compilerExtensions.forEach(c=>c(a,o)),a.__beforeBegin=null,[Jm,Xm,Zm].forEach(c=>c(a,o)),a.isCompiled=!0;let u=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern),u=u||/\w+/,a.keywords&&(a.keywords=ec(a.keywords,i.case_insensitive)),l.keywordPatternRe=t(u,!0),o&&(a.begin||(a.begin=/\B|\b/),l.beginRe=t(l.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(l.endRe=t(l.end)),l.terminatorEnd=li(l.end)||"",a.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(l.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(c){return cy(c==="self"?a:c)})),a.contains.forEach(function(c){n(c,l)}),a.starts&&n(a.starts,o),l.matcher=r(l),l}if(i.compilerExtensions||(i.compilerExtensions=[]),i.contains&&i.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return i.classNameAliases=Jt(i.classNameAliases||{}),n(i)}function sc(i){return i?i.endsWithParent||sc(i.starts):!1}function cy(i){return i.variants&&!i.cachedVariants&&(i.cachedVariants=i.variants.map(function(t){return Jt(i,{variants:null},t)})),i.cachedVariants?i.cachedVariants:sc(i)?Jt(i,{starts:i.starts?Jt(i.starts):null}):Object.isFrozen(i)?Jt(i):i}var uy="11.9.0";class hy extends Error{constructor(t,e){super(t),this.name="HTMLInjectionError",this.html=e}}const Rr=ql,fo=Jt,mo=Symbol("nomatch"),py=7,ic=function(i){const t=Object.create(null),e=Object.create(null),s=[];let r=!0;const n="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Sm};function l(g){return o.noHighlightRe.test(g)}function u(g){let E=g.className+" ";E+=g.parentNode?g.parentNode.className:"";const W=o.languageDetectRe.exec(E);if(W){const ee=X(W[1]);return ee||(po(n.replace("{}",W[1])),po("Falling back to no-highlight mode for this block.",g)),ee?W[1]:"no-highlight"}return E.split(/\s+/).find(ee=>l(ee)||X(ee))}function c(g,E,W){let ee="",ce="";typeof E=="object"?(ee=g,W=E.ignoreIllegals,ce=E.language):(As("10.7.0","highlight(lang, code, ...args) has been deprecated."),As("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),ce=g,ee=E),W===void 0&&(W=!0);const re={code:ee,language:ce};v("before:highlight",re);const he=re.result?re.result:d(re.language,re.code,W);return he.code=re.code,v("after:highlight",he),he}function d(g,E,W,ee){const ce=Object.create(null);function re(U,G){return U.keywords[G]}function he(){if(!B.keywords){V.addText(R);return}let U=0;B.keywordPatternRe.lastIndex=0;let G=B.keywordPatternRe.exec(R),se="";for(;G;){se+=R.substring(U,G.index);const ue=_.case_insensitive?G[0].toLowerCase():G[0],ye=re(B,ue);if(ye){const[Ne,Bt]=ye;if(V.addText(se),se="",ce[ue]=(ce[ue]||0)+1,ce[ue]<=py&&(te+=Bt),Ne.startsWith("_"))se+=G[0];else{const ot=_.classNameAliases[Ne]||Ne;Te(G[0],ot)}}else se+=G[0];U=B.keywordPatternRe.lastIndex,G=B.keywordPatternRe.exec(R)}se+=R.substring(U),V.addText(se)}function Re(){if(R==="")return;let U=null;if(typeof B.subLanguage=="string"){if(!t[B.subLanguage]){V.addText(R);return}U=d(B.subLanguage,R,!0,q[B.subLanguage]),q[B.subLanguage]=U._top}else U=w(R,B.subLanguage.length?B.subLanguage:null);B.relevance>0&&(te+=U.relevance),V.__addSublanguage(U._emitter,U.language)}function Ie(){B.subLanguage!=null?Re():he(),R=""}function Te(U,G){U!==""&&(V.startScope(G),V.addText(U),V.endScope())}function ze(U,G){let se=1;const ue=G.length-1;for(;se<=ue;){if(!U._emit[se]){se++;continue}const ye=_.classNameAliases[U[se]]||U[se],Ne=G[se];ye?Te(Ne,ye):(R=Ne,he(),R=""),se++}}function at(U,G){return U.scope&&typeof U.scope=="string"&&V.openNode(_.classNameAliases[U.scope]||U.scope),U.beginScope&&(U.beginScope._wrap?(Te(R,_.classNameAliases[U.beginScope._wrap]||U.beginScope._wrap),R=""):U.beginScope._multi&&(ze(U.beginScope,G),R="")),B=Object.create(U,{parent:{value:B}}),B}function Ge(U,G,se){let ue=Im(U.endRe,se);if(ue){if(U["on:end"]){const ye=new lo(U);U["on:end"](G,ye),ye.isMatchIgnored&&(ue=!1)}if(ue){for(;U.endsParent&&U.parent;)U=U.parent;return U}}if(U.endsWithParent)return Ge(U.parent,G,se)}function Qe(U){return B.matcher.regexIndex===0?(R+=U[0],1):(pe=!0,0)}function St(U){const G=U[0],se=U.rule,ue=new lo(se),ye=[se.__beforeBegin,se["on:begin"]];for(const Ne of ye)if(!!Ne&&(Ne(U,ue),ue.isMatchIgnored))return Qe(G);return se.skip?R+=G:(se.excludeBegin&&(R+=G),Ie(),!se.returnBegin&&!se.excludeBegin&&(R=G)),at(se,U),se.returnBegin?0:G.length}function rs(U){const G=U[0],se=E.substring(U.index),ue=Ge(B,U,se);if(!ue)return mo;const ye=B;B.endScope&&B.endScope._wrap?(Ie(),Te(G,B.endScope._wrap)):B.endScope&&B.endScope._multi?(Ie(),ze(B.endScope,U)):ye.skip?R+=G:(ye.returnEnd||ye.excludeEnd||(R+=G),Ie(),ye.excludeEnd&&(R=G));do B.scope&&V.closeNode(),!B.skip&&!B.subLanguage&&(te+=B.relevance),B=B.parent;while(B!==ue.parent);return ue.starts&&at(ue.starts,U),ye.returnEnd?0:G.length}function x(){const U=[];for(let G=B;G!==_;G=G.parent)G.scope&&U.unshift(G.scope);U.forEach(G=>V.openNode(G))}let S={};function M(U,G){const se=G&&G[0];if(R+=U,se==null)return Ie(),0;if(S.type==="begin"&&G.type==="end"&&S.index===G.index&&se===""){if(R+=E.slice(G.index,G.index+1),!r){const ue=new Error(`0 width match regex (${g})`);throw ue.languageName=g,ue.badRule=S.rule,ue}return 1}if(S=G,G.type==="begin")return St(G);if(G.type==="illegal"&&!W){const ue=new Error('Illegal lexeme "'+se+'" for mode "'+(B.scope||"")+'"');throw ue.mode=B,ue}else if(G.type==="end"){const ue=rs(G);if(ue!==mo)return ue}if(G.type==="illegal"&&se==="")return 1;if(ae>1e5&&ae>G.index*3)throw new Error("potential infinite loop, way more iterations than matches");return R+=se,se.length}const _=X(g);if(!_)throw ys(n.replace("{}",g)),new Error('Unknown language: "'+g+'"');const D=ly(_);let J="",B=ee||D;const q={},V=new o.__emitter(o);x();let R="",te=0,ne=0,ae=0,pe=!1;try{if(_.__emitTokens)_.__emitTokens(E,V);else{for(B.matcher.considerAll();;){ae++,pe?pe=!1:B.matcher.considerAll(),B.matcher.lastIndex=ne;const U=B.matcher.exec(E);if(!U)break;const G=E.substring(ne,U.index),se=M(G,U);ne=U.index+se}M(E.substring(ne))}return V.finalize(),J=V.toHTML(),{language:g,value:J,relevance:te,illegal:!1,_emitter:V,_top:B}}catch(U){if(U.message&&U.message.includes("Illegal"))return{language:g,value:Rr(E),illegal:!0,relevance:0,_illegalBy:{message:U.message,index:ne,context:E.slice(ne-100,ne+100),mode:U.mode,resultSoFar:J},_emitter:V};if(r)return{language:g,value:Rr(E),illegal:!1,relevance:0,errorRaised:U,_emitter:V,_top:B};throw U}}function m(g){const E={value:Rr(g),illegal:!1,relevance:0,_top:a,_emitter:new o.__emitter(o)};return E._emitter.addText(g),E}function w(g,E){E=E||o.languages||Object.keys(t);const W=m(g),ee=E.filter(X).filter(f).map(Ie=>d(Ie,g,!1));ee.unshift(W);const ce=ee.sort((Ie,Te)=>{if(Ie.relevance!==Te.relevance)return Te.relevance-Ie.relevance;if(Ie.language&&Te.language){if(X(Ie.language).supersetOf===Te.language)return 1;if(X(Te.language).supersetOf===Ie.language)return-1}return 0}),[re,he]=ce,Re=re;return Re.secondBest=he,Re}function y(g,E,W){const ee=E&&e[E]||W;g.classList.add("hljs"),g.classList.add(`language-${ee}`)}function L(g){let E=null;const W=u(g);if(l(W))return;if(v("before:highlightElement",{el:g,language:W}),g.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",g);return}if(g.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(g)),o.throwUnescapedHTML))throw new hy("One of your code blocks includes unescaped HTML.",g.innerHTML);E=g;const ee=E.textContent,ce=W?c(ee,{language:W,ignoreIllegals:!0}):w(ee);g.innerHTML=ce.value,g.dataset.highlighted="yes",y(g,W,ce.language),g.result={language:ce.language,re:ce.relevance,relevance:ce.relevance},ce.secondBest&&(g.secondBest={language:ce.secondBest.language,relevance:ce.secondBest.relevance}),v("after:highlightElement",{el:g,result:ce,text:ee})}function C(g){o=fo(o,g)}const I=()=>{$(),As("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function k(){$(),As("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let j=!1;function $(){if(document.readyState==="loading"){j=!0;return}document.querySelectorAll(o.cssSelector).forEach(L)}function T(){j&&$()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",T,!1);function K(g,E){let W=null;try{W=E(i)}catch(ee){if(ys("Language definition for '{}' could not be registered.".replace("{}",g)),r)ys(ee);else throw ee;W=a}W.name||(W.name=g),t[g]=W,W.rawDefinition=E.bind(null,i),W.aliases&&Y(W.aliases,{languageName:g})}function Pe(g){delete t[g];for(const E of Object.keys(e))e[E]===g&&delete e[E]}function p(){return Object.keys(t)}function X(g){return g=(g||"").toLowerCase(),t[g]||t[e[g]]}function Y(g,{languageName:E}){typeof g=="string"&&(g=[g]),g.forEach(W=>{e[W.toLowerCase()]=E})}function f(g){const E=X(g);return E&&!E.disableAutodetect}function P(g){g["before:highlightBlock"]&&!g["before:highlightElement"]&&(g["before:highlightElement"]=E=>{g["before:highlightBlock"](Object.assign({block:E.el},E))}),g["after:highlightBlock"]&&!g["after:highlightElement"]&&(g["after:highlightElement"]=E=>{g["after:highlightBlock"](Object.assign({block:E.el},E))})}function z(g){P(g),s.push(g)}function H(g){const E=s.indexOf(g);E!==-1&&s.splice(E,1)}function v(g,E){const W=g;s.forEach(function(ee){ee[W]&&ee[W](E)})}function N(g){return As("10.7.0","highlightBlock will be removed entirely in v12.0"),As("10.7.0","Please use highlightElement now."),L(g)}Object.assign(i,{highlight:c,highlightAuto:w,highlightAll:$,highlightElement:L,highlightBlock:N,configure:C,initHighlighting:I,initHighlightingOnLoad:k,registerLanguage:K,unregisterLanguage:Pe,listLanguages:p,getLanguage:X,registerAliases:Y,autoDetection:f,inherit:fo,addPlugin:z,removePlugin:H}),i.debugMode=function(){r=!1},i.safeMode=function(){r=!0},i.versionString=uy,i.regex={concat:Ps,lookahead:Gl,either:Gn,optional:Cm,anyNumberOfTimes:Em};for(const g in Si)typeof Si[g]=="object"&&Wl(Si[g]);return Object.assign(i,Si),i},_s=ic({});_s.newInstance=()=>ic({});var fy=_s;_s.HighlightJS=_s;_s.default=_s;var ei=fy;const yo="[A-Za-z$_][0-9A-Za-z$_]*",dy=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],my=["true","false","null","undefined","NaN","Infinity"],rc=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],nc=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ac=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],yy=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],gy=[].concat(ac,rc,nc);function xy(i){const t=i.regex,e=(E,{after:W})=>{const ee="",end:""},n=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(E,W)=>{const ee=E[0].length+E.index,ce=E.input[ee];if(ce==="<"||ce===","){W.ignoreMatch();return}ce===">"&&(e(E,{after:ee})||W.ignoreMatch());let re;const he=E.input.substring(ee);if(re=he.match(/^\s*=/)){W.ignoreMatch();return}if((re=he.match(/^\s+extends\s+/))&&re.index===0){W.ignoreMatch();return}}},o={$pattern:yo,keyword:dy,literal:my,built_in:gy,"variable.language":yy},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},w={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},y={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,m],subLanguage:"css"}},L={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,m]},I=i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),k={className:"comment",variants:[I,i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},j=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,w,y,L,C,{match:/\$\d+/},d];m.contains=j.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(j)});const $=[].concat(k,m.contains),T=$.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat($)}]),K={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:T},Pe={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},p={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...rc,...nc]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},Y={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[K],illegal:/%/},f={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(E){return t.concat("(?!",E.join("|"),")")}const z={match:t.concat(/\b/,P([...ac,"super","import"]),s,t.lookahead(/\(/)),className:"title.function",relevance:0},H={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},v={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},K]},N="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",g={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(N)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[K]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:p},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,w,y,L,C,k,{match:/\$\d+/},d,p,{className:"attr",begin:s+t.lookahead(":"),relevance:0},g,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,i.REGEXP_MODE,{className:"function",begin:N,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:n},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},Y,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[K,i.inherit(i.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},H,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[K]},z,f,Pe,v,{match:/\$[(.]/}]}}function by(i){const t="\\[=*\\[",e="\\]=*\\]",s={begin:t,end:e,contains:["self"]},r=[i.COMMENT("--(?!"+t+")","$"),i.COMMENT("--"+t,e,{contains:[s],relevance:10})];return{name:"Lua",keywords:{$pattern:i.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[i.inherit(i.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},i.C_NUMBER_MODE,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,{className:"string",begin:t,end:e,contains:[s],relevance:5}])}}var go=Nu({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(i){var t=us(i.language);Gs(function(){return i.language},function(r){t.value=r});var e=Lt(function(){return i.autodetect||!t.value}),s=Lt(function(){return!e.value&&!ei.getLanguage(t.value)});return{className:Lt(function(){return s.value?"":"hljs "+t.value}),highlightedCode:Lt(function(){var r;if(s.value)return console.warn('The language "'+t.value+'" you specified could not be found.'),i.code.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");if(e.value){var n=ei.highlightAuto(i.code);return t.value=(r=n.language)!==null&&r!==void 0?r:"",n.value}return(n=ei.highlight(i.code,{language:t.value,ignoreIllegals:i.ignoreIllegals})).value})}},render:function(){return Ca("pre",{},[Ca("code",{class:this.className,innerHTML:this.highlightedCode})])}}),Py={install:function(i){i.component("highlightjs",go)},component:go};const oc=Gh(Pm);ei.registerLanguage("javascript",xy);ei.registerLanguage("lua",by);oc.use(Py);oc.mount("#app"); +`};for(const[I,k]of Object.entries(u))u[I]=us(k);const c=sr([]);for(const I in u){const k=u[I],j=Lt(()=>s(k.value,l.value)),$=I.match(/\/(\w+)\.mjs$/)[1];c.push({name:$,jscode:k,luacode:j})}const d=Lt(()=>s(n.value,l.value)),m=Lt(()=>r(n.value,l.value));function w(){L("luacode")}function y(){_d.saveAs(new Blob([d.value]),"test11.lua")}function L(I){if(window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),document.selection){const k=document.body.createTextRange();k.moveToElementText(document.getElementById(I)),k.select().createTextRange(),document.execCommand("copy")}else if(window.getSelection){const k=document.createRange();k.selectNode(document.getElementById(I)),window.getSelection().addRange(k),document.execCommand("copy")}}const C=us(!1);return Gs(C,I=>{I?o.value=[...a]:o.value=[]}),(I,k)=>{const j=Tu("highlightjs");return ht(),gt("div",null,[be("h1",Gd,[be("a",{href:"https://github.com/xiangnanscu/js2lua",title:Ii(oo).version},Fs(Ii(oo).name),9,Jd),Zr(" - Writing LuaJIT with the expressiveness of JavaScript. ")]),be("div",Xd,[be("div",Yd,[be("div",{class:ti({"error-wrapper":I.error})},[be("div",Zd,[$s(be("input",{class:"form-check-input",type:"checkbox",id:"label-all","onUpdate:modelValue":k[0]||(k[0]=$=>e.value=$)},null,512),[[kr,e.value]]),Qd]),be("div",em,[$s(be("input",{class:"form-check-input",type:"checkbox",id:"label-all","onUpdate:modelValue":k[1]||(k[1]=$=>C.value=$)},null,512),[[kr,C.value]]),tm]),(ht(!0),gt(lt,null,Sr(Ii(a),($,T)=>(ht(),gt("div",{key:T,class:ti({"form-check":!0})},[$s(be("input",{class:"form-check-input",type:"checkbox",id:"label"+T,"onUpdate:modelValue":k[2]||(k[2]=K=>o.value=K),value:$},null,8,sm),[[kr,o.value]]),be("label",{class:"form-check-label",for:"label"+T},Fs($),9,im)]))),128))],2)]),be("div",rm,[be("button",{onClick:k[3]||(k[3]=$=>n.value="")},"clear textarea"),$s(be("textarea",{rows:"10",style:{height:"500px"},class:"form-control","onUpdate:modelValue":k[4]||(k[4]=$=>n.value=$)},null,512),[[Da,n.value]])]),e.value?(ht(),gt("div",nm,[be("div",am,[be("label",om,[be("input",{onInput:k[5]||(k[5]=$=>t.value=!t.value),value:t.value,type:"checkbox",class:"form-check-input"},null,40,lm),Zr("show js ast")])]),t.value?(ht(),gt("div",cm,[be("pre",null,Fs(m.value),1)])):(ht(),gt("div",um,[Ue(j,{language:"javascript",code:n.value},null,8,["code"])]))])):ph("",!0),be("div",hm,[be("button",{onClick:w},"copy lua"),be("button",{onClick:y},"save as"),Ue(j,{id:"luacode",language:"lua",code:d.value},null,8,["code"])])]),be("table",pm,[be("thead",null,[be("tr",null,[be("th",fm,[dm,(ht(!0),gt(lt,null,Sr(c,($,T)=>(ht(),gt("a",{key:T,class:"link-block",href:`#${$.name}`},Fs($.name),9,mm))),128))])])]),be("tbody",null,[(ht(!0),gt(lt,null,Sr(c,($,T)=>(ht(),gt(lt,{key:T},[be("tr",null,[be("td",ym,[be("h3",{id:$.name},Fs($.name),9,gm)])]),be("tr",null,[be("td",xm,[$s(be("textarea",{class:"td-textarea form-control","onUpdate:modelValue":K=>$.jscode=K},null,8,bm),[[Da,$.jscode]])]),be("td",null,[Ue(j,{language:"javascript",code:$.jscode},null,8,["code"])]),be("td",null,[Ue(j,{language:"lua",code:$.luacode},null,8,["code"])])])],64))),128))])])])}}};function Wl(i){return i instanceof Map?i.clear=i.delete=i.set=function(){throw new Error("map is read-only")}:i instanceof Set&&(i.add=i.clear=i.delete=function(){throw new Error("set is read-only")}),Object.freeze(i),Object.getOwnPropertyNames(i).forEach(t=>{const e=i[t],s=typeof e;(s==="object"||s==="function")&&!Object.isFrozen(e)&&Wl(e)}),i}class lo{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function ql(i){return i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Jt(i,...t){const e=Object.create(null);for(const s in i)e[s]=i[s];return t.forEach(function(s){for(const r in s)e[r]=s[r]}),e}const Tm="",co=i=>!!i.scope,Am=(i,{prefix:t})=>{if(i.startsWith("language:"))return i.replace("language:","language-");if(i.includes(".")){const e=i.split(".");return[`${t}${e.shift()}`,...e.map((s,r)=>`${s}${"_".repeat(r+1)}`)].join(" ")}return`${t}${i}`};class wm{constructor(t,e){this.buffer="",this.classPrefix=e.classPrefix,t.walk(this)}addText(t){this.buffer+=ql(t)}openNode(t){if(!co(t))return;const e=Am(t.scope,{prefix:this.classPrefix});this.span(e)}closeNode(t){!co(t)||(this.buffer+=Tm)}value(){return this.buffer}span(t){this.buffer+=``}}const uo=(i={})=>{const t={children:[]};return Object.assign(t,i),t};class qn{constructor(){this.rootNode=uo(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const e=uo({scope:t});this.add(e),this.stack.push(e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,e){return typeof e=="string"?t.addText(e):e.children&&(t.openNode(e),e.children.forEach(s=>this._walk(t,s)),t.closeNode(e)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(e=>typeof e=="string")?t.children=[t.children.join("")]:t.children.forEach(e=>{qn._collapse(e)})))}}class Sm extends qn{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,e){const s=t.root;e&&(s.scope=`language:${e}`),this.add(s)}toHTML(){return new wm(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function li(i){return i?typeof i=="string"?i:i.source:null}function Gl(i){return Ps("(?=",i,")")}function Em(i){return Ps("(?:",i,")*")}function Cm(i){return Ps("(?:",i,")?")}function Ps(...i){return i.map(e=>li(e)).join("")}function vm(i){const t=i[i.length-1];return typeof t=="object"&&t.constructor===Object?(i.splice(i.length-1,1),t):{}}function Gn(...i){const t=vm(i);return"("+(t.capture?"":"?:")+i.map(s=>li(s)).join("|")+")"}function Jl(i){return new RegExp(i.toString()+"|").exec("").length-1}function Im(i,t){const e=i&&i.exec(t);return e&&e.index===0}const Nm=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Jn(i,{joinWith:t}){let e=0;return i.map(s=>{e+=1;const r=e;let n=li(s),a="";for(;n.length>0;){const o=Nm.exec(n);if(!o){a+=n;break}a+=n.substring(0,o.index),n=n.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?a+="\\"+String(Number(o[1])+r):(a+=o[0],o[0]==="("&&e++)}return a}).map(s=>`(${s})`).join(t)}const km=/\b\B/,Xl="[a-zA-Z]\\w*",Xn="[a-zA-Z_]\\w*",Yl="\\b\\d+(\\.\\d+)?",Zl="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ql="\\b(0b[01]+)",Lm="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Mm=(i={})=>{const t=/^#![ ]*\//;return i.binary&&(i.begin=Ps(t,/.*\b/,i.binary,/\b.*/)),Jt({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,s)=>{e.index!==0&&s.ignoreMatch()}},i)},ci={begin:"\\\\[\\s\\S]",relevance:0},_m={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ci]},Om={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ci]},Dm={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},mr=function(i,t,e={}){const s=Jt({scope:"comment",begin:i,end:t,contains:[]},e);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=Gn("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:Ps(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},Fm=mr("//","$"),$m=mr("/\\*","\\*/"),Rm=mr("#","$"),Bm={scope:"number",begin:Yl,relevance:0},jm={scope:"number",begin:Zl,relevance:0},Um={scope:"number",begin:Ql,relevance:0},Hm={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ci,{begin:/\[/,end:/\]/,relevance:0,contains:[ci]}]},Vm={scope:"title",begin:Xl,relevance:0},zm={scope:"title",begin:Xn,relevance:0},Km={begin:"\\.\\s*"+Xn,relevance:0},Wm=function(i){return Object.assign(i,{"on:begin":(t,e)=>{e.data._beginMatch=t[1]},"on:end":(t,e)=>{e.data._beginMatch!==t[1]&&e.ignoreMatch()}})};var Si=Object.freeze({__proto__:null,APOS_STRING_MODE:_m,BACKSLASH_ESCAPE:ci,BINARY_NUMBER_MODE:Um,BINARY_NUMBER_RE:Ql,COMMENT:mr,C_BLOCK_COMMENT_MODE:$m,C_LINE_COMMENT_MODE:Fm,C_NUMBER_MODE:jm,C_NUMBER_RE:Zl,END_SAME_AS_BEGIN:Wm,HASH_COMMENT_MODE:Rm,IDENT_RE:Xl,MATCH_NOTHING_RE:km,METHOD_GUARD:Km,NUMBER_MODE:Bm,NUMBER_RE:Yl,PHRASAL_WORDS_MODE:Dm,QUOTE_STRING_MODE:Om,REGEXP_MODE:Hm,RE_STARTERS_RE:Lm,SHEBANG:Mm,TITLE_MODE:Vm,UNDERSCORE_IDENT_RE:Xn,UNDERSCORE_TITLE_MODE:zm});function qm(i,t){i.input[i.index-1]==="."&&t.ignoreMatch()}function Gm(i,t){i.className!==void 0&&(i.scope=i.className,delete i.className)}function Jm(i,t){!t||!i.beginKeywords||(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",i.__beforeBegin=qm,i.keywords=i.keywords||i.beginKeywords,delete i.beginKeywords,i.relevance===void 0&&(i.relevance=0))}function Xm(i,t){!Array.isArray(i.illegal)||(i.illegal=Gn(...i.illegal))}function Ym(i,t){if(!!i.match){if(i.begin||i.end)throw new Error("begin & end are not supported with match");i.begin=i.match,delete i.match}}function Zm(i,t){i.relevance===void 0&&(i.relevance=1)}const Qm=(i,t)=>{if(!i.beforeMatch)return;if(i.starts)throw new Error("beforeMatch cannot be used with starts");const e=Object.assign({},i);Object.keys(i).forEach(s=>{delete i[s]}),i.keywords=e.keywords,i.begin=Ps(e.beforeMatch,Gl(e.begin)),i.starts={relevance:0,contains:[Object.assign(e,{endsParent:!0})]},i.relevance=0,delete e.beforeMatch},ey=["of","and","for","in","not","or","if","then","parent","list","value"],ty="keyword";function ec(i,t,e=ty){const s=Object.create(null);return typeof i=="string"?r(e,i.split(" ")):Array.isArray(i)?r(e,i):Object.keys(i).forEach(function(n){Object.assign(s,ec(i[n],t,n))}),s;function r(n,a){t&&(a=a.map(o=>o.toLowerCase())),a.forEach(function(o){const l=o.split("|");s[l[0]]=[n,sy(l[0],l[1])]})}}function sy(i,t){return t?Number(t):iy(i)?0:1}function iy(i){return ey.includes(i.toLowerCase())}const ho={},ys=i=>{console.error(i)},po=(i,...t)=>{console.log(`WARN: ${i}`,...t)},As=(i,t)=>{ho[`${i}/${t}`]||(console.log(`Deprecated as of ${i}. ${t}`),ho[`${i}/${t}`]=!0)},Ji=new Error;function tc(i,t,{key:e}){let s=0;const r=i[e],n={},a={};for(let o=1;o<=t.length;o++)a[o+s]=r[o],n[o+s]=!0,s+=Jl(t[o-1]);i[e]=a,i[e]._emit=n,i[e]._multi=!0}function ry(i){if(!!Array.isArray(i.begin)){if(i.skip||i.excludeBegin||i.returnBegin)throw ys("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ji;if(typeof i.beginScope!="object"||i.beginScope===null)throw ys("beginScope must be object"),Ji;tc(i,i.begin,{key:"beginScope"}),i.begin=Jn(i.begin,{joinWith:""})}}function ny(i){if(!!Array.isArray(i.end)){if(i.skip||i.excludeEnd||i.returnEnd)throw ys("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ji;if(typeof i.endScope!="object"||i.endScope===null)throw ys("endScope must be object"),Ji;tc(i,i.end,{key:"endScope"}),i.end=Jn(i.end,{joinWith:""})}}function ay(i){i.scope&&typeof i.scope=="object"&&i.scope!==null&&(i.beginScope=i.scope,delete i.scope)}function oy(i){ay(i),typeof i.beginScope=="string"&&(i.beginScope={_wrap:i.beginScope}),typeof i.endScope=="string"&&(i.endScope={_wrap:i.endScope}),ry(i),ny(i)}function ly(i){function t(a,o){return new RegExp(li(a),"m"+(i.case_insensitive?"i":"")+(i.unicodeRegex?"u":"")+(o?"g":""))}class e{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=Jl(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(l=>l[1]);this.matcherRe=t(Jn(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(o);if(!l)return null;const u=l.findIndex((d,m)=>m>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const l=new e;return this.rules.slice(o).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(o);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(o)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function r(a){const o=new s;return a.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),a.terminatorEnd&&o.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&o.addRule(a.illegal,{type:"illegal"}),o}function n(a,o){const l=a;if(a.isCompiled)return l;[Gm,Ym,oy,Qm].forEach(c=>c(a,o)),i.compilerExtensions.forEach(c=>c(a,o)),a.__beforeBegin=null,[Jm,Xm,Zm].forEach(c=>c(a,o)),a.isCompiled=!0;let u=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern),u=u||/\w+/,a.keywords&&(a.keywords=ec(a.keywords,i.case_insensitive)),l.keywordPatternRe=t(u,!0),o&&(a.begin||(a.begin=/\B|\b/),l.beginRe=t(l.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(l.endRe=t(l.end)),l.terminatorEnd=li(l.end)||"",a.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(l.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(c){return cy(c==="self"?a:c)})),a.contains.forEach(function(c){n(c,l)}),a.starts&&n(a.starts,o),l.matcher=r(l),l}if(i.compilerExtensions||(i.compilerExtensions=[]),i.contains&&i.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return i.classNameAliases=Jt(i.classNameAliases||{}),n(i)}function sc(i){return i?i.endsWithParent||sc(i.starts):!1}function cy(i){return i.variants&&!i.cachedVariants&&(i.cachedVariants=i.variants.map(function(t){return Jt(i,{variants:null},t)})),i.cachedVariants?i.cachedVariants:sc(i)?Jt(i,{starts:i.starts?Jt(i.starts):null}):Object.isFrozen(i)?Jt(i):i}var uy="11.9.0";class hy extends Error{constructor(t,e){super(t),this.name="HTMLInjectionError",this.html=e}}const Br=ql,fo=Jt,mo=Symbol("nomatch"),py=7,ic=function(i){const t=Object.create(null),e=Object.create(null),s=[];let r=!0;const n="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Sm};function l(g){return o.noHighlightRe.test(g)}function u(g){let E=g.className+" ";E+=g.parentNode?g.parentNode.className:"";const W=o.languageDetectRe.exec(E);if(W){const ee=X(W[1]);return ee||(po(n.replace("{}",W[1])),po("Falling back to no-highlight mode for this block.",g)),ee?W[1]:"no-highlight"}return E.split(/\s+/).find(ee=>l(ee)||X(ee))}function c(g,E,W){let ee="",ce="";typeof E=="object"?(ee=g,W=E.ignoreIllegals,ce=E.language):(As("10.7.0","highlight(lang, code, ...args) has been deprecated."),As("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),ce=g,ee=E),W===void 0&&(W=!0);const re={code:ee,language:ce};v("before:highlight",re);const he=re.result?re.result:d(re.language,re.code,W);return he.code=re.code,v("after:highlight",he),he}function d(g,E,W,ee){const ce=Object.create(null);function re(U,G){return U.keywords[G]}function he(){if(!R.keywords){V.addText(B);return}let U=0;R.keywordPatternRe.lastIndex=0;let G=R.keywordPatternRe.exec(B),se="";for(;G;){se+=B.substring(U,G.index);const ue=_.case_insensitive?G[0].toLowerCase():G[0],ye=re(R,ue);if(ye){const[Ne,Rt]=ye;if(V.addText(se),se="",ce[ue]=(ce[ue]||0)+1,ce[ue]<=py&&(te+=Rt),Ne.startsWith("_"))se+=G[0];else{const ot=_.classNameAliases[Ne]||Ne;Te(G[0],ot)}}else se+=G[0];U=R.keywordPatternRe.lastIndex,G=R.keywordPatternRe.exec(B)}se+=B.substring(U),V.addText(se)}function Be(){if(B==="")return;let U=null;if(typeof R.subLanguage=="string"){if(!t[R.subLanguage]){V.addText(B);return}U=d(R.subLanguage,B,!0,q[R.subLanguage]),q[R.subLanguage]=U._top}else U=w(B,R.subLanguage.length?R.subLanguage:null);R.relevance>0&&(te+=U.relevance),V.__addSublanguage(U._emitter,U.language)}function Ie(){R.subLanguage!=null?Be():he(),B=""}function Te(U,G){U!==""&&(V.startScope(G),V.addText(U),V.endScope())}function ze(U,G){let se=1;const ue=G.length-1;for(;se<=ue;){if(!U._emit[se]){se++;continue}const ye=_.classNameAliases[U[se]]||U[se],Ne=G[se];ye?Te(Ne,ye):(B=Ne,he(),B=""),se++}}function at(U,G){return U.scope&&typeof U.scope=="string"&&V.openNode(_.classNameAliases[U.scope]||U.scope),U.beginScope&&(U.beginScope._wrap?(Te(B,_.classNameAliases[U.beginScope._wrap]||U.beginScope._wrap),B=""):U.beginScope._multi&&(ze(U.beginScope,G),B="")),R=Object.create(U,{parent:{value:R}}),R}function Ge(U,G,se){let ue=Im(U.endRe,se);if(ue){if(U["on:end"]){const ye=new lo(U);U["on:end"](G,ye),ye.isMatchIgnored&&(ue=!1)}if(ue){for(;U.endsParent&&U.parent;)U=U.parent;return U}}if(U.endsWithParent)return Ge(U.parent,G,se)}function Qe(U){return R.matcher.regexIndex===0?(B+=U[0],1):(pe=!0,0)}function St(U){const G=U[0],se=U.rule,ue=new lo(se),ye=[se.__beforeBegin,se["on:begin"]];for(const Ne of ye)if(!!Ne&&(Ne(U,ue),ue.isMatchIgnored))return Qe(G);return se.skip?B+=G:(se.excludeBegin&&(B+=G),Ie(),!se.returnBegin&&!se.excludeBegin&&(B=G)),at(se,U),se.returnBegin?0:G.length}function rs(U){const G=U[0],se=E.substring(U.index),ue=Ge(R,U,se);if(!ue)return mo;const ye=R;R.endScope&&R.endScope._wrap?(Ie(),Te(G,R.endScope._wrap)):R.endScope&&R.endScope._multi?(Ie(),ze(R.endScope,U)):ye.skip?B+=G:(ye.returnEnd||ye.excludeEnd||(B+=G),Ie(),ye.excludeEnd&&(B=G));do R.scope&&V.closeNode(),!R.skip&&!R.subLanguage&&(te+=R.relevance),R=R.parent;while(R!==ue.parent);return ue.starts&&at(ue.starts,U),ye.returnEnd?0:G.length}function x(){const U=[];for(let G=R;G!==_;G=G.parent)G.scope&&U.unshift(G.scope);U.forEach(G=>V.openNode(G))}let S={};function M(U,G){const se=G&&G[0];if(B+=U,se==null)return Ie(),0;if(S.type==="begin"&&G.type==="end"&&S.index===G.index&&se===""){if(B+=E.slice(G.index,G.index+1),!r){const ue=new Error(`0 width match regex (${g})`);throw ue.languageName=g,ue.badRule=S.rule,ue}return 1}if(S=G,G.type==="begin")return St(G);if(G.type==="illegal"&&!W){const ue=new Error('Illegal lexeme "'+se+'" for mode "'+(R.scope||"")+'"');throw ue.mode=R,ue}else if(G.type==="end"){const ue=rs(G);if(ue!==mo)return ue}if(G.type==="illegal"&&se==="")return 1;if(ae>1e5&&ae>G.index*3)throw new Error("potential infinite loop, way more iterations than matches");return B+=se,se.length}const _=X(g);if(!_)throw ys(n.replace("{}",g)),new Error('Unknown language: "'+g+'"');const D=ly(_);let J="",R=ee||D;const q={},V=new o.__emitter(o);x();let B="",te=0,ne=0,ae=0,pe=!1;try{if(_.__emitTokens)_.__emitTokens(E,V);else{for(R.matcher.considerAll();;){ae++,pe?pe=!1:R.matcher.considerAll(),R.matcher.lastIndex=ne;const U=R.matcher.exec(E);if(!U)break;const G=E.substring(ne,U.index),se=M(G,U);ne=U.index+se}M(E.substring(ne))}return V.finalize(),J=V.toHTML(),{language:g,value:J,relevance:te,illegal:!1,_emitter:V,_top:R}}catch(U){if(U.message&&U.message.includes("Illegal"))return{language:g,value:Br(E),illegal:!0,relevance:0,_illegalBy:{message:U.message,index:ne,context:E.slice(ne-100,ne+100),mode:U.mode,resultSoFar:J},_emitter:V};if(r)return{language:g,value:Br(E),illegal:!1,relevance:0,errorRaised:U,_emitter:V,_top:R};throw U}}function m(g){const E={value:Br(g),illegal:!1,relevance:0,_top:a,_emitter:new o.__emitter(o)};return E._emitter.addText(g),E}function w(g,E){E=E||o.languages||Object.keys(t);const W=m(g),ee=E.filter(X).filter(f).map(Ie=>d(Ie,g,!1));ee.unshift(W);const ce=ee.sort((Ie,Te)=>{if(Ie.relevance!==Te.relevance)return Te.relevance-Ie.relevance;if(Ie.language&&Te.language){if(X(Ie.language).supersetOf===Te.language)return 1;if(X(Te.language).supersetOf===Ie.language)return-1}return 0}),[re,he]=ce,Be=re;return Be.secondBest=he,Be}function y(g,E,W){const ee=E&&e[E]||W;g.classList.add("hljs"),g.classList.add(`language-${ee}`)}function L(g){let E=null;const W=u(g);if(l(W))return;if(v("before:highlightElement",{el:g,language:W}),g.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",g);return}if(g.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(g)),o.throwUnescapedHTML))throw new hy("One of your code blocks includes unescaped HTML.",g.innerHTML);E=g;const ee=E.textContent,ce=W?c(ee,{language:W,ignoreIllegals:!0}):w(ee);g.innerHTML=ce.value,g.dataset.highlighted="yes",y(g,W,ce.language),g.result={language:ce.language,re:ce.relevance,relevance:ce.relevance},ce.secondBest&&(g.secondBest={language:ce.secondBest.language,relevance:ce.secondBest.relevance}),v("after:highlightElement",{el:g,result:ce,text:ee})}function C(g){o=fo(o,g)}const I=()=>{$(),As("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function k(){$(),As("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let j=!1;function $(){if(document.readyState==="loading"){j=!0;return}document.querySelectorAll(o.cssSelector).forEach(L)}function T(){j&&$()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",T,!1);function K(g,E){let W=null;try{W=E(i)}catch(ee){if(ys("Language definition for '{}' could not be registered.".replace("{}",g)),r)ys(ee);else throw ee;W=a}W.name||(W.name=g),t[g]=W,W.rawDefinition=E.bind(null,i),W.aliases&&Y(W.aliases,{languageName:g})}function Pe(g){delete t[g];for(const E of Object.keys(e))e[E]===g&&delete e[E]}function p(){return Object.keys(t)}function X(g){return g=(g||"").toLowerCase(),t[g]||t[e[g]]}function Y(g,{languageName:E}){typeof g=="string"&&(g=[g]),g.forEach(W=>{e[W.toLowerCase()]=E})}function f(g){const E=X(g);return E&&!E.disableAutodetect}function P(g){g["before:highlightBlock"]&&!g["before:highlightElement"]&&(g["before:highlightElement"]=E=>{g["before:highlightBlock"](Object.assign({block:E.el},E))}),g["after:highlightBlock"]&&!g["after:highlightElement"]&&(g["after:highlightElement"]=E=>{g["after:highlightBlock"](Object.assign({block:E.el},E))})}function z(g){P(g),s.push(g)}function H(g){const E=s.indexOf(g);E!==-1&&s.splice(E,1)}function v(g,E){const W=g;s.forEach(function(ee){ee[W]&&ee[W](E)})}function N(g){return As("10.7.0","highlightBlock will be removed entirely in v12.0"),As("10.7.0","Please use highlightElement now."),L(g)}Object.assign(i,{highlight:c,highlightAuto:w,highlightAll:$,highlightElement:L,highlightBlock:N,configure:C,initHighlighting:I,initHighlightingOnLoad:k,registerLanguage:K,unregisterLanguage:Pe,listLanguages:p,getLanguage:X,registerAliases:Y,autoDetection:f,inherit:fo,addPlugin:z,removePlugin:H}),i.debugMode=function(){r=!1},i.safeMode=function(){r=!0},i.versionString=uy,i.regex={concat:Ps,lookahead:Gl,either:Gn,optional:Cm,anyNumberOfTimes:Em};for(const g in Si)typeof Si[g]=="object"&&Wl(Si[g]);return Object.assign(i,Si),i},_s=ic({});_s.newInstance=()=>ic({});var fy=_s;_s.HighlightJS=_s;_s.default=_s;var ei=fy;const yo="[A-Za-z$_][0-9A-Za-z$_]*",dy=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],my=["true","false","null","undefined","NaN","Infinity"],rc=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],nc=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ac=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],yy=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],gy=[].concat(ac,rc,nc);function xy(i){const t=i.regex,e=(E,{after:W})=>{const ee="",end:""},n=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(E,W)=>{const ee=E[0].length+E.index,ce=E.input[ee];if(ce==="<"||ce===","){W.ignoreMatch();return}ce===">"&&(e(E,{after:ee})||W.ignoreMatch());let re;const he=E.input.substring(ee);if(re=he.match(/^\s*=/)){W.ignoreMatch();return}if((re=he.match(/^\s+extends\s+/))&&re.index===0){W.ignoreMatch();return}}},o={$pattern:yo,keyword:dy,literal:my,built_in:gy,"variable.language":yy},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},w={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},y={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,m],subLanguage:"css"}},L={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,m]},I=i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),k={className:"comment",variants:[I,i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},j=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,w,y,L,C,{match:/\$\d+/},d];m.contains=j.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(j)});const $=[].concat(k,m.contains),T=$.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat($)}]),K={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:T},Pe={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},p={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...rc,...nc]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},Y={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[K],illegal:/%/},f={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(E){return t.concat("(?!",E.join("|"),")")}const z={match:t.concat(/\b/,P([...ac,"super","import"]),s,t.lookahead(/\(/)),className:"title.function",relevance:0},H={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},v={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},K]},N="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",g={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(N)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[K]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:p},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,w,y,L,C,k,{match:/\$\d+/},d,p,{className:"attr",begin:s+t.lookahead(":"),relevance:0},g,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,i.REGEXP_MODE,{className:"function",begin:N,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:n},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},Y,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[K,i.inherit(i.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},H,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[K]},z,f,Pe,v,{match:/\$[(.]/}]}}function by(i){const t="\\[=*\\[",e="\\]=*\\]",s={begin:t,end:e,contains:["self"]},r=[i.COMMENT("--(?!"+t+")","$"),i.COMMENT("--"+t,e,{contains:[s],relevance:10})];return{name:"Lua",keywords:{$pattern:i.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[i.inherit(i.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},i.C_NUMBER_MODE,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,{className:"string",begin:t,end:e,contains:[s],relevance:5}])}}var go=Nu({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(i){var t=us(i.language);Gs(function(){return i.language},function(r){t.value=r});var e=Lt(function(){return i.autodetect||!t.value}),s=Lt(function(){return!e.value&&!ei.getLanguage(t.value)});return{className:Lt(function(){return s.value?"":"hljs "+t.value}),highlightedCode:Lt(function(){var r;if(s.value)return console.warn('The language "'+t.value+'" you specified could not be found.'),i.code.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");if(e.value){var n=ei.highlightAuto(i.code);return t.value=(r=n.language)!==null&&r!==void 0?r:"",n.value}return(n=ei.highlight(i.code,{language:t.value,ignoreIllegals:i.ignoreIllegals})).value})}},render:function(){return Ca("pre",{},[Ca("code",{class:this.className,innerHTML:this.highlightedCode})])}}),Py={install:function(i){i.component("highlightjs",go)},component:go};const oc=Gh(Pm);ei.registerLanguage("javascript",xy);ei.registerLanguage("lua",by);oc.use(Py);oc.mount("#app"); diff --git a/index.html b/index.html index 8703d21..04cbc38 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ gtag('config', 'G-FEYV3C3QK5'); - +