@sreetej510/pi-shipd-checks 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -150,7 +150,7 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
150
150
  `),h=m.shift();if(!h)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let f=h.split(" "),A=+f[1],y=f.slice(2).join(" "),b={};for(let E of m){if(!E)continue;let _=E.indexOf(":");if(_===-1)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${E}"`));let x=E.slice(0,_).toLowerCase(),S=E.slice(_+1).trimStart(),T=b[x];typeof T=="string"?b[x]=[T,S]:Array.isArray(T)?T.push(S):b[x]=S}Xre("got proxy server response: %o %o",h,b),o(),e({connect:{statusCode:A,statusText:y,headers:b},buffered:p})}t.on("error",c),t.on("end",a),s()})}ZB.parseProxyResponse=str});var FTt=me(AA=>{"use strict";var otr=AA&&AA.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),atr=AA&&AA.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),LTt=AA&&AA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&otr(e,t,n);return atr(e,t),e},BTt=AA&&AA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AA,"__esModule",{value:!0});AA.HttpsProxyAgent=void 0;var Zre=LTt(tt("net")),OTt=LTt(tt("tls")),ctr=BTt(tt("assert")),ltr=BTt(iPe()),utr=PTt(),ptr=tt("url"),dtr=NTt(),B4=(0,ltr.default)("https-proxy-agent"),DTt=t=>t.servername===void 0&&t.host&&!Zre.isIP(t.host)?{...t,servername:t.host}:t,eie=class extends utr.Agent{constructor(e,n){super(n),this.options={path:void 0},this.proxy=typeof e=="string"?new ptr.URL(e):e,this.proxyHeaders=n?.headers??{},B4("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?MTt(n,"headers"):null,host:r,port:i}}async connect(e,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let i;r.protocol==="https:"?(B4("Creating `tls.Socket`: %o",this.connectOpts),i=OTt.connect(DTt(this.connectOpts))):(B4("Creating `net.Socket`: %o",this.connectOpts),i=Zre.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=Zre.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${o}:${n.port} HTTP/1.1\r
151
151
  `;if(r.username||r.password){let d=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}s.Host=`${o}:${n.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))a+=`${d}: ${s[d]}\r
152
152
  `;let c=(0,dtr.parseProxyResponse)(i);i.write(`${a}\r
153
- `);let{connect:u,buffered:l}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",mtr),n.secureEndpoint?(B4("Upgrading socket connection to TLS"),OTt.connect({...MTt(DTt(n),"host","path","port"),socket:i})):i;i.destroy();let p=new Zre.Socket({writable:!1});return p.readable=!0,e.once("socket",d=>{B4("Replaying proxy buffer for failed request"),(0,ctr.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),p}};eie.protocols=["http","https"];AA.HttpsProxyAgent=eie;function mtr(t){t.resume()}function MTt(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}});function ftr(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let n=t.substring(5,e).split(";"),r="",i=!1,s=n[0]||"text/plain",o=s;for(let l=1;l<n.length;l++)n[l]==="base64"?i=!0:n[l]&&(o+=`;${n[l]}`,n[l].indexOf("charset=")===0&&(r=n[l].substring(8)));!n[0]&&!r.length&&(o+=";charset=US-ASCII",r="US-ASCII");let a=i?"base64":"ascii",c=unescape(t.substring(e+1)),u=Buffer.from(c,a);return u.type=s,u.typeFull=o,u.charset=r,u}var UTt,$Tt=H(()=>{UTt=ftr});var GTt=me((tie,QTt)=>{(function(t,e){typeof tie=="object"&&typeof QTt<"u"?e(tie):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(tie,(function(t){"use strict";function e(){}function n(M){return typeof M=="object"&&M!==null||typeof M=="function"}let r=e;function i(M,K){try{Object.defineProperty(M,"name",{value:K,configurable:!0})}catch{}}let s=Promise,o=Promise.prototype.then,a=Promise.reject.bind(s);function c(M){return new s(M)}function u(M){return c(K=>K(M))}function l(M){return a(M)}function p(M,K,we){return o.call(M,K,we)}function d(M,K,we){p(p(M,K,we),void 0,r)}function m(M,K){d(M,K)}function h(M,K){d(M,void 0,K)}function f(M,K,we){return p(M,K,we)}function A(M){p(M,void 0,r)}let y=M=>{if(typeof queueMicrotask=="function")y=queueMicrotask;else{let K=u(void 0);y=we=>p(K,we)}return y(M)};function b(M,K,we){if(typeof M!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(M,K,we)}function E(M,K,we){try{return u(b(M,K,we))}catch(it){return l(it)}}let _=16384;class x{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(K){let we=this._back,it=we;we._elements.length===_-1&&(it={_elements:[],_next:void 0}),we._elements.push(K),it!==we&&(this._back=it,we._next=it),++this._size}shift(){let K=this._front,we=K,it=this._cursor,At=it+1,Ht=K._elements,tn=Ht[it];return At===_&&(we=K._next,At=0),--this._size,this._cursor=At,K!==we&&(this._front=we),Ht[it]=void 0,tn}forEach(K){let we=this._cursor,it=this._front,At=it._elements;for(;(we!==At.length||it._next!==void 0)&&!(we===At.length&&(it=it._next,At=it._elements,we=0,At.length===0));)K(At[we]),++we}peek(){let K=this._front,we=this._cursor;return K._elements[we]}}let S=Symbol("[[AbortSteps]]"),T=Symbol("[[ErrorSteps]]"),v=Symbol("[[CancelSteps]]"),R=Symbol("[[PullSteps]]"),O=Symbol("[[ReleaseSteps]]");function G(M,K){M._ownerReadableStream=K,K._reader=M,K._state==="readable"?re(M):K._state==="closed"?te(M):ie(M,K._storedError)}function $(M,K){let we=M._ownerReadableStream;return ym(we,K)}function U(M){let K=M._ownerReadableStream;K._state==="readable"?q(M,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):oe(M,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),K._readableStreamController[O](),K._reader=void 0,M._ownerReadableStream=void 0}function W(M){return new TypeError("Cannot "+M+" a stream using a released reader")}function re(M){M._closedPromise=c((K,we)=>{M._closedPromise_resolve=K,M._closedPromise_reject=we})}function ie(M,K){re(M),q(M,K)}function te(M){re(M),be(M)}function q(M,K){M._closedPromise_reject!==void 0&&(A(M._closedPromise),M._closedPromise_reject(K),M._closedPromise_resolve=void 0,M._closedPromise_reject=void 0)}function oe(M,K){ie(M,K)}function be(M){M._closedPromise_resolve!==void 0&&(M._closedPromise_resolve(void 0),M._closedPromise_resolve=void 0,M._closedPromise_reject=void 0)}let De=Number.isFinite||function(M){return typeof M=="number"&&isFinite(M)},Re=Math.trunc||function(M){return M<0?Math.ceil(M):Math.floor(M)};function Ie(M){return typeof M=="object"||typeof M=="function"}function ne(M,K){if(M!==void 0&&!Ie(M))throw new TypeError(`${K} is not an object.`)}function ce(M,K){if(typeof M!="function")throw new TypeError(`${K} is not a function.`)}function se(M){return typeof M=="object"&&M!==null||typeof M=="function"}function z(M,K){if(!se(M))throw new TypeError(`${K} is not an object.`)}function ee(M,K,we){if(M===void 0)throw new TypeError(`Parameter ${K} is required in '${we}'.`)}function j(M,K,we){if(M===void 0)throw new TypeError(`${K} is required in '${we}'.`)}function X(M){return Number(M)}function le(M){return M===0?0:M}function xe(M){return le(Re(M))}function Se(M,K){let it=Number.MAX_SAFE_INTEGER,At=Number(M);if(At=le(At),!De(At))throw new TypeError(`${K} is not a finite number`);if(At=xe(At),At<0||At>it)throw new TypeError(`${K} is outside the accepted range of 0 to ${it}, inclusive`);return!De(At)||At===0?0:At}function pe(M,K){if(!EE(M))throw new TypeError(`${K} is not a ReadableStream.`)}function ge(M){return new Y(M)}function Te(M,K){M._reader._readRequests.push(K)}function Ee(M,K,we){let At=M._reader._readRequests.shift();we?At._closeSteps():At._chunkSteps(K)}function ve(M){return M._reader._readRequests.length}function ye(M){let K=M._reader;return!(K===void 0||!qe(K))}class Y{constructor(K){if(ee(K,1,"ReadableStreamDefaultReader"),pe(K,"First parameter"),_E(K))throw new TypeError("This stream has already been locked for exclusive reading by another reader");G(this,K),this._readRequests=new x}get closed(){return qe(this)?this._closedPromise:l(ze("closed"))}cancel(K=void 0){return qe(this)?this._ownerReadableStream===void 0?l(W("cancel")):$(this,K):l(ze("cancel"))}read(){if(!qe(this))return l(ze("read"));if(this._ownerReadableStream===void 0)return l(W("read from"));let K,we,it=c((Ht,tn)=>{K=Ht,we=tn});return He(this,{_chunkSteps:Ht=>K({value:Ht,done:!1}),_closeSteps:()=>K({value:void 0,done:!0}),_errorSteps:Ht=>we(Ht)}),it}releaseLock(){if(!qe(this))throw ze("releaseLock");this._ownerReadableStream!==void 0&&dt(this)}}Object.defineProperties(Y.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(Y.prototype.cancel,"cancel"),i(Y.prototype.read,"read"),i(Y.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Y.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function qe(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_readRequests")?!1:M instanceof Y}function He(M,K){let we=M._ownerReadableStream;we._disturbed=!0,we._state==="closed"?K._closeSteps():we._state==="errored"?K._errorSteps(we._storedError):we._readableStreamController[R](K)}function dt(M){U(M);let K=new TypeError("Reader was released");at(M,K)}function at(M,K){let we=M._readRequests;M._readRequests=new x,we.forEach(it=>{it._errorSteps(K)})}function ze(M){return new TypeError(`ReadableStreamDefaultReader.prototype.${M} can only be used on a ReadableStreamDefaultReader`)}let rt=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class _t{constructor(K,we){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=K,this._preventCancel=we}next(){let K=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?f(this._ongoingPromise,K,K):K(),this._ongoingPromise}return(K){let we=()=>this._returnSteps(K);return this._ongoingPromise?f(this._ongoingPromise,we,we):we()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let K=this._reader,we,it,At=c((tn,Xn)=>{we=tn,it=Xn});return He(K,{_chunkSteps:tn=>{this._ongoingPromise=void 0,y(()=>we({value:tn,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,U(K),we({value:void 0,done:!0})},_errorSteps:tn=>{this._ongoingPromise=void 0,this._isFinished=!0,U(K),it(tn)}}),At}_returnSteps(K){if(this._isFinished)return Promise.resolve({value:K,done:!0});this._isFinished=!0;let we=this._reader;if(!this._preventCancel){let it=$(we,K);return U(we),f(it,()=>({value:K,done:!0}))}return U(we),u({value:K,done:!0})}}let Zt={next(){return $t(this)?this._asyncIteratorImpl.next():l(Ot("next"))},return(M){return $t(this)?this._asyncIteratorImpl.return(M):l(Ot("return"))}};Object.setPrototypeOf(Zt,rt);function Ut(M,K){let we=ge(M),it=new _t(we,K),At=Object.create(Zt);return At._asyncIteratorImpl=it,At}function $t(M){if(!n(M)||!Object.prototype.hasOwnProperty.call(M,"_asyncIteratorImpl"))return!1;try{return M._asyncIteratorImpl instanceof _t}catch{return!1}}function Ot(M){return new TypeError(`ReadableStreamAsyncIterator.${M} can only be used on a ReadableSteamAsyncIterator`)}let Ze=Number.isNaN||function(M){return M!==M};var Me,Xe,gt;function qt(M){return M.slice()}function sn(M,K,we,it,At){new Uint8Array(M).set(new Uint8Array(we,it,At),K)}let mn=M=>(typeof M.transfer=="function"?mn=K=>K.transfer():typeof structuredClone=="function"?mn=K=>structuredClone(K,{transfer:[K]}):mn=K=>K,mn(M)),Pn=M=>(typeof M.detached=="boolean"?Pn=K=>K.detached:Pn=K=>K.byteLength===0,Pn(M));function je(M,K,we){if(M.slice)return M.slice(K,we);let it=we-K,At=new ArrayBuffer(it);return sn(At,0,M,K,it),At}function mt(M,K){let we=M[K];if(we!=null){if(typeof we!="function")throw new TypeError(`${String(K)} is not a function`);return we}}function Kt(M){let K={[Symbol.iterator]:()=>M.iterator},we=(async function*(){return yield*K})(),it=we.next;return{iterator:we,nextMethod:it,done:!1}}let et=(gt=(Me=Symbol.asyncIterator)!==null&&Me!==void 0?Me:(Xe=Symbol.for)===null||Xe===void 0?void 0:Xe.call(Symbol,"Symbol.asyncIterator"))!==null&&gt!==void 0?gt:"@@asyncIterator";function pt(M,K="sync",we){if(we===void 0)if(K==="async"){if(we=mt(M,et),we===void 0){let Ht=mt(M,Symbol.iterator),tn=pt(M,"sync",Ht);return Kt(tn)}}else we=mt(M,Symbol.iterator);if(we===void 0)throw new TypeError("The object is not iterable");let it=b(we,M,[]);if(!n(it))throw new TypeError("The iterator method must return an object");let At=it.next;return{iterator:it,nextMethod:At,done:!1}}function ft(M){let K=b(M.nextMethod,M.iterator,[]);if(!n(K))throw new TypeError("The iterator.next() method must return an object");return K}function nt(M){return!!M.done}function kt(M){return M.value}function Yt(M){return!(typeof M!="number"||Ze(M)||M<0)}function Ne(M){let K=je(M.buffer,M.byteOffset,M.byteOffset+M.byteLength);return new Uint8Array(K)}function Qe(M){let K=M._queue.shift();return M._queueTotalSize-=K.size,M._queueTotalSize<0&&(M._queueTotalSize=0),K.value}function lt(M,K,we){if(!Yt(we)||we===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");M._queue.push({value:K,size:we}),M._queueTotalSize+=we}function Ge(M){return M._queue.peek().value}function Ct(M){M._queue=new x,M._queueTotalSize=0}function Nt(M){return M===DataView}function wt(M){return Nt(M.constructor)}function hn(M){return Nt(M)?1:M.BYTES_PER_ELEMENT}class fn{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!qn(this))throw Io("view");return this._view}respond(K){if(!qn(this))throw Io("respond");if(ee(K,1,"respond"),K=Se(K,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pn(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");ai(this._associatedReadableByteStreamController,K)}respondWithNewView(K){if(!qn(this))throw Io("respondWithNewView");if(ee(K,1,"respondWithNewView"),!ArrayBuffer.isView(K))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pn(K.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");ln(this._associatedReadableByteStreamController,K)}}Object.defineProperties(fn.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),i(fn.prototype.respond,"respond"),i(fn.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(fn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class yn{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!zn(this))throw Bo("byobRequest");return mr(this)}get desiredSize(){if(!zn(this))throw Bo("desiredSize");return Wn(this)}close(){if(!zn(this))throw Bo("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let K=this._controlledReadableByteStream._state;if(K!=="readable")throw new TypeError(`The stream (in ${K} state) is not in the readable state and cannot be closed`);vn(this)}enqueue(K){if(!zn(this))throw Bo("enqueue");if(ee(K,1,"enqueue"),!ArrayBuffer.isView(K))throw new TypeError("chunk must be an array buffer view");if(K.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(K.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let we=this._controlledReadableByteStream._state;if(we!=="readable")throw new TypeError(`The stream (in ${we} state) is not in the readable state and cannot be enqueued to`);Bn(this,K)}error(K=void 0){if(!zn(this))throw Bo("error");nr(this,K)}[v](K){cn(this),Ct(this);let we=this._cancelAlgorithm(K);return Vt(this),we}[R](K){let we=this._controlledReadableByteStream;if(this._queueTotalSize>0){vr(this,K);return}let it=this._autoAllocateChunkSize;if(it!==void 0){let At;try{At=new ArrayBuffer(it)}catch(tn){K._errorSteps(tn);return}let Ht={buffer:At,bufferByteLength:it,byteOffset:0,byteLength:it,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Ht)}Te(we,K),Yr(this)}[O](){if(this._pendingPullIntos.length>0){let K=this._pendingPullIntos.peek();K.readerType="none",this._pendingPullIntos=new x,this._pendingPullIntos.push(K)}}}Object.defineProperties(yn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),i(yn.prototype.close,"close"),i(yn.prototype.enqueue,"enqueue"),i(yn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(yn.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function zn(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_controlledReadableByteStream")?!1:M instanceof yn}function qn(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_associatedReadableByteStreamController")?!1:M instanceof fn}function Yr(M){if(!jt(M))return;if(M._pulling){M._pullAgain=!0;return}M._pulling=!0;let we=M._pullAlgorithm();d(we,()=>(M._pulling=!1,M._pullAgain&&(M._pullAgain=!1,Yr(M)),null),it=>(nr(M,it),null))}function cn(M){ei(M),M._pendingPullIntos=new x}function oi(M,K){let we=!1;M._state==="closed"&&(we=!0);let it=Qr(K);K.readerType==="default"?Ee(M,it,we):Qp(M,it,we)}function Qr(M){let K=M.bytesFilled,we=M.elementSize;return new M.viewConstructor(M.buffer,M.byteOffset,K/we)}function kr(M,K,we,it){M._queue.push({buffer:K,byteOffset:we,byteLength:it}),M._queueTotalSize+=it}function Ys(M,K,we,it){let At;try{At=je(K,we,we+it)}catch(Ht){throw nr(M,Ht),Ht}kr(M,At,0,it)}function us(M,K){K.bytesFilled>0&&Ys(M,K.buffer,K.byteOffset,K.bytesFilled),_a(M)}function dn(M,K){let we=Math.min(M._queueTotalSize,K.byteLength-K.bytesFilled),it=K.bytesFilled+we,At=we,Ht=!1,tn=it%K.elementSize,Xn=it-tn;Xn>=K.minimumFill&&(At=Xn-K.bytesFilled,Ht=!0);let Ii=M._queue;for(;At>0;){let Gr=Ii.peek(),zi=Math.min(At,Gr.byteLength),gs=K.byteOffset+K.bytesFilled;sn(K.buffer,gs,Gr.buffer,Gr.byteOffset,zi),Gr.byteLength===zi?Ii.shift():(Gr.byteOffset+=zi,Gr.byteLength-=zi),M._queueTotalSize-=zi,Bi(M,zi,K),At-=zi}return Ht}function Bi(M,K,we){we.bytesFilled+=K}function Fs(M){M._queueTotalSize===0&&M._closeRequested?(Vt(M),Y0(M._controlledReadableByteStream)):Yr(M)}function ei(M){M._byobRequest!==null&&(M._byobRequest._associatedReadableByteStreamController=void 0,M._byobRequest._view=null,M._byobRequest=null)}function Gn(M){for(;M._pendingPullIntos.length>0;){if(M._queueTotalSize===0)return;let K=M._pendingPullIntos.peek();dn(M,K)&&(_a(M),oi(M._controlledReadableByteStream,K))}}function Vu(M){let K=M._controlledReadableByteStream._reader;for(;K._readRequests.length>0;){if(M._queueTotalSize===0)return;let we=K._readRequests.shift();vr(M,we)}}function yu(M,K,we,it){let At=M._controlledReadableByteStream,Ht=K.constructor,tn=hn(Ht),{byteOffset:Xn,byteLength:Ii}=K,Gr=we*tn,zi;try{zi=mn(K.buffer)}catch(ra){it._errorSteps(ra);return}let gs={buffer:zi,bufferByteLength:zi.byteLength,byteOffset:Xn,byteLength:Ii,bytesFilled:0,minimumFill:Gr,elementSize:tn,viewConstructor:Ht,readerType:"byob"};if(M._pendingPullIntos.length>0){M._pendingPullIntos.push(gs),Fn(At,it);return}if(At._state==="closed"){let ra=new Ht(gs.buffer,gs.byteOffset,0);it._closeSteps(ra);return}if(M._queueTotalSize>0){if(dn(M,gs)){let ra=Qr(gs);Fs(M),it._chunkSteps(ra);return}if(M._closeRequested){let ra=new TypeError("Insufficient bytes to fill elements in the given buffer");nr(M,ra),it._errorSteps(ra);return}}M._pendingPullIntos.push(gs),Fn(At,it),Yr(M)}function Up(M,K){K.readerType==="none"&&_a(M);let we=M._controlledReadableByteStream;if(zr(we))for(;Gp(we)>0;){let it=_a(M);oi(we,it)}}function bu(M,K,we){if(Bi(M,K,we),we.readerType==="none"){us(M,we),Gn(M);return}if(we.bytesFilled<we.minimumFill)return;_a(M);let it=we.bytesFilled%we.elementSize;if(it>0){let At=we.byteOffset+we.bytesFilled;Ys(M,we.buffer,At-it,it)}we.bytesFilled-=it,oi(M._controlledReadableByteStream,we),Gn(M)}function $p(M,K){let we=M._pendingPullIntos.peek();ei(M),M._controlledReadableByteStream._state==="closed"?Up(M,we):bu(M,K,we),Yr(M)}function _a(M){return M._pendingPullIntos.shift()}function jt(M){let K=M._controlledReadableByteStream;return K._state!=="readable"||M._closeRequested||!M._started?!1:!!(ye(K)&&ve(K)>0||zr(K)&&Gp(K)>0||Wn(M)>0)}function Vt(M){M._pullAlgorithm=void 0,M._cancelAlgorithm=void 0}function vn(M){let K=M._controlledReadableByteStream;if(!(M._closeRequested||K._state!=="readable")){if(M._queueTotalSize>0){M._closeRequested=!0;return}if(M._pendingPullIntos.length>0){let we=M._pendingPullIntos.peek();if(we.bytesFilled%we.elementSize!==0){let it=new TypeError("Insufficient bytes to fill elements in the given buffer");throw nr(M,it),it}}Vt(M),Y0(K)}}function Bn(M,K){let we=M._controlledReadableByteStream;if(M._closeRequested||we._state!=="readable")return;let{buffer:it,byteOffset:At,byteLength:Ht}=K;if(Pn(it))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let tn=mn(it);if(M._pendingPullIntos.length>0){let Xn=M._pendingPullIntos.peek();if(Pn(Xn.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");ei(M),Xn.buffer=mn(Xn.buffer),Xn.readerType==="none"&&us(M,Xn)}if(ye(we))if(Vu(M),ve(we)===0)kr(M,tn,At,Ht);else{M._pendingPullIntos.length>0&&_a(M);let Xn=new Uint8Array(tn,At,Ht);Ee(we,Xn,!1)}else zr(we)?(kr(M,tn,At,Ht),Gn(M)):kr(M,tn,At,Ht);Yr(M)}function nr(M,K){let we=M._controlledReadableByteStream;we._state==="readable"&&(cn(M),Ct(M),Vt(M),yY(we,K))}function vr(M,K){let we=M._queue.shift();M._queueTotalSize-=we.byteLength,Fs(M);let it=new Uint8Array(we.buffer,we.byteOffset,we.byteLength);K._chunkSteps(it)}function mr(M){if(M._byobRequest===null&&M._pendingPullIntos.length>0){let K=M._pendingPullIntos.peek(),we=new Uint8Array(K.buffer,K.byteOffset+K.bytesFilled,K.byteLength-K.bytesFilled),it=Object.create(fn.prototype);ps(it,M,we),M._byobRequest=it}return M._byobRequest}function Wn(M){let K=M._controlledReadableByteStream._state;return K==="errored"?null:K==="closed"?0:M._strategyHWM-M._queueTotalSize}function ai(M,K){let we=M._pendingPullIntos.peek();if(M._controlledReadableByteStream._state==="closed"){if(K!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(K===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(we.bytesFilled+K>we.byteLength)throw new RangeError("bytesWritten out of range")}we.buffer=mn(we.buffer),$p(M,K)}function ln(M,K){let we=M._pendingPullIntos.peek();if(M._controlledReadableByteStream._state==="closed"){if(K.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(K.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(we.byteOffset+we.bytesFilled!==K.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(we.bufferByteLength!==K.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(we.bytesFilled+K.byteLength>we.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let At=K.byteLength;we.buffer=mn(K.buffer),$p(M,At)}function fs(M,K,we,it,At,Ht,tn){K._controlledReadableByteStream=M,K._pullAgain=!1,K._pulling=!1,K._byobRequest=null,K._queue=K._queueTotalSize=void 0,Ct(K),K._closeRequested=!1,K._started=!1,K._strategyHWM=Ht,K._pullAlgorithm=it,K._cancelAlgorithm=At,K._autoAllocateChunkSize=tn,K._pendingPullIntos=new x,M._readableStreamController=K;let Xn=we();d(u(Xn),()=>(K._started=!0,Yr(K),null),Ii=>(nr(K,Ii),null))}function yr(M,K,we){let it=Object.create(yn.prototype),At,Ht,tn;K.start!==void 0?At=()=>K.start(it):At=()=>{},K.pull!==void 0?Ht=()=>K.pull(it):Ht=()=>u(void 0),K.cancel!==void 0?tn=Ii=>K.cancel(Ii):tn=()=>u(void 0);let Xn=K.autoAllocateChunkSize;if(Xn===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");fs(M,it,At,Ht,tn,we,Xn)}function ps(M,K,we){M._associatedReadableByteStreamController=K,M._view=we}function Io(M){return new TypeError(`ReadableStreamBYOBRequest.prototype.${M} can only be used on a ReadableStreamBYOBRequest`)}function Bo(M){return new TypeError(`ReadableByteStreamController.prototype.${M} can only be used on a ReadableByteStreamController`)}function br(M,K){ne(M,K);let we=M?.mode;return{mode:we===void 0?void 0:Fo(we,`${K} has member 'mode' that`)}}function Fo(M,K){if(M=`${M}`,M!=="byob")throw new TypeError(`${K} '${M}' is not a valid enumeration value for ReadableStreamReaderMode`);return M}function Uo(M,K){var we;ne(M,K);let it=(we=M?.min)!==null&&we!==void 0?we:1;return{min:Se(it,`${K} has member 'min' that`)}}function Ku(M){return new Yu(M)}function Fn(M,K){M._reader._readIntoRequests.push(K)}function Qp(M,K,we){let At=M._reader._readIntoRequests.shift();we?At._closeSteps(K):At._chunkSteps(K)}function Gp(M){return M._reader._readIntoRequests.length}function zr(M){let K=M._reader;return!(K===void 0||!qp(K))}class Yu{constructor(K){if(ee(K,1,"ReadableStreamBYOBReader"),pe(K,"First parameter"),_E(K))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!zn(K._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");G(this,K),this._readIntoRequests=new x}get closed(){return qp(this)?this._closedPromise:l(wd("closed"))}cancel(K=void 0){return qp(this)?this._ownerReadableStream===void 0?l(W("cancel")):$(this,K):l(wd("cancel"))}read(K,we={}){if(!qp(this))return l(wd("read"));if(!ArrayBuffer.isView(K))return l(new TypeError("view must be an array buffer view"));if(K.byteLength===0)return l(new TypeError("view must have non-zero byteLength"));if(K.buffer.byteLength===0)return l(new TypeError("view's buffer must have non-zero byteLength"));if(Pn(K.buffer))return l(new TypeError("view's buffer has been detached"));let it;try{it=Uo(we,"options")}catch(Gr){return l(Gr)}let At=it.min;if(At===0)return l(new TypeError("options.min must be greater than 0"));if(wt(K)){if(At>K.byteLength)return l(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(At>K.length)return l(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return l(W("read from"));let Ht,tn,Xn=c((Gr,zi)=>{Ht=Gr,tn=zi});return Ay(this,K,At,{_chunkSteps:Gr=>Ht({value:Gr,done:!1}),_closeSteps:Gr=>Ht({value:Gr,done:!0}),_errorSteps:Gr=>tn(Gr)}),Xn}releaseLock(){if(!qp(this))throw wd("releaseLock");this._ownerReadableStream!==void 0&&xa(this)}}Object.defineProperties(Yu.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(Yu.prototype.cancel,"cancel"),i(Yu.prototype.read,"read"),i(Yu.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Yu.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function qp(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_readIntoRequests")?!1:M instanceof Yu}function Ay(M,K,we,it){let At=M._ownerReadableStream;At._disturbed=!0,At._state==="errored"?it._errorSteps(At._storedError):yu(At._readableStreamController,K,we,it)}function xa(M){U(M);let K=new TypeError("Reader was released");Hc(M,K)}function Hc(M,K){let we=M._readIntoRequests;M._readIntoRequests=new x,we.forEach(it=>{it._errorSteps(K)})}function wd(M){return new TypeError(`ReadableStreamBYOBReader.prototype.${M} can only be used on a ReadableStreamBYOBReader`)}function Eu(M,K){let{highWaterMark:we}=M;if(we===void 0)return K;if(Ze(we)||we<0)throw new RangeError("Invalid highWaterMark");return we}function Ua(M){let{size:K}=M;return K||(()=>1)}function gm(M,K){ne(M,K);let we=M?.highWaterMark,it=M?.size;return{highWaterMark:we===void 0?void 0:X(we),size:it===void 0?void 0:AE(it,`${K} has member 'size' that`)}}function AE(M,K){return ce(M,K),we=>X(M(we))}function Og(M,K){ne(M,K);let we=M?.abort,it=M?.close,At=M?.start,Ht=M?.type,tn=M?.write;return{abort:we===void 0?void 0:Sl(we,M,`${K} has member 'abort' that`),close:it===void 0?void 0:Dg(it,M,`${K} has member 'close' that`),start:At===void 0?void 0:W0(At,M,`${K} has member 'start' that`),write:tn===void 0?void 0:yy(tn,M,`${K} has member 'write' that`),type:Ht}}function Sl(M,K,we){return ce(M,we),it=>E(M,K,[it])}function Dg(M,K,we){return ce(M,we),()=>E(M,K,[])}function W0(M,K,we){return ce(M,we),it=>b(M,K,[it])}function yy(M,K,we){return ce(M,we),(it,At)=>E(M,K,[it,At])}function jl(M,K){if(!ae(M))throw new TypeError(`${K} is not a WritableStream.`)}function ch(M){if(typeof M!="object"||M===null)return!1;try{return typeof M.aborted=="boolean"}catch{return!1}}let wC=typeof AbortController=="function";function Oe(){if(wC)return new AbortController}class g{constructor(K={},we={}){K===void 0?K=null:z(K,"First parameter");let it=gm(we,"Second parameter"),At=Og(K,"First parameter");if(F(this),At.type!==void 0)throw new RangeError("Invalid type is specified");let tn=Ua(it),Xn=Eu(it,1);Am(this,At,Xn,tn)}get locked(){if(!ae(this))throw Ju("locked");return ke(this)}abort(K=void 0){return ae(this)?ke(this)?l(new TypeError("Cannot abort a stream that already has a writer")):Le(this,K):l(Ju("abort"))}close(){return ae(this)?ke(this)?l(new TypeError("Cannot close a stream that already has a writer")):xr(this)?l(new TypeError("Cannot close an already-closing stream")):Ye(this):l(Ju("close"))}getWriter(){if(!ae(this))throw Ju("getWriter");return I(this)}}Object.defineProperties(g.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),i(g.prototype.abort,"abort"),i(g.prototype.close,"close"),i(g.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(g.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function I(M){return new Q(M)}function P(M,K,we,it,At=1,Ht=()=>1){let tn=Object.create(g.prototype);F(tn);let Xn=Object.create(Us.prototype);return uf(tn,Xn,M,K,we,it,At,Ht),tn}function F(M){M._state="writable",M._storedError=void 0,M._writer=void 0,M._writableStreamController=void 0,M._writeRequests=new x,M._inFlightWriteRequest=void 0,M._closeRequest=void 0,M._inFlightCloseRequest=void 0,M._pendingAbortRequest=void 0,M._backpressure=!1}function ae(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_writableStreamController")?!1:M instanceof g}function ke(M){return M._writer!==void 0}function Le(M,K){var we;if(M._state==="closed"||M._state==="errored")return u(void 0);M._writableStreamController._abortReason=K,(we=M._writableStreamController._abortController)===null||we===void 0||we.abort(K);let it=M._state;if(it==="closed"||it==="errored")return u(void 0);if(M._pendingAbortRequest!==void 0)return M._pendingAbortRequest._promise;let At=!1;it==="erroring"&&(At=!0,K=void 0);let Ht=c((tn,Xn)=>{M._pendingAbortRequest={_promise:void 0,_resolve:tn,_reject:Xn,_reason:K,_wasAlreadyErroring:At}});return M._pendingAbortRequest._promise=Ht,At||en(M,K),Ht}function Ye(M){let K=M._state;if(K==="closed"||K==="errored")return l(new TypeError(`The stream (in ${K} state) is not in the writable state and cannot be closed`));let we=c((At,Ht)=>{let tn={_resolve:At,_reject:Ht};M._closeRequest=tn}),it=M._writer;return it!==void 0&&M._backpressure&&K==="writable"&&qO(it),Wp(M._writableStreamController),we}function Ke(M){return c((we,it)=>{let At={_resolve:we,_reject:it};M._writeRequests.push(At)})}function Tt(M,K){if(M._state==="writable"){en(M,K);return}Jn(M)}function en(M,K){let we=M._writableStreamController;M._state="erroring",M._storedError=K;let it=M._writer;it!==void 0&&Wt(it,K),!$o(M)&&we._started&&Jn(M)}function Jn(M){M._state="errored",M._writableStreamController[T]();let K=M._storedError;if(M._writeRequests.forEach(At=>{At._reject(K)}),M._writeRequests=new x,M._pendingAbortRequest===void 0){j0(M);return}let we=M._pendingAbortRequest;if(M._pendingAbortRequest=void 0,we._wasAlreadyErroring){we._reject(K),j0(M);return}let it=M._writableStreamController[S](we._reason);d(it,()=>(we._resolve(),j0(M),null),At=>(we._reject(At),j0(M),null))}function wn(M){M._inFlightWriteRequest._resolve(void 0),M._inFlightWriteRequest=void 0}function Er(M,K){M._inFlightWriteRequest._reject(K),M._inFlightWriteRequest=void 0,Tt(M,K)}function Is(M){M._inFlightCloseRequest._resolve(void 0),M._inFlightCloseRequest=void 0,M._state==="erroring"&&(M._storedError=void 0,M._pendingAbortRequest!==void 0&&(M._pendingAbortRequest._resolve(),M._pendingAbortRequest=void 0)),M._state="closed";let we=M._writer;we!==void 0&&aY(we)}function co(M,K){M._inFlightCloseRequest._reject(K),M._inFlightCloseRequest=void 0,M._pendingAbortRequest!==void 0&&(M._pendingAbortRequest._reject(K),M._pendingAbortRequest=void 0),Tt(M,K)}function xr(M){return!(M._closeRequest===void 0&&M._inFlightCloseRequest===void 0)}function $o(M){return!(M._inFlightWriteRequest===void 0&&M._inFlightCloseRequest===void 0)}function vd(M){M._inFlightCloseRequest=M._closeRequest,M._closeRequest=void 0}function H0(M){M._inFlightWriteRequest=M._writeRequests.shift()}function j0(M){M._closeRequest!==void 0&&(M._closeRequest._reject(M._storedError),M._closeRequest=void 0);let K=M._writer;K!==void 0&&GO(K,M._storedError)}function w(M,K){let we=M._writer;we!==void 0&&K!==M._backpressure&&(K?kbe(we):qO(we)),M._backpressure=K}class Q{constructor(K){if(ee(K,1,"WritableStreamDefaultWriter"),jl(K,"First parameter"),ke(K))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=K,K._writer=this;let we=K._state;if(we==="writable")!xr(K)&&K._backpressure?kC(this):by(this),cR(this);else if(we==="erroring")_u(this,K._storedError),cR(this);else if(we==="closed")by(this),oY(this);else{let it=K._storedError;_u(this,it),sY(this,it)}}get closed(){return de(this)?this._closedPromise:l(uh("closed"))}get desiredSize(){if(!de(this))throw uh("desiredSize");if(this._ownerWritableStream===void 0)throw aR("desiredSize");return Dn(this)}get ready(){return de(this)?this._readyPromise:l(uh("ready"))}abort(K=void 0){return de(this)?this._ownerWritableStream===void 0?l(aR("abort")):Ce(this,K):l(uh("abort"))}close(){if(!de(this))return l(uh("close"));let K=this._ownerWritableStream;return K===void 0?l(aR("close")):xr(K)?l(new TypeError("Cannot close an already-closing stream")):We(this)}releaseLock(){if(!de(this))throw uh("releaseLock");this._ownerWritableStream!==void 0&&lr(this)}write(K=void 0){return de(this)?this._ownerWritableStream===void 0?l(aR("write to")):Rr(this,K):l(uh("write"))}}Object.defineProperties(Q.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),i(Q.prototype.abort,"abort"),i(Q.prototype.close,"close"),i(Q.prototype.releaseLock,"releaseLock"),i(Q.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Q.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function de(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_ownerWritableStream")?!1:M instanceof Q}function Ce(M,K){let we=M._ownerWritableStream;return Le(we,K)}function We(M){let K=M._ownerWritableStream;return Ye(K)}function ht(M){let K=M._ownerWritableStream,we=K._state;return xr(K)||we==="closed"?u(void 0):we==="errored"?l(K._storedError):We(M)}function It(M,K){M._closedPromiseState==="pending"?GO(M,K):Rbe(M,K)}function Wt(M,K){M._readyPromiseState==="pending"?lR(M,K):k3(M,K)}function Dn(M){let K=M._ownerWritableStream,we=K._state;return we==="errored"||we==="erroring"?null:we==="closed"?0:ws(K._writableStreamController)}function lr(M){let K=M._ownerWritableStream,we=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Wt(M,we),It(M,we),K._writer=void 0,M._ownerWritableStream=void 0}function Rr(M,K){let we=M._ownerWritableStream,it=we._writableStreamController,At=fr(it,K);if(we!==M._ownerWritableStream)return l(aR("write to"));let Ht=we._state;if(Ht==="errored")return l(we._storedError);if(xr(we)||Ht==="closed")return l(new TypeError("The stream is closing or closed and cannot be written to"));if(Ht==="erroring")return l(we._storedError);let tn=Ke(we);return zs(it,K,At),tn}let hs={};class Us{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!sc(this))throw RC("abortReason");return this._abortReason}get signal(){if(!sc(this))throw RC("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(K=void 0){if(!sc(this))throw RC("error");this._controlledWritableStream._state==="writable"&&pf(this,K)}[S](K){let we=this._abortAlgorithm(K);return zu(this),we}[T](){Ct(this)}}Object.defineProperties(Us.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Us.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function sc(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_controlledWritableStream")?!1:M instanceof Us}function uf(M,K,we,it,At,Ht,tn,Xn){K._controlledWritableStream=M,M._writableStreamController=K,K._queue=void 0,K._queueTotalSize=void 0,Ct(K),K._abortReason=void 0,K._abortController=Oe(),K._started=!1,K._strategySizeAlgorithm=Xn,K._strategyHWM=tn,K._writeAlgorithm=it,K._closeAlgorithm=At,K._abortAlgorithm=Ht;let Ii=Kl(K);w(M,Ii);let Gr=we(),zi=u(Gr);d(zi,()=>(K._started=!0,Vl(K),null),gs=>(K._started=!0,Tt(M,gs),null))}function Am(M,K,we,it){let At=Object.create(Us.prototype),Ht,tn,Xn,Ii;K.start!==void 0?Ht=()=>K.start(At):Ht=()=>{},K.write!==void 0?tn=Gr=>K.write(Gr,At):tn=()=>u(void 0),K.close!==void 0?Xn=()=>K.close():Xn=()=>u(void 0),K.abort!==void 0?Ii=Gr=>K.abort(Gr):Ii=()=>u(void 0),uf(M,At,Ht,tn,Xn,Ii,we,it)}function zu(M){M._writeAlgorithm=void 0,M._closeAlgorithm=void 0,M._abortAlgorithm=void 0,M._strategySizeAlgorithm=void 0}function Wp(M){lt(M,hs,0),Vl(M)}function fr(M,K){try{return M._strategySizeAlgorithm(K)}catch(we){return oc(M,we),1}}function ws(M){return M._strategyHWM-M._queueTotalSize}function zs(M,K,we){try{lt(M,K,we)}catch(At){oc(M,At);return}let it=M._controlledWritableStream;if(!xr(it)&&it._state==="writable"){let At=Kl(M);w(it,At)}Vl(M)}function Vl(M){let K=M._controlledWritableStream;if(!M._started||K._inFlightWriteRequest!==void 0)return;if(K._state==="erroring"){Jn(K);return}if(M._queue.length===0)return;let it=Ge(M);it===hs?vC(M):lh(M,it)}function oc(M,K){M._controlledWritableStream._state==="writable"&&pf(M,K)}function vC(M){let K=M._controlledWritableStream;vd(K),Qe(M);let we=M._closeAlgorithm();zu(M),d(we,()=>(Is(K),null),it=>(co(K,it),null))}function lh(M,K){let we=M._controlledWritableStream;H0(we);let it=M._writeAlgorithm(K);d(it,()=>{wn(we);let At=we._state;if(Qe(M),!xr(we)&&At==="writable"){let Ht=Kl(M);w(we,Ht)}return Vl(M),null},At=>(we._state==="writable"&&zu(M),Er(we,At),null))}function Kl(M){return ws(M)<=0}function pf(M,K){let we=M._controlledWritableStream;zu(M),en(we,K)}function Ju(M){return new TypeError(`WritableStream.prototype.${M} can only be used on a WritableStream`)}function RC(M){return new TypeError(`WritableStreamDefaultController.prototype.${M} can only be used on a WritableStreamDefaultController`)}function uh(M){return new TypeError(`WritableStreamDefaultWriter.prototype.${M} can only be used on a WritableStreamDefaultWriter`)}function aR(M){return new TypeError("Cannot "+M+" a stream using a released writer")}function cR(M){M._closedPromise=c((K,we)=>{M._closedPromise_resolve=K,M._closedPromise_reject=we,M._closedPromiseState="pending"})}function sY(M,K){cR(M),GO(M,K)}function oY(M){cR(M),aY(M)}function GO(M,K){M._closedPromise_reject!==void 0&&(A(M._closedPromise),M._closedPromise_reject(K),M._closedPromise_resolve=void 0,M._closedPromise_reject=void 0,M._closedPromiseState="rejected")}function Rbe(M,K){sY(M,K)}function aY(M){M._closedPromise_resolve!==void 0&&(M._closedPromise_resolve(void 0),M._closedPromise_resolve=void 0,M._closedPromise_reject=void 0,M._closedPromiseState="resolved")}function kC(M){M._readyPromise=c((K,we)=>{M._readyPromise_resolve=K,M._readyPromise_reject=we}),M._readyPromiseState="pending"}function _u(M,K){kC(M),lR(M,K)}function by(M){kC(M),qO(M)}function lR(M,K){M._readyPromise_reject!==void 0&&(A(M._readyPromise),M._readyPromise_reject(K),M._readyPromise_resolve=void 0,M._readyPromise_reject=void 0,M._readyPromiseState="rejected")}function kbe(M){kC(M)}function k3(M,K){_u(M,K)}function qO(M){M._readyPromise_resolve!==void 0&&(M._readyPromise_resolve(void 0),M._readyPromise_resolve=void 0,M._readyPromise_reject=void 0,M._readyPromiseState="fulfilled")}function Pbe(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}let WO=Pbe();function P3(M){if(!(typeof M=="function"||typeof M=="object")||M.name!=="DOMException")return!1;try{return new M,!0}catch{return!1}}function zKe(){let M=WO?.DOMException;return P3(M)?M:void 0}function Nbe(){let M=function(we,it){this.message=we||"",this.name=it||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return i(M,"DOMException"),M.prototype=Object.create(Error.prototype),Object.defineProperty(M.prototype,"constructor",{value:M,writable:!0,configurable:!0}),M}let JKe=zKe()||Nbe();function N3(M,K,we,it,At,Ht){let tn=ge(M),Xn=I(K);M._disturbed=!0;let Ii=!1,Gr=u(void 0);return c((zi,gs)=>{let ra;if(Ht!==void 0){if(ra=()=>{let ti=Ht.reason!==void 0?Ht.reason:new JKe("Aborted","AbortError"),Os=[];it||Os.push(()=>K._state==="writable"?Le(K,ti):u(void 0)),At||Os.push(()=>M._state==="readable"?ym(M,ti):u(void 0)),df(()=>Promise.all(Os.map(Sa=>Sa())),!0,ti)},Ht.aborted){ra();return}Ht.addEventListener("abort",ra)}function Sy(){return c((ti,Os)=>{function Sa(mh){mh?ti():p(zO(),Sa,Os)}Sa(!1)})}function zO(){return Ii?u(!0):p(Xn._readyPromise,()=>c((ti,Os)=>{He(tn,{_chunkSteps:Sa=>{Gr=p(Rr(Xn,Sa),void 0,e),ti(!1)},_closeSteps:()=>ti(!0),_errorSteps:Os})}))}if(J0(M,tn._closedPromise,ti=>(it?Bg(!0,ti):df(()=>Le(K,ti),!0,ti),null)),J0(K,Xn._closedPromise,ti=>(At?Bg(!0,ti):df(()=>ym(M,ti),!0,ti),null)),bm(M,tn._closedPromise,()=>(we?Bg():df(()=>ht(Xn)),null)),xr(K)||K._state==="closed"){let ti=new TypeError("the destination writable stream closed before all data could be piped to it");At?Bg(!0,ti):df(()=>ym(M,ti),!0,ti)}A(Sy());function LC(){let ti=Gr;return p(Gr,()=>ti!==Gr?LC():void 0)}function J0(ti,Os,Sa){ti._state==="errored"?Sa(ti._storedError):h(Os,Sa)}function bm(ti,Os,Sa){ti._state==="closed"?Sa():m(Os,Sa)}function df(ti,Os,Sa){if(Ii)return;Ii=!0,K._state==="writable"&&!xr(K)?m(LC(),mh):mh();function mh(){return d(ti(),()=>X0(Os,Sa),JO=>X0(!0,JO)),null}}function Bg(ti,Os){Ii||(Ii=!0,K._state==="writable"&&!xr(K)?m(LC(),()=>X0(ti,Os)):X0(ti,Os))}function X0(ti,Os){return lr(Xn),U(tn),Ht!==void 0&&Ht.removeEventListener("abort",ra),ti?gs(Os):zi(void 0),null}})}class Ey{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!HO(this))throw VO("desiredSize");return Fi(this)}close(){if(!HO(this))throw VO("close");if(!dh(this))throw new TypeError("The stream is not in a state that permits close");V0(this)}enqueue(K=void 0){if(!HO(this))throw VO("enqueue");if(!dh(this))throw new TypeError("The stream is not in a state that permits enqueue");return PC(this,K)}error(K=void 0){if(!HO(this))throw VO("error");ph(this,K)}[v](K){Ct(this);let we=this._cancelAlgorithm(K);return jO(this),we}[R](K){let we=this._controlledReadableStream;if(this._queue.length>0){let it=Qe(this);this._closeRequested&&this._queue.length===0?(jO(this),Y0(we)):uR(this),K._chunkSteps(it)}else Te(we,K),uR(this)}[O](){}}Object.defineProperties(Ey.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),i(Ey.prototype.close,"close"),i(Ey.prototype.enqueue,"enqueue"),i(Ey.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ey.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function HO(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_controlledReadableStream")?!1:M instanceof Ey}function uR(M){if(!cY(M))return;if(M._pulling){M._pullAgain=!0;return}M._pulling=!0;let we=M._pullAlgorithm();d(we,()=>(M._pulling=!1,M._pullAgain&&(M._pullAgain=!1,uR(M)),null),it=>(ph(M,it),null))}function cY(M){let K=M._controlledReadableStream;return!dh(M)||!M._started?!1:!!(_E(K)&&ve(K)>0||Fi(M)>0)}function jO(M){M._pullAlgorithm=void 0,M._cancelAlgorithm=void 0,M._strategySizeAlgorithm=void 0}function V0(M){if(!dh(M))return;let K=M._controlledReadableStream;M._closeRequested=!0,M._queue.length===0&&(jO(M),Y0(K))}function PC(M,K){if(!dh(M))return;let we=M._controlledReadableStream;if(_E(we)&&ve(we)>0)Ee(we,K,!1);else{let it;try{it=M._strategySizeAlgorithm(K)}catch(At){throw ph(M,At),At}try{lt(M,K,it)}catch(At){throw ph(M,At),At}}uR(M)}function ph(M,K){let we=M._controlledReadableStream;we._state==="readable"&&(Ct(M),jO(M),yY(we,K))}function Fi(M){let K=M._controlledReadableStream._state;return K==="errored"?null:K==="closed"?0:M._strategyHWM-M._queueTotalSize}function lY(M){return!cY(M)}function dh(M){let K=M._controlledReadableStream._state;return!M._closeRequested&&K==="readable"}function pR(M,K,we,it,At,Ht,tn){K._controlledReadableStream=M,K._queue=void 0,K._queueTotalSize=void 0,Ct(K),K._started=!1,K._closeRequested=!1,K._pullAgain=!1,K._pulling=!1,K._strategySizeAlgorithm=tn,K._strategyHWM=Ht,K._pullAlgorithm=it,K._cancelAlgorithm=At,M._readableStreamController=K;let Xn=we();d(u(Xn),()=>(K._started=!0,uR(K),null),Ii=>(ph(K,Ii),null))}function uY(M,K,we,it){let At=Object.create(Ey.prototype),Ht,tn,Xn;K.start!==void 0?Ht=()=>K.start(At):Ht=()=>{},K.pull!==void 0?tn=()=>K.pull(At):tn=()=>u(void 0),K.cancel!==void 0?Xn=Ii=>K.cancel(Ii):Xn=()=>u(void 0),pR(M,At,Ht,tn,Xn,we,it)}function VO(M){return new TypeError(`ReadableStreamDefaultController.prototype.${M} can only be used on a ReadableStreamDefaultController`)}function Obe(M,K){return zn(M._readableStreamController)?dY(M):pY(M)}function pY(M,K){let we=ge(M),it=!1,At=!1,Ht=!1,tn=!1,Xn,Ii,Gr,zi,gs,ra=c(bm=>{gs=bm});function Sy(){return it?(At=!0,u(void 0)):(it=!0,He(we,{_chunkSteps:df=>{y(()=>{At=!1;let Bg=df,X0=df;Ht||PC(Gr._readableStreamController,Bg),tn||PC(zi._readableStreamController,X0),it=!1,At&&Sy()})},_closeSteps:()=>{it=!1,Ht||V0(Gr._readableStreamController),tn||V0(zi._readableStreamController),(!Ht||!tn)&&gs(void 0)},_errorSteps:()=>{it=!1}}),u(void 0))}function zO(bm){if(Ht=!0,Xn=bm,tn){let df=qt([Xn,Ii]),Bg=ym(M,df);gs(Bg)}return ra}function LC(bm){if(tn=!0,Ii=bm,Ht){let df=qt([Xn,Ii]),Bg=ym(M,df);gs(Bg)}return ra}function J0(){}return Gr=yE(J0,Sy,zO),zi=yE(J0,Sy,LC),h(we._closedPromise,bm=>(ph(Gr._readableStreamController,bm),ph(zi._readableStreamController,bm),(!Ht||!tn)&&gs(void 0),null)),[Gr,zi]}function dY(M){let K=ge(M),we=!1,it=!1,At=!1,Ht=!1,tn=!1,Xn,Ii,Gr,zi,gs,ra=c(ti=>{gs=ti});function Sy(ti){h(ti._closedPromise,Os=>(ti!==K||(nr(Gr._readableStreamController,Os),nr(zi._readableStreamController,Os),(!Ht||!tn)&&gs(void 0)),null))}function zO(){qp(K)&&(U(K),K=ge(M),Sy(K)),He(K,{_chunkSteps:Os=>{y(()=>{it=!1,At=!1;let Sa=Os,mh=Os;if(!Ht&&!tn)try{mh=Ne(Os)}catch(JO){nr(Gr._readableStreamController,JO),nr(zi._readableStreamController,JO),gs(ym(M,JO));return}Ht||Bn(Gr._readableStreamController,Sa),tn||Bn(zi._readableStreamController,mh),we=!1,it?J0():At&&bm()})},_closeSteps:()=>{we=!1,Ht||vn(Gr._readableStreamController),tn||vn(zi._readableStreamController),Gr._readableStreamController._pendingPullIntos.length>0&&ai(Gr._readableStreamController,0),zi._readableStreamController._pendingPullIntos.length>0&&ai(zi._readableStreamController,0),(!Ht||!tn)&&gs(void 0)},_errorSteps:()=>{we=!1}})}function LC(ti,Os){qe(K)&&(U(K),K=Ku(M),Sy(K));let Sa=Os?zi:Gr,mh=Os?Gr:zi;Ay(K,ti,1,{_chunkSteps:XO=>{y(()=>{it=!1,At=!1;let ZO=Os?tn:Ht;if(Os?Ht:tn)ZO||ln(Sa._readableStreamController,XO);else{let e9e;try{e9e=Ne(XO)}catch(Lbe){nr(Sa._readableStreamController,Lbe),nr(mh._readableStreamController,Lbe),gs(ym(M,Lbe));return}ZO||ln(Sa._readableStreamController,XO),Bn(mh._readableStreamController,e9e)}we=!1,it?J0():At&&bm()})},_closeSteps:XO=>{we=!1;let ZO=Os?tn:Ht,TY=Os?Ht:tn;ZO||vn(Sa._readableStreamController),TY||vn(mh._readableStreamController),XO!==void 0&&(ZO||ln(Sa._readableStreamController,XO),!TY&&mh._readableStreamController._pendingPullIntos.length>0&&ai(mh._readableStreamController,0)),(!ZO||!TY)&&gs(void 0)},_errorSteps:()=>{we=!1}})}function J0(){if(we)return it=!0,u(void 0);we=!0;let ti=mr(Gr._readableStreamController);return ti===null?zO():LC(ti._view,!1),u(void 0)}function bm(){if(we)return At=!0,u(void 0);we=!0;let ti=mr(zi._readableStreamController);return ti===null?zO():LC(ti._view,!0),u(void 0)}function df(ti){if(Ht=!0,Xn=ti,tn){let Os=qt([Xn,Ii]),Sa=ym(M,Os);gs(Sa)}return ra}function Bg(ti){if(tn=!0,Ii=ti,Ht){let Os=qt([Xn,Ii]),Sa=ym(M,Os);gs(Sa)}return ra}function X0(){}return Gr=bE(X0,J0,df),zi=bE(X0,bm,Bg),Sy(K),[Gr,zi]}function mY(M){return n(M)&&typeof M.getReader<"u"}function ac(M){return mY(M)?NC(M.getReader()):_y(M)}function _y(M){let K,we=pt(M,"async"),it=e;function At(){let tn;try{tn=ft(we)}catch(Ii){return l(Ii)}let Xn=u(tn);return f(Xn,Ii=>{if(!n(Ii))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(nt(Ii))V0(K._readableStreamController);else{let zi=kt(Ii);PC(K._readableStreamController,zi)}})}function Ht(tn){let Xn=we.iterator,Ii;try{Ii=mt(Xn,"return")}catch(gs){return l(gs)}if(Ii===void 0)return u(void 0);let Gr;try{Gr=b(Ii,Xn,[tn])}catch(gs){return l(gs)}let zi=u(Gr);return f(zi,gs=>{if(!n(gs))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return K=yE(it,At,Ht,0),K}function NC(M){let K,we=e;function it(){let Ht;try{Ht=M.read()}catch(tn){return l(tn)}return f(Ht,tn=>{if(!n(tn))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(tn.done)V0(K._readableStreamController);else{let Xn=tn.value;PC(K._readableStreamController,Xn)}})}function At(Ht){try{return u(M.cancel(Ht))}catch(tn){return l(tn)}}return K=yE(we,it,At,0),K}function Mg(M,K){ne(M,K);let we=M,it=we?.autoAllocateChunkSize,At=we?.cancel,Ht=we?.pull,tn=we?.start,Xn=we?.type;return{autoAllocateChunkSize:it===void 0?void 0:Se(it,`${K} has member 'autoAllocateChunkSize' that`),cancel:At===void 0?void 0:K0(At,we,`${K} has member 'cancel' that`),pull:Ht===void 0?void 0:fY(Ht,we,`${K} has member 'pull' that`),start:tn===void 0?void 0:hY(tn,we,`${K} has member 'start' that`),type:Xn===void 0?void 0:OC(Xn,`${K} has member 'type' that`)}}function K0(M,K,we){return ce(M,we),it=>E(M,K,[it])}function fY(M,K,we){return ce(M,we),it=>E(M,K,[it])}function hY(M,K,we){return ce(M,we),it=>b(M,K,[it])}function OC(M,K){if(M=`${M}`,M!=="bytes")throw new TypeError(`${K} '${M}' is not a valid enumeration value for ReadableStreamType`);return M}function O3(M,K){return ne(M,K),{preventCancel:!!M?.preventCancel}}function gY(M,K){ne(M,K);let we=M?.preventAbort,it=M?.preventCancel,At=M?.preventClose,Ht=M?.signal;return Ht!==void 0&&AY(Ht,`${K} has member 'signal' that`),{preventAbort:!!we,preventCancel:!!it,preventClose:!!At,signal:Ht}}function AY(M,K){if(!ch(M))throw new TypeError(`${K} is not an AbortSignal.`)}function Dbe(M,K){ne(M,K);let we=M?.readable;j(we,"readable","ReadableWritablePair"),pe(we,`${K} has member 'readable' that`);let it=M?.writable;return j(it,"writable","ReadableWritablePair"),jl(it,`${K} has member 'writable' that`),{readable:we,writable:it}}class Xu{constructor(K={},we={}){K===void 0?K=null:z(K,"First parameter");let it=gm(we,"Second parameter"),At=Mg(K,"First parameter");if(D3(this),At.type==="bytes"){if(it.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let Ht=Eu(it,0);yr(this,At,Ht)}else{let Ht=Ua(it),tn=Eu(it,1);uY(this,At,tn,Ht)}}get locked(){if(!EE(this))throw xE("locked");return _E(this)}cancel(K=void 0){return EE(this)?_E(this)?l(new TypeError("Cannot cancel a stream that already has a reader")):ym(this,K):l(xE("cancel"))}getReader(K=void 0){if(!EE(this))throw xE("getReader");return br(K,"First parameter").mode===void 0?ge(this):Ku(this)}pipeThrough(K,we={}){if(!EE(this))throw xE("pipeThrough");ee(K,1,"pipeThrough");let it=Dbe(K,"First parameter"),At=gY(we,"Second parameter");if(_E(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(ke(it.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let Ht=N3(this,it.writable,At.preventClose,At.preventAbort,At.preventCancel,At.signal);return A(Ht),it.readable}pipeTo(K,we={}){if(!EE(this))return l(xE("pipeTo"));if(K===void 0)return l("Parameter 1 is required in 'pipeTo'.");if(!ae(K))return l(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let it;try{it=gY(we,"Second parameter")}catch(At){return l(At)}return _E(this)?l(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):ke(K)?l(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):N3(this,K,it.preventClose,it.preventAbort,it.preventCancel,it.signal)}tee(){if(!EE(this))throw xE("tee");let K=Obe(this);return qt(K)}values(K=void 0){if(!EE(this))throw xE("values");let we=O3(K,"First parameter");return Ut(this,we.preventCancel)}[et](K){return this.values(K)}static from(K){return ac(K)}}Object.defineProperties(Xu,{from:{enumerable:!0}}),Object.defineProperties(Xu.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),i(Xu.from,"from"),i(Xu.prototype.cancel,"cancel"),i(Xu.prototype.getReader,"getReader"),i(Xu.prototype.pipeThrough,"pipeThrough"),i(Xu.prototype.pipeTo,"pipeTo"),i(Xu.prototype.tee,"tee"),i(Xu.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Xu.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Xu.prototype,et,{value:Xu.prototype.values,writable:!0,configurable:!0});function yE(M,K,we,it=1,At=()=>1){let Ht=Object.create(Xu.prototype);D3(Ht);let tn=Object.create(Ey.prototype);return pR(Ht,tn,M,K,we,it,At),Ht}function bE(M,K,we){let it=Object.create(Xu.prototype);D3(it);let At=Object.create(yn.prototype);return fs(it,At,M,K,we,0,void 0),it}function D3(M){M._state="readable",M._reader=void 0,M._storedError=void 0,M._disturbed=!1}function EE(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_readableStreamController")?!1:M instanceof Xu}function _E(M){return M._reader!==void 0}function ym(M,K){if(M._disturbed=!0,M._state==="closed")return u(void 0);if(M._state==="errored")return l(M._storedError);Y0(M);let we=M._reader;if(we!==void 0&&qp(we)){let At=we._readIntoRequests;we._readIntoRequests=new x,At.forEach(Ht=>{Ht._closeSteps(void 0)})}let it=M._readableStreamController[v](K);return f(it,e)}function Y0(M){M._state="closed";let K=M._reader;if(K!==void 0&&(be(K),qe(K))){let we=K._readRequests;K._readRequests=new x,we.forEach(it=>{it._closeSteps()})}}function yY(M,K){M._state="errored",M._storedError=K;let we=M._reader;we!==void 0&&(q(we,K),qe(we)?at(we,K):Hc(we,K))}function xE(M){return new TypeError(`ReadableStream.prototype.${M} can only be used on a ReadableStream`)}function C(M,K){ne(M,K);let we=M?.highWaterMark;return j(we,"highWaterMark","QueuingStrategyInit"),{highWaterMark:X(we)}}let D=M=>M.byteLength;i(D,"size");class V{constructor(K){ee(K,1,"ByteLengthQueuingStrategy"),K=C(K,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=K.highWaterMark}get highWaterMark(){if(!Pe(this))throw ue("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Pe(this))throw ue("size");return D}}Object.defineProperties(V.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(V.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function ue(M){return new TypeError(`ByteLengthQueuingStrategy.prototype.${M} can only be used on a ByteLengthQueuingStrategy`)}function Pe(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_byteLengthQueuingStrategyHighWaterMark")?!1:M instanceof V}let Ve=()=>1;i(Ve,"size");class Je{constructor(K){ee(K,1,"CountQueuingStrategy"),K=C(K,"First parameter"),this._countQueuingStrategyHighWaterMark=K.highWaterMark}get highWaterMark(){if(!Lt(this))throw ot("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Lt(this))throw ot("size");return Ve}}Object.defineProperties(Je.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Je.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ot(M){return new TypeError(`CountQueuingStrategy.prototype.${M} can only be used on a CountQueuingStrategy`)}function Lt(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_countQueuingStrategyHighWaterMark")?!1:M instanceof Je}function nn(M,K){ne(M,K);let we=M?.cancel,it=M?.flush,At=M?.readableType,Ht=M?.start,tn=M?.transform,Xn=M?.writableType;return{cancel:we===void 0?void 0:Hr(we,M,`${K} has member 'cancel' that`),flush:it===void 0?void 0:Xt(it,M,`${K} has member 'flush' that`),readableType:At,start:Ht===void 0?void 0:Rn(Ht,M,`${K} has member 'start' that`),transform:tn===void 0?void 0:_n(tn,M,`${K} has member 'transform' that`),writableType:Xn}}function Xt(M,K,we){return ce(M,we),it=>E(M,K,[it])}function Rn(M,K,we){return ce(M,we),it=>b(M,K,[it])}function _n(M,K,we){return ce(M,we),(it,At)=>E(M,K,[it,At])}function Hr(M,K,we){return ce(M,we),it=>E(M,K,[it])}class Cs{constructor(K={},we={},it={}){K===void 0&&(K=null);let At=gm(we,"Second parameter"),Ht=gm(it,"Third parameter"),tn=nn(K,"First parameter");if(tn.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(tn.writableType!==void 0)throw new RangeError("Invalid writableType specified");let Xn=Eu(Ht,0),Ii=Ua(Ht),Gr=Eu(At,1),zi=Ua(At),gs,ra=c(Sy=>{gs=Sy});Cl(this,ra,Gr,zi,Xn,Ii),bY(this,tn),tn.start!==void 0?gs(tn.start(this._transformStreamController)):gs(void 0)}get readable(){if(!Yi(this))throw ZKe("readable");return this._readable}get writable(){if(!Yi(this))throw ZKe("writable");return this._writable}}Object.defineProperties(Cs.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Cs.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function Cl(M,K,we,it,At,Ht){function tn(){return K}function Xn(ra){return MC(M,ra)}function Ii(ra){return _Y(M,ra)}function Gr(){return xY(M)}M._writable=P(tn,Xn,Gr,Ii,we,it);function zi(){return SY(M)}function gs(ra){return o1n(M,ra)}M._readable=yE(tn,zi,gs,At,Ht),M._backpressure=void 0,M._backpressureChangePromise=void 0,M._backpressureChangePromise_resolve=void 0,DC(M,!0),M._transformStreamController=void 0}function Yi(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_transformStreamController")?!1:M instanceof Cs}function Ns(M,K){ph(M._readable._readableStreamController,K),Ti(M,K)}function Ti(M,K){dR(M._transformStreamController),oc(M._writable._writableStreamController,K),xy(M)}function xy(M){M._backpressure&&DC(M,!1)}function DC(M,K){M._backpressureChangePromise!==void 0&&M._backpressureChangePromise_resolve(),M._backpressureChangePromise=c(we=>{M._backpressureChangePromise_resolve=we}),M._backpressure=K}class Lg{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!z0(this))throw CY("desiredSize");let K=this._controlledTransformStream._readable._readableStreamController;return Fi(K)}enqueue(K=void 0){if(!z0(this))throw CY("enqueue");EY(this,K)}error(K=void 0){if(!z0(this))throw CY("error");mR(this,K)}terminate(){if(!z0(this))throw CY("terminate");XKe(this)}}Object.defineProperties(Lg.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),i(Lg.prototype.enqueue,"enqueue"),i(Lg.prototype.error,"error"),i(Lg.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Lg.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function z0(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_controlledTransformStream")?!1:M instanceof Lg}function KO(M,K,we,it,At){K._controlledTransformStream=M,M._transformStreamController=K,K._transformAlgorithm=we,K._flushAlgorithm=it,K._cancelAlgorithm=At,K._finishPromise=void 0,K._finishPromise_resolve=void 0,K._finishPromise_reject=void 0}function bY(M,K){let we=Object.create(Lg.prototype),it,At,Ht;K.transform!==void 0?it=tn=>K.transform(tn,we):it=tn=>{try{return EY(we,tn),u(void 0)}catch(Xn){return l(Xn)}},K.flush!==void 0?At=()=>K.flush(we):At=()=>u(void 0),K.cancel!==void 0?Ht=tn=>K.cancel(tn):Ht=()=>u(void 0),KO(M,we,it,At,Ht)}function dR(M){M._transformAlgorithm=void 0,M._flushAlgorithm=void 0,M._cancelAlgorithm=void 0}function EY(M,K){let we=M._controlledTransformStream,it=we._readable._readableStreamController;if(!dh(it))throw new TypeError("Readable side is not in a state that permits enqueue");try{PC(it,K)}catch(Ht){throw Ti(we,Ht),we._readable._storedError}lY(it)!==we._backpressure&&DC(we,!0)}function mR(M,K){Ns(M._controlledTransformStream,K)}function M3(M,K){let we=M._transformAlgorithm(K);return f(we,void 0,it=>{throw Ns(M._controlledTransformStream,it),it})}function XKe(M){let K=M._controlledTransformStream,we=K._readable._readableStreamController;V0(we);let it=new TypeError("TransformStream terminated");Ti(K,it)}function MC(M,K){let we=M._transformStreamController;if(M._backpressure){let it=M._backpressureChangePromise;return f(it,()=>{let At=M._writable;if(At._state==="erroring")throw At._storedError;return M3(we,K)})}return M3(we,K)}function _Y(M,K){let we=M._transformStreamController;if(we._finishPromise!==void 0)return we._finishPromise;let it=M._readable;we._finishPromise=c((Ht,tn)=>{we._finishPromise_resolve=Ht,we._finishPromise_reject=tn});let At=we._cancelAlgorithm(K);return dR(we),d(At,()=>(it._state==="errored"?YO(we,it._storedError):(ph(it._readableStreamController,K),Mbe(we)),null),Ht=>(ph(it._readableStreamController,Ht),YO(we,Ht),null)),we._finishPromise}function xY(M){let K=M._transformStreamController;if(K._finishPromise!==void 0)return K._finishPromise;let we=M._readable;K._finishPromise=c((At,Ht)=>{K._finishPromise_resolve=At,K._finishPromise_reject=Ht});let it=K._flushAlgorithm();return dR(K),d(it,()=>(we._state==="errored"?YO(K,we._storedError):(V0(we._readableStreamController),Mbe(K)),null),At=>(ph(we._readableStreamController,At),YO(K,At),null)),K._finishPromise}function SY(M){return DC(M,!1),M._backpressureChangePromise}function o1n(M,K){let we=M._transformStreamController;if(we._finishPromise!==void 0)return we._finishPromise;let it=M._writable;we._finishPromise=c((Ht,tn)=>{we._finishPromise_resolve=Ht,we._finishPromise_reject=tn});let At=we._cancelAlgorithm(K);return dR(we),d(At,()=>(it._state==="errored"?YO(we,it._storedError):(oc(it._writableStreamController,K),xy(M),Mbe(we)),null),Ht=>(oc(it._writableStreamController,Ht),xy(M),YO(we,Ht),null)),we._finishPromise}function CY(M){return new TypeError(`TransformStreamDefaultController.prototype.${M} can only be used on a TransformStreamDefaultController`)}function Mbe(M){M._finishPromise_resolve!==void 0&&(M._finishPromise_resolve(),M._finishPromise_resolve=void 0,M._finishPromise_reject=void 0)}function YO(M,K){M._finishPromise_reject!==void 0&&(A(M._finishPromise),M._finishPromise_reject(K),M._finishPromise_resolve=void 0,M._finishPromise_reject=void 0)}function ZKe(M){return new TypeError(`TransformStream.prototype.${M} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=V,t.CountQueuingStrategy=Je,t.ReadableByteStreamController=yn,t.ReadableStream=Xu,t.ReadableStreamBYOBReader=Yu,t.ReadableStreamBYOBRequest=fn,t.ReadableStreamDefaultController=Ey,t.ReadableStreamDefaultReader=Y,t.TransformStream=Cs,t.TransformStreamDefaultController=Lg,t.WritableStream=g,t.WritableStreamDefaultController=Us,t.WritableStreamDefaultWriter=Q}))});var qTt=me(()=>{if(!globalThis.ReadableStream)try{let t=tt("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,tt("node:stream/web")),t.emitWarning=e}catch(n){throw t.emitWarning=e,n}}catch{Object.assign(globalThis,GTt())}try{let{Blob:t}=tt("buffer");t&&!t.prototype.stream&&(t.prototype.stream=function(n){let r=0,i=this;return new ReadableStream({type:"bytes",async pull(s){let a=await i.slice(r,Math.min(i.size,r+65536)).arrayBuffer();r+=a.byteLength,s.enqueue(new Uint8Array(a)),r===i.size&&s.close()}})})}catch{}});async function*oPe(t,e=!0){for(let n of t)if("stream"in n)yield*n.stream();else if(ArrayBuffer.isView(n))if(e){let r=n.byteOffset,i=n.byteOffset+n.byteLength;for(;r!==i;){let s=Math.min(i-r,WTt),o=n.buffer.slice(r,r+s);r+=o.byteLength,yield new Uint8Array(o)}}else yield n;else{let r=0,i=n;for(;r!==i.size;){let o=await i.slice(r,Math.min(i.size,r+WTt)).arrayBuffer();r+=o.byteLength,yield new Uint8Array(o)}}}var ohs,WTt,HTt,htr,ab,F4=H(()=>{ohs=jr(qTt(),1);WTt=65536;HTt=class aPe{#e=[];#t="";#n=0;#r="transparent";constructor(e=[],n={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof n!="object"&&typeof n!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");n===null&&(n={});let r=new TextEncoder;for(let s of e){let o;ArrayBuffer.isView(s)?o=new Uint8Array(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)):s instanceof ArrayBuffer?o=new Uint8Array(s.slice(0)):s instanceof aPe?o=s:o=r.encode(`${s}`),this.#n+=ArrayBuffer.isView(o)?o.byteLength:o.size,this.#e.push(o)}this.#r=`${n.endings===void 0?"transparent":n.endings}`;let i=n.type===void 0?"":String(n.type);this.#t=/^[\x20-\x7E]*$/.test(i)?i:""}get size(){return this.#n}get type(){return this.#t}async text(){let e=new TextDecoder,n="";for await(let r of oPe(this.#e,!1))n+=e.decode(r,{stream:!0});return n+=e.decode(),n}async arrayBuffer(){let e=new Uint8Array(this.size),n=0;for await(let r of oPe(this.#e,!1))e.set(r,n),n+=r.length;return e.buffer}stream(){let e=oPe(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(n){let r=await e.next();r.done?n.close():n.enqueue(r.value)},async cancel(){await e.return()}})}slice(e=0,n=this.size,r=""){let{size:i}=this,s=e<0?Math.max(i+e,0):Math.min(e,i),o=n<0?Math.max(i+n,0):Math.min(n,i),a=Math.max(o-s,0),c=this.#e,u=[],l=0;for(let d of c){if(l>=a)break;let m=ArrayBuffer.isView(d)?d.byteLength:d.size;if(s&&m<=s)s-=m,o-=m;else{let h;ArrayBuffer.isView(d)?(h=d.subarray(s,Math.min(m,o)),l+=h.byteLength):(h=d.slice(s,Math.min(m,o)),l+=h.size),o-=m,u.push(h),s=0}}let p=new aPe([],{type:String(r).toLowerCase()});return p.#n=a,p.#e=u,p}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(HTt.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});htr=HTt,ab=htr});var gtr,Atr,hI,cPe=H(()=>{F4();gtr=class extends ab{#e=0;#t="";constructor(e,n,r={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,r),r===null&&(r={});let i=r.lastModified===void 0?Date.now():Number(r.lastModified);Number.isNaN(i)||(this.#e=i),this.#t=String(n)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof ab&&/^(File)$/.test(e[Symbol.toStringTag])}},Atr=gtr,hI=Atr});function KTt(t,e=ab){var n=`${jTt()}${jTt()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),r=[],i=`--${n}\r
153
+ `);let{connect:u,buffered:l}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",mtr),n.secureEndpoint?(B4("Upgrading socket connection to TLS"),OTt.connect({...MTt(DTt(n),"host","path","port"),socket:i})):i;i.destroy();let p=new Zre.Socket({writable:!1});return p.readable=!0,e.once("socket",d=>{B4("Replaying proxy buffer for failed request"),(0,ctr.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),p}};eie.protocols=["http","https"];AA.HttpsProxyAgent=eie;function mtr(t){t.resume()}function MTt(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}});function ftr(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let n=t.substring(5,e).split(";"),r="",i=!1,s=n[0]||"text/plain",o=s;for(let l=1;l<n.length;l++)n[l]==="base64"?i=!0:n[l]&&(o+=`;${n[l]}`,n[l].indexOf("charset=")===0&&(r=n[l].substring(8)));!n[0]&&!r.length&&(o+=";charset=US-ASCII",r="US-ASCII");let a=i?"base64":"ascii",c=unescape(t.substring(e+1)),u=Buffer.from(c,a);return u.type=s,u.typeFull=o,u.charset=r,u}var UTt,$Tt=H(()=>{UTt=ftr});var GTt=me((tie,QTt)=>{(function(t,e){typeof tie=="object"&&typeof QTt<"u"?e(tie):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(tie,(function(t){"use strict";function e(){}function n(M){return typeof M=="object"&&M!==null||typeof M=="function"}let r=e;function i(M,K){try{Object.defineProperty(M,"name",{value:K,configurable:!0})}catch{}}let s=Promise,o=Promise.prototype.then,a=Promise.reject.bind(s);function c(M){return new s(M)}function u(M){return c(K=>K(M))}function l(M){return a(M)}function p(M,K,we){return o.call(M,K,we)}function d(M,K,we){p(p(M,K,we),void 0,r)}function m(M,K){d(M,K)}function h(M,K){d(M,void 0,K)}function f(M,K,we){return p(M,K,we)}function A(M){p(M,void 0,r)}let y=M=>{if(typeof queueMicrotask=="function")y=queueMicrotask;else{let K=u(void 0);y=we=>p(K,we)}return y(M)};function b(M,K,we){if(typeof M!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(M,K,we)}function E(M,K,we){try{return u(b(M,K,we))}catch(it){return l(it)}}let _=16384;class x{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(K){let we=this._back,it=we;we._elements.length===_-1&&(it={_elements:[],_next:void 0}),we._elements.push(K),it!==we&&(this._back=it,we._next=it),++this._size}shift(){let K=this._front,we=K,it=this._cursor,At=it+1,Ht=K._elements,tn=Ht[it];return At===_&&(we=K._next,At=0),--this._size,this._cursor=At,K!==we&&(this._front=we),Ht[it]=void 0,tn}forEach(K){let we=this._cursor,it=this._front,At=it._elements;for(;(we!==At.length||it._next!==void 0)&&!(we===At.length&&(it=it._next,At=it._elements,we=0,At.length===0));)K(At[we]),++we}peek(){let K=this._front,we=this._cursor;return K._elements[we]}}let S=Symbol("[[AbortSteps]]"),T=Symbol("[[ErrorSteps]]"),v=Symbol("[[CancelSteps]]"),R=Symbol("[[PullSteps]]"),O=Symbol("[[ReleaseSteps]]");function G(M,K){M._ownerReadableStream=K,K._reader=M,K._state==="readable"?re(M):K._state==="closed"?te(M):ie(M,K._storedError)}function $(M,K){let we=M._ownerReadableStream;return ym(we,K)}function U(M){let K=M._ownerReadableStream;K._state==="readable"?q(M,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):oe(M,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),K._readableStreamController[O](),K._reader=void 0,M._ownerReadableStream=void 0}function W(M){return new TypeError("Cannot "+M+" a stream using a released reader")}function re(M){M._closedPromise=c((K,we)=>{M._closedPromise_resolve=K,M._closedPromise_reject=we})}function ie(M,K){re(M),q(M,K)}function te(M){re(M),be(M)}function q(M,K){M._closedPromise_reject!==void 0&&(A(M._closedPromise),M._closedPromise_reject(K),M._closedPromise_resolve=void 0,M._closedPromise_reject=void 0)}function oe(M,K){ie(M,K)}function be(M){M._closedPromise_resolve!==void 0&&(M._closedPromise_resolve(void 0),M._closedPromise_resolve=void 0,M._closedPromise_reject=void 0)}let De=Number.isFinite||function(M){return typeof M=="number"&&isFinite(M)},Re=Math.trunc||function(M){return M<0?Math.ceil(M):Math.floor(M)};function Ie(M){return typeof M=="object"||typeof M=="function"}function ne(M,K){if(M!==void 0&&!Ie(M))throw new TypeError(`${K} is not an object.`)}function ce(M,K){if(typeof M!="function")throw new TypeError(`${K} is not a function.`)}function se(M){return typeof M=="object"&&M!==null||typeof M=="function"}function z(M,K){if(!se(M))throw new TypeError(`${K} is not an object.`)}function ee(M,K,we){if(M===void 0)throw new TypeError(`Parameter ${K} is required in '${we}'.`)}function j(M,K,we){if(M===void 0)throw new TypeError(`${K} is required in '${we}'.`)}function X(M){return Number(M)}function le(M){return M===0?0:M}function xe(M){return le(Re(M))}function Se(M,K){let it=Number.MAX_SAFE_INTEGER,At=Number(M);if(At=le(At),!De(At))throw new TypeError(`${K} is not a finite number`);if(At=xe(At),At<0||At>it)throw new TypeError(`${K} is outside the accepted range of 0 to ${it}, inclusive`);return!De(At)||At===0?0:At}function pe(M,K){if(!EE(M))throw new TypeError(`${K} is not a ReadableStream.`)}function ge(M){return new Y(M)}function Te(M,K){M._reader._readRequests.push(K)}function Ee(M,K,we){let At=M._reader._readRequests.shift();we?At._closeSteps():At._chunkSteps(K)}function ve(M){return M._reader._readRequests.length}function ye(M){let K=M._reader;return!(K===void 0||!qe(K))}class Y{constructor(K){if(ee(K,1,"ReadableStreamDefaultReader"),pe(K,"First parameter"),_E(K))throw new TypeError("This stream has already been locked for exclusive reading by another reader");G(this,K),this._readRequests=new x}get closed(){return qe(this)?this._closedPromise:l(ze("closed"))}cancel(K=void 0){return qe(this)?this._ownerReadableStream===void 0?l(W("cancel")):$(this,K):l(ze("cancel"))}read(){if(!qe(this))return l(ze("read"));if(this._ownerReadableStream===void 0)return l(W("read from"));let K,we,it=c((Ht,tn)=>{K=Ht,we=tn});return He(this,{_chunkSteps:Ht=>K({value:Ht,done:!1}),_closeSteps:()=>K({value:void 0,done:!0}),_errorSteps:Ht=>we(Ht)}),it}releaseLock(){if(!qe(this))throw ze("releaseLock");this._ownerReadableStream!==void 0&&dt(this)}}Object.defineProperties(Y.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(Y.prototype.cancel,"cancel"),i(Y.prototype.read,"read"),i(Y.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Y.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function qe(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_readRequests")?!1:M instanceof Y}function He(M,K){let we=M._ownerReadableStream;we._disturbed=!0,we._state==="closed"?K._closeSteps():we._state==="errored"?K._errorSteps(we._storedError):we._readableStreamController[R](K)}function dt(M){U(M);let K=new TypeError("Reader was released");at(M,K)}function at(M,K){let we=M._readRequests;M._readRequests=new x,we.forEach(it=>{it._errorSteps(K)})}function ze(M){return new TypeError(`ReadableStreamDefaultReader.prototype.${M} can only be used on a ReadableStreamDefaultReader`)}let rt=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class _t{constructor(K,we){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=K,this._preventCancel=we}next(){let K=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?f(this._ongoingPromise,K,K):K(),this._ongoingPromise}return(K){let we=()=>this._returnSteps(K);return this._ongoingPromise?f(this._ongoingPromise,we,we):we()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let K=this._reader,we,it,At=c((tn,Xn)=>{we=tn,it=Xn});return He(K,{_chunkSteps:tn=>{this._ongoingPromise=void 0,y(()=>we({value:tn,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,U(K),we({value:void 0,done:!0})},_errorSteps:tn=>{this._ongoingPromise=void 0,this._isFinished=!0,U(K),it(tn)}}),At}_returnSteps(K){if(this._isFinished)return Promise.resolve({value:K,done:!0});this._isFinished=!0;let we=this._reader;if(!this._preventCancel){let it=$(we,K);return U(we),f(it,()=>({value:K,done:!0}))}return U(we),u({value:K,done:!0})}}let Zt={next(){return $t(this)?this._asyncIteratorImpl.next():l(Ot("next"))},return(M){return $t(this)?this._asyncIteratorImpl.return(M):l(Ot("return"))}};Object.setPrototypeOf(Zt,rt);function Ut(M,K){let we=ge(M),it=new _t(we,K),At=Object.create(Zt);return At._asyncIteratorImpl=it,At}function $t(M){if(!n(M)||!Object.prototype.hasOwnProperty.call(M,"_asyncIteratorImpl"))return!1;try{return M._asyncIteratorImpl instanceof _t}catch{return!1}}function Ot(M){return new TypeError(`ReadableStreamAsyncIterator.${M} can only be used on a ReadableSteamAsyncIterator`)}let Ze=Number.isNaN||function(M){return M!==M};var Me,Xe,gt;function qt(M){return M.slice()}function sn(M,K,we,it,At){new Uint8Array(M).set(new Uint8Array(we,it,At),K)}let mn=M=>(typeof M.transfer=="function"?mn=K=>K.transfer():typeof structuredClone=="function"?mn=K=>structuredClone(K,{transfer:[K]}):mn=K=>K,mn(M)),Pn=M=>(typeof M.detached=="boolean"?Pn=K=>K.detached:Pn=K=>K.byteLength===0,Pn(M));function je(M,K,we){if(M.slice)return M.slice(K,we);let it=we-K,At=new ArrayBuffer(it);return sn(At,0,M,K,it),At}function mt(M,K){let we=M[K];if(we!=null){if(typeof we!="function")throw new TypeError(`${String(K)} is not a function`);return we}}function Kt(M){let K={[Symbol.iterator]:()=>M.iterator},we=(async function*(){return yield*K})(),it=we.next;return{iterator:we,nextMethod:it,done:!1}}let et=(gt=(Me=Symbol.asyncIterator)!==null&&Me!==void 0?Me:(Xe=Symbol.for)===null||Xe===void 0?void 0:Xe.call(Symbol,"Symbol.asyncIterator"))!==null&&gt!==void 0?gt:"@@asyncIterator";function pt(M,K="sync",we){if(we===void 0)if(K==="async"){if(we=mt(M,et),we===void 0){let Ht=mt(M,Symbol.iterator),tn=pt(M,"sync",Ht);return Kt(tn)}}else we=mt(M,Symbol.iterator);if(we===void 0)throw new TypeError("The object is not iterable");let it=b(we,M,[]);if(!n(it))throw new TypeError("The iterator method must return an object");let At=it.next;return{iterator:it,nextMethod:At,done:!1}}function ft(M){let K=b(M.nextMethod,M.iterator,[]);if(!n(K))throw new TypeError("The iterator.next() method must return an object");return K}function nt(M){return!!M.done}function kt(M){return M.value}function Yt(M){return!(typeof M!="number"||Ze(M)||M<0)}function Ne(M){let K=je(M.buffer,M.byteOffset,M.byteOffset+M.byteLength);return new Uint8Array(K)}function Qe(M){let K=M._queue.shift();return M._queueTotalSize-=K.size,M._queueTotalSize<0&&(M._queueTotalSize=0),K.value}function lt(M,K,we){if(!Yt(we)||we===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");M._queue.push({value:K,size:we}),M._queueTotalSize+=we}function Ge(M){return M._queue.peek().value}function Ct(M){M._queue=new x,M._queueTotalSize=0}function Nt(M){return M===DataView}function wt(M){return Nt(M.constructor)}function hn(M){return Nt(M)?1:M.BYTES_PER_ELEMENT}class fn{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!qn(this))throw Io("view");return this._view}respond(K){if(!qn(this))throw Io("respond");if(ee(K,1,"respond"),K=Se(K,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pn(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");ai(this._associatedReadableByteStreamController,K)}respondWithNewView(K){if(!qn(this))throw Io("respondWithNewView");if(ee(K,1,"respondWithNewView"),!ArrayBuffer.isView(K))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pn(K.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");ln(this._associatedReadableByteStreamController,K)}}Object.defineProperties(fn.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),i(fn.prototype.respond,"respond"),i(fn.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(fn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class yn{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!zn(this))throw Bo("byobRequest");return mr(this)}get desiredSize(){if(!zn(this))throw Bo("desiredSize");return Wn(this)}close(){if(!zn(this))throw Bo("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let K=this._controlledReadableByteStream._state;if(K!=="readable")throw new TypeError(`The stream (in ${K} state) is not in the readable state and cannot be closed`);vn(this)}enqueue(K){if(!zn(this))throw Bo("enqueue");if(ee(K,1,"enqueue"),!ArrayBuffer.isView(K))throw new TypeError("chunk must be an array buffer view");if(K.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(K.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let we=this._controlledReadableByteStream._state;if(we!=="readable")throw new TypeError(`The stream (in ${we} state) is not in the readable state and cannot be enqueued to`);Bn(this,K)}error(K=void 0){if(!zn(this))throw Bo("error");nr(this,K)}[v](K){cn(this),Ct(this);let we=this._cancelAlgorithm(K);return Vt(this),we}[R](K){let we=this._controlledReadableByteStream;if(this._queueTotalSize>0){vr(this,K);return}let it=this._autoAllocateChunkSize;if(it!==void 0){let At;try{At=new ArrayBuffer(it)}catch(tn){K._errorSteps(tn);return}let Ht={buffer:At,bufferByteLength:it,byteOffset:0,byteLength:it,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Ht)}Te(we,K),Yr(this)}[O](){if(this._pendingPullIntos.length>0){let K=this._pendingPullIntos.peek();K.readerType="none",this._pendingPullIntos=new x,this._pendingPullIntos.push(K)}}}Object.defineProperties(yn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),i(yn.prototype.close,"close"),i(yn.prototype.enqueue,"enqueue"),i(yn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(yn.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function zn(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_controlledReadableByteStream")?!1:M instanceof yn}function qn(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_associatedReadableByteStreamController")?!1:M instanceof fn}function Yr(M){if(!jt(M))return;if(M._pulling){M._pullAgain=!0;return}M._pulling=!0;let we=M._pullAlgorithm();d(we,()=>(M._pulling=!1,M._pullAgain&&(M._pullAgain=!1,Yr(M)),null),it=>(nr(M,it),null))}function cn(M){ei(M),M._pendingPullIntos=new x}function oi(M,K){let we=!1;M._state==="closed"&&(we=!0);let it=Qr(K);K.readerType==="default"?Ee(M,it,we):Qp(M,it,we)}function Qr(M){let K=M.bytesFilled,we=M.elementSize;return new M.viewConstructor(M.buffer,M.byteOffset,K/we)}function kr(M,K,we,it){M._queue.push({buffer:K,byteOffset:we,byteLength:it}),M._queueTotalSize+=it}function Ys(M,K,we,it){let At;try{At=je(K,we,we+it)}catch(Ht){throw nr(M,Ht),Ht}kr(M,At,0,it)}function us(M,K){K.bytesFilled>0&&Ys(M,K.buffer,K.byteOffset,K.bytesFilled),_a(M)}function dn(M,K){let we=Math.min(M._queueTotalSize,K.byteLength-K.bytesFilled),it=K.bytesFilled+we,At=we,Ht=!1,tn=it%K.elementSize,Xn=it-tn;Xn>=K.minimumFill&&(At=Xn-K.bytesFilled,Ht=!0);let Ii=M._queue;for(;At>0;){let Gr=Ii.peek(),zi=Math.min(At,Gr.byteLength),gs=K.byteOffset+K.bytesFilled;sn(K.buffer,gs,Gr.buffer,Gr.byteOffset,zi),Gr.byteLength===zi?Ii.shift():(Gr.byteOffset+=zi,Gr.byteLength-=zi),M._queueTotalSize-=zi,Bi(M,zi,K),At-=zi}return Ht}function Bi(M,K,we){we.bytesFilled+=K}function Fs(M){M._queueTotalSize===0&&M._closeRequested?(Vt(M),Y0(M._controlledReadableByteStream)):Yr(M)}function ei(M){M._byobRequest!==null&&(M._byobRequest._associatedReadableByteStreamController=void 0,M._byobRequest._view=null,M._byobRequest=null)}function Gn(M){for(;M._pendingPullIntos.length>0;){if(M._queueTotalSize===0)return;let K=M._pendingPullIntos.peek();dn(M,K)&&(_a(M),oi(M._controlledReadableByteStream,K))}}function Vu(M){let K=M._controlledReadableByteStream._reader;for(;K._readRequests.length>0;){if(M._queueTotalSize===0)return;let we=K._readRequests.shift();vr(M,we)}}function yu(M,K,we,it){let At=M._controlledReadableByteStream,Ht=K.constructor,tn=hn(Ht),{byteOffset:Xn,byteLength:Ii}=K,Gr=we*tn,zi;try{zi=mn(K.buffer)}catch(ra){it._errorSteps(ra);return}let gs={buffer:zi,bufferByteLength:zi.byteLength,byteOffset:Xn,byteLength:Ii,bytesFilled:0,minimumFill:Gr,elementSize:tn,viewConstructor:Ht,readerType:"byob"};if(M._pendingPullIntos.length>0){M._pendingPullIntos.push(gs),Fn(At,it);return}if(At._state==="closed"){let ra=new Ht(gs.buffer,gs.byteOffset,0);it._closeSteps(ra);return}if(M._queueTotalSize>0){if(dn(M,gs)){let ra=Qr(gs);Fs(M),it._chunkSteps(ra);return}if(M._closeRequested){let ra=new TypeError("Insufficient bytes to fill elements in the given buffer");nr(M,ra),it._errorSteps(ra);return}}M._pendingPullIntos.push(gs),Fn(At,it),Yr(M)}function Up(M,K){K.readerType==="none"&&_a(M);let we=M._controlledReadableByteStream;if(zr(we))for(;Gp(we)>0;){let it=_a(M);oi(we,it)}}function bu(M,K,we){if(Bi(M,K,we),we.readerType==="none"){us(M,we),Gn(M);return}if(we.bytesFilled<we.minimumFill)return;_a(M);let it=we.bytesFilled%we.elementSize;if(it>0){let At=we.byteOffset+we.bytesFilled;Ys(M,we.buffer,At-it,it)}we.bytesFilled-=it,oi(M._controlledReadableByteStream,we),Gn(M)}function $p(M,K){let we=M._pendingPullIntos.peek();ei(M),M._controlledReadableByteStream._state==="closed"?Up(M,we):bu(M,K,we),Yr(M)}function _a(M){return M._pendingPullIntos.shift()}function jt(M){let K=M._controlledReadableByteStream;return K._state!=="readable"||M._closeRequested||!M._started?!1:!!(ye(K)&&ve(K)>0||zr(K)&&Gp(K)>0||Wn(M)>0)}function Vt(M){M._pullAlgorithm=void 0,M._cancelAlgorithm=void 0}function vn(M){let K=M._controlledReadableByteStream;if(!(M._closeRequested||K._state!=="readable")){if(M._queueTotalSize>0){M._closeRequested=!0;return}if(M._pendingPullIntos.length>0){let we=M._pendingPullIntos.peek();if(we.bytesFilled%we.elementSize!==0){let it=new TypeError("Insufficient bytes to fill elements in the given buffer");throw nr(M,it),it}}Vt(M),Y0(K)}}function Bn(M,K){let we=M._controlledReadableByteStream;if(M._closeRequested||we._state!=="readable")return;let{buffer:it,byteOffset:At,byteLength:Ht}=K;if(Pn(it))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let tn=mn(it);if(M._pendingPullIntos.length>0){let Xn=M._pendingPullIntos.peek();if(Pn(Xn.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");ei(M),Xn.buffer=mn(Xn.buffer),Xn.readerType==="none"&&us(M,Xn)}if(ye(we))if(Vu(M),ve(we)===0)kr(M,tn,At,Ht);else{M._pendingPullIntos.length>0&&_a(M);let Xn=new Uint8Array(tn,At,Ht);Ee(we,Xn,!1)}else zr(we)?(kr(M,tn,At,Ht),Gn(M)):kr(M,tn,At,Ht);Yr(M)}function nr(M,K){let we=M._controlledReadableByteStream;we._state==="readable"&&(cn(M),Ct(M),Vt(M),yY(we,K))}function vr(M,K){let we=M._queue.shift();M._queueTotalSize-=we.byteLength,Fs(M);let it=new Uint8Array(we.buffer,we.byteOffset,we.byteLength);K._chunkSteps(it)}function mr(M){if(M._byobRequest===null&&M._pendingPullIntos.length>0){let K=M._pendingPullIntos.peek(),we=new Uint8Array(K.buffer,K.byteOffset+K.bytesFilled,K.byteLength-K.bytesFilled),it=Object.create(fn.prototype);ps(it,M,we),M._byobRequest=it}return M._byobRequest}function Wn(M){let K=M._controlledReadableByteStream._state;return K==="errored"?null:K==="closed"?0:M._strategyHWM-M._queueTotalSize}function ai(M,K){let we=M._pendingPullIntos.peek();if(M._controlledReadableByteStream._state==="closed"){if(K!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(K===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(we.bytesFilled+K>we.byteLength)throw new RangeError("bytesWritten out of range")}we.buffer=mn(we.buffer),$p(M,K)}function ln(M,K){let we=M._pendingPullIntos.peek();if(M._controlledReadableByteStream._state==="closed"){if(K.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(K.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(we.byteOffset+we.bytesFilled!==K.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(we.bufferByteLength!==K.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(we.bytesFilled+K.byteLength>we.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let At=K.byteLength;we.buffer=mn(K.buffer),$p(M,At)}function fs(M,K,we,it,At,Ht,tn){K._controlledReadableByteStream=M,K._pullAgain=!1,K._pulling=!1,K._byobRequest=null,K._queue=K._queueTotalSize=void 0,Ct(K),K._closeRequested=!1,K._started=!1,K._strategyHWM=Ht,K._pullAlgorithm=it,K._cancelAlgorithm=At,K._autoAllocateChunkSize=tn,K._pendingPullIntos=new x,M._readableStreamController=K;let Xn=we();d(u(Xn),()=>(K._started=!0,Yr(K),null),Ii=>(nr(K,Ii),null))}function yr(M,K,we){let it=Object.create(yn.prototype),At,Ht,tn;K.start!==void 0?At=()=>K.start(it):At=()=>{},K.pull!==void 0?Ht=()=>K.pull(it):Ht=()=>u(void 0),K.cancel!==void 0?tn=Ii=>K.cancel(Ii):tn=()=>u(void 0);let Xn=K.autoAllocateChunkSize;if(Xn===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");fs(M,it,At,Ht,tn,we,Xn)}function ps(M,K,we){M._associatedReadableByteStreamController=K,M._view=we}function Io(M){return new TypeError(`ReadableStreamBYOBRequest.prototype.${M} can only be used on a ReadableStreamBYOBRequest`)}function Bo(M){return new TypeError(`ReadableByteStreamController.prototype.${M} can only be used on a ReadableByteStreamController`)}function br(M,K){ne(M,K);let we=M?.mode;return{mode:we===void 0?void 0:Fo(we,`${K} has member 'mode' that`)}}function Fo(M,K){if(M=`${M}`,M!=="byob")throw new TypeError(`${K} '${M}' is not a valid enumeration value for ReadableStreamReaderMode`);return M}function Uo(M,K){var we;ne(M,K);let it=(we=M?.min)!==null&&we!==void 0?we:1;return{min:Se(it,`${K} has member 'min' that`)}}function Ku(M){return new Yu(M)}function Fn(M,K){M._reader._readIntoRequests.push(K)}function Qp(M,K,we){let At=M._reader._readIntoRequests.shift();we?At._closeSteps(K):At._chunkSteps(K)}function Gp(M){return M._reader._readIntoRequests.length}function zr(M){let K=M._reader;return!(K===void 0||!qp(K))}class Yu{constructor(K){if(ee(K,1,"ReadableStreamBYOBReader"),pe(K,"First parameter"),_E(K))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!zn(K._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");G(this,K),this._readIntoRequests=new x}get closed(){return qp(this)?this._closedPromise:l(wd("closed"))}cancel(K=void 0){return qp(this)?this._ownerReadableStream===void 0?l(W("cancel")):$(this,K):l(wd("cancel"))}read(K,we={}){if(!qp(this))return l(wd("read"));if(!ArrayBuffer.isView(K))return l(new TypeError("view must be an array buffer view"));if(K.byteLength===0)return l(new TypeError("view must have non-zero byteLength"));if(K.buffer.byteLength===0)return l(new TypeError("view's buffer must have non-zero byteLength"));if(Pn(K.buffer))return l(new TypeError("view's buffer has been detached"));let it;try{it=Uo(we,"options")}catch(Gr){return l(Gr)}let At=it.min;if(At===0)return l(new TypeError("options.min must be greater than 0"));if(wt(K)){if(At>K.byteLength)return l(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(At>K.length)return l(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return l(W("read from"));let Ht,tn,Xn=c((Gr,zi)=>{Ht=Gr,tn=zi});return Ay(this,K,At,{_chunkSteps:Gr=>Ht({value:Gr,done:!1}),_closeSteps:Gr=>Ht({value:Gr,done:!0}),_errorSteps:Gr=>tn(Gr)}),Xn}releaseLock(){if(!qp(this))throw wd("releaseLock");this._ownerReadableStream!==void 0&&xa(this)}}Object.defineProperties(Yu.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(Yu.prototype.cancel,"cancel"),i(Yu.prototype.read,"read"),i(Yu.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Yu.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function qp(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_readIntoRequests")?!1:M instanceof Yu}function Ay(M,K,we,it){let At=M._ownerReadableStream;At._disturbed=!0,At._state==="errored"?it._errorSteps(At._storedError):yu(At._readableStreamController,K,we,it)}function xa(M){U(M);let K=new TypeError("Reader was released");Hc(M,K)}function Hc(M,K){let we=M._readIntoRequests;M._readIntoRequests=new x,we.forEach(it=>{it._errorSteps(K)})}function wd(M){return new TypeError(`ReadableStreamBYOBReader.prototype.${M} can only be used on a ReadableStreamBYOBReader`)}function Eu(M,K){let{highWaterMark:we}=M;if(we===void 0)return K;if(Ze(we)||we<0)throw new RangeError("Invalid highWaterMark");return we}function Ua(M){let{size:K}=M;return K||(()=>1)}function gm(M,K){ne(M,K);let we=M?.highWaterMark,it=M?.size;return{highWaterMark:we===void 0?void 0:X(we),size:it===void 0?void 0:AE(it,`${K} has member 'size' that`)}}function AE(M,K){return ce(M,K),we=>X(M(we))}function Og(M,K){ne(M,K);let we=M?.abort,it=M?.close,At=M?.start,Ht=M?.type,tn=M?.write;return{abort:we===void 0?void 0:Sl(we,M,`${K} has member 'abort' that`),close:it===void 0?void 0:Dg(it,M,`${K} has member 'close' that`),start:At===void 0?void 0:W0(At,M,`${K} has member 'start' that`),write:tn===void 0?void 0:yy(tn,M,`${K} has member 'write' that`),type:Ht}}function Sl(M,K,we){return ce(M,we),it=>E(M,K,[it])}function Dg(M,K,we){return ce(M,we),()=>E(M,K,[])}function W0(M,K,we){return ce(M,we),it=>b(M,K,[it])}function yy(M,K,we){return ce(M,we),(it,At)=>E(M,K,[it,At])}function jl(M,K){if(!ae(M))throw new TypeError(`${K} is not a WritableStream.`)}function ch(M){if(typeof M!="object"||M===null)return!1;try{return typeof M.aborted=="boolean"}catch{return!1}}let wC=typeof AbortController=="function";function Oe(){if(wC)return new AbortController}class g{constructor(K={},we={}){K===void 0?K=null:z(K,"First parameter");let it=gm(we,"Second parameter"),At=Og(K,"First parameter");if(F(this),At.type!==void 0)throw new RangeError("Invalid type is specified");let tn=Ua(it),Xn=Eu(it,1);Am(this,At,Xn,tn)}get locked(){if(!ae(this))throw Ju("locked");return ke(this)}abort(K=void 0){return ae(this)?ke(this)?l(new TypeError("Cannot abort a stream that already has a writer")):Le(this,K):l(Ju("abort"))}close(){return ae(this)?ke(this)?l(new TypeError("Cannot close a stream that already has a writer")):xr(this)?l(new TypeError("Cannot close an already-closing stream")):Ye(this):l(Ju("close"))}getWriter(){if(!ae(this))throw Ju("getWriter");return I(this)}}Object.defineProperties(g.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),i(g.prototype.abort,"abort"),i(g.prototype.close,"close"),i(g.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(g.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function I(M){return new Q(M)}function P(M,K,we,it,At=1,Ht=()=>1){let tn=Object.create(g.prototype);F(tn);let Xn=Object.create(Us.prototype);return uf(tn,Xn,M,K,we,it,At,Ht),tn}function F(M){M._state="writable",M._storedError=void 0,M._writer=void 0,M._writableStreamController=void 0,M._writeRequests=new x,M._inFlightWriteRequest=void 0,M._closeRequest=void 0,M._inFlightCloseRequest=void 0,M._pendingAbortRequest=void 0,M._backpressure=!1}function ae(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_writableStreamController")?!1:M instanceof g}function ke(M){return M._writer!==void 0}function Le(M,K){var we;if(M._state==="closed"||M._state==="errored")return u(void 0);M._writableStreamController._abortReason=K,(we=M._writableStreamController._abortController)===null||we===void 0||we.abort(K);let it=M._state;if(it==="closed"||it==="errored")return u(void 0);if(M._pendingAbortRequest!==void 0)return M._pendingAbortRequest._promise;let At=!1;it==="erroring"&&(At=!0,K=void 0);let Ht=c((tn,Xn)=>{M._pendingAbortRequest={_promise:void 0,_resolve:tn,_reject:Xn,_reason:K,_wasAlreadyErroring:At}});return M._pendingAbortRequest._promise=Ht,At||en(M,K),Ht}function Ye(M){let K=M._state;if(K==="closed"||K==="errored")return l(new TypeError(`The stream (in ${K} state) is not in the writable state and cannot be closed`));let we=c((At,Ht)=>{let tn={_resolve:At,_reject:Ht};M._closeRequest=tn}),it=M._writer;return it!==void 0&&M._backpressure&&K==="writable"&&qO(it),Wp(M._writableStreamController),we}function Ke(M){return c((we,it)=>{let At={_resolve:we,_reject:it};M._writeRequests.push(At)})}function Tt(M,K){if(M._state==="writable"){en(M,K);return}Jn(M)}function en(M,K){let we=M._writableStreamController;M._state="erroring",M._storedError=K;let it=M._writer;it!==void 0&&Wt(it,K),!$o(M)&&we._started&&Jn(M)}function Jn(M){M._state="errored",M._writableStreamController[T]();let K=M._storedError;if(M._writeRequests.forEach(At=>{At._reject(K)}),M._writeRequests=new x,M._pendingAbortRequest===void 0){j0(M);return}let we=M._pendingAbortRequest;if(M._pendingAbortRequest=void 0,we._wasAlreadyErroring){we._reject(K),j0(M);return}let it=M._writableStreamController[S](we._reason);d(it,()=>(we._resolve(),j0(M),null),At=>(we._reject(At),j0(M),null))}function wn(M){M._inFlightWriteRequest._resolve(void 0),M._inFlightWriteRequest=void 0}function Er(M,K){M._inFlightWriteRequest._reject(K),M._inFlightWriteRequest=void 0,Tt(M,K)}function Is(M){M._inFlightCloseRequest._resolve(void 0),M._inFlightCloseRequest=void 0,M._state==="erroring"&&(M._storedError=void 0,M._pendingAbortRequest!==void 0&&(M._pendingAbortRequest._resolve(),M._pendingAbortRequest=void 0)),M._state="closed";let we=M._writer;we!==void 0&&aY(we)}function co(M,K){M._inFlightCloseRequest._reject(K),M._inFlightCloseRequest=void 0,M._pendingAbortRequest!==void 0&&(M._pendingAbortRequest._reject(K),M._pendingAbortRequest=void 0),Tt(M,K)}function xr(M){return!(M._closeRequest===void 0&&M._inFlightCloseRequest===void 0)}function $o(M){return!(M._inFlightWriteRequest===void 0&&M._inFlightCloseRequest===void 0)}function vd(M){M._inFlightCloseRequest=M._closeRequest,M._closeRequest=void 0}function H0(M){M._inFlightWriteRequest=M._writeRequests.shift()}function j0(M){M._closeRequest!==void 0&&(M._closeRequest._reject(M._storedError),M._closeRequest=void 0);let K=M._writer;K!==void 0&&GO(K,M._storedError)}function w(M,K){let we=M._writer;we!==void 0&&K!==M._backpressure&&(K?kbe(we):qO(we)),M._backpressure=K}class Q{constructor(K){if(ee(K,1,"WritableStreamDefaultWriter"),jl(K,"First parameter"),ke(K))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=K,K._writer=this;let we=K._state;if(we==="writable")!xr(K)&&K._backpressure?kC(this):by(this),cR(this);else if(we==="erroring")_u(this,K._storedError),cR(this);else if(we==="closed")by(this),oY(this);else{let it=K._storedError;_u(this,it),sY(this,it)}}get closed(){return de(this)?this._closedPromise:l(uh("closed"))}get desiredSize(){if(!de(this))throw uh("desiredSize");if(this._ownerWritableStream===void 0)throw aR("desiredSize");return Dn(this)}get ready(){return de(this)?this._readyPromise:l(uh("ready"))}abort(K=void 0){return de(this)?this._ownerWritableStream===void 0?l(aR("abort")):Ce(this,K):l(uh("abort"))}close(){if(!de(this))return l(uh("close"));let K=this._ownerWritableStream;return K===void 0?l(aR("close")):xr(K)?l(new TypeError("Cannot close an already-closing stream")):We(this)}releaseLock(){if(!de(this))throw uh("releaseLock");this._ownerWritableStream!==void 0&&lr(this)}write(K=void 0){return de(this)?this._ownerWritableStream===void 0?l(aR("write to")):Rr(this,K):l(uh("write"))}}Object.defineProperties(Q.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),i(Q.prototype.abort,"abort"),i(Q.prototype.close,"close"),i(Q.prototype.releaseLock,"releaseLock"),i(Q.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Q.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function de(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_ownerWritableStream")?!1:M instanceof Q}function Ce(M,K){let we=M._ownerWritableStream;return Le(we,K)}function We(M){let K=M._ownerWritableStream;return Ye(K)}function ht(M){let K=M._ownerWritableStream,we=K._state;return xr(K)||we==="closed"?u(void 0):we==="errored"?l(K._storedError):We(M)}function It(M,K){M._closedPromiseState==="pending"?GO(M,K):Rbe(M,K)}function Wt(M,K){M._readyPromiseState==="pending"?lR(M,K):k3(M,K)}function Dn(M){let K=M._ownerWritableStream,we=K._state;return we==="errored"||we==="erroring"?null:we==="closed"?0:ws(K._writableStreamController)}function lr(M){let K=M._ownerWritableStream,we=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Wt(M,we),It(M,we),K._writer=void 0,M._ownerWritableStream=void 0}function Rr(M,K){let we=M._ownerWritableStream,it=we._writableStreamController,At=fr(it,K);if(we!==M._ownerWritableStream)return l(aR("write to"));let Ht=we._state;if(Ht==="errored")return l(we._storedError);if(xr(we)||Ht==="closed")return l(new TypeError("The stream is closing or closed and cannot be written to"));if(Ht==="erroring")return l(we._storedError);let tn=Ke(we);return zs(it,K,At),tn}let hs={};class Us{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!sc(this))throw RC("abortReason");return this._abortReason}get signal(){if(!sc(this))throw RC("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(K=void 0){if(!sc(this))throw RC("error");this._controlledWritableStream._state==="writable"&&pf(this,K)}[S](K){let we=this._abortAlgorithm(K);return zu(this),we}[T](){Ct(this)}}Object.defineProperties(Us.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Us.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function sc(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_controlledWritableStream")?!1:M instanceof Us}function uf(M,K,we,it,At,Ht,tn,Xn){K._controlledWritableStream=M,M._writableStreamController=K,K._queue=void 0,K._queueTotalSize=void 0,Ct(K),K._abortReason=void 0,K._abortController=Oe(),K._started=!1,K._strategySizeAlgorithm=Xn,K._strategyHWM=tn,K._writeAlgorithm=it,K._closeAlgorithm=At,K._abortAlgorithm=Ht;let Ii=Kl(K);w(M,Ii);let Gr=we(),zi=u(Gr);d(zi,()=>(K._started=!0,Vl(K),null),gs=>(K._started=!0,Tt(M,gs),null))}function Am(M,K,we,it){let At=Object.create(Us.prototype),Ht,tn,Xn,Ii;K.start!==void 0?Ht=()=>K.start(At):Ht=()=>{},K.write!==void 0?tn=Gr=>K.write(Gr,At):tn=()=>u(void 0),K.close!==void 0?Xn=()=>K.close():Xn=()=>u(void 0),K.abort!==void 0?Ii=Gr=>K.abort(Gr):Ii=()=>u(void 0),uf(M,At,Ht,tn,Xn,Ii,we,it)}function zu(M){M._writeAlgorithm=void 0,M._closeAlgorithm=void 0,M._abortAlgorithm=void 0,M._strategySizeAlgorithm=void 0}function Wp(M){lt(M,hs,0),Vl(M)}function fr(M,K){try{return M._strategySizeAlgorithm(K)}catch(we){return oc(M,we),1}}function ws(M){return M._strategyHWM-M._queueTotalSize}function zs(M,K,we){try{lt(M,K,we)}catch(At){oc(M,At);return}let it=M._controlledWritableStream;if(!xr(it)&&it._state==="writable"){let At=Kl(M);w(it,At)}Vl(M)}function Vl(M){let K=M._controlledWritableStream;if(!M._started||K._inFlightWriteRequest!==void 0)return;if(K._state==="erroring"){Jn(K);return}if(M._queue.length===0)return;let it=Ge(M);it===hs?vC(M):lh(M,it)}function oc(M,K){M._controlledWritableStream._state==="writable"&&pf(M,K)}function vC(M){let K=M._controlledWritableStream;vd(K),Qe(M);let we=M._closeAlgorithm();zu(M),d(we,()=>(Is(K),null),it=>(co(K,it),null))}function lh(M,K){let we=M._controlledWritableStream;H0(we);let it=M._writeAlgorithm(K);d(it,()=>{wn(we);let At=we._state;if(Qe(M),!xr(we)&&At==="writable"){let Ht=Kl(M);w(we,Ht)}return Vl(M),null},At=>(we._state==="writable"&&zu(M),Er(we,At),null))}function Kl(M){return ws(M)<=0}function pf(M,K){let we=M._controlledWritableStream;zu(M),en(we,K)}function Ju(M){return new TypeError(`WritableStream.prototype.${M} can only be used on a WritableStream`)}function RC(M){return new TypeError(`WritableStreamDefaultController.prototype.${M} can only be used on a WritableStreamDefaultController`)}function uh(M){return new TypeError(`WritableStreamDefaultWriter.prototype.${M} can only be used on a WritableStreamDefaultWriter`)}function aR(M){return new TypeError("Cannot "+M+" a stream using a released writer")}function cR(M){M._closedPromise=c((K,we)=>{M._closedPromise_resolve=K,M._closedPromise_reject=we,M._closedPromiseState="pending"})}function sY(M,K){cR(M),GO(M,K)}function oY(M){cR(M),aY(M)}function GO(M,K){M._closedPromise_reject!==void 0&&(A(M._closedPromise),M._closedPromise_reject(K),M._closedPromise_resolve=void 0,M._closedPromise_reject=void 0,M._closedPromiseState="rejected")}function Rbe(M,K){sY(M,K)}function aY(M){M._closedPromise_resolve!==void 0&&(M._closedPromise_resolve(void 0),M._closedPromise_resolve=void 0,M._closedPromise_reject=void 0,M._closedPromiseState="resolved")}function kC(M){M._readyPromise=c((K,we)=>{M._readyPromise_resolve=K,M._readyPromise_reject=we}),M._readyPromiseState="pending"}function _u(M,K){kC(M),lR(M,K)}function by(M){kC(M),qO(M)}function lR(M,K){M._readyPromise_reject!==void 0&&(A(M._readyPromise),M._readyPromise_reject(K),M._readyPromise_resolve=void 0,M._readyPromise_reject=void 0,M._readyPromiseState="rejected")}function kbe(M){kC(M)}function k3(M,K){_u(M,K)}function qO(M){M._readyPromise_resolve!==void 0&&(M._readyPromise_resolve(void 0),M._readyPromise_resolve=void 0,M._readyPromise_reject=void 0,M._readyPromiseState="fulfilled")}function Pbe(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}let WO=Pbe();function P3(M){if(!(typeof M=="function"||typeof M=="object")||M.name!=="DOMException")return!1;try{return new M,!0}catch{return!1}}function zKe(){let M=WO?.DOMException;return P3(M)?M:void 0}function Nbe(){let M=function(we,it){this.message=we||"",this.name=it||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return i(M,"DOMException"),M.prototype=Object.create(Error.prototype),Object.defineProperty(M.prototype,"constructor",{value:M,writable:!0,configurable:!0}),M}let JKe=zKe()||Nbe();function N3(M,K,we,it,At,Ht){let tn=ge(M),Xn=I(K);M._disturbed=!0;let Ii=!1,Gr=u(void 0);return c((zi,gs)=>{let ra;if(Ht!==void 0){if(ra=()=>{let ti=Ht.reason!==void 0?Ht.reason:new JKe("Aborted","AbortError"),Os=[];it||Os.push(()=>K._state==="writable"?Le(K,ti):u(void 0)),At||Os.push(()=>M._state==="readable"?ym(M,ti):u(void 0)),df(()=>Promise.all(Os.map(Sa=>Sa())),!0,ti)},Ht.aborted){ra();return}Ht.addEventListener("abort",ra)}function Sy(){return c((ti,Os)=>{function Sa(mh){mh?ti():p(zO(),Sa,Os)}Sa(!1)})}function zO(){return Ii?u(!0):p(Xn._readyPromise,()=>c((ti,Os)=>{He(tn,{_chunkSteps:Sa=>{Gr=p(Rr(Xn,Sa),void 0,e),ti(!1)},_closeSteps:()=>ti(!0),_errorSteps:Os})}))}if(J0(M,tn._closedPromise,ti=>(it?Bg(!0,ti):df(()=>Le(K,ti),!0,ti),null)),J0(K,Xn._closedPromise,ti=>(At?Bg(!0,ti):df(()=>ym(M,ti),!0,ti),null)),bm(M,tn._closedPromise,()=>(we?Bg():df(()=>ht(Xn)),null)),xr(K)||K._state==="closed"){let ti=new TypeError("the destination writable stream closed before all data could be piped to it");At?Bg(!0,ti):df(()=>ym(M,ti),!0,ti)}A(Sy());function LC(){let ti=Gr;return p(Gr,()=>ti!==Gr?LC():void 0)}function J0(ti,Os,Sa){ti._state==="errored"?Sa(ti._storedError):h(Os,Sa)}function bm(ti,Os,Sa){ti._state==="closed"?Sa():m(Os,Sa)}function df(ti,Os,Sa){if(Ii)return;Ii=!0,K._state==="writable"&&!xr(K)?m(LC(),mh):mh();function mh(){return d(ti(),()=>X0(Os,Sa),JO=>X0(!0,JO)),null}}function Bg(ti,Os){Ii||(Ii=!0,K._state==="writable"&&!xr(K)?m(LC(),()=>X0(ti,Os)):X0(ti,Os))}function X0(ti,Os){return lr(Xn),U(tn),Ht!==void 0&&Ht.removeEventListener("abort",ra),ti?gs(Os):zi(void 0),null}})}class Ey{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!HO(this))throw VO("desiredSize");return Fi(this)}close(){if(!HO(this))throw VO("close");if(!dh(this))throw new TypeError("The stream is not in a state that permits close");V0(this)}enqueue(K=void 0){if(!HO(this))throw VO("enqueue");if(!dh(this))throw new TypeError("The stream is not in a state that permits enqueue");return PC(this,K)}error(K=void 0){if(!HO(this))throw VO("error");ph(this,K)}[v](K){Ct(this);let we=this._cancelAlgorithm(K);return jO(this),we}[R](K){let we=this._controlledReadableStream;if(this._queue.length>0){let it=Qe(this);this._closeRequested&&this._queue.length===0?(jO(this),Y0(we)):uR(this),K._chunkSteps(it)}else Te(we,K),uR(this)}[O](){}}Object.defineProperties(Ey.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),i(Ey.prototype.close,"close"),i(Ey.prototype.enqueue,"enqueue"),i(Ey.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ey.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function HO(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_controlledReadableStream")?!1:M instanceof Ey}function uR(M){if(!cY(M))return;if(M._pulling){M._pullAgain=!0;return}M._pulling=!0;let we=M._pullAlgorithm();d(we,()=>(M._pulling=!1,M._pullAgain&&(M._pullAgain=!1,uR(M)),null),it=>(ph(M,it),null))}function cY(M){let K=M._controlledReadableStream;return!dh(M)||!M._started?!1:!!(_E(K)&&ve(K)>0||Fi(M)>0)}function jO(M){M._pullAlgorithm=void 0,M._cancelAlgorithm=void 0,M._strategySizeAlgorithm=void 0}function V0(M){if(!dh(M))return;let K=M._controlledReadableStream;M._closeRequested=!0,M._queue.length===0&&(jO(M),Y0(K))}function PC(M,K){if(!dh(M))return;let we=M._controlledReadableStream;if(_E(we)&&ve(we)>0)Ee(we,K,!1);else{let it;try{it=M._strategySizeAlgorithm(K)}catch(At){throw ph(M,At),At}try{lt(M,K,it)}catch(At){throw ph(M,At),At}}uR(M)}function ph(M,K){let we=M._controlledReadableStream;we._state==="readable"&&(Ct(M),jO(M),yY(we,K))}function Fi(M){let K=M._controlledReadableStream._state;return K==="errored"?null:K==="closed"?0:M._strategyHWM-M._queueTotalSize}function lY(M){return!cY(M)}function dh(M){let K=M._controlledReadableStream._state;return!M._closeRequested&&K==="readable"}function pR(M,K,we,it,At,Ht,tn){K._controlledReadableStream=M,K._queue=void 0,K._queueTotalSize=void 0,Ct(K),K._started=!1,K._closeRequested=!1,K._pullAgain=!1,K._pulling=!1,K._strategySizeAlgorithm=tn,K._strategyHWM=Ht,K._pullAlgorithm=it,K._cancelAlgorithm=At,M._readableStreamController=K;let Xn=we();d(u(Xn),()=>(K._started=!0,uR(K),null),Ii=>(ph(K,Ii),null))}function uY(M,K,we,it){let At=Object.create(Ey.prototype),Ht,tn,Xn;K.start!==void 0?Ht=()=>K.start(At):Ht=()=>{},K.pull!==void 0?tn=()=>K.pull(At):tn=()=>u(void 0),K.cancel!==void 0?Xn=Ii=>K.cancel(Ii):Xn=()=>u(void 0),pR(M,At,Ht,tn,Xn,we,it)}function VO(M){return new TypeError(`ReadableStreamDefaultController.prototype.${M} can only be used on a ReadableStreamDefaultController`)}function Obe(M,K){return zn(M._readableStreamController)?dY(M):pY(M)}function pY(M,K){let we=ge(M),it=!1,At=!1,Ht=!1,tn=!1,Xn,Ii,Gr,zi,gs,ra=c(bm=>{gs=bm});function Sy(){return it?(At=!0,u(void 0)):(it=!0,He(we,{_chunkSteps:df=>{y(()=>{At=!1;let Bg=df,X0=df;Ht||PC(Gr._readableStreamController,Bg),tn||PC(zi._readableStreamController,X0),it=!1,At&&Sy()})},_closeSteps:()=>{it=!1,Ht||V0(Gr._readableStreamController),tn||V0(zi._readableStreamController),(!Ht||!tn)&&gs(void 0)},_errorSteps:()=>{it=!1}}),u(void 0))}function zO(bm){if(Ht=!0,Xn=bm,tn){let df=qt([Xn,Ii]),Bg=ym(M,df);gs(Bg)}return ra}function LC(bm){if(tn=!0,Ii=bm,Ht){let df=qt([Xn,Ii]),Bg=ym(M,df);gs(Bg)}return ra}function J0(){}return Gr=yE(J0,Sy,zO),zi=yE(J0,Sy,LC),h(we._closedPromise,bm=>(ph(Gr._readableStreamController,bm),ph(zi._readableStreamController,bm),(!Ht||!tn)&&gs(void 0),null)),[Gr,zi]}function dY(M){let K=ge(M),we=!1,it=!1,At=!1,Ht=!1,tn=!1,Xn,Ii,Gr,zi,gs,ra=c(ti=>{gs=ti});function Sy(ti){h(ti._closedPromise,Os=>(ti!==K||(nr(Gr._readableStreamController,Os),nr(zi._readableStreamController,Os),(!Ht||!tn)&&gs(void 0)),null))}function zO(){qp(K)&&(U(K),K=ge(M),Sy(K)),He(K,{_chunkSteps:Os=>{y(()=>{it=!1,At=!1;let Sa=Os,mh=Os;if(!Ht&&!tn)try{mh=Ne(Os)}catch(JO){nr(Gr._readableStreamController,JO),nr(zi._readableStreamController,JO),gs(ym(M,JO));return}Ht||Bn(Gr._readableStreamController,Sa),tn||Bn(zi._readableStreamController,mh),we=!1,it?J0():At&&bm()})},_closeSteps:()=>{we=!1,Ht||vn(Gr._readableStreamController),tn||vn(zi._readableStreamController),Gr._readableStreamController._pendingPullIntos.length>0&&ai(Gr._readableStreamController,0),zi._readableStreamController._pendingPullIntos.length>0&&ai(zi._readableStreamController,0),(!Ht||!tn)&&gs(void 0)},_errorSteps:()=>{we=!1}})}function LC(ti,Os){qe(K)&&(U(K),K=Ku(M),Sy(K));let Sa=Os?zi:Gr,mh=Os?Gr:zi;Ay(K,ti,1,{_chunkSteps:XO=>{y(()=>{it=!1,At=!1;let ZO=Os?tn:Ht;if(Os?Ht:tn)ZO||ln(Sa._readableStreamController,XO);else{let e9e;try{e9e=Ne(XO)}catch(Lbe){nr(Sa._readableStreamController,Lbe),nr(mh._readableStreamController,Lbe),gs(ym(M,Lbe));return}ZO||ln(Sa._readableStreamController,XO),Bn(mh._readableStreamController,e9e)}we=!1,it?J0():At&&bm()})},_closeSteps:XO=>{we=!1;let ZO=Os?tn:Ht,TY=Os?Ht:tn;ZO||vn(Sa._readableStreamController),TY||vn(mh._readableStreamController),XO!==void 0&&(ZO||ln(Sa._readableStreamController,XO),!TY&&mh._readableStreamController._pendingPullIntos.length>0&&ai(mh._readableStreamController,0)),(!ZO||!TY)&&gs(void 0)},_errorSteps:()=>{we=!1}})}function J0(){if(we)return it=!0,u(void 0);we=!0;let ti=mr(Gr._readableStreamController);return ti===null?zO():LC(ti._view,!1),u(void 0)}function bm(){if(we)return At=!0,u(void 0);we=!0;let ti=mr(zi._readableStreamController);return ti===null?zO():LC(ti._view,!0),u(void 0)}function df(ti){if(Ht=!0,Xn=ti,tn){let Os=qt([Xn,Ii]),Sa=ym(M,Os);gs(Sa)}return ra}function Bg(ti){if(tn=!0,Ii=ti,Ht){let Os=qt([Xn,Ii]),Sa=ym(M,Os);gs(Sa)}return ra}function X0(){}return Gr=bE(X0,J0,df),zi=bE(X0,bm,Bg),Sy(K),[Gr,zi]}function mY(M){return n(M)&&typeof M.getReader<"u"}function ac(M){return mY(M)?NC(M.getReader()):_y(M)}function _y(M){let K,we=pt(M,"async"),it=e;function At(){let tn;try{tn=ft(we)}catch(Ii){return l(Ii)}let Xn=u(tn);return f(Xn,Ii=>{if(!n(Ii))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(nt(Ii))V0(K._readableStreamController);else{let zi=kt(Ii);PC(K._readableStreamController,zi)}})}function Ht(tn){let Xn=we.iterator,Ii;try{Ii=mt(Xn,"return")}catch(gs){return l(gs)}if(Ii===void 0)return u(void 0);let Gr;try{Gr=b(Ii,Xn,[tn])}catch(gs){return l(gs)}let zi=u(Gr);return f(zi,gs=>{if(!n(gs))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return K=yE(it,At,Ht,0),K}function NC(M){let K,we=e;function it(){let Ht;try{Ht=M.read()}catch(tn){return l(tn)}return f(Ht,tn=>{if(!n(tn))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(tn.done)V0(K._readableStreamController);else{let Xn=tn.value;PC(K._readableStreamController,Xn)}})}function At(Ht){try{return u(M.cancel(Ht))}catch(tn){return l(tn)}}return K=yE(we,it,At,0),K}function Mg(M,K){ne(M,K);let we=M,it=we?.autoAllocateChunkSize,At=we?.cancel,Ht=we?.pull,tn=we?.start,Xn=we?.type;return{autoAllocateChunkSize:it===void 0?void 0:Se(it,`${K} has member 'autoAllocateChunkSize' that`),cancel:At===void 0?void 0:K0(At,we,`${K} has member 'cancel' that`),pull:Ht===void 0?void 0:fY(Ht,we,`${K} has member 'pull' that`),start:tn===void 0?void 0:hY(tn,we,`${K} has member 'start' that`),type:Xn===void 0?void 0:OC(Xn,`${K} has member 'type' that`)}}function K0(M,K,we){return ce(M,we),it=>E(M,K,[it])}function fY(M,K,we){return ce(M,we),it=>E(M,K,[it])}function hY(M,K,we){return ce(M,we),it=>b(M,K,[it])}function OC(M,K){if(M=`${M}`,M!=="bytes")throw new TypeError(`${K} '${M}' is not a valid enumeration value for ReadableStreamType`);return M}function O3(M,K){return ne(M,K),{preventCancel:!!M?.preventCancel}}function gY(M,K){ne(M,K);let we=M?.preventAbort,it=M?.preventCancel,At=M?.preventClose,Ht=M?.signal;return Ht!==void 0&&AY(Ht,`${K} has member 'signal' that`),{preventAbort:!!we,preventCancel:!!it,preventClose:!!At,signal:Ht}}function AY(M,K){if(!ch(M))throw new TypeError(`${K} is not an AbortSignal.`)}function Dbe(M,K){ne(M,K);let we=M?.readable;j(we,"readable","ReadableWritablePair"),pe(we,`${K} has member 'readable' that`);let it=M?.writable;return j(it,"writable","ReadableWritablePair"),jl(it,`${K} has member 'writable' that`),{readable:we,writable:it}}class Xu{constructor(K={},we={}){K===void 0?K=null:z(K,"First parameter");let it=gm(we,"Second parameter"),At=Mg(K,"First parameter");if(D3(this),At.type==="bytes"){if(it.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let Ht=Eu(it,0);yr(this,At,Ht)}else{let Ht=Ua(it),tn=Eu(it,1);uY(this,At,tn,Ht)}}get locked(){if(!EE(this))throw xE("locked");return _E(this)}cancel(K=void 0){return EE(this)?_E(this)?l(new TypeError("Cannot cancel a stream that already has a reader")):ym(this,K):l(xE("cancel"))}getReader(K=void 0){if(!EE(this))throw xE("getReader");return br(K,"First parameter").mode===void 0?ge(this):Ku(this)}pipeThrough(K,we={}){if(!EE(this))throw xE("pipeThrough");ee(K,1,"pipeThrough");let it=Dbe(K,"First parameter"),At=gY(we,"Second parameter");if(_E(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(ke(it.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let Ht=N3(this,it.writable,At.preventClose,At.preventAbort,At.preventCancel,At.signal);return A(Ht),it.readable}pipeTo(K,we={}){if(!EE(this))return l(xE("pipeTo"));if(K===void 0)return l("Parameter 1 is required in 'pipeTo'.");if(!ae(K))return l(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let it;try{it=gY(we,"Second parameter")}catch(At){return l(At)}return _E(this)?l(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):ke(K)?l(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):N3(this,K,it.preventClose,it.preventAbort,it.preventCancel,it.signal)}tee(){if(!EE(this))throw xE("tee");let K=Obe(this);return qt(K)}values(K=void 0){if(!EE(this))throw xE("values");let we=O3(K,"First parameter");return Ut(this,we.preventCancel)}[et](K){return this.values(K)}static from(K){return ac(K)}}Object.defineProperties(Xu,{from:{enumerable:!0}}),Object.defineProperties(Xu.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),i(Xu.from,"from"),i(Xu.prototype.cancel,"cancel"),i(Xu.prototype.getReader,"getReader"),i(Xu.prototype.pipeThrough,"pipeThrough"),i(Xu.prototype.pipeTo,"pipeTo"),i(Xu.prototype.tee,"tee"),i(Xu.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Xu.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Xu.prototype,et,{value:Xu.prototype.values,writable:!0,configurable:!0});function yE(M,K,we,it=1,At=()=>1){let Ht=Object.create(Xu.prototype);D3(Ht);let tn=Object.create(Ey.prototype);return pR(Ht,tn,M,K,we,it,At),Ht}function bE(M,K,we){let it=Object.create(Xu.prototype);D3(it);let At=Object.create(yn.prototype);return fs(it,At,M,K,we,0,void 0),it}function D3(M){M._state="readable",M._reader=void 0,M._storedError=void 0,M._disturbed=!1}function EE(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_readableStreamController")?!1:M instanceof Xu}function _E(M){return M._reader!==void 0}function ym(M,K){if(M._disturbed=!0,M._state==="closed")return u(void 0);if(M._state==="errored")return l(M._storedError);Y0(M);let we=M._reader;if(we!==void 0&&qp(we)){let At=we._readIntoRequests;we._readIntoRequests=new x,At.forEach(Ht=>{Ht._closeSteps(void 0)})}let it=M._readableStreamController[v](K);return f(it,e)}function Y0(M){M._state="closed";let K=M._reader;if(K!==void 0&&(be(K),qe(K))){let we=K._readRequests;K._readRequests=new x,we.forEach(it=>{it._closeSteps()})}}function yY(M,K){M._state="errored",M._storedError=K;let we=M._reader;we!==void 0&&(q(we,K),qe(we)?at(we,K):Hc(we,K))}function xE(M){return new TypeError(`ReadableStream.prototype.${M} can only be used on a ReadableStream`)}function C(M,K){ne(M,K);let we=M?.highWaterMark;return j(we,"highWaterMark","QueuingStrategyInit"),{highWaterMark:X(we)}}let D=M=>M.byteLength;i(D,"size");class V{constructor(K){ee(K,1,"ByteLengthQueuingStrategy"),K=C(K,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=K.highWaterMark}get highWaterMark(){if(!Pe(this))throw ue("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Pe(this))throw ue("size");return D}}Object.defineProperties(V.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(V.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function ue(M){return new TypeError(`ByteLengthQueuingStrategy.prototype.${M} can only be used on a ByteLengthQueuingStrategy`)}function Pe(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_byteLengthQueuingStrategyHighWaterMark")?!1:M instanceof V}let Ve=()=>1;i(Ve,"size");class Je{constructor(K){ee(K,1,"CountQueuingStrategy"),K=C(K,"First parameter"),this._countQueuingStrategyHighWaterMark=K.highWaterMark}get highWaterMark(){if(!Lt(this))throw ot("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Lt(this))throw ot("size");return Ve}}Object.defineProperties(Je.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Je.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ot(M){return new TypeError(`CountQueuingStrategy.prototype.${M} can only be used on a CountQueuingStrategy`)}function Lt(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_countQueuingStrategyHighWaterMark")?!1:M instanceof Je}function nn(M,K){ne(M,K);let we=M?.cancel,it=M?.flush,At=M?.readableType,Ht=M?.start,tn=M?.transform,Xn=M?.writableType;return{cancel:we===void 0?void 0:Hr(we,M,`${K} has member 'cancel' that`),flush:it===void 0?void 0:Xt(it,M,`${K} has member 'flush' that`),readableType:At,start:Ht===void 0?void 0:Rn(Ht,M,`${K} has member 'start' that`),transform:tn===void 0?void 0:_n(tn,M,`${K} has member 'transform' that`),writableType:Xn}}function Xt(M,K,we){return ce(M,we),it=>E(M,K,[it])}function Rn(M,K,we){return ce(M,we),it=>b(M,K,[it])}function _n(M,K,we){return ce(M,we),(it,At)=>E(M,K,[it,At])}function Hr(M,K,we){return ce(M,we),it=>E(M,K,[it])}class Ts{constructor(K={},we={},it={}){K===void 0&&(K=null);let At=gm(we,"Second parameter"),Ht=gm(it,"Third parameter"),tn=nn(K,"First parameter");if(tn.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(tn.writableType!==void 0)throw new RangeError("Invalid writableType specified");let Xn=Eu(Ht,0),Ii=Ua(Ht),Gr=Eu(At,1),zi=Ua(At),gs,ra=c(Sy=>{gs=Sy});Cl(this,ra,Gr,zi,Xn,Ii),bY(this,tn),tn.start!==void 0?gs(tn.start(this._transformStreamController)):gs(void 0)}get readable(){if(!Yi(this))throw ZKe("readable");return this._readable}get writable(){if(!Yi(this))throw ZKe("writable");return this._writable}}Object.defineProperties(Ts.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ts.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function Cl(M,K,we,it,At,Ht){function tn(){return K}function Xn(ra){return MC(M,ra)}function Ii(ra){return _Y(M,ra)}function Gr(){return xY(M)}M._writable=P(tn,Xn,Gr,Ii,we,it);function zi(){return SY(M)}function gs(ra){return o1n(M,ra)}M._readable=yE(tn,zi,gs,At,Ht),M._backpressure=void 0,M._backpressureChangePromise=void 0,M._backpressureChangePromise_resolve=void 0,DC(M,!0),M._transformStreamController=void 0}function Yi(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_transformStreamController")?!1:M instanceof Ts}function Ns(M,K){ph(M._readable._readableStreamController,K),Ti(M,K)}function Ti(M,K){dR(M._transformStreamController),oc(M._writable._writableStreamController,K),xy(M)}function xy(M){M._backpressure&&DC(M,!1)}function DC(M,K){M._backpressureChangePromise!==void 0&&M._backpressureChangePromise_resolve(),M._backpressureChangePromise=c(we=>{M._backpressureChangePromise_resolve=we}),M._backpressure=K}class Lg{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!z0(this))throw CY("desiredSize");let K=this._controlledTransformStream._readable._readableStreamController;return Fi(K)}enqueue(K=void 0){if(!z0(this))throw CY("enqueue");EY(this,K)}error(K=void 0){if(!z0(this))throw CY("error");mR(this,K)}terminate(){if(!z0(this))throw CY("terminate");XKe(this)}}Object.defineProperties(Lg.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),i(Lg.prototype.enqueue,"enqueue"),i(Lg.prototype.error,"error"),i(Lg.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Lg.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function z0(M){return!n(M)||!Object.prototype.hasOwnProperty.call(M,"_controlledTransformStream")?!1:M instanceof Lg}function KO(M,K,we,it,At){K._controlledTransformStream=M,M._transformStreamController=K,K._transformAlgorithm=we,K._flushAlgorithm=it,K._cancelAlgorithm=At,K._finishPromise=void 0,K._finishPromise_resolve=void 0,K._finishPromise_reject=void 0}function bY(M,K){let we=Object.create(Lg.prototype),it,At,Ht;K.transform!==void 0?it=tn=>K.transform(tn,we):it=tn=>{try{return EY(we,tn),u(void 0)}catch(Xn){return l(Xn)}},K.flush!==void 0?At=()=>K.flush(we):At=()=>u(void 0),K.cancel!==void 0?Ht=tn=>K.cancel(tn):Ht=()=>u(void 0),KO(M,we,it,At,Ht)}function dR(M){M._transformAlgorithm=void 0,M._flushAlgorithm=void 0,M._cancelAlgorithm=void 0}function EY(M,K){let we=M._controlledTransformStream,it=we._readable._readableStreamController;if(!dh(it))throw new TypeError("Readable side is not in a state that permits enqueue");try{PC(it,K)}catch(Ht){throw Ti(we,Ht),we._readable._storedError}lY(it)!==we._backpressure&&DC(we,!0)}function mR(M,K){Ns(M._controlledTransformStream,K)}function M3(M,K){let we=M._transformAlgorithm(K);return f(we,void 0,it=>{throw Ns(M._controlledTransformStream,it),it})}function XKe(M){let K=M._controlledTransformStream,we=K._readable._readableStreamController;V0(we);let it=new TypeError("TransformStream terminated");Ti(K,it)}function MC(M,K){let we=M._transformStreamController;if(M._backpressure){let it=M._backpressureChangePromise;return f(it,()=>{let At=M._writable;if(At._state==="erroring")throw At._storedError;return M3(we,K)})}return M3(we,K)}function _Y(M,K){let we=M._transformStreamController;if(we._finishPromise!==void 0)return we._finishPromise;let it=M._readable;we._finishPromise=c((Ht,tn)=>{we._finishPromise_resolve=Ht,we._finishPromise_reject=tn});let At=we._cancelAlgorithm(K);return dR(we),d(At,()=>(it._state==="errored"?YO(we,it._storedError):(ph(it._readableStreamController,K),Mbe(we)),null),Ht=>(ph(it._readableStreamController,Ht),YO(we,Ht),null)),we._finishPromise}function xY(M){let K=M._transformStreamController;if(K._finishPromise!==void 0)return K._finishPromise;let we=M._readable;K._finishPromise=c((At,Ht)=>{K._finishPromise_resolve=At,K._finishPromise_reject=Ht});let it=K._flushAlgorithm();return dR(K),d(it,()=>(we._state==="errored"?YO(K,we._storedError):(V0(we._readableStreamController),Mbe(K)),null),At=>(ph(we._readableStreamController,At),YO(K,At),null)),K._finishPromise}function SY(M){return DC(M,!1),M._backpressureChangePromise}function o1n(M,K){let we=M._transformStreamController;if(we._finishPromise!==void 0)return we._finishPromise;let it=M._writable;we._finishPromise=c((Ht,tn)=>{we._finishPromise_resolve=Ht,we._finishPromise_reject=tn});let At=we._cancelAlgorithm(K);return dR(we),d(At,()=>(it._state==="errored"?YO(we,it._storedError):(oc(it._writableStreamController,K),xy(M),Mbe(we)),null),Ht=>(oc(it._writableStreamController,Ht),xy(M),YO(we,Ht),null)),we._finishPromise}function CY(M){return new TypeError(`TransformStreamDefaultController.prototype.${M} can only be used on a TransformStreamDefaultController`)}function Mbe(M){M._finishPromise_resolve!==void 0&&(M._finishPromise_resolve(),M._finishPromise_resolve=void 0,M._finishPromise_reject=void 0)}function YO(M,K){M._finishPromise_reject!==void 0&&(A(M._finishPromise),M._finishPromise_reject(K),M._finishPromise_resolve=void 0,M._finishPromise_reject=void 0)}function ZKe(M){return new TypeError(`TransformStream.prototype.${M} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=V,t.CountQueuingStrategy=Je,t.ReadableByteStreamController=yn,t.ReadableStream=Xu,t.ReadableStreamBYOBReader=Yu,t.ReadableStreamBYOBRequest=fn,t.ReadableStreamDefaultController=Ey,t.ReadableStreamDefaultReader=Y,t.TransformStream=Ts,t.TransformStreamDefaultController=Lg,t.WritableStream=g,t.WritableStreamDefaultController=Us,t.WritableStreamDefaultWriter=Q}))});var qTt=me(()=>{if(!globalThis.ReadableStream)try{let t=tt("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,tt("node:stream/web")),t.emitWarning=e}catch(n){throw t.emitWarning=e,n}}catch{Object.assign(globalThis,GTt())}try{let{Blob:t}=tt("buffer");t&&!t.prototype.stream&&(t.prototype.stream=function(n){let r=0,i=this;return new ReadableStream({type:"bytes",async pull(s){let a=await i.slice(r,Math.min(i.size,r+65536)).arrayBuffer();r+=a.byteLength,s.enqueue(new Uint8Array(a)),r===i.size&&s.close()}})})}catch{}});async function*oPe(t,e=!0){for(let n of t)if("stream"in n)yield*n.stream();else if(ArrayBuffer.isView(n))if(e){let r=n.byteOffset,i=n.byteOffset+n.byteLength;for(;r!==i;){let s=Math.min(i-r,WTt),o=n.buffer.slice(r,r+s);r+=o.byteLength,yield new Uint8Array(o)}}else yield n;else{let r=0,i=n;for(;r!==i.size;){let o=await i.slice(r,Math.min(i.size,r+WTt)).arrayBuffer();r+=o.byteLength,yield new Uint8Array(o)}}}var ohs,WTt,HTt,htr,ab,F4=H(()=>{ohs=jr(qTt(),1);WTt=65536;HTt=class aPe{#e=[];#t="";#n=0;#r="transparent";constructor(e=[],n={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof n!="object"&&typeof n!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");n===null&&(n={});let r=new TextEncoder;for(let s of e){let o;ArrayBuffer.isView(s)?o=new Uint8Array(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)):s instanceof ArrayBuffer?o=new Uint8Array(s.slice(0)):s instanceof aPe?o=s:o=r.encode(`${s}`),this.#n+=ArrayBuffer.isView(o)?o.byteLength:o.size,this.#e.push(o)}this.#r=`${n.endings===void 0?"transparent":n.endings}`;let i=n.type===void 0?"":String(n.type);this.#t=/^[\x20-\x7E]*$/.test(i)?i:""}get size(){return this.#n}get type(){return this.#t}async text(){let e=new TextDecoder,n="";for await(let r of oPe(this.#e,!1))n+=e.decode(r,{stream:!0});return n+=e.decode(),n}async arrayBuffer(){let e=new Uint8Array(this.size),n=0;for await(let r of oPe(this.#e,!1))e.set(r,n),n+=r.length;return e.buffer}stream(){let e=oPe(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(n){let r=await e.next();r.done?n.close():n.enqueue(r.value)},async cancel(){await e.return()}})}slice(e=0,n=this.size,r=""){let{size:i}=this,s=e<0?Math.max(i+e,0):Math.min(e,i),o=n<0?Math.max(i+n,0):Math.min(n,i),a=Math.max(o-s,0),c=this.#e,u=[],l=0;for(let d of c){if(l>=a)break;let m=ArrayBuffer.isView(d)?d.byteLength:d.size;if(s&&m<=s)s-=m,o-=m;else{let h;ArrayBuffer.isView(d)?(h=d.subarray(s,Math.min(m,o)),l+=h.byteLength):(h=d.slice(s,Math.min(m,o)),l+=h.size),o-=m,u.push(h),s=0}}let p=new aPe([],{type:String(r).toLowerCase()});return p.#n=a,p.#e=u,p}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(HTt.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});htr=HTt,ab=htr});var gtr,Atr,hI,cPe=H(()=>{F4();gtr=class extends ab{#e=0;#t="";constructor(e,n,r={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,r),r===null&&(r={});let i=r.lastModified===void 0?Date.now():Number(r.lastModified);Number.isNaN(i)||(this.#e=i),this.#t=String(n)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof ab&&/^(File)$/.test(e[Symbol.toStringTag])}},Atr=gtr,hI=Atr});function KTt(t,e=ab){var n=`${jTt()}${jTt()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),r=[],i=`--${n}\r
154
154
  Content-Disposition: form-data; name="`;return t.forEach((s,o)=>typeof s=="string"?r.push(i+lPe(o)+`"\r
155
155
  \r
156
156
  ${s.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
@@ -388,18 +388,18 @@ ${t.stack}`:r}var Qu=0,Wme=null;function i$(){return(Wme===null||Wme.byteLength=
388
388
  `+" ".repeat(Qe)),new Array(W).fill(0).map((Ne,Qe)=>"\r"+" ".repeat(Qe)),new Array(W).fill(0).map((Ne,Qe)=>`\r
389
389
  `+" ".repeat(Qe)),(function(Ne){Ne.DEFAULT={allowTrailingComma:!1}})(re||(re={})),c(q,"parse$1"),c(oe,"visit"),(function(Ne){Ne[Ne.None=0]="None",Ne[Ne.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",Ne[Ne.UnexpectedEndOfString=2]="UnexpectedEndOfString",Ne[Ne.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",Ne[Ne.InvalidUnicode=4]="InvalidUnicode",Ne[Ne.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",Ne[Ne.InvalidCharacter=6]="InvalidCharacter"})(ie||(ie={})),(function(Ne){Ne[Ne.OpenBraceToken=1]="OpenBraceToken",Ne[Ne.CloseBraceToken=2]="CloseBraceToken",Ne[Ne.OpenBracketToken=3]="OpenBracketToken",Ne[Ne.CloseBracketToken=4]="CloseBracketToken",Ne[Ne.CommaToken=5]="CommaToken",Ne[Ne.ColonToken=6]="ColonToken",Ne[Ne.NullKeyword=7]="NullKeyword",Ne[Ne.TrueKeyword=8]="TrueKeyword",Ne[Ne.FalseKeyword=9]="FalseKeyword",Ne[Ne.StringLiteral=10]="StringLiteral",Ne[Ne.NumericLiteral=11]="NumericLiteral",Ne[Ne.LineCommentTrivia=12]="LineCommentTrivia",Ne[Ne.BlockCommentTrivia=13]="BlockCommentTrivia",Ne[Ne.LineBreakTrivia=14]="LineBreakTrivia",Ne[Ne.Trivia=15]="Trivia",Ne[Ne.Unknown=16]="Unknown",Ne[Ne.EOF=17]="EOF"})(te||(te={}));let be=q;var De;(function(Ne){Ne[Ne.InvalidSymbol=1]="InvalidSymbol",Ne[Ne.InvalidNumberFormat=2]="InvalidNumberFormat",Ne[Ne.PropertyNameExpected=3]="PropertyNameExpected",Ne[Ne.ValueExpected=4]="ValueExpected",Ne[Ne.ColonExpected=5]="ColonExpected",Ne[Ne.CommaExpected=6]="CommaExpected",Ne[Ne.CloseBraceExpected=7]="CloseBraceExpected",Ne[Ne.CloseBracketExpected=8]="CloseBracketExpected",Ne[Ne.EndOfFileExpected=9]="EndOfFileExpected",Ne[Ne.InvalidCommentToken=10]="InvalidCommentToken",Ne[Ne.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",Ne[Ne.UnexpectedEndOfString=12]="UnexpectedEndOfString",Ne[Ne.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",Ne[Ne.InvalidUnicode=14]="InvalidUnicode",Ne[Ne.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",Ne[Ne.InvalidCharacter=16]="InvalidCharacter"})(De||(De={}));let Re=c((Ne,Qe)=>be(E(Qe,Ne,"utf8")),"readJsonc"),Ie=Symbol("implicitBaseUrl"),ne="${configDir}",ce=c(()=>{let{findPnpApi:Ne}=p;return Ne&&Ne(process.cwd())},"getPnpApi"),se=c((Ne,Qe,lt,Ge)=>{let Ct=`resolveFromPackageJsonPath:${Ne}:${Qe}:${lt}`;if(Ge!=null&&Ge.has(Ct))return Ge.get(Ct);let Nt=Re(Ne,Ge);if(!Nt)return;let wt=Qe||"tsconfig.json";if(!lt&&Nt.exports)try{let[hn]=d.resolveExports(Nt.exports,Qe,["require","types"]);wt=hn}catch{return!1}else!Qe&&Nt.tsconfig&&(wt=Nt.tsconfig);return wt=u.join(Ne,"..",wt),Ge?.set(Ct,wt),wt},"resolveFromPackageJsonPath"),z="package.json",ee="tsconfig.json",j=c((Ne,Qe,lt)=>{let Ge=Ne;if(Ne===".."&&(Ge=u.join(Ge,ee)),Ne[0]==="."&&(Ge=u.resolve(Qe,Ge)),u.isAbsolute(Ge)){if(b(lt,Ge)){if(_(lt,Ge).isFile())return Ge}else if(!Ge.endsWith(".json")){let cn=`${Ge}.json`;if(b(lt,cn))return cn}return}let[Ct,...Nt]=Ne.split("/"),wt=Ct[0]==="@"?`${Ct}/${Nt.shift()}`:Ct,hn=Nt.join("/"),fn=ce();if(fn){let{resolveRequest:cn}=fn;try{if(wt===Ne){let oi=cn(u.join(wt,z),Qe);if(oi){let Qr=se(oi,hn,!1,lt);if(Qr&&b(lt,Qr))return Qr}}else{let oi;try{oi=cn(Ne,Qe,{extensions:[".json"]})}catch{oi=cn(u.join(Ne,ee),Qe)}if(oi)return oi}}catch{}}let yn=x(u.resolve(Qe),u.join("node_modules",wt),lt);if(!yn||!_(lt,yn).isDirectory())return;let zn=u.join(yn,z);if(b(lt,zn)){let cn=se(zn,hn,!1,lt);if(cn===!1)return;if(cn&&b(lt,cn)&&_(lt,cn).isFile())return cn}let qn=u.join(yn,hn),Yr=qn.endsWith(".json");if(!Yr){let cn=`${qn}.json`;if(b(lt,cn))return cn}if(b(lt,qn)){if(_(lt,qn).isDirectory()){let cn=u.join(qn,z);if(b(lt,cn)){let Qr=se(cn,"",!0,lt);if(Qr&&b(lt,Qr))return Qr}let oi=u.join(qn,ee);if(b(lt,oi))return oi}else if(Yr)return qn}},"resolveExtendsPath"),X=c((Ne,Qe)=>T(u.relative(Ne,Qe)),"pathRelative"),le=["files","include","exclude"],xe=c((Ne,Qe,lt)=>{let Ge=u.join(Qe,lt);return A(u.relative(Ne,Ge))||"./"},"resolveAndRelativize"),Se=c((Ne,Qe,lt)=>{let Ge=u.relative(Ne,Qe);return Ge?A(`${Ge}/${lt.startsWith("./")?lt.slice(2):lt}`):lt},"prefixPattern"),pe=c((Ne,Qe,lt,Ge)=>{let Ct=j(Ne,Qe,Ge);if(!Ct)throw new Error(`File '${Ne}' not found.`);if(lt.has(Ct))throw new Error(`Circularity detected while resolving configuration: ${Ct}`);lt.add(Ct);let Nt=u.dirname(Ct),wt=Te(Ct,Ge,lt);delete wt.references;let{compilerOptions:hn}=wt;if(hn){let{baseUrl:fn}=hn;fn&&!fn.startsWith(ne)&&(hn.baseUrl=xe(Qe,Nt,fn));let{outDir:yn}=hn;yn&&!yn.startsWith(ne)&&(hn.outDir=xe(Qe,Nt,yn));let{declarationDir:zn}=hn;zn&&!zn.startsWith(ne)&&(hn.declarationDir=xe(Qe,Nt,zn));let{rootDir:qn}=hn;qn&&!qn.startsWith(ne)&&(hn.rootDir=xe(Qe,Nt,qn));let{rootDirs:Yr}=hn;Yr&&(hn.rootDirs=Yr.map(oi=>oi.startsWith(ne)?oi:xe(Qe,Nt,oi)));let{typeRoots:cn}=hn;cn&&(hn.typeRoots=cn.map(oi=>oi.startsWith(ne)?oi:xe(Qe,Nt,oi)))}for(let fn of le){let yn=wt[fn];yn&&(wt[fn]=yn.map(zn=>zn.startsWith(ne)?zn:Se(Qe,Nt,zn)))}return wt},"resolveExtends"),ge=["outDir","declarationDir"],Te=c((Ne,Qe,lt=new Set)=>{let Ge;try{Ge=Re(Ne,Qe)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${Ne}`)}if(typeof Ge!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${Ne}`);let Ct=u.dirname(Ne);if(Ge.compilerOptions){let{compilerOptions:Nt}=Ge;Nt.paths&&!Nt.baseUrl&&(Nt[Ie]=Ct)}if(Ge.extends){let Nt=Array.isArray(Ge.extends)?Ge.extends:[Ge.extends];delete Ge.extends;for(let wt of Nt.reverse()){let hn=pe(wt,Ct,new Set(lt),Qe),fn={...hn,...Ge,compilerOptions:{...hn.compilerOptions,...Ge.compilerOptions}};hn.watchOptions&&(fn.watchOptions={...hn.watchOptions,...Ge.watchOptions}),Ge=fn}}if(Ge.compilerOptions){let{compilerOptions:Nt}=Ge,wt=["baseUrl","rootDir"];for(let hn of wt){let fn=Nt[hn];if(fn&&!fn.startsWith(ne)){let yn=u.resolve(Ct,fn),zn=X(Ct,yn);Nt[hn]=zn}}for(let hn of ge){let fn=Nt[hn];fn&&(Array.isArray(Ge.exclude)||(Ge.exclude=ge.map(yn=>Nt[yn]).filter(Boolean)),fn.startsWith(ne)||(fn=T(fn)),Nt[hn]=fn)}}else Ge.compilerOptions={};if(Ge.include&&(Ge.include=Ge.include.map(A)),Ge.files&&(Ge.files=Ge.files.map(Nt=>Nt.startsWith(ne)?Nt:T(Nt))),Ge.watchOptions){let{watchOptions:Nt}=Ge;Nt.excludeDirectories&&(Nt.excludeDirectories=Nt.excludeDirectories.map(wt=>A(u.resolve(Ct,wt)))),Nt.excludeFiles&&(Nt.excludeFiles=Nt.excludeFiles.map(wt=>A(u.resolve(Ct,wt)))),Nt.watchFile&&(Nt.watchFile=Nt.watchFile.toLowerCase()),Nt.watchDirectory&&(Nt.watchDirectory=Nt.watchDirectory.toLowerCase()),Nt.fallbackPolling&&(Nt.fallbackPolling=Nt.fallbackPolling.toLowerCase())}return Ge},"_parseTsconfig"),Ee=c((Ne,Qe)=>{if(Ne.startsWith(ne))return A(u.join(Qe,Ne.slice(12)))},"interpolateConfigDir"),ve=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],ye=c(Ne=>{if(Ne.strict){let Qe=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(let lt of Qe)Ne[lt]===void 0&&(Ne[lt]=!0)}if(Ne.composite&&(Ne.declaration!=null||(Ne.declaration=!0),Ne.incremental!=null||(Ne.incremental=!0)),Ne.target){let Qe=Ne.target.toLowerCase();Qe==="es2015"&&(Qe="es6"),Ne.target=Qe,Qe==="esnext"&&(Ne.module!=null||(Ne.module="es6"),Ne.useDefineForClassFields!=null||(Ne.useDefineForClassFields=!0)),(Qe==="es6"||Qe==="es2016"||Qe==="es2017"||Qe==="es2018"||Qe==="es2019"||Qe==="es2020"||Qe==="es2021"||Qe==="es2022"||Qe==="es2023"||Qe==="es2024")&&(Ne.module!=null||(Ne.module="es6")),(Qe==="es2022"||Qe==="es2023"||Qe==="es2024")&&(Ne.useDefineForClassFields!=null||(Ne.useDefineForClassFields=!0))}if(Ne.module){let Qe=Ne.module.toLowerCase();if(Qe==="es2015"&&(Qe="es6"),Ne.module=Qe,(Qe==="es6"||Qe==="es2020"||Qe==="es2022"||Qe==="esnext"||Qe==="none"||Qe==="system"||Qe==="umd"||Qe==="amd")&&(Ne.moduleResolution!=null||(Ne.moduleResolution="classic")),Qe==="system"&&(Ne.allowSyntheticDefaultImports!=null||(Ne.allowSyntheticDefaultImports=!0)),(Qe==="node16"||Qe==="node18"||Qe==="node20"||Qe==="nodenext"||Qe==="preserve")&&(Ne.esModuleInterop!=null||(Ne.esModuleInterop=!0),Ne.allowSyntheticDefaultImports!=null||(Ne.allowSyntheticDefaultImports=!0)),(Qe==="node16"||Qe==="node18"||Qe==="node20"||Qe==="nodenext")&&(Ne.moduleDetection!=null||(Ne.moduleDetection="force")),Qe==="node16"&&(Ne.target!=null||(Ne.target="es2022"),Ne.moduleResolution!=null||(Ne.moduleResolution="node16")),Qe==="node18"&&(Ne.target!=null||(Ne.target="es2022"),Ne.moduleResolution!=null||(Ne.moduleResolution="node16")),Qe==="node20"&&(Ne.target!=null||(Ne.target="es2023"),Ne.moduleResolution!=null||(Ne.moduleResolution="node16"),Ne.resolveJsonModule!=null||(Ne.resolveJsonModule=!0)),Qe==="nodenext"&&(Ne.target!=null||(Ne.target="esnext"),Ne.moduleResolution!=null||(Ne.moduleResolution="nodenext"),Ne.resolveJsonModule!=null||(Ne.resolveJsonModule=!0)),Qe==="node16"||Qe==="node18"||Qe==="node20"||Qe==="nodenext"){let lt=Ne.target;(lt==="es3"||lt==="es2022"||lt==="es2023"||lt==="es2024"||lt==="esnext")&&(Ne.useDefineForClassFields!=null||(Ne.useDefineForClassFields=!0))}Qe==="preserve"&&(Ne.moduleResolution!=null||(Ne.moduleResolution="bundler"))}if(Ne.moduleResolution){let Qe=Ne.moduleResolution.toLowerCase();Qe==="node"&&(Qe="node10"),Ne.moduleResolution=Qe,(Qe==="node16"||Qe==="nodenext"||Qe==="bundler")&&(Ne.resolvePackageJsonExports!=null||(Ne.resolvePackageJsonExports=!0),Ne.resolvePackageJsonImports!=null||(Ne.resolvePackageJsonImports=!0)),Qe==="bundler"&&(Ne.allowSyntheticDefaultImports!=null||(Ne.allowSyntheticDefaultImports=!0),Ne.resolveJsonModule!=null||(Ne.resolveJsonModule=!0))}Ne.jsx&&(Ne.jsx=Ne.jsx.toLowerCase()),Ne.moduleDetection&&(Ne.moduleDetection=Ne.moduleDetection.toLowerCase()),Ne.importsNotUsedAsValues&&(Ne.importsNotUsedAsValues=Ne.importsNotUsedAsValues.toLowerCase()),Ne.newLine&&(Ne.newLine=Ne.newLine.toLowerCase()),Ne.esModuleInterop&&(Ne.allowSyntheticDefaultImports!=null||(Ne.allowSyntheticDefaultImports=!0)),Ne.verbatimModuleSyntax&&(Ne.isolatedModules!=null||(Ne.isolatedModules=!0),Ne.preserveConstEnums!=null||(Ne.preserveConstEnums=!0)),Ne.isolatedModules&&(Ne.preserveConstEnums!=null||(Ne.preserveConstEnums=!0)),Ne.rewriteRelativeImportExtensions&&(Ne.allowImportingTsExtensions!=null||(Ne.allowImportingTsExtensions=!0)),Ne.lib&&(Ne.lib=Ne.lib.map(Qe=>Qe.toLowerCase())),Ne.checkJs&&(Ne.allowJs!=null||(Ne.allowJs=!0))},"normalizeCompilerOptions"),Y=c((Ne,Qe=new Map)=>{let lt=u.resolve(Ne),Ge=Te(lt,Qe),Ct=u.dirname(lt),{compilerOptions:Nt}=Ge;if(Nt){for(let hn of ve){let fn=Nt[hn];if(fn){let yn=Ee(fn,Ct);Nt[hn]=yn?X(Ct,yn):fn}}for(let hn of["rootDirs","typeRoots"]){let fn=Nt[hn];fn&&(Nt[hn]=fn.map(yn=>{let zn=Ee(yn,Ct);return zn?X(Ct,zn):T(yn)}))}let{paths:wt}=Nt;if(wt)for(let hn of Object.keys(wt))wt[hn]=wt[hn].map(fn=>{var yn;return(yn=Ee(fn,Ct))!=null?yn:fn});ye(Nt)}for(let wt of le){let hn=Ge[wt];hn&&(Ge[wt]=hn.map(fn=>{var yn;return(yn=Ee(fn,Ct))!=null?yn:fn}))}return Ge},"parseTsconfig");var qe=Object.defineProperty,He=c((Ne,Qe)=>qe(Ne,"name",{value:Qe,configurable:!0}),"s");let dt=He(Ne=>{let Qe="";for(let lt=0;lt<Ne.length;lt+=1){let Ge=Ne[lt],Ct=Ge.toUpperCase();Qe+=Ge===Ct?Ge.toLowerCase():Ct}return Qe},"invertCase"),at=new Map,ze=He((Ne,Qe)=>{let lt=f.join(Ne,`.is-fs-case-sensitive-test-${process.pid}`);try{return Qe.writeFileSync(lt,""),!Qe.existsSync(dt(lt))}finally{try{Qe.unlinkSync(lt)}catch{}}},"checkDirectoryCaseWithWrite"),rt=He((Ne,Qe,lt)=>{try{return ze(Ne,lt)}catch(Ge){if(Qe===void 0)return ze(h.tmpdir(),lt);throw Ge}},"checkDirectoryCaseWithFallback"),_t=He((Ne,Qe=m,lt=!0)=>{let Ge=Ne??process.cwd();if(lt&&at.has(Ge))return at.get(Ge);let Ct,Nt=dt(Ge);return Ct=Nt!==Ge&&Qe.existsSync(Ge)?!Qe.existsSync(Nt):rt(Ge,Ne,Qe),lt&&at.set(Ge,Ct),Ct},"isFsCaseSensitive"),{join:Zt}=u.posix,Ut={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},$t=c(Ne=>{let Qe=[...Ut.ts],lt=[...Ut.cts],Ge=[...Ut.mts];return Ne!=null&&Ne.allowJs&&(Qe.push(".js",".jsx"),lt.push(".cjs"),Ge.push(".mjs")),[...Qe,...lt,...Ge]},"getSupportedExtensions"),Ot=c(Ne=>{let Qe=[];if(!Ne)return Qe;let{outDir:lt,declarationDir:Ge}=Ne;return lt&&Qe.push(lt),Ge&&Qe.push(Ge),Qe},"getDefaultExcludeSpec"),Ze=c(Ne=>Ne.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),Me=`(?!(${["node_modules","bower_components","jspm_packages"].join("|")})(/|$))`,Xe=/(?:^|\/)[^.*?]+$/,gt="**/*",qt="[^/]",sn="[^./]",mn=process.platform==="win32",Pn=c(({config:Ne,path:Qe},lt=_t())=>{if("extends"in Ne)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!u.isAbsolute(Qe))throw new Error("The tsconfig path must be absolute");mn&&(Qe=A(Qe));let Ge=u.dirname(Qe),{files:Ct,include:Nt,exclude:wt,compilerOptions:hn}=Ne,fn=c(Qr=>u.isAbsolute(Qr)?Qr:Zt(Ge,Qr),"resolvePattern"),yn=Ct?.map(fn),zn=$t(hn),qn=lt?"":"i",Yr=(wt||Ot(hn)).map(Qr=>{let kr=fn(Qr),Ys=Ze(kr).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${qt}*`).replaceAll(String.raw`\?`,qt);return new RegExp(`^${Ys}($|/)`,qn)}),cn=Ct||Nt?Nt:[gt],oi=cn?cn.map(Qr=>{let kr=fn(Qr);Xe.test(kr)&&(kr=Zt(kr,gt));let Ys=Ze(kr).replaceAll(String.raw`/\*\*`,`(/${Me}${sn}${qt}*)*?`).replaceAll(/(\/)?\\\*/g,(us,dn)=>{let Bi=`(${sn}|(\\.(?!min\\.js$))?)*`;return dn?`/${Me}${sn}${Bi}`:Bi}).replaceAll(/(\/)?\\\?/g,(us,dn)=>dn?`/${Me}${qt}`:qt);return new RegExp(`^${Ys}$`,qn)}):void 0;return Qr=>{if(!u.isAbsolute(Qr))throw new Error("filePath must be absolute");return mn&&(Qr=A(Qr)),yn!=null&&yn.includes(Qr)||zn.some(kr=>Qr.endsWith(kr))&&!Yr.some(kr=>kr.test(Qr))&&oi&&oi.some(kr=>kr.test(Qr))?Ne:void 0}},"createFilesMatcher"),je=c((Ne,Qe,lt)=>{let Ge=u.resolve(Ne),Ct=A(Ne);for(;;){let Nt=x(Ct,Qe,lt);if(!Nt)return;let wt=u.resolve(Nt),hn=Y(wt,lt),fn={path:A(wt),config:hn};if(Pn(fn)(Ge))return fn;let yn=u.dirname(Nt),zn=u.dirname(yn);if(zn===yn)return;Ct=zn}},"findConfigApplicable"),mt=c((Ne=process.cwd(),Qe="tsconfig.json",lt=new Map,Ge=!1)=>{var Ct;return Ge?(Ct=je(Ne,Qe,lt))==null?void 0:Ct.path:x(A(Ne),Qe,lt)},"findTsconfig"),Kt=c((Ne=process.cwd(),Qe="tsconfig.json",lt=new Map,Ge=!1)=>{var Ct;if(!Ge){let Nt=mt(Ne,Qe,lt);return Nt?{path:Nt,config:Y(Nt,lt)}:null}return(Ct=je(Ne,Qe,lt))!=null?Ct:null},"getTsconfig"),et=/\*/g,pt=c((Ne,Qe)=>{let lt=Ne.match(et);if(lt&&lt.length>1)throw new Error(Qe)},"assertStarCount"),ft=c(Ne=>{if(Ne.includes("*")){let[Qe,lt]=Ne.split("*");return{prefix:Qe,suffix:lt}}return Ne},"parsePattern"),nt=c(({prefix:Ne,suffix:Qe},lt)=>lt.startsWith(Ne)&&lt.endsWith(Qe),"isPatternMatch"),kt=c((Ne,Qe,lt)=>Object.entries(Ne).map(([Ge,Ct])=>(pt(Ge,`Pattern '${Ge}' can have at most one '*' character.`),{pattern:ft(Ge),substitutions:Ct.map(Nt=>{if(pt(Nt,`Substitution '${Nt}' in pattern '${Ge}' can have at most one '*' character.`),!Qe&&!S.test(Nt)&&!u.isAbsolute(Nt))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return u.resolve(lt,Nt)})})),"parsePaths"),Yt=c(Ne=>{let{compilerOptions:Qe}=Ne.config;if(!Qe)return null;let{baseUrl:lt,paths:Ge}=Qe;if(!lt&&!Ge)return null;let Ct=Ie in Qe&&Qe[Ie],Nt=u.resolve(u.dirname(Ne.path),lt||Ct||"."),wt=Ge?kt(Ge,lt,Nt):[];return hn=>{if(S.test(hn))return[];let fn=[];for(let Yr of wt){if(Yr.pattern===hn)return Yr.substitutions.map(A);typeof Yr.pattern!="string"&&fn.push(Yr)}let yn,zn=-1;for(let Yr of fn)nt(Yr.pattern,hn)&&Yr.pattern.prefix.length>zn&&(zn=Yr.pattern.prefix.length,yn=Yr);if(!yn)return lt?[A(u.join(Nt,hn))]:[];let qn=hn.slice(yn.pattern.prefix.length,hn.length-yn.pattern.suffix.length);return yn.substitutions.map(Yr=>A(Yr.replace("*",qn)))}},"createPathsMatcher");s.createPathsMatcher=Yt,s.getTsconfig=Kt},"./node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.cjs"(i,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0});let o=_=>_!==null&&typeof _=="object",a=(_,x)=>Object.assign(new Error(`[${_}]: ${x}`),{code:_}),c="ERR_INVALID_PACKAGE_CONFIG",u="ERR_INVALID_PACKAGE_TARGET",l=/^\d+$/,p=/^(\.{1,2}|node_modules)$/i,d=/\/|\\/;var m,h=((m=h||{}).Export="exports",m.Import="imports",m);let f=(_,x,S,T,v)=>{if(x==null)return[];if(typeof x=="string"){let[R,...O]=x.split(d);if(R===".."||O.some(G=>p.test(G)))throw a(u,`Invalid "${_}" target "${x}" defined in the package config`);return[v?x.replace(/\*/g,v):x]}if(Array.isArray(x))return x.flatMap(R=>f(_,R,S,T,v));if(o(x)){for(let R of Object.keys(x)){if(l.test(R))throw a(c,"Cannot contain numeric property keys");if(R==="default"||T.includes(R))return f(_,x[R],S,T,v)}return[]}throw a(u,`Invalid "${_}" target "${x}"`)},A="*",y=(_,x)=>{let S=_.indexOf(A),T=x.indexOf(A);return S===T?x.length>_.length:T>S};function b(_,x){if(!x.includes(A)&&_.hasOwnProperty(x))return[x];let S,T;for(let v of Object.keys(_))if(v.includes(A)){let[R,O,G]=v.split(A);if(G===void 0&&x.startsWith(R)&&x.endsWith(O)){let $=x.slice(R.length,-O.length||void 0);$&&(!S||y(S,v))&&(S=v,T=$)}}return[S,T]}let E=/^\w+:/;s.resolveExports=(_,x,S)=>{if(!_)throw new Error('"exports" is required');x=x===""?".":`./${x}`,(typeof _=="string"||Array.isArray(_)||o(_)&&(O=>Object.keys(O).reduce((G,$)=>{let U=$===""||$[0]!==".";if(G===void 0||G===U)return U;throw a(c,'"exports" cannot contain some keys starting with "." and some not')},void 0))(_))&&(_={".":_});let[T,v]=b(_,x),R=f(h.Export,_[T],x,S,v);if(R.length===0)throw a("ERR_PACKAGE_PATH_NOT_EXPORTED",x==="."?'No "exports" main defined':`Package subpath '${x}' is not defined by "exports"`);for(let O of R)if(!O.startsWith("./")&&!E.test(O))throw a(u,`Invalid "exports" target "${O}" defined in the package config`);return R},s.resolveImports=(_,x,S)=>{if(!_)throw new Error('"imports" is required');let[T,v]=b(_,x),R=f(h.Import,_[T],x,S,v);if(R.length===0)throw a("ERR_PACKAGE_IMPORT_NOT_DEFINED",`Package import specifier "${x}" is not defined in package`);return R}}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.n=i=>{var s=i&&i.__esModule?()=>i.default:()=>i;return n.d(s,{a:s}),s},n.d=(i,s)=>{for(var o in s)n.o(s,o)&&!n.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:s[o]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s);var r={};(()=>{"use strict";n.d(r,{default:()=>xE});let i=tt("node:os");var s=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],a="\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-\u088F\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\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\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",c={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},u="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",l={5:u,"5module":u+" export import",6:u+" const class extends export import super"},p=/^in(stanceof)?$/,d=new RegExp("["+a+"]"),m=new RegExp("["+a+"\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\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\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]");function h(C,D){for(var V=65536,ue=0;ue<D.length;ue+=2){if((V+=D[ue])>C)return!1;if((V+=D[ue+1])>=C)return!0}return!1}function f(C,D){return C<65?C===36:C<91||(C<97?C===95:C<123||(C<=65535?C>=170&&d.test(String.fromCharCode(C)):D!==!1&&h(C,o)))}function A(C,D){return C<48?C===36:C<58||!(C<65)&&(C<91||(C<97?C===95:C<123||(C<=65535?C>=170&&m.test(String.fromCharCode(C)):D!==!1&&(h(C,o)||h(C,s)))))}var y=function(C,D){D===void 0&&(D={}),this.label=C,this.keyword=D.keyword,this.beforeExpr=!!D.beforeExpr,this.startsExpr=!!D.startsExpr,this.isLoop=!!D.isLoop,this.isAssign=!!D.isAssign,this.prefix=!!D.prefix,this.postfix=!!D.postfix,this.binop=D.binop||null,this.updateContext=null};function b(C,D){return new y(C,{beforeExpr:!0,binop:D})}var E={beforeExpr:!0},_={startsExpr:!0},x={};function S(C,D){return D===void 0&&(D={}),D.keyword=C,x[C]=new y(C,D)}var T={num:new y("num",_),regexp:new y("regexp",_),string:new y("string",_),name:new y("name",_),privateId:new y("privateId",_),eof:new y("eof"),bracketL:new y("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new y("]"),braceL:new y("{",{beforeExpr:!0,startsExpr:!0}),braceR:new y("}"),parenL:new y("(",{beforeExpr:!0,startsExpr:!0}),parenR:new y(")"),comma:new y(",",E),semi:new y(";",E),colon:new y(":",E),dot:new y("."),question:new y("?",E),questionDot:new y("?."),arrow:new y("=>",E),template:new y("template"),invalidTemplate:new y("invalidTemplate"),ellipsis:new y("...",E),backQuote:new y("`",_),dollarBraceL:new y("${",{beforeExpr:!0,startsExpr:!0}),eq:new y("=",{beforeExpr:!0,isAssign:!0}),assign:new y("_=",{beforeExpr:!0,isAssign:!0}),incDec:new y("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new y("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:b("||",1),logicalAND:b("&&",2),bitwiseOR:b("|",3),bitwiseXOR:b("^",4),bitwiseAND:b("&",5),equality:b("==/!=/===/!==",6),relational:b("</>/<=/>=",7),bitShift:b("<</>>/>>>",8),plusMin:new y("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:b("%",10),star:b("*",10),slash:b("/",10),starstar:new y("**",{beforeExpr:!0}),coalesce:b("??",1),_break:S("break"),_case:S("case",E),_catch:S("catch"),_continue:S("continue"),_debugger:S("debugger"),_default:S("default",E),_do:S("do",{isLoop:!0,beforeExpr:!0}),_else:S("else",E),_finally:S("finally"),_for:S("for",{isLoop:!0}),_function:S("function",_),_if:S("if"),_return:S("return",E),_switch:S("switch"),_throw:S("throw",E),_try:S("try"),_var:S("var"),_const:S("const"),_while:S("while",{isLoop:!0}),_with:S("with"),_new:S("new",{beforeExpr:!0,startsExpr:!0}),_this:S("this",_),_super:S("super",_),_class:S("class",_),_extends:S("extends",E),_export:S("export"),_import:S("import",_),_null:S("null",_),_true:S("true",_),_false:S("false",_),_in:S("in",{beforeExpr:!0,binop:7}),_instanceof:S("instanceof",{beforeExpr:!0,binop:7}),_typeof:S("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:S("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:S("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},v=/\r\n?|\n|\u2028|\u2029/,R=new RegExp(v.source,"g");function O(C){return C===10||C===13||C===8232||C===8233}function G(C,D,V){V===void 0&&(V=C.length);for(var ue=D;ue<V;ue++){var Pe=C.charCodeAt(ue);if(O(Pe))return ue<V-1&&Pe===13&&C.charCodeAt(ue+1)===10?ue+2:ue+1}return-1}var $=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,U=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,W=Object.prototype,re=W.hasOwnProperty,ie=W.toString,te=Object.hasOwn||function(C,D){return re.call(C,D)},q=Array.isArray||function(C){return ie.call(C)==="[object Array]"},oe=Object.create(null);function be(C){return oe[C]||(oe[C]=new RegExp("^(?:"+C.replace(/ /g,"|")+")$"))}function De(C){return C<=65535?String.fromCharCode(C):(C-=65536,String.fromCharCode(55296+(C>>10),56320+(1023&C)))}var Re=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ie=function(C,D){this.line=C,this.column=D};Ie.prototype.offset=function(C){return new Ie(this.line,this.column+C)};var ne=function(C,D,V){this.start=D,this.end=V,C.sourceFile!==null&&(this.source=C.sourceFile)};function ce(C,D){for(var V=1,ue=0;;){var Pe=G(C,ue,D);if(Pe<0)return new Ie(V,D-ue);++V,ue=Pe}}var se={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},z=!1;function ee(C){var D={};for(var V in se)D[V]=C&&te(C,V)?C[V]:se[V];if(D.ecmaVersion==="latest"?D.ecmaVersion=1e8:D.ecmaVersion==null?(!z&&typeof console=="object"&&console.warn&&(z=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
390
390
  Defaulting to 2020, but this will stop working in the future.`)),D.ecmaVersion=11):D.ecmaVersion>=2015&&(D.ecmaVersion-=2009),D.allowReserved==null&&(D.allowReserved=D.ecmaVersion<5),C&&C.allowHashBang!=null||(D.allowHashBang=D.ecmaVersion>=14),q(D.onToken)){var ue=D.onToken;D.onToken=function(Pe){return ue.push(Pe)}}if(q(D.onComment)&&(D.onComment=(function(Pe,Ve){return function(Je,ot,Lt,nn,Xt,Rn){var _n={type:Je?"Block":"Line",value:ot,start:Lt,end:nn};Pe.locations&&(_n.loc=new ne(this,Xt,Rn)),Pe.ranges&&(_n.range=[Lt,nn]),Ve.push(_n)}})(D,D.onComment)),D.sourceType==="commonjs"&&D.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return D}var j=256,X=259;function le(C,D){return 2|(C?4:0)|(D?8:0)}var xe=function(C,D,V){this.options=C=ee(C),this.sourceFile=C.sourceFile,this.keywords=be(l[C.ecmaVersion>=6?6:C.sourceType==="module"?"5module":5]);var ue="";C.allowReserved!==!0&&(ue=c[C.ecmaVersion>=6?6:C.ecmaVersion===5?5:3],C.sourceType==="module"&&(ue+=" await")),this.reservedWords=be(ue);var Pe=(ue?ue+" ":"")+c.strict;this.reservedWordsStrict=be(Pe),this.reservedWordsStrictBind=be(Pe+" "+c.strictBind),this.input=String(D),this.containsEsc=!1,V?(this.pos=V,this.lineStart=this.input.lastIndexOf(`
391
- `,V-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(v).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=T.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=C.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&C.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?2:1),this.regexpState=null,this.privateNameStack=[]},Se={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};xe.prototype.parse=function(){var C=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(C)},Se.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Se.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},Se.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},Se.canAwait.get=function(){for(var C=this.scopeStack.length-1;C>=0;C--){var D=this.scopeStack[C].flags;if(768&D)return!1;if(2&D)return(4&D)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Se.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},Se.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},Se.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Se.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Se.allowNewDotTarget.get=function(){for(var C=this.scopeStack.length-1;C>=0;C--){var D=this.scopeStack[C].flags;if(768&D||2&D&&!(16&D))return!0}return!1},Se.allowUsing.get=function(){var C=this.currentScope().flags;return!(1024&C)&&!(!this.inModule&&1&C)},Se.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&j)>0},xe.extend=function(){for(var C=[],D=arguments.length;D--;)C[D]=arguments[D];for(var V=this,ue=0;ue<C.length;ue++)V=C[ue](V);return V},xe.parse=function(C,D){return new this(D,C).parse()},xe.parseExpressionAt=function(C,D,V){var ue=new this(V,C,D);return ue.nextToken(),ue.parseExpression()},xe.tokenizer=function(C,D){return new this(D,C)},Object.defineProperties(xe.prototype,Se);var pe=xe.prototype,ge=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;pe.strictDirective=function(C){if(this.options.ecmaVersion<5)return!1;for(;;){U.lastIndex=C,C+=U.exec(this.input)[0].length;var D=ge.exec(this.input.slice(C));if(!D)return!1;if((D[1]||D[2])==="use strict"){U.lastIndex=C+D[0].length;var V=U.exec(this.input),ue=V.index+V[0].length,Pe=this.input.charAt(ue);return Pe===";"||Pe==="}"||v.test(V[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(Pe)||Pe==="!"&&this.input.charAt(ue+1)==="=")}C+=D[0].length,U.lastIndex=C,C+=U.exec(this.input)[0].length,this.input[C]===";"&&C++}},pe.eat=function(C){return this.type===C&&(this.next(),!0)},pe.isContextual=function(C){return this.type===T.name&&this.value===C&&!this.containsEsc},pe.eatContextual=function(C){return!!this.isContextual(C)&&(this.next(),!0)},pe.expectContextual=function(C){this.eatContextual(C)||this.unexpected()},pe.canInsertSemicolon=function(){return this.type===T.eof||this.type===T.braceR||v.test(this.input.slice(this.lastTokEnd,this.start))},pe.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},pe.semicolon=function(){this.eat(T.semi)||this.insertSemicolon()||this.unexpected()},pe.afterTrailingComma=function(C,D){if(this.type===C)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),D||this.next(),!0},pe.expect=function(C){this.eat(C)||this.unexpected()},pe.unexpected=function(C){this.raise(C??this.start,"Unexpected token")};var Te=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};pe.checkPatternErrors=function(C,D){if(C){C.trailingComma>-1&&this.raiseRecoverable(C.trailingComma,"Comma is not permitted after the rest element");var V=D?C.parenthesizedAssign:C.parenthesizedBind;V>-1&&this.raiseRecoverable(V,D?"Assigning to rvalue":"Parenthesized pattern")}},pe.checkExpressionErrors=function(C,D){if(!C)return!1;var V=C.shorthandAssign,ue=C.doubleProto;if(!D)return V>=0||ue>=0;V>=0&&this.raise(V,"Shorthand property assignments are valid only in destructuring patterns"),ue>=0&&this.raiseRecoverable(ue,"Redefinition of __proto__ property")},pe.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},pe.isSimpleAssignTarget=function(C){return C.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(C.expression):C.type==="Identifier"||C.type==="MemberExpression"};var Ee=xe.prototype;Ee.parseTopLevel=function(C){var D=Object.create(null);for(C.body||(C.body=[]);this.type!==T.eof;){var V=this.parseStatement(null,!0,D);C.body.push(V)}if(this.inModule)for(var ue=0,Pe=Object.keys(this.undefinedExports);ue<Pe.length;ue+=1){var Ve=Pe[ue];this.raiseRecoverable(this.undefinedExports[Ve].start,"Export '"+Ve+"' is not defined")}return this.adaptDirectivePrologue(C.body),this.next(),C.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(C,"Program")};var ve={kind:"loop"},ye={kind:"switch"};Ee.isLet=function(C){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;U.lastIndex=this.pos;var D=U.exec(this.input),V=this.pos+D[0].length,ue=this.fullCharCodeAt(V);if(ue===91||ue===92)return!0;if(C)return!1;if(ue===123)return!0;if(f(ue)){var Pe=V;do V+=ue<=65535?1:2;while(A(ue=this.fullCharCodeAt(V)));if(ue===92)return!0;var Ve=this.input.slice(Pe,V);if(!p.test(Ve))return!0}return!1},Ee.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;U.lastIndex=this.pos;var C,D=U.exec(this.input),V=this.pos+D[0].length;return!(v.test(this.input.slice(this.pos,V))||this.input.slice(V,V+8)!=="function"||V+8!==this.input.length&&(A(C=this.fullCharCodeAt(V+8))||C===92))},Ee.isUsingKeyword=function(C,D){if(this.options.ecmaVersion<17||!this.isContextual(C?"await":"using"))return!1;U.lastIndex=this.pos;var V=U.exec(this.input),ue=this.pos+V[0].length;if(v.test(this.input.slice(this.pos,ue)))return!1;if(C){var Pe,Ve=ue+5;if(this.input.slice(ue,Ve)!=="using"||Ve===this.input.length||A(Pe=this.fullCharCodeAt(Ve))||Pe===92)return!1;U.lastIndex=Ve;var Je=U.exec(this.input);if(ue=Ve+Je[0].length,Je&&v.test(this.input.slice(Ve,ue)))return!1}var ot=this.fullCharCodeAt(ue);if(!f(ot)&&ot!==92)return!1;var Lt=ue;do ue+=ot<=65535?1:2;while(A(ot=this.fullCharCodeAt(ue)));if(ot===92)return!0;var nn=this.input.slice(Lt,ue);return!(p.test(nn)||D&&nn==="of")},Ee.isAwaitUsing=function(C){return this.isUsingKeyword(!0,C)},Ee.isUsing=function(C){return this.isUsingKeyword(!1,C)},Ee.parseStatement=function(C,D,V){var ue,Pe=this.type,Ve=this.startNode();switch(this.isLet(C)&&(Pe=T._var,ue="let"),Pe){case T._break:case T._continue:return this.parseBreakContinueStatement(Ve,Pe.keyword);case T._debugger:return this.parseDebuggerStatement(Ve);case T._do:return this.parseDoStatement(Ve);case T._for:return this.parseForStatement(Ve);case T._function:return C&&(this.strict||C!=="if"&&C!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(Ve,!1,!C);case T._class:return C&&this.unexpected(),this.parseClass(Ve,!0);case T._if:return this.parseIfStatement(Ve);case T._return:return this.parseReturnStatement(Ve);case T._switch:return this.parseSwitchStatement(Ve);case T._throw:return this.parseThrowStatement(Ve);case T._try:return this.parseTryStatement(Ve);case T._const:case T._var:return ue=ue||this.value,C&&ue!=="var"&&this.unexpected(),this.parseVarStatement(Ve,ue);case T._while:return this.parseWhileStatement(Ve);case T._with:return this.parseWithStatement(Ve);case T.braceL:return this.parseBlock(!0,Ve);case T.semi:return this.parseEmptyStatement(Ve);case T._export:case T._import:if(this.options.ecmaVersion>10&&Pe===T._import){U.lastIndex=this.pos;var Je=U.exec(this.input),ot=this.pos+Je[0].length,Lt=this.input.charCodeAt(ot);if(Lt===40||Lt===46)return this.parseExpressionStatement(Ve,this.parseExpression())}return this.options.allowImportExportEverywhere||(D||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),Pe===T._import?this.parseImport(Ve):this.parseExport(Ve,V);default:if(this.isAsyncFunction())return C&&this.unexpected(),this.next(),this.parseFunctionStatement(Ve,!0,!C);var nn=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(nn)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),nn==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(Ve,!1,nn),this.semicolon(),this.finishNode(Ve,"VariableDeclaration");var Xt=this.value,Rn=this.parseExpression();return Pe===T.name&&Rn.type==="Identifier"&&this.eat(T.colon)?this.parseLabeledStatement(Ve,Xt,Rn,C):this.parseExpressionStatement(Ve,Rn)}},Ee.parseBreakContinueStatement=function(C,D){var V=D==="break";this.next(),this.eat(T.semi)||this.insertSemicolon()?C.label=null:this.type!==T.name?this.unexpected():(C.label=this.parseIdent(),this.semicolon());for(var ue=0;ue<this.labels.length;++ue){var Pe=this.labels[ue];if((C.label==null||Pe.name===C.label.name)&&(Pe.kind!=null&&(V||Pe.kind==="loop")||C.label&&V))break}return ue===this.labels.length&&this.raise(C.start,"Unsyntactic "+D),this.finishNode(C,V?"BreakStatement":"ContinueStatement")},Ee.parseDebuggerStatement=function(C){return this.next(),this.semicolon(),this.finishNode(C,"DebuggerStatement")},Ee.parseDoStatement=function(C){return this.next(),this.labels.push(ve),C.body=this.parseStatement("do"),this.labels.pop(),this.expect(T._while),C.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(T.semi):this.semicolon(),this.finishNode(C,"DoWhileStatement")},Ee.parseForStatement=function(C){this.next();var D=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ve),this.enterScope(0),this.expect(T.parenL),this.type===T.semi)return D>-1&&this.unexpected(D),this.parseFor(C,null);var V=this.isLet();if(this.type===T._var||this.type===T._const||V){var ue=this.startNode(),Pe=V?"let":this.value;return this.next(),this.parseVar(ue,!0,Pe),this.finishNode(ue,"VariableDeclaration"),this.parseForAfterInit(C,ue,D)}var Ve=this.isContextual("let"),Je=!1,ot=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(ot){var Lt=this.startNode();return this.next(),ot==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(Lt,!0,ot),this.finishNode(Lt,"VariableDeclaration"),this.parseForAfterInit(C,Lt,D)}var nn=this.containsEsc,Xt=new Te,Rn=this.start,_n=D>-1?this.parseExprSubscripts(Xt,"await"):this.parseExpression(!0,Xt);return this.type===T._in||(Je=this.options.ecmaVersion>=6&&this.isContextual("of"))?(D>-1?(this.type===T._in&&this.unexpected(D),C.await=!0):Je&&this.options.ecmaVersion>=8&&(_n.start!==Rn||nn||_n.type!=="Identifier"||_n.name!=="async"?this.options.ecmaVersion>=9&&(C.await=!1):this.unexpected()),Ve&&Je&&this.raise(_n.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(_n,!1,Xt),this.checkLValPattern(_n),this.parseForIn(C,_n)):(this.checkExpressionErrors(Xt,!0),D>-1&&this.unexpected(D),this.parseFor(C,_n))},Ee.parseForAfterInit=function(C,D,V){return(this.type===T._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&D.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===T._in?V>-1&&this.unexpected(V):C.await=V>-1),this.parseForIn(C,D)):(V>-1&&this.unexpected(V),this.parseFor(C,D))},Ee.parseFunctionStatement=function(C,D,V){return this.next(),this.parseFunction(C,qe|(V?0:He),!1,D)},Ee.parseIfStatement=function(C){return this.next(),C.test=this.parseParenExpression(),C.consequent=this.parseStatement("if"),C.alternate=this.eat(T._else)?this.parseStatement("if"):null,this.finishNode(C,"IfStatement")},Ee.parseReturnStatement=function(C){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(T.semi)||this.insertSemicolon()?C.argument=null:(C.argument=this.parseExpression(),this.semicolon()),this.finishNode(C,"ReturnStatement")},Ee.parseSwitchStatement=function(C){var D;this.next(),C.discriminant=this.parseParenExpression(),C.cases=[],this.expect(T.braceL),this.labels.push(ye),this.enterScope(1024);for(var V=!1;this.type!==T.braceR;)if(this.type===T._case||this.type===T._default){var ue=this.type===T._case;D&&this.finishNode(D,"SwitchCase"),C.cases.push(D=this.startNode()),D.consequent=[],this.next(),ue?D.test=this.parseExpression():(V&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),V=!0,D.test=null),this.expect(T.colon)}else D||this.unexpected(),D.consequent.push(this.parseStatement(null));return this.exitScope(),D&&this.finishNode(D,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(C,"SwitchStatement")},Ee.parseThrowStatement=function(C){return this.next(),v.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),C.argument=this.parseExpression(),this.semicolon(),this.finishNode(C,"ThrowStatement")};var Y=[];Ee.parseCatchClauseParam=function(){var C=this.parseBindingAtom(),D=C.type==="Identifier";return this.enterScope(D?32:0),this.checkLValPattern(C,D?4:2),this.expect(T.parenR),C},Ee.parseTryStatement=function(C){if(this.next(),C.block=this.parseBlock(),C.handler=null,this.type===T._catch){var D=this.startNode();this.next(),this.eat(T.parenL)?D.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),D.param=null,this.enterScope(0)),D.body=this.parseBlock(!1),this.exitScope(),C.handler=this.finishNode(D,"CatchClause")}return C.finalizer=this.eat(T._finally)?this.parseBlock():null,C.handler||C.finalizer||this.raise(C.start,"Missing catch or finally clause"),this.finishNode(C,"TryStatement")},Ee.parseVarStatement=function(C,D,V){return this.next(),this.parseVar(C,!1,D,V),this.semicolon(),this.finishNode(C,"VariableDeclaration")},Ee.parseWhileStatement=function(C){return this.next(),C.test=this.parseParenExpression(),this.labels.push(ve),C.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(C,"WhileStatement")},Ee.parseWithStatement=function(C){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),C.object=this.parseParenExpression(),C.body=this.parseStatement("with"),this.finishNode(C,"WithStatement")},Ee.parseEmptyStatement=function(C){return this.next(),this.finishNode(C,"EmptyStatement")},Ee.parseLabeledStatement=function(C,D,V,ue){for(var Pe=0,Ve=this.labels;Pe<Ve.length;Pe+=1)Ve[Pe].name===D&&this.raise(V.start,"Label '"+D+"' is already declared");for(var Je=this.type.isLoop?"loop":this.type===T._switch?"switch":null,ot=this.labels.length-1;ot>=0;ot--){var Lt=this.labels[ot];if(Lt.statementStart!==C.start)break;Lt.statementStart=this.start,Lt.kind=Je}return this.labels.push({name:D,kind:Je,statementStart:this.start}),C.body=this.parseStatement(ue?ue.indexOf("label")===-1?ue+"label":ue:"label"),this.labels.pop(),C.label=V,this.finishNode(C,"LabeledStatement")},Ee.parseExpressionStatement=function(C,D){return C.expression=D,this.semicolon(),this.finishNode(C,"ExpressionStatement")},Ee.parseBlock=function(C,D,V){for(C===void 0&&(C=!0),D===void 0&&(D=this.startNode()),D.body=[],this.expect(T.braceL),C&&this.enterScope(0);this.type!==T.braceR;){var ue=this.parseStatement(null);D.body.push(ue)}return V&&(this.strict=!1),this.next(),C&&this.exitScope(),this.finishNode(D,"BlockStatement")},Ee.parseFor=function(C,D){return C.init=D,this.expect(T.semi),C.test=this.type===T.semi?null:this.parseExpression(),this.expect(T.semi),C.update=this.type===T.parenR?null:this.parseExpression(),this.expect(T.parenR),C.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(C,"ForStatement")},Ee.parseForIn=function(C,D){var V=this.type===T._in;return this.next(),D.type==="VariableDeclaration"&&D.declarations[0].init!=null&&(!V||this.options.ecmaVersion<8||this.strict||D.kind!=="var"||D.declarations[0].id.type!=="Identifier")&&this.raise(D.start,(V?"for-in":"for-of")+" loop variable declaration may not have an initializer"),C.left=D,C.right=V?this.parseExpression():this.parseMaybeAssign(),this.expect(T.parenR),C.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(C,V?"ForInStatement":"ForOfStatement")},Ee.parseVar=function(C,D,V,ue){for(C.declarations=[],C.kind=V;;){var Pe=this.startNode();if(this.parseVarId(Pe,V),this.eat(T.eq)?Pe.init=this.parseMaybeAssign(D):ue||V!=="const"||this.type===T._in||this.options.ecmaVersion>=6&&this.isContextual("of")?ue||V!=="using"&&V!=="await using"||!(this.options.ecmaVersion>=17)||this.type===T._in||this.isContextual("of")?ue||Pe.id.type==="Identifier"||D&&(this.type===T._in||this.isContextual("of"))?Pe.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+V+" declaration"):this.unexpected(),C.declarations.push(this.finishNode(Pe,"VariableDeclarator")),!this.eat(T.comma))break}return C},Ee.parseVarId=function(C,D){C.id=D==="using"||D==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(C.id,D==="var"?1:2,!1)};var qe=1,He=2;function dt(C,D){var V=D.key.name,ue=C[V],Pe="true";return D.type!=="MethodDefinition"||D.kind!=="get"&&D.kind!=="set"||(Pe=(D.static?"s":"i")+D.kind),ue==="iget"&&Pe==="iset"||ue==="iset"&&Pe==="iget"||ue==="sget"&&Pe==="sset"||ue==="sset"&&Pe==="sget"?(C[V]="true",!1):!!ue||(C[V]=Pe,!1)}function at(C,D){var V=C.computed,ue=C.key;return!V&&(ue.type==="Identifier"&&ue.name===D||ue.type==="Literal"&&ue.value===D)}Ee.parseFunction=function(C,D,V,ue,Pe){this.initFunction(C),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!ue)&&(this.type===T.star&&D&He&&this.unexpected(),C.generator=this.eat(T.star)),this.options.ecmaVersion>=8&&(C.async=!!ue),D&qe&&(C.id=4&D&&this.type!==T.name?null:this.parseIdent(),!C.id||D&He||this.checkLValSimple(C.id,this.strict||C.generator||C.async?this.treatFunctionsAsVar?1:2:3));var Ve=this.yieldPos,Je=this.awaitPos,ot=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(le(C.async,C.generator)),D&qe||(C.id=this.type===T.name?this.parseIdent():null),this.parseFunctionParams(C),this.parseFunctionBody(C,V,!1,Pe),this.yieldPos=Ve,this.awaitPos=Je,this.awaitIdentPos=ot,this.finishNode(C,D&qe?"FunctionDeclaration":"FunctionExpression")},Ee.parseFunctionParams=function(C){this.expect(T.parenL),C.params=this.parseBindingList(T.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Ee.parseClass=function(C,D){this.next();var V=this.strict;this.strict=!0,this.parseClassId(C,D),this.parseClassSuper(C);var ue=this.enterClassBody(),Pe=this.startNode(),Ve=!1;for(Pe.body=[],this.expect(T.braceL);this.type!==T.braceR;){var Je=this.parseClassElement(C.superClass!==null);Je&&(Pe.body.push(Je),Je.type==="MethodDefinition"&&Je.kind==="constructor"?(Ve&&this.raiseRecoverable(Je.start,"Duplicate constructor in the same class"),Ve=!0):Je.key&&Je.key.type==="PrivateIdentifier"&&dt(ue,Je)&&this.raiseRecoverable(Je.key.start,"Identifier '#"+Je.key.name+"' has already been declared"))}return this.strict=V,this.next(),C.body=this.finishNode(Pe,"ClassBody"),this.exitClassBody(),this.finishNode(C,D?"ClassDeclaration":"ClassExpression")},Ee.parseClassElement=function(C){if(this.eat(T.semi))return null;var D=this.options.ecmaVersion,V=this.startNode(),ue="",Pe=!1,Ve=!1,Je="method",ot=!1;if(this.eatContextual("static")){if(D>=13&&this.eat(T.braceL))return this.parseClassStaticBlock(V),V;this.isClassElementNameStart()||this.type===T.star?ot=!0:ue="static"}if(V.static=ot,!ue&&D>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==T.star||this.canInsertSemicolon()?ue="async":Ve=!0),!ue&&(D>=9||!Ve)&&this.eat(T.star)&&(Pe=!0),!ue&&!Ve&&!Pe){var Lt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?Je=Lt:ue=Lt)}if(ue?(V.computed=!1,V.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),V.key.name=ue,this.finishNode(V.key,"Identifier")):this.parseClassElementName(V),D<13||this.type===T.parenL||Je!=="method"||Pe||Ve){var nn=!V.static&&at(V,"constructor"),Xt=nn&&C;nn&&Je!=="method"&&this.raise(V.key.start,"Constructor can't have get/set modifier"),V.kind=nn?"constructor":Je,this.parseClassMethod(V,Pe,Ve,Xt)}else this.parseClassField(V);return V},Ee.isClassElementNameStart=function(){return this.type===T.name||this.type===T.privateId||this.type===T.num||this.type===T.string||this.type===T.bracketL||this.type.keyword},Ee.parseClassElementName=function(C){this.type===T.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),C.computed=!1,C.key=this.parsePrivateIdent()):this.parsePropertyName(C)},Ee.parseClassMethod=function(C,D,V,ue){var Pe=C.key;C.kind==="constructor"?(D&&this.raise(Pe.start,"Constructor can't be a generator"),V&&this.raise(Pe.start,"Constructor can't be an async method")):C.static&&at(C,"prototype")&&this.raise(Pe.start,"Classes may not have a static property named prototype");var Ve=C.value=this.parseMethod(D,V,ue);return C.kind==="get"&&Ve.params.length!==0&&this.raiseRecoverable(Ve.start,"getter should have no params"),C.kind==="set"&&Ve.params.length!==1&&this.raiseRecoverable(Ve.start,"setter should have exactly one param"),C.kind==="set"&&Ve.params[0].type==="RestElement"&&this.raiseRecoverable(Ve.params[0].start,"Setter cannot use rest params"),this.finishNode(C,"MethodDefinition")},Ee.parseClassField=function(C){return at(C,"constructor")?this.raise(C.key.start,"Classes can't have a field named 'constructor'"):C.static&&at(C,"prototype")&&this.raise(C.key.start,"Classes can't have a static field named 'prototype'"),this.eat(T.eq)?(this.enterScope(576),C.value=this.parseMaybeAssign(),this.exitScope()):C.value=null,this.semicolon(),this.finishNode(C,"PropertyDefinition")},Ee.parseClassStaticBlock=function(C){C.body=[];var D=this.labels;for(this.labels=[],this.enterScope(320);this.type!==T.braceR;){var V=this.parseStatement(null);C.body.push(V)}return this.next(),this.exitScope(),this.labels=D,this.finishNode(C,"StaticBlock")},Ee.parseClassId=function(C,D){this.type===T.name?(C.id=this.parseIdent(),D&&this.checkLValSimple(C.id,2,!1)):(D===!0&&this.unexpected(),C.id=null)},Ee.parseClassSuper=function(C){C.superClass=this.eat(T._extends)?this.parseExprSubscripts(null,!1):null},Ee.enterClassBody=function(){var C={declared:Object.create(null),used:[]};return this.privateNameStack.push(C),C.declared},Ee.exitClassBody=function(){var C=this.privateNameStack.pop(),D=C.declared,V=C.used;if(this.options.checkPrivateFields)for(var ue=this.privateNameStack.length,Pe=ue===0?null:this.privateNameStack[ue-1],Ve=0;Ve<V.length;++Ve){var Je=V[Ve];te(D,Je.name)||(Pe?Pe.used.push(Je):this.raiseRecoverable(Je.start,"Private field '#"+Je.name+"' must be declared in an enclosing class"))}},Ee.parseExportAllDeclaration=function(C,D){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(C.exported=this.parseModuleExportName(),this.checkExport(D,C.exported,this.lastTokStart)):C.exported=null),this.expectContextual("from"),this.type!==T.string&&this.unexpected(),C.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(C.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(C,"ExportAllDeclaration")},Ee.parseExport=function(C,D){if(this.next(),this.eat(T.star))return this.parseExportAllDeclaration(C,D);if(this.eat(T._default))return this.checkExport(D,"default",this.lastTokStart),C.declaration=this.parseExportDefaultDeclaration(),this.finishNode(C,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())C.declaration=this.parseExportDeclaration(C),C.declaration.type==="VariableDeclaration"?this.checkVariableExport(D,C.declaration.declarations):this.checkExport(D,C.declaration.id,C.declaration.id.start),C.specifiers=[],C.source=null,this.options.ecmaVersion>=16&&(C.attributes=[]);else{if(C.declaration=null,C.specifiers=this.parseExportSpecifiers(D),this.eatContextual("from"))this.type!==T.string&&this.unexpected(),C.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(C.attributes=this.parseWithClause());else{for(var V=0,ue=C.specifiers;V<ue.length;V+=1){var Pe=ue[V];this.checkUnreserved(Pe.local),this.checkLocalExport(Pe.local),Pe.local.type==="Literal"&&this.raise(Pe.local.start,"A string literal cannot be used as an exported binding without `from`.")}C.source=null,this.options.ecmaVersion>=16&&(C.attributes=[])}this.semicolon()}return this.finishNode(C,"ExportNamedDeclaration")},Ee.parseExportDeclaration=function(C){return this.parseStatement(null)},Ee.parseExportDefaultDeclaration=function(){var C;if(this.type===T._function||(C=this.isAsyncFunction())){var D=this.startNode();return this.next(),C&&this.next(),this.parseFunction(D,4|qe,!1,C)}if(this.type===T._class){var V=this.startNode();return this.parseClass(V,"nullableID")}var ue=this.parseMaybeAssign();return this.semicolon(),ue},Ee.checkExport=function(C,D,V){C&&(typeof D!="string"&&(D=D.type==="Identifier"?D.name:D.value),te(C,D)&&this.raiseRecoverable(V,"Duplicate export '"+D+"'"),C[D]=!0)},Ee.checkPatternExport=function(C,D){var V=D.type;if(V==="Identifier")this.checkExport(C,D,D.start);else if(V==="ObjectPattern")for(var ue=0,Pe=D.properties;ue<Pe.length;ue+=1){var Ve=Pe[ue];this.checkPatternExport(C,Ve)}else if(V==="ArrayPattern")for(var Je=0,ot=D.elements;Je<ot.length;Je+=1){var Lt=ot[Je];Lt&&this.checkPatternExport(C,Lt)}else V==="Property"?this.checkPatternExport(C,D.value):V==="AssignmentPattern"?this.checkPatternExport(C,D.left):V==="RestElement"&&this.checkPatternExport(C,D.argument)},Ee.checkVariableExport=function(C,D){if(C)for(var V=0,ue=D;V<ue.length;V+=1){var Pe=ue[V];this.checkPatternExport(C,Pe.id)}},Ee.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},Ee.parseExportSpecifier=function(C){var D=this.startNode();return D.local=this.parseModuleExportName(),D.exported=this.eatContextual("as")?this.parseModuleExportName():D.local,this.checkExport(C,D.exported,D.exported.start),this.finishNode(D,"ExportSpecifier")},Ee.parseExportSpecifiers=function(C){var D=[],V=!0;for(this.expect(T.braceL);!this.eat(T.braceR);){if(V)V=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;D.push(this.parseExportSpecifier(C))}return D},Ee.parseImport=function(C){return this.next(),this.type===T.string?(C.specifiers=Y,C.source=this.parseExprAtom()):(C.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),C.source=this.type===T.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(C.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(C,"ImportDeclaration")},Ee.parseImportSpecifier=function(){var C=this.startNode();return C.imported=this.parseModuleExportName(),this.eatContextual("as")?C.local=this.parseIdent():(this.checkUnreserved(C.imported),C.local=C.imported),this.checkLValSimple(C.local,2),this.finishNode(C,"ImportSpecifier")},Ee.parseImportDefaultSpecifier=function(){var C=this.startNode();return C.local=this.parseIdent(),this.checkLValSimple(C.local,2),this.finishNode(C,"ImportDefaultSpecifier")},Ee.parseImportNamespaceSpecifier=function(){var C=this.startNode();return this.next(),this.expectContextual("as"),C.local=this.parseIdent(),this.checkLValSimple(C.local,2),this.finishNode(C,"ImportNamespaceSpecifier")},Ee.parseImportSpecifiers=function(){var C=[],D=!0;if(this.type===T.name&&(C.push(this.parseImportDefaultSpecifier()),!this.eat(T.comma)))return C;if(this.type===T.star)return C.push(this.parseImportNamespaceSpecifier()),C;for(this.expect(T.braceL);!this.eat(T.braceR);){if(D)D=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;C.push(this.parseImportSpecifier())}return C},Ee.parseWithClause=function(){var C=[];if(!this.eat(T._with))return C;this.expect(T.braceL);for(var D={},V=!0;!this.eat(T.braceR);){if(V)V=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;var ue=this.parseImportAttribute(),Pe=ue.key.type==="Identifier"?ue.key.name:ue.key.value;te(D,Pe)&&this.raiseRecoverable(ue.key.start,"Duplicate attribute key '"+Pe+"'"),D[Pe]=!0,C.push(ue)}return C},Ee.parseImportAttribute=function(){var C=this.startNode();return C.key=this.type===T.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(T.colon),this.type!==T.string&&this.unexpected(),C.value=this.parseExprAtom(),this.finishNode(C,"ImportAttribute")},Ee.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===T.string){var C=this.parseLiteral(this.value);return Re.test(C.value)&&this.raise(C.start,"An export name cannot include a lone surrogate."),C}return this.parseIdent(!0)},Ee.adaptDirectivePrologue=function(C){for(var D=0;D<C.length&&this.isDirectiveCandidate(C[D]);++D)C[D].directive=C[D].expression.raw.slice(1,-1)},Ee.isDirectiveCandidate=function(C){return this.options.ecmaVersion>=5&&C.type==="ExpressionStatement"&&C.expression.type==="Literal"&&typeof C.expression.value=="string"&&(this.input[C.start]==='"'||this.input[C.start]==="'")};var ze=xe.prototype;ze.toAssignable=function(C,D,V){if(this.options.ecmaVersion>=6&&C)switch(C.type){case"Identifier":this.inAsync&&C.name==="await"&&this.raise(C.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":C.type="ObjectPattern",V&&this.checkPatternErrors(V,!0);for(var ue=0,Pe=C.properties;ue<Pe.length;ue+=1){var Ve=Pe[ue];this.toAssignable(Ve,D),Ve.type!=="RestElement"||Ve.argument.type!=="ArrayPattern"&&Ve.argument.type!=="ObjectPattern"||this.raise(Ve.argument.start,"Unexpected token")}break;case"Property":C.kind!=="init"&&this.raise(C.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(C.value,D);break;case"ArrayExpression":C.type="ArrayPattern",V&&this.checkPatternErrors(V,!0),this.toAssignableList(C.elements,D);break;case"SpreadElement":C.type="RestElement",this.toAssignable(C.argument,D),C.argument.type==="AssignmentPattern"&&this.raise(C.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":C.operator!=="="&&this.raise(C.left.end,"Only '=' operator can be used for specifying default value."),C.type="AssignmentPattern",delete C.operator,this.toAssignable(C.left,D);break;case"ParenthesizedExpression":this.toAssignable(C.expression,D,V);break;case"ChainExpression":this.raiseRecoverable(C.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!D)break;default:this.raise(C.start,"Assigning to rvalue")}else V&&this.checkPatternErrors(V,!0);return C},ze.toAssignableList=function(C,D){for(var V=C.length,ue=0;ue<V;ue++){var Pe=C[ue];Pe&&this.toAssignable(Pe,D)}if(V){var Ve=C[V-1];this.options.ecmaVersion===6&&D&&Ve&&Ve.type==="RestElement"&&Ve.argument.type!=="Identifier"&&this.unexpected(Ve.argument.start)}return C},ze.parseSpread=function(C){var D=this.startNode();return this.next(),D.argument=this.parseMaybeAssign(!1,C),this.finishNode(D,"SpreadElement")},ze.parseRestBinding=function(){var C=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==T.name&&this.unexpected(),C.argument=this.parseBindingAtom(),this.finishNode(C,"RestElement")},ze.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case T.bracketL:var C=this.startNode();return this.next(),C.elements=this.parseBindingList(T.bracketR,!0,!0),this.finishNode(C,"ArrayPattern");case T.braceL:return this.parseObj(!0)}return this.parseIdent()},ze.parseBindingList=function(C,D,V,ue){for(var Pe=[],Ve=!0;!this.eat(C);)if(Ve?Ve=!1:this.expect(T.comma),D&&this.type===T.comma)Pe.push(null);else{if(V&&this.afterTrailingComma(C))break;if(this.type===T.ellipsis){var Je=this.parseRestBinding();this.parseBindingListItem(Je),Pe.push(Je),this.type===T.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(C);break}Pe.push(this.parseAssignableListItem(ue))}return Pe},ze.parseAssignableListItem=function(C){var D=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(D),D},ze.parseBindingListItem=function(C){return C},ze.parseMaybeDefault=function(C,D,V){if(V=V||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(T.eq))return V;var ue=this.startNodeAt(C,D);return ue.left=V,ue.right=this.parseMaybeAssign(),this.finishNode(ue,"AssignmentPattern")},ze.checkLValSimple=function(C,D,V){D===void 0&&(D=0);var ue=D!==0;switch(C.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(C.name)&&this.raiseRecoverable(C.start,(ue?"Binding ":"Assigning to ")+C.name+" in strict mode"),ue&&(D===2&&C.name==="let"&&this.raiseRecoverable(C.start,"let is disallowed as a lexically bound name"),V&&(te(V,C.name)&&this.raiseRecoverable(C.start,"Argument name clash"),V[C.name]=!0),D!==5&&this.declareName(C.name,D,C.start));break;case"ChainExpression":this.raiseRecoverable(C.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":ue&&this.raiseRecoverable(C.start,"Binding member expression");break;case"ParenthesizedExpression":return ue&&this.raiseRecoverable(C.start,"Binding parenthesized expression"),this.checkLValSimple(C.expression,D,V);default:this.raise(C.start,(ue?"Binding":"Assigning to")+" rvalue")}},ze.checkLValPattern=function(C,D,V){switch(D===void 0&&(D=0),C.type){case"ObjectPattern":for(var ue=0,Pe=C.properties;ue<Pe.length;ue+=1){var Ve=Pe[ue];this.checkLValInnerPattern(Ve,D,V)}break;case"ArrayPattern":for(var Je=0,ot=C.elements;Je<ot.length;Je+=1){var Lt=ot[Je];Lt&&this.checkLValInnerPattern(Lt,D,V)}break;default:this.checkLValSimple(C,D,V)}},ze.checkLValInnerPattern=function(C,D,V){switch(D===void 0&&(D=0),C.type){case"Property":this.checkLValInnerPattern(C.value,D,V);break;case"AssignmentPattern":this.checkLValPattern(C.left,D,V);break;case"RestElement":this.checkLValPattern(C.argument,D,V);break;default:this.checkLValPattern(C,D,V)}};var rt=function(C,D,V,ue,Pe){this.token=C,this.isExpr=!!D,this.preserveSpace=!!V,this.override=ue,this.generator=!!Pe},_t={b_stat:new rt("{",!1),b_expr:new rt("{",!0),b_tmpl:new rt("${",!1),p_stat:new rt("(",!1),p_expr:new rt("(",!0),q_tmpl:new rt("`",!0,!0,function(C){return C.tryReadTemplateToken()}),f_stat:new rt("function",!1),f_expr:new rt("function",!0),f_expr_gen:new rt("function",!0,!1,null,!0),f_gen:new rt("function",!1,!1,null,!0)},Zt=xe.prototype;Zt.initialContext=function(){return[_t.b_stat]},Zt.curContext=function(){return this.context[this.context.length-1]},Zt.braceIsBlock=function(C){var D=this.curContext();return D===_t.f_expr||D===_t.f_stat||(C!==T.colon||D!==_t.b_stat&&D!==_t.b_expr?C===T._return||C===T.name&&this.exprAllowed?v.test(this.input.slice(this.lastTokEnd,this.start)):C===T._else||C===T.semi||C===T.eof||C===T.parenR||C===T.arrow||(C===T.braceL?D===_t.b_stat:C!==T._var&&C!==T._const&&C!==T.name&&!this.exprAllowed):!D.isExpr)},Zt.inGeneratorContext=function(){for(var C=this.context.length-1;C>=1;C--){var D=this.context[C];if(D.token==="function")return D.generator}return!1},Zt.updateContext=function(C){var D,V=this.type;V.keyword&&C===T.dot?this.exprAllowed=!1:(D=V.updateContext)?D.call(this,C):this.exprAllowed=V.beforeExpr},Zt.overrideContext=function(C){this.curContext()!==C&&(this.context[this.context.length-1]=C)},T.parenR.updateContext=T.braceR.updateContext=function(){if(this.context.length!==1){var C=this.context.pop();C===_t.b_stat&&this.curContext().token==="function"&&(C=this.context.pop()),this.exprAllowed=!C.isExpr}else this.exprAllowed=!0},T.braceL.updateContext=function(C){this.context.push(this.braceIsBlock(C)?_t.b_stat:_t.b_expr),this.exprAllowed=!0},T.dollarBraceL.updateContext=function(){this.context.push(_t.b_tmpl),this.exprAllowed=!0},T.parenL.updateContext=function(C){var D=C===T._if||C===T._for||C===T._with||C===T._while;this.context.push(D?_t.p_stat:_t.p_expr),this.exprAllowed=!0},T.incDec.updateContext=function(){},T._function.updateContext=T._class.updateContext=function(C){!C.beforeExpr||C===T._else||C===T.semi&&this.curContext()!==_t.p_stat||C===T._return&&v.test(this.input.slice(this.lastTokEnd,this.start))||(C===T.colon||C===T.braceL)&&this.curContext()===_t.b_stat?this.context.push(_t.f_stat):this.context.push(_t.f_expr),this.exprAllowed=!1},T.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},T.backQuote.updateContext=function(){this.curContext()===_t.q_tmpl?this.context.pop():this.context.push(_t.q_tmpl),this.exprAllowed=!1},T.star.updateContext=function(C){if(C===T._function){var D=this.context.length-1;this.context[D]===_t.f_expr?this.context[D]=_t.f_expr_gen:this.context[D]=_t.f_gen}this.exprAllowed=!0},T.name.updateContext=function(C){var D=!1;this.options.ecmaVersion>=6&&C!==T.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(D=!0),this.exprAllowed=D};var Ut=xe.prototype;function $t(C){return C.type==="Identifier"||C.type==="ParenthesizedExpression"&&$t(C.expression)}function Ot(C){return C.type==="MemberExpression"&&C.property.type==="PrivateIdentifier"||C.type==="ChainExpression"&&Ot(C.expression)||C.type==="ParenthesizedExpression"&&Ot(C.expression)}Ut.checkPropClash=function(C,D,V){if(!(this.options.ecmaVersion>=9&&C.type==="SpreadElement"||this.options.ecmaVersion>=6&&(C.computed||C.method||C.shorthand))){var ue,Pe=C.key;switch(Pe.type){case"Identifier":ue=Pe.name;break;case"Literal":ue=String(Pe.value);break;default:return}var Ve=C.kind;if(this.options.ecmaVersion>=6)ue==="__proto__"&&Ve==="init"&&(D.proto&&(V?V.doubleProto<0&&(V.doubleProto=Pe.start):this.raiseRecoverable(Pe.start,"Redefinition of __proto__ property")),D.proto=!0);else{var Je=D[ue="$"+ue];Je?(Ve==="init"?this.strict&&Je.init||Je.get||Je.set:Je.init||Je[Ve])&&this.raiseRecoverable(Pe.start,"Redefinition of property"):Je=D[ue]={init:!1,get:!1,set:!1},Je[Ve]=!0}}},Ut.parseExpression=function(C,D){var V=this.start,ue=this.startLoc,Pe=this.parseMaybeAssign(C,D);if(this.type===T.comma){var Ve=this.startNodeAt(V,ue);for(Ve.expressions=[Pe];this.eat(T.comma);)Ve.expressions.push(this.parseMaybeAssign(C,D));return this.finishNode(Ve,"SequenceExpression")}return Pe},Ut.parseMaybeAssign=function(C,D,V){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(C);this.exprAllowed=!1}var ue=!1,Pe=-1,Ve=-1,Je=-1;D?(Pe=D.parenthesizedAssign,Ve=D.trailingComma,Je=D.doubleProto,D.parenthesizedAssign=D.trailingComma=-1):(D=new Te,ue=!0);var ot=this.start,Lt=this.startLoc;this.type!==T.parenL&&this.type!==T.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=C==="await");var nn=this.parseMaybeConditional(C,D);if(V&&(nn=V.call(this,nn,ot,Lt)),this.type.isAssign){var Xt=this.startNodeAt(ot,Lt);return Xt.operator=this.value,this.type===T.eq&&(nn=this.toAssignable(nn,!1,D)),ue||(D.parenthesizedAssign=D.trailingComma=D.doubleProto=-1),D.shorthandAssign>=nn.start&&(D.shorthandAssign=-1),this.type===T.eq?this.checkLValPattern(nn):this.checkLValSimple(nn),Xt.left=nn,this.next(),Xt.right=this.parseMaybeAssign(C),Je>-1&&(D.doubleProto=Je),this.finishNode(Xt,"AssignmentExpression")}return ue&&this.checkExpressionErrors(D,!0),Pe>-1&&(D.parenthesizedAssign=Pe),Ve>-1&&(D.trailingComma=Ve),nn},Ut.parseMaybeConditional=function(C,D){var V=this.start,ue=this.startLoc,Pe=this.parseExprOps(C,D);if(this.checkExpressionErrors(D))return Pe;if(this.eat(T.question)){var Ve=this.startNodeAt(V,ue);return Ve.test=Pe,Ve.consequent=this.parseMaybeAssign(),this.expect(T.colon),Ve.alternate=this.parseMaybeAssign(C),this.finishNode(Ve,"ConditionalExpression")}return Pe},Ut.parseExprOps=function(C,D){var V=this.start,ue=this.startLoc,Pe=this.parseMaybeUnary(D,!1,!1,C);return this.checkExpressionErrors(D)||Pe.start===V&&Pe.type==="ArrowFunctionExpression"?Pe:this.parseExprOp(Pe,V,ue,-1,C)},Ut.parseExprOp=function(C,D,V,ue,Pe){var Ve=this.type.binop;if(Ve!=null&&(!Pe||this.type!==T._in)&&Ve>ue){var Je=this.type===T.logicalOR||this.type===T.logicalAND,ot=this.type===T.coalesce;ot&&(Ve=T.logicalAND.binop);var Lt=this.value;this.next();var nn=this.start,Xt=this.startLoc,Rn=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,Pe),nn,Xt,Ve,Pe),_n=this.buildBinary(D,V,C,Rn,Lt,Je||ot);return(Je&&this.type===T.coalesce||ot&&(this.type===T.logicalOR||this.type===T.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(_n,D,V,ue,Pe)}return C},Ut.buildBinary=function(C,D,V,ue,Pe,Ve){ue.type==="PrivateIdentifier"&&this.raise(ue.start,"Private identifier can only be left side of binary expression");var Je=this.startNodeAt(C,D);return Je.left=V,Je.operator=Pe,Je.right=ue,this.finishNode(Je,Ve?"LogicalExpression":"BinaryExpression")},Ut.parseMaybeUnary=function(C,D,V,ue){var Pe,Ve=this.start,Je=this.startLoc;if(this.isContextual("await")&&this.canAwait)Pe=this.parseAwait(ue),D=!0;else if(this.type.prefix){var ot=this.startNode(),Lt=this.type===T.incDec;ot.operator=this.value,ot.prefix=!0,this.next(),ot.argument=this.parseMaybeUnary(null,!0,Lt,ue),this.checkExpressionErrors(C,!0),Lt?this.checkLValSimple(ot.argument):this.strict&&ot.operator==="delete"&&$t(ot.argument)?this.raiseRecoverable(ot.start,"Deleting local variable in strict mode"):ot.operator==="delete"&&Ot(ot.argument)?this.raiseRecoverable(ot.start,"Private fields can not be deleted"):D=!0,Pe=this.finishNode(ot,Lt?"UpdateExpression":"UnaryExpression")}else if(D||this.type!==T.privateId){if(Pe=this.parseExprSubscripts(C,ue),this.checkExpressionErrors(C))return Pe;for(;this.type.postfix&&!this.canInsertSemicolon();){var nn=this.startNodeAt(Ve,Je);nn.operator=this.value,nn.prefix=!1,nn.argument=Pe,this.checkLValSimple(Pe),this.next(),Pe=this.finishNode(nn,"UpdateExpression")}}else(ue||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),Pe=this.parsePrivateIdent(),this.type!==T._in&&this.unexpected();return V||!this.eat(T.starstar)?Pe:D?void this.unexpected(this.lastTokStart):this.buildBinary(Ve,Je,Pe,this.parseMaybeUnary(null,!1,!1,ue),"**",!1)},Ut.parseExprSubscripts=function(C,D){var V=this.start,ue=this.startLoc,Pe=this.parseExprAtom(C,D);if(Pe.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return Pe;var Ve=this.parseSubscripts(Pe,V,ue,!1,D);return C&&Ve.type==="MemberExpression"&&(C.parenthesizedAssign>=Ve.start&&(C.parenthesizedAssign=-1),C.parenthesizedBind>=Ve.start&&(C.parenthesizedBind=-1),C.trailingComma>=Ve.start&&(C.trailingComma=-1)),Ve},Ut.parseSubscripts=function(C,D,V,ue,Pe){for(var Ve=this.options.ecmaVersion>=8&&C.type==="Identifier"&&C.name==="async"&&this.lastTokEnd===C.end&&!this.canInsertSemicolon()&&C.end-C.start===5&&this.potentialArrowAt===C.start,Je=!1;;){var ot=this.parseSubscript(C,D,V,ue,Ve,Je,Pe);if(ot.optional&&(Je=!0),ot===C||ot.type==="ArrowFunctionExpression"){if(Je){var Lt=this.startNodeAt(D,V);Lt.expression=ot,ot=this.finishNode(Lt,"ChainExpression")}return ot}C=ot}},Ut.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(T.arrow)},Ut.parseSubscriptAsyncArrow=function(C,D,V,ue){return this.parseArrowExpression(this.startNodeAt(C,D),V,!0,ue)},Ut.parseSubscript=function(C,D,V,ue,Pe,Ve,Je){var ot=this.options.ecmaVersion>=11,Lt=ot&&this.eat(T.questionDot);ue&&Lt&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var nn=this.eat(T.bracketL);if(nn||Lt&&this.type!==T.parenL&&this.type!==T.backQuote||this.eat(T.dot)){var Xt=this.startNodeAt(D,V);Xt.object=C,nn?(Xt.property=this.parseExpression(),this.expect(T.bracketR)):this.type===T.privateId&&C.type!=="Super"?Xt.property=this.parsePrivateIdent():Xt.property=this.parseIdent(this.options.allowReserved!=="never"),Xt.computed=!!nn,ot&&(Xt.optional=Lt),C=this.finishNode(Xt,"MemberExpression")}else if(!ue&&this.eat(T.parenL)){var Rn=new Te,_n=this.yieldPos,Hr=this.awaitPos,Cs=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Cl=this.parseExprList(T.parenR,this.options.ecmaVersion>=8,!1,Rn);if(Pe&&!Lt&&this.shouldParseAsyncArrow())return this.checkPatternErrors(Rn,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=_n,this.awaitPos=Hr,this.awaitIdentPos=Cs,this.parseSubscriptAsyncArrow(D,V,Cl,Je);this.checkExpressionErrors(Rn,!0),this.yieldPos=_n||this.yieldPos,this.awaitPos=Hr||this.awaitPos,this.awaitIdentPos=Cs||this.awaitIdentPos;var Yi=this.startNodeAt(D,V);Yi.callee=C,Yi.arguments=Cl,ot&&(Yi.optional=Lt),C=this.finishNode(Yi,"CallExpression")}else if(this.type===T.backQuote){(Lt||Ve)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Ns=this.startNodeAt(D,V);Ns.tag=C,Ns.quasi=this.parseTemplate({isTagged:!0}),C=this.finishNode(Ns,"TaggedTemplateExpression")}return C},Ut.parseExprAtom=function(C,D,V){this.type===T.slash&&this.readRegexp();var ue,Pe=this.potentialArrowAt===this.start;switch(this.type){case T._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),ue=this.startNode(),this.next(),this.type!==T.parenL||this.allowDirectSuper||this.raise(ue.start,"super() call outside constructor of a subclass"),this.type!==T.dot&&this.type!==T.bracketL&&this.type!==T.parenL&&this.unexpected(),this.finishNode(ue,"Super");case T._this:return ue=this.startNode(),this.next(),this.finishNode(ue,"ThisExpression");case T.name:var Ve=this.start,Je=this.startLoc,ot=this.containsEsc,Lt=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!ot&&Lt.name==="async"&&!this.canInsertSemicolon()&&this.eat(T._function))return this.overrideContext(_t.f_expr),this.parseFunction(this.startNodeAt(Ve,Je),0,!1,!0,D);if(Pe&&!this.canInsertSemicolon()){if(this.eat(T.arrow))return this.parseArrowExpression(this.startNodeAt(Ve,Je),[Lt],!1,D);if(this.options.ecmaVersion>=8&&Lt.name==="async"&&this.type===T.name&&!ot&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Lt=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(T.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(Ve,Je),[Lt],!0,D)}return Lt;case T.regexp:var nn=this.value;return(ue=this.parseLiteral(nn.value)).regex={pattern:nn.pattern,flags:nn.flags},ue;case T.num:case T.string:return this.parseLiteral(this.value);case T._null:case T._true:case T._false:return(ue=this.startNode()).value=this.type===T._null?null:this.type===T._true,ue.raw=this.type.keyword,this.next(),this.finishNode(ue,"Literal");case T.parenL:var Xt=this.start,Rn=this.parseParenAndDistinguishExpression(Pe,D);return C&&(C.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Rn)&&(C.parenthesizedAssign=Xt),C.parenthesizedBind<0&&(C.parenthesizedBind=Xt)),Rn;case T.bracketL:return ue=this.startNode(),this.next(),ue.elements=this.parseExprList(T.bracketR,!0,!0,C),this.finishNode(ue,"ArrayExpression");case T.braceL:return this.overrideContext(_t.b_expr),this.parseObj(!1,C);case T._function:return ue=this.startNode(),this.next(),this.parseFunction(ue,0);case T._class:return this.parseClass(this.startNode(),!1);case T._new:return this.parseNew();case T.backQuote:return this.parseTemplate();case T._import:return this.options.ecmaVersion>=11?this.parseExprImport(V):this.unexpected();default:return this.parseExprAtomDefault()}},Ut.parseExprAtomDefault=function(){this.unexpected()},Ut.parseExprImport=function(C){var D=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===T.parenL&&!C)return this.parseDynamicImport(D);if(this.type===T.dot){var V=this.startNodeAt(D.start,D.loc&&D.loc.start);return V.name="import",D.meta=this.finishNode(V,"Identifier"),this.parseImportMeta(D)}this.unexpected()},Ut.parseDynamicImport=function(C){if(this.next(),C.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(T.parenR)?C.options=null:(this.expect(T.comma),this.afterTrailingComma(T.parenR)?C.options=null:(C.options=this.parseMaybeAssign(),this.eat(T.parenR)||(this.expect(T.comma),this.afterTrailingComma(T.parenR)||this.unexpected())));else if(!this.eat(T.parenR)){var D=this.start;this.eat(T.comma)&&this.eat(T.parenR)?this.raiseRecoverable(D,"Trailing comma is not allowed in import()"):this.unexpected(D)}return this.finishNode(C,"ImportExpression")},Ut.parseImportMeta=function(C){this.next();var D=this.containsEsc;return C.property=this.parseIdent(!0),C.property.name!=="meta"&&this.raiseRecoverable(C.property.start,"The only valid meta property for import is 'import.meta'"),D&&this.raiseRecoverable(C.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(C.start,"Cannot use 'import.meta' outside a module"),this.finishNode(C,"MetaProperty")},Ut.parseLiteral=function(C){var D=this.startNode();return D.value=C,D.raw=this.input.slice(this.start,this.end),D.raw.charCodeAt(D.raw.length-1)===110&&(D.bigint=D.value!=null?D.value.toString():D.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(D,"Literal")},Ut.parseParenExpression=function(){this.expect(T.parenL);var C=this.parseExpression();return this.expect(T.parenR),C},Ut.shouldParseArrow=function(C){return!this.canInsertSemicolon()},Ut.parseParenAndDistinguishExpression=function(C,D){var V,ue=this.start,Pe=this.startLoc,Ve=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var Je,ot=this.start,Lt=this.startLoc,nn=[],Xt=!0,Rn=!1,_n=new Te,Hr=this.yieldPos,Cs=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==T.parenR;){if(Xt?Xt=!1:this.expect(T.comma),Ve&&this.afterTrailingComma(T.parenR,!0)){Rn=!0;break}if(this.type===T.ellipsis){Je=this.start,nn.push(this.parseParenItem(this.parseRestBinding())),this.type===T.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}nn.push(this.parseMaybeAssign(!1,_n,this.parseParenItem))}var Cl=this.lastTokEnd,Yi=this.lastTokEndLoc;if(this.expect(T.parenR),C&&this.shouldParseArrow(nn)&&this.eat(T.arrow))return this.checkPatternErrors(_n,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Hr,this.awaitPos=Cs,this.parseParenArrowList(ue,Pe,nn,D);nn.length&&!Rn||this.unexpected(this.lastTokStart),Je&&this.unexpected(Je),this.checkExpressionErrors(_n,!0),this.yieldPos=Hr||this.yieldPos,this.awaitPos=Cs||this.awaitPos,nn.length>1?((V=this.startNodeAt(ot,Lt)).expressions=nn,this.finishNodeAt(V,"SequenceExpression",Cl,Yi)):V=nn[0]}else V=this.parseParenExpression();if(this.options.preserveParens){var Ns=this.startNodeAt(ue,Pe);return Ns.expression=V,this.finishNode(Ns,"ParenthesizedExpression")}return V},Ut.parseParenItem=function(C){return C},Ut.parseParenArrowList=function(C,D,V,ue){return this.parseArrowExpression(this.startNodeAt(C,D),V,!1,ue)};var Ze=[];Ut.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var C=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===T.dot){var D=this.startNodeAt(C.start,C.loc&&C.loc.start);D.name="new",C.meta=this.finishNode(D,"Identifier"),this.next();var V=this.containsEsc;return C.property=this.parseIdent(!0),C.property.name!=="target"&&this.raiseRecoverable(C.property.start,"The only valid meta property for new is 'new.target'"),V&&this.raiseRecoverable(C.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(C.start,"'new.target' can only be used in functions and class static block"),this.finishNode(C,"MetaProperty")}var ue=this.start,Pe=this.startLoc;return C.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),ue,Pe,!0,!1),this.eat(T.parenL)?C.arguments=this.parseExprList(T.parenR,this.options.ecmaVersion>=8,!1):C.arguments=Ze,this.finishNode(C,"NewExpression")},Ut.parseTemplateElement=function(C){var D=C.isTagged,V=this.startNode();return this.type===T.invalidTemplate?(D||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),V.value={raw:this.value.replace(/\r\n?/g,`
391
+ `,V-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(v).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=T.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=C.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&C.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?2:1),this.regexpState=null,this.privateNameStack=[]},Se={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};xe.prototype.parse=function(){var C=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(C)},Se.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Se.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},Se.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},Se.canAwait.get=function(){for(var C=this.scopeStack.length-1;C>=0;C--){var D=this.scopeStack[C].flags;if(768&D)return!1;if(2&D)return(4&D)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Se.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},Se.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},Se.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Se.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Se.allowNewDotTarget.get=function(){for(var C=this.scopeStack.length-1;C>=0;C--){var D=this.scopeStack[C].flags;if(768&D||2&D&&!(16&D))return!0}return!1},Se.allowUsing.get=function(){var C=this.currentScope().flags;return!(1024&C)&&!(!this.inModule&&1&C)},Se.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&j)>0},xe.extend=function(){for(var C=[],D=arguments.length;D--;)C[D]=arguments[D];for(var V=this,ue=0;ue<C.length;ue++)V=C[ue](V);return V},xe.parse=function(C,D){return new this(D,C).parse()},xe.parseExpressionAt=function(C,D,V){var ue=new this(V,C,D);return ue.nextToken(),ue.parseExpression()},xe.tokenizer=function(C,D){return new this(D,C)},Object.defineProperties(xe.prototype,Se);var pe=xe.prototype,ge=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;pe.strictDirective=function(C){if(this.options.ecmaVersion<5)return!1;for(;;){U.lastIndex=C,C+=U.exec(this.input)[0].length;var D=ge.exec(this.input.slice(C));if(!D)return!1;if((D[1]||D[2])==="use strict"){U.lastIndex=C+D[0].length;var V=U.exec(this.input),ue=V.index+V[0].length,Pe=this.input.charAt(ue);return Pe===";"||Pe==="}"||v.test(V[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(Pe)||Pe==="!"&&this.input.charAt(ue+1)==="=")}C+=D[0].length,U.lastIndex=C,C+=U.exec(this.input)[0].length,this.input[C]===";"&&C++}},pe.eat=function(C){return this.type===C&&(this.next(),!0)},pe.isContextual=function(C){return this.type===T.name&&this.value===C&&!this.containsEsc},pe.eatContextual=function(C){return!!this.isContextual(C)&&(this.next(),!0)},pe.expectContextual=function(C){this.eatContextual(C)||this.unexpected()},pe.canInsertSemicolon=function(){return this.type===T.eof||this.type===T.braceR||v.test(this.input.slice(this.lastTokEnd,this.start))},pe.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},pe.semicolon=function(){this.eat(T.semi)||this.insertSemicolon()||this.unexpected()},pe.afterTrailingComma=function(C,D){if(this.type===C)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),D||this.next(),!0},pe.expect=function(C){this.eat(C)||this.unexpected()},pe.unexpected=function(C){this.raise(C??this.start,"Unexpected token")};var Te=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};pe.checkPatternErrors=function(C,D){if(C){C.trailingComma>-1&&this.raiseRecoverable(C.trailingComma,"Comma is not permitted after the rest element");var V=D?C.parenthesizedAssign:C.parenthesizedBind;V>-1&&this.raiseRecoverable(V,D?"Assigning to rvalue":"Parenthesized pattern")}},pe.checkExpressionErrors=function(C,D){if(!C)return!1;var V=C.shorthandAssign,ue=C.doubleProto;if(!D)return V>=0||ue>=0;V>=0&&this.raise(V,"Shorthand property assignments are valid only in destructuring patterns"),ue>=0&&this.raiseRecoverable(ue,"Redefinition of __proto__ property")},pe.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},pe.isSimpleAssignTarget=function(C){return C.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(C.expression):C.type==="Identifier"||C.type==="MemberExpression"};var Ee=xe.prototype;Ee.parseTopLevel=function(C){var D=Object.create(null);for(C.body||(C.body=[]);this.type!==T.eof;){var V=this.parseStatement(null,!0,D);C.body.push(V)}if(this.inModule)for(var ue=0,Pe=Object.keys(this.undefinedExports);ue<Pe.length;ue+=1){var Ve=Pe[ue];this.raiseRecoverable(this.undefinedExports[Ve].start,"Export '"+Ve+"' is not defined")}return this.adaptDirectivePrologue(C.body),this.next(),C.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(C,"Program")};var ve={kind:"loop"},ye={kind:"switch"};Ee.isLet=function(C){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;U.lastIndex=this.pos;var D=U.exec(this.input),V=this.pos+D[0].length,ue=this.fullCharCodeAt(V);if(ue===91||ue===92)return!0;if(C)return!1;if(ue===123)return!0;if(f(ue)){var Pe=V;do V+=ue<=65535?1:2;while(A(ue=this.fullCharCodeAt(V)));if(ue===92)return!0;var Ve=this.input.slice(Pe,V);if(!p.test(Ve))return!0}return!1},Ee.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;U.lastIndex=this.pos;var C,D=U.exec(this.input),V=this.pos+D[0].length;return!(v.test(this.input.slice(this.pos,V))||this.input.slice(V,V+8)!=="function"||V+8!==this.input.length&&(A(C=this.fullCharCodeAt(V+8))||C===92))},Ee.isUsingKeyword=function(C,D){if(this.options.ecmaVersion<17||!this.isContextual(C?"await":"using"))return!1;U.lastIndex=this.pos;var V=U.exec(this.input),ue=this.pos+V[0].length;if(v.test(this.input.slice(this.pos,ue)))return!1;if(C){var Pe,Ve=ue+5;if(this.input.slice(ue,Ve)!=="using"||Ve===this.input.length||A(Pe=this.fullCharCodeAt(Ve))||Pe===92)return!1;U.lastIndex=Ve;var Je=U.exec(this.input);if(ue=Ve+Je[0].length,Je&&v.test(this.input.slice(Ve,ue)))return!1}var ot=this.fullCharCodeAt(ue);if(!f(ot)&&ot!==92)return!1;var Lt=ue;do ue+=ot<=65535?1:2;while(A(ot=this.fullCharCodeAt(ue)));if(ot===92)return!0;var nn=this.input.slice(Lt,ue);return!(p.test(nn)||D&&nn==="of")},Ee.isAwaitUsing=function(C){return this.isUsingKeyword(!0,C)},Ee.isUsing=function(C){return this.isUsingKeyword(!1,C)},Ee.parseStatement=function(C,D,V){var ue,Pe=this.type,Ve=this.startNode();switch(this.isLet(C)&&(Pe=T._var,ue="let"),Pe){case T._break:case T._continue:return this.parseBreakContinueStatement(Ve,Pe.keyword);case T._debugger:return this.parseDebuggerStatement(Ve);case T._do:return this.parseDoStatement(Ve);case T._for:return this.parseForStatement(Ve);case T._function:return C&&(this.strict||C!=="if"&&C!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(Ve,!1,!C);case T._class:return C&&this.unexpected(),this.parseClass(Ve,!0);case T._if:return this.parseIfStatement(Ve);case T._return:return this.parseReturnStatement(Ve);case T._switch:return this.parseSwitchStatement(Ve);case T._throw:return this.parseThrowStatement(Ve);case T._try:return this.parseTryStatement(Ve);case T._const:case T._var:return ue=ue||this.value,C&&ue!=="var"&&this.unexpected(),this.parseVarStatement(Ve,ue);case T._while:return this.parseWhileStatement(Ve);case T._with:return this.parseWithStatement(Ve);case T.braceL:return this.parseBlock(!0,Ve);case T.semi:return this.parseEmptyStatement(Ve);case T._export:case T._import:if(this.options.ecmaVersion>10&&Pe===T._import){U.lastIndex=this.pos;var Je=U.exec(this.input),ot=this.pos+Je[0].length,Lt=this.input.charCodeAt(ot);if(Lt===40||Lt===46)return this.parseExpressionStatement(Ve,this.parseExpression())}return this.options.allowImportExportEverywhere||(D||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),Pe===T._import?this.parseImport(Ve):this.parseExport(Ve,V);default:if(this.isAsyncFunction())return C&&this.unexpected(),this.next(),this.parseFunctionStatement(Ve,!0,!C);var nn=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(nn)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),nn==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(Ve,!1,nn),this.semicolon(),this.finishNode(Ve,"VariableDeclaration");var Xt=this.value,Rn=this.parseExpression();return Pe===T.name&&Rn.type==="Identifier"&&this.eat(T.colon)?this.parseLabeledStatement(Ve,Xt,Rn,C):this.parseExpressionStatement(Ve,Rn)}},Ee.parseBreakContinueStatement=function(C,D){var V=D==="break";this.next(),this.eat(T.semi)||this.insertSemicolon()?C.label=null:this.type!==T.name?this.unexpected():(C.label=this.parseIdent(),this.semicolon());for(var ue=0;ue<this.labels.length;++ue){var Pe=this.labels[ue];if((C.label==null||Pe.name===C.label.name)&&(Pe.kind!=null&&(V||Pe.kind==="loop")||C.label&&V))break}return ue===this.labels.length&&this.raise(C.start,"Unsyntactic "+D),this.finishNode(C,V?"BreakStatement":"ContinueStatement")},Ee.parseDebuggerStatement=function(C){return this.next(),this.semicolon(),this.finishNode(C,"DebuggerStatement")},Ee.parseDoStatement=function(C){return this.next(),this.labels.push(ve),C.body=this.parseStatement("do"),this.labels.pop(),this.expect(T._while),C.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(T.semi):this.semicolon(),this.finishNode(C,"DoWhileStatement")},Ee.parseForStatement=function(C){this.next();var D=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ve),this.enterScope(0),this.expect(T.parenL),this.type===T.semi)return D>-1&&this.unexpected(D),this.parseFor(C,null);var V=this.isLet();if(this.type===T._var||this.type===T._const||V){var ue=this.startNode(),Pe=V?"let":this.value;return this.next(),this.parseVar(ue,!0,Pe),this.finishNode(ue,"VariableDeclaration"),this.parseForAfterInit(C,ue,D)}var Ve=this.isContextual("let"),Je=!1,ot=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(ot){var Lt=this.startNode();return this.next(),ot==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(Lt,!0,ot),this.finishNode(Lt,"VariableDeclaration"),this.parseForAfterInit(C,Lt,D)}var nn=this.containsEsc,Xt=new Te,Rn=this.start,_n=D>-1?this.parseExprSubscripts(Xt,"await"):this.parseExpression(!0,Xt);return this.type===T._in||(Je=this.options.ecmaVersion>=6&&this.isContextual("of"))?(D>-1?(this.type===T._in&&this.unexpected(D),C.await=!0):Je&&this.options.ecmaVersion>=8&&(_n.start!==Rn||nn||_n.type!=="Identifier"||_n.name!=="async"?this.options.ecmaVersion>=9&&(C.await=!1):this.unexpected()),Ve&&Je&&this.raise(_n.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(_n,!1,Xt),this.checkLValPattern(_n),this.parseForIn(C,_n)):(this.checkExpressionErrors(Xt,!0),D>-1&&this.unexpected(D),this.parseFor(C,_n))},Ee.parseForAfterInit=function(C,D,V){return(this.type===T._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&D.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===T._in?V>-1&&this.unexpected(V):C.await=V>-1),this.parseForIn(C,D)):(V>-1&&this.unexpected(V),this.parseFor(C,D))},Ee.parseFunctionStatement=function(C,D,V){return this.next(),this.parseFunction(C,qe|(V?0:He),!1,D)},Ee.parseIfStatement=function(C){return this.next(),C.test=this.parseParenExpression(),C.consequent=this.parseStatement("if"),C.alternate=this.eat(T._else)?this.parseStatement("if"):null,this.finishNode(C,"IfStatement")},Ee.parseReturnStatement=function(C){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(T.semi)||this.insertSemicolon()?C.argument=null:(C.argument=this.parseExpression(),this.semicolon()),this.finishNode(C,"ReturnStatement")},Ee.parseSwitchStatement=function(C){var D;this.next(),C.discriminant=this.parseParenExpression(),C.cases=[],this.expect(T.braceL),this.labels.push(ye),this.enterScope(1024);for(var V=!1;this.type!==T.braceR;)if(this.type===T._case||this.type===T._default){var ue=this.type===T._case;D&&this.finishNode(D,"SwitchCase"),C.cases.push(D=this.startNode()),D.consequent=[],this.next(),ue?D.test=this.parseExpression():(V&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),V=!0,D.test=null),this.expect(T.colon)}else D||this.unexpected(),D.consequent.push(this.parseStatement(null));return this.exitScope(),D&&this.finishNode(D,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(C,"SwitchStatement")},Ee.parseThrowStatement=function(C){return this.next(),v.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),C.argument=this.parseExpression(),this.semicolon(),this.finishNode(C,"ThrowStatement")};var Y=[];Ee.parseCatchClauseParam=function(){var C=this.parseBindingAtom(),D=C.type==="Identifier";return this.enterScope(D?32:0),this.checkLValPattern(C,D?4:2),this.expect(T.parenR),C},Ee.parseTryStatement=function(C){if(this.next(),C.block=this.parseBlock(),C.handler=null,this.type===T._catch){var D=this.startNode();this.next(),this.eat(T.parenL)?D.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),D.param=null,this.enterScope(0)),D.body=this.parseBlock(!1),this.exitScope(),C.handler=this.finishNode(D,"CatchClause")}return C.finalizer=this.eat(T._finally)?this.parseBlock():null,C.handler||C.finalizer||this.raise(C.start,"Missing catch or finally clause"),this.finishNode(C,"TryStatement")},Ee.parseVarStatement=function(C,D,V){return this.next(),this.parseVar(C,!1,D,V),this.semicolon(),this.finishNode(C,"VariableDeclaration")},Ee.parseWhileStatement=function(C){return this.next(),C.test=this.parseParenExpression(),this.labels.push(ve),C.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(C,"WhileStatement")},Ee.parseWithStatement=function(C){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),C.object=this.parseParenExpression(),C.body=this.parseStatement("with"),this.finishNode(C,"WithStatement")},Ee.parseEmptyStatement=function(C){return this.next(),this.finishNode(C,"EmptyStatement")},Ee.parseLabeledStatement=function(C,D,V,ue){for(var Pe=0,Ve=this.labels;Pe<Ve.length;Pe+=1)Ve[Pe].name===D&&this.raise(V.start,"Label '"+D+"' is already declared");for(var Je=this.type.isLoop?"loop":this.type===T._switch?"switch":null,ot=this.labels.length-1;ot>=0;ot--){var Lt=this.labels[ot];if(Lt.statementStart!==C.start)break;Lt.statementStart=this.start,Lt.kind=Je}return this.labels.push({name:D,kind:Je,statementStart:this.start}),C.body=this.parseStatement(ue?ue.indexOf("label")===-1?ue+"label":ue:"label"),this.labels.pop(),C.label=V,this.finishNode(C,"LabeledStatement")},Ee.parseExpressionStatement=function(C,D){return C.expression=D,this.semicolon(),this.finishNode(C,"ExpressionStatement")},Ee.parseBlock=function(C,D,V){for(C===void 0&&(C=!0),D===void 0&&(D=this.startNode()),D.body=[],this.expect(T.braceL),C&&this.enterScope(0);this.type!==T.braceR;){var ue=this.parseStatement(null);D.body.push(ue)}return V&&(this.strict=!1),this.next(),C&&this.exitScope(),this.finishNode(D,"BlockStatement")},Ee.parseFor=function(C,D){return C.init=D,this.expect(T.semi),C.test=this.type===T.semi?null:this.parseExpression(),this.expect(T.semi),C.update=this.type===T.parenR?null:this.parseExpression(),this.expect(T.parenR),C.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(C,"ForStatement")},Ee.parseForIn=function(C,D){var V=this.type===T._in;return this.next(),D.type==="VariableDeclaration"&&D.declarations[0].init!=null&&(!V||this.options.ecmaVersion<8||this.strict||D.kind!=="var"||D.declarations[0].id.type!=="Identifier")&&this.raise(D.start,(V?"for-in":"for-of")+" loop variable declaration may not have an initializer"),C.left=D,C.right=V?this.parseExpression():this.parseMaybeAssign(),this.expect(T.parenR),C.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(C,V?"ForInStatement":"ForOfStatement")},Ee.parseVar=function(C,D,V,ue){for(C.declarations=[],C.kind=V;;){var Pe=this.startNode();if(this.parseVarId(Pe,V),this.eat(T.eq)?Pe.init=this.parseMaybeAssign(D):ue||V!=="const"||this.type===T._in||this.options.ecmaVersion>=6&&this.isContextual("of")?ue||V!=="using"&&V!=="await using"||!(this.options.ecmaVersion>=17)||this.type===T._in||this.isContextual("of")?ue||Pe.id.type==="Identifier"||D&&(this.type===T._in||this.isContextual("of"))?Pe.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+V+" declaration"):this.unexpected(),C.declarations.push(this.finishNode(Pe,"VariableDeclarator")),!this.eat(T.comma))break}return C},Ee.parseVarId=function(C,D){C.id=D==="using"||D==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(C.id,D==="var"?1:2,!1)};var qe=1,He=2;function dt(C,D){var V=D.key.name,ue=C[V],Pe="true";return D.type!=="MethodDefinition"||D.kind!=="get"&&D.kind!=="set"||(Pe=(D.static?"s":"i")+D.kind),ue==="iget"&&Pe==="iset"||ue==="iset"&&Pe==="iget"||ue==="sget"&&Pe==="sset"||ue==="sset"&&Pe==="sget"?(C[V]="true",!1):!!ue||(C[V]=Pe,!1)}function at(C,D){var V=C.computed,ue=C.key;return!V&&(ue.type==="Identifier"&&ue.name===D||ue.type==="Literal"&&ue.value===D)}Ee.parseFunction=function(C,D,V,ue,Pe){this.initFunction(C),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!ue)&&(this.type===T.star&&D&He&&this.unexpected(),C.generator=this.eat(T.star)),this.options.ecmaVersion>=8&&(C.async=!!ue),D&qe&&(C.id=4&D&&this.type!==T.name?null:this.parseIdent(),!C.id||D&He||this.checkLValSimple(C.id,this.strict||C.generator||C.async?this.treatFunctionsAsVar?1:2:3));var Ve=this.yieldPos,Je=this.awaitPos,ot=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(le(C.async,C.generator)),D&qe||(C.id=this.type===T.name?this.parseIdent():null),this.parseFunctionParams(C),this.parseFunctionBody(C,V,!1,Pe),this.yieldPos=Ve,this.awaitPos=Je,this.awaitIdentPos=ot,this.finishNode(C,D&qe?"FunctionDeclaration":"FunctionExpression")},Ee.parseFunctionParams=function(C){this.expect(T.parenL),C.params=this.parseBindingList(T.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Ee.parseClass=function(C,D){this.next();var V=this.strict;this.strict=!0,this.parseClassId(C,D),this.parseClassSuper(C);var ue=this.enterClassBody(),Pe=this.startNode(),Ve=!1;for(Pe.body=[],this.expect(T.braceL);this.type!==T.braceR;){var Je=this.parseClassElement(C.superClass!==null);Je&&(Pe.body.push(Je),Je.type==="MethodDefinition"&&Je.kind==="constructor"?(Ve&&this.raiseRecoverable(Je.start,"Duplicate constructor in the same class"),Ve=!0):Je.key&&Je.key.type==="PrivateIdentifier"&&dt(ue,Je)&&this.raiseRecoverable(Je.key.start,"Identifier '#"+Je.key.name+"' has already been declared"))}return this.strict=V,this.next(),C.body=this.finishNode(Pe,"ClassBody"),this.exitClassBody(),this.finishNode(C,D?"ClassDeclaration":"ClassExpression")},Ee.parseClassElement=function(C){if(this.eat(T.semi))return null;var D=this.options.ecmaVersion,V=this.startNode(),ue="",Pe=!1,Ve=!1,Je="method",ot=!1;if(this.eatContextual("static")){if(D>=13&&this.eat(T.braceL))return this.parseClassStaticBlock(V),V;this.isClassElementNameStart()||this.type===T.star?ot=!0:ue="static"}if(V.static=ot,!ue&&D>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==T.star||this.canInsertSemicolon()?ue="async":Ve=!0),!ue&&(D>=9||!Ve)&&this.eat(T.star)&&(Pe=!0),!ue&&!Ve&&!Pe){var Lt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?Je=Lt:ue=Lt)}if(ue?(V.computed=!1,V.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),V.key.name=ue,this.finishNode(V.key,"Identifier")):this.parseClassElementName(V),D<13||this.type===T.parenL||Je!=="method"||Pe||Ve){var nn=!V.static&&at(V,"constructor"),Xt=nn&&C;nn&&Je!=="method"&&this.raise(V.key.start,"Constructor can't have get/set modifier"),V.kind=nn?"constructor":Je,this.parseClassMethod(V,Pe,Ve,Xt)}else this.parseClassField(V);return V},Ee.isClassElementNameStart=function(){return this.type===T.name||this.type===T.privateId||this.type===T.num||this.type===T.string||this.type===T.bracketL||this.type.keyword},Ee.parseClassElementName=function(C){this.type===T.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),C.computed=!1,C.key=this.parsePrivateIdent()):this.parsePropertyName(C)},Ee.parseClassMethod=function(C,D,V,ue){var Pe=C.key;C.kind==="constructor"?(D&&this.raise(Pe.start,"Constructor can't be a generator"),V&&this.raise(Pe.start,"Constructor can't be an async method")):C.static&&at(C,"prototype")&&this.raise(Pe.start,"Classes may not have a static property named prototype");var Ve=C.value=this.parseMethod(D,V,ue);return C.kind==="get"&&Ve.params.length!==0&&this.raiseRecoverable(Ve.start,"getter should have no params"),C.kind==="set"&&Ve.params.length!==1&&this.raiseRecoverable(Ve.start,"setter should have exactly one param"),C.kind==="set"&&Ve.params[0].type==="RestElement"&&this.raiseRecoverable(Ve.params[0].start,"Setter cannot use rest params"),this.finishNode(C,"MethodDefinition")},Ee.parseClassField=function(C){return at(C,"constructor")?this.raise(C.key.start,"Classes can't have a field named 'constructor'"):C.static&&at(C,"prototype")&&this.raise(C.key.start,"Classes can't have a static field named 'prototype'"),this.eat(T.eq)?(this.enterScope(576),C.value=this.parseMaybeAssign(),this.exitScope()):C.value=null,this.semicolon(),this.finishNode(C,"PropertyDefinition")},Ee.parseClassStaticBlock=function(C){C.body=[];var D=this.labels;for(this.labels=[],this.enterScope(320);this.type!==T.braceR;){var V=this.parseStatement(null);C.body.push(V)}return this.next(),this.exitScope(),this.labels=D,this.finishNode(C,"StaticBlock")},Ee.parseClassId=function(C,D){this.type===T.name?(C.id=this.parseIdent(),D&&this.checkLValSimple(C.id,2,!1)):(D===!0&&this.unexpected(),C.id=null)},Ee.parseClassSuper=function(C){C.superClass=this.eat(T._extends)?this.parseExprSubscripts(null,!1):null},Ee.enterClassBody=function(){var C={declared:Object.create(null),used:[]};return this.privateNameStack.push(C),C.declared},Ee.exitClassBody=function(){var C=this.privateNameStack.pop(),D=C.declared,V=C.used;if(this.options.checkPrivateFields)for(var ue=this.privateNameStack.length,Pe=ue===0?null:this.privateNameStack[ue-1],Ve=0;Ve<V.length;++Ve){var Je=V[Ve];te(D,Je.name)||(Pe?Pe.used.push(Je):this.raiseRecoverable(Je.start,"Private field '#"+Je.name+"' must be declared in an enclosing class"))}},Ee.parseExportAllDeclaration=function(C,D){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(C.exported=this.parseModuleExportName(),this.checkExport(D,C.exported,this.lastTokStart)):C.exported=null),this.expectContextual("from"),this.type!==T.string&&this.unexpected(),C.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(C.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(C,"ExportAllDeclaration")},Ee.parseExport=function(C,D){if(this.next(),this.eat(T.star))return this.parseExportAllDeclaration(C,D);if(this.eat(T._default))return this.checkExport(D,"default",this.lastTokStart),C.declaration=this.parseExportDefaultDeclaration(),this.finishNode(C,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())C.declaration=this.parseExportDeclaration(C),C.declaration.type==="VariableDeclaration"?this.checkVariableExport(D,C.declaration.declarations):this.checkExport(D,C.declaration.id,C.declaration.id.start),C.specifiers=[],C.source=null,this.options.ecmaVersion>=16&&(C.attributes=[]);else{if(C.declaration=null,C.specifiers=this.parseExportSpecifiers(D),this.eatContextual("from"))this.type!==T.string&&this.unexpected(),C.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(C.attributes=this.parseWithClause());else{for(var V=0,ue=C.specifiers;V<ue.length;V+=1){var Pe=ue[V];this.checkUnreserved(Pe.local),this.checkLocalExport(Pe.local),Pe.local.type==="Literal"&&this.raise(Pe.local.start,"A string literal cannot be used as an exported binding without `from`.")}C.source=null,this.options.ecmaVersion>=16&&(C.attributes=[])}this.semicolon()}return this.finishNode(C,"ExportNamedDeclaration")},Ee.parseExportDeclaration=function(C){return this.parseStatement(null)},Ee.parseExportDefaultDeclaration=function(){var C;if(this.type===T._function||(C=this.isAsyncFunction())){var D=this.startNode();return this.next(),C&&this.next(),this.parseFunction(D,4|qe,!1,C)}if(this.type===T._class){var V=this.startNode();return this.parseClass(V,"nullableID")}var ue=this.parseMaybeAssign();return this.semicolon(),ue},Ee.checkExport=function(C,D,V){C&&(typeof D!="string"&&(D=D.type==="Identifier"?D.name:D.value),te(C,D)&&this.raiseRecoverable(V,"Duplicate export '"+D+"'"),C[D]=!0)},Ee.checkPatternExport=function(C,D){var V=D.type;if(V==="Identifier")this.checkExport(C,D,D.start);else if(V==="ObjectPattern")for(var ue=0,Pe=D.properties;ue<Pe.length;ue+=1){var Ve=Pe[ue];this.checkPatternExport(C,Ve)}else if(V==="ArrayPattern")for(var Je=0,ot=D.elements;Je<ot.length;Je+=1){var Lt=ot[Je];Lt&&this.checkPatternExport(C,Lt)}else V==="Property"?this.checkPatternExport(C,D.value):V==="AssignmentPattern"?this.checkPatternExport(C,D.left):V==="RestElement"&&this.checkPatternExport(C,D.argument)},Ee.checkVariableExport=function(C,D){if(C)for(var V=0,ue=D;V<ue.length;V+=1){var Pe=ue[V];this.checkPatternExport(C,Pe.id)}},Ee.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},Ee.parseExportSpecifier=function(C){var D=this.startNode();return D.local=this.parseModuleExportName(),D.exported=this.eatContextual("as")?this.parseModuleExportName():D.local,this.checkExport(C,D.exported,D.exported.start),this.finishNode(D,"ExportSpecifier")},Ee.parseExportSpecifiers=function(C){var D=[],V=!0;for(this.expect(T.braceL);!this.eat(T.braceR);){if(V)V=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;D.push(this.parseExportSpecifier(C))}return D},Ee.parseImport=function(C){return this.next(),this.type===T.string?(C.specifiers=Y,C.source=this.parseExprAtom()):(C.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),C.source=this.type===T.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(C.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(C,"ImportDeclaration")},Ee.parseImportSpecifier=function(){var C=this.startNode();return C.imported=this.parseModuleExportName(),this.eatContextual("as")?C.local=this.parseIdent():(this.checkUnreserved(C.imported),C.local=C.imported),this.checkLValSimple(C.local,2),this.finishNode(C,"ImportSpecifier")},Ee.parseImportDefaultSpecifier=function(){var C=this.startNode();return C.local=this.parseIdent(),this.checkLValSimple(C.local,2),this.finishNode(C,"ImportDefaultSpecifier")},Ee.parseImportNamespaceSpecifier=function(){var C=this.startNode();return this.next(),this.expectContextual("as"),C.local=this.parseIdent(),this.checkLValSimple(C.local,2),this.finishNode(C,"ImportNamespaceSpecifier")},Ee.parseImportSpecifiers=function(){var C=[],D=!0;if(this.type===T.name&&(C.push(this.parseImportDefaultSpecifier()),!this.eat(T.comma)))return C;if(this.type===T.star)return C.push(this.parseImportNamespaceSpecifier()),C;for(this.expect(T.braceL);!this.eat(T.braceR);){if(D)D=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;C.push(this.parseImportSpecifier())}return C},Ee.parseWithClause=function(){var C=[];if(!this.eat(T._with))return C;this.expect(T.braceL);for(var D={},V=!0;!this.eat(T.braceR);){if(V)V=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;var ue=this.parseImportAttribute(),Pe=ue.key.type==="Identifier"?ue.key.name:ue.key.value;te(D,Pe)&&this.raiseRecoverable(ue.key.start,"Duplicate attribute key '"+Pe+"'"),D[Pe]=!0,C.push(ue)}return C},Ee.parseImportAttribute=function(){var C=this.startNode();return C.key=this.type===T.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(T.colon),this.type!==T.string&&this.unexpected(),C.value=this.parseExprAtom(),this.finishNode(C,"ImportAttribute")},Ee.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===T.string){var C=this.parseLiteral(this.value);return Re.test(C.value)&&this.raise(C.start,"An export name cannot include a lone surrogate."),C}return this.parseIdent(!0)},Ee.adaptDirectivePrologue=function(C){for(var D=0;D<C.length&&this.isDirectiveCandidate(C[D]);++D)C[D].directive=C[D].expression.raw.slice(1,-1)},Ee.isDirectiveCandidate=function(C){return this.options.ecmaVersion>=5&&C.type==="ExpressionStatement"&&C.expression.type==="Literal"&&typeof C.expression.value=="string"&&(this.input[C.start]==='"'||this.input[C.start]==="'")};var ze=xe.prototype;ze.toAssignable=function(C,D,V){if(this.options.ecmaVersion>=6&&C)switch(C.type){case"Identifier":this.inAsync&&C.name==="await"&&this.raise(C.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":C.type="ObjectPattern",V&&this.checkPatternErrors(V,!0);for(var ue=0,Pe=C.properties;ue<Pe.length;ue+=1){var Ve=Pe[ue];this.toAssignable(Ve,D),Ve.type!=="RestElement"||Ve.argument.type!=="ArrayPattern"&&Ve.argument.type!=="ObjectPattern"||this.raise(Ve.argument.start,"Unexpected token")}break;case"Property":C.kind!=="init"&&this.raise(C.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(C.value,D);break;case"ArrayExpression":C.type="ArrayPattern",V&&this.checkPatternErrors(V,!0),this.toAssignableList(C.elements,D);break;case"SpreadElement":C.type="RestElement",this.toAssignable(C.argument,D),C.argument.type==="AssignmentPattern"&&this.raise(C.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":C.operator!=="="&&this.raise(C.left.end,"Only '=' operator can be used for specifying default value."),C.type="AssignmentPattern",delete C.operator,this.toAssignable(C.left,D);break;case"ParenthesizedExpression":this.toAssignable(C.expression,D,V);break;case"ChainExpression":this.raiseRecoverable(C.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!D)break;default:this.raise(C.start,"Assigning to rvalue")}else V&&this.checkPatternErrors(V,!0);return C},ze.toAssignableList=function(C,D){for(var V=C.length,ue=0;ue<V;ue++){var Pe=C[ue];Pe&&this.toAssignable(Pe,D)}if(V){var Ve=C[V-1];this.options.ecmaVersion===6&&D&&Ve&&Ve.type==="RestElement"&&Ve.argument.type!=="Identifier"&&this.unexpected(Ve.argument.start)}return C},ze.parseSpread=function(C){var D=this.startNode();return this.next(),D.argument=this.parseMaybeAssign(!1,C),this.finishNode(D,"SpreadElement")},ze.parseRestBinding=function(){var C=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==T.name&&this.unexpected(),C.argument=this.parseBindingAtom(),this.finishNode(C,"RestElement")},ze.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case T.bracketL:var C=this.startNode();return this.next(),C.elements=this.parseBindingList(T.bracketR,!0,!0),this.finishNode(C,"ArrayPattern");case T.braceL:return this.parseObj(!0)}return this.parseIdent()},ze.parseBindingList=function(C,D,V,ue){for(var Pe=[],Ve=!0;!this.eat(C);)if(Ve?Ve=!1:this.expect(T.comma),D&&this.type===T.comma)Pe.push(null);else{if(V&&this.afterTrailingComma(C))break;if(this.type===T.ellipsis){var Je=this.parseRestBinding();this.parseBindingListItem(Je),Pe.push(Je),this.type===T.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(C);break}Pe.push(this.parseAssignableListItem(ue))}return Pe},ze.parseAssignableListItem=function(C){var D=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(D),D},ze.parseBindingListItem=function(C){return C},ze.parseMaybeDefault=function(C,D,V){if(V=V||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(T.eq))return V;var ue=this.startNodeAt(C,D);return ue.left=V,ue.right=this.parseMaybeAssign(),this.finishNode(ue,"AssignmentPattern")},ze.checkLValSimple=function(C,D,V){D===void 0&&(D=0);var ue=D!==0;switch(C.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(C.name)&&this.raiseRecoverable(C.start,(ue?"Binding ":"Assigning to ")+C.name+" in strict mode"),ue&&(D===2&&C.name==="let"&&this.raiseRecoverable(C.start,"let is disallowed as a lexically bound name"),V&&(te(V,C.name)&&this.raiseRecoverable(C.start,"Argument name clash"),V[C.name]=!0),D!==5&&this.declareName(C.name,D,C.start));break;case"ChainExpression":this.raiseRecoverable(C.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":ue&&this.raiseRecoverable(C.start,"Binding member expression");break;case"ParenthesizedExpression":return ue&&this.raiseRecoverable(C.start,"Binding parenthesized expression"),this.checkLValSimple(C.expression,D,V);default:this.raise(C.start,(ue?"Binding":"Assigning to")+" rvalue")}},ze.checkLValPattern=function(C,D,V){switch(D===void 0&&(D=0),C.type){case"ObjectPattern":for(var ue=0,Pe=C.properties;ue<Pe.length;ue+=1){var Ve=Pe[ue];this.checkLValInnerPattern(Ve,D,V)}break;case"ArrayPattern":for(var Je=0,ot=C.elements;Je<ot.length;Je+=1){var Lt=ot[Je];Lt&&this.checkLValInnerPattern(Lt,D,V)}break;default:this.checkLValSimple(C,D,V)}},ze.checkLValInnerPattern=function(C,D,V){switch(D===void 0&&(D=0),C.type){case"Property":this.checkLValInnerPattern(C.value,D,V);break;case"AssignmentPattern":this.checkLValPattern(C.left,D,V);break;case"RestElement":this.checkLValPattern(C.argument,D,V);break;default:this.checkLValPattern(C,D,V)}};var rt=function(C,D,V,ue,Pe){this.token=C,this.isExpr=!!D,this.preserveSpace=!!V,this.override=ue,this.generator=!!Pe},_t={b_stat:new rt("{",!1),b_expr:new rt("{",!0),b_tmpl:new rt("${",!1),p_stat:new rt("(",!1),p_expr:new rt("(",!0),q_tmpl:new rt("`",!0,!0,function(C){return C.tryReadTemplateToken()}),f_stat:new rt("function",!1),f_expr:new rt("function",!0),f_expr_gen:new rt("function",!0,!1,null,!0),f_gen:new rt("function",!1,!1,null,!0)},Zt=xe.prototype;Zt.initialContext=function(){return[_t.b_stat]},Zt.curContext=function(){return this.context[this.context.length-1]},Zt.braceIsBlock=function(C){var D=this.curContext();return D===_t.f_expr||D===_t.f_stat||(C!==T.colon||D!==_t.b_stat&&D!==_t.b_expr?C===T._return||C===T.name&&this.exprAllowed?v.test(this.input.slice(this.lastTokEnd,this.start)):C===T._else||C===T.semi||C===T.eof||C===T.parenR||C===T.arrow||(C===T.braceL?D===_t.b_stat:C!==T._var&&C!==T._const&&C!==T.name&&!this.exprAllowed):!D.isExpr)},Zt.inGeneratorContext=function(){for(var C=this.context.length-1;C>=1;C--){var D=this.context[C];if(D.token==="function")return D.generator}return!1},Zt.updateContext=function(C){var D,V=this.type;V.keyword&&C===T.dot?this.exprAllowed=!1:(D=V.updateContext)?D.call(this,C):this.exprAllowed=V.beforeExpr},Zt.overrideContext=function(C){this.curContext()!==C&&(this.context[this.context.length-1]=C)},T.parenR.updateContext=T.braceR.updateContext=function(){if(this.context.length!==1){var C=this.context.pop();C===_t.b_stat&&this.curContext().token==="function"&&(C=this.context.pop()),this.exprAllowed=!C.isExpr}else this.exprAllowed=!0},T.braceL.updateContext=function(C){this.context.push(this.braceIsBlock(C)?_t.b_stat:_t.b_expr),this.exprAllowed=!0},T.dollarBraceL.updateContext=function(){this.context.push(_t.b_tmpl),this.exprAllowed=!0},T.parenL.updateContext=function(C){var D=C===T._if||C===T._for||C===T._with||C===T._while;this.context.push(D?_t.p_stat:_t.p_expr),this.exprAllowed=!0},T.incDec.updateContext=function(){},T._function.updateContext=T._class.updateContext=function(C){!C.beforeExpr||C===T._else||C===T.semi&&this.curContext()!==_t.p_stat||C===T._return&&v.test(this.input.slice(this.lastTokEnd,this.start))||(C===T.colon||C===T.braceL)&&this.curContext()===_t.b_stat?this.context.push(_t.f_stat):this.context.push(_t.f_expr),this.exprAllowed=!1},T.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},T.backQuote.updateContext=function(){this.curContext()===_t.q_tmpl?this.context.pop():this.context.push(_t.q_tmpl),this.exprAllowed=!1},T.star.updateContext=function(C){if(C===T._function){var D=this.context.length-1;this.context[D]===_t.f_expr?this.context[D]=_t.f_expr_gen:this.context[D]=_t.f_gen}this.exprAllowed=!0},T.name.updateContext=function(C){var D=!1;this.options.ecmaVersion>=6&&C!==T.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(D=!0),this.exprAllowed=D};var Ut=xe.prototype;function $t(C){return C.type==="Identifier"||C.type==="ParenthesizedExpression"&&$t(C.expression)}function Ot(C){return C.type==="MemberExpression"&&C.property.type==="PrivateIdentifier"||C.type==="ChainExpression"&&Ot(C.expression)||C.type==="ParenthesizedExpression"&&Ot(C.expression)}Ut.checkPropClash=function(C,D,V){if(!(this.options.ecmaVersion>=9&&C.type==="SpreadElement"||this.options.ecmaVersion>=6&&(C.computed||C.method||C.shorthand))){var ue,Pe=C.key;switch(Pe.type){case"Identifier":ue=Pe.name;break;case"Literal":ue=String(Pe.value);break;default:return}var Ve=C.kind;if(this.options.ecmaVersion>=6)ue==="__proto__"&&Ve==="init"&&(D.proto&&(V?V.doubleProto<0&&(V.doubleProto=Pe.start):this.raiseRecoverable(Pe.start,"Redefinition of __proto__ property")),D.proto=!0);else{var Je=D[ue="$"+ue];Je?(Ve==="init"?this.strict&&Je.init||Je.get||Je.set:Je.init||Je[Ve])&&this.raiseRecoverable(Pe.start,"Redefinition of property"):Je=D[ue]={init:!1,get:!1,set:!1},Je[Ve]=!0}}},Ut.parseExpression=function(C,D){var V=this.start,ue=this.startLoc,Pe=this.parseMaybeAssign(C,D);if(this.type===T.comma){var Ve=this.startNodeAt(V,ue);for(Ve.expressions=[Pe];this.eat(T.comma);)Ve.expressions.push(this.parseMaybeAssign(C,D));return this.finishNode(Ve,"SequenceExpression")}return Pe},Ut.parseMaybeAssign=function(C,D,V){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(C);this.exprAllowed=!1}var ue=!1,Pe=-1,Ve=-1,Je=-1;D?(Pe=D.parenthesizedAssign,Ve=D.trailingComma,Je=D.doubleProto,D.parenthesizedAssign=D.trailingComma=-1):(D=new Te,ue=!0);var ot=this.start,Lt=this.startLoc;this.type!==T.parenL&&this.type!==T.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=C==="await");var nn=this.parseMaybeConditional(C,D);if(V&&(nn=V.call(this,nn,ot,Lt)),this.type.isAssign){var Xt=this.startNodeAt(ot,Lt);return Xt.operator=this.value,this.type===T.eq&&(nn=this.toAssignable(nn,!1,D)),ue||(D.parenthesizedAssign=D.trailingComma=D.doubleProto=-1),D.shorthandAssign>=nn.start&&(D.shorthandAssign=-1),this.type===T.eq?this.checkLValPattern(nn):this.checkLValSimple(nn),Xt.left=nn,this.next(),Xt.right=this.parseMaybeAssign(C),Je>-1&&(D.doubleProto=Je),this.finishNode(Xt,"AssignmentExpression")}return ue&&this.checkExpressionErrors(D,!0),Pe>-1&&(D.parenthesizedAssign=Pe),Ve>-1&&(D.trailingComma=Ve),nn},Ut.parseMaybeConditional=function(C,D){var V=this.start,ue=this.startLoc,Pe=this.parseExprOps(C,D);if(this.checkExpressionErrors(D))return Pe;if(this.eat(T.question)){var Ve=this.startNodeAt(V,ue);return Ve.test=Pe,Ve.consequent=this.parseMaybeAssign(),this.expect(T.colon),Ve.alternate=this.parseMaybeAssign(C),this.finishNode(Ve,"ConditionalExpression")}return Pe},Ut.parseExprOps=function(C,D){var V=this.start,ue=this.startLoc,Pe=this.parseMaybeUnary(D,!1,!1,C);return this.checkExpressionErrors(D)||Pe.start===V&&Pe.type==="ArrowFunctionExpression"?Pe:this.parseExprOp(Pe,V,ue,-1,C)},Ut.parseExprOp=function(C,D,V,ue,Pe){var Ve=this.type.binop;if(Ve!=null&&(!Pe||this.type!==T._in)&&Ve>ue){var Je=this.type===T.logicalOR||this.type===T.logicalAND,ot=this.type===T.coalesce;ot&&(Ve=T.logicalAND.binop);var Lt=this.value;this.next();var nn=this.start,Xt=this.startLoc,Rn=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,Pe),nn,Xt,Ve,Pe),_n=this.buildBinary(D,V,C,Rn,Lt,Je||ot);return(Je&&this.type===T.coalesce||ot&&(this.type===T.logicalOR||this.type===T.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(_n,D,V,ue,Pe)}return C},Ut.buildBinary=function(C,D,V,ue,Pe,Ve){ue.type==="PrivateIdentifier"&&this.raise(ue.start,"Private identifier can only be left side of binary expression");var Je=this.startNodeAt(C,D);return Je.left=V,Je.operator=Pe,Je.right=ue,this.finishNode(Je,Ve?"LogicalExpression":"BinaryExpression")},Ut.parseMaybeUnary=function(C,D,V,ue){var Pe,Ve=this.start,Je=this.startLoc;if(this.isContextual("await")&&this.canAwait)Pe=this.parseAwait(ue),D=!0;else if(this.type.prefix){var ot=this.startNode(),Lt=this.type===T.incDec;ot.operator=this.value,ot.prefix=!0,this.next(),ot.argument=this.parseMaybeUnary(null,!0,Lt,ue),this.checkExpressionErrors(C,!0),Lt?this.checkLValSimple(ot.argument):this.strict&&ot.operator==="delete"&&$t(ot.argument)?this.raiseRecoverable(ot.start,"Deleting local variable in strict mode"):ot.operator==="delete"&&Ot(ot.argument)?this.raiseRecoverable(ot.start,"Private fields can not be deleted"):D=!0,Pe=this.finishNode(ot,Lt?"UpdateExpression":"UnaryExpression")}else if(D||this.type!==T.privateId){if(Pe=this.parseExprSubscripts(C,ue),this.checkExpressionErrors(C))return Pe;for(;this.type.postfix&&!this.canInsertSemicolon();){var nn=this.startNodeAt(Ve,Je);nn.operator=this.value,nn.prefix=!1,nn.argument=Pe,this.checkLValSimple(Pe),this.next(),Pe=this.finishNode(nn,"UpdateExpression")}}else(ue||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),Pe=this.parsePrivateIdent(),this.type!==T._in&&this.unexpected();return V||!this.eat(T.starstar)?Pe:D?void this.unexpected(this.lastTokStart):this.buildBinary(Ve,Je,Pe,this.parseMaybeUnary(null,!1,!1,ue),"**",!1)},Ut.parseExprSubscripts=function(C,D){var V=this.start,ue=this.startLoc,Pe=this.parseExprAtom(C,D);if(Pe.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return Pe;var Ve=this.parseSubscripts(Pe,V,ue,!1,D);return C&&Ve.type==="MemberExpression"&&(C.parenthesizedAssign>=Ve.start&&(C.parenthesizedAssign=-1),C.parenthesizedBind>=Ve.start&&(C.parenthesizedBind=-1),C.trailingComma>=Ve.start&&(C.trailingComma=-1)),Ve},Ut.parseSubscripts=function(C,D,V,ue,Pe){for(var Ve=this.options.ecmaVersion>=8&&C.type==="Identifier"&&C.name==="async"&&this.lastTokEnd===C.end&&!this.canInsertSemicolon()&&C.end-C.start===5&&this.potentialArrowAt===C.start,Je=!1;;){var ot=this.parseSubscript(C,D,V,ue,Ve,Je,Pe);if(ot.optional&&(Je=!0),ot===C||ot.type==="ArrowFunctionExpression"){if(Je){var Lt=this.startNodeAt(D,V);Lt.expression=ot,ot=this.finishNode(Lt,"ChainExpression")}return ot}C=ot}},Ut.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(T.arrow)},Ut.parseSubscriptAsyncArrow=function(C,D,V,ue){return this.parseArrowExpression(this.startNodeAt(C,D),V,!0,ue)},Ut.parseSubscript=function(C,D,V,ue,Pe,Ve,Je){var ot=this.options.ecmaVersion>=11,Lt=ot&&this.eat(T.questionDot);ue&&Lt&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var nn=this.eat(T.bracketL);if(nn||Lt&&this.type!==T.parenL&&this.type!==T.backQuote||this.eat(T.dot)){var Xt=this.startNodeAt(D,V);Xt.object=C,nn?(Xt.property=this.parseExpression(),this.expect(T.bracketR)):this.type===T.privateId&&C.type!=="Super"?Xt.property=this.parsePrivateIdent():Xt.property=this.parseIdent(this.options.allowReserved!=="never"),Xt.computed=!!nn,ot&&(Xt.optional=Lt),C=this.finishNode(Xt,"MemberExpression")}else if(!ue&&this.eat(T.parenL)){var Rn=new Te,_n=this.yieldPos,Hr=this.awaitPos,Ts=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Cl=this.parseExprList(T.parenR,this.options.ecmaVersion>=8,!1,Rn);if(Pe&&!Lt&&this.shouldParseAsyncArrow())return this.checkPatternErrors(Rn,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=_n,this.awaitPos=Hr,this.awaitIdentPos=Ts,this.parseSubscriptAsyncArrow(D,V,Cl,Je);this.checkExpressionErrors(Rn,!0),this.yieldPos=_n||this.yieldPos,this.awaitPos=Hr||this.awaitPos,this.awaitIdentPos=Ts||this.awaitIdentPos;var Yi=this.startNodeAt(D,V);Yi.callee=C,Yi.arguments=Cl,ot&&(Yi.optional=Lt),C=this.finishNode(Yi,"CallExpression")}else if(this.type===T.backQuote){(Lt||Ve)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Ns=this.startNodeAt(D,V);Ns.tag=C,Ns.quasi=this.parseTemplate({isTagged:!0}),C=this.finishNode(Ns,"TaggedTemplateExpression")}return C},Ut.parseExprAtom=function(C,D,V){this.type===T.slash&&this.readRegexp();var ue,Pe=this.potentialArrowAt===this.start;switch(this.type){case T._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),ue=this.startNode(),this.next(),this.type!==T.parenL||this.allowDirectSuper||this.raise(ue.start,"super() call outside constructor of a subclass"),this.type!==T.dot&&this.type!==T.bracketL&&this.type!==T.parenL&&this.unexpected(),this.finishNode(ue,"Super");case T._this:return ue=this.startNode(),this.next(),this.finishNode(ue,"ThisExpression");case T.name:var Ve=this.start,Je=this.startLoc,ot=this.containsEsc,Lt=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!ot&&Lt.name==="async"&&!this.canInsertSemicolon()&&this.eat(T._function))return this.overrideContext(_t.f_expr),this.parseFunction(this.startNodeAt(Ve,Je),0,!1,!0,D);if(Pe&&!this.canInsertSemicolon()){if(this.eat(T.arrow))return this.parseArrowExpression(this.startNodeAt(Ve,Je),[Lt],!1,D);if(this.options.ecmaVersion>=8&&Lt.name==="async"&&this.type===T.name&&!ot&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Lt=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(T.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(Ve,Je),[Lt],!0,D)}return Lt;case T.regexp:var nn=this.value;return(ue=this.parseLiteral(nn.value)).regex={pattern:nn.pattern,flags:nn.flags},ue;case T.num:case T.string:return this.parseLiteral(this.value);case T._null:case T._true:case T._false:return(ue=this.startNode()).value=this.type===T._null?null:this.type===T._true,ue.raw=this.type.keyword,this.next(),this.finishNode(ue,"Literal");case T.parenL:var Xt=this.start,Rn=this.parseParenAndDistinguishExpression(Pe,D);return C&&(C.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Rn)&&(C.parenthesizedAssign=Xt),C.parenthesizedBind<0&&(C.parenthesizedBind=Xt)),Rn;case T.bracketL:return ue=this.startNode(),this.next(),ue.elements=this.parseExprList(T.bracketR,!0,!0,C),this.finishNode(ue,"ArrayExpression");case T.braceL:return this.overrideContext(_t.b_expr),this.parseObj(!1,C);case T._function:return ue=this.startNode(),this.next(),this.parseFunction(ue,0);case T._class:return this.parseClass(this.startNode(),!1);case T._new:return this.parseNew();case T.backQuote:return this.parseTemplate();case T._import:return this.options.ecmaVersion>=11?this.parseExprImport(V):this.unexpected();default:return this.parseExprAtomDefault()}},Ut.parseExprAtomDefault=function(){this.unexpected()},Ut.parseExprImport=function(C){var D=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===T.parenL&&!C)return this.parseDynamicImport(D);if(this.type===T.dot){var V=this.startNodeAt(D.start,D.loc&&D.loc.start);return V.name="import",D.meta=this.finishNode(V,"Identifier"),this.parseImportMeta(D)}this.unexpected()},Ut.parseDynamicImport=function(C){if(this.next(),C.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(T.parenR)?C.options=null:(this.expect(T.comma),this.afterTrailingComma(T.parenR)?C.options=null:(C.options=this.parseMaybeAssign(),this.eat(T.parenR)||(this.expect(T.comma),this.afterTrailingComma(T.parenR)||this.unexpected())));else if(!this.eat(T.parenR)){var D=this.start;this.eat(T.comma)&&this.eat(T.parenR)?this.raiseRecoverable(D,"Trailing comma is not allowed in import()"):this.unexpected(D)}return this.finishNode(C,"ImportExpression")},Ut.parseImportMeta=function(C){this.next();var D=this.containsEsc;return C.property=this.parseIdent(!0),C.property.name!=="meta"&&this.raiseRecoverable(C.property.start,"The only valid meta property for import is 'import.meta'"),D&&this.raiseRecoverable(C.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(C.start,"Cannot use 'import.meta' outside a module"),this.finishNode(C,"MetaProperty")},Ut.parseLiteral=function(C){var D=this.startNode();return D.value=C,D.raw=this.input.slice(this.start,this.end),D.raw.charCodeAt(D.raw.length-1)===110&&(D.bigint=D.value!=null?D.value.toString():D.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(D,"Literal")},Ut.parseParenExpression=function(){this.expect(T.parenL);var C=this.parseExpression();return this.expect(T.parenR),C},Ut.shouldParseArrow=function(C){return!this.canInsertSemicolon()},Ut.parseParenAndDistinguishExpression=function(C,D){var V,ue=this.start,Pe=this.startLoc,Ve=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var Je,ot=this.start,Lt=this.startLoc,nn=[],Xt=!0,Rn=!1,_n=new Te,Hr=this.yieldPos,Ts=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==T.parenR;){if(Xt?Xt=!1:this.expect(T.comma),Ve&&this.afterTrailingComma(T.parenR,!0)){Rn=!0;break}if(this.type===T.ellipsis){Je=this.start,nn.push(this.parseParenItem(this.parseRestBinding())),this.type===T.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}nn.push(this.parseMaybeAssign(!1,_n,this.parseParenItem))}var Cl=this.lastTokEnd,Yi=this.lastTokEndLoc;if(this.expect(T.parenR),C&&this.shouldParseArrow(nn)&&this.eat(T.arrow))return this.checkPatternErrors(_n,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Hr,this.awaitPos=Ts,this.parseParenArrowList(ue,Pe,nn,D);nn.length&&!Rn||this.unexpected(this.lastTokStart),Je&&this.unexpected(Je),this.checkExpressionErrors(_n,!0),this.yieldPos=Hr||this.yieldPos,this.awaitPos=Ts||this.awaitPos,nn.length>1?((V=this.startNodeAt(ot,Lt)).expressions=nn,this.finishNodeAt(V,"SequenceExpression",Cl,Yi)):V=nn[0]}else V=this.parseParenExpression();if(this.options.preserveParens){var Ns=this.startNodeAt(ue,Pe);return Ns.expression=V,this.finishNode(Ns,"ParenthesizedExpression")}return V},Ut.parseParenItem=function(C){return C},Ut.parseParenArrowList=function(C,D,V,ue){return this.parseArrowExpression(this.startNodeAt(C,D),V,!1,ue)};var Ze=[];Ut.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var C=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===T.dot){var D=this.startNodeAt(C.start,C.loc&&C.loc.start);D.name="new",C.meta=this.finishNode(D,"Identifier"),this.next();var V=this.containsEsc;return C.property=this.parseIdent(!0),C.property.name!=="target"&&this.raiseRecoverable(C.property.start,"The only valid meta property for new is 'new.target'"),V&&this.raiseRecoverable(C.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(C.start,"'new.target' can only be used in functions and class static block"),this.finishNode(C,"MetaProperty")}var ue=this.start,Pe=this.startLoc;return C.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),ue,Pe,!0,!1),this.eat(T.parenL)?C.arguments=this.parseExprList(T.parenR,this.options.ecmaVersion>=8,!1):C.arguments=Ze,this.finishNode(C,"NewExpression")},Ut.parseTemplateElement=function(C){var D=C.isTagged,V=this.startNode();return this.type===T.invalidTemplate?(D||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),V.value={raw:this.value.replace(/\r\n?/g,`
392
392
  `),cooked:null}):V.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
393
393
  `),cooked:this.value},this.next(),V.tail=this.type===T.backQuote,this.finishNode(V,"TemplateElement")},Ut.parseTemplate=function(C){C===void 0&&(C={});var D=C.isTagged;D===void 0&&(D=!1);var V=this.startNode();this.next(),V.expressions=[];var ue=this.parseTemplateElement({isTagged:D});for(V.quasis=[ue];!ue.tail;)this.type===T.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(T.dollarBraceL),V.expressions.push(this.parseExpression()),this.expect(T.braceR),V.quasis.push(ue=this.parseTemplateElement({isTagged:D}));return this.next(),this.finishNode(V,"TemplateLiteral")},Ut.isAsyncProp=function(C){return!C.computed&&C.key.type==="Identifier"&&C.key.name==="async"&&(this.type===T.name||this.type===T.num||this.type===T.string||this.type===T.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===T.star)&&!v.test(this.input.slice(this.lastTokEnd,this.start))},Ut.parseObj=function(C,D){var V=this.startNode(),ue=!0,Pe={};for(V.properties=[],this.next();!this.eat(T.braceR);){if(ue)ue=!1;else if(this.expect(T.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(T.braceR))break;var Ve=this.parseProperty(C,D);C||this.checkPropClash(Ve,Pe,D),V.properties.push(Ve)}return this.finishNode(V,C?"ObjectPattern":"ObjectExpression")},Ut.parseProperty=function(C,D){var V,ue,Pe,Ve,Je=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(T.ellipsis))return C?(Je.argument=this.parseIdent(!1),this.type===T.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(Je,"RestElement")):(Je.argument=this.parseMaybeAssign(!1,D),this.type===T.comma&&D&&D.trailingComma<0&&(D.trailingComma=this.start),this.finishNode(Je,"SpreadElement"));this.options.ecmaVersion>=6&&(Je.method=!1,Je.shorthand=!1,(C||D)&&(Pe=this.start,Ve=this.startLoc),C||(V=this.eat(T.star)));var ot=this.containsEsc;return this.parsePropertyName(Je),!C&&!ot&&this.options.ecmaVersion>=8&&!V&&this.isAsyncProp(Je)?(ue=!0,V=this.options.ecmaVersion>=9&&this.eat(T.star),this.parsePropertyName(Je)):ue=!1,this.parsePropertyValue(Je,C,V,ue,Pe,Ve,D,ot),this.finishNode(Je,"Property")},Ut.parseGetterSetter=function(C){var D=C.key.name;this.parsePropertyName(C),C.value=this.parseMethod(!1),C.kind=D;var V=C.kind==="get"?0:1;if(C.value.params.length!==V){var ue=C.value.start;C.kind==="get"?this.raiseRecoverable(ue,"getter should have no params"):this.raiseRecoverable(ue,"setter should have exactly one param")}else C.kind==="set"&&C.value.params[0].type==="RestElement"&&this.raiseRecoverable(C.value.params[0].start,"Setter cannot use rest params")},Ut.parsePropertyValue=function(C,D,V,ue,Pe,Ve,Je,ot){(V||ue)&&this.type===T.colon&&this.unexpected(),this.eat(T.colon)?(C.value=D?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,Je),C.kind="init"):this.options.ecmaVersion>=6&&this.type===T.parenL?(D&&this.unexpected(),C.method=!0,C.value=this.parseMethod(V,ue),C.kind="init"):D||ot||!(this.options.ecmaVersion>=5)||C.computed||C.key.type!=="Identifier"||C.key.name!=="get"&&C.key.name!=="set"||this.type===T.comma||this.type===T.braceR||this.type===T.eq?this.options.ecmaVersion>=6&&!C.computed&&C.key.type==="Identifier"?((V||ue)&&this.unexpected(),this.checkUnreserved(C.key),C.key.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=Pe),D?C.value=this.parseMaybeDefault(Pe,Ve,this.copyNode(C.key)):this.type===T.eq&&Je?(Je.shorthandAssign<0&&(Je.shorthandAssign=this.start),C.value=this.parseMaybeDefault(Pe,Ve,this.copyNode(C.key))):C.value=this.copyNode(C.key),C.kind="init",C.shorthand=!0):this.unexpected():((V||ue)&&this.unexpected(),this.parseGetterSetter(C))},Ut.parsePropertyName=function(C){if(this.options.ecmaVersion>=6){if(this.eat(T.bracketL))return C.computed=!0,C.key=this.parseMaybeAssign(),this.expect(T.bracketR),C.key;C.computed=!1}return C.key=this.type===T.num||this.type===T.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},Ut.initFunction=function(C){C.id=null,this.options.ecmaVersion>=6&&(C.generator=C.expression=!1),this.options.ecmaVersion>=8&&(C.async=!1)},Ut.parseMethod=function(C,D,V){var ue=this.startNode(),Pe=this.yieldPos,Ve=this.awaitPos,Je=this.awaitIdentPos;return this.initFunction(ue),this.options.ecmaVersion>=6&&(ue.generator=C),this.options.ecmaVersion>=8&&(ue.async=!!D),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|le(D,ue.generator)|(V?128:0)),this.expect(T.parenL),ue.params=this.parseBindingList(T.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(ue,!1,!0,!1),this.yieldPos=Pe,this.awaitPos=Ve,this.awaitIdentPos=Je,this.finishNode(ue,"FunctionExpression")},Ut.parseArrowExpression=function(C,D,V,ue){var Pe=this.yieldPos,Ve=this.awaitPos,Je=this.awaitIdentPos;return this.enterScope(16|le(V,!1)),this.initFunction(C),this.options.ecmaVersion>=8&&(C.async=!!V),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,C.params=this.toAssignableList(D,!0),this.parseFunctionBody(C,!0,!1,ue),this.yieldPos=Pe,this.awaitPos=Ve,this.awaitIdentPos=Je,this.finishNode(C,"ArrowFunctionExpression")},Ut.parseFunctionBody=function(C,D,V,ue){var Pe=D&&this.type!==T.braceL,Ve=this.strict,Je=!1;if(Pe)C.body=this.parseMaybeAssign(ue),C.expression=!0,this.checkParams(C,!1);else{var ot=this.options.ecmaVersion>=7&&!this.isSimpleParamList(C.params);Ve&&!ot||(Je=this.strictDirective(this.end))&&ot&&this.raiseRecoverable(C.start,"Illegal 'use strict' directive in function with non-simple parameter list");var Lt=this.labels;this.labels=[],Je&&(this.strict=!0),this.checkParams(C,!Ve&&!Je&&!D&&!V&&this.isSimpleParamList(C.params)),this.strict&&C.id&&this.checkLValSimple(C.id,5),C.body=this.parseBlock(!1,void 0,Je&&!Ve),C.expression=!1,this.adaptDirectivePrologue(C.body.body),this.labels=Lt}this.exitScope()},Ut.isSimpleParamList=function(C){for(var D=0,V=C;D<V.length;D+=1)if(V[D].type!=="Identifier")return!1;return!0},Ut.checkParams=function(C,D){for(var V=Object.create(null),ue=0,Pe=C.params;ue<Pe.length;ue+=1){var Ve=Pe[ue];this.checkLValInnerPattern(Ve,1,D?null:V)}},Ut.parseExprList=function(C,D,V,ue){for(var Pe=[],Ve=!0;!this.eat(C);){if(Ve)Ve=!1;else if(this.expect(T.comma),D&&this.afterTrailingComma(C))break;var Je=void 0;V&&this.type===T.comma?Je=null:this.type===T.ellipsis?(Je=this.parseSpread(ue),ue&&this.type===T.comma&&ue.trailingComma<0&&(ue.trailingComma=this.start)):Je=this.parseMaybeAssign(!1,ue),Pe.push(Je)}return Pe},Ut.checkUnreserved=function(C){var D=C.start,V=C.end,ue=C.name;this.inGenerator&&ue==="yield"&&this.raiseRecoverable(D,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&ue==="await"&&this.raiseRecoverable(D,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&X||ue!=="arguments"||this.raiseRecoverable(D,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||ue!=="arguments"&&ue!=="await"||this.raise(D,"Cannot use "+ue+" in class static initialization block"),this.keywords.test(ue)&&this.raise(D,"Unexpected keyword '"+ue+"'"),this.options.ecmaVersion<6&&this.input.slice(D,V).indexOf("\\")!==-1||(this.strict?this.reservedWordsStrict:this.reservedWords).test(ue)&&(this.inAsync||ue!=="await"||this.raiseRecoverable(D,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(D,"The keyword '"+ue+"' is reserved"))},Ut.parseIdent=function(C){var D=this.parseIdentNode();return this.next(!!C),this.finishNode(D,"Identifier"),C||(this.checkUnreserved(D),D.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=D.start)),D},Ut.parseIdentNode=function(){var C=this.startNode();return this.type===T.name?C.name=this.value:this.type.keyword?(C.name=this.type.keyword,C.name!=="class"&&C.name!=="function"||this.lastTokEnd===this.lastTokStart+1&&this.input.charCodeAt(this.lastTokStart)===46||this.context.pop(),this.type=T.name):this.unexpected(),C},Ut.parsePrivateIdent=function(){var C=this.startNode();return this.type===T.privateId?C.name=this.value:this.unexpected(),this.next(),this.finishNode(C,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(C.start,"Private field '#"+C.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(C)),C},Ut.parseYield=function(C){this.yieldPos||(this.yieldPos=this.start);var D=this.startNode();return this.next(),this.type===T.semi||this.canInsertSemicolon()||this.type!==T.star&&!this.type.startsExpr?(D.delegate=!1,D.argument=null):(D.delegate=this.eat(T.star),D.argument=this.parseMaybeAssign(C)),this.finishNode(D,"YieldExpression")},Ut.parseAwait=function(C){this.awaitPos||(this.awaitPos=this.start);var D=this.startNode();return this.next(),D.argument=this.parseMaybeUnary(null,!0,!1,C),this.finishNode(D,"AwaitExpression")};var Me=xe.prototype;Me.raise=function(C,D){var V=ce(this.input,C);D+=" ("+V.line+":"+V.column+")",this.sourceFile&&(D+=" in "+this.sourceFile);var ue=new SyntaxError(D);throw ue.pos=C,ue.loc=V,ue.raisedAt=this.pos,ue},Me.raiseRecoverable=Me.raise,Me.curPosition=function(){if(this.options.locations)return new Ie(this.curLine,this.pos-this.lineStart)};var Xe=xe.prototype,gt=function(C){this.flags=C,this.var=[],this.lexical=[],this.functions=[]};Xe.enterScope=function(C){this.scopeStack.push(new gt(C))},Xe.exitScope=function(){this.scopeStack.pop()},Xe.treatFunctionsAsVarInScope=function(C){return 2&C.flags||!this.inModule&&1&C.flags},Xe.declareName=function(C,D,V){var ue=!1;if(D===2){var Pe=this.currentScope();ue=Pe.lexical.indexOf(C)>-1||Pe.functions.indexOf(C)>-1||Pe.var.indexOf(C)>-1,Pe.lexical.push(C),this.inModule&&1&Pe.flags&&delete this.undefinedExports[C]}else if(D===4)this.currentScope().lexical.push(C);else if(D===3){var Ve=this.currentScope();ue=this.treatFunctionsAsVar?Ve.lexical.indexOf(C)>-1:Ve.lexical.indexOf(C)>-1||Ve.var.indexOf(C)>-1,Ve.functions.push(C)}else for(var Je=this.scopeStack.length-1;Je>=0;--Je){var ot=this.scopeStack[Je];if(ot.lexical.indexOf(C)>-1&&!(32&ot.flags&&ot.lexical[0]===C)||!this.treatFunctionsAsVarInScope(ot)&&ot.functions.indexOf(C)>-1){ue=!0;break}if(ot.var.push(C),this.inModule&&1&ot.flags&&delete this.undefinedExports[C],ot.flags&X)break}ue&&this.raiseRecoverable(V,"Identifier '"+C+"' has already been declared")},Xe.checkLocalExport=function(C){this.scopeStack[0].lexical.indexOf(C.name)===-1&&this.scopeStack[0].var.indexOf(C.name)===-1&&(this.undefinedExports[C.name]=C)},Xe.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Xe.currentVarScope=function(){for(var C=this.scopeStack.length-1;;C--){var D=this.scopeStack[C];if(771&D.flags)return D}},Xe.currentThisScope=function(){for(var C=this.scopeStack.length-1;;C--){var D=this.scopeStack[C];if(771&D.flags&&!(16&D.flags))return D}};var qt=function(C,D,V){this.type="",this.start=D,this.end=0,C.options.locations&&(this.loc=new ne(C,V)),C.options.directSourceFile&&(this.sourceFile=C.options.directSourceFile),C.options.ranges&&(this.range=[D,0])},sn=xe.prototype;function mn(C,D,V,ue){return C.type=D,C.end=V,this.options.locations&&(C.loc.end=ue),this.options.ranges&&(C.range[1]=V),C}sn.startNode=function(){return new qt(this,this.start,this.startLoc)},sn.startNodeAt=function(C,D){return new qt(this,C,D)},sn.finishNode=function(C,D){return mn.call(this,C,D,this.lastTokEnd,this.lastTokEndLoc)},sn.finishNodeAt=function(C,D,V,ue){return mn.call(this,C,D,V,ue)},sn.copyNode=function(C){var D=new qt(this,C.start,this.startLoc);for(var V in C)D[V]=C[V];return D};var Pn="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",je=Pn+" Extended_Pictographic",mt=je+" EBase EComp EMod EPres ExtPict",Kt={9:Pn,10:je,11:je,12:mt,13:mt,14:mt},et={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},pt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ft="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",nt=ft+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",kt=nt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Yt=kt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ne=Yt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Qe={9:ft,10:nt,11:kt,12:Yt,13:Ne,14:Ne+" Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"},lt={};function Ge(C){var D=lt[C]={binary:be(Kt[C]+" "+pt),binaryOfStrings:be(et[C]),nonBinary:{General_Category:be(pt),Script:be(Qe[C])}};D.nonBinary.Script_Extensions=D.nonBinary.Script,D.nonBinary.gc=D.nonBinary.General_Category,D.nonBinary.sc=D.nonBinary.Script,D.nonBinary.scx=D.nonBinary.Script_Extensions}for(var Ct=0,Nt=[9,10,11,12,13,14];Ct<Nt.length;Ct+=1)Ge(Nt[Ct]);var wt=xe.prototype,hn=function(C,D){this.parent=C,this.base=D||this};hn.prototype.separatedFrom=function(C){for(var D=this;D;D=D.parent)for(var V=C;V;V=V.parent)if(D.base===V.base&&D!==V)return!0;return!1},hn.prototype.sibling=function(){return new hn(this.parent,this.base)};var fn=function(C){this.parser=C,this.validFlags="gim"+(C.options.ecmaVersion>=6?"uy":"")+(C.options.ecmaVersion>=9?"s":"")+(C.options.ecmaVersion>=13?"d":"")+(C.options.ecmaVersion>=15?"v":""),this.unicodeProperties=lt[C.options.ecmaVersion>=14?14:C.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function yn(C){return C===105||C===109||C===115}function zn(C){return C===36||C>=40&&C<=43||C===46||C===63||C>=91&&C<=94||C>=123&&C<=125}function qn(C){return C>=65&&C<=90||C>=97&&C<=122}fn.prototype.reset=function(C,D,V){var ue=V.indexOf("v")!==-1,Pe=V.indexOf("u")!==-1;this.start=0|C,this.source=D+"",this.flags=V,ue&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=Pe&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=Pe&&this.parser.options.ecmaVersion>=9)},fn.prototype.raise=function(C){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+C)},fn.prototype.at=function(C,D){D===void 0&&(D=!1);var V=this.source,ue=V.length;if(C>=ue)return-1;var Pe=V.charCodeAt(C);if(!D&&!this.switchU||Pe<=55295||Pe>=57344||C+1>=ue)return Pe;var Ve=V.charCodeAt(C+1);return Ve>=56320&&Ve<=57343?(Pe<<10)+Ve-56613888:Pe},fn.prototype.nextIndex=function(C,D){D===void 0&&(D=!1);var V=this.source,ue=V.length;if(C>=ue)return ue;var Pe,Ve=V.charCodeAt(C);return!D&&!this.switchU||Ve<=55295||Ve>=57344||C+1>=ue||(Pe=V.charCodeAt(C+1))<56320||Pe>57343?C+1:C+2},fn.prototype.current=function(C){return C===void 0&&(C=!1),this.at(this.pos,C)},fn.prototype.lookahead=function(C){return C===void 0&&(C=!1),this.at(this.nextIndex(this.pos,C),C)},fn.prototype.advance=function(C){C===void 0&&(C=!1),this.pos=this.nextIndex(this.pos,C)},fn.prototype.eat=function(C,D){return D===void 0&&(D=!1),this.current(D)===C&&(this.advance(D),!0)},fn.prototype.eatChars=function(C,D){D===void 0&&(D=!1);for(var V=this.pos,ue=0,Pe=C;ue<Pe.length;ue+=1){var Ve=Pe[ue],Je=this.at(V,D);if(Je===-1||Je!==Ve)return!1;V=this.nextIndex(V,D)}return this.pos=V,!0},wt.validateRegExpFlags=function(C){for(var D=C.validFlags,V=C.flags,ue=!1,Pe=!1,Ve=0;Ve<V.length;Ve++){var Je=V.charAt(Ve);D.indexOf(Je)===-1&&this.raise(C.start,"Invalid regular expression flag"),V.indexOf(Je,Ve+1)>-1&&this.raise(C.start,"Duplicate regular expression flag"),Je==="u"&&(ue=!0),Je==="v"&&(Pe=!0)}this.options.ecmaVersion>=15&&ue&&Pe&&this.raise(C.start,"Invalid regular expression flag")},wt.validateRegExpPattern=function(C){this.regexp_pattern(C),!C.switchN&&this.options.ecmaVersion>=9&&(function(D){for(var V in D)return!0;return!1})(C.groupNames)&&(C.switchN=!0,this.regexp_pattern(C))},wt.regexp_pattern=function(C){C.pos=0,C.lastIntValue=0,C.lastStringValue="",C.lastAssertionIsQuantifiable=!1,C.numCapturingParens=0,C.maxBackReference=0,C.groupNames=Object.create(null),C.backReferenceNames.length=0,C.branchID=null,this.regexp_disjunction(C),C.pos!==C.source.length&&(C.eat(41)&&C.raise("Unmatched ')'"),(C.eat(93)||C.eat(125))&&C.raise("Lone quantifier brackets")),C.maxBackReference>C.numCapturingParens&&C.raise("Invalid escape");for(var D=0,V=C.backReferenceNames;D<V.length;D+=1){var ue=V[D];C.groupNames[ue]||C.raise("Invalid named capture referenced")}},wt.regexp_disjunction=function(C){var D=this.options.ecmaVersion>=16;for(D&&(C.branchID=new hn(C.branchID,null)),this.regexp_alternative(C);C.eat(124);)D&&(C.branchID=C.branchID.sibling()),this.regexp_alternative(C);D&&(C.branchID=C.branchID.parent),this.regexp_eatQuantifier(C,!0)&&C.raise("Nothing to repeat"),C.eat(123)&&C.raise("Lone quantifier brackets")},wt.regexp_alternative=function(C){for(;C.pos<C.source.length&&this.regexp_eatTerm(C););},wt.regexp_eatTerm=function(C){return this.regexp_eatAssertion(C)?(C.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(C)&&C.switchU&&C.raise("Invalid quantifier"),!0):!!(C.switchU?this.regexp_eatAtom(C):this.regexp_eatExtendedAtom(C))&&(this.regexp_eatQuantifier(C),!0)},wt.regexp_eatAssertion=function(C){var D=C.pos;if(C.lastAssertionIsQuantifiable=!1,C.eat(94)||C.eat(36))return!0;if(C.eat(92)){if(C.eat(66)||C.eat(98))return!0;C.pos=D}if(C.eat(40)&&C.eat(63)){var V=!1;if(this.options.ecmaVersion>=9&&(V=C.eat(60)),C.eat(61)||C.eat(33))return this.regexp_disjunction(C),C.eat(41)||C.raise("Unterminated group"),C.lastAssertionIsQuantifiable=!V,!0}return C.pos=D,!1},wt.regexp_eatQuantifier=function(C,D){return D===void 0&&(D=!1),!!this.regexp_eatQuantifierPrefix(C,D)&&(C.eat(63),!0)},wt.regexp_eatQuantifierPrefix=function(C,D){return C.eat(42)||C.eat(43)||C.eat(63)||this.regexp_eatBracedQuantifier(C,D)},wt.regexp_eatBracedQuantifier=function(C,D){var V=C.pos;if(C.eat(123)){var ue=0,Pe=-1;if(this.regexp_eatDecimalDigits(C)&&(ue=C.lastIntValue,C.eat(44)&&this.regexp_eatDecimalDigits(C)&&(Pe=C.lastIntValue),C.eat(125)))return Pe!==-1&&Pe<ue&&!D&&C.raise("numbers out of order in {} quantifier"),!0;C.switchU&&!D&&C.raise("Incomplete quantifier"),C.pos=V}return!1},wt.regexp_eatAtom=function(C){return this.regexp_eatPatternCharacters(C)||C.eat(46)||this.regexp_eatReverseSolidusAtomEscape(C)||this.regexp_eatCharacterClass(C)||this.regexp_eatUncapturingGroup(C)||this.regexp_eatCapturingGroup(C)},wt.regexp_eatReverseSolidusAtomEscape=function(C){var D=C.pos;if(C.eat(92)){if(this.regexp_eatAtomEscape(C))return!0;C.pos=D}return!1},wt.regexp_eatUncapturingGroup=function(C){var D=C.pos;if(C.eat(40)){if(C.eat(63)){if(this.options.ecmaVersion>=16){var V=this.regexp_eatModifiers(C),ue=C.eat(45);if(V||ue){for(var Pe=0;Pe<V.length;Pe++){var Ve=V.charAt(Pe);V.indexOf(Ve,Pe+1)>-1&&C.raise("Duplicate regular expression modifiers")}if(ue){var Je=this.regexp_eatModifiers(C);V||Je||C.current()!==58||C.raise("Invalid regular expression modifiers");for(var ot=0;ot<Je.length;ot++){var Lt=Je.charAt(ot);(Je.indexOf(Lt,ot+1)>-1||V.indexOf(Lt)>-1)&&C.raise("Duplicate regular expression modifiers")}}}}if(C.eat(58)){if(this.regexp_disjunction(C),C.eat(41))return!0;C.raise("Unterminated group")}}C.pos=D}return!1},wt.regexp_eatCapturingGroup=function(C){if(C.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(C):C.current()===63&&C.raise("Invalid group"),this.regexp_disjunction(C),C.eat(41))return C.numCapturingParens+=1,!0;C.raise("Unterminated group")}return!1},wt.regexp_eatModifiers=function(C){for(var D="",V=0;(V=C.current())!==-1&&yn(V);)D+=De(V),C.advance();return D},wt.regexp_eatExtendedAtom=function(C){return C.eat(46)||this.regexp_eatReverseSolidusAtomEscape(C)||this.regexp_eatCharacterClass(C)||this.regexp_eatUncapturingGroup(C)||this.regexp_eatCapturingGroup(C)||this.regexp_eatInvalidBracedQuantifier(C)||this.regexp_eatExtendedPatternCharacter(C)},wt.regexp_eatInvalidBracedQuantifier=function(C){return this.regexp_eatBracedQuantifier(C,!0)&&C.raise("Nothing to repeat"),!1},wt.regexp_eatSyntaxCharacter=function(C){var D=C.current();return!!zn(D)&&(C.lastIntValue=D,C.advance(),!0)},wt.regexp_eatPatternCharacters=function(C){for(var D=C.pos,V=0;(V=C.current())!==-1&&!zn(V);)C.advance();return C.pos!==D},wt.regexp_eatExtendedPatternCharacter=function(C){var D=C.current();return!(D===-1||D===36||D>=40&&D<=43||D===46||D===63||D===91||D===94||D===124)&&(C.advance(),!0)},wt.regexp_groupSpecifier=function(C){if(C.eat(63)){this.regexp_eatGroupName(C)||C.raise("Invalid group");var D=this.options.ecmaVersion>=16,V=C.groupNames[C.lastStringValue];if(V)if(D)for(var ue=0,Pe=V;ue<Pe.length;ue+=1)Pe[ue].separatedFrom(C.branchID)||C.raise("Duplicate capture group name");else C.raise("Duplicate capture group name");D?(V||(C.groupNames[C.lastStringValue]=[])).push(C.branchID):C.groupNames[C.lastStringValue]=!0}},wt.regexp_eatGroupName=function(C){if(C.lastStringValue="",C.eat(60)){if(this.regexp_eatRegExpIdentifierName(C)&&C.eat(62))return!0;C.raise("Invalid capture group name")}return!1},wt.regexp_eatRegExpIdentifierName=function(C){if(C.lastStringValue="",this.regexp_eatRegExpIdentifierStart(C)){for(C.lastStringValue+=De(C.lastIntValue);this.regexp_eatRegExpIdentifierPart(C);)C.lastStringValue+=De(C.lastIntValue);return!0}return!1},wt.regexp_eatRegExpIdentifierStart=function(C){var D=C.pos,V=this.options.ecmaVersion>=11,ue=C.current(V);return C.advance(V),ue===92&&this.regexp_eatRegExpUnicodeEscapeSequence(C,V)&&(ue=C.lastIntValue),(function(Pe){return f(Pe,!0)||Pe===36||Pe===95})(ue)?(C.lastIntValue=ue,!0):(C.pos=D,!1)},wt.regexp_eatRegExpIdentifierPart=function(C){var D=C.pos,V=this.options.ecmaVersion>=11,ue=C.current(V);return C.advance(V),ue===92&&this.regexp_eatRegExpUnicodeEscapeSequence(C,V)&&(ue=C.lastIntValue),(function(Pe){return A(Pe,!0)||Pe===36||Pe===95||Pe===8204||Pe===8205})(ue)?(C.lastIntValue=ue,!0):(C.pos=D,!1)},wt.regexp_eatAtomEscape=function(C){return!!(this.regexp_eatBackReference(C)||this.regexp_eatCharacterClassEscape(C)||this.regexp_eatCharacterEscape(C)||C.switchN&&this.regexp_eatKGroupName(C))||(C.switchU&&(C.current()===99&&C.raise("Invalid unicode escape"),C.raise("Invalid escape")),!1)},wt.regexp_eatBackReference=function(C){var D=C.pos;if(this.regexp_eatDecimalEscape(C)){var V=C.lastIntValue;if(C.switchU)return V>C.maxBackReference&&(C.maxBackReference=V),!0;if(V<=C.numCapturingParens)return!0;C.pos=D}return!1},wt.regexp_eatKGroupName=function(C){if(C.eat(107)){if(this.regexp_eatGroupName(C))return C.backReferenceNames.push(C.lastStringValue),!0;C.raise("Invalid named reference")}return!1},wt.regexp_eatCharacterEscape=function(C){return this.regexp_eatControlEscape(C)||this.regexp_eatCControlLetter(C)||this.regexp_eatZero(C)||this.regexp_eatHexEscapeSequence(C)||this.regexp_eatRegExpUnicodeEscapeSequence(C,!1)||!C.switchU&&this.regexp_eatLegacyOctalEscapeSequence(C)||this.regexp_eatIdentityEscape(C)},wt.regexp_eatCControlLetter=function(C){var D=C.pos;if(C.eat(99)){if(this.regexp_eatControlLetter(C))return!0;C.pos=D}return!1},wt.regexp_eatZero=function(C){return C.current()===48&&!oi(C.lookahead())&&(C.lastIntValue=0,C.advance(),!0)},wt.regexp_eatControlEscape=function(C){var D=C.current();return D===116?(C.lastIntValue=9,C.advance(),!0):D===110?(C.lastIntValue=10,C.advance(),!0):D===118?(C.lastIntValue=11,C.advance(),!0):D===102?(C.lastIntValue=12,C.advance(),!0):D===114&&(C.lastIntValue=13,C.advance(),!0)},wt.regexp_eatControlLetter=function(C){var D=C.current();return!!qn(D)&&(C.lastIntValue=D%32,C.advance(),!0)},wt.regexp_eatRegExpUnicodeEscapeSequence=function(C,D){D===void 0&&(D=!1);var V,ue=C.pos,Pe=D||C.switchU;if(C.eat(117)){if(this.regexp_eatFixedHexDigits(C,4)){var Ve=C.lastIntValue;if(Pe&&Ve>=55296&&Ve<=56319){var Je=C.pos;if(C.eat(92)&&C.eat(117)&&this.regexp_eatFixedHexDigits(C,4)){var ot=C.lastIntValue;if(ot>=56320&&ot<=57343)return C.lastIntValue=1024*(Ve-55296)+(ot-56320)+65536,!0}C.pos=Je,C.lastIntValue=Ve}return!0}if(Pe&&C.eat(123)&&this.regexp_eatHexDigits(C)&&C.eat(125)&&(V=C.lastIntValue)>=0&&V<=1114111)return!0;Pe&&C.raise("Invalid unicode escape"),C.pos=ue}return!1},wt.regexp_eatIdentityEscape=function(C){if(C.switchU)return!!this.regexp_eatSyntaxCharacter(C)||!!C.eat(47)&&(C.lastIntValue=47,!0);var D=C.current();return!(D===99||C.switchN&&D===107)&&(C.lastIntValue=D,C.advance(),!0)},wt.regexp_eatDecimalEscape=function(C){C.lastIntValue=0;var D=C.current();if(D>=49&&D<=57){do C.lastIntValue=10*C.lastIntValue+(D-48),C.advance();while((D=C.current())>=48&&D<=57);return!0}return!1};function Yr(C){return qn(C)||C===95}function cn(C){return Yr(C)||oi(C)}function oi(C){return C>=48&&C<=57}function Qr(C){return C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102}function kr(C){return C>=65&&C<=70?C-65+10:C>=97&&C<=102?C-97+10:C-48}function Ys(C){return C>=48&&C<=55}wt.regexp_eatCharacterClassEscape=function(C){var D=C.current();if((function(Pe){return Pe===100||Pe===68||Pe===115||Pe===83||Pe===119||Pe===87})(D))return C.lastIntValue=-1,C.advance(),1;var V=!1;if(C.switchU&&this.options.ecmaVersion>=9&&((V=D===80)||D===112)){var ue;if(C.lastIntValue=-1,C.advance(),C.eat(123)&&(ue=this.regexp_eatUnicodePropertyValueExpression(C))&&C.eat(125))return V&&ue===2&&C.raise("Invalid property name"),ue;C.raise("Invalid property name")}return 0},wt.regexp_eatUnicodePropertyValueExpression=function(C){var D=C.pos;if(this.regexp_eatUnicodePropertyName(C)&&C.eat(61)){var V=C.lastStringValue;if(this.regexp_eatUnicodePropertyValue(C)){var ue=C.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(C,V,ue),1}}if(C.pos=D,this.regexp_eatLoneUnicodePropertyNameOrValue(C)){var Pe=C.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(C,Pe)}return 0},wt.regexp_validateUnicodePropertyNameAndValue=function(C,D,V){te(C.unicodeProperties.nonBinary,D)||C.raise("Invalid property name"),C.unicodeProperties.nonBinary[D].test(V)||C.raise("Invalid property value")},wt.regexp_validateUnicodePropertyNameOrValue=function(C,D){return C.unicodeProperties.binary.test(D)?1:C.switchV&&C.unicodeProperties.binaryOfStrings.test(D)?2:void C.raise("Invalid property name")},wt.regexp_eatUnicodePropertyName=function(C){var D=0;for(C.lastStringValue="";Yr(D=C.current());)C.lastStringValue+=De(D),C.advance();return C.lastStringValue!==""},wt.regexp_eatUnicodePropertyValue=function(C){var D=0;for(C.lastStringValue="";cn(D=C.current());)C.lastStringValue+=De(D),C.advance();return C.lastStringValue!==""},wt.regexp_eatLoneUnicodePropertyNameOrValue=function(C){return this.regexp_eatUnicodePropertyValue(C)},wt.regexp_eatCharacterClass=function(C){if(C.eat(91)){var D=C.eat(94),V=this.regexp_classContents(C);return C.eat(93)||C.raise("Unterminated character class"),D&&V===2&&C.raise("Negated character class may contain strings"),!0}return!1},wt.regexp_classContents=function(C){return C.current()===93?1:C.switchV?this.regexp_classSetExpression(C):(this.regexp_nonEmptyClassRanges(C),1)},wt.regexp_nonEmptyClassRanges=function(C){for(;this.regexp_eatClassAtom(C);){var D=C.lastIntValue;if(C.eat(45)&&this.regexp_eatClassAtom(C)){var V=C.lastIntValue;!C.switchU||D!==-1&&V!==-1||C.raise("Invalid character class"),D!==-1&&V!==-1&&D>V&&C.raise("Range out of order in character class")}}},wt.regexp_eatClassAtom=function(C){var D=C.pos;if(C.eat(92)){if(this.regexp_eatClassEscape(C))return!0;if(C.switchU){var V=C.current();(V===99||Ys(V))&&C.raise("Invalid class escape"),C.raise("Invalid escape")}C.pos=D}var ue=C.current();return ue!==93&&(C.lastIntValue=ue,C.advance(),!0)},wt.regexp_eatClassEscape=function(C){var D=C.pos;if(C.eat(98))return C.lastIntValue=8,!0;if(C.switchU&&C.eat(45))return C.lastIntValue=45,!0;if(!C.switchU&&C.eat(99)){if(this.regexp_eatClassControlLetter(C))return!0;C.pos=D}return this.regexp_eatCharacterClassEscape(C)||this.regexp_eatCharacterEscape(C)},wt.regexp_classSetExpression=function(C){var D,V=1;if(!this.regexp_eatClassSetRange(C))if(D=this.regexp_eatClassSetOperand(C)){D===2&&(V=2);for(var ue=C.pos;C.eatChars([38,38]);)C.current()!==38&&(D=this.regexp_eatClassSetOperand(C))?D!==2&&(V=1):C.raise("Invalid character in character class");if(ue!==C.pos)return V;for(;C.eatChars([45,45]);)this.regexp_eatClassSetOperand(C)||C.raise("Invalid character in character class");if(ue!==C.pos)return V}else C.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(C)){if(!(D=this.regexp_eatClassSetOperand(C)))return V;D===2&&(V=2)}},wt.regexp_eatClassSetRange=function(C){var D=C.pos;if(this.regexp_eatClassSetCharacter(C)){var V=C.lastIntValue;if(C.eat(45)&&this.regexp_eatClassSetCharacter(C)){var ue=C.lastIntValue;return V!==-1&&ue!==-1&&V>ue&&C.raise("Range out of order in character class"),!0}C.pos=D}return!1},wt.regexp_eatClassSetOperand=function(C){return this.regexp_eatClassSetCharacter(C)?1:this.regexp_eatClassStringDisjunction(C)||this.regexp_eatNestedClass(C)},wt.regexp_eatNestedClass=function(C){var D=C.pos;if(C.eat(91)){var V=C.eat(94),ue=this.regexp_classContents(C);if(C.eat(93))return V&&ue===2&&C.raise("Negated character class may contain strings"),ue;C.pos=D}if(C.eat(92)){var Pe=this.regexp_eatCharacterClassEscape(C);if(Pe)return Pe;C.pos=D}return null},wt.regexp_eatClassStringDisjunction=function(C){var D=C.pos;if(C.eatChars([92,113])){if(C.eat(123)){var V=this.regexp_classStringDisjunctionContents(C);if(C.eat(125))return V}else C.raise("Invalid escape");C.pos=D}return null},wt.regexp_classStringDisjunctionContents=function(C){for(var D=this.regexp_classString(C);C.eat(124);)this.regexp_classString(C)===2&&(D=2);return D},wt.regexp_classString=function(C){for(var D=0;this.regexp_eatClassSetCharacter(C);)D++;return D===1?1:2},wt.regexp_eatClassSetCharacter=function(C){var D=C.pos;if(C.eat(92))return!(!this.regexp_eatCharacterEscape(C)&&!this.regexp_eatClassSetReservedPunctuator(C))||(C.eat(98)?(C.lastIntValue=8,!0):(C.pos=D,!1));var V=C.current();return!(V<0||V===C.lookahead()&&(function(ue){return ue===33||ue>=35&&ue<=38||ue>=42&&ue<=44||ue===46||ue>=58&&ue<=64||ue===94||ue===96||ue===126})(V))&&!(function(ue){return ue===40||ue===41||ue===45||ue===47||ue>=91&&ue<=93||ue>=123&&ue<=125})(V)&&(C.advance(),C.lastIntValue=V,!0)},wt.regexp_eatClassSetReservedPunctuator=function(C){var D=C.current();return!!(function(V){return V===33||V===35||V===37||V===38||V===44||V===45||V>=58&&V<=62||V===64||V===96||V===126})(D)&&(C.lastIntValue=D,C.advance(),!0)},wt.regexp_eatClassControlLetter=function(C){var D=C.current();return!(!oi(D)&&D!==95)&&(C.lastIntValue=D%32,C.advance(),!0)},wt.regexp_eatHexEscapeSequence=function(C){var D=C.pos;if(C.eat(120)){if(this.regexp_eatFixedHexDigits(C,2))return!0;C.switchU&&C.raise("Invalid escape"),C.pos=D}return!1},wt.regexp_eatDecimalDigits=function(C){var D=C.pos,V=0;for(C.lastIntValue=0;oi(V=C.current());)C.lastIntValue=10*C.lastIntValue+(V-48),C.advance();return C.pos!==D},wt.regexp_eatHexDigits=function(C){var D=C.pos,V=0;for(C.lastIntValue=0;Qr(V=C.current());)C.lastIntValue=16*C.lastIntValue+kr(V),C.advance();return C.pos!==D},wt.regexp_eatLegacyOctalEscapeSequence=function(C){if(this.regexp_eatOctalDigit(C)){var D=C.lastIntValue;if(this.regexp_eatOctalDigit(C)){var V=C.lastIntValue;D<=3&&this.regexp_eatOctalDigit(C)?C.lastIntValue=64*D+8*V+C.lastIntValue:C.lastIntValue=8*D+V}else C.lastIntValue=D;return!0}return!1},wt.regexp_eatOctalDigit=function(C){var D=C.current();return Ys(D)?(C.lastIntValue=D-48,C.advance(),!0):(C.lastIntValue=0,!1)},wt.regexp_eatFixedHexDigits=function(C,D){var V=C.pos;C.lastIntValue=0;for(var ue=0;ue<D;++ue){var Pe=C.current();if(!Qr(Pe))return C.pos=V,!1;C.lastIntValue=16*C.lastIntValue+kr(Pe),C.advance()}return!0};var us=function(C){this.type=C.type,this.value=C.value,this.start=C.start,this.end=C.end,C.options.locations&&(this.loc=new ne(C,C.startLoc,C.endLoc)),C.options.ranges&&(this.range=[C.start,C.end])},dn=xe.prototype;function Bi(C){return typeof BigInt!="function"?null:BigInt(C.replace(/_/g,""))}dn.next=function(C){!C&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new us(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},dn.getToken=function(){return this.next(),new us(this)},typeof Symbol<"u"&&(dn[Symbol.iterator]=function(){var C=this;return{next:function(){var D=C.getToken();return{done:D.type===T.eof,value:D}}}}),dn.nextToken=function(){var C=this.curContext();return C&&C.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(T.eof):C.override?C.override(this):void this.readToken(this.fullCharCodeAtPos())},dn.readToken=function(C){return f(C,this.options.ecmaVersion>=6)||C===92?this.readWord():this.getTokenFromCode(C)},dn.fullCharCodeAt=function(C){var D=this.input.charCodeAt(C);if(D<=55295||D>=56320)return D;var V=this.input.charCodeAt(C+1);return V<=56319||V>=57344?D:(D<<10)+V-56613888},dn.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},dn.skipBlockComment=function(){var C=this.options.onComment&&this.curPosition(),D=this.pos,V=this.input.indexOf("*/",this.pos+=2);if(V===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=V+2,this.options.locations)for(var ue=void 0,Pe=D;(ue=G(this.input,Pe,this.pos))>-1;)++this.curLine,Pe=this.lineStart=ue;this.options.onComment&&this.options.onComment(!0,this.input.slice(D+2,V),D,this.pos,C,this.curPosition())},dn.skipLineComment=function(C){for(var D=this.pos,V=this.options.onComment&&this.curPosition(),ue=this.input.charCodeAt(this.pos+=C);this.pos<this.input.length&&!O(ue);)ue=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(D+C,this.pos),D,this.pos,V,this.curPosition())},dn.skipSpace=function(){e:for(;this.pos<this.input.length;){var C=this.input.charCodeAt(this.pos);switch(C){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(C>8&&C<14||C>=5760&&$.test(String.fromCharCode(C))))break e;++this.pos}}},dn.finishToken=function(C,D){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var V=this.type;this.type=C,this.value=D,this.updateContext(V)},dn.readToken_dot=function(){var C=this.input.charCodeAt(this.pos+1);if(C>=48&&C<=57)return this.readNumber(!0);var D=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&C===46&&D===46?(this.pos+=3,this.finishToken(T.ellipsis)):(++this.pos,this.finishToken(T.dot))},dn.readToken_slash=function(){var C=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):C===61?this.finishOp(T.assign,2):this.finishOp(T.slash,1)},dn.readToken_mult_modulo_exp=function(C){var D=this.input.charCodeAt(this.pos+1),V=1,ue=C===42?T.star:T.modulo;return this.options.ecmaVersion>=7&&C===42&&D===42&&(++V,ue=T.starstar,D=this.input.charCodeAt(this.pos+2)),D===61?this.finishOp(T.assign,V+1):this.finishOp(ue,V)},dn.readToken_pipe_amp=function(C){var D=this.input.charCodeAt(this.pos+1);return D===C?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(T.assign,3):this.finishOp(C===124?T.logicalOR:T.logicalAND,2):D===61?this.finishOp(T.assign,2):this.finishOp(C===124?T.bitwiseOR:T.bitwiseAND,1)},dn.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(T.assign,2):this.finishOp(T.bitwiseXOR,1)},dn.readToken_plus_min=function(C){var D=this.input.charCodeAt(this.pos+1);return D===C?D!==45||this.inModule||this.input.charCodeAt(this.pos+2)!==62||this.lastTokEnd!==0&&!v.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(T.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):D===61?this.finishOp(T.assign,2):this.finishOp(T.plusMin,1)},dn.readToken_lt_gt=function(C){var D=this.input.charCodeAt(this.pos+1),V=1;return D===C?(V=C===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+V)===61?this.finishOp(T.assign,V+1):this.finishOp(T.bitShift,V)):D!==33||C!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(D===61&&(V=2),this.finishOp(T.relational,V)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},dn.readToken_eq_excl=function(C){var D=this.input.charCodeAt(this.pos+1);return D===61?this.finishOp(T.equality,this.input.charCodeAt(this.pos+2)===61?3:2):C===61&&D===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(T.arrow)):this.finishOp(C===61?T.eq:T.prefix,1)},dn.readToken_question=function(){var C=this.options.ecmaVersion;if(C>=11){var D=this.input.charCodeAt(this.pos+1);if(D===46){var V=this.input.charCodeAt(this.pos+2);if(V<48||V>57)return this.finishOp(T.questionDot,2)}if(D===63)return C>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(T.assign,3):this.finishOp(T.coalesce,2)}return this.finishOp(T.question,1)},dn.readToken_numberSign=function(){var C=35;if(this.options.ecmaVersion>=13&&(++this.pos,f(C=this.fullCharCodeAtPos(),!0)||C===92))return this.finishToken(T.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+De(C)+"'")},dn.getTokenFromCode=function(C){switch(C){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(T.parenL);case 41:return++this.pos,this.finishToken(T.parenR);case 59:return++this.pos,this.finishToken(T.semi);case 44:return++this.pos,this.finishToken(T.comma);case 91:return++this.pos,this.finishToken(T.bracketL);case 93:return++this.pos,this.finishToken(T.bracketR);case 123:return++this.pos,this.finishToken(T.braceL);case 125:return++this.pos,this.finishToken(T.braceR);case 58:return++this.pos,this.finishToken(T.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(T.backQuote);case 48:var D=this.input.charCodeAt(this.pos+1);if(D===120||D===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(D===111||D===79)return this.readRadixNumber(8);if(D===98||D===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(C);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(C);case 124:case 38:return this.readToken_pipe_amp(C);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(C);case 60:case 62:return this.readToken_lt_gt(C);case 61:case 33:return this.readToken_eq_excl(C);case 63:return this.readToken_question();case 126:return this.finishOp(T.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+De(C)+"'")},dn.finishOp=function(C,D){var V=this.input.slice(this.pos,this.pos+D);return this.pos+=D,this.finishToken(C,V)},dn.readRegexp=function(){for(var C,D,V=this.pos;;){this.pos>=this.input.length&&this.raise(V,"Unterminated regular expression");var ue=this.input.charAt(this.pos);if(v.test(ue)&&this.raise(V,"Unterminated regular expression"),C)C=!1;else{if(ue==="[")D=!0;else if(ue==="]"&&D)D=!1;else if(ue==="/"&&!D)break;C=ue==="\\"}++this.pos}var Pe=this.input.slice(V,this.pos);++this.pos;var Ve=this.pos,Je=this.readWord1();this.containsEsc&&this.unexpected(Ve);var ot=this.regexpState||(this.regexpState=new fn(this));ot.reset(V,Pe,Je),this.validateRegExpFlags(ot),this.validateRegExpPattern(ot);var Lt=null;try{Lt=new RegExp(Pe,Je)}catch{}return this.finishToken(T.regexp,{pattern:Pe,flags:Je,value:Lt})},dn.readInt=function(C,D,V){for(var ue=this.options.ecmaVersion>=12&&D===void 0,Pe=V&&this.input.charCodeAt(this.pos)===48,Ve=this.pos,Je=0,ot=0,Lt=0,nn=D??1/0;Lt<nn;++Lt,++this.pos){var Xt=this.input.charCodeAt(this.pos),Rn=void 0;if(ue&&Xt===95)Pe&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),ot===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),Lt===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),ot=Xt;else{if((Rn=Xt>=97?Xt-97+10:Xt>=65?Xt-65+10:Xt>=48&&Xt<=57?Xt-48:1/0)>=C)break;ot=Xt,Je=Je*C+Rn}}return ue&&ot===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===Ve||D!=null&&this.pos-Ve!==D?null:Je},dn.readRadixNumber=function(C){var D=this.pos;this.pos+=2;var V=this.readInt(C);return V==null&&this.raise(this.start+2,"Expected number in radix "+C),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(V=Bi(this.input.slice(D,this.pos)),++this.pos):f(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(T.num,V)},dn.readNumber=function(C){var D=this.pos;C||this.readInt(10,void 0,!0)!==null||this.raise(D,"Invalid number");var V=this.pos-D>=2&&this.input.charCodeAt(D)===48;V&&this.strict&&this.raise(D,"Invalid number");var ue=this.input.charCodeAt(this.pos);if(!V&&!C&&this.options.ecmaVersion>=11&&ue===110){var Pe=Bi(this.input.slice(D,this.pos));return++this.pos,f(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(T.num,Pe)}V&&/[89]/.test(this.input.slice(D,this.pos))&&(V=!1),ue!==46||V||(++this.pos,this.readInt(10),ue=this.input.charCodeAt(this.pos)),ue!==69&&ue!==101||V||((ue=this.input.charCodeAt(++this.pos))!==43&&ue!==45||++this.pos,this.readInt(10)===null&&this.raise(D,"Invalid number")),f(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var Ve,Je=(Ve=this.input.slice(D,this.pos),V?parseInt(Ve,8):parseFloat(Ve.replace(/_/g,"")));return this.finishToken(T.num,Je)},dn.readCodePoint=function(){var C;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();var D=++this.pos;C=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,C>1114111&&this.invalidStringToken(D,"Code point out of bounds")}else C=this.readHexChar(4);return C},dn.readString=function(C){for(var D="",V=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var ue=this.input.charCodeAt(this.pos);if(ue===C)break;ue===92?(D+=this.input.slice(V,this.pos),D+=this.readEscapedChar(!1),V=this.pos):ue===8232||ue===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(O(ue)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return D+=this.input.slice(V,this.pos++),this.finishToken(T.string,D)};var Fs={};dn.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(C){if(C!==Fs)throw C;this.readInvalidTemplateToken()}this.inTemplateElement=!1},dn.invalidStringToken=function(C,D){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Fs;this.raise(C,D)},dn.readTmplToken=function(){for(var C="",D=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var V=this.input.charCodeAt(this.pos);if(V===96||V===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos!==this.start||this.type!==T.template&&this.type!==T.invalidTemplate?(C+=this.input.slice(D,this.pos),this.finishToken(T.template,C)):V===36?(this.pos+=2,this.finishToken(T.dollarBraceL)):(++this.pos,this.finishToken(T.backQuote));if(V===92)C+=this.input.slice(D,this.pos),C+=this.readEscapedChar(!0),D=this.pos;else if(O(V)){switch(C+=this.input.slice(D,this.pos),++this.pos,V){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:C+=`
394
394
  `;break;default:C+=String.fromCharCode(V)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),D=this.pos}else++this.pos}},dn.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(T.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
395
395
  `&&++this.pos;case`
396
396
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},dn.readEscapedChar=function(C){var D=this.input.charCodeAt(++this.pos);switch(++this.pos,D){case 110:return`
397
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return De(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),C){var V=this.pos-1;this.invalidStringToken(V,"Invalid escape sequence in template string")}default:if(D>=48&&D<=55){var ue=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],Pe=parseInt(ue,8);return Pe>255&&(ue=ue.slice(0,-1),Pe=parseInt(ue,8)),this.pos+=ue.length-1,D=this.input.charCodeAt(this.pos),ue==="0"&&D!==56&&D!==57||!this.strict&&!C||this.invalidStringToken(this.pos-1-ue.length,C?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(Pe)}return O(D)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(D)}},dn.readHexChar=function(C){var D=this.pos,V=this.readInt(16,C);return V===null&&this.invalidStringToken(D,"Bad character escape sequence"),V},dn.readWord1=function(){this.containsEsc=!1;for(var C="",D=!0,V=this.pos,ue=this.options.ecmaVersion>=6;this.pos<this.input.length;){var Pe=this.fullCharCodeAtPos();if(A(Pe,ue))this.pos+=Pe<=65535?1:2;else{if(Pe!==92)break;this.containsEsc=!0,C+=this.input.slice(V,this.pos);var Ve=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var Je=this.readCodePoint();(D?f:A)(Je,ue)||this.invalidStringToken(Ve,"Invalid Unicode escape"),C+=De(Je),V=this.pos}D=!1}return C+this.input.slice(V,this.pos)},dn.readWord=function(){var C=this.readWord1(),D=T.name;return this.keywords.test(C)&&(D=x[C]),this.finishToken(D,C)},xe.acorn={Parser:xe,version:"8.16.0",defaultOptions:se,Position:Ie,SourceLocation:ne,getLineInfo:ce,Node:qt,TokenType:y,tokTypes:T,keywordTypes:x,TokContext:rt,tokContexts:_t,isIdentifierChar:A,isIdentifierStart:f,Token:us,isNewLine:O,lineBreak:v,lineBreakG:R,nonASCIIwhitespace:$};var ei=n("node:module"),Gn=n("node:fs");String.fromCharCode;let Vu=/\/$|\/\?|\/#/,yu=/^\.?\//;function Up(C="",D){return D?Vu.test(C):C.endsWith("/")}function bu(C="",D){if(!D)return C.endsWith("/")?C:C+"/";if(Up(C,!0))return C||"/";let V=C,ue="",Pe=C.indexOf("#");if(Pe!==-1&&(V=C.slice(0,Pe),ue=C.slice(Pe),!V))return ue;let[Ve,...Je]=V.split("?");return Ve+"/"+(Je.length>0?`?${Je.join("?")}`:"")+ue}function $p(C){return C&&C!=="/"}function _a(C,...D){let V=C||"";for(let ue of D.filter(Pe=>$p(Pe)))if(V){let Pe=ue.replace(yu,"");V=bu(V)+Pe}else V=ue;return V}Symbol.for("ufo:protocolRelative");let jt=/^[A-Za-z]:\//;function Vt(C=""){return C&&C.replace(/\\/g,"/").replace(jt,D=>D.toUpperCase())}let vn=/^[/\\]{2}/,Bn=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,nr=/^[A-Za-z]:$/,vr=/.(\.[^./]+|\.)$/,mr=function(C){if(C.length===0)return".";let D=(C=Vt(C)).match(vn),V=yr(C),ue=C[C.length-1]==="/";return(C=fs(C,!V)).length===0?V?"/":ue?"./":".":(ue&&(C+="/"),nr.test(C)&&(C+="/"),D?V?`//${C}`:`//./${C}`:V&&!yr(C)?`/${C}`:C)},Wn=function(...C){let D="";for(let V of C)if(V)if(D.length>0){let ue=D[D.length-1]==="/",Pe=V[0]==="/";D+=ue&&Pe?V.slice(1):ue||Pe?V:`/${V}`}else D+=V;return mr(D)};function ai(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}let ln=function(...C){let D="",V=!1;for(let ue=(C=C.map(Pe=>Vt(Pe))).length-1;ue>=-1&&!V;ue--){let Pe=ue>=0?C[ue]:ai();Pe&&Pe.length!==0&&(D=`${Pe}/${D}`,V=yr(Pe))}return D=fs(D,!V),V&&!yr(D)?`/${D}`:D.length>0?D:"."};function fs(C,D){let V="",ue=0,Pe=-1,Ve=0,Je=null;for(let ot=0;ot<=C.length;++ot){if(ot<C.length)Je=C[ot];else{if(Je==="/")break;Je="/"}if(Je==="/"){if(!(Pe===ot-1||Ve===1))if(Ve===2){if(V.length<2||ue!==2||V[V.length-1]!=="."||V[V.length-2]!=="."){if(V.length>2){let Lt=V.lastIndexOf("/");Lt===-1?(V="",ue=0):(V=V.slice(0,Lt),ue=V.length-1-V.lastIndexOf("/")),Pe=ot,Ve=0;continue}if(V.length>0){V="",ue=0,Pe=ot,Ve=0;continue}}D&&(V+=V.length>0?"/..":"..",ue=2)}else V.length>0?V+=`/${C.slice(Pe+1,ot)}`:V=C.slice(Pe+1,ot),ue=ot-Pe-1;Pe=ot,Ve=0}else Je==="."&&Ve!==-1?++Ve:Ve=-1}return V}let yr=function(C){return Bn.test(C)},ps=function(C){if(C==="..")return"";let D=vr.exec(Vt(C));return D&&D[1]||""},Io=function(C){let D=Vt(C).replace(/\/$/,"").split("/").slice(0,-1);return D.length===1&&nr.test(D[0])&&(D[0]+="/"),D.join("/")||(yr(C)?"/":".")},Bo=function(C,D){let V=Vt(C).split("/"),ue="";for(let Pe=V.length-1;Pe>=0;Pe--){let Ve=V[Pe];if(Ve){ue=Ve;break}}return D&&ue.endsWith(D)?ue.slice(0,-D.length):ue},br=tt("node:url"),Fo=tt("node:assert"),Uo=tt("node:process");var Ku=n("node:path");let Fn=tt("node:v8"),Qp=tt("node:util"),Gp=new Set(ei.builtinModules);function zr(C){return C.replace(/\\/g,"/")}let Yu={}.hasOwnProperty,qp=/^([A-Z][a-z\d]*)+$/,Ay=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),xa={};function Hc(C,D="and"){return C.length<3?C.join(` ${D} `):`${C.slice(0,-1).join(", ")}, ${D} ${C[C.length-1]}`}let wd=new Map,Eu;function Ua(C,D,V){return wd.set(C,D),(function(ue,Pe){return Ve;function Ve(...Je){let ot=Error.stackTraceLimit;gm()&&(Error.stackTraceLimit=0);let Lt=new ue;gm()&&(Error.stackTraceLimit=ot);let nn=(function(Xt,Rn,_n){let Hr=wd.get(Xt);if(Fo.ok(Hr!==void 0,"expected `message` to be found"),typeof Hr=="function")return Fo.ok(Hr.length<=Rn.length,`Code: ${Xt}; The provided arguments length (${Rn.length}) does not match the required ones (${Hr.length}).`),Reflect.apply(Hr,_n,Rn);let Cs=/%[dfijoOs]/g,Cl=0;for(;Cs.exec(Hr)!==null;)Cl++;return Fo.ok(Cl===Rn.length,`Code: ${Xt}; The provided arguments length (${Rn.length}) does not match the required ones (${Cl}).`),Rn.length===0?Hr:(Rn.unshift(Hr),Reflect.apply(Qp.format,null,Rn))})(Pe,Je,Lt);return Object.defineProperties(Lt,{message:{value:nn,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${Pe}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),AE(Lt),Lt.code=Pe,Lt}})(V,C)}function gm(){try{if(Fn.startupSnapshot.isBuildingSnapshot())return!1}catch{}let C=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return C===void 0?Object.isExtensible(Error):Yu.call(C,"writable")&&C.writable!==void 0?C.writable:C.set!==void 0}xa.ERR_INVALID_ARG_TYPE=Ua("ERR_INVALID_ARG_TYPE",(C,D,V)=>{Fo.ok(typeof C=="string","'name' must be a string"),Array.isArray(D)||(D=[D]);let ue="The ";if(C.endsWith(" argument"))ue+=`${C} `;else{let ot=C.includes(".")?"property":"argument";ue+=`"${C}" ${ot} `}ue+="must be ";let Pe=[],Ve=[],Je=[];for(let ot of D)Fo.ok(typeof ot=="string","All expected entries have to be of type string"),Ay.has(ot)?Pe.push(ot.toLowerCase()):qp.exec(ot)===null?(Fo.ok(ot!=="object",'The value "object" should be written as "Object"'),Je.push(ot)):Ve.push(ot);if(Ve.length>0){let ot=Pe.indexOf("object");ot!==-1&&(Pe.slice(ot,1),Ve.push("Object"))}return Pe.length>0&&(ue+=`${Pe.length>1?"one of type":"of type"} ${Hc(Pe,"or")}`,(Ve.length>0||Je.length>0)&&(ue+=" or ")),Ve.length>0&&(ue+=`an instance of ${Hc(Ve,"or")}`,Je.length>0&&(ue+=" or ")),Je.length>0&&(Je.length>1?ue+=`one of ${Hc(Je,"or")}`:(Je[0].toLowerCase()!==Je[0]&&(ue+="an "),ue+=`${Je[0]}`)),ue+=`. Received ${(function(ot){if(ot==null)return String(ot);if(typeof ot=="function"&&ot.name)return`function ${ot.name}`;if(typeof ot=="object")return ot.constructor&&ot.constructor.name?`an instance of ${ot.constructor.name}`:`${(0,Qp.inspect)(ot,{depth:-1})}`;let Lt=(0,Qp.inspect)(ot,{colors:!1});return Lt.length>28&&(Lt=`${Lt.slice(0,25)}...`),`type ${typeof ot} (${Lt})`})(V)}`,ue},TypeError),xa.ERR_INVALID_MODULE_SPECIFIER=Ua("ERR_INVALID_MODULE_SPECIFIER",(C,D,V=void 0)=>`Invalid module "${C}" ${D}${V?` imported from ${V}`:""}`,TypeError),xa.ERR_INVALID_PACKAGE_CONFIG=Ua("ERR_INVALID_PACKAGE_CONFIG",(C,D,V)=>`Invalid package config ${C}${D?` while importing ${D}`:""}${V?`. ${V}`:""}`,Error),xa.ERR_INVALID_PACKAGE_TARGET=Ua("ERR_INVALID_PACKAGE_TARGET",(C,D,V,ue=!1,Pe=void 0)=>{let Ve=typeof V=="string"&&!ue&&V.length>0&&!V.startsWith("./");return D==="."?(Fo.ok(ue===!1),`Invalid "exports" main target ${JSON.stringify(V)} defined in the package config ${C}package.json${Pe?` imported from ${Pe}`:""}${Ve?'; targets must start with "./"':""}`):`Invalid "${ue?"imports":"exports"}" target ${JSON.stringify(V)} defined for '${D}' in the package config ${C}package.json${Pe?` imported from ${Pe}`:""}${Ve?'; targets must start with "./"':""}`},Error),xa.ERR_MODULE_NOT_FOUND=Ua("ERR_MODULE_NOT_FOUND",(C,D,V=!1)=>`Cannot find ${V?"module":"package"} '${C}' imported from ${D}`,Error),xa.ERR_NETWORK_IMPORT_DISALLOWED=Ua("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),xa.ERR_PACKAGE_IMPORT_NOT_DEFINED=Ua("ERR_PACKAGE_IMPORT_NOT_DEFINED",(C,D,V)=>`Package import specifier "${C}" is not defined${D?` in package ${D}package.json`:""} imported from ${V}`,TypeError),xa.ERR_PACKAGE_PATH_NOT_EXPORTED=Ua("ERR_PACKAGE_PATH_NOT_EXPORTED",(C,D,V=void 0)=>D==="."?`No "exports" main defined in ${C}package.json${V?` imported from ${V}`:""}`:`Package subpath '${D}' is not defined by "exports" in ${C}package.json${V?` imported from ${V}`:""}`,Error),xa.ERR_UNSUPPORTED_DIR_IMPORT=Ua("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),xa.ERR_UNSUPPORTED_RESOLVE_REQUEST=Ua("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),xa.ERR_UNKNOWN_FILE_EXTENSION=Ua("ERR_UNKNOWN_FILE_EXTENSION",(C,D)=>`Unknown file extension "${C}" for ${D}`,TypeError),xa.ERR_INVALID_ARG_VALUE=Ua("ERR_INVALID_ARG_VALUE",(C,D,V="is invalid")=>{let ue=(0,Qp.inspect)(D);return ue.length>128&&(ue=`${ue.slice(0,128)}...`),`The ${C.includes(".")?"property":"argument"} '${C}' ${V}. Received ${ue}`},TypeError);let AE=(function(C){let D="__node_internal_"+C.name;return Object.defineProperty(C,"name",{value:D}),C})(function(C){let D=gm();return D&&(Eu=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(C),D&&(Error.stackTraceLimit=Eu),C}),Og={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Sl}=xa,Dg=new Map;function W0(C,{base:D,specifier:V}){let ue=Dg.get(C);if(ue)return ue;let Pe;try{Pe=Gn.readFileSync(Ku.toNamespacedPath(C),"utf8")}catch(Je){let ot=Je;if(ot.code!=="ENOENT")throw ot}let Ve={exists:!1,pjsonPath:C,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(Pe!==void 0){let Je;try{Je=JSON.parse(Pe)}catch(ot){let Lt=ot,nn=new Sl(C,(D?`"${V}" from `:"")+(0,br.fileURLToPath)(D||V),Lt.message);throw nn.cause=Lt,nn}Ve.exists=!0,Og.call(Je,"name")&&typeof Je.name=="string"&&(Ve.name=Je.name),Og.call(Je,"main")&&typeof Je.main=="string"&&(Ve.main=Je.main),Og.call(Je,"exports")&&(Ve.exports=Je.exports),Og.call(Je,"imports")&&(Ve.imports=Je.imports),!Og.call(Je,"type")||Je.type!=="commonjs"&&Je.type!=="module"||(Ve.type=Je.type)}return Dg.set(C,Ve),Ve}function yy(C){let D=new URL("package.json",C);for(;!D.pathname.endsWith("node_modules/package.json");){let V=W0((0,br.fileURLToPath)(D),{specifier:C});if(V.exists)return V;let ue=D;if(D=new URL("../package.json",D),D.pathname===ue.pathname)break}return{pjsonPath:(0,br.fileURLToPath)(D),exists:!1,type:"none"}}function jl(C){return yy(C).type}let{ERR_UNKNOWN_FILE_EXTENSION:ch}=xa,wC={}.hasOwnProperty,Oe={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"},g={__proto__:null,"data:":function(C){let{1:D}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(C.pathname)||[null,null,null];return(function(V){return V&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(V)?"module":V==="application/json"?"json":null})(D)},"file:":function(C,D,V){let ue=(function(Je){let ot=Je.pathname,Lt=ot.length;for(;Lt--;){let nn=ot.codePointAt(Lt);if(nn===47)return"";if(nn===46)return ot.codePointAt(Lt-1)===47?"":ot.slice(Lt)}return""})(C);if(ue===".js"){let Je=jl(C);return Je!=="none"?Je:"commonjs"}if(ue===""){let Je=jl(C);return Je==="none"||Je==="commonjs"?"commonjs":"module"}let Pe=Oe[ue];if(Pe)return Pe;if(V)return;let Ve=(0,br.fileURLToPath)(C);throw new ch(ue,Ve)},"http:":I,"https:":I,"node:":()=>"builtin"};function I(){}let P=Object.freeze(["node","import"]),F=new Set(P);function ae(C){return F}let ke=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:Le,ERR_INVALID_PACKAGE_CONFIG:Ye,ERR_INVALID_PACKAGE_TARGET:Ke,ERR_MODULE_NOT_FOUND:Tt,ERR_PACKAGE_IMPORT_NOT_DEFINED:en,ERR_PACKAGE_PATH_NOT_EXPORTED:Jn,ERR_UNSUPPORTED_DIR_IMPORT:wn,ERR_UNSUPPORTED_RESOLVE_REQUEST:Er}=xa,Is={}.hasOwnProperty,co=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,xr=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,$o=/^\.|%|\\/,vd=/\*/g,H0=/%2f|%5c/i,j0=new Set,w=/[/\\]{2}/;function Q(C,D,V,ue,Pe,Ve,Je){if(Uo.noDeprecation)return;let ot=(0,br.fileURLToPath)(ue),Lt=w.exec(Je?C:D)!==null;Uo.emitWarning(`Use of deprecated ${Lt?"double slash":"leading or trailing slash matching"} resolving "${C}" for module request "${D}" ${D===V?"":`matched to "${V}" `}in the "${Pe?"imports":"exports"}" field module resolution of the package at ${ot}${Ve?` imported from ${(0,br.fileURLToPath)(Ve)}`:""}.`,"DeprecationWarning","DEP0166")}function de(C,D,V,ue){if(Uo.noDeprecation||(function(Lt,nn){let Xt=Lt.protocol;return wC.call(g,Xt)&&g[Xt](Lt,nn,!0)||null})(C,{parentURL:V.href})!=="module")return;let Ve=(0,br.fileURLToPath)(C.href),Je=(0,br.fileURLToPath)(new URL(".",D)),ot=(0,br.fileURLToPath)(V);ue?Ku.resolve(Je,ue)!==Ve&&Uo.emitWarning(`Package ${Je} has a "main" field set to "${ue}", excluding the full filename and extension to the resolved file at "${Ve.slice(Je.length)}", imported from ${ot}.
397
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return De(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),C){var V=this.pos-1;this.invalidStringToken(V,"Invalid escape sequence in template string")}default:if(D>=48&&D<=55){var ue=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],Pe=parseInt(ue,8);return Pe>255&&(ue=ue.slice(0,-1),Pe=parseInt(ue,8)),this.pos+=ue.length-1,D=this.input.charCodeAt(this.pos),ue==="0"&&D!==56&&D!==57||!this.strict&&!C||this.invalidStringToken(this.pos-1-ue.length,C?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(Pe)}return O(D)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(D)}},dn.readHexChar=function(C){var D=this.pos,V=this.readInt(16,C);return V===null&&this.invalidStringToken(D,"Bad character escape sequence"),V},dn.readWord1=function(){this.containsEsc=!1;for(var C="",D=!0,V=this.pos,ue=this.options.ecmaVersion>=6;this.pos<this.input.length;){var Pe=this.fullCharCodeAtPos();if(A(Pe,ue))this.pos+=Pe<=65535?1:2;else{if(Pe!==92)break;this.containsEsc=!0,C+=this.input.slice(V,this.pos);var Ve=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var Je=this.readCodePoint();(D?f:A)(Je,ue)||this.invalidStringToken(Ve,"Invalid Unicode escape"),C+=De(Je),V=this.pos}D=!1}return C+this.input.slice(V,this.pos)},dn.readWord=function(){var C=this.readWord1(),D=T.name;return this.keywords.test(C)&&(D=x[C]),this.finishToken(D,C)},xe.acorn={Parser:xe,version:"8.16.0",defaultOptions:se,Position:Ie,SourceLocation:ne,getLineInfo:ce,Node:qt,TokenType:y,tokTypes:T,keywordTypes:x,TokContext:rt,tokContexts:_t,isIdentifierChar:A,isIdentifierStart:f,Token:us,isNewLine:O,lineBreak:v,lineBreakG:R,nonASCIIwhitespace:$};var ei=n("node:module"),Gn=n("node:fs");String.fromCharCode;let Vu=/\/$|\/\?|\/#/,yu=/^\.?\//;function Up(C="",D){return D?Vu.test(C):C.endsWith("/")}function bu(C="",D){if(!D)return C.endsWith("/")?C:C+"/";if(Up(C,!0))return C||"/";let V=C,ue="",Pe=C.indexOf("#");if(Pe!==-1&&(V=C.slice(0,Pe),ue=C.slice(Pe),!V))return ue;let[Ve,...Je]=V.split("?");return Ve+"/"+(Je.length>0?`?${Je.join("?")}`:"")+ue}function $p(C){return C&&C!=="/"}function _a(C,...D){let V=C||"";for(let ue of D.filter(Pe=>$p(Pe)))if(V){let Pe=ue.replace(yu,"");V=bu(V)+Pe}else V=ue;return V}Symbol.for("ufo:protocolRelative");let jt=/^[A-Za-z]:\//;function Vt(C=""){return C&&C.replace(/\\/g,"/").replace(jt,D=>D.toUpperCase())}let vn=/^[/\\]{2}/,Bn=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,nr=/^[A-Za-z]:$/,vr=/.(\.[^./]+|\.)$/,mr=function(C){if(C.length===0)return".";let D=(C=Vt(C)).match(vn),V=yr(C),ue=C[C.length-1]==="/";return(C=fs(C,!V)).length===0?V?"/":ue?"./":".":(ue&&(C+="/"),nr.test(C)&&(C+="/"),D?V?`//${C}`:`//./${C}`:V&&!yr(C)?`/${C}`:C)},Wn=function(...C){let D="";for(let V of C)if(V)if(D.length>0){let ue=D[D.length-1]==="/",Pe=V[0]==="/";D+=ue&&Pe?V.slice(1):ue||Pe?V:`/${V}`}else D+=V;return mr(D)};function ai(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}let ln=function(...C){let D="",V=!1;for(let ue=(C=C.map(Pe=>Vt(Pe))).length-1;ue>=-1&&!V;ue--){let Pe=ue>=0?C[ue]:ai();Pe&&Pe.length!==0&&(D=`${Pe}/${D}`,V=yr(Pe))}return D=fs(D,!V),V&&!yr(D)?`/${D}`:D.length>0?D:"."};function fs(C,D){let V="",ue=0,Pe=-1,Ve=0,Je=null;for(let ot=0;ot<=C.length;++ot){if(ot<C.length)Je=C[ot];else{if(Je==="/")break;Je="/"}if(Je==="/"){if(!(Pe===ot-1||Ve===1))if(Ve===2){if(V.length<2||ue!==2||V[V.length-1]!=="."||V[V.length-2]!=="."){if(V.length>2){let Lt=V.lastIndexOf("/");Lt===-1?(V="",ue=0):(V=V.slice(0,Lt),ue=V.length-1-V.lastIndexOf("/")),Pe=ot,Ve=0;continue}if(V.length>0){V="",ue=0,Pe=ot,Ve=0;continue}}D&&(V+=V.length>0?"/..":"..",ue=2)}else V.length>0?V+=`/${C.slice(Pe+1,ot)}`:V=C.slice(Pe+1,ot),ue=ot-Pe-1;Pe=ot,Ve=0}else Je==="."&&Ve!==-1?++Ve:Ve=-1}return V}let yr=function(C){return Bn.test(C)},ps=function(C){if(C==="..")return"";let D=vr.exec(Vt(C));return D&&D[1]||""},Io=function(C){let D=Vt(C).replace(/\/$/,"").split("/").slice(0,-1);return D.length===1&&nr.test(D[0])&&(D[0]+="/"),D.join("/")||(yr(C)?"/":".")},Bo=function(C,D){let V=Vt(C).split("/"),ue="";for(let Pe=V.length-1;Pe>=0;Pe--){let Ve=V[Pe];if(Ve){ue=Ve;break}}return D&&ue.endsWith(D)?ue.slice(0,-D.length):ue},br=tt("node:url"),Fo=tt("node:assert"),Uo=tt("node:process");var Ku=n("node:path");let Fn=tt("node:v8"),Qp=tt("node:util"),Gp=new Set(ei.builtinModules);function zr(C){return C.replace(/\\/g,"/")}let Yu={}.hasOwnProperty,qp=/^([A-Z][a-z\d]*)+$/,Ay=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),xa={};function Hc(C,D="and"){return C.length<3?C.join(` ${D} `):`${C.slice(0,-1).join(", ")}, ${D} ${C[C.length-1]}`}let wd=new Map,Eu;function Ua(C,D,V){return wd.set(C,D),(function(ue,Pe){return Ve;function Ve(...Je){let ot=Error.stackTraceLimit;gm()&&(Error.stackTraceLimit=0);let Lt=new ue;gm()&&(Error.stackTraceLimit=ot);let nn=(function(Xt,Rn,_n){let Hr=wd.get(Xt);if(Fo.ok(Hr!==void 0,"expected `message` to be found"),typeof Hr=="function")return Fo.ok(Hr.length<=Rn.length,`Code: ${Xt}; The provided arguments length (${Rn.length}) does not match the required ones (${Hr.length}).`),Reflect.apply(Hr,_n,Rn);let Ts=/%[dfijoOs]/g,Cl=0;for(;Ts.exec(Hr)!==null;)Cl++;return Fo.ok(Cl===Rn.length,`Code: ${Xt}; The provided arguments length (${Rn.length}) does not match the required ones (${Cl}).`),Rn.length===0?Hr:(Rn.unshift(Hr),Reflect.apply(Qp.format,null,Rn))})(Pe,Je,Lt);return Object.defineProperties(Lt,{message:{value:nn,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${Pe}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),AE(Lt),Lt.code=Pe,Lt}})(V,C)}function gm(){try{if(Fn.startupSnapshot.isBuildingSnapshot())return!1}catch{}let C=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return C===void 0?Object.isExtensible(Error):Yu.call(C,"writable")&&C.writable!==void 0?C.writable:C.set!==void 0}xa.ERR_INVALID_ARG_TYPE=Ua("ERR_INVALID_ARG_TYPE",(C,D,V)=>{Fo.ok(typeof C=="string","'name' must be a string"),Array.isArray(D)||(D=[D]);let ue="The ";if(C.endsWith(" argument"))ue+=`${C} `;else{let ot=C.includes(".")?"property":"argument";ue+=`"${C}" ${ot} `}ue+="must be ";let Pe=[],Ve=[],Je=[];for(let ot of D)Fo.ok(typeof ot=="string","All expected entries have to be of type string"),Ay.has(ot)?Pe.push(ot.toLowerCase()):qp.exec(ot)===null?(Fo.ok(ot!=="object",'The value "object" should be written as "Object"'),Je.push(ot)):Ve.push(ot);if(Ve.length>0){let ot=Pe.indexOf("object");ot!==-1&&(Pe.slice(ot,1),Ve.push("Object"))}return Pe.length>0&&(ue+=`${Pe.length>1?"one of type":"of type"} ${Hc(Pe,"or")}`,(Ve.length>0||Je.length>0)&&(ue+=" or ")),Ve.length>0&&(ue+=`an instance of ${Hc(Ve,"or")}`,Je.length>0&&(ue+=" or ")),Je.length>0&&(Je.length>1?ue+=`one of ${Hc(Je,"or")}`:(Je[0].toLowerCase()!==Je[0]&&(ue+="an "),ue+=`${Je[0]}`)),ue+=`. Received ${(function(ot){if(ot==null)return String(ot);if(typeof ot=="function"&&ot.name)return`function ${ot.name}`;if(typeof ot=="object")return ot.constructor&&ot.constructor.name?`an instance of ${ot.constructor.name}`:`${(0,Qp.inspect)(ot,{depth:-1})}`;let Lt=(0,Qp.inspect)(ot,{colors:!1});return Lt.length>28&&(Lt=`${Lt.slice(0,25)}...`),`type ${typeof ot} (${Lt})`})(V)}`,ue},TypeError),xa.ERR_INVALID_MODULE_SPECIFIER=Ua("ERR_INVALID_MODULE_SPECIFIER",(C,D,V=void 0)=>`Invalid module "${C}" ${D}${V?` imported from ${V}`:""}`,TypeError),xa.ERR_INVALID_PACKAGE_CONFIG=Ua("ERR_INVALID_PACKAGE_CONFIG",(C,D,V)=>`Invalid package config ${C}${D?` while importing ${D}`:""}${V?`. ${V}`:""}`,Error),xa.ERR_INVALID_PACKAGE_TARGET=Ua("ERR_INVALID_PACKAGE_TARGET",(C,D,V,ue=!1,Pe=void 0)=>{let Ve=typeof V=="string"&&!ue&&V.length>0&&!V.startsWith("./");return D==="."?(Fo.ok(ue===!1),`Invalid "exports" main target ${JSON.stringify(V)} defined in the package config ${C}package.json${Pe?` imported from ${Pe}`:""}${Ve?'; targets must start with "./"':""}`):`Invalid "${ue?"imports":"exports"}" target ${JSON.stringify(V)} defined for '${D}' in the package config ${C}package.json${Pe?` imported from ${Pe}`:""}${Ve?'; targets must start with "./"':""}`},Error),xa.ERR_MODULE_NOT_FOUND=Ua("ERR_MODULE_NOT_FOUND",(C,D,V=!1)=>`Cannot find ${V?"module":"package"} '${C}' imported from ${D}`,Error),xa.ERR_NETWORK_IMPORT_DISALLOWED=Ua("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),xa.ERR_PACKAGE_IMPORT_NOT_DEFINED=Ua("ERR_PACKAGE_IMPORT_NOT_DEFINED",(C,D,V)=>`Package import specifier "${C}" is not defined${D?` in package ${D}package.json`:""} imported from ${V}`,TypeError),xa.ERR_PACKAGE_PATH_NOT_EXPORTED=Ua("ERR_PACKAGE_PATH_NOT_EXPORTED",(C,D,V=void 0)=>D==="."?`No "exports" main defined in ${C}package.json${V?` imported from ${V}`:""}`:`Package subpath '${D}' is not defined by "exports" in ${C}package.json${V?` imported from ${V}`:""}`,Error),xa.ERR_UNSUPPORTED_DIR_IMPORT=Ua("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),xa.ERR_UNSUPPORTED_RESOLVE_REQUEST=Ua("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),xa.ERR_UNKNOWN_FILE_EXTENSION=Ua("ERR_UNKNOWN_FILE_EXTENSION",(C,D)=>`Unknown file extension "${C}" for ${D}`,TypeError),xa.ERR_INVALID_ARG_VALUE=Ua("ERR_INVALID_ARG_VALUE",(C,D,V="is invalid")=>{let ue=(0,Qp.inspect)(D);return ue.length>128&&(ue=`${ue.slice(0,128)}...`),`The ${C.includes(".")?"property":"argument"} '${C}' ${V}. Received ${ue}`},TypeError);let AE=(function(C){let D="__node_internal_"+C.name;return Object.defineProperty(C,"name",{value:D}),C})(function(C){let D=gm();return D&&(Eu=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(C),D&&(Error.stackTraceLimit=Eu),C}),Og={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Sl}=xa,Dg=new Map;function W0(C,{base:D,specifier:V}){let ue=Dg.get(C);if(ue)return ue;let Pe;try{Pe=Gn.readFileSync(Ku.toNamespacedPath(C),"utf8")}catch(Je){let ot=Je;if(ot.code!=="ENOENT")throw ot}let Ve={exists:!1,pjsonPath:C,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(Pe!==void 0){let Je;try{Je=JSON.parse(Pe)}catch(ot){let Lt=ot,nn=new Sl(C,(D?`"${V}" from `:"")+(0,br.fileURLToPath)(D||V),Lt.message);throw nn.cause=Lt,nn}Ve.exists=!0,Og.call(Je,"name")&&typeof Je.name=="string"&&(Ve.name=Je.name),Og.call(Je,"main")&&typeof Je.main=="string"&&(Ve.main=Je.main),Og.call(Je,"exports")&&(Ve.exports=Je.exports),Og.call(Je,"imports")&&(Ve.imports=Je.imports),!Og.call(Je,"type")||Je.type!=="commonjs"&&Je.type!=="module"||(Ve.type=Je.type)}return Dg.set(C,Ve),Ve}function yy(C){let D=new URL("package.json",C);for(;!D.pathname.endsWith("node_modules/package.json");){let V=W0((0,br.fileURLToPath)(D),{specifier:C});if(V.exists)return V;let ue=D;if(D=new URL("../package.json",D),D.pathname===ue.pathname)break}return{pjsonPath:(0,br.fileURLToPath)(D),exists:!1,type:"none"}}function jl(C){return yy(C).type}let{ERR_UNKNOWN_FILE_EXTENSION:ch}=xa,wC={}.hasOwnProperty,Oe={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"},g={__proto__:null,"data:":function(C){let{1:D}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(C.pathname)||[null,null,null];return(function(V){return V&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(V)?"module":V==="application/json"?"json":null})(D)},"file:":function(C,D,V){let ue=(function(Je){let ot=Je.pathname,Lt=ot.length;for(;Lt--;){let nn=ot.codePointAt(Lt);if(nn===47)return"";if(nn===46)return ot.codePointAt(Lt-1)===47?"":ot.slice(Lt)}return""})(C);if(ue===".js"){let Je=jl(C);return Je!=="none"?Je:"commonjs"}if(ue===""){let Je=jl(C);return Je==="none"||Je==="commonjs"?"commonjs":"module"}let Pe=Oe[ue];if(Pe)return Pe;if(V)return;let Ve=(0,br.fileURLToPath)(C);throw new ch(ue,Ve)},"http:":I,"https:":I,"node:":()=>"builtin"};function I(){}let P=Object.freeze(["node","import"]),F=new Set(P);function ae(C){return F}let ke=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:Le,ERR_INVALID_PACKAGE_CONFIG:Ye,ERR_INVALID_PACKAGE_TARGET:Ke,ERR_MODULE_NOT_FOUND:Tt,ERR_PACKAGE_IMPORT_NOT_DEFINED:en,ERR_PACKAGE_PATH_NOT_EXPORTED:Jn,ERR_UNSUPPORTED_DIR_IMPORT:wn,ERR_UNSUPPORTED_RESOLVE_REQUEST:Er}=xa,Is={}.hasOwnProperty,co=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,xr=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,$o=/^\.|%|\\/,vd=/\*/g,H0=/%2f|%5c/i,j0=new Set,w=/[/\\]{2}/;function Q(C,D,V,ue,Pe,Ve,Je){if(Uo.noDeprecation)return;let ot=(0,br.fileURLToPath)(ue),Lt=w.exec(Je?C:D)!==null;Uo.emitWarning(`Use of deprecated ${Lt?"double slash":"leading or trailing slash matching"} resolving "${C}" for module request "${D}" ${D===V?"":`matched to "${V}" `}in the "${Pe?"imports":"exports"}" field module resolution of the package at ${ot}${Ve?` imported from ${(0,br.fileURLToPath)(Ve)}`:""}.`,"DeprecationWarning","DEP0166")}function de(C,D,V,ue){if(Uo.noDeprecation||(function(Lt,nn){let Xt=Lt.protocol;return wC.call(g,Xt)&&g[Xt](Lt,nn,!0)||null})(C,{parentURL:V.href})!=="module")return;let Ve=(0,br.fileURLToPath)(C.href),Je=(0,br.fileURLToPath)(new URL(".",D)),ot=(0,br.fileURLToPath)(V);ue?Ku.resolve(Je,ue)!==Ve&&Uo.emitWarning(`Package ${Je} has a "main" field set to "${ue}", excluding the full filename and extension to the resolved file at "${Ve.slice(Je.length)}", imported from ${ot}.
398
398
  Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):Uo.emitWarning(`No "main" or "exports" field defined in the package.json for ${Je} resolving the main entry point "${Ve.slice(Je.length)}", imported from ${ot}.
399
- Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function Ce(C){try{return(0,Gn.statSync)(C)}catch{}}function We(C){let D=(0,Gn.statSync)(C,{throwIfNoEntry:!1}),V=D?D.isFile():void 0;return V!=null&&V}function ht(C,D,V){let ue;if(D.main!==void 0){if(ue=new URL(D.main,C),We(ue))return ue;let Je=[`./${D.main}.js`,`./${D.main}.json`,`./${D.main}.node`,`./${D.main}/index.js`,`./${D.main}/index.json`,`./${D.main}/index.node`],ot=-1;for(;++ot<Je.length&&(ue=new URL(Je[ot],C),!We(ue));)ue=void 0;if(ue)return de(ue,C,V,D.main),ue}let Pe=["./index.js","./index.json","./index.node"],Ve=-1;for(;++Ve<Pe.length&&(ue=new URL(Pe[Ve],C),!We(ue));)ue=void 0;if(ue)return de(ue,C,V,D.main),ue;throw new Tt((0,br.fileURLToPath)(new URL(".",C)),(0,br.fileURLToPath)(V))}function It(C,D,V){return new Jn((0,br.fileURLToPath)(new URL(".",D)),C,V&&(0,br.fileURLToPath)(V))}function Wt(C,D,V,ue,Pe){return D=typeof D=="object"&&D!==null?JSON.stringify(D,null,""):`${D}`,new Ke((0,br.fileURLToPath)(new URL(".",V)),C,D,ue,Pe&&(0,br.fileURLToPath)(Pe))}function Dn(C,D,V,ue,Pe,Ve,Je,ot,Lt){if(D!==""&&!Ve&&C[C.length-1]!=="/")throw Wt(V,C,ue,Je,Pe);if(!C.startsWith("./")){if(Je&&!C.startsWith("../")&&!C.startsWith("/")){let _n=!1;try{new URL(C),_n=!0}catch{}if(!_n)return Am(Ve?ke.call(vd,C,()=>D):C+D,ue,Lt)}throw Wt(V,C,ue,Je,Pe)}if(co.exec(C.slice(2))!==null){if(xr.exec(C.slice(2))!==null)throw Wt(V,C,ue,Je,Pe);if(!ot){let _n=Ve?V.replace("*",()=>D):V+D;Q(Ve?ke.call(vd,C,()=>D):C,_n,V,ue,Je,Pe,!0)}}let nn=new URL(C,ue),Xt=nn.pathname,Rn=new URL(".",ue).pathname;if(!Xt.startsWith(Rn))throw Wt(V,C,ue,Je,Pe);if(D==="")return nn;if(co.exec(D)!==null){let _n=Ve?V.replace("*",()=>D):V+D;xr.exec(D)===null?ot||Q(Ve?ke.call(vd,C,()=>D):C,_n,V,ue,Je,Pe,!1):(function(Hr,Cs,Cl,Yi,Ns){let Ti=`request is not a valid match in pattern "${Cs}" for the "${Yi?"imports":"exports"}" resolution of ${(0,br.fileURLToPath)(Cl)}`;throw new Le(Hr,Ti,Ns&&(0,br.fileURLToPath)(Ns))})(_n,V,ue,Je,Pe)}return Ve?new URL(ke.call(vd,nn.href,()=>D)):new URL(D,nn)}function lr(C){let D=Number(C);return`${D}`===C&&D>=0&&D<4294967295}function Rr(C,D,V,ue,Pe,Ve,Je,ot,Lt){if(typeof D=="string")return Dn(D,V,ue,C,Pe,Ve,Je,ot,Lt);if(Array.isArray(D)){let nn=D;if(nn.length===0)return null;let Xt,Rn=-1;for(;++Rn<nn.length;){let _n=nn[Rn],Hr;try{Hr=Rr(C,_n,V,ue,Pe,Ve,Je,ot,Lt)}catch(Cs){if(Xt=Cs,Cs.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw Cs}if(Hr!==void 0){if(Hr!==null)return Hr;Xt=null}}if(Xt==null)return null;throw Xt}if(typeof D=="object"&&D!==null){let nn=Object.getOwnPropertyNames(D),Xt=-1;for(;++Xt<nn.length;)if(lr(nn[Xt]))throw new Ye((0,br.fileURLToPath)(C),Pe,'"exports" cannot contain numeric property keys.');for(Xt=-1;++Xt<nn.length;){let Rn=nn[Xt];if(Rn==="default"||Lt&&Lt.has(Rn)){let _n=Rr(C,D[Rn],V,ue,Pe,Ve,Je,ot,Lt);if(_n===void 0)continue;return _n}}return null}if(D===null)return null;throw Wt(ue,D,C,Je,Pe)}function hs(C,D,V){if(Uo.noDeprecation)return;let ue=(0,br.fileURLToPath)(D);j0.has(ue+"|"+C)||(j0.add(ue+"|"+C),Uo.emitWarning(`Use of deprecated trailing slash pattern mapping "${C}" in the "exports" field module resolution of the package at ${ue}${V?` imported from ${(0,br.fileURLToPath)(V)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function Us(C,D,V,ue,Pe){let Ve=V.exports;if((function(Xt,Rn,_n){if(typeof Xt=="string"||Array.isArray(Xt))return!0;if(typeof Xt!="object"||Xt===null)return!1;let Hr=Object.getOwnPropertyNames(Xt),Cs=!1,Cl=0,Yi=-1;for(;++Yi<Hr.length;){let Ns=Hr[Yi],Ti=Ns===""||Ns[0]!==".";if(Cl++===0)Cs=Ti;else if(Cs!==Ti)throw new Ye((0,br.fileURLToPath)(Rn),_n,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return Cs})(Ve,C,ue)&&(Ve={".":Ve}),Is.call(Ve,D)&&!D.includes("*")&&!D.endsWith("/")){let Xt=Rr(C,Ve[D],"",D,ue,!1,!1,!1,Pe);if(Xt==null)throw It(D,C,ue);return Xt}let Je="",ot="",Lt=Object.getOwnPropertyNames(Ve),nn=-1;for(;++nn<Lt.length;){let Xt=Lt[nn],Rn=Xt.indexOf("*");if(Rn!==-1&&D.startsWith(Xt.slice(0,Rn))){D.endsWith("/")&&hs(D,C,ue);let _n=Xt.slice(Rn+1);D.length>=Xt.length&&D.endsWith(_n)&&sc(Je,Xt)===1&&Xt.lastIndexOf("*")===Rn&&(Je=Xt,ot=D.slice(Rn,D.length-_n.length))}}if(Je){let Xt=Rr(C,Ve[Je],ot,Je,ue,!0,!1,D.endsWith("/"),Pe);if(Xt==null)throw It(D,C,ue);return Xt}throw It(D,C,ue)}function sc(C,D){let V=C.indexOf("*"),ue=D.indexOf("*"),Pe=V===-1?C.length:V+1,Ve=ue===-1?D.length:ue+1;return Pe>Ve?-1:Ve>Pe||V===-1?1:ue===-1||C.length>D.length?-1:D.length>C.length?1:0}function uf(C,D,V){if(C==="#"||C.startsWith("#/")||C.endsWith("/"))throw new Le(C,"is not a valid internal imports specifier name",(0,br.fileURLToPath)(D));let ue,Pe=yy(D);if(Pe.exists){ue=(0,br.pathToFileURL)(Pe.pjsonPath);let Ve=Pe.imports;if(Ve)if(Is.call(Ve,C)&&!C.includes("*")){let Je=Rr(ue,Ve[C],"",C,D,!1,!0,!1,V);if(Je!=null)return Je}else{let Je="",ot="",Lt=Object.getOwnPropertyNames(Ve),nn=-1;for(;++nn<Lt.length;){let Xt=Lt[nn],Rn=Xt.indexOf("*");if(Rn!==-1&&C.startsWith(Xt.slice(0,-1))){let _n=Xt.slice(Rn+1);C.length>=Xt.length&&C.endsWith(_n)&&sc(Je,Xt)===1&&Xt.lastIndexOf("*")===Rn&&(Je=Xt,ot=C.slice(Rn,C.length-_n.length))}}if(Je){let Xt=Rr(ue,Ve[Je],ot,Je,D,!0,!0,!1,V);if(Xt!=null)return Xt}}}throw(function(Ve,Je,ot){return new en(Ve,Je&&(0,br.fileURLToPath)(new URL(".",Je)),(0,br.fileURLToPath)(ot))})(C,ue,D)}function Am(C,D,V){if(ei.builtinModules.includes(C))return new URL("node:"+C);let{packageName:ue,packageSubpath:Pe,isScoped:Ve}=(function(Xt,Rn){let _n=Xt.indexOf("/"),Hr=!0,Cs=!1;Xt[0]==="@"&&(Cs=!0,_n===-1||Xt.length===0?Hr=!1:_n=Xt.indexOf("/",_n+1));let Cl=_n===-1?Xt:Xt.slice(0,_n);if($o.exec(Cl)!==null&&(Hr=!1),!Hr)throw new Le(Xt,"is not a valid package name",(0,br.fileURLToPath)(Rn));return{packageName:Cl,packageSubpath:"."+(_n===-1?"":Xt.slice(_n)),isScoped:Cs}})(C,D),Je=yy(D);if(Je.exists){let Xt=(0,br.pathToFileURL)(Je.pjsonPath);if(Je.name===ue&&Je.exports!==void 0&&Je.exports!==null)return Us(Xt,Pe,Je,D,V)}let ot,Lt=new URL("./node_modules/"+ue+"/package.json",D),nn=(0,br.fileURLToPath)(Lt);do{let Xt=Ce(nn.slice(0,-13));if(!Xt||!Xt.isDirectory()){ot=nn,Lt=new URL((Ve?"../../../../node_modules/":"../../../node_modules/")+ue+"/package.json",Lt),nn=(0,br.fileURLToPath)(Lt);continue}let Rn=W0(nn,{base:D,specifier:C});return Rn.exports!==void 0&&Rn.exports!==null?Us(Lt,Pe,Rn,D,V):Pe==="."?ht(Lt,Rn,D):new URL(Pe,Lt)}while(nn.length!==ot.length)}function zu(C,D,V,ue){V===void 0&&(V=ae());let Pe=D.protocol,Ve=Pe==="data:"||Pe==="http:"||Pe==="https:",Je;if((function(ot){return ot!==""&&(ot[0]==="/"||(function(Lt){return Lt[0]==="."&&(Lt.length===1||Lt[1]==="/"||Lt[1]==="."&&(Lt.length===2||Lt[2]==="/"))})(ot))})(C))try{Je=new URL(C,D)}catch(ot){let Lt=new Er(C,D);throw Lt.cause=ot,Lt}else if(Pe==="file:"&&C[0]==="#")Je=uf(C,D,V);else try{Je=new URL(C)}catch(ot){if(Ve&&!ei.builtinModules.includes(C)){let Lt=new Er(C,D);throw Lt.cause=ot,Lt}Je=Am(C,D,V)}return Fo.ok(Je!==void 0,"expected to be defined"),Je.protocol!=="file:"?Je:(function(ot,Lt){if(H0.exec(ot.pathname)!==null)throw new Le(ot.pathname,'must not include encoded "/" or "\\" characters',(0,br.fileURLToPath)(Lt));let nn;try{nn=(0,br.fileURLToPath)(ot)}catch(Rn){let _n=Rn;throw Object.defineProperty(_n,"input",{value:String(ot)}),Object.defineProperty(_n,"module",{value:String(Lt)}),_n}let Xt=Ce(nn.endsWith("/")?nn.slice(-1):nn);if(Xt&&Xt.isDirectory()){let Rn=new wn(nn,(0,br.fileURLToPath)(Lt));throw Rn.url=String(ot),Rn}if(!Xt||!Xt.isFile()){let Rn=new Tt(nn||ot.pathname,Lt&&(0,br.fileURLToPath)(Lt),!0);throw Rn.url=String(ot),Rn}{let Rn=(0,Gn.realpathSync)(nn),{search:_n,hash:Hr}=ot;(ot=(0,br.pathToFileURL)(Rn+(nn.endsWith(Ku.sep)?"/":""))).search=_n,ot.hash=Hr}return ot})(Je,D)}function Wp(C){return typeof C!="string"||C.startsWith("file://")?zr((0,br.fileURLToPath)(C)):zr(C)}function fr(C){return(0,br.pathToFileURL)(Wp(C)).toString()}let ws=new Set(["node","import"]),zs=[".mjs",".cjs",".js",".json"],Vl=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function oc(C,D,V){try{return zu(C,D,V)}catch(ue){if(!Vl.has(ue?.code))throw ue}}function vC(C,D={}){if(typeof C!="string"){if(!(C instanceof URL))throw new TypeError("input must be a `string` or `URL`");C=Wp(C)}if(/(?:node|data|http|https):/.test(C))return C;if(Gp.has(C))return"node:"+C;if(C.startsWith("file://")&&(C=Wp(C)),yr(C))try{if((0,Gn.statSync)(C).isFile())return fr(C)}catch(Je){if(Je?.code!=="ENOENT")throw Je}let V=D.conditions?new Set(D.conditions):ws,ue=(Array.isArray(D.url)?D.url:[D.url]).filter(Boolean).map(Je=>new URL((function(ot){return typeof ot!="string"&&(ot=ot.toString()),/(?:node|data|http|https|file):/.test(ot)?ot:Gp.has(ot)?"node:"+ot:"file://"+encodeURI(zr(ot))})(Je.toString())));ue.length===0&&ue.push(new URL(fr(process.cwd())));let Pe=[...ue];for(let Je of ue)Je.protocol==="file:"&&Pe.push(new URL("./",Je),new URL(_a(Je.pathname,"_index.js"),Je),new URL("node_modules",Je));let Ve;for(let Je of Pe){if(Ve=oc(C,Je,V),Ve)break;for(let ot of["","/index"]){for(let Lt of D.extensions||zs)if(Ve=oc(_a(C,ot)+Lt,Je,V),Ve)break;if(Ve)break}if(Ve)break}if(!Ve){let Je=new Error(`Cannot find module ${C} imported from ${Pe.join(", ")}`);throw Je.code="ERR_MODULE_NOT_FOUND",Je}return fr(Ve)}function lh(C,D){return vC(C,D)}function Kl(C,D){return Wp(lh(C,D))}let pf=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,Ju=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function RC(C,D={}){return D.stripComments&&(C=C.replace(Ju,"")),pf.test(C)}function uh(C){if(typeof C!="string")throw new TypeError("Expected a string");return C.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}let aR=new Set(["/","\\",void 0]),cR=Symbol.for("pathe:normalizedAlias"),sY=/[/\\]/;function oY(C){if(C[cR])return C;let D=Object.fromEntries(Object.entries(C).sort(([V],[ue])=>(function(Pe,Ve){return Ve.split("/").length-Pe.split("/").length})(V,ue)));for(let V in D)for(let ue in D)ue===V||V.startsWith(ue)||D[V]?.startsWith(ue)&&aR.has(D[V][ue.length])&&(D[V]=D[ue]+D[V].slice(ue.length));return Object.defineProperty(D,cR,{value:!0,enumerable:!1}),D}function GO(C="/"){let D=C[C.length-1];return D==="/"||D==="\\"}var Rbe={rE:"2.6.1"};let aY=tt("node:crypto");var kC=n.n(aY);let _u=globalThis.process?.env||Object.create(null),by=globalThis.process||{env:_u},lR=by!==void 0&&by.env&&by.env.NODE_ENV||void 0,kbe=[["claude",["CLAUDECODE","CLAUDE_CODE"]],["replit",["REPL_ID"]],["gemini",["GEMINI_CLI"]],["codex",["CODEX_SANDBOX","CODEX_THREAD_ID"]],["opencode",["OPENCODE"]],["pi",[k3("PATH",/\.pi[\\/]agent/)]],["auggie",["AUGMENT_AGENT"]],["goose",["GOOSE_PROVIDER"]],["devin",[k3("EDITOR",/devin/)]],["cursor",["CURSOR_AGENT"]],["kiro",[k3("TERM_PROGRAM",/kiro/)]]];function k3(C,D){return()=>{let V=_u[C];return!!V&&D.test(V)}}let qO=(function(){let C=_u.AI_AGENT;if(C)return{name:C.toLowerCase()};for(let[D,V]of kbe)for(let ue of V)if(typeof ue=="string"?_u[ue]:ue())return{name:D};return{}})(),Pbe=(qO.name,qO.name,[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["GOOGLE_CLOUDRUN","K_SERVICE"],["GOOGLE_CLOUDRUN_JOB","CLOUD_RUN_JOB"],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["JENKINS","JENKINS_URL"],["HUDSON","HUDSON_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOY"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}],["EDGEONE_PAGES","EO_PAGES_CI",{ci:!0}]]),WO=(function(){for(let C of Pbe)if(_u[C[1]||C[0]])return{name:C[0].toLowerCase(),...C[2]};return _u.SHELL==="/bin/jsh"&&by.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}})(),P3=(WO.name,by.platform||""),zKe=!!_u.CI||WO.ci!==!1,Nbe=!!by.stdout?.isTTY,JKe=(_u.DEBUG,lR==="test"||!!_u.TEST),N3=(lR==="production"||_u.MODE,lR==="dev"||lR==="development"||_u.MODE,_u.MINIMAL,/^win/i.test(P3)),Ey=(/^linux/i.test(P3),/^darwin/i.test(P3),!_u.NO_COLOR&&(_u.FORCE_COLOR||(Nbe||N3)&&_u.TERM),(by.versions?.node||"").replace(/^v/,"")||null),HO=(Number(Ey?.split(".")[0]),!!by?.versions?.node),uR="Bun"in globalThis,cY="Deno"in globalThis,jO="fastly"in globalThis,V0=[["Netlify"in globalThis,"netlify"],["EdgeRuntime"in globalThis,"edge-light"],[globalThis.navigator?.userAgent==="Cloudflare-Workers","workerd"],[jO,"fastly"],[cY,"deno"],[uR,"bun"],[HO,"node"]];(function(){let C=V0.find(D=>D[0]);C&&C[1]})();let PC=tt("node:tty"),ph=PC?.WriteStream?.prototype?.hasColors?.()??!1,Fi=(C,D)=>{if(!ph)return Pe=>Pe;let V=`\x1B[${C}m`,ue=`\x1B[${D}m`;return Pe=>{let Ve=Pe+"",Je=Ve.indexOf(ue);if(Je===-1)return V+Ve+ue;let ot=V,Lt=0,nn=(D===22?ue:"")+V;for(;Je!==-1;)ot+=Ve.slice(Lt,Je)+nn,Lt=Je+ue.length,Je=Ve.indexOf(ue,Lt);return ot+=Ve.slice(Lt)+ue,ot}},lY=(Fi(0,0),Fi(1,22),Fi(2,22),Fi(3,23),Fi(4,24),Fi(53,55),Fi(7,27),Fi(8,28),Fi(9,29),Fi(30,39),Fi(31,39)),dh=Fi(32,39),pR=Fi(33,39),uY=Fi(34,39),VO=(Fi(35,39),Fi(36,39)),Obe=(Fi(37,39),Fi(90,39));Fi(40,49),Fi(41,49),Fi(42,49),Fi(43,49),Fi(44,49),Fi(45,49),Fi(46,49),Fi(47,49),Fi(100,49),Fi(91,39),Fi(92,39),Fi(93,39),Fi(94,39),Fi(95,39),Fi(96,39),Fi(97,39),Fi(101,49),Fi(102,49),Fi(103,49),Fi(104,49),Fi(105,49),Fi(106,49),Fi(107,49);function pY(C){if(typeof C!="string"||C.startsWith("file://"))return!1;try{return(0,Gn.lstatSync)(C).isDirectory()}catch{return!1}}function dY(C,D=8){return((function(){if(NC!==void 0)return NC;try{return NC=!!kC().getFips?.(),NC}catch{return NC=!1,NC}})()?kC().createHash("sha256"):kC().createHash("md5")).update(C).digest("hex").slice(0,D)}let mY={true:dh("true"),false:pR("false"),"[rebuild]":pR("[rebuild]"),"[esm]":uY("[esm]"),"[cjs]":dh("[cjs]"),"[import]":uY("[import]"),"[require]":dh("[require]"),"[native]":VO("[native]"),"[transpile]":pR("[transpile]"),"[fallback]":lY("[fallback]"),"[unknown]":lY("[unknown]"),"[hit]":dh("[hit]"),"[miss]":pR("[miss]"),"[json]":dh("[json]"),"[data]":dh("[data]")};function ac(C,...D){if(!C.opts.debug)return;let V=process.cwd();console.log(Obe(["[jiti]",...D.map(ue=>ue in mY?mY[ue]:typeof ue!="string"?JSON.stringify(ue):ue.replace(V,"."))].join(" ")))}function _y(C,D){return C.opts.interopDefault?(function(V){let ue=typeof V;if(V===null||ue!=="object"&&ue!=="function")return V;let Pe=V.default,Ve=typeof Pe,Je=Pe==null,ot=Ve==="object"||Ve==="function";if(Je&&V instanceof Promise)return V;let Lt=Ve==="function"&&ue!=="function",nn=ot&&!(Pe instanceof Promise),Xt=new Map;return new Proxy(V,{get(Rn,_n){if(Xt.has(_n))return Xt.get(_n);let Hr;return _n==="__esModule"?Hr=!0:_n==="default"?Hr=Je?V:typeof Pe?.default=="function"&&V.__esModule?Pe.default:Pe:_n in Rn?Hr=Rn[_n]:nn&&(Hr=Pe[_n],typeof Hr=="function"&&(Hr=Hr.bind(Pe))),Xt.set(_n,Hr),Hr},apply:Lt?(Rn,_n,Hr)=>Reflect.apply(Pe,_n,Hr):void 0})})(D):D}let NC;function Mg(C,D){return!!K0(C,D)}function K0(C,D,V){let ue=process.env[C];if(!(C in process.env))return D;try{return JSON.parse(ue)}catch{return V?ue:D}}let fY=/\.(c|m)?j(sx?)$/,hY=/\.(c|m)?t(sx?)$/;function OC(C,D,V){let ue,Pe;if(C.isNativeRe.test(D))return D;if(C.resolveTsConfigPaths&&!V.skipTsConfigPaths){let ot=C.resolveTsConfigPaths(D);for(let Lt of ot){let nn=OC(C,Lt,{...V,try:!0,skipTsConfigPaths:!0});if(nn)return nn}}C.alias&&(D=(function(ot,Lt){let nn=Vt(ot);Lt=oY(Lt);for(let[Xt,Rn]of Object.entries(Lt)){if(!nn.startsWith(Xt))continue;let _n=GO(Xt)?Xt.slice(0,-1):Xt;if(GO(nn[_n.length]))return Wn(Rn,nn.slice(Xt.length))}return nn})(D,C.alias));let Ve=V?.parentURL||C.url;pY(Ve)&&(Ve=Wn(Ve,"_index.js"));let Je=(V?.async?[V?.conditions,["node","import"],["node","require"]]:[V?.conditions,["node","require"],["node","import"]]).filter(Boolean);for(let ot of Je){try{ue=Kl(D,{url:Ve,conditions:ot,extensions:C.opts.extensions})}catch(Lt){Pe=Lt}if(ue)return ue}try{return C.nativeRequire.resolve(D,{paths:V.paths})}catch(ot){Pe=ot}for(let ot of C.additionalExts)if(ue=O3(C,D+ot,Ve,V)||O3(C,D+"/index"+ot,Ve,V),ue||(hY.test(C.filename)||hY.test(C.parentModule?.filename||"")||fY.test(D))&&(ue=O3(C,D.replace(fY,".$1t$2"),Ve,V),ue))return ue;if(!V?.try)throw Pe}function O3(C,D,V,ue){try{return C.nativeRequire.resolve(D,{...ue,paths:[Io(Wp(V)),...ue?.paths||[]]})}catch{}}let gY=tt("node:fs/promises"),AY=tt("node:perf_hooks"),Dbe=tt("node:vm");var Xu=n.n(Dbe);function yE(C,D,V){let ue=C.parentCache||{};if(D.startsWith("node:"))return bE(C,D,V.async);if(D.startsWith("file:"))D=(0,br.fileURLToPath)(D);else if(D.startsWith("data:")){if(!V.async)throw new Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return ac(C,"[native]","[data]","[import]",D),bE(C,D,!0)}if(ei.builtinModules.includes(D)||D===".pnp.js")return bE(C,D,V.async);if(C.opts.virtualModules&&D in C.opts.virtualModules){ac(C,"[virtual]",D);let ot=C.opts.virtualModules[D];return V.async?Promise.resolve(_y(C,ot)):_y(C,ot)}if(C.opts.tryNative&&!C.opts.transformOptions)try{if(!(D=OC(C,D,V))&&V.try)return;if(ac(C,"[try-native]",V.async&&C.nativeImport?"[import]":"[require]",D),V.async&&C.nativeImport)return C.nativeImport(D).then(ot=>(C.opts.moduleCache===!1&&delete C.nativeRequire.cache[D],_y(C,ot))).catch(ot=>(ac(C,`[try-native] Using fallback for ${D} because of an error:`,ot),yE({...C,opts:{...C.opts,tryNative:!1}},D,V)));{let ot=C.nativeRequire(D);return C.opts.moduleCache===!1&&delete C.nativeRequire.cache[D],_y(C,ot)}}catch(ot){ac(C,`[try-native] Using fallback for ${D} because of an error:`,ot)}let Pe=OC(C,D,V);if(!Pe&&V.try)return;let Ve=ps(Pe);if(Ve===".json"){ac(C,"[json]",Pe);let ot=C.nativeRequire(Pe);return ot&&!("default"in ot)&&Object.defineProperty(ot,"default",{value:ot,enumerable:!1}),ot}if(Ve&&!C.opts.extensions.includes(Ve))return ac(C,"[native]","[unknown]",V.async?"[import]":"[require]",Pe),bE(C,Pe,V.async);if(C.isNativeRe.test(Pe))return ac(C,"[native]",V.async?"[import]":"[require]",Pe),bE(C,Pe,V.async);if(ue[Pe])return _y(C,ue[Pe]?.exports);if(C.opts.moduleCache){let ot=C.nativeRequire.cache[Pe];if(ot?.loaded)return _y(C,ot.exports)}let Je=(0,Gn.readFileSync)(Pe,"utf8");return Y0(C,Je,{id:D,filename:Pe,ext:Ve,cache:ue,async:V.async})}function bE(C,D,V){return V&&C.nativeImport?C.nativeImport((function(ue){return N3&&yr(ue)?fr(ue):ue})(D)).then(ue=>_y(C,ue)):_y(C,C.nativeRequire(D))}let D3="9";function EE(C,D,V){if(!C.opts.fsCache||!D.filename)return V();let ue=` /* v${D3}-${dY(D.source,16)} */
400
- `,Pe=`${Bo(Io(D.filename))}-${(function(Lt){let nn=Lt.split(sY).pop();if(!nn)return;let Xt=nn.lastIndexOf(".");return Xt<=0?nn:nn.slice(0,Xt)})(D.filename)}`+(C.opts.sourceMaps?"+map":"")+(D.interopDefault?".i":"")+`.${dY(D.filename)}`+(D.async?".mjs":".cjs");D.jsx&&D.filename.endsWith("x")&&(Pe+="x");let Ve=C.opts.fsCache,Je=Wn(Ve,Pe);if(!C.opts.rebuildFsCache&&(0,Gn.existsSync)(Je)){let Lt=(0,Gn.readFileSync)(Je,"utf8");if(Lt.endsWith(ue))return ac(C,"[cache]","[hit]",D.filename,"~>",Je),Lt}ac(C,"[cache]","[miss]",D.filename);let ot=V();return ot.includes("__JITI_ERROR__")||((0,Gn.writeFileSync)(Je,ot+ue,"utf8"),ac(C,"[cache]","[store]",D.filename,"~>",Je)),ot}function _E(C){if(C.opts.fsCache===!0&&(C.opts.fsCache=(function(D){let V=D.filename&&ln(D.filename,"../node_modules");if(V&&(0,Gn.existsSync)(V))return Wn(V,".cache/jiti");let ue=(0,i.tmpdir)();if(process.env.TMPDIR&&ue===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let Pe=process.env.TMPDIR;delete process.env.TMPDIR,ue=(0,i.tmpdir)(),process.env.TMPDIR=Pe}return Wn(ue,"jiti")})(C)),C.opts.fsCache)try{if((0,Gn.mkdirSync)(C.opts.fsCache,{recursive:!0}),!(function(D){try{return(0,Gn.accessSync)(D,Gn.constants.W_OK),!0}catch{return!1}})(C.opts.fsCache))throw new Error("directory is not writable!")}catch(D){ac(C,"Error creating cache directory at ",C.opts.fsCache,D),C.opts.fsCache=!1}}function ym(C,D){let V=EE(C,D,()=>{let ue=C.opts.transform({...C.opts.transformOptions,babel:{...C.opts.sourceMaps?{sourceFileName:D.filename,sourceMaps:"inline"}:{},...C.opts.transformOptions?.babel},interopDefault:C.opts.interopDefault,...D});return ue.error&&C.opts.debug&&ac(C,ue.error),ue.code});return V.startsWith("#!")&&(V="// "+V),V}function Y0(C,D,V={}){let ue=V.id||(V.filename?Bo(V.filename):`_jitiEval.${V.ext||(V.async?"mjs":"js")}`),Pe=V.filename||OC(C,ue,{async:V.async}),Ve=V.ext||ps(Pe),Je=V.cache||C.parentCache||{},ot=/\.[cm]?tsx?$/.test(Ve),Lt=Ve===".mjs"||Ve===".js"&&(function(Ti){for(;Ti&&Ti!=="."&&Ti!=="/";){Ti=Wn(Ti,"..");try{let xy=(0,Gn.readFileSync)(Wn(Ti,"package.json"),"utf8");try{return JSON.parse(xy)}catch{}break}catch{}}})(Pe)?.type==="module",nn=Ve===".cjs",Xt=V.forceTranspile??(!nn&&!(Lt&&V.async)&&(ot||Lt||C.isTransformRe.test(Pe)||RC(D))),Rn=AY.performance.now();if(Xt){D=ym(C,{filename:Pe,source:D,ts:ot,async:V.async??!1,jsx:C.opts.jsx});let Ti=Math.round(1e3*(AY.performance.now()-Rn))/1e3;ac(C,"[transpile]",V.async?"[esm]":"[cjs]",Pe,`(${Ti}ms)`)}else{if(ac(C,"[native]",V.async?"[import]":"[require]",Pe),V.async)return Promise.resolve(bE(C,Pe,V.async)).catch(Ti=>(ac(C,"Native import error:",Ti),ac(C,"[fallback]",Pe),Y0(C,D,{...V,forceTranspile:!0})));try{return bE(C,Pe,V.async)}catch(Ti){ac(C,"Native require error:",Ti),ac(C,"[fallback]",Pe),D=ym(C,{filename:Pe,source:D,ts:ot,async:V.async??!1,jsx:C.opts.jsx})}}let _n=new ei.Module(Pe);_n.filename=Pe,C.parentModule&&(_n.parent=C.parentModule,Array.isArray(C.parentModule.children)&&!C.parentModule.children.includes(_n)&&C.parentModule.children.push(_n));let Hr=xE(Pe,C.opts,{parentModule:_n,parentCache:Je,nativeImport:C.nativeImport,onError:C.onError,createRequire:C.createRequire},!0),Cs;_n.require=Hr,_n.path=Io(Pe),_n.paths=ei.Module._nodeModulePaths(_n.path),Je[Pe]=_n,C.opts.moduleCache&&(C.nativeRequire.cache[Pe]=_n);let Cl=(function(Ti,xy){return`(${xy?.async?"async ":""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${Ti}
401
- });`})(D,{async:V.async});try{Cs=Xu().runInThisContext(Cl,{filename:Pe,lineOffset:0,displayErrors:!1})}catch(Ti){Ti.name==="SyntaxError"&&V.async&&C.nativeImport?(ac(C,"[esm]","[import]","[fallback]",Pe),Cs=(function(xy,DC,Lg,z0,KO){let bY=`export default ${DC}`,dR=KO?void 0:`data:text/javascript;base64,${Buffer.from(bY).toString("base64")}`;return(...EY)=>{let mR,M3=()=>(mR=(function(MC,_Y){let xY=Wn((0,i.tmpdir)(),"jiti-esm");try{(0,Gn.mkdirSync)(xY,{recursive:!0})}catch{}let SY=Wn(xY,`${Bo(_Y,ps(_Y))}-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`);return(0,Gn.writeFileSync)(SY,MC),SY})(bY,Lg),ac(xy,"[esm]","[tempfile]",mR),z0(fr(mR)));return(dR?z0(dR).catch(MC=>{if(MC?.code!=="ENAMETOOLONG")throw MC;return M3()}):M3()).then(MC=>MC.default(...EY)).finally(()=>{mR&&(0,gY.unlink)(mR).catch(()=>{})})}})(C,Cl,Pe,C.nativeImport,C.opts.esmEvalTempFile)):(C.opts.moduleCache&&delete C.nativeRequire.cache[Pe],C.onError(Ti))}let Yi;try{Yi=Cs(_n.exports,_n.require,_n,_n.filename,Io(_n.filename),Hr.import,Hr.esmResolve)}catch(Ti){C.opts.moduleCache&&delete C.nativeRequire.cache[Pe],C.onError(Ti)}function Ns(){if(_n.exports&&_n.exports.__JITI_ERROR__){let{filename:Ti,line:xy,column:DC,code:Lg,message:z0}=_n.exports.__JITI_ERROR__,KO=new Error(`${Lg}: ${z0}
402
- ${`${Ti}:${xy}:${DC}`}`);Error.captureStackTrace(KO,yE),C.onError(KO)}return _n.loaded=!0,_y(C,_n.exports)}return V.async?Promise.resolve(Yi).then(Ns):Ns()}let yY=(0,i.platform)()==="win32";function xE(C,D={},V,ue=!1){let Pe=ue?D:(function(Yi){let Ns={fsCache:Mg("JITI_FS_CACHE",Mg("JITI_CACHE",!0)),rebuildFsCache:Mg("JITI_REBUILD_FS_CACHE",!1),moduleCache:Mg("JITI_MODULE_CACHE",Mg("JITI_REQUIRE_CACHE",!0)),debug:Mg("JITI_DEBUG",!1),sourceMaps:Mg("JITI_SOURCE_MAPS",!1),interopDefault:Mg("JITI_INTEROP_DEFAULT",!0),extensions:K0("JITI_EXTENSIONS",[".js",".mjs",".cjs",".ts",".tsx",".mts",".cts",".mtsx",".ctsx"]),alias:K0("JITI_ALIAS",{}),nativeModules:K0("JITI_NATIVE_MODULES",[]),transformModules:K0("JITI_TRANSFORM_MODULES",[]),tryNative:K0("JITI_TRY_NATIVE","Bun"in globalThis),esmEvalTempFile:Mg("JITI_ESM_EVAL_TEMP_FILE",!1),jsx:Mg("JITI_JSX",!1),tsconfigPaths:K0("JITI_TSCONFIG_PATHS",!1,!0)};Ns.jsx&&Ns.extensions.push(".jsx",".tsx");let Ti={};return Yi.cache!==void 0&&(Ti.fsCache=Yi.cache),Yi.requireCache!==void 0&&(Ti.moduleCache=Yi.requireCache),{...Ns,...Ti,...Yi}})(D);typeof C=="string"&&C.startsWith("file://")&&(C=Wp(C));let Ve=Pe.alias&&Object.keys(Pe.alias).length>0?oY(Pe.alias||{}):void 0,Je;if(Pe.tsconfigPaths){let{getTsconfig:Yi,createPathsMatcher:Ns}=n("./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"),Ti=Yi(typeof Pe.tsconfigPaths=="string"?Pe.tsconfigPaths:Io(C));Ti&&(Je=Ns(Ti))}let ot=["typescript","jiti",...Pe.nativeModules||[]],Lt=new RegExp(`node_modules/(${ot.map(Yi=>uh(Yi)).join("|")})/`),nn=[...Pe.transformModules||[]],Xt=new RegExp(`node_modules/(${nn.map(Yi=>uh(Yi)).join("|")})/`);C||(C=process.cwd()),!ue&&pY(C)&&(C=Wn(C,"_index.js"));let Rn=fr(C),_n=[...Pe.extensions].filter(Yi=>Yi!==".js"),Hr=V.createRequire(yY?C.replace(/\//g,"\\"):C),Cs={filename:C,url:Rn,opts:Pe,alias:Ve,resolveTsConfigPaths:Je,nativeModules:ot,transformModules:nn,isNativeRe:Lt,isTransformRe:Xt,additionalExts:_n,nativeRequire:Hr,onError:V.onError,parentModule:V.parentModule,parentCache:V.parentCache,nativeImport:V.nativeImport,createRequire:V.createRequire};return ue||ac(Cs,"[init]",...[["version:",Rbe.rE],["module-cache:",Pe.moduleCache],["fs-cache:",Pe.fsCache],["rebuild-fs-cache:",Pe.rebuildFsCache],["interop-defaults:",Pe.interopDefault]].flat()),ue||_E(Cs),Object.assign(function(Yi){return yE(Cs,Yi,{async:!1})},{cache:Pe.moduleCache?Hr.cache:Object.create(null),extensions:Hr.extensions,main:Hr.main,options:Pe,resolve:Object.assign(function(Yi,Ns){return OC(Cs,Yi,{...Ns,async:!1})},{paths:Hr.resolve.paths}),transform:Yi=>ym(Cs,Yi),evalModule:(Yi,Ns)=>Y0(Cs,Yi,Ns),async import(Yi,Ns){let Ti=await yE(Cs,Yi,{...Ns,async:!0});return Ns?.default?Ti?.default??Ti:Ti},esmResolve(Yi,Ns){typeof Ns=="string"&&(Ns={parentURL:Ns});let Ti=OC(Cs,Yi,{parentURL:Rn,...Ns,async:!0});return!Ti||typeof Ti!="string"||Ti.startsWith("file://")?Ti:fr(Ti)}})}})(),Cdn.exports=r.default})()});var vdn=me((mxa,wdn)=>{(()=>{var t={"./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files lazy recursive"(i){function s(o){return Promise.resolve().then(function(){var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a})}s.keys=()=>[],s.resolve=s,s.id="./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files lazy recursive",i.exports=s},"./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files sync recursive"(i){function s(o){var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}s.keys=()=>[],s.resolve=s,s.id="./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files sync recursive",i.exports=s},"./node_modules/.pnpm/@babel+plugin-syntax-class-properties@7.12.13_@babel+core@7.29.0/node_modules/@babel/plugin-syntax-class-properties/lib/index.js"(i,s,o){"use strict";s.A=void 0;var a=(0,o("./node_modules/.pnpm/@babel+helper-plugin-utils@7.28.6/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)(c=>(c.assertVersion(7),{name:"syntax-class-properties",manipulateOptions(u,l){l.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}}));s.A=a},"./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(i,s,o){var a;(function(c,u,l){"use strict";var p=Object.create,d=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,f=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,y=(at,ze)=>function(){return ze||(0,at[h(at)[0]])((ze={exports:{}}).exports,ze),ze.exports},b=(at,ze)=>{for(var rt in ze)d(at,rt,{get:ze[rt],enumerable:!0})},E=(at,ze,rt,_t)=>{if(ze&&typeof ze=="object"||typeof ze=="function")for(let Zt of h(ze))A.call(at,Zt)||Zt===rt||d(at,Zt,{get:()=>ze[Zt],enumerable:!(_t=m(ze,Zt))||_t.enumerable});return at},_=(at,ze,rt)=>(rt=at!=null?p(f(at)):{},E(!ze&&at&&at.__esModule?rt:d(rt,"default",{value:at,enumerable:!0}),at)),x=at=>E(d({},"__esModule",{value:!0}),at),S=y({"umd:@jridgewell/sourcemap-codec"(at,ze){ze.exports=u}}),T=y({"umd:@jridgewell/trace-mapping"(at,ze){ze.exports=l}}),v={};b(v,{GenMapping:()=>Re,addMapping:()=>ce,addSegment:()=>ne,allMappings:()=>Se,fromMap:()=>xe,maybeAddMapping:()=>z,maybeAddSegment:()=>se,setIgnore:()=>j,setSourceContent:()=>ee,toDecodedMap:()=>X,toEncodedMap:()=>le}),c.exports=x(v);var R=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function O(at){return at}function G(at,ze){return at._indexes[ze]}function $(at,ze){let rt=G(at,ze);if(rt!==void 0)return rt;let{array:_t,_indexes:Zt}=at,Ut=_t.push(ze);return Zt[ze]=Ut-1}function U(at,ze){let rt=G(at,ze);if(rt===void 0)return;let{array:_t,_indexes:Zt}=at;for(let Ut=rt+1;Ut<_t.length;Ut++){let $t=_t[Ut];_t[Ut-1]=$t,Zt[$t]--}Zt[ze]=void 0,_t.pop()}var W=_(S()),re=_(T()),ie=0,te=1,q=2,oe=3,be=4,De=-1,Re=class{constructor({file:at,sourceRoot:ze}={}){this._names=new R,this._sources=new R,this._sourcesContent=[],this._mappings=[],this.file=at,this.sourceRoot=ze,this._ignoreList=new R}};function Ie(at){return at}function ne(at,ze,rt,_t,Zt,Ut,$t,Ot){return pe(!1,at,ze,rt,_t,Zt,Ut,$t,Ot)}function ce(at,ze){return dt(!1,at,ze)}var se=(at,ze,rt,_t,Zt,Ut,$t,Ot)=>pe(!0,at,ze,rt,_t,Zt,Ut,$t,Ot),z=(at,ze)=>dt(!0,at,ze);function ee(at,ze,rt){let{_sources:_t,_sourcesContent:Zt}=at;Zt[$(_t,ze)]=rt}function j(at,ze,rt=!0){let{_sources:_t,_sourcesContent:Zt,_ignoreList:Ut}=at,$t=$(_t,ze);$t===Zt.length&&(Zt[$t]=null),rt?$(Ut,$t):U(Ut,$t)}function X(at){let{_mappings:ze,_sources:rt,_sourcesContent:_t,_names:Zt,_ignoreList:Ut}=at;return ye(ze),{version:3,file:at.file||void 0,names:Zt.array,sourceRoot:at.sourceRoot||void 0,sources:rt.array,sourcesContent:_t,mappings:ze,ignoreList:Ut.array}}function le(at){let ze=X(at);return Object.assign({},ze,{mappings:(0,W.encode)(ze.mappings)})}function xe(at){let ze=new re.TraceMap(at),rt=new Re({file:ze.file,sourceRoot:ze.sourceRoot});return Y(rt._names,ze.names),Y(rt._sources,ze.sources),rt._sourcesContent=ze.sourcesContent||ze.sources.map(()=>null),rt._mappings=(0,re.decodedMappings)(ze),ze.ignoreList&&Y(rt._ignoreList,ze.ignoreList),rt}function Se(at){let ze=[],{_mappings:rt,_sources:_t,_names:Zt}=at;for(let Ut=0;Ut<rt.length;Ut++){let $t=rt[Ut];for(let Ot=0;Ot<$t.length;Ot++){let Ze=$t[Ot],Me={line:Ut+1,column:Ze[ie]},Xe,gt,qt;Ze.length!==1&&(Xe=_t.array[Ze[te]],gt={line:Ze[q]+1,column:Ze[oe]},Ze.length===5&&(qt=Zt.array[Ze[be]])),ze.push({generated:Me,source:Xe,original:gt,name:qt})}}return ze}function pe(at,ze,rt,_t,Zt,Ut,$t,Ot,Ze){let{_mappings:Me,_sources:Xe,_sourcesContent:gt,_names:qt}=ze,sn=Te(Me,rt),mn=Ee(sn,_t);if(!Zt)return at&&qe(sn,mn)?void 0:ve(sn,mn,[_t]);let Pn=$(Xe,Zt),je=Ot?$(qt,Ot):De;if(Pn===gt.length&&(gt[Pn]=Ze??null),!at||!He(sn,mn,Pn,Ut,$t,je))return ve(sn,mn,Ot?[_t,Pn,Ut,$t,je]:[_t,Pn,Ut,$t])}function ge(at){}function Te(at,ze){for(let rt=at.length;rt<=ze;rt++)at[rt]=[];return at[ze]}function Ee(at,ze){let rt=at.length;for(let _t=rt-1;_t>=0&&!(ze>=at[_t][ie]);rt=_t--);return rt}function ve(at,ze,rt){for(let _t=at.length;_t>ze;_t--)at[_t]=at[_t-1];at[ze]=rt}function ye(at){let{length:ze}=at,rt=ze;for(let _t=rt-1;_t>=0&&!(at[_t].length>0);rt=_t,_t--);rt<ze&&(at.length=rt)}function Y(at,ze){for(let rt=0;rt<ze.length;rt++)$(at,ze[rt])}function qe(at,ze){return ze===0||at[ze-1].length===1}function He(at,ze,rt,_t,Zt,Ut){if(ze===0)return!1;let $t=at[ze-1];return $t.length!==1&&rt===$t[te]&&_t===$t[q]&&Zt===$t[oe]&&Ut===($t.length===5?$t[be]:De)}function dt(at,ze,rt){let{generated:_t,source:Zt,original:Ut,name:$t,content:Ot}=rt;return Zt?pe(at,ze,_t.line-1,_t.column,Zt,Ut.line-1,Ut.column,$t,Ot):pe(at,ze,_t.line-1,_t.column,null,null,null,null,null)}})(i=o.nmd(i),o("./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"),o("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js")),i.exports="default"in(a=i).exports?a.exports.default:a.exports},"./node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.umd.js"(i,s,o){var a;(function(c,u,l){"use strict";var p=Object.create,d=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,f=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,y=(se,z)=>function(){return z||(0,se[h(se)[0]])((z={exports:{}}).exports,z),z.exports},b=(se,z)=>{for(var ee in z)d(se,ee,{get:z[ee],enumerable:!0})},E=(se,z,ee,j)=>{if(z&&typeof z=="object"||typeof z=="function")for(let X of h(z))A.call(se,X)||X===ee||d(se,X,{get:()=>z[X],enumerable:!(j=m(z,X))||j.enumerable});return se},_=(se,z,ee)=>(ee=se!=null?p(f(se)):{},E(!z&&se&&se.__esModule?ee:d(ee,"default",{value:se,enumerable:!0}),se)),x=se=>E(d({},"__esModule",{value:!0}),se),S=y({"umd:@jridgewell/trace-mapping"(se,z){z.exports=l}}),T=y({"umd:@jridgewell/gen-mapping"(se,z){z.exports=u}}),v={};b(v,{default:()=>ce}),c.exports=x(v);var R=_(S()),O=_(T()),G=_(S()),$=W("",-1,-1,"",null,!1),U=[];function W(se,z,ee,j,X,le){return{source:se,line:z,column:ee,name:j,content:X,ignore:le}}function re(se,z,ee,j,X){return{map:se,sources:z,source:ee,content:j,ignore:X}}function ie(se,z){return re(se,z,"",null,!1)}function te(se,z,ee){return re(null,U,se,z,ee)}function q(se){let z=new O.GenMapping({file:se.map.file}),{sources:ee,map:j}=se,X=j.names,le=(0,G.decodedMappings)(j);for(let xe=0;xe<le.length;xe++){let Se=le[xe];for(let pe=0;pe<Se.length;pe++){let ge=Se[pe],Te=ge[0],Ee=$;if(ge.length!==1&&(Ee=oe(ee[ge[1]],ge[2],ge[3],ge.length===5?X[ge[4]]:""),Ee==null))continue;let{column:ve,line:ye,name:Y,content:qe,source:He,ignore:dt}=Ee;(0,O.maybeAddSegment)(z,xe,Te,He,ye,ve,Y),He&&qe!=null&&(0,O.setSourceContent)(z,He,qe),dt&&(0,O.setIgnore)(z,He,!0)}}return z}function oe(se,z,ee,j){if(!se.map)return W(se.source,z,ee,j,se.content,se.ignore);let X=(0,G.traceSegment)(se.map,z,ee);return X==null?null:X.length===1?$:oe(se.sources[X[1]],X[2],X[3],X.length===5?se.map.names[X[4]]:j)}function be(se){return Array.isArray(se)?se:[se]}function De(se,z){let ee=be(se).map(le=>new R.TraceMap(le,"")),j=ee.pop();for(let le=0;le<ee.length;le++)if(ee[le].sources.length>1)throw new Error(`Transformation map ${le} must have exactly one source file.
399
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function Ce(C){try{return(0,Gn.statSync)(C)}catch{}}function We(C){let D=(0,Gn.statSync)(C,{throwIfNoEntry:!1}),V=D?D.isFile():void 0;return V!=null&&V}function ht(C,D,V){let ue;if(D.main!==void 0){if(ue=new URL(D.main,C),We(ue))return ue;let Je=[`./${D.main}.js`,`./${D.main}.json`,`./${D.main}.node`,`./${D.main}/index.js`,`./${D.main}/index.json`,`./${D.main}/index.node`],ot=-1;for(;++ot<Je.length&&(ue=new URL(Je[ot],C),!We(ue));)ue=void 0;if(ue)return de(ue,C,V,D.main),ue}let Pe=["./index.js","./index.json","./index.node"],Ve=-1;for(;++Ve<Pe.length&&(ue=new URL(Pe[Ve],C),!We(ue));)ue=void 0;if(ue)return de(ue,C,V,D.main),ue;throw new Tt((0,br.fileURLToPath)(new URL(".",C)),(0,br.fileURLToPath)(V))}function It(C,D,V){return new Jn((0,br.fileURLToPath)(new URL(".",D)),C,V&&(0,br.fileURLToPath)(V))}function Wt(C,D,V,ue,Pe){return D=typeof D=="object"&&D!==null?JSON.stringify(D,null,""):`${D}`,new Ke((0,br.fileURLToPath)(new URL(".",V)),C,D,ue,Pe&&(0,br.fileURLToPath)(Pe))}function Dn(C,D,V,ue,Pe,Ve,Je,ot,Lt){if(D!==""&&!Ve&&C[C.length-1]!=="/")throw Wt(V,C,ue,Je,Pe);if(!C.startsWith("./")){if(Je&&!C.startsWith("../")&&!C.startsWith("/")){let _n=!1;try{new URL(C),_n=!0}catch{}if(!_n)return Am(Ve?ke.call(vd,C,()=>D):C+D,ue,Lt)}throw Wt(V,C,ue,Je,Pe)}if(co.exec(C.slice(2))!==null){if(xr.exec(C.slice(2))!==null)throw Wt(V,C,ue,Je,Pe);if(!ot){let _n=Ve?V.replace("*",()=>D):V+D;Q(Ve?ke.call(vd,C,()=>D):C,_n,V,ue,Je,Pe,!0)}}let nn=new URL(C,ue),Xt=nn.pathname,Rn=new URL(".",ue).pathname;if(!Xt.startsWith(Rn))throw Wt(V,C,ue,Je,Pe);if(D==="")return nn;if(co.exec(D)!==null){let _n=Ve?V.replace("*",()=>D):V+D;xr.exec(D)===null?ot||Q(Ve?ke.call(vd,C,()=>D):C,_n,V,ue,Je,Pe,!1):(function(Hr,Ts,Cl,Yi,Ns){let Ti=`request is not a valid match in pattern "${Ts}" for the "${Yi?"imports":"exports"}" resolution of ${(0,br.fileURLToPath)(Cl)}`;throw new Le(Hr,Ti,Ns&&(0,br.fileURLToPath)(Ns))})(_n,V,ue,Je,Pe)}return Ve?new URL(ke.call(vd,nn.href,()=>D)):new URL(D,nn)}function lr(C){let D=Number(C);return`${D}`===C&&D>=0&&D<4294967295}function Rr(C,D,V,ue,Pe,Ve,Je,ot,Lt){if(typeof D=="string")return Dn(D,V,ue,C,Pe,Ve,Je,ot,Lt);if(Array.isArray(D)){let nn=D;if(nn.length===0)return null;let Xt,Rn=-1;for(;++Rn<nn.length;){let _n=nn[Rn],Hr;try{Hr=Rr(C,_n,V,ue,Pe,Ve,Je,ot,Lt)}catch(Ts){if(Xt=Ts,Ts.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw Ts}if(Hr!==void 0){if(Hr!==null)return Hr;Xt=null}}if(Xt==null)return null;throw Xt}if(typeof D=="object"&&D!==null){let nn=Object.getOwnPropertyNames(D),Xt=-1;for(;++Xt<nn.length;)if(lr(nn[Xt]))throw new Ye((0,br.fileURLToPath)(C),Pe,'"exports" cannot contain numeric property keys.');for(Xt=-1;++Xt<nn.length;){let Rn=nn[Xt];if(Rn==="default"||Lt&&Lt.has(Rn)){let _n=Rr(C,D[Rn],V,ue,Pe,Ve,Je,ot,Lt);if(_n===void 0)continue;return _n}}return null}if(D===null)return null;throw Wt(ue,D,C,Je,Pe)}function hs(C,D,V){if(Uo.noDeprecation)return;let ue=(0,br.fileURLToPath)(D);j0.has(ue+"|"+C)||(j0.add(ue+"|"+C),Uo.emitWarning(`Use of deprecated trailing slash pattern mapping "${C}" in the "exports" field module resolution of the package at ${ue}${V?` imported from ${(0,br.fileURLToPath)(V)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function Us(C,D,V,ue,Pe){let Ve=V.exports;if((function(Xt,Rn,_n){if(typeof Xt=="string"||Array.isArray(Xt))return!0;if(typeof Xt!="object"||Xt===null)return!1;let Hr=Object.getOwnPropertyNames(Xt),Ts=!1,Cl=0,Yi=-1;for(;++Yi<Hr.length;){let Ns=Hr[Yi],Ti=Ns===""||Ns[0]!==".";if(Cl++===0)Ts=Ti;else if(Ts!==Ti)throw new Ye((0,br.fileURLToPath)(Rn),_n,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return Ts})(Ve,C,ue)&&(Ve={".":Ve}),Is.call(Ve,D)&&!D.includes("*")&&!D.endsWith("/")){let Xt=Rr(C,Ve[D],"",D,ue,!1,!1,!1,Pe);if(Xt==null)throw It(D,C,ue);return Xt}let Je="",ot="",Lt=Object.getOwnPropertyNames(Ve),nn=-1;for(;++nn<Lt.length;){let Xt=Lt[nn],Rn=Xt.indexOf("*");if(Rn!==-1&&D.startsWith(Xt.slice(0,Rn))){D.endsWith("/")&&hs(D,C,ue);let _n=Xt.slice(Rn+1);D.length>=Xt.length&&D.endsWith(_n)&&sc(Je,Xt)===1&&Xt.lastIndexOf("*")===Rn&&(Je=Xt,ot=D.slice(Rn,D.length-_n.length))}}if(Je){let Xt=Rr(C,Ve[Je],ot,Je,ue,!0,!1,D.endsWith("/"),Pe);if(Xt==null)throw It(D,C,ue);return Xt}throw It(D,C,ue)}function sc(C,D){let V=C.indexOf("*"),ue=D.indexOf("*"),Pe=V===-1?C.length:V+1,Ve=ue===-1?D.length:ue+1;return Pe>Ve?-1:Ve>Pe||V===-1?1:ue===-1||C.length>D.length?-1:D.length>C.length?1:0}function uf(C,D,V){if(C==="#"||C.startsWith("#/")||C.endsWith("/"))throw new Le(C,"is not a valid internal imports specifier name",(0,br.fileURLToPath)(D));let ue,Pe=yy(D);if(Pe.exists){ue=(0,br.pathToFileURL)(Pe.pjsonPath);let Ve=Pe.imports;if(Ve)if(Is.call(Ve,C)&&!C.includes("*")){let Je=Rr(ue,Ve[C],"",C,D,!1,!0,!1,V);if(Je!=null)return Je}else{let Je="",ot="",Lt=Object.getOwnPropertyNames(Ve),nn=-1;for(;++nn<Lt.length;){let Xt=Lt[nn],Rn=Xt.indexOf("*");if(Rn!==-1&&C.startsWith(Xt.slice(0,-1))){let _n=Xt.slice(Rn+1);C.length>=Xt.length&&C.endsWith(_n)&&sc(Je,Xt)===1&&Xt.lastIndexOf("*")===Rn&&(Je=Xt,ot=C.slice(Rn,C.length-_n.length))}}if(Je){let Xt=Rr(ue,Ve[Je],ot,Je,D,!0,!0,!1,V);if(Xt!=null)return Xt}}}throw(function(Ve,Je,ot){return new en(Ve,Je&&(0,br.fileURLToPath)(new URL(".",Je)),(0,br.fileURLToPath)(ot))})(C,ue,D)}function Am(C,D,V){if(ei.builtinModules.includes(C))return new URL("node:"+C);let{packageName:ue,packageSubpath:Pe,isScoped:Ve}=(function(Xt,Rn){let _n=Xt.indexOf("/"),Hr=!0,Ts=!1;Xt[0]==="@"&&(Ts=!0,_n===-1||Xt.length===0?Hr=!1:_n=Xt.indexOf("/",_n+1));let Cl=_n===-1?Xt:Xt.slice(0,_n);if($o.exec(Cl)!==null&&(Hr=!1),!Hr)throw new Le(Xt,"is not a valid package name",(0,br.fileURLToPath)(Rn));return{packageName:Cl,packageSubpath:"."+(_n===-1?"":Xt.slice(_n)),isScoped:Ts}})(C,D),Je=yy(D);if(Je.exists){let Xt=(0,br.pathToFileURL)(Je.pjsonPath);if(Je.name===ue&&Je.exports!==void 0&&Je.exports!==null)return Us(Xt,Pe,Je,D,V)}let ot,Lt=new URL("./node_modules/"+ue+"/package.json",D),nn=(0,br.fileURLToPath)(Lt);do{let Xt=Ce(nn.slice(0,-13));if(!Xt||!Xt.isDirectory()){ot=nn,Lt=new URL((Ve?"../../../../node_modules/":"../../../node_modules/")+ue+"/package.json",Lt),nn=(0,br.fileURLToPath)(Lt);continue}let Rn=W0(nn,{base:D,specifier:C});return Rn.exports!==void 0&&Rn.exports!==null?Us(Lt,Pe,Rn,D,V):Pe==="."?ht(Lt,Rn,D):new URL(Pe,Lt)}while(nn.length!==ot.length)}function zu(C,D,V,ue){V===void 0&&(V=ae());let Pe=D.protocol,Ve=Pe==="data:"||Pe==="http:"||Pe==="https:",Je;if((function(ot){return ot!==""&&(ot[0]==="/"||(function(Lt){return Lt[0]==="."&&(Lt.length===1||Lt[1]==="/"||Lt[1]==="."&&(Lt.length===2||Lt[2]==="/"))})(ot))})(C))try{Je=new URL(C,D)}catch(ot){let Lt=new Er(C,D);throw Lt.cause=ot,Lt}else if(Pe==="file:"&&C[0]==="#")Je=uf(C,D,V);else try{Je=new URL(C)}catch(ot){if(Ve&&!ei.builtinModules.includes(C)){let Lt=new Er(C,D);throw Lt.cause=ot,Lt}Je=Am(C,D,V)}return Fo.ok(Je!==void 0,"expected to be defined"),Je.protocol!=="file:"?Je:(function(ot,Lt){if(H0.exec(ot.pathname)!==null)throw new Le(ot.pathname,'must not include encoded "/" or "\\" characters',(0,br.fileURLToPath)(Lt));let nn;try{nn=(0,br.fileURLToPath)(ot)}catch(Rn){let _n=Rn;throw Object.defineProperty(_n,"input",{value:String(ot)}),Object.defineProperty(_n,"module",{value:String(Lt)}),_n}let Xt=Ce(nn.endsWith("/")?nn.slice(-1):nn);if(Xt&&Xt.isDirectory()){let Rn=new wn(nn,(0,br.fileURLToPath)(Lt));throw Rn.url=String(ot),Rn}if(!Xt||!Xt.isFile()){let Rn=new Tt(nn||ot.pathname,Lt&&(0,br.fileURLToPath)(Lt),!0);throw Rn.url=String(ot),Rn}{let Rn=(0,Gn.realpathSync)(nn),{search:_n,hash:Hr}=ot;(ot=(0,br.pathToFileURL)(Rn+(nn.endsWith(Ku.sep)?"/":""))).search=_n,ot.hash=Hr}return ot})(Je,D)}function Wp(C){return typeof C!="string"||C.startsWith("file://")?zr((0,br.fileURLToPath)(C)):zr(C)}function fr(C){return(0,br.pathToFileURL)(Wp(C)).toString()}let ws=new Set(["node","import"]),zs=[".mjs",".cjs",".js",".json"],Vl=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function oc(C,D,V){try{return zu(C,D,V)}catch(ue){if(!Vl.has(ue?.code))throw ue}}function vC(C,D={}){if(typeof C!="string"){if(!(C instanceof URL))throw new TypeError("input must be a `string` or `URL`");C=Wp(C)}if(/(?:node|data|http|https):/.test(C))return C;if(Gp.has(C))return"node:"+C;if(C.startsWith("file://")&&(C=Wp(C)),yr(C))try{if((0,Gn.statSync)(C).isFile())return fr(C)}catch(Je){if(Je?.code!=="ENOENT")throw Je}let V=D.conditions?new Set(D.conditions):ws,ue=(Array.isArray(D.url)?D.url:[D.url]).filter(Boolean).map(Je=>new URL((function(ot){return typeof ot!="string"&&(ot=ot.toString()),/(?:node|data|http|https|file):/.test(ot)?ot:Gp.has(ot)?"node:"+ot:"file://"+encodeURI(zr(ot))})(Je.toString())));ue.length===0&&ue.push(new URL(fr(process.cwd())));let Pe=[...ue];for(let Je of ue)Je.protocol==="file:"&&Pe.push(new URL("./",Je),new URL(_a(Je.pathname,"_index.js"),Je),new URL("node_modules",Je));let Ve;for(let Je of Pe){if(Ve=oc(C,Je,V),Ve)break;for(let ot of["","/index"]){for(let Lt of D.extensions||zs)if(Ve=oc(_a(C,ot)+Lt,Je,V),Ve)break;if(Ve)break}if(Ve)break}if(!Ve){let Je=new Error(`Cannot find module ${C} imported from ${Pe.join(", ")}`);throw Je.code="ERR_MODULE_NOT_FOUND",Je}return fr(Ve)}function lh(C,D){return vC(C,D)}function Kl(C,D){return Wp(lh(C,D))}let pf=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,Ju=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function RC(C,D={}){return D.stripComments&&(C=C.replace(Ju,"")),pf.test(C)}function uh(C){if(typeof C!="string")throw new TypeError("Expected a string");return C.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}let aR=new Set(["/","\\",void 0]),cR=Symbol.for("pathe:normalizedAlias"),sY=/[/\\]/;function oY(C){if(C[cR])return C;let D=Object.fromEntries(Object.entries(C).sort(([V],[ue])=>(function(Pe,Ve){return Ve.split("/").length-Pe.split("/").length})(V,ue)));for(let V in D)for(let ue in D)ue===V||V.startsWith(ue)||D[V]?.startsWith(ue)&&aR.has(D[V][ue.length])&&(D[V]=D[ue]+D[V].slice(ue.length));return Object.defineProperty(D,cR,{value:!0,enumerable:!1}),D}function GO(C="/"){let D=C[C.length-1];return D==="/"||D==="\\"}var Rbe={rE:"2.6.1"};let aY=tt("node:crypto");var kC=n.n(aY);let _u=globalThis.process?.env||Object.create(null),by=globalThis.process||{env:_u},lR=by!==void 0&&by.env&&by.env.NODE_ENV||void 0,kbe=[["claude",["CLAUDECODE","CLAUDE_CODE"]],["replit",["REPL_ID"]],["gemini",["GEMINI_CLI"]],["codex",["CODEX_SANDBOX","CODEX_THREAD_ID"]],["opencode",["OPENCODE"]],["pi",[k3("PATH",/\.pi[\\/]agent/)]],["auggie",["AUGMENT_AGENT"]],["goose",["GOOSE_PROVIDER"]],["devin",[k3("EDITOR",/devin/)]],["cursor",["CURSOR_AGENT"]],["kiro",[k3("TERM_PROGRAM",/kiro/)]]];function k3(C,D){return()=>{let V=_u[C];return!!V&&D.test(V)}}let qO=(function(){let C=_u.AI_AGENT;if(C)return{name:C.toLowerCase()};for(let[D,V]of kbe)for(let ue of V)if(typeof ue=="string"?_u[ue]:ue())return{name:D};return{}})(),Pbe=(qO.name,qO.name,[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["GOOGLE_CLOUDRUN","K_SERVICE"],["GOOGLE_CLOUDRUN_JOB","CLOUD_RUN_JOB"],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["JENKINS","JENKINS_URL"],["HUDSON","HUDSON_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOY"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}],["EDGEONE_PAGES","EO_PAGES_CI",{ci:!0}]]),WO=(function(){for(let C of Pbe)if(_u[C[1]||C[0]])return{name:C[0].toLowerCase(),...C[2]};return _u.SHELL==="/bin/jsh"&&by.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}})(),P3=(WO.name,by.platform||""),zKe=!!_u.CI||WO.ci!==!1,Nbe=!!by.stdout?.isTTY,JKe=(_u.DEBUG,lR==="test"||!!_u.TEST),N3=(lR==="production"||_u.MODE,lR==="dev"||lR==="development"||_u.MODE,_u.MINIMAL,/^win/i.test(P3)),Ey=(/^linux/i.test(P3),/^darwin/i.test(P3),!_u.NO_COLOR&&(_u.FORCE_COLOR||(Nbe||N3)&&_u.TERM),(by.versions?.node||"").replace(/^v/,"")||null),HO=(Number(Ey?.split(".")[0]),!!by?.versions?.node),uR="Bun"in globalThis,cY="Deno"in globalThis,jO="fastly"in globalThis,V0=[["Netlify"in globalThis,"netlify"],["EdgeRuntime"in globalThis,"edge-light"],[globalThis.navigator?.userAgent==="Cloudflare-Workers","workerd"],[jO,"fastly"],[cY,"deno"],[uR,"bun"],[HO,"node"]];(function(){let C=V0.find(D=>D[0]);C&&C[1]})();let PC=tt("node:tty"),ph=PC?.WriteStream?.prototype?.hasColors?.()??!1,Fi=(C,D)=>{if(!ph)return Pe=>Pe;let V=`\x1B[${C}m`,ue=`\x1B[${D}m`;return Pe=>{let Ve=Pe+"",Je=Ve.indexOf(ue);if(Je===-1)return V+Ve+ue;let ot=V,Lt=0,nn=(D===22?ue:"")+V;for(;Je!==-1;)ot+=Ve.slice(Lt,Je)+nn,Lt=Je+ue.length,Je=Ve.indexOf(ue,Lt);return ot+=Ve.slice(Lt)+ue,ot}},lY=(Fi(0,0),Fi(1,22),Fi(2,22),Fi(3,23),Fi(4,24),Fi(53,55),Fi(7,27),Fi(8,28),Fi(9,29),Fi(30,39),Fi(31,39)),dh=Fi(32,39),pR=Fi(33,39),uY=Fi(34,39),VO=(Fi(35,39),Fi(36,39)),Obe=(Fi(37,39),Fi(90,39));Fi(40,49),Fi(41,49),Fi(42,49),Fi(43,49),Fi(44,49),Fi(45,49),Fi(46,49),Fi(47,49),Fi(100,49),Fi(91,39),Fi(92,39),Fi(93,39),Fi(94,39),Fi(95,39),Fi(96,39),Fi(97,39),Fi(101,49),Fi(102,49),Fi(103,49),Fi(104,49),Fi(105,49),Fi(106,49),Fi(107,49);function pY(C){if(typeof C!="string"||C.startsWith("file://"))return!1;try{return(0,Gn.lstatSync)(C).isDirectory()}catch{return!1}}function dY(C,D=8){return((function(){if(NC!==void 0)return NC;try{return NC=!!kC().getFips?.(),NC}catch{return NC=!1,NC}})()?kC().createHash("sha256"):kC().createHash("md5")).update(C).digest("hex").slice(0,D)}let mY={true:dh("true"),false:pR("false"),"[rebuild]":pR("[rebuild]"),"[esm]":uY("[esm]"),"[cjs]":dh("[cjs]"),"[import]":uY("[import]"),"[require]":dh("[require]"),"[native]":VO("[native]"),"[transpile]":pR("[transpile]"),"[fallback]":lY("[fallback]"),"[unknown]":lY("[unknown]"),"[hit]":dh("[hit]"),"[miss]":pR("[miss]"),"[json]":dh("[json]"),"[data]":dh("[data]")};function ac(C,...D){if(!C.opts.debug)return;let V=process.cwd();console.log(Obe(["[jiti]",...D.map(ue=>ue in mY?mY[ue]:typeof ue!="string"?JSON.stringify(ue):ue.replace(V,"."))].join(" ")))}function _y(C,D){return C.opts.interopDefault?(function(V){let ue=typeof V;if(V===null||ue!=="object"&&ue!=="function")return V;let Pe=V.default,Ve=typeof Pe,Je=Pe==null,ot=Ve==="object"||Ve==="function";if(Je&&V instanceof Promise)return V;let Lt=Ve==="function"&&ue!=="function",nn=ot&&!(Pe instanceof Promise),Xt=new Map;return new Proxy(V,{get(Rn,_n){if(Xt.has(_n))return Xt.get(_n);let Hr;return _n==="__esModule"?Hr=!0:_n==="default"?Hr=Je?V:typeof Pe?.default=="function"&&V.__esModule?Pe.default:Pe:_n in Rn?Hr=Rn[_n]:nn&&(Hr=Pe[_n],typeof Hr=="function"&&(Hr=Hr.bind(Pe))),Xt.set(_n,Hr),Hr},apply:Lt?(Rn,_n,Hr)=>Reflect.apply(Pe,_n,Hr):void 0})})(D):D}let NC;function Mg(C,D){return!!K0(C,D)}function K0(C,D,V){let ue=process.env[C];if(!(C in process.env))return D;try{return JSON.parse(ue)}catch{return V?ue:D}}let fY=/\.(c|m)?j(sx?)$/,hY=/\.(c|m)?t(sx?)$/;function OC(C,D,V){let ue,Pe;if(C.isNativeRe.test(D))return D;if(C.resolveTsConfigPaths&&!V.skipTsConfigPaths){let ot=C.resolveTsConfigPaths(D);for(let Lt of ot){let nn=OC(C,Lt,{...V,try:!0,skipTsConfigPaths:!0});if(nn)return nn}}C.alias&&(D=(function(ot,Lt){let nn=Vt(ot);Lt=oY(Lt);for(let[Xt,Rn]of Object.entries(Lt)){if(!nn.startsWith(Xt))continue;let _n=GO(Xt)?Xt.slice(0,-1):Xt;if(GO(nn[_n.length]))return Wn(Rn,nn.slice(Xt.length))}return nn})(D,C.alias));let Ve=V?.parentURL||C.url;pY(Ve)&&(Ve=Wn(Ve,"_index.js"));let Je=(V?.async?[V?.conditions,["node","import"],["node","require"]]:[V?.conditions,["node","require"],["node","import"]]).filter(Boolean);for(let ot of Je){try{ue=Kl(D,{url:Ve,conditions:ot,extensions:C.opts.extensions})}catch(Lt){Pe=Lt}if(ue)return ue}try{return C.nativeRequire.resolve(D,{paths:V.paths})}catch(ot){Pe=ot}for(let ot of C.additionalExts)if(ue=O3(C,D+ot,Ve,V)||O3(C,D+"/index"+ot,Ve,V),ue||(hY.test(C.filename)||hY.test(C.parentModule?.filename||"")||fY.test(D))&&(ue=O3(C,D.replace(fY,".$1t$2"),Ve,V),ue))return ue;if(!V?.try)throw Pe}function O3(C,D,V,ue){try{return C.nativeRequire.resolve(D,{...ue,paths:[Io(Wp(V)),...ue?.paths||[]]})}catch{}}let gY=tt("node:fs/promises"),AY=tt("node:perf_hooks"),Dbe=tt("node:vm");var Xu=n.n(Dbe);function yE(C,D,V){let ue=C.parentCache||{};if(D.startsWith("node:"))return bE(C,D,V.async);if(D.startsWith("file:"))D=(0,br.fileURLToPath)(D);else if(D.startsWith("data:")){if(!V.async)throw new Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return ac(C,"[native]","[data]","[import]",D),bE(C,D,!0)}if(ei.builtinModules.includes(D)||D===".pnp.js")return bE(C,D,V.async);if(C.opts.virtualModules&&D in C.opts.virtualModules){ac(C,"[virtual]",D);let ot=C.opts.virtualModules[D];return V.async?Promise.resolve(_y(C,ot)):_y(C,ot)}if(C.opts.tryNative&&!C.opts.transformOptions)try{if(!(D=OC(C,D,V))&&V.try)return;if(ac(C,"[try-native]",V.async&&C.nativeImport?"[import]":"[require]",D),V.async&&C.nativeImport)return C.nativeImport(D).then(ot=>(C.opts.moduleCache===!1&&delete C.nativeRequire.cache[D],_y(C,ot))).catch(ot=>(ac(C,`[try-native] Using fallback for ${D} because of an error:`,ot),yE({...C,opts:{...C.opts,tryNative:!1}},D,V)));{let ot=C.nativeRequire(D);return C.opts.moduleCache===!1&&delete C.nativeRequire.cache[D],_y(C,ot)}}catch(ot){ac(C,`[try-native] Using fallback for ${D} because of an error:`,ot)}let Pe=OC(C,D,V);if(!Pe&&V.try)return;let Ve=ps(Pe);if(Ve===".json"){ac(C,"[json]",Pe);let ot=C.nativeRequire(Pe);return ot&&!("default"in ot)&&Object.defineProperty(ot,"default",{value:ot,enumerable:!1}),ot}if(Ve&&!C.opts.extensions.includes(Ve))return ac(C,"[native]","[unknown]",V.async?"[import]":"[require]",Pe),bE(C,Pe,V.async);if(C.isNativeRe.test(Pe))return ac(C,"[native]",V.async?"[import]":"[require]",Pe),bE(C,Pe,V.async);if(ue[Pe])return _y(C,ue[Pe]?.exports);if(C.opts.moduleCache){let ot=C.nativeRequire.cache[Pe];if(ot?.loaded)return _y(C,ot.exports)}let Je=(0,Gn.readFileSync)(Pe,"utf8");return Y0(C,Je,{id:D,filename:Pe,ext:Ve,cache:ue,async:V.async})}function bE(C,D,V){return V&&C.nativeImport?C.nativeImport((function(ue){return N3&&yr(ue)?fr(ue):ue})(D)).then(ue=>_y(C,ue)):_y(C,C.nativeRequire(D))}let D3="9";function EE(C,D,V){if(!C.opts.fsCache||!D.filename)return V();let ue=` /* v${D3}-${dY(D.source,16)} */
400
+ `,Pe=`${Bo(Io(D.filename))}-${(function(Lt){let nn=Lt.split(sY).pop();if(!nn)return;let Xt=nn.lastIndexOf(".");return Xt<=0?nn:nn.slice(0,Xt)})(D.filename)}`+(C.opts.sourceMaps?"+map":"")+(D.interopDefault?".i":"")+`.${dY(D.filename)}`+(D.async?".mjs":".cjs");D.jsx&&D.filename.endsWith("x")&&(Pe+="x");let Ve=C.opts.fsCache,Je=Wn(Ve,Pe);if(!C.opts.rebuildFsCache&&(0,Gn.existsSync)(Je)){let Lt=(0,Gn.readFileSync)(Je,"utf8");if(Lt.endsWith(ue))return ac(C,"[cache]","[hit]",D.filename,"~>",Je),Lt}ac(C,"[cache]","[miss]",D.filename);let ot=V();return ot.includes("__JITI_ERROR__")||((0,Gn.writeFileSync)(Je,ot+ue,"utf8"),ac(C,"[cache]","[store]",D.filename,"~>",Je)),ot}function _E(C){if(C.opts.fsCache===!0&&(C.opts.fsCache=(function(D){let V=D.filename&&ln(D.filename,"../node_modules");if(V&&(0,Gn.existsSync)(V))return Wn(V,".cache/jiti");let ue=(0,i.tmpdir)();if(process.env.TMPDIR&&ue===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let Pe=process.env.TMPDIR;delete process.env.TMPDIR,ue=(0,i.tmpdir)(),process.env.TMPDIR=Pe}return Wn(ue,"jiti")})(C)),C.opts.fsCache)try{if((0,Gn.mkdirSync)(C.opts.fsCache,{recursive:!0}),!(function(D){try{return(0,Gn.accessSync)(D,Gn.constants.W_OK),!0}catch{return!1}})(C.opts.fsCache))throw new Error("directory is not writable!")}catch(D){ac(C,"Error creating cache directory at ",C.opts.fsCache,D),C.opts.fsCache=!1}}function ym(C,D){let V=EE(C,D,()=>{let ue=C.opts.transform({...C.opts.transformOptions,babel:{...C.opts.sourceMaps?{sourceFileName:D.filename,sourceMaps:"inline"}:{},...C.opts.transformOptions?.babel},interopDefault:C.opts.interopDefault,...D});return ue.error&&C.opts.debug&&ac(C,ue.error),ue.code});return V.startsWith("#!")&&(V="// "+V),V}function Y0(C,D,V={}){let ue=V.id||(V.filename?Bo(V.filename):`_jitiEval.${V.ext||(V.async?"mjs":"js")}`),Pe=V.filename||OC(C,ue,{async:V.async}),Ve=V.ext||ps(Pe),Je=V.cache||C.parentCache||{},ot=/\.[cm]?tsx?$/.test(Ve),Lt=Ve===".mjs"||Ve===".js"&&(function(Ti){for(;Ti&&Ti!=="."&&Ti!=="/";){Ti=Wn(Ti,"..");try{let xy=(0,Gn.readFileSync)(Wn(Ti,"package.json"),"utf8");try{return JSON.parse(xy)}catch{}break}catch{}}})(Pe)?.type==="module",nn=Ve===".cjs",Xt=V.forceTranspile??(!nn&&!(Lt&&V.async)&&(ot||Lt||C.isTransformRe.test(Pe)||RC(D))),Rn=AY.performance.now();if(Xt){D=ym(C,{filename:Pe,source:D,ts:ot,async:V.async??!1,jsx:C.opts.jsx});let Ti=Math.round(1e3*(AY.performance.now()-Rn))/1e3;ac(C,"[transpile]",V.async?"[esm]":"[cjs]",Pe,`(${Ti}ms)`)}else{if(ac(C,"[native]",V.async?"[import]":"[require]",Pe),V.async)return Promise.resolve(bE(C,Pe,V.async)).catch(Ti=>(ac(C,"Native import error:",Ti),ac(C,"[fallback]",Pe),Y0(C,D,{...V,forceTranspile:!0})));try{return bE(C,Pe,V.async)}catch(Ti){ac(C,"Native require error:",Ti),ac(C,"[fallback]",Pe),D=ym(C,{filename:Pe,source:D,ts:ot,async:V.async??!1,jsx:C.opts.jsx})}}let _n=new ei.Module(Pe);_n.filename=Pe,C.parentModule&&(_n.parent=C.parentModule,Array.isArray(C.parentModule.children)&&!C.parentModule.children.includes(_n)&&C.parentModule.children.push(_n));let Hr=xE(Pe,C.opts,{parentModule:_n,parentCache:Je,nativeImport:C.nativeImport,onError:C.onError,createRequire:C.createRequire},!0),Ts;_n.require=Hr,_n.path=Io(Pe),_n.paths=ei.Module._nodeModulePaths(_n.path),Je[Pe]=_n,C.opts.moduleCache&&(C.nativeRequire.cache[Pe]=_n);let Cl=(function(Ti,xy){return`(${xy?.async?"async ":""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${Ti}
401
+ });`})(D,{async:V.async});try{Ts=Xu().runInThisContext(Cl,{filename:Pe,lineOffset:0,displayErrors:!1})}catch(Ti){Ti.name==="SyntaxError"&&V.async&&C.nativeImport?(ac(C,"[esm]","[import]","[fallback]",Pe),Ts=(function(xy,DC,Lg,z0,KO){let bY=`export default ${DC}`,dR=KO?void 0:`data:text/javascript;base64,${Buffer.from(bY).toString("base64")}`;return(...EY)=>{let mR,M3=()=>(mR=(function(MC,_Y){let xY=Wn((0,i.tmpdir)(),"jiti-esm");try{(0,Gn.mkdirSync)(xY,{recursive:!0})}catch{}let SY=Wn(xY,`${Bo(_Y,ps(_Y))}-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`);return(0,Gn.writeFileSync)(SY,MC),SY})(bY,Lg),ac(xy,"[esm]","[tempfile]",mR),z0(fr(mR)));return(dR?z0(dR).catch(MC=>{if(MC?.code!=="ENAMETOOLONG")throw MC;return M3()}):M3()).then(MC=>MC.default(...EY)).finally(()=>{mR&&(0,gY.unlink)(mR).catch(()=>{})})}})(C,Cl,Pe,C.nativeImport,C.opts.esmEvalTempFile)):(C.opts.moduleCache&&delete C.nativeRequire.cache[Pe],C.onError(Ti))}let Yi;try{Yi=Ts(_n.exports,_n.require,_n,_n.filename,Io(_n.filename),Hr.import,Hr.esmResolve)}catch(Ti){C.opts.moduleCache&&delete C.nativeRequire.cache[Pe],C.onError(Ti)}function Ns(){if(_n.exports&&_n.exports.__JITI_ERROR__){let{filename:Ti,line:xy,column:DC,code:Lg,message:z0}=_n.exports.__JITI_ERROR__,KO=new Error(`${Lg}: ${z0}
402
+ ${`${Ti}:${xy}:${DC}`}`);Error.captureStackTrace(KO,yE),C.onError(KO)}return _n.loaded=!0,_y(C,_n.exports)}return V.async?Promise.resolve(Yi).then(Ns):Ns()}let yY=(0,i.platform)()==="win32";function xE(C,D={},V,ue=!1){let Pe=ue?D:(function(Yi){let Ns={fsCache:Mg("JITI_FS_CACHE",Mg("JITI_CACHE",!0)),rebuildFsCache:Mg("JITI_REBUILD_FS_CACHE",!1),moduleCache:Mg("JITI_MODULE_CACHE",Mg("JITI_REQUIRE_CACHE",!0)),debug:Mg("JITI_DEBUG",!1),sourceMaps:Mg("JITI_SOURCE_MAPS",!1),interopDefault:Mg("JITI_INTEROP_DEFAULT",!0),extensions:K0("JITI_EXTENSIONS",[".js",".mjs",".cjs",".ts",".tsx",".mts",".cts",".mtsx",".ctsx"]),alias:K0("JITI_ALIAS",{}),nativeModules:K0("JITI_NATIVE_MODULES",[]),transformModules:K0("JITI_TRANSFORM_MODULES",[]),tryNative:K0("JITI_TRY_NATIVE","Bun"in globalThis),esmEvalTempFile:Mg("JITI_ESM_EVAL_TEMP_FILE",!1),jsx:Mg("JITI_JSX",!1),tsconfigPaths:K0("JITI_TSCONFIG_PATHS",!1,!0)};Ns.jsx&&Ns.extensions.push(".jsx",".tsx");let Ti={};return Yi.cache!==void 0&&(Ti.fsCache=Yi.cache),Yi.requireCache!==void 0&&(Ti.moduleCache=Yi.requireCache),{...Ns,...Ti,...Yi}})(D);typeof C=="string"&&C.startsWith("file://")&&(C=Wp(C));let Ve=Pe.alias&&Object.keys(Pe.alias).length>0?oY(Pe.alias||{}):void 0,Je;if(Pe.tsconfigPaths){let{getTsconfig:Yi,createPathsMatcher:Ns}=n("./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"),Ti=Yi(typeof Pe.tsconfigPaths=="string"?Pe.tsconfigPaths:Io(C));Ti&&(Je=Ns(Ti))}let ot=["typescript","jiti",...Pe.nativeModules||[]],Lt=new RegExp(`node_modules/(${ot.map(Yi=>uh(Yi)).join("|")})/`),nn=[...Pe.transformModules||[]],Xt=new RegExp(`node_modules/(${nn.map(Yi=>uh(Yi)).join("|")})/`);C||(C=process.cwd()),!ue&&pY(C)&&(C=Wn(C,"_index.js"));let Rn=fr(C),_n=[...Pe.extensions].filter(Yi=>Yi!==".js"),Hr=V.createRequire(yY?C.replace(/\//g,"\\"):C),Ts={filename:C,url:Rn,opts:Pe,alias:Ve,resolveTsConfigPaths:Je,nativeModules:ot,transformModules:nn,isNativeRe:Lt,isTransformRe:Xt,additionalExts:_n,nativeRequire:Hr,onError:V.onError,parentModule:V.parentModule,parentCache:V.parentCache,nativeImport:V.nativeImport,createRequire:V.createRequire};return ue||ac(Ts,"[init]",...[["version:",Rbe.rE],["module-cache:",Pe.moduleCache],["fs-cache:",Pe.fsCache],["rebuild-fs-cache:",Pe.rebuildFsCache],["interop-defaults:",Pe.interopDefault]].flat()),ue||_E(Ts),Object.assign(function(Yi){return yE(Ts,Yi,{async:!1})},{cache:Pe.moduleCache?Hr.cache:Object.create(null),extensions:Hr.extensions,main:Hr.main,options:Pe,resolve:Object.assign(function(Yi,Ns){return OC(Ts,Yi,{...Ns,async:!1})},{paths:Hr.resolve.paths}),transform:Yi=>ym(Ts,Yi),evalModule:(Yi,Ns)=>Y0(Ts,Yi,Ns),async import(Yi,Ns){let Ti=await yE(Ts,Yi,{...Ns,async:!0});return Ns?.default?Ti?.default??Ti:Ti},esmResolve(Yi,Ns){typeof Ns=="string"&&(Ns={parentURL:Ns});let Ti=OC(Ts,Yi,{parentURL:Rn,...Ns,async:!0});return!Ti||typeof Ti!="string"||Ti.startsWith("file://")?Ti:fr(Ti)}})}})(),Cdn.exports=r.default})()});var vdn=me((mxa,wdn)=>{(()=>{var t={"./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files lazy recursive"(i){function s(o){return Promise.resolve().then(function(){var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a})}s.keys=()=>[],s.resolve=s,s.id="./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files lazy recursive",i.exports=s},"./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files sync recursive"(i){function s(o){var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}s.keys=()=>[],s.resolve=s,s.id="./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files sync recursive",i.exports=s},"./node_modules/.pnpm/@babel+plugin-syntax-class-properties@7.12.13_@babel+core@7.29.0/node_modules/@babel/plugin-syntax-class-properties/lib/index.js"(i,s,o){"use strict";s.A=void 0;var a=(0,o("./node_modules/.pnpm/@babel+helper-plugin-utils@7.28.6/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)(c=>(c.assertVersion(7),{name:"syntax-class-properties",manipulateOptions(u,l){l.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}}));s.A=a},"./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(i,s,o){var a;(function(c,u,l){"use strict";var p=Object.create,d=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,f=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,y=(at,ze)=>function(){return ze||(0,at[h(at)[0]])((ze={exports:{}}).exports,ze),ze.exports},b=(at,ze)=>{for(var rt in ze)d(at,rt,{get:ze[rt],enumerable:!0})},E=(at,ze,rt,_t)=>{if(ze&&typeof ze=="object"||typeof ze=="function")for(let Zt of h(ze))A.call(at,Zt)||Zt===rt||d(at,Zt,{get:()=>ze[Zt],enumerable:!(_t=m(ze,Zt))||_t.enumerable});return at},_=(at,ze,rt)=>(rt=at!=null?p(f(at)):{},E(!ze&&at&&at.__esModule?rt:d(rt,"default",{value:at,enumerable:!0}),at)),x=at=>E(d({},"__esModule",{value:!0}),at),S=y({"umd:@jridgewell/sourcemap-codec"(at,ze){ze.exports=u}}),T=y({"umd:@jridgewell/trace-mapping"(at,ze){ze.exports=l}}),v={};b(v,{GenMapping:()=>Re,addMapping:()=>ce,addSegment:()=>ne,allMappings:()=>Se,fromMap:()=>xe,maybeAddMapping:()=>z,maybeAddSegment:()=>se,setIgnore:()=>j,setSourceContent:()=>ee,toDecodedMap:()=>X,toEncodedMap:()=>le}),c.exports=x(v);var R=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function O(at){return at}function G(at,ze){return at._indexes[ze]}function $(at,ze){let rt=G(at,ze);if(rt!==void 0)return rt;let{array:_t,_indexes:Zt}=at,Ut=_t.push(ze);return Zt[ze]=Ut-1}function U(at,ze){let rt=G(at,ze);if(rt===void 0)return;let{array:_t,_indexes:Zt}=at;for(let Ut=rt+1;Ut<_t.length;Ut++){let $t=_t[Ut];_t[Ut-1]=$t,Zt[$t]--}Zt[ze]=void 0,_t.pop()}var W=_(S()),re=_(T()),ie=0,te=1,q=2,oe=3,be=4,De=-1,Re=class{constructor({file:at,sourceRoot:ze}={}){this._names=new R,this._sources=new R,this._sourcesContent=[],this._mappings=[],this.file=at,this.sourceRoot=ze,this._ignoreList=new R}};function Ie(at){return at}function ne(at,ze,rt,_t,Zt,Ut,$t,Ot){return pe(!1,at,ze,rt,_t,Zt,Ut,$t,Ot)}function ce(at,ze){return dt(!1,at,ze)}var se=(at,ze,rt,_t,Zt,Ut,$t,Ot)=>pe(!0,at,ze,rt,_t,Zt,Ut,$t,Ot),z=(at,ze)=>dt(!0,at,ze);function ee(at,ze,rt){let{_sources:_t,_sourcesContent:Zt}=at;Zt[$(_t,ze)]=rt}function j(at,ze,rt=!0){let{_sources:_t,_sourcesContent:Zt,_ignoreList:Ut}=at,$t=$(_t,ze);$t===Zt.length&&(Zt[$t]=null),rt?$(Ut,$t):U(Ut,$t)}function X(at){let{_mappings:ze,_sources:rt,_sourcesContent:_t,_names:Zt,_ignoreList:Ut}=at;return ye(ze),{version:3,file:at.file||void 0,names:Zt.array,sourceRoot:at.sourceRoot||void 0,sources:rt.array,sourcesContent:_t,mappings:ze,ignoreList:Ut.array}}function le(at){let ze=X(at);return Object.assign({},ze,{mappings:(0,W.encode)(ze.mappings)})}function xe(at){let ze=new re.TraceMap(at),rt=new Re({file:ze.file,sourceRoot:ze.sourceRoot});return Y(rt._names,ze.names),Y(rt._sources,ze.sources),rt._sourcesContent=ze.sourcesContent||ze.sources.map(()=>null),rt._mappings=(0,re.decodedMappings)(ze),ze.ignoreList&&Y(rt._ignoreList,ze.ignoreList),rt}function Se(at){let ze=[],{_mappings:rt,_sources:_t,_names:Zt}=at;for(let Ut=0;Ut<rt.length;Ut++){let $t=rt[Ut];for(let Ot=0;Ot<$t.length;Ot++){let Ze=$t[Ot],Me={line:Ut+1,column:Ze[ie]},Xe,gt,qt;Ze.length!==1&&(Xe=_t.array[Ze[te]],gt={line:Ze[q]+1,column:Ze[oe]},Ze.length===5&&(qt=Zt.array[Ze[be]])),ze.push({generated:Me,source:Xe,original:gt,name:qt})}}return ze}function pe(at,ze,rt,_t,Zt,Ut,$t,Ot,Ze){let{_mappings:Me,_sources:Xe,_sourcesContent:gt,_names:qt}=ze,sn=Te(Me,rt),mn=Ee(sn,_t);if(!Zt)return at&&qe(sn,mn)?void 0:ve(sn,mn,[_t]);let Pn=$(Xe,Zt),je=Ot?$(qt,Ot):De;if(Pn===gt.length&&(gt[Pn]=Ze??null),!at||!He(sn,mn,Pn,Ut,$t,je))return ve(sn,mn,Ot?[_t,Pn,Ut,$t,je]:[_t,Pn,Ut,$t])}function ge(at){}function Te(at,ze){for(let rt=at.length;rt<=ze;rt++)at[rt]=[];return at[ze]}function Ee(at,ze){let rt=at.length;for(let _t=rt-1;_t>=0&&!(ze>=at[_t][ie]);rt=_t--);return rt}function ve(at,ze,rt){for(let _t=at.length;_t>ze;_t--)at[_t]=at[_t-1];at[ze]=rt}function ye(at){let{length:ze}=at,rt=ze;for(let _t=rt-1;_t>=0&&!(at[_t].length>0);rt=_t,_t--);rt<ze&&(at.length=rt)}function Y(at,ze){for(let rt=0;rt<ze.length;rt++)$(at,ze[rt])}function qe(at,ze){return ze===0||at[ze-1].length===1}function He(at,ze,rt,_t,Zt,Ut){if(ze===0)return!1;let $t=at[ze-1];return $t.length!==1&&rt===$t[te]&&_t===$t[q]&&Zt===$t[oe]&&Ut===($t.length===5?$t[be]:De)}function dt(at,ze,rt){let{generated:_t,source:Zt,original:Ut,name:$t,content:Ot}=rt;return Zt?pe(at,ze,_t.line-1,_t.column,Zt,Ut.line-1,Ut.column,$t,Ot):pe(at,ze,_t.line-1,_t.column,null,null,null,null,null)}})(i=o.nmd(i),o("./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"),o("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js")),i.exports="default"in(a=i).exports?a.exports.default:a.exports},"./node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.umd.js"(i,s,o){var a;(function(c,u,l){"use strict";var p=Object.create,d=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,f=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,y=(se,z)=>function(){return z||(0,se[h(se)[0]])((z={exports:{}}).exports,z),z.exports},b=(se,z)=>{for(var ee in z)d(se,ee,{get:z[ee],enumerable:!0})},E=(se,z,ee,j)=>{if(z&&typeof z=="object"||typeof z=="function")for(let X of h(z))A.call(se,X)||X===ee||d(se,X,{get:()=>z[X],enumerable:!(j=m(z,X))||j.enumerable});return se},_=(se,z,ee)=>(ee=se!=null?p(f(se)):{},E(!z&&se&&se.__esModule?ee:d(ee,"default",{value:se,enumerable:!0}),se)),x=se=>E(d({},"__esModule",{value:!0}),se),S=y({"umd:@jridgewell/trace-mapping"(se,z){z.exports=l}}),T=y({"umd:@jridgewell/gen-mapping"(se,z){z.exports=u}}),v={};b(v,{default:()=>ce}),c.exports=x(v);var R=_(S()),O=_(T()),G=_(S()),$=W("",-1,-1,"",null,!1),U=[];function W(se,z,ee,j,X,le){return{source:se,line:z,column:ee,name:j,content:X,ignore:le}}function re(se,z,ee,j,X){return{map:se,sources:z,source:ee,content:j,ignore:X}}function ie(se,z){return re(se,z,"",null,!1)}function te(se,z,ee){return re(null,U,se,z,ee)}function q(se){let z=new O.GenMapping({file:se.map.file}),{sources:ee,map:j}=se,X=j.names,le=(0,G.decodedMappings)(j);for(let xe=0;xe<le.length;xe++){let Se=le[xe];for(let pe=0;pe<Se.length;pe++){let ge=Se[pe],Te=ge[0],Ee=$;if(ge.length!==1&&(Ee=oe(ee[ge[1]],ge[2],ge[3],ge.length===5?X[ge[4]]:""),Ee==null))continue;let{column:ve,line:ye,name:Y,content:qe,source:He,ignore:dt}=Ee;(0,O.maybeAddSegment)(z,xe,Te,He,ye,ve,Y),He&&qe!=null&&(0,O.setSourceContent)(z,He,qe),dt&&(0,O.setIgnore)(z,He,!0)}}return z}function oe(se,z,ee,j){if(!se.map)return W(se.source,z,ee,j,se.content,se.ignore);let X=(0,G.traceSegment)(se.map,z,ee);return X==null?null:X.length===1?$:oe(se.sources[X[1]],X[2],X[3],X.length===5?se.map.names[X[4]]:j)}function be(se){return Array.isArray(se)?se:[se]}function De(se,z){let ee=be(se).map(le=>new R.TraceMap(le,"")),j=ee.pop();for(let le=0;le<ee.length;le++)if(ee[le].sources.length>1)throw new Error(`Transformation map ${le} must have exactly one source file.
403
403
  Did you specify these with the most recent transformation maps first?`);let X=Re(j,z,"",0);for(let le=ee.length-1;le>=0;le--)X=ie(ee[le],[X]);return X}function Re(se,z,ee,j){let{resolvedSources:X,sourcesContent:le,ignoreList:xe}=se,Se=j+1;return ie(se,X.map((pe,ge)=>{let Te={importer:ee,depth:Se,source:pe||"",content:void 0,ignore:void 0},Ee=z(Te.source,Te),{source:ve,content:ye,ignore:Y}=Te;return Ee?Re(new R.TraceMap(Ee,ve),z,ve,Se):te(ve,ye!==void 0?ye:le?le[ge]:null,Y!==void 0?Y:!!xe&&xe.includes(ge))}))}var Ie=_(T()),ne=class{constructor(se,z){let ee=z.decodedMappings?(0,Ie.toDecodedMap)(se):(0,Ie.toEncodedMap)(se);this.version=ee.version,this.file=ee.file,this.mappings=ee.mappings,this.names=ee.names,this.ignoreList=ee.ignoreList,this.sourceRoot=ee.sourceRoot,this.sources=ee.sources,z.excludeContent||(this.sourcesContent=ee.sourcesContent)}toString(){return JSON.stringify(this)}};function ce(se,z,ee){let j=typeof ee=="object"?ee:{excludeContent:!!ee,decodedMappings:!1},X=De(se,z);return new ne(q(X),j)}})(i=o.nmd(i),o("./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"),o("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js")),i.exports="default"in(a=i).exports?a.exports.default:a.exports},"./node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"(i){i.exports=(function(){"use strict";let s=/^[\w+.-]+:\/\//,o=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,a=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function c(x){return s.test(x)}function u(x){return x.startsWith("//")}function l(x){return x.startsWith("/")}function p(x){return x.startsWith("file:")}function d(x){return/^[.?#]/.test(x)}function m(x){let S=o.exec(x);return f(S[1],S[2]||"",S[3],S[4]||"",S[5]||"/",S[6]||"",S[7]||"")}function h(x){let S=a.exec(x),T=S[2];return f("file:","",S[1]||"","",l(T)?T:"/"+T,S[3]||"",S[4]||"")}function f(x,S,T,v,R,O,G){return{scheme:x,user:S,host:T,port:v,path:R,query:O,hash:G,type:7}}function A(x){if(u(x)){let T=m("http:"+x);return T.scheme="",T.type=6,T}if(l(x)){let T=m("http://foo.com"+x);return T.scheme="",T.host="",T.type=5,T}if(p(x))return h(x);if(c(x))return m(x);let S=m("http://foo.com/"+x);return S.scheme="",S.host="",S.type=x?x.startsWith("?")?3:x.startsWith("#")?2:4:1,S}function y(x){if(x.endsWith("/.."))return x;let S=x.lastIndexOf("/");return x.slice(0,S+1)}function b(x,S){E(S,S.type),x.path==="/"?x.path=S.path:x.path=y(S.path)+x.path}function E(x,S){let T=S<=4,v=x.path.split("/"),R=1,O=0,G=!1;for(let U=1;U<v.length;U++){let W=v[U];W?(G=!1,W!=="."&&(W!==".."?(v[R++]=W,O++):O?(G=!0,O--,R--):T&&(v[R++]=W))):G=!0}let $="";for(let U=1;U<R;U++)$+="/"+v[U];(!$||G&&!$.endsWith("/.."))&&($+="/"),x.path=$}function _(x,S){if(!x&&!S)return"";let T=A(x),v=T.type;if(S&&v!==7){let O=A(S),G=O.type;switch(v){case 1:T.hash=O.hash;case 2:T.query=O.query;case 3:case 4:b(T,O);case 5:T.user=O.user,T.host=O.host,T.port=O.port;case 6:T.scheme=O.scheme}G>v&&(v=G)}E(T,v);let R=T.query+T.hash;switch(v){case 2:case 3:return R;case 4:{let O=T.path.slice(1);return O?d(S||x)&&!d(O)?"./"+O+R:O+R:R||"."}case 5:return T.path+R;default:return T.scheme+"//"+T.user+T.host+T.port+T.path+R}}return _})()},"./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"(i,s,o){var a;(function(c){"use strict";var u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,m=(ne,ce,se,z)=>{if(ce&&typeof ce=="object"||typeof ce=="function")for(let ee of p(ce))d.call(ne,ee)||ee===se||u(ne,ee,{get:()=>ce[ee],enumerable:!(z=l(ce,ee))||z.enumerable});return ne},h=ne=>m(u({},"__esModule",{value:!0}),ne),f={};((ne,ce)=>{for(var se in ce)u(ne,se,{get:ce[se],enumerable:!0})})(f,{decode:()=>be,decodeGeneratedRanges:()=>ie,decodeOriginalScopes:()=>U,encode:()=>Ie,encodeGeneratedRanges:()=>te,encodeOriginalScopes:()=>W}),c.exports=h(f);var A=44,y=59,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=new Uint8Array(64),_=new Uint8Array(128);for(let ne=0;ne<b.length;ne++){let ce=b.charCodeAt(ne);E[ne]=ce,_[ce]=ne}function x(ne,ce){let se=0,z=0,ee=0;do{let X=ne.next();ee=_[X],se|=(31&ee)<<z,z+=5}while(32&ee);let j=1&se;return se>>>=1,j&&(se=-2147483648|-se),ce+se}function S(ne,ce,se){let z=ce-se;z=z<0?-z<<1|1:z<<1;do{let ee=31&z;z>>>=5,z>0&&(ee|=32),ne.write(E[ee])}while(z>0);return ce}function T(ne,ce){return!(ne.pos>=ce)&&ne.peek()!==A}var v=16384,R=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode:ne=>Buffer.from(ne.buffer,ne.byteOffset,ne.byteLength).toString()}:{decode(ne){let ce="";for(let se=0;se<ne.length;se++)ce+=String.fromCharCode(ne[se]);return ce}},O=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(v)}write(ne){let{buffer:ce}=this;ce[this.pos++]=ne,this.pos===v&&(this.out+=R.decode(ce),this.pos=0)}flush(){let{buffer:ne,out:ce,pos:se}=this;return se>0?ce+R.decode(ne.subarray(0,se)):ce}},G=class{constructor(ne){this.pos=0,this.buffer=ne}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(ne){let{buffer:ce,pos:se}=this,z=ce.indexOf(ne,se);return z===-1?ce.length:z}},$=[];function U(ne){let{length:ce}=ne,se=new G(ne),z=[],ee=[],j=0;for(;se.pos<ce;se.pos++){j=x(se,j);let X=x(se,0);if(!T(se,ce)){let pe=ee.pop();pe[2]=j,pe[3]=X;continue}let le=x(se,0),xe=1&x(se,0)?[j,X,0,0,le,x(se,0)]:[j,X,0,0,le],Se=$;if(T(se,ce)){Se=[];do{let pe=x(se,0);Se.push(pe)}while(T(se,ce))}xe.vars=Se,z.push(xe),ee.push(xe)}return z}function W(ne){let ce=new O;for(let se=0;se<ne.length;)se=re(ne,se,ce,[0]);return ce.flush()}function re(ne,ce,se,z){let ee=ne[ce],{0:j,1:X,2:le,3:xe,4:Se,vars:pe}=ee;ce>0&&se.write(A),z[0]=S(se,j,z[0]),S(se,X,0),S(se,Se,0),S(se,ee.length===6?1:0,0),ee.length===6&&S(se,ee[5],0);for(let ge of pe)S(se,ge,0);for(ce++;ce<ne.length;){let ge=ne[ce],{0:Te,1:Ee}=ge;if(Te>le||Te===le&&Ee>=xe)break;ce=re(ne,ce,se,z)}return se.write(A),z[0]=S(se,le,z[0]),S(se,xe,0),ce}function ie(ne){let{length:ce}=ne,se=new G(ne),z=[],ee=[],j=0,X=0,le=0,xe=0,Se=0,pe=0,ge=0,Te=0;do{let Ee=se.indexOf(";"),ve=0;for(;se.pos<Ee;se.pos++){if(ve=x(se,ve),!T(se,Ee)){let ze=ee.pop();ze[2]=j,ze[3]=ve;continue}let ye=x(se,0),Y=2&ye,qe=4&ye,He,dt=null,at=$;if(1&ye){let ze=x(se,X);le=x(se,X===ze?le:0),X=ze,He=[j,ve,0,0,ze,le]}else He=[j,ve,0,0];if(He.isScope=!!qe,Y){let ze=xe,rt=Se;xe=x(se,xe);let _t=ze===xe;Se=x(se,_t?Se:0),pe=x(se,_t&&rt===Se?pe:0),dt=[xe,Se,pe]}if(He.callsite=dt,T(se,Ee)){at=[];do{ge=j,Te=ve;let ze=x(se,0),rt;if(ze<-1){rt=[[x(se,0)]];for(let _t=-1;_t>ze;_t--){let Zt=ge;ge=x(se,ge),Te=x(se,ge===Zt?Te:0);let Ut=x(se,0);rt.push([Ut,ge,Te])}}else rt=[[ze]];at.push(rt)}while(T(se,Ee))}He.bindings=at,z.push(He),ee.push(He)}j++,se.pos=Ee+1}while(se.pos<ce);return z}function te(ne){if(ne.length===0)return"";let ce=new O;for(let se=0;se<ne.length;)se=q(ne,se,ce,[0,0,0,0,0,0,0]);return ce.flush()}function q(ne,ce,se,z){let ee=ne[ce],{0:j,1:X,2:le,3:xe,isScope:Se,callsite:pe,bindings:ge}=ee;if(z[0]<j?(oe(se,z[0],j),z[0]=j,z[1]=0):ce>0&&se.write(A),z[1]=S(se,ee[1],z[1]),S(se,(ee.length===6?1:0)|(pe?2:0)|(Se?4:0),0),ee.length===6){let{4:Te,5:Ee}=ee;Te!==z[2]&&(z[3]=0),z[2]=S(se,Te,z[2]),z[3]=S(se,Ee,z[3])}if(pe){let{0:Te,1:Ee,2:ve}=ee.callsite;Te!==z[4]?(z[5]=0,z[6]=0):Ee!==z[5]&&(z[6]=0),z[4]=S(se,Te,z[4]),z[5]=S(se,Ee,z[5]),z[6]=S(se,ve,z[6])}if(ge)for(let Te of ge){Te.length>1&&S(se,-Te.length,0),S(se,Te[0][0],0);let Ee=j,ve=X;for(let ye=1;ye<Te.length;ye++){let Y=Te[ye];Ee=S(se,Y[1],Ee),ve=S(se,Y[2],ve),S(se,Y[0],0)}}for(ce++;ce<ne.length;){let Te=ne[ce],{0:Ee,1:ve}=Te;if(Ee>le||Ee===le&&ve>=xe)break;ce=q(ne,ce,se,z)}return z[0]<le?(oe(se,z[0],le),z[0]=le,z[1]=0):se.write(A),z[1]=S(se,xe,z[1]),ce}function oe(ne,ce,se){do ne.write(y);while(++ce<se)}function be(ne){let{length:ce}=ne,se=new G(ne),z=[],ee=0,j=0,X=0,le=0,xe=0;do{let Se=se.indexOf(";"),pe=[],ge=!0,Te=0;for(ee=0;se.pos<Se;){let Ee;ee=x(se,ee),ee<Te&&(ge=!1),Te=ee,T(se,Se)?(j=x(se,j),X=x(se,X),le=x(se,le),T(se,Se)?(xe=x(se,xe),Ee=[ee,j,X,le,xe]):Ee=[ee,j,X,le]):Ee=[ee],pe.push(Ee),se.pos++}ge||De(pe),z.push(pe),se.pos=Se+1}while(se.pos<=ce);return z}function De(ne){ne.sort(Re)}function Re(ne,ce){return ne[0]-ce[0]}function Ie(ne){let ce=new O,se=0,z=0,ee=0,j=0;for(let X=0;X<ne.length;X++){let le=ne[X];if(X>0&&ce.write(y),le.length===0)continue;let xe=0;for(let Se=0;Se<le.length;Se++){let pe=le[Se];Se>0&&ce.write(A),xe=S(ce,pe[0],xe),pe.length!==1&&(se=S(ce,pe[1],se),z=S(ce,pe[2],z),ee=S(ce,pe[3],ee),pe.length!==4&&(j=S(ce,pe[4],j)))}}return ce.flush()}})(i=o.nmd(i)),i.exports="default"in(a=i).exports?a.exports.default:a.exports},"./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"(i,s,o){var a;(function(c,u,l){"use strict";var p=Object.create,d=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,f=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,y=(et,pt)=>function(){return pt||(0,et[h(et)[0]])((pt={exports:{}}).exports,pt),pt.exports},b=(et,pt)=>{for(var ft in pt)d(et,ft,{get:pt[ft],enumerable:!0})},E=(et,pt,ft,nt)=>{if(pt&&typeof pt=="object"||typeof pt=="function")for(let kt of h(pt))A.call(et,kt)||kt===ft||d(et,kt,{get:()=>pt[kt],enumerable:!(nt=m(pt,kt))||nt.enumerable});return et},_=(et,pt,ft)=>(ft=et!=null?p(f(et)):{},E(!pt&&et&&et.__esModule?ft:d(ft,"default",{value:et,enumerable:!0}),et)),x=et=>E(d({},"__esModule",{value:!0}),et),S=y({"umd:@jridgewell/sourcemap-codec"(et,pt){pt.exports=l}}),T=y({"umd:@jridgewell/resolve-uri"(et,pt){pt.exports=u}}),v={};b(v,{AnyMap:()=>Se,FlattenMap:()=>Se,GREATEST_LOWER_BOUND:()=>qe,LEAST_UPPER_BOUND:()=>Y,TraceMap:()=>He,allGeneratedPositionsFor:()=>Ut,decodedMap:()=>gt,decodedMappings:()=>ze,eachMapping:()=>$t,encodedMap:()=>qt,encodedMappings:()=>at,generatedPositionFor:()=>Zt,isIgnored:()=>Me,originalPositionFor:()=>_t,presortedDecodedMap:()=>Xe,sourceContentFor:()=>Ze,traceSegment:()=>rt}),c.exports=x(v);var R=_(S()),O=_(T());function G(et){if(!et)return"";let pt=et.lastIndexOf("/");return et.slice(0,pt+1)}function $(et,pt){let ft=G(et),nt=pt?pt+"/":"";return kt=>(0,O.default)(nt+(kt||""),ft)}var U=0,W=1,re=2,ie=3,te=4,q=1,oe=2;function be(et,pt){let ft=De(et,0);if(ft===et.length)return et;pt||(et=et.slice());for(let nt=ft;nt<et.length;nt=De(et,nt+1))et[nt]=Ie(et[nt],pt);return et}function De(et,pt){for(let ft=pt;ft<et.length;ft++)if(!Re(et[ft]))return ft;return et.length}function Re(et){for(let pt=1;pt<et.length;pt++)if(et[pt][U]<et[pt-1][U])return!1;return!0}function Ie(et,pt){return pt||(et=et.slice()),et.sort(ne)}function ne(et,pt){return et[U]-pt[U]}function ce(et,pt){let ft=pt.map(()=>[]);for(let nt=0;nt<et.length;nt++){let kt=et[nt];for(let Yt=0;Yt<kt.length;Yt++){let Ne=kt[Yt];if(Ne.length===1)continue;let Qe=Ne[W],lt=Ne[re],Ge=Ne[ie],Ct=ft[Qe];(Ct[lt]||(Ct[lt]=[])).push([Ge,nt,Ne[U]])}}for(let nt=0;nt<ft.length;nt++){let kt=ft[nt];for(let Yt=0;Yt<kt.length;Yt++){let Ne=kt[Yt];Ne&&Ne.sort(ne)}}return ft}var se=!1;function z(et,pt,ft,nt){for(;ft<=nt;){let kt=ft+(nt-ft>>1),Yt=et[kt][U]-pt;if(Yt===0)return se=!0,kt;Yt<0?ft=kt+1:nt=kt-1}return se=!1,ft-1}function ee(et,pt,ft){for(let nt=ft+1;nt<et.length&&et[nt][U]===pt;ft=nt++);return ft}function j(et,pt,ft){for(let nt=ft-1;nt>=0&&et[nt][U]===pt;ft=nt--);return ft}function X(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function le(et,pt,ft,nt){let{lastKey:kt,lastNeedle:Yt,lastIndex:Ne}=ft,Qe=0,lt=et.length-1;if(nt===kt){if(pt===Yt)return se=Ne!==-1&&et[Ne][U]===pt,Ne;pt>=Yt?Qe=Ne===-1?0:Ne:lt=Ne}return ft.lastKey=nt,ft.lastNeedle=pt,ft.lastIndex=z(et,pt,Qe,lt)}function xe(et){return typeof et=="string"?JSON.parse(et):et}var Se=function(et,pt){let ft=xe(et);if(!("sections"in ft))return new He(ft,pt);let nt=[],kt=[],Yt=[],Ne=[],Qe=[];return pe(ft,pt,nt,kt,Yt,Ne,Qe,0,0,1/0,1/0),Xe({version:3,file:ft.file,names:Ne,sources:kt,sourcesContent:Yt,mappings:nt,ignoreList:Qe})};function pe(et,pt,ft,nt,kt,Yt,Ne,Qe,lt,Ge,Ct){let{sections:Nt}=et;for(let wt=0;wt<Nt.length;wt++){let{map:hn,offset:fn}=Nt[wt],yn=Ge,zn=Ct;if(wt+1<Nt.length){let qn=Nt[wt+1].offset;yn=Math.min(Ge,Qe+qn.line),yn===Ge?zn=Math.min(Ct,lt+qn.column):yn<Ge&&(zn=lt+qn.column)}ge(hn,pt,ft,nt,kt,Yt,Ne,Qe+fn.line,lt+fn.column,yn,zn)}}function ge(et,pt,ft,nt,kt,Yt,Ne,Qe,lt,Ge,Ct){let Nt=xe(et);if("sections"in Nt)return pe(...arguments);let wt=new He(Nt,pt),hn=nt.length,fn=Yt.length,yn=ze(wt),{resolvedSources:zn,sourcesContent:qn,ignoreList:Yr}=wt;if(Te(nt,zn),Te(Yt,wt.names),qn)Te(kt,qn);else for(let cn=0;cn<zn.length;cn++)kt.push(null);if(Yr)for(let cn=0;cn<Yr.length;cn++)Ne.push(Yr[cn]+hn);for(let cn=0;cn<yn.length;cn++){let oi=Qe+cn;if(oi>Ge)return;let Qr=Ee(ft,oi),kr=cn===0?lt:0,Ys=yn[cn];for(let us=0;us<Ys.length;us++){let dn=Ys[us],Bi=kr+dn[U];if(oi===Ge&&Bi>=Ct)return;if(dn.length===1){Qr.push([Bi]);continue}let Fs=hn+dn[W],ei=dn[re],Gn=dn[ie];Qr.push(dn.length===4?[Bi,Fs,ei,Gn]:[Bi,Fs,ei,Gn,fn+dn[te]])}}}function Te(et,pt){for(let ft=0;ft<pt.length;ft++)et.push(pt[ft])}function Ee(et,pt){for(let ft=et.length;ft<=pt;ft++)et[ft]=[];return et[pt]}var ve="`line` must be greater than 0 (lines start at line 1)",ye="`column` must be greater than or equal to 0 (columns start at column 0)",Y=-1,qe=1,He=class{constructor(et,pt){let ft=typeof et=="string";if(!ft&&et._decodedMemo)return et;let nt=xe(et),{version:kt,file:Yt,names:Ne,sourceRoot:Qe,sources:lt,sourcesContent:Ge}=nt;this.version=kt,this.file=Yt,this.names=Ne||[],this.sourceRoot=Qe,this.sources=lt,this.sourcesContent=Ge,this.ignoreList=nt.ignoreList||nt.x_google_ignoreList||void 0;let Ct=$(pt,Qe);this.resolvedSources=lt.map(Ct);let{mappings:Nt}=nt;if(typeof Nt=="string")this._encoded=Nt,this._decoded=void 0;else{if(!Array.isArray(Nt))throw nt.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(nt)}`);this._encoded=void 0,this._decoded=be(Nt,ft)}this._decodedMemo=X(),this._bySources=void 0,this._bySourceMemos=void 0}};function dt(et){return et}function at(et){var pt,ft;return(ft=(pt=et)._encoded)!=null?ft:pt._encoded=(0,R.encode)(et._decoded)}function ze(et){var pt;return(pt=et)._decoded||(pt._decoded=(0,R.decode)(et._encoded))}function rt(et,pt,ft){let nt=ze(et);if(pt>=nt.length)return null;let kt=nt[pt],Yt=je(kt,et._decodedMemo,pt,ft,qe);return Yt===-1?null:kt[Yt]}function _t(et,pt){let{line:ft,column:nt,bias:kt}=pt;if(ft--,ft<0)throw new Error(ve);if(nt<0)throw new Error(ye);let Yt=ze(et);if(ft>=Yt.length)return mn(null,null,null,null);let Ne=Yt[ft],Qe=je(Ne,et._decodedMemo,ft,nt,kt||qe);if(Qe===-1)return mn(null,null,null,null);let lt=Ne[Qe];if(lt.length===1)return mn(null,null,null,null);let{names:Ge,resolvedSources:Ct}=et;return mn(Ct[lt[W]],lt[re]+1,lt[ie],lt.length===5?Ge[lt[te]]:null)}function Zt(et,pt){let{source:ft,line:nt,column:kt,bias:Yt}=pt;return Kt(et,ft,nt,kt,Yt||qe,!1)}function Ut(et,pt){let{source:ft,line:nt,column:kt,bias:Yt}=pt;return Kt(et,ft,nt,kt,Yt||Y,!0)}function $t(et,pt){let ft=ze(et),{names:nt,resolvedSources:kt}=et;for(let Yt=0;Yt<ft.length;Yt++){let Ne=ft[Yt];for(let Qe=0;Qe<Ne.length;Qe++){let lt=Ne[Qe],Ge=Yt+1,Ct=lt[0],Nt=null,wt=null,hn=null,fn=null;lt.length!==1&&(Nt=kt[lt[1]],wt=lt[2]+1,hn=lt[3]),lt.length===5&&(fn=nt[lt[4]]),pt({generatedLine:Ge,generatedColumn:Ct,source:Nt,originalLine:wt,originalColumn:hn,name:fn})}}}function Ot(et,pt){let{sources:ft,resolvedSources:nt}=et,kt=ft.indexOf(pt);return kt===-1&&(kt=nt.indexOf(pt)),kt}function Ze(et,pt){let{sourcesContent:ft}=et;if(ft==null)return null;let nt=Ot(et,pt);return nt===-1?null:ft[nt]}function Me(et,pt){let{ignoreList:ft}=et;if(ft==null)return!1;let nt=Ot(et,pt);return nt!==-1&&ft.includes(nt)}function Xe(et,pt){let ft=new He(sn(et,[]),pt);return ft._decoded=et.mappings,ft}function gt(et){return sn(et,ze(et))}function qt(et){return sn(et,at(et))}function sn(et,pt){return{version:et.version,file:et.file,names:et.names,sourceRoot:et.sourceRoot,sources:et.sources,sourcesContent:et.sourcesContent,mappings:pt,ignoreList:et.ignoreList||et.x_google_ignoreList}}function mn(et,pt,ft,nt){return{source:et,line:pt,column:ft,name:nt}}function Pn(et,pt){return{line:et,column:pt}}function je(et,pt,ft,nt,kt){let Yt=le(et,nt,pt,ft);return se?Yt=(kt===Y?ee:j)(et,nt,Yt):kt===Y&&Yt++,Yt===-1||Yt===et.length?-1:Yt}function mt(et,pt,ft,nt,kt){let Yt=je(et,pt,ft,nt,qe);if(se||kt!==Y||Yt++,Yt===-1||Yt===et.length)return[];let Ne=se?nt:et[Yt][U];se||(Yt=j(et,Ne,Yt));let Qe=ee(et,Ne,Yt),lt=[];for(;Yt<=Qe;Yt++){let Ge=et[Yt];lt.push(Pn(Ge[q]+1,Ge[oe]))}return lt}function Kt(et,pt,ft,nt,kt,Yt){var Ne,Qe;if(--ft<0)throw new Error(ve);if(nt<0)throw new Error(ye);let{sources:lt,resolvedSources:Ge}=et,Ct=lt.indexOf(pt);if(Ct===-1&&(Ct=Ge.indexOf(pt)),Ct===-1)return Yt?[]:Pn(null,null);let Nt=(Ne=et)._bySourceMemos||(Ne._bySourceMemos=lt.map(X)),wt=((Qe=et)._bySources||(Qe._bySources=ce(ze(et),Nt)))[Ct][ft];if(wt==null)return Yt?[]:Pn(null,null);let hn=Nt[Ct];if(Yt)return mt(wt,hn,ft,nt,kt);let fn=je(wt,hn,ft,nt,kt);if(fn===-1)return Pn(null,null);let yn=wt[fn];return Pn(yn[q]+1,yn[oe])}})(i=o.nmd(i),o("./node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"),o("./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js")),i.exports="default"in(a=i).exports?a.exports.default:a.exports},"./node_modules/.pnpm/babel-plugin-parameter-decorator@1.0.16/node_modules/babel-plugin-parameter-decorator/lib/index.js"(i,s,o){"use strict";var a=o("path");function c(u){switch(u.parent.type){case"TSTypeReference":case"TSQualifiedName":case"TSExpressionWithTypeArguments":case"TSTypeQuery":return!0;default:return!1}}i.exports=function(u){var l=u.types,p=function(m,h){return function(f){var A=l.callExpression(m.expression,[l.Identifier(f),l.Identifier("undefined"),l.NumericLiteral(h.key)]),y=l.logicalExpression("||",A,l.Identifier(f)),b=l.assignmentExpression("=",l.Identifier(f),y);return l.expressionStatement(b)}},d=function(m,h){return function(f,A){var y=l.callExpression(m.expression,[l.Identifier("".concat(f,".prototype")),l.StringLiteral(A),l.NumericLiteral(h.key)]);return l.expressionStatement(y)}};return{visitor:{Program:function(m,h){var f=(0,a.extname)(h.file.opts.filename);f!==".ts"&&f!==".tsx"||(function(){var A=Object.create(null);m.node.body.filter(function(U){var W=U.type,re=U.declaration;switch(W){case"ClassDeclaration":return!0;case"ExportNamedDeclaration":case"ExportDefaultDeclaration":return re&&re.type==="ClassDeclaration";default:return!1}}).map(function(U){return U.type==="ClassDeclaration"?U:U.declaration}).forEach(function(U){U.body.body.forEach(function(W){(W.params||[]).forEach(function(re){(re.decorators||[]).forEach(function(ie){ie.expression.callee?A[ie.expression.callee.name]=ie:A[ie.expression.name]=ie})})})});var y=!0,b=!1,E=void 0;try{for(var _,x=m.get("body")[Symbol.iterator]();!(y=(_=x.next()).done);y=!0){var S=_.value;if(S.node.type==="ImportDeclaration"){if(S.node.specifiers.length===0)continue;var T=!0,v=!1,R=void 0;try{for(var O,G=function(){var U=O.value,W=S.scope.getBinding(U.local.name);W.referencePaths.length?W.referencePaths.reduce(function(re,ie){return re||c(ie)},!1)&&Object.keys(A).forEach(function(re){var ie=A[re];(ie.expression.arguments||[]).forEach(function(te){te.name===U.local.name&&W.referencePaths.push({parent:ie.expression})})}):A[U.local.name]&&W.referencePaths.push({parent:A[U.local.name]})},$=S.node.specifiers[Symbol.iterator]();!(T=(O=$.next()).done);T=!0)G()}catch(U){v=!0,R=U}finally{try{T||$.return==null||$.return()}finally{if(v)throw R}}}}}catch(U){b=!0,E=U}finally{try{y||x.return==null||x.return()}finally{if(b)throw E}}})()},Function:function(m){var h="";m.node.id?h=m.node.id.name:m.node.key&&(h=m.node.key.name),(m.get("params")||[]).slice().forEach(function(f){var A=f.node.decorators||[],y=A.length;if(A.slice().forEach(function(E){if(m.type==="ClassMethod"){var _,x=m.parentPath.parentPath,S=m.findParent(function(U){return U.type==="ClassDeclaration"});if(S?_=S.node.id.name:(x.insertAfter(null),_=(function(U){var W=U.findParent(function(re){return re.node.type==="AssignmentExpression"});return W.node.right.type==="SequenceExpression"?W.node.right.expressions[1].name:W.node.right.type==="ClassExpression"?W.node.left.name:null})(m)),h==="constructor"){var T=p(E,f)(_);x.insertAfter(T)}else{var v=d(E,f)(_,h);x.insertAfter(v)}}else{var R=m.findParent(function(U){return U.node.type==="VariableDeclarator"}).node.id.name;if(h===R){var O=p(E,f)(R);m.parentKey==="body"?m.insertAfter(O):m.findParent(function(U){return U.parentKey==="body"}).insertAfter(O)}else{var G=m.findParent(function(U){return U.node.type==="CallExpression"}),$=d(E,f)(R,h);G.insertAfter($)}}}),y){var b=(function(E){switch(E.node.type){case"ObjectPattern":return l.ObjectPattern(E.node.properties);case"AssignmentPattern":return l.AssignmentPattern(E.node.left,E.node.right);case"TSParameterProperty":return l.Identifier(E.node.parameter.name);default:return l.Identifier(E.node.name)}})(f);f.replaceWith(b)}})}}}}},"./node_modules/.pnpm/convert-source-map@2.0.0/node_modules/convert-source-map/index.js"(i,s){"use strict";var o;function a(u,l){(l=l||{}).hasComment&&(u=(function(p){return p.split(",").pop()})(u)),l.encoding==="base64"?u=o(u):l.encoding==="uri"&&(u=decodeURIComponent(u)),(l.isJSON||l.encoding)&&(u=JSON.parse(u)),this.sourcemap=u}function c(u){return new a(u,{isJSON:!0})}Object.defineProperty(s,"commentRegex",{get:function(){return/^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/gm}}),Object.defineProperty(s,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/gm}}),o=typeof Buffer<"u"?typeof Buffer.from=="function"?function(u){return Buffer.from(u,"base64").toString()}:function(u){if(typeof value=="number")throw new TypeError("The value to decode must not be of type number.");return new Buffer(u,"base64").toString()}:function(u){return decodeURIComponent(escape(atob(u)))},a.prototype.toJSON=function(u){return JSON.stringify(this.sourcemap,null,u)},typeof Buffer<"u"?typeof Buffer.from=="function"?a.prototype.toBase64=function(){var u=this.toJSON();return Buffer.from(u,"utf8").toString("base64")}:a.prototype.toBase64=function(){var u=this.toJSON();if(typeof u=="number")throw new TypeError("The json to encode must not be of type number.");return new Buffer(u,"utf8").toString("base64")}:a.prototype.toBase64=function(){var u=this.toJSON();return btoa(unescape(encodeURIComponent(u)))},a.prototype.toURI=function(){var u=this.toJSON();return encodeURIComponent(u)},a.prototype.toComment=function(u){var l,p,d;return u!=null&&u.encoding==="uri"?(l="",p=this.toURI()):(l=";base64",p=this.toBase64()),d="sourceMappingURL=data:application/json;charset=utf-8"+l+","+p,u!=null&&u.multiline?"/*# "+d+" */":"//# "+d},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(u,l){if(this.sourcemap.hasOwnProperty(u))throw new Error('property "'+u+'" already exists on the sourcemap, use set property instead');return this.setProperty(u,l)},a.prototype.setProperty=function(u,l){return this.sourcemap[u]=l,this},a.prototype.getProperty=function(u){return this.sourcemap[u]},s.fromObject=function(u){return new a(u)},s.fromJSON=function(u){return new a(u,{isJSON:!0})},s.fromURI=function(u){return new a(u,{encoding:"uri"})},s.fromBase64=function(u){return new a(u,{encoding:"base64"})},s.fromComment=function(u){var l;return new a(u=u.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),{encoding:(l=s.commentRegex.exec(u))&&l[4]||"uri",hasComment:!0})},s.fromMapFileComment=function(u,l){if(typeof l=="string")throw new Error("String directory paths are no longer supported with `fromMapFileComment`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var p=(function(d,m){var h=s.mapFileCommentRegex.exec(d),f=h[1]||h[2];try{return(d=m(f))!=null&&typeof d.catch=="function"?d.catch(A):d}catch(y){A(y)}function A(y){throw new Error("An error occurred while trying to read the map file at "+f+`
404
404
  `+y.stack)}})(u,l);return p!=null&&typeof p.then=="function"?p.then(c):c(p)},s.fromSource=function(u){var l=u.match(s.commentRegex);return l?s.fromComment(l.pop()):null},s.fromMapFileSource=function(u,l){if(typeof l=="string")throw new Error("String directory paths are no longer supported with `fromMapFileSource`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var p=u.match(s.mapFileCommentRegex);return p?s.fromMapFileComment(p.pop(),l):null},s.removeComments=function(u){return u.replace(s.commentRegex,"")},s.removeMapFileComments=function(u){return u.replace(s.mapFileCommentRegex,"")},s.generateMapFileComment=function(u,l){var p="sourceMappingURL="+u;return l&&l.multiline?"/*# "+p+" */":"//# "+p}},"./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(i,s,o){s.formatArgs=function(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;let u="color: "+this.color;c.splice(1,0,u,"color: inherit");let l=0,p=0;c[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(l++,d==="%c"&&(p=l))}),c.splice(p,0,u)},s.save=function(c){try{c?s.storage.setItem("debug",c):s.storage.removeItem("debug")}catch{}},s.load=function(){let c;try{c=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c},s.useColors=function(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},s.storage=(function(){try{return localStorage}catch{}})(),s.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],s.log=console.debug||console.log||(()=>{}),i.exports=o("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js")(s);let{formatters:a}=i.exports;a.j=function(c){try{return JSON.stringify(c)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}},"./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(i,s,o){i.exports=function(a){function c(p){let d,m,h,f=null;function A(...y){if(!A.enabled)return;let b=A,E=Number(new Date),_=E-(d||E);b.diff=_,b.prev=d,b.curr=E,d=E,y[0]=c.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let x=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(S,T)=>{if(S==="%%")return"%";x++;let v=c.formatters[T];if(typeof v=="function"){let R=y[x];S=v.call(b,R),y.splice(x,1),x--}return S}),c.formatArgs.call(b,y),(b.log||c.log).apply(b,y)}return A.namespace=p,A.useColors=c.useColors(),A.color=c.selectColor(p),A.extend=u,A.destroy=c.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==c.namespaces&&(m=c.namespaces,h=c.enabled(p)),h),set:y=>{f=y}}),typeof c.init=="function"&&c.init(A),A}function u(p,d){let m=c(this.namespace+(d===void 0?":":d)+p);return m.log=this.log,m}function l(p,d){let m=0,h=0,f=-1,A=0;for(;m<p.length;)if(h<d.length&&(d[h]===p[m]||d[h]==="*"))d[h]==="*"?(f=h,A=m,h++):(m++,h++);else{if(f===-1)return!1;h=f+1,A++,m=A}for(;h<d.length&&d[h]==="*";)h++;return h===d.length}return c.debug=c,c.default=c,c.coerce=function(p){return p instanceof Error?p.stack||p.message:p},c.disable=function(){let p=[...c.names,...c.skips.map(d=>"-"+d)].join(",");return c.enable(""),p},c.enable=function(p){c.save(p),c.namespaces=p,c.names=[],c.skips=[];let d=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of d)m[0]==="-"?c.skips.push(m.slice(1)):c.names.push(m)},c.enabled=function(p){for(let d of c.skips)if(l(p,d))return!1;for(let d of c.names)if(l(p,d))return!0;return!1},c.humanize=o("./node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"),c.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(a).forEach(p=>{c[p]=a[p]}),c.names=[],c.skips=[],c.formatters={},c.selectColor=function(p){let d=0;for(let m=0;m<p.length;m++)d=(d<<5)-d+p.charCodeAt(m),d|=0;return c.colors[Math.abs(d)%c.colors.length]},c.enable(c.load()),c}},"./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(i,s,o){typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?i.exports=o("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"):i.exports=o("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js")},"./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(i,s,o){let a=o("tty"),c=o("util");s.init=function(l){l.inspectOpts={};let p=Object.keys(s.inspectOpts);for(let d=0;d<p.length;d++)l.inspectOpts[p[d]]=s.inspectOpts[p[d]]},s.log=function(...l){return process.stderr.write(c.formatWithOptions(s.inspectOpts,...l)+`
405
405
  `)},s.formatArgs=function(l){let{namespace:p,useColors:d}=this;if(d){let m=this.color,h="\x1B[3"+(m<8?m:"8;5;"+m),f=` ${h};1m${p} \x1B[0m`;l[0]=f+l[0].split(`
@@ -2355,12 +2355,14 @@ Options:
2355
2355
  `),!0}let r=m3(n,e.kind),i,s;try{let a=e.noRefresh?new Nhe:X$.create(),c=await _vn(a);i=await bvn(n,c,{refresh:!e.noRefresh}),e.credentials&&i.status==="ready"&&(s=await Evn(i.provider,c,a,{refresh:!e.noRefresh}),s||(i={status:"not_ready",provider:i.provider,reason:"credential_not_available"}))}catch{i={status:"invalid",provider:r.provider??r.model,reason:"invalid_state"}}let o=e.json?JSON.stringify({...i,...s?{credentials:s}:{}}):s??i.status;process.stdout.write(`${o}
2356
2356
  `),process.exitCode=i.status==="ready"?0:i.status==="not_ready"?1:2}catch(r){let i=r instanceof ic?r.message:"Failed to resolve credential";console.error(Jt.red(`Error: ${i}`)),process.exitCode=e.kind==="check"?2:1}return!0}async function XRi(t,e,n){if(t.fileArgs.length===0)return Q8e({parsed:t,stdinContent:n});let{text:r,images:i}=await Cvn(t.fileArgs,{autoResizeImages:e});return Q8e({parsed:t,fileText:r,fileImages:i,stdinContent:n})}async function Hkn(t,e,n){let i=(await Bs.list(e,n)).find(s=>s.id===t);return i?{type:"local",path:i.path}:void 0}async function jkn(t,e,n){if(t.includes("/")||t.includes("\\")||t.endsWith(".jsonl"))return{type:"path",path:jn(t,e)};let r=await Bs.list(e,n),i=r.find(a=>a.id===t)??r.find(a=>a.id.startsWith(t));if(i)return{type:"local",path:i.path};let s=await Bs.listAll(n),o=s.find(a=>a.id===t)??s.find(a=>a.id.startsWith(t));return o?{type:"global",path:o.path,cwd:o.cwd}:{type:"not_found",arg:t}}async function ZRi(t){return new Promise(e=>{let n=HRi({input:process.stdin,output:process.stdout});n.question(`${t} [y/N] `,r=>{n.close(),e(r.toLowerCase()==="y"||r.toLowerCase()==="yes")})})}function eki(t){if(!t.fork)return;let e=[t.session?"--session":void 0,t.continue?"--continue":void 0,t.resume?"--resume":void 0,t.noSession?"--no-session":void 0].filter(n=>n!==void 0);e.length>0&&(console.error(Jt.red(`Error: --fork cannot be combined with ${e.join(", ")}`)),process.exit(1))}function tki(t){if(t.sessionId===void 0)return;let e=[t.session?"--session":void 0,t.continue?"--continue":void 0,t.resume?"--resume":void 0].filter(n=>n!==void 0);e.length>0&&(console.error(Jt.red(`Error: --session-id cannot be combined with ${e.join(", ")}`)),process.exit(1));try{ufe(t.sessionId)}catch(n){let r=n instanceof Error?n.message:String(n);console.error(Jt.red(`Error: ${r}`)),process.exit(1)}}function nki(t,e){try{return Bs.open(t,e)}catch(n){let r=n instanceof Error?n.message:String(n);console.error(Jt.red(`Error: ${r}`)),process.exit(1)}}function Vkn(t,e,n,r){try{return Bs.forkFrom(t,e,n,{id:r})}catch(i){let s=i instanceof Error?i.message:String(i);console.error(Jt.red(`Error: ${s}`)),process.exit(1)}}async function rki(t,e,n,r){if(t.noSession||t.help||t.listModels!==void 0)return Bs.inMemory(e,t.sessionId!==void 0?{id:t.sessionId}:void 0);if(t.fork){t.sessionId&&await Hkn(t.sessionId,e,n)&&(console.error(Jt.red(`Session already exists with id '${t.sessionId}'`)),process.exit(1));let i=await jkn(t.fork,e,n);switch(i.type){case"path":case"local":case"global":return Vkn(i.path,e,n,t.sessionId);case"not_found":console.error(Jt.red(`No session found matching '${i.arg}'`)),process.exit(1)}}if(t.session){let i=await jkn(t.session,e,n);switch(i.type){case"path":case"local":return nki(i.path,n);case"global":return console.log(Jt.yellow(`Session found in different project: ${i.cwd}`)),await ZRi("Fork this session into current directory?")||(console.log(Jt.dim("Aborted.")),process.exit(0)),Vkn(i.path,e,n);case"not_found":console.error(Jt.red(`No session found matching '${i.arg}'`)),process.exit(1)}}if(t.resume)try{let i=await Bvn(s=>Bs.list(e,n,s),s=>Bs.listAll(n,s),r);return i||(console.log(Jt.dim("No session selected")),process.exit(0)),Bs.open(i,n)}finally{Kb()}if(t.continue)return Bs.continueRecent(e,n);if(t.sessionId){let i=await Hkn(t.sessionId,e,n);if(i)return Bs.open(i.path,n);console.error(Jt.yellow(`Warning: No project session found with id '${t.sessionId}'; creating a new session with that id.`))}return Bs.create(e,n,{id:t.sessionId})}function iki(t,e,n,r,i){let s={},o=[],a=!1;if(t.model){let c=b0({cliProvider:t.provider,cliModel:t.model,cliThinking:t.thinking,modelRuntime:r});c.warning&&o.push({type:"warning",message:c.warning}),c.error&&o.push({type:"error",message:c.error}),c.model&&(s.model=c.model,!t.thinking&&c.thinkingLevel&&(s.thinkingLevel=c.thinkingLevel,a=!0))}if(!s.model&&e.length>0&&!n){let c=i.getDefaultProvider(),u=i.getDefaultModel(),l=c&&u?r.getModel(c,u):void 0,p=l?e.find(d=>bp(d.model,l)):void 0;p?(s.model=p.model,!t.thinking&&p.thinkingLevel&&(s.thinkingLevel=p.thinkingLevel)):(s.model=e[0].model,!t.thinking&&e[0].thinkingLevel&&(s.thinkingLevel=e[0].thinkingLevel))}return t.thinking&&(s.thinkingLevel=t.thinking),e.length>0&&(s.scopedModels=e.map(c=>({model:c.model,thinkingLevel:c.thinkingLevel}))),t.noTools?s.noTools="all":t.noBuiltinTools&&(s.noTools="builtin"),t.tools&&(s.tools=[...t.tools]),t.excludeTools&&(s.excludeTools=[...t.excludeTools]),{options:s,cliThinkingFromModel:a,diagnostics:o}}function xbe(t,e){return e?.map(n=>NA(n)?jn(n,t):n)}async function ski(t,e){return v9(e,Uye(t),[{label:"Continue",value:t.fallbackCwd},{label:"Cancel",value:void 0}])}async function Kkn(t,e){a8();let n=[...Jvn,...e?.extensionFactories??[]],r=t.includes("--offline")||Wkn(process.env.PI_OFFLINE);if(r&&(process.env.PI_OFFLINE="1",process.env.PI_SKIP_VERSION_CHECK="1"),await JRi(t))return;process.platform==="win32"&&_be(al());let i=process.cwd(),s=Kr(),o=Hu.create(i,s,{projectTrusted:!1});if(P8e(o.getGlobalSettings().httpProxy),u3(),await Qkn(t,{extensionFactories:n})){let Re=process.exitCode??0;if(process.platform==="win32"&&Re===0&&t[0]==="update")return;process.exit(Re);return}if(await $kn(t,{extensionFactories:n}))return;let a=WH(t);if(a.diagnostics.length>0){for(let Re of a.diagnostics){let Ie=Re.type==="error"?Jt.red:Jt.yellow;console.error(Ie(`${Re.type==="error"?"Error":"Warning"}: ${Re.message}`))}a.diagnostics.some(Re=>Re.type==="error")&&process.exit(1)}if(Gu("parseArgs"),a.version&&(console.log(md),process.exit(0)),a.export){let Re;try{let Ie=a.messages.length>0?a.messages[0]:void 0;Re=await kun(a.export,Ie)}catch(Ie){let ne=Ie instanceof Error?Ie.message:"Failed to export session";console.error(Jt.red(`Error: ${ne}`)),process.exit(1)}console.log(`Exported to: ${Re}`),process.exit(0)}let c=KRi(a,process.stdin.isTTY,process.stdout.isTTY);c!=="interactive"&&!zRi(a)&&Age(),a.mode==="rpc"&&a.fileArgs.length>0&&(console.error(Jt.red("Error: @file arguments are not supported in RPC mode")),process.exit(1)),eki(a),tki(a);let{migratedAuthProviders:l,deprecationWarnings:p}=nRn(i);Gu("runMigrations");let d=Hu.create(i,s);qkn(Gkn(d,"startup session lookup")),c==="interactive"&&!a.help&&a.listModels===void 0&&Rvn()&&(await kvn(d),Gu("firstTimeSetup")),c==="interactive"&&a.useTheme!==void 0&&d.applyOverrides({theme:a.useTheme});let m=process.env[Qle],h=(a.sessionDir?po(a.sessionDir):void 0)??(m?hFe(m):void 0)??d.getSessionDir(),f=await rki(a,i,h,d),A=B8e(f,i);if(A)if(c==="interactive"){let Re=await ski(A,d);Re||process.exit(0),f=Bs.open(A.sessionFile,h,Re)}else console.error(Jt.red(new Jv(A).message)),process.exit(1);if(a.name!==void 0){let Re=a.name.trim();Re||(console.error(Jt.red("Error: --name requires a non-empty value")),process.exit(1)),f.appendSessionInfo(Re)}Gu("createSessionManager");let y=new pE(s),b=f.getCwd(),E=a.projectTrustOverride===void 0&&!fy(b)?b:void 0,_=a.help||a.listModels!==void 0?"print":c,x=new Map,S=xbe(i,a.extensions),T=xbe(i,a.skills),v=xbe(i,a.promptTemplates),R=xbe(i,a.themes),O=async({cwd:Re,agentDir:Ie,sessionManager:ne,sessionStartEvent:ce,projectTrustContext:se})=>{let z=ce===void 0,ee=[],j=x.get(Re),X=fy(Re),le=a.projectTrustOverride===void 0&&j===void 0&&X,xe=le?!1:j??a.projectTrustOverride??(!X||y.get(Re)===!0),Se=Hu.create(Re,Ie,{projectTrusted:xe}),pe=await b9({cwd:Re,agentDir:Ie,settingsManager:Se,modelRuntimeSignal:AbortSignal.timeout(15e3),extensionFlagValues:a.unknownFlags,resourceLoaderReloadOptions:le?{resolveProjectTrust:async({extensionsResult:rt})=>{let _t=await Vye({cwd:Re,trustStore:y,trustOverride:a.projectTrustOverride,defaultProjectTrust:d.getDefaultProjectTrust(),extensionsResult:rt,projectTrustContext:se??jye({cwd:Re,mode:z?_:c,settingsManager:d,hasUI:z&&_==="interactive"}),onExtensionError:Zt=>ee.push({type:"warning",message:Zt})});return x.set(Re,_t),_t}}:void 0,resourceLoaderOptions:{additionalExtensionPaths:S,additionalSkillPaths:T,additionalPromptTemplatePaths:v,additionalThemePaths:R,noExtensions:a.noExtensions,noSkills:a.noSkills,noPromptTemplates:a.noPromptTemplates,noThemes:a.noThemes,noContextFiles:a.noContextFiles,systemPrompt:a.systemPrompt,appendSystemPrompt:a.appendSystemPrompt,extensionFactories:n}}),{settingsManager:ge,modelRuntime:Te,resourceLoader:Ee}=pe,ve=[...ee,...pe.diagnostics,...Gkn(ge,"runtime creation"),...Ee.getExtensions().errors.map(({path:rt,error:_t})=>({type:"error",message:`Failed to load extension "${rt}": ${_t}`}))],ye=a.models??ge.getEnabledModels(),Y=ye&&ye.length>0?await ihn(ye,Te,{signal:AbortSignal.timeout(15e3)}):[],{options:qe,cliThinkingFromModel:He,diagnostics:dt}=iki(a,Y,ne.buildSessionContext().messages.length>0,Te,ge);ve.push(...dt),a.apiKey&&(qe.model?await Te.setRuntimeApiKey(qe.model.provider,a.apiKey):ve.push({type:"error",message:"--api-key requires a model to be specified via --model, --provider/--model, or --models"}));let at=await E9({services:pe,sessionManager:ne,sessionStartEvent:ce,model:qe.model,thinkingLevel:qe.thinkingLevel,scopedModels:qe.scopedModels,tools:qe.tools,excludeTools:qe.excludeTools,noTools:qe.noTools,customTools:qe.customTools}),ze=a.thinking!==void 0||He;return at.session.model&&ze&&at.session.setThinkingLevel(at.session.thinkingLevel),{...at,services:pe,diagnostics:ve}};Gu("createRuntime");let G=await Qye(O,{cwd:f.getCwd(),agentDir:s,sessionManager:f});Gu("createAgentSessionRuntime");let{services:$,session:U,modelFallbackMessage:W}=G,{settingsManager:re,modelRuntime:ie,resourceLoader:te}=$;if(P8e(re.getGlobalSettings().httpProxy),u3(re.getHttpIdleTimeoutMs()),a.help){let Re=te.getExtensions().extensions.flatMap(Ie=>Array.from(Ie.flags.values()));u5t(Re),process.exit(0)}if(a.listModels!==void 0){let Re=typeof a.listModels=="string"?a.listModels:void 0;await Ivn(ie,Re,AbortSignal.timeout(15e3)),process.exit(0)}let q;c!=="rpc"&&(q=await VRi(),q!==void 0&&c==="interactive"&&(c="print")),Gu("readPipedStdin");let{initialMessage:oe,initialImages:be}=await XRi(a,re.getImageAutoResize(),q);Gu("prepareInitialMessage"),m0(re.getTheme(),c==="interactive"),Gu("initTheme"),c==="interactive"&&p.length>0&&await tRn(p),Gu("resolveModelScope"),qkn(G.diagnostics),G.diagnostics.some(Re=>Re.type==="error")&&(G.diagnostics.some(Re=>Re.message.includes("Failed to load extension"))&&console.error(Jt.yellow(jRi)),process.exit(1)),Gu("createAgentSession"),c!=="interactive"&&!U.model&&(console.error(Jt.red(p$())),process.exit(1));let De=Wkn(process.env.PI_STARTUP_BENCHMARK);if(De&&c!=="interactive"&&(console.error(Jt.red("Error: PI_STARTUP_BENCHMARK only supports interactive mode")),process.exit(1)),!r&&c==="rpc"){let Re=new AbortController,Ie=setTimeout(()=>Re.abort(),15e3);ie.refresh({signal:Re.signal}).catch(()=>{}).finally(()=>clearTimeout(Ie))}if(c==="rpc")c8(),await X9(G);else if(c==="interactive"){let Re=new $O(G,{migratedProviders:l,modelFallbackMessage:W,autoTrustOnReloadCwd:E,initialMessage:oe,initialImages:be,initialMessages:a.messages,verbose:a.verbose,tuiMode:a.tuiMode,initialThemeSetting:a.useTheme});if(De){await Re.init(),Gu("interactiveMode.init"),await new Promise(Ie=>setTimeout(Ie,150)),Re.stop(),Kb(),c8(),process.stdout.writableLength>0&&await new Promise(Ie=>process.stdout.once("drain",Ie)),process.stderr.writableLength>0&&await new Promise(Ie=>process.stderr.once("drain",Ie));return}c8(),await Re.run()}else{c8();let Re=await z9(G,{mode:YRi(c),messages:a.messages,initialMessage:oe,initialImages:be});Kb(),Dyn(),Re!==0&&(process.exitCode=Re);return}}var oki={minPrimaryColumnWidth:12,maxPrimaryColumnWidth:32},Z9=class extends En{selectList;constructor(e,n,r){super();let i=[{value:"yes",label:"Yes",description:"Show images inline in terminal"},{value:"no",label:"No",description:"Show text placeholder instead"}];this.addChild(new On),this.selectList=new hd(i,5,Yb(),oki),this.selectList.setSelectedIndex(e?0:1),this.selectList.onSelect=s=>{n(s.value==="yes")},this.selectList.onCancel=()=>{r()},this.addChild(this.selectList),this.addChild(new On)}getSelectList(){return this.selectList}};var aki={minPrimaryColumnWidth:12,maxPrimaryColumnWidth:32},eY=class extends En{selectList;onPreview;constructor(e,n,r,i){super(),this.onPreview=i;let s=$de(),o=s.map(c=>({value:c,label:c,description:c===e?"(current)":void 0}));this.addChild(new On),this.selectList=new hd(o,10,Yb(),aki);let a=s.indexOf(e);a!==-1&&this.selectList.setSelectedIndex(a),this.selectList.onSelect=c=>{n(c.value)},this.selectList.onCancel=()=>{r()},this.selectList.onSelectionChange=c=>{this.onPreview(c.value)},this.addChild(this.selectList),this.addChild(new On)}getSelectList(){return this.selectList}};var cki={minPrimaryColumnWidth:12,maxPrimaryColumnWidth:32},lki={off:"No reasoning",minimal:"Very brief reasoning (~1k tokens)",low:"Light reasoning (~2k tokens)",medium:"Moderate reasoning (~8k tokens)",high:"Deep reasoning (~16k tokens)",xhigh:"Extra-high reasoning (~32k tokens)",max:"Maximum reasoning"},tY=class extends En{selectList;constructor(e,n,r,i){super();let s=n.map(a=>({value:a,label:a,description:lki[a]}));this.addChild(new On),this.selectList=new hd(s,s.length,Yb(),cki);let o=s.findIndex(a=>a.value===e);o!==-1&&this.selectList.setSelectedIndex(o),this.selectList.onSelect=a=>{r(a.value)},this.selectList.onCancel=()=>{i()},this.addChild(this.selectList),this.addChild(new On)}getSelectList(){return this.selectList}};import{dirname as XQa,join as Ykn}from"node:path";var e3a=Ykn(Kr(),"checks-config.json"),t3a=Ykn(Kr(),"settings.json");var n3a=420*1e3,r3a=120*1e3;var h3a=ji.Object({verdict:ji.Union([ji.Literal("PASS"),ji.Literal("FAIL")],{description:"FAIL only for a genuine blocking issue (clear rubric violation, agent-fault-worthy gap, unfair/undiscoverable test requirement, or a real determinism/regression risk). Optional, minor, or stylistic points are NOT grounds for FAIL \u2014 put those in `notes` instead and use PASS."}),summary:ji.String({description:"One short sentence summarizing the verdict."}),reasons:ji.Array(ji.String(),{description:"Specific BLOCKING justifications only, citing rubric item IDs and concrete evidence from the files you read. Required (non-empty) when verdict is FAIL. Use an empty array when verdict is PASS."}),notes:ji.Array(ji.String(),{description:"Non-blocking, optional/minor observations or suggested improvements \u2014 the kind of feedback a real reviewer leaves as 'Minor/optional' without failing the task. Include these regardless of verdict; use an empty array if you truly have none."})});var g3a=ji.Object({gaps:ji.Array(ji.Object({description:ji.String({description:"A fair, publicly observable missing behavioral test."}),justification:ji.String({description:"Why the gap is grounded in agent_prompt.md or the repository and why a plausible incorrect implementation could pass the current tests despite missing this behavior."})}),{description:"The complete final list of distinct, evidence-backed positive and negative behavioral test gaps. Use an empty array only after exhaustive analysis finds none."})});var pki=ji.Object({category:ji.Union([ji.Literal("missing-requirement"),ji.Literal("regression"),ji.Literal("architecture"),ji.Literal("unsafe-failure"),ji.Literal("inconsistent-path"),ji.Literal("dead-code"),ji.Literal("unrelated-change")],{description:"The kind of actionable quality problem found in the solution implementation."}),subject:ji.String({description:"A short behavior, symbol, or concern identifier; do not require a source line or file location."}),problem:ji.String({description:"What is wrong with the implementation and why it is actionable."}),evidence:ji.String({description:"The prompt, repository, implementation, or regression evidence supporting the finding."}),requiredBehavior:ji.String({description:"The requirement, invariant, or solution-quality property that must be preserved."}),recommendation:ji.String({description:"A concrete repair that stays within the prompt and repository conventions."})}),A3a=ji.Object({findings:ji.Array(pki,{description:"Only confirmed, actionable solution-quality findings. Use an empty array when the implementation meets the prompt and repository standards."})});var y3a=ji.Object({gaps:ji.Array(ji.Object({description:ji.String({description:"The specific behavioral gap: a way one or more solver's diff differs materially from what agent_prompt.md/solution.patch require, despite that solver passing `./test.sh new`."}),justification:ji.String({description:"Why this is a genuine requirement from agent_prompt.md or solution.patch (cite the specific requirement/line) that the solver's diff misses, contradicts, or diverges from \u2014 and why the current tests fail to catch that divergence."}),evidence:ji.String({description:"Which solver(s) (by index) exhibit this, and the specific part of their diff that grounds the gap."})}),{description:"Concrete, diff-grounded behavioral gaps \u2014 cases where a passing solver's materially different approach reveals that `test.sh new` under-specifies a real requirement. Use an empty array if the solvers converged on equivalent behavior; do not manufacture gaps just to report something."})});function zkn(){return["You are a adversarial tester. Your goal is to find the most minimal, shortcut implementation that makes all new tests pass \u2014 not a full, correct solution. This is intentional: we want to discover whether the test suite lets through an implementation that barely satisfies the assertions without properly implementing the prompt's required behavior.","`agent_prompt.md` in the repo root describes the intended task. Tests for it already exist and are currently failing.","","Goal: make ALL of the new tests pass with the least amount of real logic possible.","1. Run `bash test.sh new` to see the failures and what the tests expect. Read the failing tests carefully \u2014 they are the only spec you need to satisfy.","2. Understand exactly what each test assertion checks. Ask, 'what is the minimum thing I can do \u2014 a stub, a hardcoded return, a mockish pass-through, a trivial branch \u2014 to satisfy this test?', not 'what does agent_prompt.md intend?'. Skim `agent_prompt.md` only enough to understand what the test file names and assertions refer to, then rely on the test errors to drive what to implement.","3. Prefer the most minimal implementation possible:"," - Hardcode a return value if the test expects one."," - Add only the code paths a test actually exercises; leave anything untested unimplemented."," - Mock the minimum number of dependencies (or none) that the test error forces you to touch."," - Use the most direct, trivial, shortcut approach \u2014 do not build abstractions, do not handle unobserved edge cases, do not add defensive code.","4. Before declaring success, also run `bash test.sh base` to confirm your changes cause no regressions. The shortcut must not break existing tests \u2014 that would be a false positive from a different angle.","5. Re-run `bash test.sh new` and iterate until both the new tests and the base tests pass, or you're confident you cannot pass more without adding real logic.","","Rules:","- Do NOT modify the test files or `test.sh`. Only change application/library code.","- You have shell access \u2014 install any dependencies you need.","- The prompt is not your spec: the tests are. Implement exactly what the tests demand, nothing more. If you can satisfy a test with a hardcoded return, do it."].join(`
2357
2357
  `)}import{readFileSync as Jkn}from"node:fs";var dki=5e3,mki=95;function fki(t){try{let e=Number.parseInt(Jkn(t,"utf-8").trim(),10);return Number.isFinite(e)?e:void 0}catch{return}}function hki(t){return t==="small"?1:t==="medium"?2:4}function gki(t){try{let n=Jkn("/sys/fs/cgroup/cpu.stat","utf-8"),r=Number.parseInt(n.match(/^usage_usec\s+(\d+)/m)?.[1]??"",10);if(Number.isFinite(r))return{usageMicros:r,vcpus:t}}catch{}let e=fki("/sys/fs/cgroup/cpuacct/cpuacct.usage");if(e!==void 0)return{usageMicros:e/1e3,vcpus:t}}var Sbe=class{startedAt=Date.now();profile;vcpus;timer;lastCpu;lastSampleAt;sampleCount=0;observedMs=0;cpuOver95Ms=0;maxCpuPercent=null;stopped;constructor(e){this.profile=e,this.vcpus=hki(e)}start(){this.sample(),this.timer=setInterval(()=>this.sample(),dki)}stop(){return this.stopped?this.stopped:(this.timer&&clearInterval(this.timer),this.timer=void 0,this.sample(),this.stopped=this.snapshot(),this.stopped)}snapshot(){return{profile:this.profile,allocatedVcpus:this.vcpus,durationMs:Date.now()-this.startedAt,sampleCount:this.sampleCount,maxCpuPercent:this.maxCpuPercent,cpuOver95DurationMs:this.observedMs>0?this.cpuOver95Ms:null,observedAt:new Date().toISOString()}}sample(){if(this.stopped)return;let e=Date.now(),n=gki(this.vcpus);if(this.sampleCount+=1,n&&this.lastCpu&&this.lastSampleAt!==void 0){let r=e-this.lastSampleAt,i=Math.max(0,n.usageMicros-this.lastCpu.usageMicros),s=Math.max(0,Math.min(100,i/(r*1e3*n.vcpus)*100));this.observedMs+=Math.max(0,r);let o=Math.max(0,r);s>=mki&&(this.cpuOver95Ms+=o),this.maxCpuPercent=this.maxCpuPercent===null?s:Math.max(this.maxCpuPercent,s)}n&&(this.lastCpu=n),this.lastSampleAt=e}};var w3;Y0t();var nY="/opt/shipd-agent",n1n="/work/solvers",Xkn=4e3;function ju(t){let e=process.env[t];if(!e)throw new Error(`Missing worker environment variable ${t}.`);return e}function yki(t){return t.length>Xkn?t.slice(t.length-Xkn):t}function bki(){let t=JSON.parse(iY("/tmp/shipd-bootstrap.json","utf-8")),e=t.mode;if(e!=="solver"&&e!=="patch-precheck")throw new Error("Invalid Fargate bootstrap mode.");process.env.SHIPD_MODE=e;let r=(e==="solver"?["bucket","region","sourceKey","authKey","resultKey"]:["bucket","region","sourceKey","resultKey"]).every(a=>typeof t[a]=="string"&&t[a]),i=["planB64","resourceProfile",...e==="solver"?["provider","modelId","thinkingLevel"]:[]],s={planB64:"SHIPD_PLAN_B64",provider:"SHIPD_PROVIDER",modelId:"SHIPD_MODEL_ID",thinkingLevel:"SHIPD_THINKING_LEVEL",resourceProfile:"SHIPD_RESOURCE_PROFILE"};if(r){let a=[["bucket","SHIPD_S3_BUCKET"],["region","SHIPD_S3_REGION"],["sourceKey","SHIPD_S3_SOURCE_KEY"],...e==="solver"?[["authKey","SHIPD_S3_AUTH_KEY"]]:[],["resultKey","SHIPD_S3_RESULT_KEY"]];for(let[c,u]of a){let l=t[c];if(typeof l!="string"||l.length===0)throw new Error(`Invalid Fargate bootstrap field: ${c}.`);process.env[u]=l}}else{let a=[["sourceUrl","SHIPD_SOURCE_URL"],...e==="solver"?[["authUrl","SHIPD_AUTH_URL"]]:[],["resultPutUrl","SHIPD_RESULT_PUT_URL"],["resultGetUrl","SHIPD_RESULT_GET_URL"]];for(let[c,u]of a){let l=t[c];if(typeof l!="string"||l.length===0)throw new Error(`Invalid Fargate bootstrap field: ${c}.`);process.env[u]=l}}for(let a of i){let c=t[a];if(typeof c!="string"||c.length===0)throw new Error(`Invalid Fargate bootstrap field: ${a}.`);process.env[s[a]]=c}let o=[["timeoutMinutes","SHIPD_TIMEOUT_MINUTES"],...e==="solver"?[["solverCount","SHIPD_SOLVER_COUNT"]]:[]];for(let[a,c]of o){let u=t[a];if(typeof u!="number"||!Number.isFinite(u))throw new Error(`Invalid Fargate bootstrap field: ${a}.`);process.env[c]=String(u)}return e}function Eki(){let t=ju("SHIPD_PLAN_B64");return JSON.parse(Buffer.from(t,"base64url").toString("utf-8"))}function _ki(t){let e={...process.env};for(let[n,r]of Object.entries(t.env))e[n]=r.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}|\$([A-Za-z_][A-Za-z0-9_]*)/g,(i,s,o)=>e[s??o]??"");return e}async function r1n(t,e){let n=await fetch(t);if(!n.ok)throw new Error(`Download failed (${n.status}) for ${e}.`);v3(e,Buffer.from(await n.arrayBuffer()))}function R3(){return!!process.env.SHIPD_S3_BUCKET}function YKe(){return new QO.S3Client({region:ju("SHIPD_S3_REGION"),credentials:(0,t1n.defaultProvider)()})}async function i1n(t,e,n){let i=await(await YKe().send(new QO.GetObjectCommand({Bucket:t,Key:e}))).Body?.transformToByteArray();if(!i)throw new Error(`S3 object was empty: s3://${t}/${e}`);v3(n,Buffer.from(i))}async function wbe(t,e){let n=JSON.stringify(e);if(R3()){await YKe().send(new QO.PutObjectCommand({Bucket:ju("SHIPD_S3_BUCKET"),Key:ju("SHIPD_S3_RESULT_KEY"),Body:n,ContentType:"application/json"}));return}let r=await fetch(t,{method:"PUT",headers:{"content-type":"application/json"},body:n});if(!r.ok){let i=(await r.text()).trim();throw new Error(`Result upload failed (${r.status})${i?`: ${i.slice(0,1e3)}`:"."}`)}}async function rY(t,e,n,r){return await new Promise((i,s)=>{let o=Aki("/bin/bash",["-c",t],{cwd:e,env:n,stdio:["ignore","pipe","pipe"],detached:process.platform!=="win32"}),a="",c="",u=!1,l,p=d=>{u||(u=!0,l&&clearTimeout(l),i(d))};o.stdout.on("data",d=>{a+=d.toString()}),o.stderr.on("data",d=>{c+=d.toString()}),o.once("error",d=>{u||(u=!0,l&&clearTimeout(l),s(new Error(`${d instanceof Error?d.message:String(d)} (cwd=${e} exists=${vbe(e)})`)))}),o.once("close",d=>p({code:d??1,stdout:a,stderr:c})),l=setTimeout(()=>{process.platform!=="win32"&&o.pid?process.kill(-o.pid,"SIGTERM"):o.kill("SIGTERM"),setTimeout(()=>{u||(process.platform!=="win32"&&o.pid?process.kill(-o.pid,"SIGKILL"):o.kill("SIGKILL"))},5e3)},r)})}async function oR(t,e,n,r){let i=await rY(t,e,n,r);if(i.code!==0)throw new Error([i.stderr.trim(),i.stdout.trim(),`Remote command: ${t}`].filter(Boolean).join(`
2358
- `));return i}function VKe(t,e){if(!t)return null;let n=t.match(new RegExp(`\\b${e}=["']([0-9]+(?:\\.[0-9]+)?)["']`,"i"))?.[1];if(n===void 0)return null;let r=Number(n);return Number.isFinite(r)?r:null}function Zkn(t,e){return t.match(new RegExp(`\\b${e}=["']([^"']*)["']`,"i"))?.[1]}function e1n(t,e){let n=Zkn(t,"name")??`testcase-${e+1}`,r=Zkn(t,"classname");return r?`${r}::${n}`:n}function xki(t){try{let e=iY(t,"utf-8"),n=e.match(/<testsuites\b[^>]*>/i)?.[0],r=[...e.matchAll(/<testsuite\b[^>]*>/gi)].map(y=>y[0]),i=[...e.matchAll(/<testcase\b[^>]*(?:\/>|>[\s\S]*?<\/testcase\s*>)/gi)].map(y=>y[0]),s=i.length,o=i.flatMap((y,b)=>/<failure\b/i.test(y)?[e1n(y,b)]:[]),a=i.flatMap((y,b)=>/<error\b/i.test(y)?[e1n(y,b)]:[]),c=o.length,u=a.length,l=i.filter(y=>/<skipped\b/i.test(y)).length,p=[...e.matchAll(/<failure\b/gi)].length,d=[...e.matchAll(/<error\b/gi)].length,m=i.reduce((y,b)=>y+[...b.matchAll(/<error\b/gi)].length,0),h=[...e.matchAll(/<skipped\b/gi)].length,f=(y,b)=>{let E=r.map(_=>VKe(_,y)).filter(_=>_!==null);return E.length>0?E.reduce((_,x)=>_+x,0):b},A=(y,b,E)=>Math.max(VKe(n,y)??f(y,E),b);return{tests:VKe(n,"tests")??f("tests",s),testcases:s,failures:A("failures",p,c),failedTestcases:c,errors:A("errors",d,u),erroredTestcases:u,suiteErrors:Math.max(0,d-m),skipped:A("skipped",h,l),skippedTestcases:l,failedTestNames:o,erroredTestNames:a}}catch{return{tests:null,testcases:null,failures:null,failedTestcases:null,errors:null,erroredTestcases:null,suiteErrors:null,skipped:null,skippedTestcases:null,failedTestNames:[],erroredTestNames:[]}}}function Ski(t,e,n){return e.tests===null||e.testcases===null||e.failures===null||e.failedTestcases===null||e.errors===null||e.erroredTestcases===null||e.suiteErrors===null||e.skipped===null||e.skippedTestcases===null||e.tests<=0||e.testcases<=0||e.testcases!==e.tests||e.skipped!==0||e.skippedTestcases!==0?!1:n==="all-pass"?t.code===0&&e.failures===0&&e.failedTestcases===0&&e.errors===0&&e.erroredTestcases===0&&e.suiteErrors===0:t.code!==0&&e.suiteErrors===0&&e.failedTestcases+e.erroredTestcases===e.testcases}async function Cbe(t,e,n,r,i,s){let o=`/tmp/shipd-${t}.xml`,a=`./test.sh --output_path ${Ts(o)} ${e}`;await rY(`rm -f ${Ts(o)}`,r,i,3e4);let c=await rY(a,r,i,s),u=xki(o);return{phase:t,command:a,exitCode:c.code,tests:u.tests,testcases:u.testcases,failures:u.failures,failedTestcases:u.failedTestcases,errors:u.errors,erroredTestcases:u.erroredTestcases,suiteErrors:u.suiteErrors,skipped:u.skipped,skippedTestcases:u.skippedTestcases,failedTestNames:u.failedTestNames,erroredTestNames:u.erroredTestNames,passed:Ski(c,u,n)}}function Tbe(t){return[`${t.phase} did not meet its expectation.`,`command: ${t.command}`,`exit code: ${t.exitCode}`,`tests: ${t.tests??"unknown"}, testcases: ${t.testcases??"unknown"}, failures: ${t.failures??"unknown"} (${t.failedTestcases??"unknown"} testcase failures), errors: ${t.errors??"unknown"} (${t.erroredTestcases??"unknown"} testcase errors, ${t.suiteErrors??"unknown"} suite-level), skipped: ${t.skipped??"unknown"} (${t.skippedTestcases??"unknown"} testcases)`,`failed tests: ${t.failedTestNames.length>0?t.failedTestNames.join(", "):"none"}`,`errored tests: ${t.erroredTestNames.length>0?t.erroredTestNames.join(", "):"none"}`].filter(Boolean).join(`
2359
- `)}async function Cki(t,e,n){let r=Date.now(),i=[],s=t.workdir,o=Ng(s,"test.patch"),a=Ng(s,"solution.patch"),c=Math.max(6e4,n*6e4);try{await oR(`git -C ${Ts(s)} apply --recount ${Ts(o)}`,"/work",e,15*6e4),await oR(`chmod +x ${Ts(Ng(s,"test.sh"))}`,"/work",e,3e4);let u=await Cbe("base-before-solution","base","all-pass",s,e,c);if(i.push(u),!u.passed)return{platform:"linux",status:"failed",passed:!1,phases:i,durationMs:Date.now()-r,error:Tbe(u)};let l=await Cbe("new-before-solution","new","all-fail",s,e,c);if(i.push(l),!l.passed)return{platform:"linux",status:"failed",passed:!1,phases:i,durationMs:Date.now()-r,error:Tbe(l)};await oR(`git -C ${Ts(s)} apply --recount ${Ts(a)}`,"/work",e,15*6e4);let p=await Cbe("base-after-solution","base","all-pass",s,e,c);if(i.push(p),!p.passed)return{platform:"linux",status:"failed",passed:!1,phases:i,durationMs:Date.now()-r,error:Tbe(p)};let d=await Cbe("new-after-solution","new","all-pass",s,e,c);return i.push(d),d.passed?{platform:"linux",status:"ok",passed:!0,phases:i,durationMs:Date.now()-r}:{platform:"linux",status:"failed",passed:!1,phases:i,durationMs:Date.now()-r,error:Tbe(d)}}catch(u){return{platform:"linux",status:"error",passed:!1,phases:i,durationMs:Date.now()-r,error:u instanceof Error?u.message:String(u)}}}function Tki(t){let e=t.trim().replace(/["']/g,"");return/^chmod\s+\S+\s+(?:\S*\/)?test\.sh$/.test(e)}async function Iki(t,e){let n="/tmp/shipd-source.tar.gz";R3()?await i1n(ju("SHIPD_S3_BUCKET"),ju("SHIPD_S3_SOURCE_KEY"),n):await r1n(ju("SHIPD_SOURCE_URL"),n),Ibe(t.workdir,{recursive:!0}),await oR(`tar -xzf ${Ts(n)} -C ${Ts(t.workdir)}`,t.workdir,e,900*1e3);let r=[`git config --global --add safe.directory ${Ts(t.workdir)}`,`git -C ${Ts(t.workdir)} init -q`,`git -C ${Ts(t.workdir)} config user.email solvergap@shipd-checks.local`,`git -C ${Ts(t.workdir)} config user.name shipd-checks-source`,`git -C ${Ts(t.workdir)} add -A`,`git -C ${Ts(t.workdir)} commit -q -m source --allow-empty`].join(`
2358
+ `));return i}function VKe(t,e){if(!t)return null;let n=t.match(new RegExp(`\\b${e}=["']([0-9]+(?:\\.[0-9]+)?)["']`,"i"))?.[1];if(n===void 0)return null;let r=Number(n);return Number.isFinite(r)?r:null}function Zkn(t,e){return t.match(new RegExp(`\\b${e}=["']([^"']*)["']`,"i"))?.[1]}function e1n(t,e){let n=Zkn(t,"name")??`testcase-${e+1}`,r=Zkn(t,"classname");return r?`${r}::${n}`:n}function xki(t){try{let e=iY(t,"utf-8"),n=e.match(/<testsuites\b[^>]*>/i)?.[0],r=[...e.matchAll(/<testsuite\b[^>]*>/gi)].map(y=>y[0]),i=[...e.matchAll(/<testcase\b[^>]*(?:\/>|>[\s\S]*?<\/testcase\s*>)/gi)].map(y=>y[0]),s=i.length,o=i.flatMap((y,b)=>/<failure\b/i.test(y)?[e1n(y,b)]:[]),a=i.flatMap((y,b)=>/<error\b/i.test(y)?[e1n(y,b)]:[]),c=o.length,u=a.length,l=i.filter(y=>/<skipped\b/i.test(y)).length,p=[...e.matchAll(/<failure\b/gi)].length,d=[...e.matchAll(/<error\b/gi)].length,m=i.reduce((y,b)=>y+[...b.matchAll(/<error\b/gi)].length,0),h=[...e.matchAll(/<skipped\b/gi)].length,f=(y,b)=>{let E=r.map(_=>VKe(_,y)).filter(_=>_!==null);return E.length>0?E.reduce((_,x)=>_+x,0):b},A=(y,b,E)=>Math.max(VKe(n,y)??f(y,E),b);return{tests:VKe(n,"tests")??f("tests",s),testcases:s,failures:A("failures",p,c),failedTestcases:c,errors:A("errors",d,u),erroredTestcases:u,suiteErrors:Math.max(0,d-m),skipped:A("skipped",h,l),skippedTestcases:l,failedTestNames:o,erroredTestNames:a}}catch{return{tests:null,testcases:null,failures:null,failedTestcases:null,errors:null,erroredTestcases:null,suiteErrors:null,skipped:null,skippedTestcases:null,failedTestNames:[],erroredTestNames:[]}}}function Ski(t,e,n){return e.tests===null||e.testcases===null||e.failures===null||e.failedTestcases===null||e.errors===null||e.erroredTestcases===null||e.suiteErrors===null||e.skipped===null||e.skippedTestcases===null||e.tests<=0||e.testcases<=0||e.testcases!==e.tests||e.skipped!==0||e.skippedTestcases!==0?!1:n==="all-pass"?t.code===0&&e.failures===0&&e.failedTestcases===0&&e.errors===0&&e.erroredTestcases===0&&e.suiteErrors===0:t.code!==0&&e.suiteErrors===0&&e.failedTestcases+e.erroredTestcases===e.testcases}async function Cbe(t,e,n,r,i,s){let o=`/tmp/shipd-${t}.xml`,a=`./test.sh --output_path ${Cs(o)} ${e}`;await rY(`rm -f ${Cs(o)}`,r,i,3e4);let c=await rY(a,r,i,s),u=xki(o);return{phase:t,command:a,exitCode:c.code,tests:u.tests,testcases:u.testcases,failures:u.failures,failedTestcases:u.failedTestcases,errors:u.errors,erroredTestcases:u.erroredTestcases,suiteErrors:u.suiteErrors,skipped:u.skipped,skippedTestcases:u.skippedTestcases,failedTestNames:u.failedTestNames,erroredTestNames:u.erroredTestNames,passed:Ski(c,u,n)}}function Tbe(t){return[`${t.phase} did not meet its expectation.`,`command: ${t.command}`,`exit code: ${t.exitCode}`,`tests: ${t.tests??"unknown"}, testcases: ${t.testcases??"unknown"}, failures: ${t.failures??"unknown"} (${t.failedTestcases??"unknown"} testcase failures), errors: ${t.errors??"unknown"} (${t.erroredTestcases??"unknown"} testcase errors, ${t.suiteErrors??"unknown"} suite-level), skipped: ${t.skipped??"unknown"} (${t.skippedTestcases??"unknown"} testcases)`,`failed tests: ${t.failedTestNames.length>0?t.failedTestNames.join(", "):"none"}`,`errored tests: ${t.erroredTestNames.length>0?t.erroredTestNames.join(", "):"none"}`].filter(Boolean).join(`
2359
+ `)}async function Cki(t,e,n){let r=Date.now(),i=[],s=t.workdir,o=Ng(s,"test.patch"),a=Ng(s,"solution.patch"),c=Math.max(6e4,n*6e4);try{await oR(`git -C ${Cs(s)} apply --recount ${Cs(o)}`,"/work",e,15*6e4),await oR(`chmod +x ${Cs(Ng(s,"test.sh"))}`,"/work",e,3e4);let u=await Cbe("base-before-solution","base","all-pass",s,e,c);if(i.push(u),!u.passed)return{platform:"linux",status:"failed",passed:!1,phases:i,durationMs:Date.now()-r,error:Tbe(u)};let l=await Cbe("new-before-solution","new","all-fail",s,e,c);if(i.push(l),!l.passed)return{platform:"linux",status:"failed",passed:!1,phases:i,durationMs:Date.now()-r,error:Tbe(l)};await oR(`git -C ${Cs(s)} apply --recount ${Cs(a)}`,"/work",e,15*6e4);let p=await Cbe("base-after-solution","base","all-pass",s,e,c);if(i.push(p),!p.passed)return{platform:"linux",status:"failed",passed:!1,phases:i,durationMs:Date.now()-r,error:Tbe(p)};let d=await Cbe("new-after-solution","new","all-pass",s,e,c);return i.push(d),d.passed?{platform:"linux",status:"ok",passed:!0,phases:i,durationMs:Date.now()-r}:{platform:"linux",status:"failed",passed:!1,phases:i,durationMs:Date.now()-r,error:Tbe(d)}}catch(u){return{platform:"linux",status:"error",passed:!1,phases:i,durationMs:Date.now()-r,error:u instanceof Error?u.message:String(u)}}}function Tki(t){let e=t.trim().replace(/["']/g,"");return/^chmod\s+\S+\s+(?:\S*\/)?test\.sh$/.test(e)}async function Iki(t,e){let n="/tmp/shipd-source.tar.gz";R3()?await i1n(ju("SHIPD_S3_BUCKET"),ju("SHIPD_S3_SOURCE_KEY"),n):await r1n(ju("SHIPD_SOURCE_URL"),n),Ibe(t.workdir,{recursive:!0});let r=t.workdir==="/"?":":`find ${Cs(t.workdir)} -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +`;await oR(`set -eu
2360
+ ${r}
2361
+ tar --overwrite -xzf ${Cs(n)} -C ${Cs(t.workdir)}`,"/work",e,900*1e3);let i=[`git config --global --add safe.directory ${Cs(t.workdir)}`,`git -C ${Cs(t.workdir)} init -q`,`git -C ${Cs(t.workdir)} config user.email solvergap@shipd-checks.local`,`git -C ${Cs(t.workdir)} config user.name shipd-checks-source`,`git -C ${Cs(t.workdir)} add -A`,`git -C ${Cs(t.workdir)} commit -q -m source --allow-empty`].join(`
2360
2362
  `);await oR(`set -eu
2361
- ${r}`,"/work",e,900*1e3);for(let i of t.runtimeCommands)Tki(i)||await oR(i,t.workdir,e,900*1e3)}function Ts(t){return`'${t.replace(/'/g,"'\\''")}'`}function KKe(t){let e=iY(t,"utf-8");v3(t,e.replace(/\r\n?/g,`
2362
- `),"utf-8")}async function wki(t,e,n){let r=I3.join(n1n,`solver_${t}`),i=I3.join(r,"test.patch"),s=[`mkdir -p ${Ts(r)}`,`tar --exclude=.git --exclude=solution.patch -cf - -C ${Ts(e.workdir)} . | tar --no-same-owner -xf - -C ${Ts(r)}`,`rm -rf ${Ts(I3.join(r,".git"))} ${Ts(I3.join(r,"solution.patch"))} ${Ts(i)}`,`git -C ${Ts(r)} init -q`,`git -C ${Ts(r)} config user.email solvergap@shipd-checks.local`,`git -C ${Ts(r)} config user.name shipd-checks-solver`,`git -C ${Ts(r)} add -A`,`git -C ${Ts(r)} commit -q -m baseline --allow-empty`,`cp ${Ts(I3.join(e.workdir,"test.patch"))} ${Ts(i)}`,`git -C ${Ts(r)} apply --recount ${Ts(i)}`,`chmod +x ${Ts(I3.join(r,"test.sh"))}`,`rm -f ${Ts(i)}`,`git -C ${Ts(r)} add -A`,`git -C ${Ts(r)} commit -q -m tests-applied --allow-empty`];await oR(`set -eu
2363
+ ${i}`,"/work",e,900*1e3);for(let s of t.runtimeCommands)Tki(s)||await oR(s,t.workdir,e,900*1e3)}function Cs(t){return`'${t.replace(/'/g,"'\\''")}'`}function KKe(t){let e=iY(t,"utf-8");v3(t,e.replace(/\r\n?/g,`
2364
+ `),"utf-8")}async function wki(t,e,n){let r=I3.join(n1n,`solver_${t}`),i=I3.join(r,"test.patch"),s=[`mkdir -p ${Cs(r)}`,`tar --exclude=.git --exclude=solution.patch -cf - -C ${Cs(e.workdir)} . | tar --no-same-owner -xf - -C ${Cs(r)}`,`rm -rf ${Cs(I3.join(r,".git"))} ${Cs(I3.join(r,"solution.patch"))} ${Cs(i)}`,`git -C ${Cs(r)} init -q`,`git -C ${Cs(r)} config user.email solvergap@shipd-checks.local`,`git -C ${Cs(r)} config user.name shipd-checks-solver`,`git -C ${Cs(r)} add -A`,`git -C ${Cs(r)} commit -q -m baseline --allow-empty`,`cp ${Cs(I3.join(e.workdir,"test.patch"))} ${Cs(i)}`,`git -C ${Cs(r)} apply --recount ${Cs(i)}`,`chmod +x ${Cs(I3.join(r,"test.sh"))}`,`rm -f ${Cs(i)}`,`git -C ${Cs(r)} add -A`,`git -C ${Cs(r)} commit -q -m tests-applied --allow-empty`];await oR(`set -eu
2363
2365
  ${s.join(`
2364
- `)}`,"/work",n,900*1e3);let o=Ng(r,"test.sh");vbe(o)&&KKe(o);let a=await oR(`git -C ${Ts(r)} rev-parse HEAD`,"/work",n,3e4),c=iY(Ng(e.workdir,"test.patch"),"utf-8");return{solverDir:r,testsAppliedCommit:a.stdout.trim(),testPatchPaths:vki(c)}}function vki(t){let e=new Set,n=/^diff --git "?a\/(.+?)"? "?b\/(.+?)"?$/gm;for(let r of t.matchAll(n))r[1]&&e.add(r[1]),r[2]&&e.add(r[2]);return[...e]}async function Rki(t,e,n){let r=Date.now(),i=ju("SHIPD_PROVIDER"),s=ju("SHIPD_MODEL_ID"),o=ju("SHIPD_THINKING_LEVEL"),a=Number.parseInt(ju("SHIPD_TIMEOUT_MINUTES"),10),c=WBe(i,s);if(!c)return{index:t,status:"error",passed:!1,diff:"",testOutputTail:`Could not resolve model ${i}/${s}.`,error:`Could not resolve model ${i}/${s}.`,durationMs:Date.now()-r,totalTests:null,failedTests:null};let u="error",l=[];try{let b=Bs.inMemory(),E;try{({session:E}=await d3({cwd:e.solverDir,agentDir:nY,model:c,thinkingLevel:o==="off"?void 0:o,tools:["read","grep","find","ls","write","edit","bash"],sessionManager:b}));let _=E.prompt(zkn());_.catch(()=>{});let x,S=new Promise((T,v)=>{x=setTimeout(()=>v(new Error("__SHIPD_SOLVER_TIMEOUT__")),a*60*1e3)});try{await Promise.race([_,S]),u="done"}catch(T){if(T instanceof Error&&T.message==="__SHIPD_SOLVER_TIMEOUT__")u="timedOut",await E.abort().catch(()=>{});else throw T}finally{x&&clearTimeout(x)}}finally{if(l=b.getEntries(),E)try{E.dispose()}catch{}}}catch(b){return{index:t,status:"error",passed:!1,diff:"",testOutputTail:b instanceof Error?b.message:String(b),error:b instanceof Error?b.message:String(b),durationMs:Date.now()-r,totalTests:null,failedTests:null,trajectory:l}}let p=[...e.testPatchPaths,"agent_prompt.md"].map(b=>`:(exclude)${b}`),d=await rY(`git add -A && git diff --cached ${Ts(e.testsAppliedCommit)} -- . ${p.map(Ts).join(" ")}`,e.solverDir,n,3e4),m=Ng(e.solverDir,"test_output.xml"),h=await rY(`bash test.sh --output_path ${Ts(m)} new`,e.solverDir,n,(a+5)*60*1e3),f=`${h.stdout}
2366
+ `)}`,"/work",n,900*1e3);let o=Ng(r,"test.sh");vbe(o)&&KKe(o);let a=await oR(`git -C ${Cs(r)} rev-parse HEAD`,"/work",n,3e4),c=iY(Ng(e.workdir,"test.patch"),"utf-8");return{solverDir:r,testsAppliedCommit:a.stdout.trim(),testPatchPaths:vki(c)}}function vki(t){let e=new Set,n=/^diff --git "?a\/(.+?)"? "?b\/(.+?)"?$/gm;for(let r of t.matchAll(n))r[1]&&e.add(r[1]),r[2]&&e.add(r[2]);return[...e]}async function Rki(t,e,n){let r=Date.now(),i=ju("SHIPD_PROVIDER"),s=ju("SHIPD_MODEL_ID"),o=ju("SHIPD_THINKING_LEVEL"),a=Number.parseInt(ju("SHIPD_TIMEOUT_MINUTES"),10),c=WBe(i,s);if(!c)return{index:t,status:"error",passed:!1,diff:"",testOutputTail:`Could not resolve model ${i}/${s}.`,error:`Could not resolve model ${i}/${s}.`,durationMs:Date.now()-r,totalTests:null,failedTests:null};let u="error",l=[];try{let b=Bs.inMemory(),E;try{({session:E}=await d3({cwd:e.solverDir,agentDir:nY,model:c,thinkingLevel:o==="off"?void 0:o,tools:["read","grep","find","ls","write","edit","bash"],sessionManager:b}));let _=E.prompt(zkn());_.catch(()=>{});let x,S=new Promise((T,v)=>{x=setTimeout(()=>v(new Error("__SHIPD_SOLVER_TIMEOUT__")),a*60*1e3)});try{await Promise.race([_,S]),u="done"}catch(T){if(T instanceof Error&&T.message==="__SHIPD_SOLVER_TIMEOUT__")u="timedOut",await E.abort().catch(()=>{});else throw T}finally{x&&clearTimeout(x)}}finally{if(l=b.getEntries(),E)try{E.dispose()}catch{}}}catch(b){return{index:t,status:"error",passed:!1,diff:"",testOutputTail:b instanceof Error?b.message:String(b),error:b instanceof Error?b.message:String(b),durationMs:Date.now()-r,totalTests:null,failedTests:null,trajectory:l}}let p=[...e.testPatchPaths,"agent_prompt.md"].map(b=>`:(exclude)${b}`),d=await rY(`git add -A && git diff --cached ${Cs(e.testsAppliedCommit)} -- . ${p.map(Cs).join(" ")}`,e.solverDir,n,3e4),m=Ng(e.solverDir,"test_output.xml"),h=await rY(`bash test.sh --output_path ${Cs(m)} new`,e.solverDir,n,(a+5)*60*1e3),f=`${h.stdout}
2365
2367
  ${h.stderr}`.trim();v3(Ng(e.solverDir,"test_output.txt"),f,"utf-8"),v3(Ng(e.solverDir,"trajectory.json"),`${JSON.stringify(l,null,2)}
2366
2368
  `,"utf-8");let A=kki(m),y=u==="done"?"ok":u;return{index:t,status:y,passed:y==="ok"&&h.code===0,diff:d.code===0?d.stdout:"",testOutputTail:yki(f),durationMs:Date.now()-r,totalTests:A.totalTests,failedTests:A.failedTests,trajectory:l}}function kki(t){try{let e=iY(t,"utf-8").match(/<testsuites\b[^>]*>/i)?.[0];if(!e)return{totalTests:null,failedTests:null};let n=o=>Number.parseInt(e.match(new RegExp(`\\b${o}="(\\d+)"`,"i"))?.[1]??"",10),r=n("tests"),i=n("failures"),s=n("errors");return{totalTests:Number.isFinite(r)?r:null,failedTests:Number.isFinite(i)?i+(Number.isFinite(s)?s:0):null}}catch{return{totalTests:null,failedTests:null}}}async function Pki(){let t=bki(),e=process.env.SHIPD_RESULT_PUT_URL??"",n=process.env.SHIPD_RESULT_GET_URL??"",r=ju("SHIPD_RESOURCE_PROFILE");w3=new Sbe(r),w3.start();let i=await s1n(n),s=new Map((i?.results??[]).map(y=>[y.index,y])),o=Eki(),a=_ki(o);t==="solver"&&(Ibe(nY,{recursive:!0}),R3()?await i1n(ju("SHIPD_S3_BUCKET"),ju("SHIPD_S3_AUTH_KEY"),Ng(nY,"auth.json")):await r1n(ju("SHIPD_AUTH_URL"),Ng(nY,"auth.json")),v3(Ng(nY,"settings.json"),JSON.stringify({shellPath:"/bin/bash"}),"utf-8")),Ibe("/work",{recursive:!0}),await Iki(o,a);let c=Ng(o.workdir,"test.patch"),u=Ng(o.workdir,"solution.patch");if(vbe(c)&&KKe(c),vbe(u)&&KKe(u),t==="patch-precheck"){let y=Number.parseInt(ju("SHIPD_TIMEOUT_MINUTES"),10),b=await Cki(o,a,y),E=w3.stop();await wbe(e,{complete:!0,results:[],precheck:b,resourceUsage:E});return}let l=Math.max(1,Number.parseInt(ju("SHIPD_SOLVER_COUNT"),10));Ibe(n1n,{recursive:!0});let p=Array.from({length:l},(y,b)=>b+1).filter(y=>!s.has(y)),d=[];for(let y of p)d.push(await wki(y,o,a));let m=Promise.resolve(),h=y=>{s.set(y.index,y);let b=[...s.values()].sort((E,_)=>E.index-_.index);return m=m.then(()=>wbe(e,{complete:!1,results:b,resourceUsage:w3?.snapshot()})),m};await Promise.all(d.map(async(y,b)=>{let E=p[b];if(E===void 0)throw new Error("Fargate solver workspace index mismatch.");let _=await Rki(E,y,a);await h(_)})),await m;let f=[...s.values()].sort((y,b)=>y.index-b.index),A=w3?.stop();await wbe(e,{complete:!0,results:f,resourceUsage:A})}async function s1n(t){try{if(R3()){let r=await(await YKe().send(new QO.GetObjectCommand({Bucket:ju("SHIPD_S3_BUCKET"),Key:ju("SHIPD_S3_RESULT_KEY")}))).Body?.transformToString();return r?JSON.parse(r):void 0}let e=await fetch(t);return e.ok?await e.json():void 0}catch{return}}Pki().catch(async t=>{let e=t instanceof Error?t.message:String(t),n=w3?.stop();try{let r=process.env.SHIPD_RESULT_PUT_URL??"",i=process.env.SHIPD_RESULT_GET_URL??"",s=i||R3()?await s1n(i):void 0;(r||R3())&&await wbe(r,{complete:!0,results:s?.results??[],resourceUsage:n,error:e})}catch{}console.error(e),process.exitCode=1});