updates 14.2.4 → 14.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/updates.js +16 -16
  2. package/package.json +2 -2
package/bin/updates.js CHANGED
@@ -1,31 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  import {createRequire} from 'module';const require = createRequire(import.meta.url);
3
- var fd=Object.create;var Ms=Object.defineProperty;var dd=Object.getOwnPropertyDescriptor;var pd=Object.getOwnPropertyNames;var md=Object.getPrototypeOf,gd=Object.prototype.hasOwnProperty;var ye=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var Cr=(t,e)=>()=>(t&&(e=t(t=0)),e);var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),bd=(t,e)=>{for(var r in e)Ms(t,r,{get:e[r],enumerable:!0})},yd=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of pd(e))!gd.call(t,i)&&i!==r&&Ms(t,i,{get:()=>e[i],enumerable:!(n=dd(e,i))||n.enumerable});return t};var Re=(t,e,r)=>(r=t!=null?fd(md(t)):{},yd(e||!t||!t.__esModule?Ms(r,"default",{value:t,enumerable:!0}):r,t));var fa=C((Cy,ha)=>{"use strict";var ks=ye("https"),js=ye("http"),{URL:ca}=ye("url"),Vs=class extends js.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new ca(r):r,this.proxyRequestOptions=n||{}}createConnection(e,r){let n={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");n.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(n.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?js:ks).request(n);i.once("connect",(a,u,h)=>{i.removeAllListeners(),u.removeAllListeners(),a.statusCode===200?r(null,u):(u.destroy(),r(new Error(`Bad response: ${a.statusCode}`),null))}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",a=>{i.removeAllListeners(),r(a,null)}),i.end()}},Gs=class extends ks.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new ca(r):r,this.proxyRequestOptions=n||{}}createConnection(e,r){let n={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");n.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(n.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?js:ks).request(n);i.once("connect",(a,u,h)=>{if(i.removeAllListeners(),u.removeAllListeners(),a.statusCode===200){let f=super.createConnection({...e,socket:u});r(null,f)}else u.destroy(),r(new Error(`Bad response: ${a.statusCode}`),null)}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",a=>{i.removeAllListeners(),r(a,null)}),i.end()}};ha.exports={HttpProxyAgent:Vs,HttpsProxyAgent:Gs}});var ga=C(ma=>{"use strict";var _d=ye("url").parse,wd={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Sd=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function Rd(t){var e=typeof t=="string"?_d(t):t||{},r=e.protocol,n=e.host,i=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),i=parseInt(i)||wd[r]||0,!Ed(n,i)))return"";var a=Mt("npm_config_"+r+"_proxy")||Mt(r+"_proxy")||Mt("npm_config_proxy")||Mt("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function Ed(t,e){var r=(Mt("npm_config_no_proxy")||Mt("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var i=n.match(/^(.+):(\d+)$/),a=i?i[1]:n,u=i?parseInt(i[2]):0;return u&&u!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!Sd.call(t,a)):t!==a}):!0}function Mt(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}ma.getProxyForUrl=Rd});var Xs=C((Dy,Sa)=>{"use strict";function vd(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var n=e[e.length-1];return n in r}function _a(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function wa(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}Sa.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(T){r.bools[T]=!0});var n={};function i(T){return n[T].some(function(L){return r.bools[L]})}Object.keys(e.alias||{}).forEach(function(T){n[T]=[].concat(e.alias[T]),n[T].forEach(function(L){n[L]=[T].concat(n[T].filter(function(D){return L!==D}))})}),[].concat(e.string).filter(Boolean).forEach(function(T){r.strings[T]=!0,n[T]&&[].concat(n[T]).forEach(function(L){r.strings[L]=!0})});var a=e.default||{},u={_:[]};function h(T,L){return r.allBools&&/^--[^=]+$/.test(L)||r.strings[T]||r.bools[T]||n[T]}function f(T,L,D){for(var H=T,V=0;V<L.length-1;V++){var K=L[V];if(wa(H,K))return;H[K]===void 0&&(H[K]={}),(H[K]===Object.prototype||H[K]===Number.prototype||H[K]===String.prototype)&&(H[K]={}),H[K]===Array.prototype&&(H[K]=[]),H=H[K]}var ee=L[L.length-1];wa(H,ee)||((H===Object.prototype||H===Number.prototype||H===String.prototype)&&(H={}),H===Array.prototype&&(H=[]),H[ee]===void 0||r.bools[ee]||typeof H[ee]=="boolean"?H[ee]=D:Array.isArray(H[ee])?H[ee].push(D):H[ee]=[H[ee],D])}function c(T,L,D){if(!(D&&r.unknownFn&&!h(T,D)&&r.unknownFn(D)===!1)){var H=!r.strings[T]&&_a(L)?Number(L):L;f(u,T.split("."),H),(n[T]||[]).forEach(function(V){f(u,V.split("."),H)})}}Object.keys(r.bools).forEach(function(T){c(T,a[T]===void 0?!1:a[T])});var g=[];t.indexOf("--")!==-1&&(g=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var b=0;b<t.length;b++){var m=t[b],p,_;if(/^--.+=/.test(m)){var R=m.match(/^--([^=]+)=([\s\S]*)$/);p=R[1];var E=R[2];r.bools[p]&&(E=E!=="false"),c(p,E,m)}else if(/^--no-.+/.test(m))p=m.match(/^--no-(.+)/)[1],c(p,!1,m);else if(/^--.+/.test(m))p=m.match(/^--(.+)/)[1],_=t[b+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!r.bools[p]&&!r.allBools&&(!n[p]||!i(p))?(c(p,_,m),b+=1):/^(true|false)$/.test(_)?(c(p,_==="true",m),b+=1):c(p,r.strings[p]?"":!0,m);else if(/^-[^-]+/.test(m)){for(var A=m.slice(1,-1).split(""),N=!1,$=0;$<A.length;$++){if(_=m.slice($+2),_==="-"){c(A[$],_,m);continue}if(/[A-Za-z]/.test(A[$])&&_[0]==="="){c(A[$],_.slice(1),m),N=!0;break}if(/[A-Za-z]/.test(A[$])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){c(A[$],_,m),N=!0;break}if(A[$+1]&&A[$+1].match(/\W/)){c(A[$],m.slice($+2),m),N=!0;break}else c(A[$],r.strings[A[$]]?"":!0,m)}p=m.slice(-1)[0],!N&&p!=="-"&&(t[b+1]&&!/^(-|--)[^-]/.test(t[b+1])&&!r.bools[p]&&(!n[p]||!i(p))?(c(p,t[b+1],m),b+=1):t[b+1]&&/^(true|false)$/.test(t[b+1])?(c(p,t[b+1]==="true",m),b+=1):c(p,r.strings[p]?"":!0,m))}else if((!r.unknownFn||r.unknownFn(m)!==!1)&&u._.push(r.strings._||!_a(m)?m:Number(m)),e.stopEarly){u._.push.apply(u._,t.slice(b+1));break}}return Object.keys(a).forEach(function(T){vd(u,T.split("."))||(f(u,T.split("."),a[T]),(n[T]||[]).forEach(function(L){f(u,L.split("."),a[T])}))}),e["--"]?u["--"]=g.slice():g.forEach(function(T){u._.push(T)}),u}});var Ta=C((On,Ea)=>{(function(t,e){typeof On=="object"&&typeof Ea<"u"?e(On):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(On,function(t){"use strict";let e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:s=>`Symbol(${s})`;function r(){}function n(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}let i=n();function a(s){return typeof s=="object"&&s!==null||typeof s=="function"}let u=r,h=Promise,f=Promise.prototype.then,c=Promise.resolve.bind(h),g=Promise.reject.bind(h);function b(s){return new h(s)}function m(s){return c(s)}function p(s){return g(s)}function _(s,o,l){return f.call(s,o,l)}function R(s,o,l){_(_(s,o,l),void 0,u)}function E(s,o){R(s,o)}function A(s,o){R(s,void 0,o)}function N(s,o,l){return _(s,o,l)}function $(s){_(s,void 0,u)}let T=(()=>{let s=i&&i.queueMicrotask;if(typeof s=="function")return s;let o=m(void 0);return l=>_(o,l)})();function L(s,o,l){if(typeof s!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(s,o,l)}function D(s,o,l){try{return m(L(s,o,l))}catch(d){return p(d)}}let H=16384;class V{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(o){let l=this._back,d=l;l._elements.length===H-1&&(d={_elements:[],_next:void 0}),l._elements.push(o),d!==l&&(this._back=d,l._next=d),++this._size}shift(){let o=this._front,l=o,d=this._cursor,y=d+1,w=o._elements,S=w[d];return y===H&&(l=o._next,y=0),--this._size,this._cursor=y,o!==l&&(this._front=l),w[d]=void 0,S}forEach(o){let l=this._cursor,d=this._front,y=d._elements;for(;(l!==y.length||d._next!==void 0)&&!(l===y.length&&(d=d._next,y=d._elements,l=0,y.length===0));)o(y[l]),++l}peek(){let o=this._front,l=this._cursor;return o._elements[l]}}function K(s,o){s._ownerReadableStream=o,o._reader=s,o._state==="readable"?xt(s):o._state==="closed"?Z(s):v(s,o._storedError)}function ee(s,o){let l=s._ownerReadableStream;return Pe(l,o)}function oe(s){s._ownerReadableStream._state==="readable"?J(s,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):le(s,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),s._ownerReadableStream._reader=void 0,s._ownerReadableStream=void 0}function Be(s){return new TypeError("Cannot "+s+" a stream using a released reader")}function xt(s){s._closedPromise=b((o,l)=>{s._closedPromise_resolve=o,s._closedPromise_reject=l})}function v(s,o){xt(s),J(s,o)}function Z(s){xt(s),Ke(s)}function J(s,o){s._closedPromise_reject!==void 0&&($(s._closedPromise),s._closedPromise_reject(o),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0)}function le(s,o){v(s,o)}function Ke(s){s._closedPromise_resolve!==void 0&&(s._closedPromise_resolve(void 0),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0)}let Ot=e("[[AbortSteps]]"),Xe=e("[[ErrorSteps]]"),we=e("[[CancelSteps]]"),ge=e("[[PullSteps]]"),It=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},Me=Math.trunc||function(s){return s<0?Math.ceil(s):Math.floor(s)};function Qr(s){return typeof s=="object"||typeof s=="function"}function Ie(s,o){if(s!==void 0&&!Qr(s))throw new TypeError(`${o} is not an object.`)}function Le(s,o){if(typeof s!="function")throw new TypeError(`${o} is not a function.`)}function kh(s){return typeof s=="object"&&s!==null||typeof s=="function"}function eo(s,o){if(!kh(s))throw new TypeError(`${o} is not an object.`)}function We(s,o,l){if(s===void 0)throw new TypeError(`Parameter ${o} is required in '${l}'.`)}function ms(s,o,l){if(s===void 0)throw new TypeError(`${o} is required in '${l}'.`)}function gs(s){return Number(s)}function to(s){return s===0?0:s}function jh(s){return to(Me(s))}function ro(s,o){let d=Number.MAX_SAFE_INTEGER,y=Number(s);if(y=to(y),!It(y))throw new TypeError(`${o} is not a finite number`);if(y=jh(y),y<0||y>d)throw new TypeError(`${o} is outside the accepted range of 0 to ${d}, inclusive`);return!It(y)||y===0?0:y}function bs(s,o){if(!rt(s))throw new TypeError(`${o} is not a ReadableStream.`)}function Lt(s){return new hr(s)}function no(s,o){s._reader._readRequests.push(o)}function ys(s,o,l){let y=s._reader._readRequests.shift();l?y._closeSteps():y._chunkSteps(o)}function Kr(s){return s._reader._readRequests.length}function so(s){let o=s._reader;return!(o===void 0||!Ze(o))}class hr{constructor(o){if(We(o,1,"ReadableStreamDefaultReader"),bs(o,"First parameter"),nt(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");K(this,o),this._readRequests=new V}get closed(){return Ze(this)?this._closedPromise:p(Xr("closed"))}cancel(o=void 0){return Ze(this)?this._ownerReadableStream===void 0?p(Be("cancel")):ee(this,o):p(Xr("cancel"))}read(){if(!Ze(this))return p(Xr("read"));if(this._ownerReadableStream===void 0)return p(Be("read from"));let o,l,d=b((w,S)=>{o=w,l=S});return fr(this,{_chunkSteps:w=>o({value:w,done:!1}),_closeSteps:()=>o({value:void 0,done:!0}),_errorSteps:w=>l(w)}),d}releaseLock(){if(!Ze(this))throw Xr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(hr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(hr.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Ze(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readRequests")?!1:s instanceof hr}function fr(s,o){let l=s._ownerReadableStream;l._disturbed=!0,l._state==="closed"?o._closeSteps():l._state==="errored"?o._errorSteps(l._storedError):l._readableStreamController[ge](o)}function Xr(s){return new TypeError(`ReadableStreamDefaultReader.prototype.${s} can only be used on a ReadableStreamDefaultReader`)}let io=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class oo{constructor(o,l){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=o,this._preventCancel=l}next(){let o=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?N(this._ongoingPromise,o,o):o(),this._ongoingPromise}return(o){let l=()=>this._returnSteps(o);return this._ongoingPromise?N(this._ongoingPromise,l,l):l()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let o=this._reader;if(o._ownerReadableStream===void 0)return p(Be("iterate"));let l,d,y=b((S,x)=>{l=S,d=x});return fr(o,{_chunkSteps:S=>{this._ongoingPromise=void 0,T(()=>l({value:S,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(o),l({value:void 0,done:!0})},_errorSteps:S=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(o),d(S)}}),y}_returnSteps(o){if(this._isFinished)return Promise.resolve({value:o,done:!0});this._isFinished=!0;let l=this._reader;if(l._ownerReadableStream===void 0)return p(Be("finish iterating"));if(!this._preventCancel){let d=ee(l,o);return oe(l),N(d,()=>({value:o,done:!0}))}return oe(l),m({value:o,done:!0})}}let ao={next(){return lo(this)?this._asyncIteratorImpl.next():p(uo("next"))},return(s){return lo(this)?this._asyncIteratorImpl.return(s):p(uo("return"))}};io!==void 0&&Object.setPrototypeOf(ao,io);function Vh(s,o){let l=Lt(s),d=new oo(l,o),y=Object.create(ao);return y._asyncIteratorImpl=d,y}function lo(s){if(!a(s)||!Object.prototype.hasOwnProperty.call(s,"_asyncIteratorImpl"))return!1;try{return s._asyncIteratorImpl instanceof oo}catch{return!1}}function uo(s){return new TypeError(`ReadableStreamAsyncIterator.${s} can only be used on a ReadableSteamAsyncIterator`)}let co=Number.isNaN||function(s){return s!==s};function dr(s){return s.slice()}function ho(s,o,l,d,y){new Uint8Array(s).set(new Uint8Array(l,d,y),o)}function Ey(s){return s}function Zr(s){return!1}function fo(s,o,l){if(s.slice)return s.slice(o,l);let d=l-o,y=new ArrayBuffer(d);return ho(y,0,s,o,d),y}function Gh(s){return!(typeof s!="number"||co(s)||s<0)}function po(s){let o=fo(s.buffer,s.byteOffset,s.byteOffset+s.byteLength);return new Uint8Array(o)}function _s(s){let o=s._queue.shift();return s._queueTotalSize-=o.size,s._queueTotalSize<0&&(s._queueTotalSize=0),o.value}function ws(s,o,l){if(!Gh(l)||l===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");s._queue.push({value:o,size:l}),s._queueTotalSize+=l}function Yh(s){return s._queue.peek().value}function Je(s){s._queue=new V,s._queueTotalSize=0}class pr{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ss(this))throw As("view");return this._view}respond(o){if(!Ss(this))throw As("respond");if(We(o,1,"respond"),o=ro(o,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Zr(this._view.buffer),nn(this._associatedReadableByteStreamController,o)}respondWithNewView(o){if(!Ss(this))throw As("respondWithNewView");if(We(o,1,"respondWithNewView"),!ArrayBuffer.isView(o))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");Zr(o.buffer),sn(this._associatedReadableByteStreamController,o)}}Object.defineProperties(pr.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(pr.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class $t{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ht(this))throw gr("byobRequest");return Ts(this)}get desiredSize(){if(!ht(this))throw gr("desiredSize");return Ro(this)}close(){if(!ht(this))throw gr("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let o=this._controlledReadableByteStream._state;if(o!=="readable")throw new TypeError(`The stream (in ${o} state) is not in the readable state and cannot be closed`);mr(this)}enqueue(o){if(!ht(this))throw gr("enqueue");if(We(o,1,"enqueue"),!ArrayBuffer.isView(o))throw new TypeError("chunk must be an array buffer view");if(o.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(o.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 l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be enqueued to`);rn(this,o)}error(o=void 0){if(!ht(this))throw gr("error");$e(this,o)}[we](o){mo(this),Je(this);let l=this._cancelAlgorithm(o);return tn(this),l}[ge](o){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let y=this._queue.shift();this._queueTotalSize-=y.byteLength,_o(this);let w=new Uint8Array(y.buffer,y.byteOffset,y.byteLength);o._chunkSteps(w);return}let d=this._autoAllocateChunkSize;if(d!==void 0){let y;try{y=new ArrayBuffer(d)}catch(S){o._errorSteps(S);return}let w={buffer:y,bufferByteLength:d,byteOffset:0,byteLength:d,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(w)}no(l,o),ft(this)}}Object.defineProperties($t.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty($t.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ht(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableByteStream")?!1:s instanceof $t}function Ss(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_associatedReadableByteStreamController")?!1:s instanceof pr}function ft(s){if(!Zh(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let l=s._pullAlgorithm();R(l,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,ft(s))},d=>{$e(s,d)})}function mo(s){Es(s),s._pendingPullIntos=new V}function Rs(s,o){let l=!1;s._state==="closed"&&(l=!0);let d=go(o);o.readerType==="default"?ys(s,d,l):tf(s,d,l)}function go(s){let o=s.bytesFilled,l=s.elementSize;return new s.viewConstructor(s.buffer,s.byteOffset,o/l)}function Jr(s,o,l,d){s._queue.push({buffer:o,byteOffset:l,byteLength:d}),s._queueTotalSize+=d}function bo(s,o){let l=o.elementSize,d=o.bytesFilled-o.bytesFilled%l,y=Math.min(s._queueTotalSize,o.byteLength-o.bytesFilled),w=o.bytesFilled+y,S=w-w%l,x=y,B=!1;S>d&&(x=S-o.bytesFilled,B=!0);let U=s._queue;for(;x>0;){let M=U.peek(),W=Math.min(x,M.byteLength),te=o.byteOffset+o.bytesFilled;ho(o.buffer,te,M.buffer,M.byteOffset,W),M.byteLength===W?U.shift():(M.byteOffset+=W,M.byteLength-=W),s._queueTotalSize-=W,yo(s,W,o),x-=W}return B}function yo(s,o,l){l.bytesFilled+=o}function _o(s){s._queueTotalSize===0&&s._closeRequested?(tn(s),Tr(s._controlledReadableByteStream)):ft(s)}function Es(s){s._byobRequest!==null&&(s._byobRequest._associatedReadableByteStreamController=void 0,s._byobRequest._view=null,s._byobRequest=null)}function wo(s){for(;s._pendingPullIntos.length>0;){if(s._queueTotalSize===0)return;let o=s._pendingPullIntos.peek();bo(s,o)&&(en(s),Rs(s._controlledReadableByteStream,o))}}function Qh(s,o,l){let d=s._controlledReadableByteStream,y=1;o.constructor!==DataView&&(y=o.constructor.BYTES_PER_ELEMENT);let w=o.constructor,S=o.buffer,x={buffer:S,bufferByteLength:S.byteLength,byteOffset:o.byteOffset,byteLength:o.byteLength,bytesFilled:0,elementSize:y,viewConstructor:w,readerType:"byob"};if(s._pendingPullIntos.length>0){s._pendingPullIntos.push(x),Ao(d,l);return}if(d._state==="closed"){let B=new w(x.buffer,x.byteOffset,0);l._closeSteps(B);return}if(s._queueTotalSize>0){if(bo(s,x)){let B=go(x);_o(s),l._chunkSteps(B);return}if(s._closeRequested){let B=new TypeError("Insufficient bytes to fill elements in the given buffer");$e(s,B),l._errorSteps(B);return}}s._pendingPullIntos.push(x),Ao(d,l),ft(s)}function Kh(s,o){let l=s._controlledReadableByteStream;if(Cs(l))for(;Co(l)>0;){let d=en(s);Rs(l,d)}}function Xh(s,o,l){if(yo(s,o,l),l.bytesFilled<l.elementSize)return;en(s);let d=l.bytesFilled%l.elementSize;if(d>0){let y=l.byteOffset+l.bytesFilled,w=fo(l.buffer,y-d,y);Jr(s,w,0,w.byteLength)}l.bytesFilled-=d,Rs(s._controlledReadableByteStream,l),wo(s)}function So(s,o){let l=s._pendingPullIntos.peek();Es(s),s._controlledReadableByteStream._state==="closed"?Kh(s):Xh(s,o,l),ft(s)}function en(s){return s._pendingPullIntos.shift()}function Zh(s){let o=s._controlledReadableByteStream;return o._state!=="readable"||s._closeRequested||!s._started?!1:!!(so(o)&&Kr(o)>0||Cs(o)&&Co(o)>0||Ro(s)>0)}function tn(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0}function mr(s){let o=s._controlledReadableByteStream;if(!(s._closeRequested||o._state!=="readable")){if(s._queueTotalSize>0){s._closeRequested=!0;return}if(s._pendingPullIntos.length>0&&s._pendingPullIntos.peek().bytesFilled>0){let d=new TypeError("Insufficient bytes to fill elements in the given buffer");throw $e(s,d),d}tn(s),Tr(o)}}function rn(s,o){let l=s._controlledReadableByteStream;if(s._closeRequested||l._state!=="readable")return;let d=o.buffer,y=o.byteOffset,w=o.byteLength,S=d;if(s._pendingPullIntos.length>0){let x=s._pendingPullIntos.peek();Zr(x.buffer),x.buffer=x.buffer}if(Es(s),so(l))if(Kr(l)===0)Jr(s,S,y,w);else{s._pendingPullIntos.length>0&&en(s);let x=new Uint8Array(S,y,w);ys(l,x,!1)}else Cs(l)?(Jr(s,S,y,w),wo(s)):Jr(s,S,y,w);ft(s)}function $e(s,o){let l=s._controlledReadableByteStream;l._state==="readable"&&(mo(s),Je(s),tn(s),Ko(l,o))}function Ts(s){if(s._byobRequest===null&&s._pendingPullIntos.length>0){let o=s._pendingPullIntos.peek(),l=new Uint8Array(o.buffer,o.byteOffset+o.bytesFilled,o.byteLength-o.bytesFilled),d=Object.create(pr.prototype);ef(d,s,l),s._byobRequest=d}return s._byobRequest}function Ro(s){let o=s._controlledReadableByteStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function nn(s,o){let l=s._pendingPullIntos.peek();if(s._controlledReadableByteStream._state==="closed"){if(o!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(o===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(l.bytesFilled+o>l.byteLength)throw new RangeError("bytesWritten out of range")}l.buffer=l.buffer,So(s,o)}function sn(s,o){let l=s._pendingPullIntos.peek();if(s._controlledReadableByteStream._state==="closed"){if(o.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(o.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(l.byteOffset+l.bytesFilled!==o.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(l.bufferByteLength!==o.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(l.bytesFilled+o.byteLength>l.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let y=o.byteLength;l.buffer=o.buffer,So(s,y)}function Eo(s,o,l,d,y,w,S){o._controlledReadableByteStream=s,o._pullAgain=!1,o._pulling=!1,o._byobRequest=null,o._queue=o._queueTotalSize=void 0,Je(o),o._closeRequested=!1,o._started=!1,o._strategyHWM=w,o._pullAlgorithm=d,o._cancelAlgorithm=y,o._autoAllocateChunkSize=S,o._pendingPullIntos=new V,s._readableStreamController=o;let x=l();R(m(x),()=>{o._started=!0,ft(o)},B=>{$e(o,B)})}function Jh(s,o,l){let d=Object.create($t.prototype),y=()=>{},w=()=>m(void 0),S=()=>m(void 0);o.start!==void 0&&(y=()=>o.start(d)),o.pull!==void 0&&(w=()=>o.pull(d)),o.cancel!==void 0&&(S=B=>o.cancel(B));let x=o.autoAllocateChunkSize;if(x===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Eo(s,d,y,w,S,l,x)}function ef(s,o,l){s._associatedReadableByteStreamController=o,s._view=l}function As(s){return new TypeError(`ReadableStreamBYOBRequest.prototype.${s} can only be used on a ReadableStreamBYOBRequest`)}function gr(s){return new TypeError(`ReadableByteStreamController.prototype.${s} can only be used on a ReadableByteStreamController`)}function To(s){return new br(s)}function Ao(s,o){s._reader._readIntoRequests.push(o)}function tf(s,o,l){let y=s._reader._readIntoRequests.shift();l?y._closeSteps(o):y._chunkSteps(o)}function Co(s){return s._reader._readIntoRequests.length}function Cs(s){let o=s._reader;return!(o===void 0||!dt(o))}class br{constructor(o){if(We(o,1,"ReadableStreamBYOBReader"),bs(o,"First parameter"),nt(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ht(o._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");K(this,o),this._readIntoRequests=new V}get closed(){return dt(this)?this._closedPromise:p(on("closed"))}cancel(o=void 0){return dt(this)?this._ownerReadableStream===void 0?p(Be("cancel")):ee(this,o):p(on("cancel"))}read(o){if(!dt(this))return p(on("read"));if(!ArrayBuffer.isView(o))return p(new TypeError("view must be an array buffer view"));if(o.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(o.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(Zr(o.buffer),this._ownerReadableStream===void 0)return p(Be("read from"));let l,d,y=b((S,x)=>{l=S,d=x});return vo(this,o,{_chunkSteps:S=>l({value:S,done:!1}),_closeSteps:S=>l({value:S,done:!0}),_errorSteps:S=>d(S)}),y}releaseLock(){if(!dt(this))throw on("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(br.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(br.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function dt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readIntoRequests")?!1:s instanceof br}function vo(s,o,l){let d=s._ownerReadableStream;d._disturbed=!0,d._state==="errored"?l._errorSteps(d._storedError):Qh(d._readableStreamController,o,l)}function on(s){return new TypeError(`ReadableStreamBYOBReader.prototype.${s} can only be used on a ReadableStreamBYOBReader`)}function yr(s,o){let{highWaterMark:l}=s;if(l===void 0)return o;if(co(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function an(s){let{size:o}=s;return o||(()=>1)}function ln(s,o){Ie(s,o);let l=s==null?void 0:s.highWaterMark,d=s==null?void 0:s.size;return{highWaterMark:l===void 0?void 0:gs(l),size:d===void 0?void 0:rf(d,`${o} has member 'size' that`)}}function rf(s,o){return Le(s,o),l=>gs(s(l))}function nf(s,o){Ie(s,o);let l=s==null?void 0:s.abort,d=s==null?void 0:s.close,y=s==null?void 0:s.start,w=s==null?void 0:s.type,S=s==null?void 0:s.write;return{abort:l===void 0?void 0:sf(l,s,`${o} has member 'abort' that`),close:d===void 0?void 0:of(d,s,`${o} has member 'close' that`),start:y===void 0?void 0:af(y,s,`${o} has member 'start' that`),write:S===void 0?void 0:lf(S,s,`${o} has member 'write' that`),type:w}}function sf(s,o,l){return Le(s,l),d=>D(s,o,[d])}function of(s,o,l){return Le(s,l),()=>D(s,o,[])}function af(s,o,l){return Le(s,l),d=>L(s,o,[d])}function lf(s,o,l){return Le(s,l),(d,y)=>D(s,o,[d,y])}function xo(s,o){if(!Pt(s))throw new TypeError(`${o} is not a WritableStream.`)}function uf(s){if(typeof s!="object"||s===null)return!1;try{return typeof s.aborted=="boolean"}catch{return!1}}let cf=typeof AbortController=="function";function hf(){if(cf)return new AbortController}class _r{constructor(o={},l={}){o===void 0?o=null:eo(o,"First parameter");let d=ln(l,"Second parameter"),y=nf(o,"First parameter");if(Io(this),y.type!==void 0)throw new RangeError("Invalid type is specified");let S=an(d),x=yr(d,1);Af(this,y,x,S)}get locked(){if(!Pt(this))throw dn("locked");return Nt(this)}abort(o=void 0){return Pt(this)?Nt(this)?p(new TypeError("Cannot abort a stream that already has a writer")):un(this,o):p(dn("abort"))}close(){return Pt(this)?Nt(this)?p(new TypeError("Cannot close a stream that already has a writer")):Fe(this)?p(new TypeError("Cannot close an already-closing stream")):Lo(this):p(dn("close"))}getWriter(){if(!Pt(this))throw dn("getWriter");return Oo(this)}}Object.defineProperties(_r.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(_r.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function Oo(s){return new wr(s)}function ff(s,o,l,d,y=1,w=()=>1){let S=Object.create(_r.prototype);Io(S);let x=Object.create(Dt.prototype);return Bo(S,x,s,o,l,d,y,w),S}function Io(s){s._state="writable",s._storedError=void 0,s._writer=void 0,s._writableStreamController=void 0,s._writeRequests=new V,s._inFlightWriteRequest=void 0,s._closeRequest=void 0,s._inFlightCloseRequest=void 0,s._pendingAbortRequest=void 0,s._backpressure=!1}function Pt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_writableStreamController")?!1:s instanceof _r}function Nt(s){return s._writer!==void 0}function un(s,o){var l;if(s._state==="closed"||s._state==="errored")return m(void 0);s._writableStreamController._abortReason=o,(l=s._writableStreamController._abortController)===null||l===void 0||l.abort();let d=s._state;if(d==="closed"||d==="errored")return m(void 0);if(s._pendingAbortRequest!==void 0)return s._pendingAbortRequest._promise;let y=!1;d==="erroring"&&(y=!0,o=void 0);let w=b((S,x)=>{s._pendingAbortRequest={_promise:void 0,_resolve:S,_reject:x,_reason:o,_wasAlreadyErroring:y}});return s._pendingAbortRequest._promise=w,y||xs(s,o),w}function Lo(s){let o=s._state;if(o==="closed"||o==="errored")return p(new TypeError(`The stream (in ${o} state) is not in the writable state and cannot be closed`));let l=b((y,w)=>{let S={_resolve:y,_reject:w};s._closeRequest=S}),d=s._writer;return d!==void 0&&s._backpressure&&o==="writable"&&Bs(d),Cf(s._writableStreamController),l}function df(s){return b((l,d)=>{let y={_resolve:l,_reject:d};s._writeRequests.push(y)})}function vs(s,o){if(s._state==="writable"){xs(s,o);return}Os(s)}function xs(s,o){let l=s._writableStreamController;s._state="erroring",s._storedError=o;let d=s._writer;d!==void 0&&Po(d,o),!yf(s)&&l._started&&Os(s)}function Os(s){s._state="errored",s._writableStreamController[Xe]();let o=s._storedError;if(s._writeRequests.forEach(y=>{y._reject(o)}),s._writeRequests=new V,s._pendingAbortRequest===void 0){cn(s);return}let l=s._pendingAbortRequest;if(s._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(o),cn(s);return}let d=s._writableStreamController[Ot](l._reason);R(d,()=>{l._resolve(),cn(s)},y=>{l._reject(y),cn(s)})}function pf(s){s._inFlightWriteRequest._resolve(void 0),s._inFlightWriteRequest=void 0}function mf(s,o){s._inFlightWriteRequest._reject(o),s._inFlightWriteRequest=void 0,vs(s,o)}function gf(s){s._inFlightCloseRequest._resolve(void 0),s._inFlightCloseRequest=void 0,s._state==="erroring"&&(s._storedError=void 0,s._pendingAbortRequest!==void 0&&(s._pendingAbortRequest._resolve(),s._pendingAbortRequest=void 0)),s._state="closed";let l=s._writer;l!==void 0&&zo(l)}function bf(s,o){s._inFlightCloseRequest._reject(o),s._inFlightCloseRequest=void 0,s._pendingAbortRequest!==void 0&&(s._pendingAbortRequest._reject(o),s._pendingAbortRequest=void 0),vs(s,o)}function Fe(s){return!(s._closeRequest===void 0&&s._inFlightCloseRequest===void 0)}function yf(s){return!(s._inFlightWriteRequest===void 0&&s._inFlightCloseRequest===void 0)}function _f(s){s._inFlightCloseRequest=s._closeRequest,s._closeRequest=void 0}function wf(s){s._inFlightWriteRequest=s._writeRequests.shift()}function cn(s){s._closeRequest!==void 0&&(s._closeRequest._reject(s._storedError),s._closeRequest=void 0);let o=s._writer;o!==void 0&&Ds(o,s._storedError)}function Is(s,o){let l=s._writer;l!==void 0&&o!==s._backpressure&&(o?Pf(l):Bs(l)),s._backpressure=o}class wr{constructor(o){if(We(o,1,"WritableStreamDefaultWriter"),xo(o,"First parameter"),Nt(o))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=o,o._writer=this;let l=o._state;if(l==="writable")!Fe(o)&&o._backpressure?mn(this):Mo(this),pn(this);else if(l==="erroring")Hs(this,o._storedError),pn(this);else if(l==="closed")Mo(this),Lf(this);else{let d=o._storedError;Hs(this,d),Uo(this,d)}}get closed(){return pt(this)?this._closedPromise:p(mt("closed"))}get desiredSize(){if(!pt(this))throw mt("desiredSize");if(this._ownerWritableStream===void 0)throw Sr("desiredSize");return Tf(this)}get ready(){return pt(this)?this._readyPromise:p(mt("ready"))}abort(o=void 0){return pt(this)?this._ownerWritableStream===void 0?p(Sr("abort")):Sf(this,o):p(mt("abort"))}close(){if(!pt(this))return p(mt("close"));let o=this._ownerWritableStream;return o===void 0?p(Sr("close")):Fe(o)?p(new TypeError("Cannot close an already-closing stream")):$o(this)}releaseLock(){if(!pt(this))throw mt("releaseLock");this._ownerWritableStream!==void 0&&No(this)}write(o=void 0){return pt(this)?this._ownerWritableStream===void 0?p(Sr("write to")):Do(this,o):p(mt("write"))}}Object.defineProperties(wr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(wr.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function pt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_ownerWritableStream")?!1:s instanceof wr}function Sf(s,o){let l=s._ownerWritableStream;return un(l,o)}function $o(s){let o=s._ownerWritableStream;return Lo(o)}function Rf(s){let o=s._ownerWritableStream,l=o._state;return Fe(o)||l==="closed"?m(void 0):l==="errored"?p(o._storedError):$o(s)}function Ef(s,o){s._closedPromiseState==="pending"?Ds(s,o):$f(s,o)}function Po(s,o){s._readyPromiseState==="pending"?Wo(s,o):Nf(s,o)}function Tf(s){let o=s._ownerWritableStream,l=o._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:Fo(o._writableStreamController)}function No(s){let o=s._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Po(s,l),Ef(s,l),o._writer=void 0,s._ownerWritableStream=void 0}function Do(s,o){let l=s._ownerWritableStream,d=l._writableStreamController,y=vf(d,o);if(l!==s._ownerWritableStream)return p(Sr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(Fe(l)||w==="closed")return p(new TypeError("The stream is closing or closed and cannot be written to"));if(w==="erroring")return p(l._storedError);let S=df(l);return xf(d,o,y),S}let Ho={};class Dt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Ls(this))throw Ns("abortReason");return this._abortReason}get signal(){if(!Ls(this))throw Ns("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(o=void 0){if(!Ls(this))throw Ns("error");this._controlledWritableStream._state==="writable"&&qo(this,o)}[Ot](o){let l=this._abortAlgorithm(o);return hn(this),l}[Xe](){Je(this)}}Object.defineProperties(Dt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Dt.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Ls(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledWritableStream")?!1:s instanceof Dt}function Bo(s,o,l,d,y,w,S,x){o._controlledWritableStream=s,s._writableStreamController=o,o._queue=void 0,o._queueTotalSize=void 0,Je(o),o._abortReason=void 0,o._abortController=hf(),o._started=!1,o._strategySizeAlgorithm=x,o._strategyHWM=S,o._writeAlgorithm=d,o._closeAlgorithm=y,o._abortAlgorithm=w;let B=Ps(o);Is(s,B);let U=l(),M=m(U);R(M,()=>{o._started=!0,fn(o)},W=>{o._started=!0,vs(s,W)})}function Af(s,o,l,d){let y=Object.create(Dt.prototype),w=()=>{},S=()=>m(void 0),x=()=>m(void 0),B=()=>m(void 0);o.start!==void 0&&(w=()=>o.start(y)),o.write!==void 0&&(S=U=>o.write(U,y)),o.close!==void 0&&(x=()=>o.close()),o.abort!==void 0&&(B=U=>o.abort(U)),Bo(s,y,w,S,x,B,l,d)}function hn(s){s._writeAlgorithm=void 0,s._closeAlgorithm=void 0,s._abortAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function Cf(s){ws(s,Ho,0),fn(s)}function vf(s,o){try{return s._strategySizeAlgorithm(o)}catch(l){return $s(s,l),1}}function Fo(s){return s._strategyHWM-s._queueTotalSize}function xf(s,o,l){try{ws(s,o,l)}catch(y){$s(s,y);return}let d=s._controlledWritableStream;if(!Fe(d)&&d._state==="writable"){let y=Ps(s);Is(d,y)}fn(s)}function fn(s){let o=s._controlledWritableStream;if(!s._started||o._inFlightWriteRequest!==void 0)return;if(o._state==="erroring"){Os(o);return}if(s._queue.length===0)return;let d=Yh(s);d===Ho?Of(s):If(s,d)}function $s(s,o){s._controlledWritableStream._state==="writable"&&qo(s,o)}function Of(s){let o=s._controlledWritableStream;_f(o),_s(s);let l=s._closeAlgorithm();hn(s),R(l,()=>{gf(o)},d=>{bf(o,d)})}function If(s,o){let l=s._controlledWritableStream;wf(l);let d=s._writeAlgorithm(o);R(d,()=>{pf(l);let y=l._state;if(_s(s),!Fe(l)&&y==="writable"){let w=Ps(s);Is(l,w)}fn(s)},y=>{l._state==="writable"&&hn(s),mf(l,y)})}function Ps(s){return Fo(s)<=0}function qo(s,o){let l=s._controlledWritableStream;hn(s),xs(l,o)}function dn(s){return new TypeError(`WritableStream.prototype.${s} can only be used on a WritableStream`)}function Ns(s){return new TypeError(`WritableStreamDefaultController.prototype.${s} can only be used on a WritableStreamDefaultController`)}function mt(s){return new TypeError(`WritableStreamDefaultWriter.prototype.${s} can only be used on a WritableStreamDefaultWriter`)}function Sr(s){return new TypeError("Cannot "+s+" a stream using a released writer")}function pn(s){s._closedPromise=b((o,l)=>{s._closedPromise_resolve=o,s._closedPromise_reject=l,s._closedPromiseState="pending"})}function Uo(s,o){pn(s),Ds(s,o)}function Lf(s){pn(s),zo(s)}function Ds(s,o){s._closedPromise_reject!==void 0&&($(s._closedPromise),s._closedPromise_reject(o),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0,s._closedPromiseState="rejected")}function $f(s,o){Uo(s,o)}function zo(s){s._closedPromise_resolve!==void 0&&(s._closedPromise_resolve(void 0),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0,s._closedPromiseState="resolved")}function mn(s){s._readyPromise=b((o,l)=>{s._readyPromise_resolve=o,s._readyPromise_reject=l}),s._readyPromiseState="pending"}function Hs(s,o){mn(s),Wo(s,o)}function Mo(s){mn(s),Bs(s)}function Wo(s,o){s._readyPromise_reject!==void 0&&($(s._readyPromise),s._readyPromise_reject(o),s._readyPromise_resolve=void 0,s._readyPromise_reject=void 0,s._readyPromiseState="rejected")}function Pf(s){mn(s)}function Nf(s,o){Hs(s,o)}function Bs(s){s._readyPromise_resolve!==void 0&&(s._readyPromise_resolve(void 0),s._readyPromise_resolve=void 0,s._readyPromise_reject=void 0,s._readyPromiseState="fulfilled")}let ko=typeof DOMException<"u"?DOMException:void 0;function Df(s){if(!(typeof s=="function"||typeof s=="object"))return!1;try{return new s,!0}catch{return!1}}function Hf(){let s=function(l,d){this.message=l||"",this.name=d||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return s.prototype=Object.create(Error.prototype),Object.defineProperty(s.prototype,"constructor",{value:s,writable:!0,configurable:!0}),s}let Bf=Df(ko)?ko:Hf();function jo(s,o,l,d,y,w){let S=Lt(s),x=Oo(o);s._disturbed=!0;let B=!1,U=m(void 0);return b((M,W)=>{let te;if(w!==void 0){if(te=()=>{let P=new Bf("Aborted","AbortError"),q=[];d||q.push(()=>o._state==="writable"?un(o,P):m(void 0)),y||q.push(()=>s._state==="readable"?Pe(s,P):m(void 0)),fe(()=>Promise.all(q.map(G=>G())),!0,P)},w.aborted){te();return}w.addEventListener("abort",te)}function Ne(){return b((P,q)=>{function G(be){be?P():_(Ft(),G,q)}G(!1)})}function Ft(){return B?m(!0):_(x._readyPromise,()=>b((P,q)=>{fr(S,{_chunkSteps:G=>{U=_(Do(x,G),void 0,r),P(!1)},_closeSteps:()=>P(!0),_errorSteps:q})}))}if(ke(s,S._closedPromise,P=>{d?Se(!0,P):fe(()=>un(o,P),!0,P)}),ke(o,x._closedPromise,P=>{y?Se(!0,P):fe(()=>Pe(s,P),!0,P)}),ue(s,S._closedPromise,()=>{l?Se():fe(()=>Rf(x))}),Fe(o)||o._state==="closed"){let P=new TypeError("the destination writable stream closed before all data could be piped to it");y?Se(!0,P):fe(()=>Pe(s,P),!0,P)}$(Ne());function st(){let P=U;return _(U,()=>P!==U?st():void 0)}function ke(P,q,G){P._state==="errored"?G(P._storedError):A(q,G)}function ue(P,q,G){P._state==="closed"?G():E(q,G)}function fe(P,q,G){if(B)return;B=!0,o._state==="writable"&&!Fe(o)?E(st(),be):be();function be(){R(P(),()=>je(q,G),qt=>je(!0,qt))}}function Se(P,q){B||(B=!0,o._state==="writable"&&!Fe(o)?E(st(),()=>je(P,q)):je(P,q))}function je(P,q){No(x),oe(S),w!==void 0&&w.removeEventListener("abort",te),P?W(q):M(void 0)}})}class Ht{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!gn(this))throw _n("desiredSize");return Fs(this)}close(){if(!gn(this))throw _n("close");if(!Bt(this))throw new TypeError("The stream is not in a state that permits close");Er(this)}enqueue(o=void 0){if(!gn(this))throw _n("enqueue");if(!Bt(this))throw new TypeError("The stream is not in a state that permits enqueue");return yn(this,o)}error(o=void 0){if(!gn(this))throw _n("error");et(this,o)}[we](o){Je(this);let l=this._cancelAlgorithm(o);return bn(this),l}[ge](o){let l=this._controlledReadableStream;if(this._queue.length>0){let d=_s(this);this._closeRequested&&this._queue.length===0?(bn(this),Tr(l)):Rr(this),o._chunkSteps(d)}else no(l,o),Rr(this)}}Object.defineProperties(Ht.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ht.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function gn(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableStream")?!1:s instanceof Ht}function Rr(s){if(!Vo(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let l=s._pullAlgorithm();R(l,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,Rr(s))},d=>{et(s,d)})}function Vo(s){let o=s._controlledReadableStream;return!Bt(s)||!s._started?!1:!!(nt(o)&&Kr(o)>0||Fs(s)>0)}function bn(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function Er(s){if(!Bt(s))return;let o=s._controlledReadableStream;s._closeRequested=!0,s._queue.length===0&&(bn(s),Tr(o))}function yn(s,o){if(!Bt(s))return;let l=s._controlledReadableStream;if(nt(l)&&Kr(l)>0)ys(l,o,!1);else{let d;try{d=s._strategySizeAlgorithm(o)}catch(y){throw et(s,y),y}try{ws(s,o,d)}catch(y){throw et(s,y),y}}Rr(s)}function et(s,o){let l=s._controlledReadableStream;l._state==="readable"&&(Je(s),bn(s),Ko(l,o))}function Fs(s){let o=s._controlledReadableStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function Ff(s){return!Vo(s)}function Bt(s){let o=s._controlledReadableStream._state;return!s._closeRequested&&o==="readable"}function Go(s,o,l,d,y,w,S){o._controlledReadableStream=s,o._queue=void 0,o._queueTotalSize=void 0,Je(o),o._started=!1,o._closeRequested=!1,o._pullAgain=!1,o._pulling=!1,o._strategySizeAlgorithm=S,o._strategyHWM=w,o._pullAlgorithm=d,o._cancelAlgorithm=y,s._readableStreamController=o;let x=l();R(m(x),()=>{o._started=!0,Rr(o)},B=>{et(o,B)})}function qf(s,o,l,d){let y=Object.create(Ht.prototype),w=()=>{},S=()=>m(void 0),x=()=>m(void 0);o.start!==void 0&&(w=()=>o.start(y)),o.pull!==void 0&&(S=()=>o.pull(y)),o.cancel!==void 0&&(x=B=>o.cancel(B)),Go(s,y,w,S,x,l,d)}function _n(s){return new TypeError(`ReadableStreamDefaultController.prototype.${s} can only be used on a ReadableStreamDefaultController`)}function Uf(s,o){return ht(s._readableStreamController)?Mf(s):zf(s)}function zf(s,o){let l=Lt(s),d=!1,y=!1,w=!1,S=!1,x,B,U,M,W,te=b(ue=>{W=ue});function Ne(){return d?(y=!0,m(void 0)):(d=!0,fr(l,{_chunkSteps:fe=>{T(()=>{y=!1;let Se=fe,je=fe;w||yn(U._readableStreamController,Se),S||yn(M._readableStreamController,je),d=!1,y&&Ne()})},_closeSteps:()=>{d=!1,w||Er(U._readableStreamController),S||Er(M._readableStreamController),(!w||!S)&&W(void 0)},_errorSteps:()=>{d=!1}}),m(void 0))}function Ft(ue){if(w=!0,x=ue,S){let fe=dr([x,B]),Se=Pe(s,fe);W(Se)}return te}function st(ue){if(S=!0,B=ue,w){let fe=dr([x,B]),Se=Pe(s,fe);W(Se)}return te}function ke(){}return U=qs(ke,Ne,Ft),M=qs(ke,Ne,st),A(l._closedPromise,ue=>{et(U._readableStreamController,ue),et(M._readableStreamController,ue),(!w||!S)&&W(void 0)}),[U,M]}function Mf(s){let o=Lt(s),l=!1,d=!1,y=!1,w=!1,S=!1,x,B,U,M,W,te=b(P=>{W=P});function Ne(P){A(P._closedPromise,q=>{P===o&&($e(U._readableStreamController,q),$e(M._readableStreamController,q),(!w||!S)&&W(void 0))})}function Ft(){dt(o)&&(oe(o),o=Lt(s),Ne(o)),fr(o,{_chunkSteps:q=>{T(()=>{d=!1,y=!1;let G=q,be=q;if(!w&&!S)try{be=po(q)}catch(qt){$e(U._readableStreamController,qt),$e(M._readableStreamController,qt),W(Pe(s,qt));return}w||rn(U._readableStreamController,G),S||rn(M._readableStreamController,be),l=!1,d?ke():y&&ue()})},_closeSteps:()=>{l=!1,w||mr(U._readableStreamController),S||mr(M._readableStreamController),U._readableStreamController._pendingPullIntos.length>0&&nn(U._readableStreamController,0),M._readableStreamController._pendingPullIntos.length>0&&nn(M._readableStreamController,0),(!w||!S)&&W(void 0)},_errorSteps:()=>{l=!1}})}function st(P,q){Ze(o)&&(oe(o),o=To(s),Ne(o));let G=q?M:U,be=q?U:M;vo(o,P,{_chunkSteps:Ut=>{T(()=>{d=!1,y=!1;let zt=q?S:w;if(q?w:S)zt||sn(G._readableStreamController,Ut);else{let ua;try{ua=po(Ut)}catch(zs){$e(G._readableStreamController,zs),$e(be._readableStreamController,zs),W(Pe(s,zs));return}zt||sn(G._readableStreamController,Ut),rn(be._readableStreamController,ua)}l=!1,d?ke():y&&ue()})},_closeSteps:Ut=>{l=!1;let zt=q?S:w,xn=q?w:S;zt||mr(G._readableStreamController),xn||mr(be._readableStreamController),Ut!==void 0&&(zt||sn(G._readableStreamController,Ut),!xn&&be._readableStreamController._pendingPullIntos.length>0&&nn(be._readableStreamController,0)),(!zt||!xn)&&W(void 0)},_errorSteps:()=>{l=!1}})}function ke(){if(l)return d=!0,m(void 0);l=!0;let P=Ts(U._readableStreamController);return P===null?Ft():st(P._view,!1),m(void 0)}function ue(){if(l)return y=!0,m(void 0);l=!0;let P=Ts(M._readableStreamController);return P===null?Ft():st(P._view,!0),m(void 0)}function fe(P){if(w=!0,x=P,S){let q=dr([x,B]),G=Pe(s,q);W(G)}return te}function Se(P){if(S=!0,B=P,w){let q=dr([x,B]),G=Pe(s,q);W(G)}return te}function je(){}return U=Qo(je,ke,fe),M=Qo(je,ue,Se),Ne(o),[U,M]}function Wf(s,o){Ie(s,o);let l=s,d=l==null?void 0:l.autoAllocateChunkSize,y=l==null?void 0:l.cancel,w=l==null?void 0:l.pull,S=l==null?void 0:l.start,x=l==null?void 0:l.type;return{autoAllocateChunkSize:d===void 0?void 0:ro(d,`${o} has member 'autoAllocateChunkSize' that`),cancel:y===void 0?void 0:kf(y,l,`${o} has member 'cancel' that`),pull:w===void 0?void 0:jf(w,l,`${o} has member 'pull' that`),start:S===void 0?void 0:Vf(S,l,`${o} has member 'start' that`),type:x===void 0?void 0:Gf(x,`${o} has member 'type' that`)}}function kf(s,o,l){return Le(s,l),d=>D(s,o,[d])}function jf(s,o,l){return Le(s,l),d=>D(s,o,[d])}function Vf(s,o,l){return Le(s,l),d=>L(s,o,[d])}function Gf(s,o){if(s=`${s}`,s!=="bytes")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamType`);return s}function Yf(s,o){Ie(s,o);let l=s==null?void 0:s.mode;return{mode:l===void 0?void 0:Qf(l,`${o} has member 'mode' that`)}}function Qf(s,o){if(s=`${s}`,s!=="byob")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamReaderMode`);return s}function Kf(s,o){return Ie(s,o),{preventCancel:!!(s==null?void 0:s.preventCancel)}}function Yo(s,o){Ie(s,o);let l=s==null?void 0:s.preventAbort,d=s==null?void 0:s.preventCancel,y=s==null?void 0:s.preventClose,w=s==null?void 0:s.signal;return w!==void 0&&Xf(w,`${o} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!d,preventClose:!!y,signal:w}}function Xf(s,o){if(!uf(s))throw new TypeError(`${o} is not an AbortSignal.`)}function Zf(s,o){Ie(s,o);let l=s==null?void 0:s.readable;ms(l,"readable","ReadableWritablePair"),bs(l,`${o} has member 'readable' that`);let d=s==null?void 0:s.writable;return ms(d,"writable","ReadableWritablePair"),xo(d,`${o} has member 'writable' that`),{readable:l,writable:d}}class tt{constructor(o={},l={}){o===void 0?o=null:eo(o,"First parameter");let d=ln(l,"Second parameter"),y=Wf(o,"First parameter");if(Us(this),y.type==="bytes"){if(d.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let w=yr(d,0);Jh(this,y,w)}else{let w=an(d),S=yr(d,1);qf(this,y,S,w)}}get locked(){if(!rt(this))throw gt("locked");return nt(this)}cancel(o=void 0){return rt(this)?nt(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Pe(this,o):p(gt("cancel"))}getReader(o=void 0){if(!rt(this))throw gt("getReader");return Yf(o,"First parameter").mode===void 0?Lt(this):To(this)}pipeThrough(o,l={}){if(!rt(this))throw gt("pipeThrough");We(o,1,"pipeThrough");let d=Zf(o,"First parameter"),y=Yo(l,"Second parameter");if(nt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Nt(d.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=jo(this,d.writable,y.preventClose,y.preventAbort,y.preventCancel,y.signal);return $(w),d.readable}pipeTo(o,l={}){if(!rt(this))return p(gt("pipeTo"));if(o===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Pt(o))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let d;try{d=Yo(l,"Second parameter")}catch(y){return p(y)}return nt(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Nt(o)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):jo(this,o,d.preventClose,d.preventAbort,d.preventCancel,d.signal)}tee(){if(!rt(this))throw gt("tee");let o=Uf(this);return dr(o)}values(o=void 0){if(!rt(this))throw gt("values");let l=Kf(o,"First parameter");return Vh(this,l.preventCancel)}}Object.defineProperties(tt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(tt.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(tt.prototype,e.asyncIterator,{value:tt.prototype.values,writable:!0,configurable:!0});function qs(s,o,l,d=1,y=()=>1){let w=Object.create(tt.prototype);Us(w);let S=Object.create(Ht.prototype);return Go(w,S,s,o,l,d,y),w}function Qo(s,o,l){let d=Object.create(tt.prototype);Us(d);let y=Object.create($t.prototype);return Eo(d,y,s,o,l,0,void 0),d}function Us(s){s._state="readable",s._reader=void 0,s._storedError=void 0,s._disturbed=!1}function rt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readableStreamController")?!1:s instanceof tt}function nt(s){return s._reader!==void 0}function Pe(s,o){if(s._disturbed=!0,s._state==="closed")return m(void 0);if(s._state==="errored")return p(s._storedError);Tr(s);let l=s._reader;l!==void 0&&dt(l)&&(l._readIntoRequests.forEach(y=>{y._closeSteps(void 0)}),l._readIntoRequests=new V);let d=s._readableStreamController[we](o);return N(d,r)}function Tr(s){s._state="closed";let o=s._reader;o!==void 0&&(Ke(o),Ze(o)&&(o._readRequests.forEach(l=>{l._closeSteps()}),o._readRequests=new V))}function Ko(s,o){s._state="errored",s._storedError=o;let l=s._reader;l!==void 0&&(J(l,o),Ze(l)?(l._readRequests.forEach(d=>{d._errorSteps(o)}),l._readRequests=new V):(l._readIntoRequests.forEach(d=>{d._errorSteps(o)}),l._readIntoRequests=new V))}function gt(s){return new TypeError(`ReadableStream.prototype.${s} can only be used on a ReadableStream`)}function Xo(s,o){Ie(s,o);let l=s==null?void 0:s.highWaterMark;return ms(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:gs(l)}}let Zo=s=>s.byteLength;try{Object.defineProperty(Zo,"name",{value:"size",configurable:!0})}catch{}class wn{constructor(o){We(o,1,"ByteLengthQueuingStrategy"),o=Xo(o,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!ea(this))throw Jo("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!ea(this))throw Jo("size");return Zo}}Object.defineProperties(wn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(wn.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Jo(s){return new TypeError(`ByteLengthQueuingStrategy.prototype.${s} can only be used on a ByteLengthQueuingStrategy`)}function ea(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_byteLengthQueuingStrategyHighWaterMark")?!1:s instanceof wn}let ta=()=>1;try{Object.defineProperty(ta,"name",{value:"size",configurable:!0})}catch{}class Sn{constructor(o){We(o,1,"CountQueuingStrategy"),o=Xo(o,"First parameter"),this._countQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!na(this))throw ra("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!na(this))throw ra("size");return ta}}Object.defineProperties(Sn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Sn.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ra(s){return new TypeError(`CountQueuingStrategy.prototype.${s} can only be used on a CountQueuingStrategy`)}function na(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_countQueuingStrategyHighWaterMark")?!1:s instanceof Sn}function Jf(s,o){Ie(s,o);let l=s==null?void 0:s.flush,d=s==null?void 0:s.readableType,y=s==null?void 0:s.start,w=s==null?void 0:s.transform,S=s==null?void 0:s.writableType;return{flush:l===void 0?void 0:ed(l,s,`${o} has member 'flush' that`),readableType:d,start:y===void 0?void 0:td(y,s,`${o} has member 'start' that`),transform:w===void 0?void 0:rd(w,s,`${o} has member 'transform' that`),writableType:S}}function ed(s,o,l){return Le(s,l),d=>D(s,o,[d])}function td(s,o,l){return Le(s,l),d=>L(s,o,[d])}function rd(s,o,l){return Le(s,l),(d,y)=>D(s,o,[d,y])}class Rn{constructor(o={},l={},d={}){o===void 0&&(o=null);let y=ln(l,"Second parameter"),w=ln(d,"Third parameter"),S=Jf(o,"First parameter");if(S.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(S.writableType!==void 0)throw new RangeError("Invalid writableType specified");let x=yr(w,0),B=an(w),U=yr(y,1),M=an(y),W,te=b(Ne=>{W=Ne});nd(this,te,U,M,x,B),id(this,S),S.start!==void 0?W(S.start(this._transformStreamController)):W(void 0)}get readable(){if(!sa(this))throw la("readable");return this._readable}get writable(){if(!sa(this))throw la("writable");return this._writable}}Object.defineProperties(Rn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Rn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function nd(s,o,l,d,y,w){function S(){return o}function x(te){return ld(s,te)}function B(te){return ud(s,te)}function U(){return cd(s)}s._writable=ff(S,x,U,B,l,d);function M(){return hd(s)}function W(te){return Tn(s,te),m(void 0)}s._readable=qs(S,M,W,y,w),s._backpressure=void 0,s._backpressureChangePromise=void 0,s._backpressureChangePromise_resolve=void 0,An(s,!0),s._transformStreamController=void 0}function sa(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_transformStreamController")?!1:s instanceof Rn}function En(s,o){et(s._readable._readableStreamController,o),Tn(s,o)}function Tn(s,o){ia(s._transformStreamController),$s(s._writable._writableStreamController,o),s._backpressure&&An(s,!1)}function An(s,o){s._backpressureChangePromise!==void 0&&s._backpressureChangePromise_resolve(),s._backpressureChangePromise=b(l=>{s._backpressureChangePromise_resolve=l}),s._backpressure=o}class Ar{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Cn(this))throw vn("desiredSize");let o=this._controlledTransformStream._readable._readableStreamController;return Fs(o)}enqueue(o=void 0){if(!Cn(this))throw vn("enqueue");oa(this,o)}error(o=void 0){if(!Cn(this))throw vn("error");od(this,o)}terminate(){if(!Cn(this))throw vn("terminate");ad(this)}}Object.defineProperties(Ar.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ar.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Cn(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledTransformStream")?!1:s instanceof Ar}function sd(s,o,l,d){o._controlledTransformStream=s,s._transformStreamController=o,o._transformAlgorithm=l,o._flushAlgorithm=d}function id(s,o){let l=Object.create(Ar.prototype),d=w=>{try{return oa(l,w),m(void 0)}catch(S){return p(S)}},y=()=>m(void 0);o.transform!==void 0&&(d=w=>o.transform(w,l)),o.flush!==void 0&&(y=()=>o.flush(l)),sd(s,l,d,y)}function ia(s){s._transformAlgorithm=void 0,s._flushAlgorithm=void 0}function oa(s,o){let l=s._controlledTransformStream,d=l._readable._readableStreamController;if(!Bt(d))throw new TypeError("Readable side is not in a state that permits enqueue");try{yn(d,o)}catch(w){throw Tn(l,w),l._readable._storedError}Ff(d)!==l._backpressure&&An(l,!0)}function od(s,o){En(s._controlledTransformStream,o)}function aa(s,o){let l=s._transformAlgorithm(o);return N(l,void 0,d=>{throw En(s._controlledTransformStream,d),d})}function ad(s){let o=s._controlledTransformStream,l=o._readable._readableStreamController;Er(l);let d=new TypeError("TransformStream terminated");Tn(o,d)}function ld(s,o){let l=s._transformStreamController;if(s._backpressure){let d=s._backpressureChangePromise;return N(d,()=>{let y=s._writable;if(y._state==="erroring")throw y._storedError;return aa(l,o)})}return aa(l,o)}function ud(s,o){return En(s,o),m(void 0)}function cd(s){let o=s._readable,l=s._transformStreamController,d=l._flushAlgorithm();return ia(l),N(d,()=>{if(o._state==="errored")throw o._storedError;Er(o._readableStreamController)},y=>{throw En(s,y),o._storedError})}function hd(s){return An(s,!1),s._backpressureChangePromise}function vn(s){return new TypeError(`TransformStreamDefaultController.prototype.${s} can only be used on a TransformStreamDefaultController`)}function la(s){return new TypeError(`TransformStream.prototype.${s} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=wn,t.CountQueuingStrategy=Sn,t.ReadableByteStreamController=$t,t.ReadableStream=tt,t.ReadableStreamBYOBReader=br,t.ReadableStreamBYOBRequest=pr,t.ReadableStreamDefaultController=Ht,t.ReadableStreamDefaultReader=hr,t.TransformStream=Rn,t.TransformStreamDefaultController=Ar,t.WritableStream=_r,t.WritableStreamDefaultController=Dt,t.WritableStreamDefaultWriter=wr,Object.defineProperty(t,"__esModule",{value:!0})})});var Aa=C(()=>{if(!globalThis.ReadableStream)try{let t=ye("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,ye("node:stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,Ta())}try{let{Blob:t}=ye("buffer");t&&!t.prototype.stream&&(t.prototype.stream=function(r){let n=0,i=this;return new ReadableStream({type:"bytes",async pull(a){let h=await i.slice(n,Math.min(i.size,n+65536)).arrayBuffer();n+=h.byteLength,a.enqueue(new Uint8Array(h)),n===i.size&&a.close()}})})}catch{}});async function*Zs(t,e=!0){for(let r of t)if("stream"in r)yield*r.stream();else if(ArrayBuffer.isView(r))if(e){let n=r.byteOffset,i=r.byteOffset+r.byteLength;for(;n!==i;){let a=Math.min(i-n,Ca),u=r.buffer.slice(n,n+a);n+=u.byteLength,yield new Uint8Array(u)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let u=await i.slice(n,Math.min(i.size,n+Ca)).arrayBuffer();n+=u.byteLength,yield new Uint8Array(u)}}}var qy,Ca,va,Od,Ve,xr=Cr(()=>{qy=Re(Aa(),1);Ca=65536;va=class Js{#e=[];#r="";#t=0;#n="transparent";constructor(e=[],r={}){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 r!="object"&&typeof r!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");r===null&&(r={});let n=new TextEncoder;for(let a of e){let u;ArrayBuffer.isView(a)?u=new Uint8Array(a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength)):a instanceof ArrayBuffer?u=new Uint8Array(a.slice(0)):a instanceof Js?u=a:u=n.encode(`${a}`),this.#t+=ArrayBuffer.isView(u)?u.byteLength:u.size,this.#e.push(u)}this.#n=`${r.endings===void 0?"transparent":r.endings}`;let i=r.type===void 0?"":String(r.type);this.#r=/^[\x20-\x7E]*$/.test(i)?i:""}get size(){return this.#t}get type(){return this.#r}async text(){let e=new TextDecoder,r="";for await(let n of Zs(this.#e,!1))r+=e.decode(n,{stream:!0});return r+=e.decode(),r}async arrayBuffer(){let e=new Uint8Array(this.size),r=0;for await(let n of Zs(this.#e,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=Zs(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(r){let n=await e.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await e.return()}})}slice(e=0,r=this.size,n=""){let{size:i}=this,a=e<0?Math.max(i+e,0):Math.min(e,i),u=r<0?Math.max(i+r,0):Math.min(r,i),h=Math.max(u-a,0),f=this.#e,c=[],g=0;for(let m of f){if(g>=h)break;let p=ArrayBuffer.isView(m)?m.byteLength:m.size;if(a&&p<=a)a-=p,u-=p;else{let _;ArrayBuffer.isView(m)?(_=m.subarray(a,Math.min(p,u)),g+=_.byteLength):(_=m.slice(a,Math.min(p,u)),g+=_.size),u-=p,c.push(_),a=0}}let b=new Js([],{type:String(n).toLowerCase()});return b.#t=h,b.#e=c,b}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(va.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Od=va,Ve=Od});var Id,Ld,Wt,ei=Cr(()=>{xr();Id=class extends Ve{#e=0;#r="";constructor(e,r,n={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,n),n===null&&(n={});let i=n.lastModified===void 0?Date.now():Number(n.lastModified);Number.isNaN(i)||(this.#e=i),this.#r=String(r)}get name(){return this.#r}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof Ve&&/^(File)$/.test(e[Symbol.toStringTag])}},Ld=Id,Wt=Ld});function Ia(t,e=Ve){var r=`${xa()}${xa()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
4
- Content-Disposition: form-data; name="`;return t.forEach((a,u)=>typeof a=="string"?n.push(i+ti(u)+`"\r
3
+ var dd=Object.create;var ks=Object.defineProperty;var pd=Object.getOwnPropertyDescriptor;var md=Object.getOwnPropertyNames;var gd=Object.getPrototypeOf,bd=Object.prototype.hasOwnProperty;var ye=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var Cr=(t,e)=>()=>(t&&(e=t(t=0)),e);var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),yd=(t,e)=>{for(var r in e)ks(t,r,{get:e[r],enumerable:!0})},_d=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of md(e))!bd.call(t,i)&&i!==r&&ks(t,i,{get:()=>e[i],enumerable:!(n=pd(e,i))||n.enumerable});return t};var Re=(t,e,r)=>(r=t!=null?dd(gd(t)):{},_d(e||!t||!t.__esModule?ks(r,"default",{value:t,enumerable:!0}):r,t));var da=C((vy,fa)=>{"use strict";var js=ye("https"),Vs=ye("http"),{URL:ha}=ye("url"),Gs=class extends Vs.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new ha(r):r,this.proxyRequestOptions=n||{}}createConnection(e,r){let n={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");n.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(n.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?Vs:js).request(n);i.once("connect",(a,u,h)=>{i.removeAllListeners(),u.removeAllListeners(),a.statusCode===200?r(null,u):(u.destroy(),r(new Error(`Bad response: ${a.statusCode}`),null))}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",a=>{i.removeAllListeners(),r(a,null)}),i.end()}},Ys=class extends js.Agent{constructor(e){let{proxy:r,proxyRequestOptions:n,...i}=e;super(i),this.proxy=typeof r=="string"?new ha(r):r,this.proxyRequestOptions=n||{}}createConnection(e,r){let n={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let a=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");n.headers["proxy-authorization"]=`Basic ${a}`}this.proxy.protocol==="https:"&&(n.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?Vs:js).request(n);i.once("connect",(a,u,h)=>{if(i.removeAllListeners(),u.removeAllListeners(),a.statusCode===200){let f=super.createConnection({...e,socket:u});r(null,f)}else u.destroy(),r(new Error(`Bad response: ${a.statusCode}`),null)}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",a=>{i.removeAllListeners(),r(a,null)}),i.end()}};fa.exports={HttpProxyAgent:Gs,HttpsProxyAgent:Ys}});var ba=C(ga=>{"use strict";var wd=ye("url").parse,Sd={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Rd=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function Ed(t){var e=typeof t=="string"?wd(t):t||{},r=e.protocol,n=e.host,i=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),i=parseInt(i)||Sd[r]||0,!Td(n,i)))return"";var a=Mt("npm_config_"+r+"_proxy")||Mt(r+"_proxy")||Mt("npm_config_proxy")||Mt("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function Td(t,e){var r=(Mt("npm_config_no_proxy")||Mt("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var i=n.match(/^(.+):(\d+)$/),a=i?i[1]:n,u=i?parseInt(i[2]):0;return u&&u!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!Rd.call(t,a)):t!==a}):!0}function Mt(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}ga.getProxyForUrl=Ed});var Zs=C((Hy,Ra)=>{"use strict";function xd(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var n=e[e.length-1];return n in r}function wa(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function Sa(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}Ra.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(T){r.bools[T]=!0});var n={};function i(T){return n[T].some(function($){return r.bools[$]})}Object.keys(e.alias||{}).forEach(function(T){n[T]=[].concat(e.alias[T]),n[T].forEach(function($){n[$]=[T].concat(n[T].filter(function(D){return $!==D}))})}),[].concat(e.string).filter(Boolean).forEach(function(T){r.strings[T]=!0,n[T]&&[].concat(n[T]).forEach(function($){r.strings[$]=!0})});var a=e.default||{},u={_:[]};function h(T,$){return r.allBools&&/^--[^=]+$/.test($)||r.strings[T]||r.bools[T]||n[T]}function f(T,$,D){for(var H=T,V=0;V<$.length-1;V++){var K=$[V];if(Sa(H,K))return;H[K]===void 0&&(H[K]={}),(H[K]===Object.prototype||H[K]===Number.prototype||H[K]===String.prototype)&&(H[K]={}),H[K]===Array.prototype&&(H[K]=[]),H=H[K]}var ee=$[$.length-1];Sa(H,ee)||((H===Object.prototype||H===Number.prototype||H===String.prototype)&&(H={}),H===Array.prototype&&(H=[]),H[ee]===void 0||r.bools[ee]||typeof H[ee]=="boolean"?H[ee]=D:Array.isArray(H[ee])?H[ee].push(D):H[ee]=[H[ee],D])}function c(T,$,D){if(!(D&&r.unknownFn&&!h(T,D)&&r.unknownFn(D)===!1)){var H=!r.strings[T]&&wa($)?Number($):$;f(u,T.split("."),H),(n[T]||[]).forEach(function(V){f(u,V.split("."),H)})}}Object.keys(r.bools).forEach(function(T){c(T,a[T]===void 0?!1:a[T])});var g=[];t.indexOf("--")!==-1&&(g=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var b=0;b<t.length;b++){var m=t[b],p,_;if(/^--.+=/.test(m)){var R=m.match(/^--([^=]+)=([\s\S]*)$/);p=R[1];var E=R[2];r.bools[p]&&(E=E!=="false"),c(p,E,m)}else if(/^--no-.+/.test(m))p=m.match(/^--no-(.+)/)[1],c(p,!1,m);else if(/^--.+/.test(m))p=m.match(/^--(.+)/)[1],_=t[b+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!r.bools[p]&&!r.allBools&&(!n[p]||!i(p))?(c(p,_,m),b+=1):/^(true|false)$/.test(_)?(c(p,_==="true",m),b+=1):c(p,r.strings[p]?"":!0,m);else if(/^-[^-]+/.test(m)){for(var A=m.slice(1,-1).split(""),N=!1,L=0;L<A.length;L++){if(_=m.slice(L+2),_==="-"){c(A[L],_,m);continue}if(/[A-Za-z]/.test(A[L])&&_[0]==="="){c(A[L],_.slice(1),m),N=!0;break}if(/[A-Za-z]/.test(A[L])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){c(A[L],_,m),N=!0;break}if(A[L+1]&&A[L+1].match(/\W/)){c(A[L],m.slice(L+2),m),N=!0;break}else c(A[L],r.strings[A[L]]?"":!0,m)}p=m.slice(-1)[0],!N&&p!=="-"&&(t[b+1]&&!/^(-|--)[^-]/.test(t[b+1])&&!r.bools[p]&&(!n[p]||!i(p))?(c(p,t[b+1],m),b+=1):t[b+1]&&/^(true|false)$/.test(t[b+1])?(c(p,t[b+1]==="true",m),b+=1):c(p,r.strings[p]?"":!0,m))}else if((!r.unknownFn||r.unknownFn(m)!==!1)&&u._.push(r.strings._||!wa(m)?m:Number(m)),e.stopEarly){u._.push.apply(u._,t.slice(b+1));break}}return Object.keys(a).forEach(function(T){xd(u,T.split("."))||(f(u,T.split("."),a[T]),(n[T]||[]).forEach(function($){f(u,$.split("."),a[T])}))}),e["--"]?u["--"]=g.slice():g.forEach(function(T){u._.push(T)}),u}});var Aa=C((On,Ta)=>{(function(t,e){typeof On=="object"&&typeof Ta<"u"?e(On):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(On,function(t){"use strict";let e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:s=>`Symbol(${s})`;function r(){}function n(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}let i=n();function a(s){return typeof s=="object"&&s!==null||typeof s=="function"}let u=r,h=Promise,f=Promise.prototype.then,c=Promise.resolve.bind(h),g=Promise.reject.bind(h);function b(s){return new h(s)}function m(s){return c(s)}function p(s){return g(s)}function _(s,o,l){return f.call(s,o,l)}function R(s,o,l){_(_(s,o,l),void 0,u)}function E(s,o){R(s,o)}function A(s,o){R(s,void 0,o)}function N(s,o,l){return _(s,o,l)}function L(s){_(s,void 0,u)}let T=(()=>{let s=i&&i.queueMicrotask;if(typeof s=="function")return s;let o=m(void 0);return l=>_(o,l)})();function $(s,o,l){if(typeof s!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(s,o,l)}function D(s,o,l){try{return m($(s,o,l))}catch(d){return p(d)}}let H=16384;class V{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(o){let l=this._back,d=l;l._elements.length===H-1&&(d={_elements:[],_next:void 0}),l._elements.push(o),d!==l&&(this._back=d,l._next=d),++this._size}shift(){let o=this._front,l=o,d=this._cursor,y=d+1,w=o._elements,S=w[d];return y===H&&(l=o._next,y=0),--this._size,this._cursor=y,o!==l&&(this._front=l),w[d]=void 0,S}forEach(o){let l=this._cursor,d=this._front,y=d._elements;for(;(l!==y.length||d._next!==void 0)&&!(l===y.length&&(d=d._next,y=d._elements,l=0,y.length===0));)o(y[l]),++l}peek(){let o=this._front,l=this._cursor;return o._elements[l]}}function K(s,o){s._ownerReadableStream=o,o._reader=s,o._state==="readable"?xt(s):o._state==="closed"?Z(s):v(s,o._storedError)}function ee(s,o){let l=s._ownerReadableStream;return Pe(l,o)}function oe(s){s._ownerReadableStream._state==="readable"?J(s,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):le(s,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),s._ownerReadableStream._reader=void 0,s._ownerReadableStream=void 0}function Be(s){return new TypeError("Cannot "+s+" a stream using a released reader")}function xt(s){s._closedPromise=b((o,l)=>{s._closedPromise_resolve=o,s._closedPromise_reject=l})}function v(s,o){xt(s),J(s,o)}function Z(s){xt(s),Xe(s)}function J(s,o){s._closedPromise_reject!==void 0&&(L(s._closedPromise),s._closedPromise_reject(o),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0)}function le(s,o){v(s,o)}function Xe(s){s._closedPromise_resolve!==void 0&&(s._closedPromise_resolve(void 0),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0)}let Ot=e("[[AbortSteps]]"),Ze=e("[[ErrorSteps]]"),we=e("[[CancelSteps]]"),ge=e("[[PullSteps]]"),It=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},Me=Math.trunc||function(s){return s<0?Math.ceil(s):Math.floor(s)};function Qr(s){return typeof s=="object"||typeof s=="function"}function Ie(s,o){if(s!==void 0&&!Qr(s))throw new TypeError(`${o} is not an object.`)}function $e(s,o){if(typeof s!="function")throw new TypeError(`${o} is not a function.`)}function jh(s){return typeof s=="object"&&s!==null||typeof s=="function"}function to(s,o){if(!jh(s))throw new TypeError(`${o} is not an object.`)}function ke(s,o,l){if(s===void 0)throw new TypeError(`Parameter ${o} is required in '${l}'.`)}function gs(s,o,l){if(s===void 0)throw new TypeError(`${o} is required in '${l}'.`)}function bs(s){return Number(s)}function ro(s){return s===0?0:s}function Vh(s){return ro(Me(s))}function no(s,o){let d=Number.MAX_SAFE_INTEGER,y=Number(s);if(y=ro(y),!It(y))throw new TypeError(`${o} is not a finite number`);if(y=Vh(y),y<0||y>d)throw new TypeError(`${o} is outside the accepted range of 0 to ${d}, inclusive`);return!It(y)||y===0?0:y}function ys(s,o){if(!nt(s))throw new TypeError(`${o} is not a ReadableStream.`)}function $t(s){return new hr(s)}function so(s,o){s._reader._readRequests.push(o)}function _s(s,o,l){let y=s._reader._readRequests.shift();l?y._closeSteps():y._chunkSteps(o)}function Kr(s){return s._reader._readRequests.length}function io(s){let o=s._reader;return!(o===void 0||!Je(o))}class hr{constructor(o){if(ke(o,1,"ReadableStreamDefaultReader"),ys(o,"First parameter"),st(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");K(this,o),this._readRequests=new V}get closed(){return Je(this)?this._closedPromise:p(Xr("closed"))}cancel(o=void 0){return Je(this)?this._ownerReadableStream===void 0?p(Be("cancel")):ee(this,o):p(Xr("cancel"))}read(){if(!Je(this))return p(Xr("read"));if(this._ownerReadableStream===void 0)return p(Be("read from"));let o,l,d=b((w,S)=>{o=w,l=S});return fr(this,{_chunkSteps:w=>o({value:w,done:!1}),_closeSteps:()=>o({value:void 0,done:!0}),_errorSteps:w=>l(w)}),d}releaseLock(){if(!Je(this))throw Xr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(hr.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(hr.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Je(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readRequests")?!1:s instanceof hr}function fr(s,o){let l=s._ownerReadableStream;l._disturbed=!0,l._state==="closed"?o._closeSteps():l._state==="errored"?o._errorSteps(l._storedError):l._readableStreamController[ge](o)}function Xr(s){return new TypeError(`ReadableStreamDefaultReader.prototype.${s} can only be used on a ReadableStreamDefaultReader`)}let oo=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class ao{constructor(o,l){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=o,this._preventCancel=l}next(){let o=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?N(this._ongoingPromise,o,o):o(),this._ongoingPromise}return(o){let l=()=>this._returnSteps(o);return this._ongoingPromise?N(this._ongoingPromise,l,l):l()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let o=this._reader;if(o._ownerReadableStream===void 0)return p(Be("iterate"));let l,d,y=b((S,x)=>{l=S,d=x});return fr(o,{_chunkSteps:S=>{this._ongoingPromise=void 0,T(()=>l({value:S,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(o),l({value:void 0,done:!0})},_errorSteps:S=>{this._ongoingPromise=void 0,this._isFinished=!0,oe(o),d(S)}}),y}_returnSteps(o){if(this._isFinished)return Promise.resolve({value:o,done:!0});this._isFinished=!0;let l=this._reader;if(l._ownerReadableStream===void 0)return p(Be("finish iterating"));if(!this._preventCancel){let d=ee(l,o);return oe(l),N(d,()=>({value:o,done:!0}))}return oe(l),m({value:o,done:!0})}}let lo={next(){return uo(this)?this._asyncIteratorImpl.next():p(co("next"))},return(s){return uo(this)?this._asyncIteratorImpl.return(s):p(co("return"))}};oo!==void 0&&Object.setPrototypeOf(lo,oo);function Gh(s,o){let l=$t(s),d=new ao(l,o),y=Object.create(lo);return y._asyncIteratorImpl=d,y}function uo(s){if(!a(s)||!Object.prototype.hasOwnProperty.call(s,"_asyncIteratorImpl"))return!1;try{return s._asyncIteratorImpl instanceof ao}catch{return!1}}function co(s){return new TypeError(`ReadableStreamAsyncIterator.${s} can only be used on a ReadableSteamAsyncIterator`)}let ho=Number.isNaN||function(s){return s!==s};function dr(s){return s.slice()}function fo(s,o,l,d,y){new Uint8Array(s).set(new Uint8Array(l,d,y),o)}function Ty(s){return s}function Zr(s){return!1}function po(s,o,l){if(s.slice)return s.slice(o,l);let d=l-o,y=new ArrayBuffer(d);return fo(y,0,s,o,d),y}function Yh(s){return!(typeof s!="number"||ho(s)||s<0)}function mo(s){let o=po(s.buffer,s.byteOffset,s.byteOffset+s.byteLength);return new Uint8Array(o)}function ws(s){let o=s._queue.shift();return s._queueTotalSize-=o.size,s._queueTotalSize<0&&(s._queueTotalSize=0),o.value}function Ss(s,o,l){if(!Yh(l)||l===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");s._queue.push({value:o,size:l}),s._queueTotalSize+=l}function Qh(s){return s._queue.peek().value}function et(s){s._queue=new V,s._queueTotalSize=0}class pr{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Rs(this))throw Cs("view");return this._view}respond(o){if(!Rs(this))throw Cs("respond");if(ke(o,1,"respond"),o=no(o,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Zr(this._view.buffer),nn(this._associatedReadableByteStreamController,o)}respondWithNewView(o){if(!Rs(this))throw Cs("respondWithNewView");if(ke(o,1,"respondWithNewView"),!ArrayBuffer.isView(o))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");Zr(o.buffer),sn(this._associatedReadableByteStreamController,o)}}Object.defineProperties(pr.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(pr.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Lt{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!ht(this))throw gr("byobRequest");return As(this)}get desiredSize(){if(!ht(this))throw gr("desiredSize");return Eo(this)}close(){if(!ht(this))throw gr("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let o=this._controlledReadableByteStream._state;if(o!=="readable")throw new TypeError(`The stream (in ${o} state) is not in the readable state and cannot be closed`);mr(this)}enqueue(o){if(!ht(this))throw gr("enqueue");if(ke(o,1,"enqueue"),!ArrayBuffer.isView(o))throw new TypeError("chunk must be an array buffer view");if(o.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(o.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 l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be enqueued to`);rn(this,o)}error(o=void 0){if(!ht(this))throw gr("error");Le(this,o)}[we](o){go(this),et(this);let l=this._cancelAlgorithm(o);return tn(this),l}[ge](o){let l=this._controlledReadableByteStream;if(this._queueTotalSize>0){let y=this._queue.shift();this._queueTotalSize-=y.byteLength,wo(this);let w=new Uint8Array(y.buffer,y.byteOffset,y.byteLength);o._chunkSteps(w);return}let d=this._autoAllocateChunkSize;if(d!==void 0){let y;try{y=new ArrayBuffer(d)}catch(S){o._errorSteps(S);return}let w={buffer:y,bufferByteLength:d,byteOffset:0,byteLength:d,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(w)}so(l,o),ft(this)}}Object.defineProperties(Lt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Lt.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ht(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableByteStream")?!1:s instanceof Lt}function Rs(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_associatedReadableByteStreamController")?!1:s instanceof pr}function ft(s){if(!Jh(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let l=s._pullAlgorithm();R(l,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,ft(s))},d=>{Le(s,d)})}function go(s){Ts(s),s._pendingPullIntos=new V}function Es(s,o){let l=!1;s._state==="closed"&&(l=!0);let d=bo(o);o.readerType==="default"?_s(s,d,l):rf(s,d,l)}function bo(s){let o=s.bytesFilled,l=s.elementSize;return new s.viewConstructor(s.buffer,s.byteOffset,o/l)}function Jr(s,o,l,d){s._queue.push({buffer:o,byteOffset:l,byteLength:d}),s._queueTotalSize+=d}function yo(s,o){let l=o.elementSize,d=o.bytesFilled-o.bytesFilled%l,y=Math.min(s._queueTotalSize,o.byteLength-o.bytesFilled),w=o.bytesFilled+y,S=w-w%l,x=y,B=!1;S>d&&(x=S-o.bytesFilled,B=!0);let U=s._queue;for(;x>0;){let M=U.peek(),k=Math.min(x,M.byteLength),te=o.byteOffset+o.bytesFilled;fo(o.buffer,te,M.buffer,M.byteOffset,k),M.byteLength===k?U.shift():(M.byteOffset+=k,M.byteLength-=k),s._queueTotalSize-=k,_o(s,k,o),x-=k}return B}function _o(s,o,l){l.bytesFilled+=o}function wo(s){s._queueTotalSize===0&&s._closeRequested?(tn(s),Tr(s._controlledReadableByteStream)):ft(s)}function Ts(s){s._byobRequest!==null&&(s._byobRequest._associatedReadableByteStreamController=void 0,s._byobRequest._view=null,s._byobRequest=null)}function So(s){for(;s._pendingPullIntos.length>0;){if(s._queueTotalSize===0)return;let o=s._pendingPullIntos.peek();yo(s,o)&&(en(s),Es(s._controlledReadableByteStream,o))}}function Kh(s,o,l){let d=s._controlledReadableByteStream,y=1;o.constructor!==DataView&&(y=o.constructor.BYTES_PER_ELEMENT);let w=o.constructor,S=o.buffer,x={buffer:S,bufferByteLength:S.byteLength,byteOffset:o.byteOffset,byteLength:o.byteLength,bytesFilled:0,elementSize:y,viewConstructor:w,readerType:"byob"};if(s._pendingPullIntos.length>0){s._pendingPullIntos.push(x),Co(d,l);return}if(d._state==="closed"){let B=new w(x.buffer,x.byteOffset,0);l._closeSteps(B);return}if(s._queueTotalSize>0){if(yo(s,x)){let B=bo(x);wo(s),l._chunkSteps(B);return}if(s._closeRequested){let B=new TypeError("Insufficient bytes to fill elements in the given buffer");Le(s,B),l._errorSteps(B);return}}s._pendingPullIntos.push(x),Co(d,l),ft(s)}function Xh(s,o){let l=s._controlledReadableByteStream;if(vs(l))for(;vo(l)>0;){let d=en(s);Es(l,d)}}function Zh(s,o,l){if(_o(s,o,l),l.bytesFilled<l.elementSize)return;en(s);let d=l.bytesFilled%l.elementSize;if(d>0){let y=l.byteOffset+l.bytesFilled,w=po(l.buffer,y-d,y);Jr(s,w,0,w.byteLength)}l.bytesFilled-=d,Es(s._controlledReadableByteStream,l),So(s)}function Ro(s,o){let l=s._pendingPullIntos.peek();Ts(s),s._controlledReadableByteStream._state==="closed"?Xh(s):Zh(s,o,l),ft(s)}function en(s){return s._pendingPullIntos.shift()}function Jh(s){let o=s._controlledReadableByteStream;return o._state!=="readable"||s._closeRequested||!s._started?!1:!!(io(o)&&Kr(o)>0||vs(o)&&vo(o)>0||Eo(s)>0)}function tn(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0}function mr(s){let o=s._controlledReadableByteStream;if(!(s._closeRequested||o._state!=="readable")){if(s._queueTotalSize>0){s._closeRequested=!0;return}if(s._pendingPullIntos.length>0&&s._pendingPullIntos.peek().bytesFilled>0){let d=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Le(s,d),d}tn(s),Tr(o)}}function rn(s,o){let l=s._controlledReadableByteStream;if(s._closeRequested||l._state!=="readable")return;let d=o.buffer,y=o.byteOffset,w=o.byteLength,S=d;if(s._pendingPullIntos.length>0){let x=s._pendingPullIntos.peek();Zr(x.buffer),x.buffer=x.buffer}if(Ts(s),io(l))if(Kr(l)===0)Jr(s,S,y,w);else{s._pendingPullIntos.length>0&&en(s);let x=new Uint8Array(S,y,w);_s(l,x,!1)}else vs(l)?(Jr(s,S,y,w),So(s)):Jr(s,S,y,w);ft(s)}function Le(s,o){let l=s._controlledReadableByteStream;l._state==="readable"&&(go(s),et(s),tn(s),Xo(l,o))}function As(s){if(s._byobRequest===null&&s._pendingPullIntos.length>0){let o=s._pendingPullIntos.peek(),l=new Uint8Array(o.buffer,o.byteOffset+o.bytesFilled,o.byteLength-o.bytesFilled),d=Object.create(pr.prototype);tf(d,s,l),s._byobRequest=d}return s._byobRequest}function Eo(s){let o=s._controlledReadableByteStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function nn(s,o){let l=s._pendingPullIntos.peek();if(s._controlledReadableByteStream._state==="closed"){if(o!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(o===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(l.bytesFilled+o>l.byteLength)throw new RangeError("bytesWritten out of range")}l.buffer=l.buffer,Ro(s,o)}function sn(s,o){let l=s._pendingPullIntos.peek();if(s._controlledReadableByteStream._state==="closed"){if(o.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(o.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(l.byteOffset+l.bytesFilled!==o.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(l.bufferByteLength!==o.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(l.bytesFilled+o.byteLength>l.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let y=o.byteLength;l.buffer=o.buffer,Ro(s,y)}function To(s,o,l,d,y,w,S){o._controlledReadableByteStream=s,o._pullAgain=!1,o._pulling=!1,o._byobRequest=null,o._queue=o._queueTotalSize=void 0,et(o),o._closeRequested=!1,o._started=!1,o._strategyHWM=w,o._pullAlgorithm=d,o._cancelAlgorithm=y,o._autoAllocateChunkSize=S,o._pendingPullIntos=new V,s._readableStreamController=o;let x=l();R(m(x),()=>{o._started=!0,ft(o)},B=>{Le(o,B)})}function ef(s,o,l){let d=Object.create(Lt.prototype),y=()=>{},w=()=>m(void 0),S=()=>m(void 0);o.start!==void 0&&(y=()=>o.start(d)),o.pull!==void 0&&(w=()=>o.pull(d)),o.cancel!==void 0&&(S=B=>o.cancel(B));let x=o.autoAllocateChunkSize;if(x===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");To(s,d,y,w,S,l,x)}function tf(s,o,l){s._associatedReadableByteStreamController=o,s._view=l}function Cs(s){return new TypeError(`ReadableStreamBYOBRequest.prototype.${s} can only be used on a ReadableStreamBYOBRequest`)}function gr(s){return new TypeError(`ReadableByteStreamController.prototype.${s} can only be used on a ReadableByteStreamController`)}function Ao(s){return new br(s)}function Co(s,o){s._reader._readIntoRequests.push(o)}function rf(s,o,l){let y=s._reader._readIntoRequests.shift();l?y._closeSteps(o):y._chunkSteps(o)}function vo(s){return s._reader._readIntoRequests.length}function vs(s){let o=s._reader;return!(o===void 0||!dt(o))}class br{constructor(o){if(ke(o,1,"ReadableStreamBYOBReader"),ys(o,"First parameter"),st(o))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ht(o._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");K(this,o),this._readIntoRequests=new V}get closed(){return dt(this)?this._closedPromise:p(on("closed"))}cancel(o=void 0){return dt(this)?this._ownerReadableStream===void 0?p(Be("cancel")):ee(this,o):p(on("cancel"))}read(o){if(!dt(this))return p(on("read"));if(!ArrayBuffer.isView(o))return p(new TypeError("view must be an array buffer view"));if(o.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(o.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(Zr(o.buffer),this._ownerReadableStream===void 0)return p(Be("read from"));let l,d,y=b((S,x)=>{l=S,d=x});return xo(this,o,{_chunkSteps:S=>l({value:S,done:!1}),_closeSteps:S=>l({value:S,done:!0}),_errorSteps:S=>d(S)}),y}releaseLock(){if(!dt(this))throw on("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");oe(this)}}}Object.defineProperties(br.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(br.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function dt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readIntoRequests")?!1:s instanceof br}function xo(s,o,l){let d=s._ownerReadableStream;d._disturbed=!0,d._state==="errored"?l._errorSteps(d._storedError):Kh(d._readableStreamController,o,l)}function on(s){return new TypeError(`ReadableStreamBYOBReader.prototype.${s} can only be used on a ReadableStreamBYOBReader`)}function yr(s,o){let{highWaterMark:l}=s;if(l===void 0)return o;if(ho(l)||l<0)throw new RangeError("Invalid highWaterMark");return l}function an(s){let{size:o}=s;return o||(()=>1)}function ln(s,o){Ie(s,o);let l=s==null?void 0:s.highWaterMark,d=s==null?void 0:s.size;return{highWaterMark:l===void 0?void 0:bs(l),size:d===void 0?void 0:nf(d,`${o} has member 'size' that`)}}function nf(s,o){return $e(s,o),l=>bs(s(l))}function sf(s,o){Ie(s,o);let l=s==null?void 0:s.abort,d=s==null?void 0:s.close,y=s==null?void 0:s.start,w=s==null?void 0:s.type,S=s==null?void 0:s.write;return{abort:l===void 0?void 0:of(l,s,`${o} has member 'abort' that`),close:d===void 0?void 0:af(d,s,`${o} has member 'close' that`),start:y===void 0?void 0:lf(y,s,`${o} has member 'start' that`),write:S===void 0?void 0:uf(S,s,`${o} has member 'write' that`),type:w}}function of(s,o,l){return $e(s,l),d=>D(s,o,[d])}function af(s,o,l){return $e(s,l),()=>D(s,o,[])}function lf(s,o,l){return $e(s,l),d=>$(s,o,[d])}function uf(s,o,l){return $e(s,l),(d,y)=>D(s,o,[d,y])}function Oo(s,o){if(!Pt(s))throw new TypeError(`${o} is not a WritableStream.`)}function cf(s){if(typeof s!="object"||s===null)return!1;try{return typeof s.aborted=="boolean"}catch{return!1}}let hf=typeof AbortController=="function";function ff(){if(hf)return new AbortController}class _r{constructor(o={},l={}){o===void 0?o=null:to(o,"First parameter");let d=ln(l,"Second parameter"),y=sf(o,"First parameter");if($o(this),y.type!==void 0)throw new RangeError("Invalid type is specified");let S=an(d),x=yr(d,1);Cf(this,y,x,S)}get locked(){if(!Pt(this))throw dn("locked");return Nt(this)}abort(o=void 0){return Pt(this)?Nt(this)?p(new TypeError("Cannot abort a stream that already has a writer")):un(this,o):p(dn("abort"))}close(){return Pt(this)?Nt(this)?p(new TypeError("Cannot close a stream that already has a writer")):Fe(this)?p(new TypeError("Cannot close an already-closing stream")):Lo(this):p(dn("close"))}getWriter(){if(!Pt(this))throw dn("getWriter");return Io(this)}}Object.defineProperties(_r.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(_r.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function Io(s){return new wr(s)}function df(s,o,l,d,y=1,w=()=>1){let S=Object.create(_r.prototype);$o(S);let x=Object.create(Dt.prototype);return Fo(S,x,s,o,l,d,y,w),S}function $o(s){s._state="writable",s._storedError=void 0,s._writer=void 0,s._writableStreamController=void 0,s._writeRequests=new V,s._inFlightWriteRequest=void 0,s._closeRequest=void 0,s._inFlightCloseRequest=void 0,s._pendingAbortRequest=void 0,s._backpressure=!1}function Pt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_writableStreamController")?!1:s instanceof _r}function Nt(s){return s._writer!==void 0}function un(s,o){var l;if(s._state==="closed"||s._state==="errored")return m(void 0);s._writableStreamController._abortReason=o,(l=s._writableStreamController._abortController)===null||l===void 0||l.abort();let d=s._state;if(d==="closed"||d==="errored")return m(void 0);if(s._pendingAbortRequest!==void 0)return s._pendingAbortRequest._promise;let y=!1;d==="erroring"&&(y=!0,o=void 0);let w=b((S,x)=>{s._pendingAbortRequest={_promise:void 0,_resolve:S,_reject:x,_reason:o,_wasAlreadyErroring:y}});return s._pendingAbortRequest._promise=w,y||Os(s,o),w}function Lo(s){let o=s._state;if(o==="closed"||o==="errored")return p(new TypeError(`The stream (in ${o} state) is not in the writable state and cannot be closed`));let l=b((y,w)=>{let S={_resolve:y,_reject:w};s._closeRequest=S}),d=s._writer;return d!==void 0&&s._backpressure&&o==="writable"&&Fs(d),vf(s._writableStreamController),l}function pf(s){return b((l,d)=>{let y={_resolve:l,_reject:d};s._writeRequests.push(y)})}function xs(s,o){if(s._state==="writable"){Os(s,o);return}Is(s)}function Os(s,o){let l=s._writableStreamController;s._state="erroring",s._storedError=o;let d=s._writer;d!==void 0&&No(d,o),!_f(s)&&l._started&&Is(s)}function Is(s){s._state="errored",s._writableStreamController[Ze]();let o=s._storedError;if(s._writeRequests.forEach(y=>{y._reject(o)}),s._writeRequests=new V,s._pendingAbortRequest===void 0){cn(s);return}let l=s._pendingAbortRequest;if(s._pendingAbortRequest=void 0,l._wasAlreadyErroring){l._reject(o),cn(s);return}let d=s._writableStreamController[Ot](l._reason);R(d,()=>{l._resolve(),cn(s)},y=>{l._reject(y),cn(s)})}function mf(s){s._inFlightWriteRequest._resolve(void 0),s._inFlightWriteRequest=void 0}function gf(s,o){s._inFlightWriteRequest._reject(o),s._inFlightWriteRequest=void 0,xs(s,o)}function bf(s){s._inFlightCloseRequest._resolve(void 0),s._inFlightCloseRequest=void 0,s._state==="erroring"&&(s._storedError=void 0,s._pendingAbortRequest!==void 0&&(s._pendingAbortRequest._resolve(),s._pendingAbortRequest=void 0)),s._state="closed";let l=s._writer;l!==void 0&&Mo(l)}function yf(s,o){s._inFlightCloseRequest._reject(o),s._inFlightCloseRequest=void 0,s._pendingAbortRequest!==void 0&&(s._pendingAbortRequest._reject(o),s._pendingAbortRequest=void 0),xs(s,o)}function Fe(s){return!(s._closeRequest===void 0&&s._inFlightCloseRequest===void 0)}function _f(s){return!(s._inFlightWriteRequest===void 0&&s._inFlightCloseRequest===void 0)}function wf(s){s._inFlightCloseRequest=s._closeRequest,s._closeRequest=void 0}function Sf(s){s._inFlightWriteRequest=s._writeRequests.shift()}function cn(s){s._closeRequest!==void 0&&(s._closeRequest._reject(s._storedError),s._closeRequest=void 0);let o=s._writer;o!==void 0&&Hs(o,s._storedError)}function $s(s,o){let l=s._writer;l!==void 0&&o!==s._backpressure&&(o?Nf(l):Fs(l)),s._backpressure=o}class wr{constructor(o){if(ke(o,1,"WritableStreamDefaultWriter"),Oo(o,"First parameter"),Nt(o))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=o,o._writer=this;let l=o._state;if(l==="writable")!Fe(o)&&o._backpressure?mn(this):ko(this),pn(this);else if(l==="erroring")Bs(this,o._storedError),pn(this);else if(l==="closed")ko(this),Lf(this);else{let d=o._storedError;Bs(this,d),zo(this,d)}}get closed(){return pt(this)?this._closedPromise:p(mt("closed"))}get desiredSize(){if(!pt(this))throw mt("desiredSize");if(this._ownerWritableStream===void 0)throw Sr("desiredSize");return Af(this)}get ready(){return pt(this)?this._readyPromise:p(mt("ready"))}abort(o=void 0){return pt(this)?this._ownerWritableStream===void 0?p(Sr("abort")):Rf(this,o):p(mt("abort"))}close(){if(!pt(this))return p(mt("close"));let o=this._ownerWritableStream;return o===void 0?p(Sr("close")):Fe(o)?p(new TypeError("Cannot close an already-closing stream")):Po(this)}releaseLock(){if(!pt(this))throw mt("releaseLock");this._ownerWritableStream!==void 0&&Do(this)}write(o=void 0){return pt(this)?this._ownerWritableStream===void 0?p(Sr("write to")):Ho(this,o):p(mt("write"))}}Object.defineProperties(wr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(wr.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function pt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_ownerWritableStream")?!1:s instanceof wr}function Rf(s,o){let l=s._ownerWritableStream;return un(l,o)}function Po(s){let o=s._ownerWritableStream;return Lo(o)}function Ef(s){let o=s._ownerWritableStream,l=o._state;return Fe(o)||l==="closed"?m(void 0):l==="errored"?p(o._storedError):Po(s)}function Tf(s,o){s._closedPromiseState==="pending"?Hs(s,o):Pf(s,o)}function No(s,o){s._readyPromiseState==="pending"?Wo(s,o):Df(s,o)}function Af(s){let o=s._ownerWritableStream,l=o._state;return l==="errored"||l==="erroring"?null:l==="closed"?0:qo(o._writableStreamController)}function Do(s){let o=s._ownerWritableStream,l=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");No(s,l),Tf(s,l),o._writer=void 0,s._ownerWritableStream=void 0}function Ho(s,o){let l=s._ownerWritableStream,d=l._writableStreamController,y=xf(d,o);if(l!==s._ownerWritableStream)return p(Sr("write to"));let w=l._state;if(w==="errored")return p(l._storedError);if(Fe(l)||w==="closed")return p(new TypeError("The stream is closing or closed and cannot be written to"));if(w==="erroring")return p(l._storedError);let S=pf(l);return Of(d,o,y),S}let Bo={};class Dt{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Ls(this))throw Ds("abortReason");return this._abortReason}get signal(){if(!Ls(this))throw Ds("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(o=void 0){if(!Ls(this))throw Ds("error");this._controlledWritableStream._state==="writable"&&Uo(this,o)}[Ot](o){let l=this._abortAlgorithm(o);return hn(this),l}[Ze](){et(this)}}Object.defineProperties(Dt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Dt.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Ls(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledWritableStream")?!1:s instanceof Dt}function Fo(s,o,l,d,y,w,S,x){o._controlledWritableStream=s,s._writableStreamController=o,o._queue=void 0,o._queueTotalSize=void 0,et(o),o._abortReason=void 0,o._abortController=ff(),o._started=!1,o._strategySizeAlgorithm=x,o._strategyHWM=S,o._writeAlgorithm=d,o._closeAlgorithm=y,o._abortAlgorithm=w;let B=Ns(o);$s(s,B);let U=l(),M=m(U);R(M,()=>{o._started=!0,fn(o)},k=>{o._started=!0,xs(s,k)})}function Cf(s,o,l,d){let y=Object.create(Dt.prototype),w=()=>{},S=()=>m(void 0),x=()=>m(void 0),B=()=>m(void 0);o.start!==void 0&&(w=()=>o.start(y)),o.write!==void 0&&(S=U=>o.write(U,y)),o.close!==void 0&&(x=()=>o.close()),o.abort!==void 0&&(B=U=>o.abort(U)),Fo(s,y,w,S,x,B,l,d)}function hn(s){s._writeAlgorithm=void 0,s._closeAlgorithm=void 0,s._abortAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function vf(s){Ss(s,Bo,0),fn(s)}function xf(s,o){try{return s._strategySizeAlgorithm(o)}catch(l){return Ps(s,l),1}}function qo(s){return s._strategyHWM-s._queueTotalSize}function Of(s,o,l){try{Ss(s,o,l)}catch(y){Ps(s,y);return}let d=s._controlledWritableStream;if(!Fe(d)&&d._state==="writable"){let y=Ns(s);$s(d,y)}fn(s)}function fn(s){let o=s._controlledWritableStream;if(!s._started||o._inFlightWriteRequest!==void 0)return;if(o._state==="erroring"){Is(o);return}if(s._queue.length===0)return;let d=Qh(s);d===Bo?If(s):$f(s,d)}function Ps(s,o){s._controlledWritableStream._state==="writable"&&Uo(s,o)}function If(s){let o=s._controlledWritableStream;wf(o),ws(s);let l=s._closeAlgorithm();hn(s),R(l,()=>{bf(o)},d=>{yf(o,d)})}function $f(s,o){let l=s._controlledWritableStream;Sf(l);let d=s._writeAlgorithm(o);R(d,()=>{mf(l);let y=l._state;if(ws(s),!Fe(l)&&y==="writable"){let w=Ns(s);$s(l,w)}fn(s)},y=>{l._state==="writable"&&hn(s),gf(l,y)})}function Ns(s){return qo(s)<=0}function Uo(s,o){let l=s._controlledWritableStream;hn(s),Os(l,o)}function dn(s){return new TypeError(`WritableStream.prototype.${s} can only be used on a WritableStream`)}function Ds(s){return new TypeError(`WritableStreamDefaultController.prototype.${s} can only be used on a WritableStreamDefaultController`)}function mt(s){return new TypeError(`WritableStreamDefaultWriter.prototype.${s} can only be used on a WritableStreamDefaultWriter`)}function Sr(s){return new TypeError("Cannot "+s+" a stream using a released writer")}function pn(s){s._closedPromise=b((o,l)=>{s._closedPromise_resolve=o,s._closedPromise_reject=l,s._closedPromiseState="pending"})}function zo(s,o){pn(s),Hs(s,o)}function Lf(s){pn(s),Mo(s)}function Hs(s,o){s._closedPromise_reject!==void 0&&(L(s._closedPromise),s._closedPromise_reject(o),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0,s._closedPromiseState="rejected")}function Pf(s,o){zo(s,o)}function Mo(s){s._closedPromise_resolve!==void 0&&(s._closedPromise_resolve(void 0),s._closedPromise_resolve=void 0,s._closedPromise_reject=void 0,s._closedPromiseState="resolved")}function mn(s){s._readyPromise=b((o,l)=>{s._readyPromise_resolve=o,s._readyPromise_reject=l}),s._readyPromiseState="pending"}function Bs(s,o){mn(s),Wo(s,o)}function ko(s){mn(s),Fs(s)}function Wo(s,o){s._readyPromise_reject!==void 0&&(L(s._readyPromise),s._readyPromise_reject(o),s._readyPromise_resolve=void 0,s._readyPromise_reject=void 0,s._readyPromiseState="rejected")}function Nf(s){mn(s)}function Df(s,o){Bs(s,o)}function Fs(s){s._readyPromise_resolve!==void 0&&(s._readyPromise_resolve(void 0),s._readyPromise_resolve=void 0,s._readyPromise_reject=void 0,s._readyPromiseState="fulfilled")}let jo=typeof DOMException<"u"?DOMException:void 0;function Hf(s){if(!(typeof s=="function"||typeof s=="object"))return!1;try{return new s,!0}catch{return!1}}function Bf(){let s=function(l,d){this.message=l||"",this.name=d||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return s.prototype=Object.create(Error.prototype),Object.defineProperty(s.prototype,"constructor",{value:s,writable:!0,configurable:!0}),s}let Ff=Hf(jo)?jo:Bf();function Vo(s,o,l,d,y,w){let S=$t(s),x=Io(o);s._disturbed=!0;let B=!1,U=m(void 0);return b((M,k)=>{let te;if(w!==void 0){if(te=()=>{let P=new Ff("Aborted","AbortError"),q=[];d||q.push(()=>o._state==="writable"?un(o,P):m(void 0)),y||q.push(()=>s._state==="readable"?Pe(s,P):m(void 0)),fe(()=>Promise.all(q.map(G=>G())),!0,P)},w.aborted){te();return}w.addEventListener("abort",te)}function Ne(){return b((P,q)=>{function G(be){be?P():_(Ft(),G,q)}G(!1)})}function Ft(){return B?m(!0):_(x._readyPromise,()=>b((P,q)=>{fr(S,{_chunkSteps:G=>{U=_(Ho(x,G),void 0,r),P(!1)},_closeSteps:()=>P(!0),_errorSteps:q})}))}if(We(s,S._closedPromise,P=>{d?Se(!0,P):fe(()=>un(o,P),!0,P)}),We(o,x._closedPromise,P=>{y?Se(!0,P):fe(()=>Pe(s,P),!0,P)}),ue(s,S._closedPromise,()=>{l?Se():fe(()=>Ef(x))}),Fe(o)||o._state==="closed"){let P=new TypeError("the destination writable stream closed before all data could be piped to it");y?Se(!0,P):fe(()=>Pe(s,P),!0,P)}L(Ne());function it(){let P=U;return _(U,()=>P!==U?it():void 0)}function We(P,q,G){P._state==="errored"?G(P._storedError):A(q,G)}function ue(P,q,G){P._state==="closed"?G():E(q,G)}function fe(P,q,G){if(B)return;B=!0,o._state==="writable"&&!Fe(o)?E(it(),be):be();function be(){R(P(),()=>je(q,G),qt=>je(!0,qt))}}function Se(P,q){B||(B=!0,o._state==="writable"&&!Fe(o)?E(it(),()=>je(P,q)):je(P,q))}function je(P,q){Do(x),oe(S),w!==void 0&&w.removeEventListener("abort",te),P?k(q):M(void 0)}})}class Ht{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!gn(this))throw _n("desiredSize");return qs(this)}close(){if(!gn(this))throw _n("close");if(!Bt(this))throw new TypeError("The stream is not in a state that permits close");Er(this)}enqueue(o=void 0){if(!gn(this))throw _n("enqueue");if(!Bt(this))throw new TypeError("The stream is not in a state that permits enqueue");return yn(this,o)}error(o=void 0){if(!gn(this))throw _n("error");tt(this,o)}[we](o){et(this);let l=this._cancelAlgorithm(o);return bn(this),l}[ge](o){let l=this._controlledReadableStream;if(this._queue.length>0){let d=ws(this);this._closeRequested&&this._queue.length===0?(bn(this),Tr(l)):Rr(this),o._chunkSteps(d)}else so(l,o),Rr(this)}}Object.defineProperties(Ht.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ht.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function gn(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledReadableStream")?!1:s instanceof Ht}function Rr(s){if(!Go(s))return;if(s._pulling){s._pullAgain=!0;return}s._pulling=!0;let l=s._pullAlgorithm();R(l,()=>{s._pulling=!1,s._pullAgain&&(s._pullAgain=!1,Rr(s))},d=>{tt(s,d)})}function Go(s){let o=s._controlledReadableStream;return!Bt(s)||!s._started?!1:!!(st(o)&&Kr(o)>0||qs(s)>0)}function bn(s){s._pullAlgorithm=void 0,s._cancelAlgorithm=void 0,s._strategySizeAlgorithm=void 0}function Er(s){if(!Bt(s))return;let o=s._controlledReadableStream;s._closeRequested=!0,s._queue.length===0&&(bn(s),Tr(o))}function yn(s,o){if(!Bt(s))return;let l=s._controlledReadableStream;if(st(l)&&Kr(l)>0)_s(l,o,!1);else{let d;try{d=s._strategySizeAlgorithm(o)}catch(y){throw tt(s,y),y}try{Ss(s,o,d)}catch(y){throw tt(s,y),y}}Rr(s)}function tt(s,o){let l=s._controlledReadableStream;l._state==="readable"&&(et(s),bn(s),Xo(l,o))}function qs(s){let o=s._controlledReadableStream._state;return o==="errored"?null:o==="closed"?0:s._strategyHWM-s._queueTotalSize}function qf(s){return!Go(s)}function Bt(s){let o=s._controlledReadableStream._state;return!s._closeRequested&&o==="readable"}function Yo(s,o,l,d,y,w,S){o._controlledReadableStream=s,o._queue=void 0,o._queueTotalSize=void 0,et(o),o._started=!1,o._closeRequested=!1,o._pullAgain=!1,o._pulling=!1,o._strategySizeAlgorithm=S,o._strategyHWM=w,o._pullAlgorithm=d,o._cancelAlgorithm=y,s._readableStreamController=o;let x=l();R(m(x),()=>{o._started=!0,Rr(o)},B=>{tt(o,B)})}function Uf(s,o,l,d){let y=Object.create(Ht.prototype),w=()=>{},S=()=>m(void 0),x=()=>m(void 0);o.start!==void 0&&(w=()=>o.start(y)),o.pull!==void 0&&(S=()=>o.pull(y)),o.cancel!==void 0&&(x=B=>o.cancel(B)),Yo(s,y,w,S,x,l,d)}function _n(s){return new TypeError(`ReadableStreamDefaultController.prototype.${s} can only be used on a ReadableStreamDefaultController`)}function zf(s,o){return ht(s._readableStreamController)?kf(s):Mf(s)}function Mf(s,o){let l=$t(s),d=!1,y=!1,w=!1,S=!1,x,B,U,M,k,te=b(ue=>{k=ue});function Ne(){return d?(y=!0,m(void 0)):(d=!0,fr(l,{_chunkSteps:fe=>{T(()=>{y=!1;let Se=fe,je=fe;w||yn(U._readableStreamController,Se),S||yn(M._readableStreamController,je),d=!1,y&&Ne()})},_closeSteps:()=>{d=!1,w||Er(U._readableStreamController),S||Er(M._readableStreamController),(!w||!S)&&k(void 0)},_errorSteps:()=>{d=!1}}),m(void 0))}function Ft(ue){if(w=!0,x=ue,S){let fe=dr([x,B]),Se=Pe(s,fe);k(Se)}return te}function it(ue){if(S=!0,B=ue,w){let fe=dr([x,B]),Se=Pe(s,fe);k(Se)}return te}function We(){}return U=Us(We,Ne,Ft),M=Us(We,Ne,it),A(l._closedPromise,ue=>{tt(U._readableStreamController,ue),tt(M._readableStreamController,ue),(!w||!S)&&k(void 0)}),[U,M]}function kf(s){let o=$t(s),l=!1,d=!1,y=!1,w=!1,S=!1,x,B,U,M,k,te=b(P=>{k=P});function Ne(P){A(P._closedPromise,q=>{P===o&&(Le(U._readableStreamController,q),Le(M._readableStreamController,q),(!w||!S)&&k(void 0))})}function Ft(){dt(o)&&(oe(o),o=$t(s),Ne(o)),fr(o,{_chunkSteps:q=>{T(()=>{d=!1,y=!1;let G=q,be=q;if(!w&&!S)try{be=mo(q)}catch(qt){Le(U._readableStreamController,qt),Le(M._readableStreamController,qt),k(Pe(s,qt));return}w||rn(U._readableStreamController,G),S||rn(M._readableStreamController,be),l=!1,d?We():y&&ue()})},_closeSteps:()=>{l=!1,w||mr(U._readableStreamController),S||mr(M._readableStreamController),U._readableStreamController._pendingPullIntos.length>0&&nn(U._readableStreamController,0),M._readableStreamController._pendingPullIntos.length>0&&nn(M._readableStreamController,0),(!w||!S)&&k(void 0)},_errorSteps:()=>{l=!1}})}function it(P,q){Je(o)&&(oe(o),o=Ao(s),Ne(o));let G=q?M:U,be=q?U:M;xo(o,P,{_chunkSteps:Ut=>{T(()=>{d=!1,y=!1;let zt=q?S:w;if(q?w:S)zt||sn(G._readableStreamController,Ut);else{let ca;try{ca=mo(Ut)}catch(Ms){Le(G._readableStreamController,Ms),Le(be._readableStreamController,Ms),k(Pe(s,Ms));return}zt||sn(G._readableStreamController,Ut),rn(be._readableStreamController,ca)}l=!1,d?We():y&&ue()})},_closeSteps:Ut=>{l=!1;let zt=q?S:w,xn=q?w:S;zt||mr(G._readableStreamController),xn||mr(be._readableStreamController),Ut!==void 0&&(zt||sn(G._readableStreamController,Ut),!xn&&be._readableStreamController._pendingPullIntos.length>0&&nn(be._readableStreamController,0)),(!zt||!xn)&&k(void 0)},_errorSteps:()=>{l=!1}})}function We(){if(l)return d=!0,m(void 0);l=!0;let P=As(U._readableStreamController);return P===null?Ft():it(P._view,!1),m(void 0)}function ue(){if(l)return y=!0,m(void 0);l=!0;let P=As(M._readableStreamController);return P===null?Ft():it(P._view,!0),m(void 0)}function fe(P){if(w=!0,x=P,S){let q=dr([x,B]),G=Pe(s,q);k(G)}return te}function Se(P){if(S=!0,B=P,w){let q=dr([x,B]),G=Pe(s,q);k(G)}return te}function je(){}return U=Ko(je,We,fe),M=Ko(je,ue,Se),Ne(o),[U,M]}function Wf(s,o){Ie(s,o);let l=s,d=l==null?void 0:l.autoAllocateChunkSize,y=l==null?void 0:l.cancel,w=l==null?void 0:l.pull,S=l==null?void 0:l.start,x=l==null?void 0:l.type;return{autoAllocateChunkSize:d===void 0?void 0:no(d,`${o} has member 'autoAllocateChunkSize' that`),cancel:y===void 0?void 0:jf(y,l,`${o} has member 'cancel' that`),pull:w===void 0?void 0:Vf(w,l,`${o} has member 'pull' that`),start:S===void 0?void 0:Gf(S,l,`${o} has member 'start' that`),type:x===void 0?void 0:Yf(x,`${o} has member 'type' that`)}}function jf(s,o,l){return $e(s,l),d=>D(s,o,[d])}function Vf(s,o,l){return $e(s,l),d=>D(s,o,[d])}function Gf(s,o,l){return $e(s,l),d=>$(s,o,[d])}function Yf(s,o){if(s=`${s}`,s!=="bytes")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamType`);return s}function Qf(s,o){Ie(s,o);let l=s==null?void 0:s.mode;return{mode:l===void 0?void 0:Kf(l,`${o} has member 'mode' that`)}}function Kf(s,o){if(s=`${s}`,s!=="byob")throw new TypeError(`${o} '${s}' is not a valid enumeration value for ReadableStreamReaderMode`);return s}function Xf(s,o){return Ie(s,o),{preventCancel:!!(s==null?void 0:s.preventCancel)}}function Qo(s,o){Ie(s,o);let l=s==null?void 0:s.preventAbort,d=s==null?void 0:s.preventCancel,y=s==null?void 0:s.preventClose,w=s==null?void 0:s.signal;return w!==void 0&&Zf(w,`${o} has member 'signal' that`),{preventAbort:!!l,preventCancel:!!d,preventClose:!!y,signal:w}}function Zf(s,o){if(!cf(s))throw new TypeError(`${o} is not an AbortSignal.`)}function Jf(s,o){Ie(s,o);let l=s==null?void 0:s.readable;gs(l,"readable","ReadableWritablePair"),ys(l,`${o} has member 'readable' that`);let d=s==null?void 0:s.writable;return gs(d,"writable","ReadableWritablePair"),Oo(d,`${o} has member 'writable' that`),{readable:l,writable:d}}class rt{constructor(o={},l={}){o===void 0?o=null:to(o,"First parameter");let d=ln(l,"Second parameter"),y=Wf(o,"First parameter");if(zs(this),y.type==="bytes"){if(d.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let w=yr(d,0);ef(this,y,w)}else{let w=an(d),S=yr(d,1);Uf(this,y,S,w)}}get locked(){if(!nt(this))throw gt("locked");return st(this)}cancel(o=void 0){return nt(this)?st(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):Pe(this,o):p(gt("cancel"))}getReader(o=void 0){if(!nt(this))throw gt("getReader");return Qf(o,"First parameter").mode===void 0?$t(this):Ao(this)}pipeThrough(o,l={}){if(!nt(this))throw gt("pipeThrough");ke(o,1,"pipeThrough");let d=Jf(o,"First parameter"),y=Qo(l,"Second parameter");if(st(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Nt(d.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let w=Vo(this,d.writable,y.preventClose,y.preventAbort,y.preventCancel,y.signal);return L(w),d.readable}pipeTo(o,l={}){if(!nt(this))return p(gt("pipeTo"));if(o===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Pt(o))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let d;try{d=Qo(l,"Second parameter")}catch(y){return p(y)}return st(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Nt(o)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Vo(this,o,d.preventClose,d.preventAbort,d.preventCancel,d.signal)}tee(){if(!nt(this))throw gt("tee");let o=zf(this);return dr(o)}values(o=void 0){if(!nt(this))throw gt("values");let l=Xf(o,"First parameter");return Gh(this,l.preventCancel)}}Object.defineProperties(rt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(rt.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(rt.prototype,e.asyncIterator,{value:rt.prototype.values,writable:!0,configurable:!0});function Us(s,o,l,d=1,y=()=>1){let w=Object.create(rt.prototype);zs(w);let S=Object.create(Ht.prototype);return Yo(w,S,s,o,l,d,y),w}function Ko(s,o,l){let d=Object.create(rt.prototype);zs(d);let y=Object.create(Lt.prototype);return To(d,y,s,o,l,0,void 0),d}function zs(s){s._state="readable",s._reader=void 0,s._storedError=void 0,s._disturbed=!1}function nt(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_readableStreamController")?!1:s instanceof rt}function st(s){return s._reader!==void 0}function Pe(s,o){if(s._disturbed=!0,s._state==="closed")return m(void 0);if(s._state==="errored")return p(s._storedError);Tr(s);let l=s._reader;l!==void 0&&dt(l)&&(l._readIntoRequests.forEach(y=>{y._closeSteps(void 0)}),l._readIntoRequests=new V);let d=s._readableStreamController[we](o);return N(d,r)}function Tr(s){s._state="closed";let o=s._reader;o!==void 0&&(Xe(o),Je(o)&&(o._readRequests.forEach(l=>{l._closeSteps()}),o._readRequests=new V))}function Xo(s,o){s._state="errored",s._storedError=o;let l=s._reader;l!==void 0&&(J(l,o),Je(l)?(l._readRequests.forEach(d=>{d._errorSteps(o)}),l._readRequests=new V):(l._readIntoRequests.forEach(d=>{d._errorSteps(o)}),l._readIntoRequests=new V))}function gt(s){return new TypeError(`ReadableStream.prototype.${s} can only be used on a ReadableStream`)}function Zo(s,o){Ie(s,o);let l=s==null?void 0:s.highWaterMark;return gs(l,"highWaterMark","QueuingStrategyInit"),{highWaterMark:bs(l)}}let Jo=s=>s.byteLength;try{Object.defineProperty(Jo,"name",{value:"size",configurable:!0})}catch{}class wn{constructor(o){ke(o,1,"ByteLengthQueuingStrategy"),o=Zo(o,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!ta(this))throw ea("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!ta(this))throw ea("size");return Jo}}Object.defineProperties(wn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(wn.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function ea(s){return new TypeError(`ByteLengthQueuingStrategy.prototype.${s} can only be used on a ByteLengthQueuingStrategy`)}function ta(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_byteLengthQueuingStrategyHighWaterMark")?!1:s instanceof wn}let ra=()=>1;try{Object.defineProperty(ra,"name",{value:"size",configurable:!0})}catch{}class Sn{constructor(o){ke(o,1,"CountQueuingStrategy"),o=Zo(o,"First parameter"),this._countQueuingStrategyHighWaterMark=o.highWaterMark}get highWaterMark(){if(!sa(this))throw na("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!sa(this))throw na("size");return ra}}Object.defineProperties(Sn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Sn.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function na(s){return new TypeError(`CountQueuingStrategy.prototype.${s} can only be used on a CountQueuingStrategy`)}function sa(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_countQueuingStrategyHighWaterMark")?!1:s instanceof Sn}function ed(s,o){Ie(s,o);let l=s==null?void 0:s.flush,d=s==null?void 0:s.readableType,y=s==null?void 0:s.start,w=s==null?void 0:s.transform,S=s==null?void 0:s.writableType;return{flush:l===void 0?void 0:td(l,s,`${o} has member 'flush' that`),readableType:d,start:y===void 0?void 0:rd(y,s,`${o} has member 'start' that`),transform:w===void 0?void 0:nd(w,s,`${o} has member 'transform' that`),writableType:S}}function td(s,o,l){return $e(s,l),d=>D(s,o,[d])}function rd(s,o,l){return $e(s,l),d=>$(s,o,[d])}function nd(s,o,l){return $e(s,l),(d,y)=>D(s,o,[d,y])}class Rn{constructor(o={},l={},d={}){o===void 0&&(o=null);let y=ln(l,"Second parameter"),w=ln(d,"Third parameter"),S=ed(o,"First parameter");if(S.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(S.writableType!==void 0)throw new RangeError("Invalid writableType specified");let x=yr(w,0),B=an(w),U=yr(y,1),M=an(y),k,te=b(Ne=>{k=Ne});sd(this,te,U,M,x,B),od(this,S),S.start!==void 0?k(S.start(this._transformStreamController)):k(void 0)}get readable(){if(!ia(this))throw ua("readable");return this._readable}get writable(){if(!ia(this))throw ua("writable");return this._writable}}Object.defineProperties(Rn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Rn.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function sd(s,o,l,d,y,w){function S(){return o}function x(te){return ud(s,te)}function B(te){return cd(s,te)}function U(){return hd(s)}s._writable=df(S,x,U,B,l,d);function M(){return fd(s)}function k(te){return Tn(s,te),m(void 0)}s._readable=Us(S,M,k,y,w),s._backpressure=void 0,s._backpressureChangePromise=void 0,s._backpressureChangePromise_resolve=void 0,An(s,!0),s._transformStreamController=void 0}function ia(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_transformStreamController")?!1:s instanceof Rn}function En(s,o){tt(s._readable._readableStreamController,o),Tn(s,o)}function Tn(s,o){oa(s._transformStreamController),Ps(s._writable._writableStreamController,o),s._backpressure&&An(s,!1)}function An(s,o){s._backpressureChangePromise!==void 0&&s._backpressureChangePromise_resolve(),s._backpressureChangePromise=b(l=>{s._backpressureChangePromise_resolve=l}),s._backpressure=o}class Ar{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Cn(this))throw vn("desiredSize");let o=this._controlledTransformStream._readable._readableStreamController;return qs(o)}enqueue(o=void 0){if(!Cn(this))throw vn("enqueue");aa(this,o)}error(o=void 0){if(!Cn(this))throw vn("error");ad(this,o)}terminate(){if(!Cn(this))throw vn("terminate");ld(this)}}Object.defineProperties(Ar.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ar.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Cn(s){return!a(s)||!Object.prototype.hasOwnProperty.call(s,"_controlledTransformStream")?!1:s instanceof Ar}function id(s,o,l,d){o._controlledTransformStream=s,s._transformStreamController=o,o._transformAlgorithm=l,o._flushAlgorithm=d}function od(s,o){let l=Object.create(Ar.prototype),d=w=>{try{return aa(l,w),m(void 0)}catch(S){return p(S)}},y=()=>m(void 0);o.transform!==void 0&&(d=w=>o.transform(w,l)),o.flush!==void 0&&(y=()=>o.flush(l)),id(s,l,d,y)}function oa(s){s._transformAlgorithm=void 0,s._flushAlgorithm=void 0}function aa(s,o){let l=s._controlledTransformStream,d=l._readable._readableStreamController;if(!Bt(d))throw new TypeError("Readable side is not in a state that permits enqueue");try{yn(d,o)}catch(w){throw Tn(l,w),l._readable._storedError}qf(d)!==l._backpressure&&An(l,!0)}function ad(s,o){En(s._controlledTransformStream,o)}function la(s,o){let l=s._transformAlgorithm(o);return N(l,void 0,d=>{throw En(s._controlledTransformStream,d),d})}function ld(s){let o=s._controlledTransformStream,l=o._readable._readableStreamController;Er(l);let d=new TypeError("TransformStream terminated");Tn(o,d)}function ud(s,o){let l=s._transformStreamController;if(s._backpressure){let d=s._backpressureChangePromise;return N(d,()=>{let y=s._writable;if(y._state==="erroring")throw y._storedError;return la(l,o)})}return la(l,o)}function cd(s,o){return En(s,o),m(void 0)}function hd(s){let o=s._readable,l=s._transformStreamController,d=l._flushAlgorithm();return oa(l),N(d,()=>{if(o._state==="errored")throw o._storedError;Er(o._readableStreamController)},y=>{throw En(s,y),o._storedError})}function fd(s){return An(s,!1),s._backpressureChangePromise}function vn(s){return new TypeError(`TransformStreamDefaultController.prototype.${s} can only be used on a TransformStreamDefaultController`)}function ua(s){return new TypeError(`TransformStream.prototype.${s} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=wn,t.CountQueuingStrategy=Sn,t.ReadableByteStreamController=Lt,t.ReadableStream=rt,t.ReadableStreamBYOBReader=br,t.ReadableStreamBYOBRequest=pr,t.ReadableStreamDefaultController=Ht,t.ReadableStreamDefaultReader=hr,t.TransformStream=Rn,t.TransformStreamDefaultController=Ar,t.WritableStream=_r,t.WritableStreamDefaultController=Dt,t.WritableStreamDefaultWriter=wr,Object.defineProperty(t,"__esModule",{value:!0})})});var Ca=C(()=>{if(!globalThis.ReadableStream)try{let t=ye("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,ye("node:stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,Aa())}try{let{Blob:t}=ye("buffer");t&&!t.prototype.stream&&(t.prototype.stream=function(r){let n=0,i=this;return new ReadableStream({type:"bytes",async pull(a){let h=await i.slice(n,Math.min(i.size,n+65536)).arrayBuffer();n+=h.byteLength,a.enqueue(new Uint8Array(h)),n===i.size&&a.close()}})})}catch{}});async function*Js(t,e=!0){for(let r of t)if("stream"in r)yield*r.stream();else if(ArrayBuffer.isView(r))if(e){let n=r.byteOffset,i=r.byteOffset+r.byteLength;for(;n!==i;){let a=Math.min(i-n,va),u=r.buffer.slice(n,n+a);n+=u.byteLength,yield new Uint8Array(u)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let u=await i.slice(n,Math.min(i.size,n+va)).arrayBuffer();n+=u.byteLength,yield new Uint8Array(u)}}}var Uy,va,xa,Id,Ve,xr=Cr(()=>{Uy=Re(Ca(),1);va=65536;xa=class ei{#e=[];#r="";#t=0;#n="transparent";constructor(e=[],r={}){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 r!="object"&&typeof r!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");r===null&&(r={});let n=new TextEncoder;for(let a of e){let u;ArrayBuffer.isView(a)?u=new Uint8Array(a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength)):a instanceof ArrayBuffer?u=new Uint8Array(a.slice(0)):a instanceof ei?u=a:u=n.encode(`${a}`),this.#t+=ArrayBuffer.isView(u)?u.byteLength:u.size,this.#e.push(u)}this.#n=`${r.endings===void 0?"transparent":r.endings}`;let i=r.type===void 0?"":String(r.type);this.#r=/^[\x20-\x7E]*$/.test(i)?i:""}get size(){return this.#t}get type(){return this.#r}async text(){let e=new TextDecoder,r="";for await(let n of Js(this.#e,!1))r+=e.decode(n,{stream:!0});return r+=e.decode(),r}async arrayBuffer(){let e=new Uint8Array(this.size),r=0;for await(let n of Js(this.#e,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=Js(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(r){let n=await e.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await e.return()}})}slice(e=0,r=this.size,n=""){let{size:i}=this,a=e<0?Math.max(i+e,0):Math.min(e,i),u=r<0?Math.max(i+r,0):Math.min(r,i),h=Math.max(u-a,0),f=this.#e,c=[],g=0;for(let m of f){if(g>=h)break;let p=ArrayBuffer.isView(m)?m.byteLength:m.size;if(a&&p<=a)a-=p,u-=p;else{let _;ArrayBuffer.isView(m)?(_=m.subarray(a,Math.min(p,u)),g+=_.byteLength):(_=m.slice(a,Math.min(p,u)),g+=_.size),u-=p,c.push(_),a=0}}let b=new ei([],{type:String(n).toLowerCase()});return b.#t=h,b.#e=c,b}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(xa.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Id=xa,Ve=Id});var $d,Ld,kt,ti=Cr(()=>{xr();$d=class extends Ve{#e=0;#r="";constructor(e,r,n={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,n),n===null&&(n={});let i=n.lastModified===void 0?Date.now():Number(n.lastModified);Number.isNaN(i)||(this.#e=i),this.#r=String(r)}get name(){return this.#r}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof Ve&&/^(File)$/.test(e[Symbol.toStringTag])}},Ld=$d,kt=Ld});function $a(t,e=Ve){var r=`${Oa()}${Oa()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
4
+ Content-Disposition: form-data; name="`;return t.forEach((a,u)=>typeof a=="string"?n.push(i+ri(u)+`"\r
5
5
  \r
6
6
  ${a.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
7
7
  `)}\r
8
- `):n.push(i+ti(u)+`"; filename="${ti(a.name,1)}"\r
8
+ `):n.push(i+ri(u)+`"; filename="${ri(a.name,1)}"\r
9
9
  Content-Type: ${a.type||"application/octet-stream"}\r
10
10
  \r
11
11
  `,a,`\r
12
- `)),n.push(`--${r}--`),new e(n,{type:"multipart/form-data; boundary="+r})}var Or,$d,Pd,xa,Nd,Oa,ti,bt,yt,In=Cr(()=>{xr();ei();({toStringTag:Or,iterator:$d,hasInstance:Pd}=Symbol),xa=Math.random,Nd="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Oa=(t,e,r)=>(t+="",/^(Blob|File)$/.test(e&&e[Or])?[(r=r!==void 0?r+"":e[Or]=="File"?e.name:"blob",t),e.name!==r||e[Or]=="blob"?new Wt([e],r,e):e]:[t,e+""]),ti=(t,e)=>(e?t:t.replace(/\r?\n|\r/g,`\r
13
- `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),bt=(t,e,r)=>{if(e.length<r)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${r} arguments required, but only ${e.length} present.`)},yt=class{#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Or](){return"FormData"}[$d](){return this.entries()}static[Pd](e){return e&&typeof e=="object"&&e[Or]==="FormData"&&!Nd.some(r=>typeof e[r]!="function")}append(...e){bt("append",arguments,2),this.#e.push(Oa(...e))}delete(e){bt("delete",arguments,1),e+="",this.#e=this.#e.filter(([r])=>r!==e)}get(e){bt("get",arguments,1),e+="";for(var r=this.#e,n=r.length,i=0;i<n;i++)if(r[i][0]===e)return r[i][1];return null}getAll(e,r){return bt("getAll",arguments,1),r=[],e+="",this.#e.forEach(n=>n[0]===e&&r.push(n[1])),r}has(e){return bt("has",arguments,1),e+="",this.#e.some(r=>r[0]===e)}forEach(e,r){bt("forEach",arguments,1);for(var[n,i]of this)e.call(r,i,n,this)}set(...e){bt("set",arguments,2);var r=[],n=!0;e=Oa(...e),this.#e.forEach(i=>{i[0]===e[0]?n&&(n=!r.push(e)):r.push(i)}),n&&r.push(e),this.#e=r}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}}});var Da=C((Zy,Na)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=ye("worker_threads"),e=new t().port1,r=new ArrayBuffer;e.postMessage(r,[r,r])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}Na.exports=globalThis.DOMException});import{statSync as e_,createReadStream as Dd,promises as Hd}from"node:fs";var Ba,Bd,Ha,ni=Cr(()=>{Ba=Re(Da(),1);ei();xr();({stat:Bd}=Hd),Ha=class t{#e;#r;constructor(e){this.#e=e.path,this.#r=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,r){return new t({path:this.#e,lastModified:this.lastModified,size:r-e,start:this.#r+e})}async*stream(){let{mtimeMs:e}=await Bd(this.#e);if(e>this.lastModified)throw new Ba.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*Dd(this.#e,{start:this.#r,end:this.#r+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var qa={};bd(qa,{toFormData:()=>kd});function Wd(t){let e=t.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let r=e[2]||e[3]||"",n=r.slice(r.lastIndexOf("\\")+1);return n=n.replace(/%22/g,'"'),n=n.replace(/&#(\d{4});/g,(i,a)=>String.fromCharCode(a)),n}async function kd(t,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let r=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!r)throw new TypeError("no or bad content-type header, no multipart boundary");let n=new si(r[1]||r[2]),i,a,u,h,f,c,g=[],b=new yt,m=A=>{u+=E.decode(A,{stream:!0})},p=A=>{g.push(A)},_=()=>{let A=new Wt(g,c,{type:f});b.append(h,A)},R=()=>{b.append(h,u)},E=new TextDecoder("utf-8");E.decode(),n.onPartBegin=function(){n.onPartData=m,n.onPartEnd=R,i="",a="",u="",h="",f="",c=null,g.length=0},n.onHeaderField=function(A){i+=E.decode(A,{stream:!0})},n.onHeaderValue=function(A){a+=E.decode(A,{stream:!0})},n.onHeaderEnd=function(){if(a+=E.decode(),i=i.toLowerCase(),i==="content-disposition"){let A=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);A&&(h=A[2]||A[3]||""),c=Wd(a),c&&(n.onPartData=p,n.onPartEnd=_)}else i==="content-type"&&(f=a);a="",i=""};for await(let A of t)n.write(A);return n.end(),b}var qe,Y,Fa,it,$n,Pn,Fd,Lr,qd,Ud,zd,Md,_t,si,Ua=Cr(()=>{ni();In();qe=0,Y={START_BOUNDARY:qe++,HEADER_FIELD_START:qe++,HEADER_FIELD:qe++,HEADER_VALUE_START:qe++,HEADER_VALUE:qe++,HEADER_VALUE_ALMOST_DONE:qe++,HEADERS_ALMOST_DONE:qe++,PART_DATA_START:qe++,PART_DATA:qe++,END:qe++},Fa=1,it={PART_BOUNDARY:Fa,LAST_BOUNDARY:Fa*=2},$n=10,Pn=13,Fd=32,Lr=45,qd=58,Ud=97,zd=122,Md=t=>t|32,_t=()=>{},si=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=_t,this.onHeaderField=_t,this.onHeadersEnd=_t,this.onHeaderValue=_t,this.onPartBegin=_t,this.onPartData=_t,this.onPartEnd=_t,this.boundaryChars={},e=`\r
14
- --`+e;let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n),this.boundaryChars[r[n]]=!0;this.boundary=r,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=Y.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:a,boundary:u,boundaryChars:h,index:f,state:c,flags:g}=this,b=this.boundary.length,m=b-1,p=e.length,_,R,E=T=>{this[T+"Mark"]=r},A=T=>{delete this[T+"Mark"]},N=(T,L,D,H)=>{(L===void 0||L!==D)&&this[T](H&&H.subarray(L,D))},$=(T,L)=>{let D=T+"Mark";D in this&&(L?(N(T,this[D],r,e),delete this[D]):(N(T,this[D],e.length,e),this[D]=0))};for(r=0;r<n;r++)switch(_=e[r],c){case Y.START_BOUNDARY:if(f===u.length-2){if(_===Lr)g|=it.LAST_BOUNDARY;else if(_!==Pn)return;f++;break}else if(f-1===u.length-2){if(g&it.LAST_BOUNDARY&&_===Lr)c=Y.END,g=0;else if(!(g&it.LAST_BOUNDARY)&&_===$n)f=0,N("onPartBegin"),c=Y.HEADER_FIELD_START;else return;break}_!==u[f+2]&&(f=-2),_===u[f+2]&&f++;break;case Y.HEADER_FIELD_START:c=Y.HEADER_FIELD,E("onHeaderField"),f=0;case Y.HEADER_FIELD:if(_===Pn){A("onHeaderField"),c=Y.HEADERS_ALMOST_DONE;break}if(f++,_===Lr)break;if(_===qd){if(f===1)return;$("onHeaderField",!0),c=Y.HEADER_VALUE_START;break}if(R=Md(_),R<Ud||R>zd)return;break;case Y.HEADER_VALUE_START:if(_===Fd)break;E("onHeaderValue"),c=Y.HEADER_VALUE;case Y.HEADER_VALUE:_===Pn&&($("onHeaderValue",!0),N("onHeaderEnd"),c=Y.HEADER_VALUE_ALMOST_DONE);break;case Y.HEADER_VALUE_ALMOST_DONE:if(_!==$n)return;c=Y.HEADER_FIELD_START;break;case Y.HEADERS_ALMOST_DONE:if(_!==$n)return;N("onHeadersEnd"),c=Y.PART_DATA_START;break;case Y.PART_DATA_START:c=Y.PART_DATA,E("onPartData");case Y.PART_DATA:if(i=f,f===0){for(r+=m;r<p&&!(e[r]in h);)r+=b;r-=m,_=e[r]}if(f<u.length)u[f]===_?(f===0&&$("onPartData",!0),f++):f=0;else if(f===u.length)f++,_===Pn?g|=it.PART_BOUNDARY:_===Lr?g|=it.LAST_BOUNDARY:f=0;else if(f-1===u.length)if(g&it.PART_BOUNDARY){if(f=0,_===$n){g&=~it.PART_BOUNDARY,N("onPartEnd"),N("onPartBegin"),c=Y.HEADER_FIELD_START;break}}else g&it.LAST_BOUNDARY&&_===Lr?(N("onPartEnd"),c=Y.END,g=0):f=0;if(f>0)a[f-1]=_;else if(i>0){let T=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);N("onPartData",0,i,T),i=0,E("onPartData"),r--}break;case Y.END:break;default:throw new Error(`Unexpected state entered: ${c}`)}$("onHeaderField"),$("onHeaderValue"),$("onPartData"),this.index=f,this.state=c,this.flags=g}end(){if(this.state===Y.HEADER_FIELD_START&&this.index===0||this.state===Y.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==Y.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var sl=C((sw,nl)=>{function sp(t){return Buffer.from(t,"base64").toString("utf8")}function ip(t){return Buffer.from(t,"utf8").toString("base64")}nl.exports={decodeBase64:sp,encodeBase64:ip}});var ll=C(St=>{St.parse=St.decode=op;St.stringify=St.encode=il;St.safe=Yt;St.unsafe=zn;var li=typeof process<"u"&&process.platform==="win32"?`\r
12
+ `)),n.push(`--${r}--`),new e(n,{type:"multipart/form-data; boundary="+r})}var Or,Pd,Nd,Oa,Dd,Ia,ri,bt,yt,In=Cr(()=>{xr();ti();({toStringTag:Or,iterator:Pd,hasInstance:Nd}=Symbol),Oa=Math.random,Dd="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Ia=(t,e,r)=>(t+="",/^(Blob|File)$/.test(e&&e[Or])?[(r=r!==void 0?r+"":e[Or]=="File"?e.name:"blob",t),e.name!==r||e[Or]=="blob"?new kt([e],r,e):e]:[t,e+""]),ri=(t,e)=>(e?t:t.replace(/\r?\n|\r/g,`\r
13
+ `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),bt=(t,e,r)=>{if(e.length<r)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${r} arguments required, but only ${e.length} present.`)},yt=class{#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Or](){return"FormData"}[Pd](){return this.entries()}static[Nd](e){return e&&typeof e=="object"&&e[Or]==="FormData"&&!Dd.some(r=>typeof e[r]!="function")}append(...e){bt("append",arguments,2),this.#e.push(Ia(...e))}delete(e){bt("delete",arguments,1),e+="",this.#e=this.#e.filter(([r])=>r!==e)}get(e){bt("get",arguments,1),e+="";for(var r=this.#e,n=r.length,i=0;i<n;i++)if(r[i][0]===e)return r[i][1];return null}getAll(e,r){return bt("getAll",arguments,1),r=[],e+="",this.#e.forEach(n=>n[0]===e&&r.push(n[1])),r}has(e){return bt("has",arguments,1),e+="",this.#e.some(r=>r[0]===e)}forEach(e,r){bt("forEach",arguments,1);for(var[n,i]of this)e.call(r,i,n,this)}set(...e){bt("set",arguments,2);var r=[],n=!0;e=Ia(...e),this.#e.forEach(i=>{i[0]===e[0]?n&&(n=!r.push(e)):r.push(i)}),n&&r.push(e),this.#e=r}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}}});var Ha=C((Jy,Da)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=ye("worker_threads"),e=new t().port1,r=new ArrayBuffer;e.postMessage(r,[r,r])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}Da.exports=globalThis.DOMException});import{statSync as t_,createReadStream as Hd,promises as Bd}from"node:fs";var Fa,Fd,Ba,si=Cr(()=>{Fa=Re(Ha(),1);ti();xr();({stat:Fd}=Bd),Ba=class t{#e;#r;constructor(e){this.#e=e.path,this.#r=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,r){return new t({path:this.#e,lastModified:this.lastModified,size:r-e,start:this.#r+e})}async*stream(){let{mtimeMs:e}=await Fd(this.#e);if(e>this.lastModified)throw new Fa.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*Hd(this.#e,{start:this.#r,end:this.#r+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var Ua={};yd(Ua,{toFormData:()=>jd});function Wd(t){let e=t.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let r=e[2]||e[3]||"",n=r.slice(r.lastIndexOf("\\")+1);return n=n.replace(/%22/g,'"'),n=n.replace(/&#(\d{4});/g,(i,a)=>String.fromCharCode(a)),n}async function jd(t,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let r=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!r)throw new TypeError("no or bad content-type header, no multipart boundary");let n=new ii(r[1]||r[2]),i,a,u,h,f,c,g=[],b=new yt,m=A=>{u+=E.decode(A,{stream:!0})},p=A=>{g.push(A)},_=()=>{let A=new kt(g,c,{type:f});b.append(h,A)},R=()=>{b.append(h,u)},E=new TextDecoder("utf-8");E.decode(),n.onPartBegin=function(){n.onPartData=m,n.onPartEnd=R,i="",a="",u="",h="",f="",c=null,g.length=0},n.onHeaderField=function(A){i+=E.decode(A,{stream:!0})},n.onHeaderValue=function(A){a+=E.decode(A,{stream:!0})},n.onHeaderEnd=function(){if(a+=E.decode(),i=i.toLowerCase(),i==="content-disposition"){let A=a.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);A&&(h=A[2]||A[3]||""),c=Wd(a),c&&(n.onPartData=p,n.onPartEnd=_)}else i==="content-type"&&(f=a);a="",i=""};for await(let A of t)n.write(A);return n.end(),b}var qe,Y,qa,ot,Ln,Pn,qd,$r,Ud,zd,Md,kd,_t,ii,za=Cr(()=>{si();In();qe=0,Y={START_BOUNDARY:qe++,HEADER_FIELD_START:qe++,HEADER_FIELD:qe++,HEADER_VALUE_START:qe++,HEADER_VALUE:qe++,HEADER_VALUE_ALMOST_DONE:qe++,HEADERS_ALMOST_DONE:qe++,PART_DATA_START:qe++,PART_DATA:qe++,END:qe++},qa=1,ot={PART_BOUNDARY:qa,LAST_BOUNDARY:qa*=2},Ln=10,Pn=13,qd=32,$r=45,Ud=58,zd=97,Md=122,kd=t=>t|32,_t=()=>{},ii=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=_t,this.onHeaderField=_t,this.onHeadersEnd=_t,this.onHeaderValue=_t,this.onPartBegin=_t,this.onPartData=_t,this.onPartEnd=_t,this.boundaryChars={},e=`\r
14
+ --`+e;let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n),this.boundaryChars[r[n]]=!0;this.boundary=r,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=Y.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:a,boundary:u,boundaryChars:h,index:f,state:c,flags:g}=this,b=this.boundary.length,m=b-1,p=e.length,_,R,E=T=>{this[T+"Mark"]=r},A=T=>{delete this[T+"Mark"]},N=(T,$,D,H)=>{($===void 0||$!==D)&&this[T](H&&H.subarray($,D))},L=(T,$)=>{let D=T+"Mark";D in this&&($?(N(T,this[D],r,e),delete this[D]):(N(T,this[D],e.length,e),this[D]=0))};for(r=0;r<n;r++)switch(_=e[r],c){case Y.START_BOUNDARY:if(f===u.length-2){if(_===$r)g|=ot.LAST_BOUNDARY;else if(_!==Pn)return;f++;break}else if(f-1===u.length-2){if(g&ot.LAST_BOUNDARY&&_===$r)c=Y.END,g=0;else if(!(g&ot.LAST_BOUNDARY)&&_===Ln)f=0,N("onPartBegin"),c=Y.HEADER_FIELD_START;else return;break}_!==u[f+2]&&(f=-2),_===u[f+2]&&f++;break;case Y.HEADER_FIELD_START:c=Y.HEADER_FIELD,E("onHeaderField"),f=0;case Y.HEADER_FIELD:if(_===Pn){A("onHeaderField"),c=Y.HEADERS_ALMOST_DONE;break}if(f++,_===$r)break;if(_===Ud){if(f===1)return;L("onHeaderField",!0),c=Y.HEADER_VALUE_START;break}if(R=kd(_),R<zd||R>Md)return;break;case Y.HEADER_VALUE_START:if(_===qd)break;E("onHeaderValue"),c=Y.HEADER_VALUE;case Y.HEADER_VALUE:_===Pn&&(L("onHeaderValue",!0),N("onHeaderEnd"),c=Y.HEADER_VALUE_ALMOST_DONE);break;case Y.HEADER_VALUE_ALMOST_DONE:if(_!==Ln)return;c=Y.HEADER_FIELD_START;break;case Y.HEADERS_ALMOST_DONE:if(_!==Ln)return;N("onHeadersEnd"),c=Y.PART_DATA_START;break;case Y.PART_DATA_START:c=Y.PART_DATA,E("onPartData");case Y.PART_DATA:if(i=f,f===0){for(r+=m;r<p&&!(e[r]in h);)r+=b;r-=m,_=e[r]}if(f<u.length)u[f]===_?(f===0&&L("onPartData",!0),f++):f=0;else if(f===u.length)f++,_===Pn?g|=ot.PART_BOUNDARY:_===$r?g|=ot.LAST_BOUNDARY:f=0;else if(f-1===u.length)if(g&ot.PART_BOUNDARY){if(f=0,_===Ln){g&=~ot.PART_BOUNDARY,N("onPartEnd"),N("onPartBegin"),c=Y.HEADER_FIELD_START;break}}else g&ot.LAST_BOUNDARY&&_===$r?(N("onPartEnd"),c=Y.END,g=0):f=0;if(f>0)a[f-1]=_;else if(i>0){let T=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);N("onPartData",0,i,T),i=0,E("onPartData"),r--}break;case Y.END:break;default:throw new Error(`Unexpected state entered: ${c}`)}L("onHeaderField"),L("onHeaderValue"),L("onPartData"),this.index=f,this.state=c,this.flags=g}end(){if(this.state===Y.HEADER_FIELD_START&&this.index===0||this.state===Y.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==Y.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var il=C((iw,sl)=>{function ip(t){return Buffer.from(t,"base64").toString("utf8")}function op(t){return Buffer.from(t,"utf8").toString("base64")}sl.exports={decodeBase64:ip,encodeBase64:op}});var ul=C(St=>{St.parse=St.decode=ap;St.stringify=St.encode=ol;St.safe=Yt;St.unsafe=zn;var ui=typeof process<"u"&&process.platform==="win32"?`\r
15
15
  `:`
16
- `;function il(t,e){var r=[],n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(a,u,h){var f=t[a];f&&Array.isArray(f)?f.forEach(function(c){n+=Yt(a+"[]")+i+Yt(c)+`
17
- `}):f&&typeof f=="object"?r.push(a):n+=Yt(a)+i+Yt(f)+li}),e.section&&n.length&&(n="["+Yt(e.section)+"]"+li+n),r.forEach(function(a,u,h){var f=ol(a).join("\\."),c=(e.section?e.section+".":"")+f,g=il(t[a],{section:c,whitespace:e.whitespace});n.length&&g.length&&(n+=li),n+=g}),n}function ol(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function op(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,a=t.split(/[\r\n]+/g);return a.forEach(function(u,h,f){if(!(!u||u.match(/^\s*[;#]/))){var c=u.match(i);if(c){if(c[1]!==void 0){if(n=zn(c[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var g=zn(c[2]);if(g!=="__proto__"){var b=c[3]?zn(c[4]):!0;switch(b){case"true":case"false":case"null":b=JSON.parse(b)}if(g.length>2&&g.slice(-2)==="[]"){if(g=g.substring(0,g.length-2),g==="__proto__")return;r[g]?Array.isArray(r[g])||(r[g]=[r[g]]):r[g]=[]}Array.isArray(r[g])?r[g].push(b):r[g]=b}}}}),Object.keys(e).filter(function(u,h,f){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var c=ol(u),g=e,b=c.pop(),m=b.replace(/\\\./g,".");return c.forEach(function(p,_,R){p!=="__proto__"&&((!g[p]||typeof g[p]!="object")&&(g[p]={}),g=g[p])}),g===e&&m===b?!1:(g[m]=e[u],!0)}).forEach(function(u,h,f){delete e[u]}),e}function al(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Yt(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&al(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function zn(t,e){if(t=(t||"").trim(),al(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,a=t.length;i<a;i++){var u=t.charAt(i);if(r)"\\;#".indexOf(u)!==-1?n+=u:n+="\\"+u,r=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?r=!0:n+=u}}return r&&(n+="\\"),n.trim()}return t}});var hl=C((ow,cl)=>{"use strict";var ui=1,ul=2;function ap(){return""}function lp(t,e,r){return t.slice(e,r).replace(/\S/g," ")}cl.exports=function(t,e){e=e||{};for(var r,n,i=!1,a=!1,u=0,h="",f=e.whitespace===!1?ap:lp,c=0;c<t.length;c++){if(r=t[c],n=t[c+1],!a&&r==='"'){var g=t[c-1]==="\\"&&t[c-2]!=="\\";g||(i=!i)}if(!i){if(!a&&r+n==="//")h+=t.slice(u,c),u=c,a=ui,c++;else if(a===ui&&r+n===`\r
18
- `){c++,a=!1,h+=f(t,u,c),u=c;continue}else if(a===ui&&r===`
19
- `)a=!1,h+=f(t,u,c),u=c;else if(!a&&r+n==="/*"){h+=t.slice(u,c),u=c,a=ul,c++;continue}else if(a===ul&&r+n==="*/"){c++,a=!1,h+=f(t,u,c+1),u=c+1;continue}}}return h+(a?f(t.substr(u)):t.substr(u))}});var dl=C(Qt=>{"use strict";var fl=ye("fs"),up=ll(),Pr=ye("path"),cp=hl(),hp=Qt.parse=function(t){return/^\s*{/.test(t)?JSON.parse(cp(t)):up.parse(t)},fp=Qt.file=function(){var t=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in t)if(typeof t[e]!="string")return;var r=Pr.join.apply(null,t),n;try{return fl.readFileSync(r,"utf-8")}catch{return}},aw=Qt.json=function(){var t=fp.apply(null,arguments);return t?hp(t):null},lw=Qt.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var a=i.substring(n).split("__"),u;(u=a.indexOf(""))>-1;)a.splice(u,1);var h=r;a.forEach(function(c,g){!c||typeof h!="object"||(g===a.length-1&&(h[c]=e[i]),h[c]===void 0&&(h[c]={}),h=h[c])})}return r},uw=Qt.find=function(){var t=Pr.join.apply(null,[].slice.call(arguments));function e(r,n){var i=Pr.join(r,n);try{return fl.statSync(i),i}catch{if(Pr.dirname(r)!==r)return e(Pr.dirname(r),n)}}return e(process.cwd(),t)}});var _l=C((hw,yl)=>{"use strict";function ml(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function gl(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function bl(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=bl(r):ml(r)?e[n]=gl(r):e[n]=ci({},r):e[n]=r}),e}function pl(t,e){return e==="__proto__"?void 0:t[e]}var ci=yl.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,n,i;return e.forEach(function(a){typeof a!="object"||a===null||Array.isArray(a)||Object.keys(a).forEach(function(u){if(n=pl(t,u),r=pl(a,u),r!==t)if(typeof r!="object"||r===null){t[u]=r;return}else if(Array.isArray(r)){t[u]=bl(r);return}else if(ml(r)){t[u]=gl(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[u]=ci({},r);return}else{t[u]=ci(n,r);return}})}),t}});var Mn=C((fw,Rl)=>{var Nr=dl(),Kt=ye("path").join,dp=_l(),wl="/etc",Sl=process.platform==="win32",Dr=Sl?process.env.USERPROFILE:process.env.HOME;Rl.exports=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Xs()(process.argv.slice(2))),e=(typeof e=="string"?Nr.json(e):e)||{},n=n||Nr.parse;var i=Nr.env(t+"_"),a=[e],u=[];function h(f){if(!(u.indexOf(f)>=0)){var c=Nr.file(f);c&&(a.push(n(c)),u.push(f))}}return Sl||[Kt(wl,t,"config"),Kt(wl,t+"rc")].forEach(h),Dr&&[Kt(Dr,".config",t,"config"),Kt(Dr,".config",t),Kt(Dr,"."+t,"config"),Kt(Dr,"."+t+"rc")].forEach(h),h(Nr.find("."+t+"rc")),i.config&&h(i.config),r.config&&h(r.config),dp.apply(null,a.concat([i,r,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var Il=C((dw,Ol)=>{var hi=ye("url"),vl=sl(),pp=vl.decodeBase64,mp=vl.encodeBase64,El=":_authToken",Tl=":_auth",Al=":username",Cl=":_password";Ol.exports=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||Mn()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,xl(t,e)||gp(e.npmrc)};function xl(t,e){for(var r=hi.parse(t,!1,!0),n;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,""),a=yp(i,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(t)?void 0:xl(hi.resolve(t,"."),e);r.pathname=hi.resolve(bp(n),"..")||"/"}}function gp(t){if(t._auth){var e=Wn(t._auth);return{token:e,type:"Basic"}}}function bp(t){return t[t.length-1]==="/"?t:t+"/"}function yp(t,e){var r=_p(e[t+El]||e[t+"/"+El]);if(r)return r;var n=e[t+Al]||e[t+"/"+Al],i=e[t+Cl]||e[t+"/"+Cl],a=wp(n,i);if(a)return a;var u=Sp(e[t+Tl]||e[t+"/"+Tl]);if(u)return u}function Wn(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function _p(t){if(t){var e=Wn(t);return{token:e,type:"Bearer"}}}function wp(t,e){if(!(!t||!e)){var r=pp(Wn(e)),n=mp(t+":"+r);return{token:n,type:"Basic",password:r,username:t}}}function Sp(t){if(t){var e=Wn(t);return{token:e,type:"Basic"}}}});var $l=C((pw,Ll)=>{Ll.exports=function(t,e){var r=e||Mn()("npm",{registry:"https://registry.npmjs.org/"}),n=r[t+":registry"]||r.registry;return n.slice(-1)==="/"?n:n+"/"}});var Hr=C((mw,Pl)=>{var Rp="2.0.0",Ep=Number.MAX_SAFE_INTEGER||9007199254740991,Tp=16;Pl.exports={SEMVER_SPEC_VERSION:Rp,MAX_LENGTH:256,MAX_SAFE_INTEGER:Ep,MAX_SAFE_COMPONENT_LENGTH:Tp}});var Br=C((gw,Nl)=>{var Ap=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Nl.exports=Ap});var Rt=C((at,Dl)=>{var{MAX_SAFE_COMPONENT_LENGTH:fi}=Hr(),Cp=Br();at=Dl.exports={};var vp=at.re=[],O=at.src=[],I=at.t={},xp=0,F=(t,e,r)=>{let n=xp++;Cp(t,n,e),I[t]=n,O[n]=e,vp[n]=new RegExp(e,r?"g":void 0)};F("NUMERICIDENTIFIER","0|[1-9]\\d*");F("NUMERICIDENTIFIERLOOSE","[0-9]+");F("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");F("MAINVERSION",`(${O[I.NUMERICIDENTIFIER]})\\.(${O[I.NUMERICIDENTIFIER]})\\.(${O[I.NUMERICIDENTIFIER]})`);F("MAINVERSIONLOOSE",`(${O[I.NUMERICIDENTIFIERLOOSE]})\\.(${O[I.NUMERICIDENTIFIERLOOSE]})\\.(${O[I.NUMERICIDENTIFIERLOOSE]})`);F("PRERELEASEIDENTIFIER",`(?:${O[I.NUMERICIDENTIFIER]}|${O[I.NONNUMERICIDENTIFIER]})`);F("PRERELEASEIDENTIFIERLOOSE",`(?:${O[I.NUMERICIDENTIFIERLOOSE]}|${O[I.NONNUMERICIDENTIFIER]})`);F("PRERELEASE",`(?:-(${O[I.PRERELEASEIDENTIFIER]}(?:\\.${O[I.PRERELEASEIDENTIFIER]})*))`);F("PRERELEASELOOSE",`(?:-?(${O[I.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[I.PRERELEASEIDENTIFIERLOOSE]})*))`);F("BUILDIDENTIFIER","[0-9A-Za-z-]+");F("BUILD",`(?:\\+(${O[I.BUILDIDENTIFIER]}(?:\\.${O[I.BUILDIDENTIFIER]})*))`);F("FULLPLAIN",`v?${O[I.MAINVERSION]}${O[I.PRERELEASE]}?${O[I.BUILD]}?`);F("FULL",`^${O[I.FULLPLAIN]}$`);F("LOOSEPLAIN",`[v=\\s]*${O[I.MAINVERSIONLOOSE]}${O[I.PRERELEASELOOSE]}?${O[I.BUILD]}?`);F("LOOSE",`^${O[I.LOOSEPLAIN]}$`);F("GTLT","((?:<|>)?=?)");F("XRANGEIDENTIFIERLOOSE",`${O[I.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);F("XRANGEIDENTIFIER",`${O[I.NUMERICIDENTIFIER]}|x|X|\\*`);F("XRANGEPLAIN",`[v=\\s]*(${O[I.XRANGEIDENTIFIER]})(?:\\.(${O[I.XRANGEIDENTIFIER]})(?:\\.(${O[I.XRANGEIDENTIFIER]})(?:${O[I.PRERELEASE]})?${O[I.BUILD]}?)?)?`);F("XRANGEPLAINLOOSE",`[v=\\s]*(${O[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[I.XRANGEIDENTIFIERLOOSE]})(?:${O[I.PRERELEASELOOSE]})?${O[I.BUILD]}?)?)?`);F("XRANGE",`^${O[I.GTLT]}\\s*${O[I.XRANGEPLAIN]}$`);F("XRANGELOOSE",`^${O[I.GTLT]}\\s*${O[I.XRANGEPLAINLOOSE]}$`);F("COERCE",`(^|[^\\d])(\\d{1,${fi}})(?:\\.(\\d{1,${fi}}))?(?:\\.(\\d{1,${fi}}))?(?:$|[^\\d])`);F("COERCERTL",O[I.COERCE],!0);F("LONETILDE","(?:~>?)");F("TILDETRIM",`(\\s*)${O[I.LONETILDE]}\\s+`,!0);at.tildeTrimReplace="$1~";F("TILDE",`^${O[I.LONETILDE]}${O[I.XRANGEPLAIN]}$`);F("TILDELOOSE",`^${O[I.LONETILDE]}${O[I.XRANGEPLAINLOOSE]}$`);F("LONECARET","(?:\\^)");F("CARETTRIM",`(\\s*)${O[I.LONECARET]}\\s+`,!0);at.caretTrimReplace="$1^";F("CARET",`^${O[I.LONECARET]}${O[I.XRANGEPLAIN]}$`);F("CARETLOOSE",`^${O[I.LONECARET]}${O[I.XRANGEPLAINLOOSE]}$`);F("COMPARATORLOOSE",`^${O[I.GTLT]}\\s*(${O[I.LOOSEPLAIN]})$|^$`);F("COMPARATOR",`^${O[I.GTLT]}\\s*(${O[I.FULLPLAIN]})$|^$`);F("COMPARATORTRIM",`(\\s*)${O[I.GTLT]}\\s*(${O[I.LOOSEPLAIN]}|${O[I.XRANGEPLAIN]})`,!0);at.comparatorTrimReplace="$1$2$3";F("HYPHENRANGE",`^\\s*(${O[I.XRANGEPLAIN]})\\s+-\\s+(${O[I.XRANGEPLAIN]})\\s*$`);F("HYPHENRANGELOOSE",`^\\s*(${O[I.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[I.XRANGEPLAINLOOSE]})\\s*$`);F("STAR","(<|>)?=?\\s*\\*");F("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");F("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Fr=C((bw,Hl)=>{var Op=["includePrerelease","loose","rtl"],Ip=t=>t?typeof t!="object"?{loose:!0}:Op.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};Hl.exports=Ip});var di=C((yw,ql)=>{var Bl=/^[0-9]+$/,Fl=(t,e)=>{let r=Bl.test(t),n=Bl.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Lp=(t,e)=>Fl(e,t);ql.exports={compareIdentifiers:Fl,rcompareIdentifiers:Lp}});var ae=C((_w,Wl)=>{var kn=Br(),{MAX_LENGTH:Ul,MAX_SAFE_INTEGER:jn}=Hr(),{re:zl,t:Ml}=Rt(),$p=Fr(),{compareIdentifiers:Xt}=di(),pi=class t{constructor(e,r){if(r=$p(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Ul)throw new TypeError(`version is longer than ${Ul} characters`);kn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?zl[Ml.LOOSE]:zl[Ml.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>jn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>jn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>jn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let a=+i;if(a>=0&&a<jn)return a}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(kn("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Xt(this.major,e.major)||Xt(this.minor,e.minor)||Xt(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(kn("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Xt(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(kn("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Xt(n,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}r&&(Xt(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Wl.exports=pi});var Et=C((ww,Gl)=>{var{MAX_LENGTH:Pp}=Hr(),{re:kl,t:jl}=Rt(),Vl=ae(),Np=Fr(),Dp=(t,e)=>{if(e=Np(e),t instanceof Vl)return t;if(typeof t!="string"||t.length>Pp||!(e.loose?kl[jl.LOOSE]:kl[jl.FULL]).test(t))return null;try{return new Vl(t,e)}catch{return null}};Gl.exports=Dp});var Ql=C((Sw,Yl)=>{var Hp=Et(),Bp=(t,e)=>{let r=Hp(t,e);return r?r.version:null};Yl.exports=Bp});var Xl=C((Rw,Kl)=>{var Fp=Et(),qp=(t,e)=>{let r=Fp(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Kl.exports=qp});var eu=C((Ew,Jl)=>{var Zl=ae(),Up=(t,e,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new Zl(t instanceof Zl?t.version:t,r).inc(e,n).version}catch{return null}};Jl.exports=Up});var Ae=C((Tw,ru)=>{var tu=ae(),zp=(t,e,r)=>new tu(t,r).compare(new tu(e,r));ru.exports=zp});var Vn=C((Aw,nu)=>{var Mp=Ae(),Wp=(t,e,r)=>Mp(t,e,r)===0;nu.exports=Wp});var ou=C((Cw,iu)=>{var su=Et(),kp=Vn(),jp=(t,e)=>{if(kp(t,e))return null;{let r=su(t),n=su(e),i=r.prerelease.length||n.prerelease.length,a=i?"pre":"",u=i?"prerelease":"";for(let h in r)if((h==="major"||h==="minor"||h==="patch")&&r[h]!==n[h])return a+h;return u}};iu.exports=jp});var lu=C((vw,au)=>{var Vp=ae(),Gp=(t,e)=>new Vp(t,e).major;au.exports=Gp});var cu=C((xw,uu)=>{var Yp=ae(),Qp=(t,e)=>new Yp(t,e).minor;uu.exports=Qp});var fu=C((Ow,hu)=>{var Kp=ae(),Xp=(t,e)=>new Kp(t,e).patch;hu.exports=Xp});var pu=C((Iw,du)=>{var Zp=Et(),Jp=(t,e)=>{let r=Zp(t,e);return r&&r.prerelease.length?r.prerelease:null};du.exports=Jp});var gu=C((Lw,mu)=>{var em=Ae(),tm=(t,e,r)=>em(e,t,r);mu.exports=tm});var yu=C(($w,bu)=>{var rm=Ae(),nm=(t,e)=>rm(t,e,!0);bu.exports=nm});var Gn=C((Pw,wu)=>{var _u=ae(),sm=(t,e,r)=>{let n=new _u(t,r),i=new _u(e,r);return n.compare(i)||n.compareBuild(i)};wu.exports=sm});var Ru=C((Nw,Su)=>{var im=Gn(),om=(t,e)=>t.sort((r,n)=>im(r,n,e));Su.exports=om});var Tu=C((Dw,Eu)=>{var am=Gn(),lm=(t,e)=>t.sort((r,n)=>am(n,r,e));Eu.exports=lm});var qr=C((Hw,Au)=>{var um=Ae(),cm=(t,e,r)=>um(t,e,r)>0;Au.exports=cm});var Yn=C((Bw,Cu)=>{var hm=Ae(),fm=(t,e,r)=>hm(t,e,r)<0;Cu.exports=fm});var mi=C((Fw,vu)=>{var dm=Ae(),pm=(t,e,r)=>dm(t,e,r)!==0;vu.exports=pm});var Qn=C((qw,xu)=>{var mm=Ae(),gm=(t,e,r)=>mm(t,e,r)>=0;xu.exports=gm});var Kn=C((Uw,Ou)=>{var bm=Ae(),ym=(t,e,r)=>bm(t,e,r)<=0;Ou.exports=ym});var gi=C((zw,Iu)=>{var _m=Vn(),wm=mi(),Sm=qr(),Rm=Qn(),Em=Yn(),Tm=Kn(),Am=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return _m(t,r,n);case"!=":return wm(t,r,n);case">":return Sm(t,r,n);case">=":return Rm(t,r,n);case"<":return Em(t,r,n);case"<=":return Tm(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Iu.exports=Am});var $u=C((Mw,Lu)=>{var Cm=ae(),vm=Et(),{re:Xn,t:Zn}=Rt(),xm=(t,e)=>{if(t instanceof Cm)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(Xn[Zn.COERCE]);else{let n;for(;(n=Xn[Zn.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),Xn[Zn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Xn[Zn.COERCERTL].lastIndex=-1}return r===null?null:vm(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};Lu.exports=xm});var Nu=C((Ww,Pu)=>{"use strict";Pu.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Hu=C((kw,Du)=>{"use strict";Du.exports=k;k.Node=Tt;k.create=k;function k(t){var e=this;if(e instanceof k||(e=new k),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)e.push(arguments[r]);return e}k.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};k.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};k.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};k.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Im(this,arguments[t]);return this.length};k.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Lm(this,arguments[t]);return this.length};k.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};k.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};k.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;r!==null;n++)t.call(e,r.value,n,this),r=r.next};k.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;r!==null;n--)t.call(e,r.value,n,this),r=r.prev};k.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};k.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};k.prototype.map=function(t,e){e=e||this;for(var r=new k,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};k.prototype.mapReverse=function(t,e){e=e||this;for(var r=new k,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};k.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r};k.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r};k.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};k.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};k.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new k;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)r.push(i.value);return r};k.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new k;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r};k.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(var a=[],n=0;i&&n<e;n++)a.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=Om(this,i,r[n]);return a};k.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};function Om(t,e,r){var n=e===t.head?new Tt(r,null,e,t):new Tt(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function Im(t,e){t.tail=new Tt(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Lm(t,e){t.head=new Tt(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Tt(t,e,r,n){if(!(this instanceof Tt))return new Tt(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Nu()(k)}catch{}});var zu=C((jw,Uu)=>{"use strict";var $m=Hu(),At=Symbol("max"),Qe=Symbol("length"),Zt=Symbol("lengthCalculator"),zr=Symbol("allowStale"),Ct=Symbol("maxAge"),Ye=Symbol("dispose"),Bu=Symbol("noDisposeOnSet"),ie=Symbol("lruList"),He=Symbol("cache"),qu=Symbol("updateAgeOnGet"),bi=()=>1,_i=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[At]=e.max||1/0,n=e.length||bi;if(this[Zt]=typeof n!="function"?bi:n,this[zr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ct]=e.maxAge||0,this[Ye]=e.dispose,this[Bu]=e.noDisposeOnSet||!1,this[qu]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[At]=e||1/0,Ur(this)}get max(){return this[At]}set allowStale(e){this[zr]=!!e}get allowStale(){return this[zr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ct]=e,Ur(this)}get maxAge(){return this[Ct]}set lengthCalculator(e){typeof e!="function"&&(e=bi),e!==this[Zt]&&(this[Zt]=e,this[Qe]=0,this[ie].forEach(r=>{r.length=this[Zt](r.value,r.key),this[Qe]+=r.length})),Ur(this)}get lengthCalculator(){return this[Zt]}get length(){return this[Qe]}get itemCount(){return this[ie].length}rforEach(e,r){r=r||this;for(let n=this[ie].tail;n!==null;){let i=n.prev;Fu(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[ie].head;n!==null;){let i=n.next;Fu(this,e,n,r),n=i}}keys(){return this[ie].toArray().map(e=>e.key)}values(){return this[ie].toArray().map(e=>e.value)}reset(){this[Ye]&&this[ie]&&this[ie].length&&this[ie].forEach(e=>this[Ye](e.key,e.value)),this[He]=new Map,this[ie]=new $m,this[Qe]=0}dump(){return this[ie].map(e=>Jn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ie]}set(e,r,n){if(n=n||this[Ct],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let i=n?Date.now():0,a=this[Zt](r,e);if(this[He].has(e)){if(a>this[At])return Jt(this,this[He].get(e)),!1;let f=this[He].get(e).value;return this[Ye]&&(this[Bu]||this[Ye](e,f.value)),f.now=i,f.maxAge=n,f.value=r,this[Qe]+=a-f.length,f.length=a,this.get(e),Ur(this),!0}let u=new wi(e,r,a,i,n);return u.length>this[At]?(this[Ye]&&this[Ye](e,r),!1):(this[Qe]+=u.length,this[ie].unshift(u),this[He].set(e,this[ie].head),Ur(this),!0)}has(e){if(!this[He].has(e))return!1;let r=this[He].get(e).value;return!Jn(this,r)}get(e){return yi(this,e,!0)}peek(e){return yi(this,e,!1)}pop(){let e=this[ie].tail;return e?(Jt(this,e),e.value):null}del(e){Jt(this,this[He].get(e))}load(e){this.reset();let r=Date.now();for(let n=e.length-1;n>=0;n--){let i=e[n],a=i.e||0;if(a===0)this.set(i.k,i.v);else{let u=a-r;u>0&&this.set(i.k,i.v,u)}}}prune(){this[He].forEach((e,r)=>yi(this,r,!1))}},yi=(t,e,r)=>{let n=t[He].get(e);if(n){let i=n.value;if(Jn(t,i)){if(Jt(t,n),!t[zr])return}else r&&(t[qu]&&(n.value.now=Date.now()),t[ie].unshiftNode(n));return i.value}},Jn=(t,e)=>{if(!e||!e.maxAge&&!t[Ct])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ct]&&r>t[Ct]},Ur=t=>{if(t[Qe]>t[At])for(let e=t[ie].tail;t[Qe]>t[At]&&e!==null;){let r=e.prev;Jt(t,e),e=r}},Jt=(t,e)=>{if(e){let r=e.value;t[Ye]&&t[Ye](r.key,r.value),t[Qe]-=r.length,t[He].delete(r.key),t[ie].removeNode(e)}},wi=class{constructor(e,r,n,i,a){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=a||0}},Fu=(t,e,r,n)=>{let i=r.value;Jn(t,i)&&(Jt(t,r),t[zr]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};Uu.exports=_i});var Ce=C((Vw,ju)=>{var Si=class t{constructor(e,r){if(r=Nm(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof Ri)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!Wu(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&qm(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=Mu.get(n);if(i)return i;let a=this.options.loose,u=a?me[ce.HYPHENRANGELOOSE]:me[ce.HYPHENRANGE];e=e.replace(u,Qm(this.options.includePrerelease)),Q("hyphen replace",e),e=e.replace(me[ce.COMPARATORTRIM],Hm),Q("comparator trim",e),e=e.replace(me[ce.TILDETRIM],Bm),e=e.replace(me[ce.CARETTRIM],Fm),e=e.split(/\s+/).join(" ");let h=e.split(" ").map(b=>Um(b,this.options)).join(" ").split(/\s+/).map(b=>Ym(b,this.options));a&&(h=h.filter(b=>(Q("loose invalid filter",b,this.options),!!b.match(me[ce.COMPARATORLOOSE])))),Q("range list",h);let f=new Map,c=h.map(b=>new Ri(b,this.options));for(let b of c){if(Wu(b))return[b];f.set(b.value,b)}f.size>1&&f.has("")&&f.delete("");let g=[...f.values()];return Mu.set(n,g),g}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>ku(n,r)&&e.set.some(i=>ku(i,r)&&n.every(a=>i.every(u=>a.intersects(u,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Dm(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Km(this.set[r],e,this.options))return!0;return!1}};ju.exports=Si;var Pm=zu(),Mu=new Pm({max:1e3}),Nm=Fr(),Ri=Mr(),Q=Br(),Dm=ae(),{re:me,t:ce,comparatorTrimReplace:Hm,tildeTrimReplace:Bm,caretTrimReplace:Fm}=Rt(),Wu=t=>t.value==="<0.0.0-0",qm=t=>t.value==="",ku=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(a=>i.intersects(a,e)),i=n.pop();return r},Um=(t,e)=>(Q("comp",t,e),t=Wm(t,e),Q("caret",t),t=zm(t,e),Q("tildes",t),t=jm(t,e),Q("xrange",t),t=Gm(t,e),Q("stars",t),t),he=t=>!t||t.toLowerCase()==="x"||t==="*",zm=(t,e)=>t.trim().split(/\s+/).map(r=>Mm(r,e)).join(" "),Mm=(t,e)=>{let r=e.loose?me[ce.TILDELOOSE]:me[ce.TILDE];return t.replace(r,(n,i,a,u,h)=>{Q("tilde",t,n,i,a,u,h);let f;return he(i)?f="":he(a)?f=`>=${i}.0.0 <${+i+1}.0.0-0`:he(u)?f=`>=${i}.${a}.0 <${i}.${+a+1}.0-0`:h?(Q("replaceTilde pr",h),f=`>=${i}.${a}.${u}-${h} <${i}.${+a+1}.0-0`):f=`>=${i}.${a}.${u} <${i}.${+a+1}.0-0`,Q("tilde return",f),f})},Wm=(t,e)=>t.trim().split(/\s+/).map(r=>km(r,e)).join(" "),km=(t,e)=>{Q("caret",t,e);let r=e.loose?me[ce.CARETLOOSE]:me[ce.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,a,u,h,f)=>{Q("caret",t,i,a,u,h,f);let c;return he(a)?c="":he(u)?c=`>=${a}.0.0${n} <${+a+1}.0.0-0`:he(h)?a==="0"?c=`>=${a}.${u}.0${n} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.0${n} <${+a+1}.0.0-0`:f?(Q("replaceCaret pr",f),a==="0"?u==="0"?c=`>=${a}.${u}.${h}-${f} <${a}.${u}.${+h+1}-0`:c=`>=${a}.${u}.${h}-${f} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.${h}-${f} <${+a+1}.0.0-0`):(Q("no pr"),a==="0"?u==="0"?c=`>=${a}.${u}.${h}${n} <${a}.${u}.${+h+1}-0`:c=`>=${a}.${u}.${h}${n} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.${h} <${+a+1}.0.0-0`),Q("caret return",c),c})},jm=(t,e)=>(Q("replaceXRanges",t,e),t.split(/\s+/).map(r=>Vm(r,e)).join(" ")),Vm=(t,e)=>{t=t.trim();let r=e.loose?me[ce.XRANGELOOSE]:me[ce.XRANGE];return t.replace(r,(n,i,a,u,h,f)=>{Q("xRange",t,n,i,a,u,h,f);let c=he(a),g=c||he(u),b=g||he(h),m=b;return i==="="&&m&&(i=""),f=e.includePrerelease?"-0":"",c?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&m?(g&&(u=0),h=0,i===">"?(i=">=",g?(a=+a+1,u=0,h=0):(u=+u+1,h=0)):i==="<="&&(i="<",g?a=+a+1:u=+u+1),i==="<"&&(f="-0"),n=`${i+a}.${u}.${h}${f}`):g?n=`>=${a}.0.0${f} <${+a+1}.0.0-0`:b&&(n=`>=${a}.${u}.0${f} <${a}.${+u+1}.0-0`),Q("xRange return",n),n})},Gm=(t,e)=>(Q("replaceStars",t,e),t.trim().replace(me[ce.STAR],"")),Ym=(t,e)=>(Q("replaceGTE0",t,e),t.trim().replace(me[e.includePrerelease?ce.GTE0PRE:ce.GTE0],"")),Qm=t=>(e,r,n,i,a,u,h,f,c,g,b,m,p)=>(he(n)?r="":he(i)?r=`>=${n}.0.0${t?"-0":""}`:he(a)?r=`>=${n}.${i}.0${t?"-0":""}`:u?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,he(c)?f="":he(g)?f=`<${+c+1}.0.0-0`:he(b)?f=`<${c}.${+g+1}.0-0`:m?f=`<=${c}.${g}.${b}-${m}`:t?f=`<${c}.${g}.${+b+1}-0`:f=`<=${f}`,`${r} ${f}`.trim()),Km=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Q(t[n].semver),t[n].semver!==Ri.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Mr=C((Gw,Ku)=>{var Wr=Symbol("SemVer ANY"),Ai=class t{static get ANY(){return Wr}constructor(e,r){if(r=Xm(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}Ti("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Wr?this.value="":this.value=this.operator+this.semver.version,Ti("comp",this)}parse(e){let r=this.options.loose?Vu[Gu.COMPARATORLOOSE]:Vu[Gu.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Yu(n[2],this.options.loose):this.semver=Wr}toString(){return this.value}test(e){if(Ti("Comparator.test",e,this.options.loose),this.semver===Wr||e===Wr)return!0;if(typeof e=="string")try{e=new Yu(e,this.options)}catch{return!1}return Ei(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Qu(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Qu(this.value,r).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),a=this.semver.version===e.semver.version,u=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),h=Ei(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),f=Ei(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||a&&u||h||f}};Ku.exports=Ai;var Xm=Fr(),{re:Vu,t:Gu}=Rt(),Ei=gi(),Ti=Br(),Yu=ae(),Qu=Ce()});var kr=C((Yw,Xu)=>{var Zm=Ce(),Jm=(t,e,r)=>{try{e=new Zm(e,r)}catch{return!1}return e.test(t)};Xu.exports=Jm});var Ju=C((Qw,Zu)=>{var eg=Ce(),tg=(t,e)=>new eg(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Zu.exports=tg});var tc=C((Kw,ec)=>{var rg=ae(),ng=Ce(),sg=(t,e,r)=>{let n=null,i=null,a=null;try{a=new ng(e,r)}catch{return null}return t.forEach(u=>{a.test(u)&&(!n||i.compare(u)===-1)&&(n=u,i=new rg(n,r))}),n};ec.exports=sg});var nc=C((Xw,rc)=>{var ig=ae(),og=Ce(),ag=(t,e,r)=>{let n=null,i=null,a=null;try{a=new og(e,r)}catch{return null}return t.forEach(u=>{a.test(u)&&(!n||i.compare(u)===1)&&(n=u,i=new ig(n,r))}),n};rc.exports=ag});var oc=C((Zw,ic)=>{var Ci=ae(),lg=Ce(),sc=qr(),ug=(t,e)=>{t=new lg(t,e);let r=new Ci("0.0.0");if(t.test(r)||(r=new Ci("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],a=null;i.forEach(u=>{let h=new Ci(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!a||sc(h,a))&&(a=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!r||sc(r,a))&&(r=a)}return r&&t.test(r)?r:null};ic.exports=ug});var lc=C((Jw,ac)=>{var cg=Ce(),hg=(t,e)=>{try{return new cg(t,e).range||"*"}catch{return null}};ac.exports=hg});var es=C((eS,fc)=>{var fg=ae(),hc=Mr(),{ANY:dg}=hc,pg=Ce(),mg=kr(),uc=qr(),cc=Yn(),gg=Kn(),bg=Qn(),yg=(t,e,r,n)=>{t=new fg(t,n),e=new pg(e,n);let i,a,u,h,f;switch(r){case">":i=uc,a=gg,u=cc,h=">",f=">=";break;case"<":i=cc,a=bg,u=uc,h="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(mg(t,e,n))return!1;for(let c=0;c<e.set.length;++c){let g=e.set[c],b=null,m=null;if(g.forEach(p=>{p.semver===dg&&(p=new hc(">=0.0.0")),b=b||p,m=m||p,i(p.semver,b.semver,n)?b=p:u(p.semver,m.semver,n)&&(m=p)}),b.operator===h||b.operator===f||(!m.operator||m.operator===h)&&a(t,m.semver))return!1;if(m.operator===f&&u(t,m.semver))return!1}return!0};fc.exports=yg});var pc=C((tS,dc)=>{var _g=es(),wg=(t,e,r)=>_g(t,e,">",r);dc.exports=wg});var gc=C((rS,mc)=>{var Sg=es(),Rg=(t,e,r)=>Sg(t,e,"<",r);mc.exports=Rg});var _c=C((nS,yc)=>{var bc=Ce(),Eg=(t,e,r)=>(t=new bc(t,r),e=new bc(e,r),t.intersects(e));yc.exports=Eg});var Sc=C((sS,wc)=>{var Tg=kr(),Ag=Ae();wc.exports=(t,e,r)=>{let n=[],i=null,a=null,u=t.sort((g,b)=>Ag(g,b,r));for(let g of u)Tg(g,e,r)?(a=g,i||(i=g)):(a&&n.push([i,a]),a=null,i=null);i&&n.push([i,null]);let h=[];for(let[g,b]of n)g===b?h.push(g):!b&&g===u[0]?h.push("*"):b?g===u[0]?h.push(`<=${b}`):h.push(`${g} - ${b}`):h.push(`>=${g}`);let f=h.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return f.length<c.length?f:e}});var Cc=C((iS,Ac)=>{var Rc=Ce(),ts=Mr(),{ANY:vi}=ts,jr=kr(),xi=Ae(),Cg=(t,e,r={})=>{if(t===e)return!0;t=new Rc(t,r),e=new Rc(e,r);let n=!1;e:for(let i of t.set){for(let a of e.set){let u=vg(i,a,r);if(n=n||u!==null,u)continue e}if(n)return!1}return!0},vg=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===vi){if(e.length===1&&e[0].semver===vi)return!0;r.includePrerelease?t=[new ts(">=0.0.0-0")]:t=[new ts(">=0.0.0")]}if(e.length===1&&e[0].semver===vi){if(r.includePrerelease)return!0;e=[new ts(">=0.0.0")]}let n=new Set,i,a;for(let p of t)p.operator===">"||p.operator===">="?i=Ec(i,p,r):p.operator==="<"||p.operator==="<="?a=Tc(a,p,r):n.add(p.semver);if(n.size>1)return null;let u;if(i&&a){if(u=xi(i.semver,a.semver,r),u>0)return null;if(u===0&&(i.operator!==">="||a.operator!=="<="))return null}for(let p of n){if(i&&!jr(p,String(i),r)||a&&!jr(p,String(a),r))return null;for(let _ of e)if(!jr(p,String(_),r))return!1;return!0}let h,f,c,g,b=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;b&&b.prerelease.length===1&&a.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(let p of e){if(g=g||p.operator===">"||p.operator===">=",c=c||p.operator==="<"||p.operator==="<=",i){if(m&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===m.major&&p.semver.minor===m.minor&&p.semver.patch===m.patch&&(m=!1),p.operator===">"||p.operator===">="){if(h=Ec(i,p,r),h===p&&h!==i)return!1}else if(i.operator===">="&&!jr(i.semver,String(p),r))return!1}if(a){if(b&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===b.major&&p.semver.minor===b.minor&&p.semver.patch===b.patch&&(b=!1),p.operator==="<"||p.operator==="<="){if(f=Tc(a,p,r),f===p&&f!==a)return!1}else if(a.operator==="<="&&!jr(a.semver,String(p),r))return!1}if(!p.operator&&(a||i)&&u!==0)return!1}return!(i&&c&&!a&&u!==0||a&&g&&!i&&u!==0||m||b)},Ec=(t,e,r)=>{if(!t)return e;let n=xi(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Tc=(t,e,r)=>{if(!t)return e;let n=xi(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};Ac.exports=Cg});var Oc=C((oS,xc)=>{var Oi=Rt(),xg=Hr(),Og=ae(),vc=di(),Ig=Et(),Lg=Ql(),$g=Xl(),Pg=eu(),Ng=ou(),Dg=lu(),Hg=cu(),Bg=fu(),Fg=pu(),qg=Ae(),Ug=gu(),zg=yu(),Mg=Gn(),Wg=Ru(),kg=Tu(),jg=qr(),Vg=Yn(),Gg=Vn(),Yg=mi(),Qg=Qn(),Kg=Kn(),Xg=gi(),Zg=$u(),Jg=Mr(),eb=Ce(),tb=kr(),rb=Ju(),nb=tc(),sb=nc(),ib=oc(),ob=lc(),ab=es(),lb=pc(),ub=gc(),cb=_c(),hb=Sc(),fb=Cc();xc.exports={parse:Ig,valid:Lg,clean:$g,inc:Pg,diff:Ng,major:Dg,minor:Hg,patch:Bg,prerelease:Fg,compare:qg,rcompare:Ug,compareLoose:zg,compareBuild:Mg,sort:Wg,rsort:kg,gt:jg,lt:Vg,eq:Gg,neq:Yg,gte:Qg,lte:Kg,cmp:Xg,coerce:Zg,Comparator:Jg,Range:eb,satisfies:tb,toComparators:rb,maxSatisfying:nb,minSatisfying:sb,minVersion:ib,validRange:ob,outside:ab,gtr:lb,ltr:ub,intersects:cb,simplifyRange:hb,subset:fb,SemVer:Og,re:Oi.re,src:Oi.src,tokens:Oi.t,SEMVER_SPEC_VERSION:xg.SEMVER_SPEC_VERSION,compareIdentifiers:vc.compareIdentifiers,rcompareIdentifiers:vc.rcompareIdentifiers}});var Nc=C((aS,Pc)=>{Pc.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,n=e.align||[],i=e.stringLength||function(f){return String(f).length},a=Lc(t,function(f,c){return $c(c,function(g,b){var m=Ic(g);(!f[b]||m>f[b])&&(f[b]=m)}),f},[]),u=rs(t,function(f){return rs(f,function(c,g){var b=String(c);if(n[g]==="."){var m=Ic(b),p=a[g]+(/\./.test(b)?1:2)-(i(b)-m);return b+Array(p).join(" ")}else return b})}),h=Lc(u,function(f,c){return $c(c,function(g,b){var m=i(g);(!f[b]||m>f[b])&&(f[b]=m)}),f},[]);return rs(u,function(f){return rs(f,function(c,g){var b=h[g]-i(c)||0,m=Array(Math.max(b+1,1)).join(" ");return n[g]==="r"||n[g]==="."?m+c:n[g]==="c"?Array(Math.ceil(b/2+1)).join(" ")+c+Array(Math.floor(b/2+1)).join(" "):c+m}).join(r).replace(/\s+$/,"")}).join(`
20
- `)};function Ic(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function Lc(t,e,r){if(t.reduce)return t.reduce(e,r);for(var n=0,i=arguments.length>=3?r:t[n++];n<t.length;n++)e(i,t[n],n);return i}function $c(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function rs(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e.call(t,t[n],n));return r}});var qc=C((cS,Fc)=>{var Vr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,db=typeof AbortController=="function",ns=db?AbortController:class{constructor(){this.signal=new Dc}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},pb=typeof AbortSignal=="function",mb=typeof ns.AbortSignal=="function",Dc=pb?AbortSignal:mb?ns.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(r=>r(e),this))}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},Pi=new Set,Ii=(t,e)=>{let r=`LRU_CACHE_OPTION_${t}`;ss(r)&&Ni(r,`${t} option`,`options.${e}`,tr)},Li=(t,e)=>{let r=`LRU_CACHE_METHOD_${t}`;if(ss(r)){let{prototype:n}=tr,{get:i}=Object.getOwnPropertyDescriptor(n,t);Ni(r,`${t} method`,`cache.${e}()`,i)}},gb=(t,e)=>{let r=`LRU_CACHE_PROPERTY_${t}`;if(ss(r)){let{prototype:n}=tr,{get:i}=Object.getOwnPropertyDescriptor(n,t);Ni(r,`${t} property`,`cache.${e}`,i)}},Hc=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},ss=t=>!Pi.has(t),Ni=(t,e,r,n)=>{Pi.add(t);let i=`The ${e} is deprecated. Please use ${r} instead.`;Hc(i,"DeprecationWarning",t,n)},lt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Bc=t=>lt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?er:null:null,er=class extends Array{constructor(e){super(e),this.fill(0)}},$i=class{constructor(e){if(e===0)return[];let r=Bc(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},tr=class t{constructor(e={}){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:f,dispose:c,disposeAfter:g,noDisposeOnSet:b,noUpdateTTL:m,maxSize:p=0,maxEntrySize:_=0,sizeCalculation:R,fetchMethod:E,fetchContext:A,noDeleteOnFetchRejection:N,noDeleteOnStaleGet:$,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:L,ignoreFetchAbort:D}=e,{length:H,maxAge:V,stale:K}=e instanceof t?{}:e;if(r!==0&&!lt(r))throw new TypeError("max option must be a nonnegative integer");let ee=r?Bc(r):Array;if(!ee)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=p,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=R||H,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=E||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=A,!this.fetchMethod&&A!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new ee(r),this.prev=new ee(r),this.head=0,this.tail=0,this.free=new $i(r),this.initialFill=1,this.size=0,typeof c=="function"&&(this.dispose=c),typeof g=="function"?(this.disposeAfter=g,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!b,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!N,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!L,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.maxSize!==0&&!lt(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!lt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!f||!!K,this.noDeleteOnStaleGet=!!$,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=lt(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=n||V||0,this.ttl){if(!lt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let oe="LRU_CACHE_UNBOUNDED";ss(oe)&&(Pi.add(oe),Hc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",oe,t))}K&&Ii("stale","allowStale"),V&&Ii("maxAge","ttl"),H&&Ii("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new er(this.max),this.starts=new er(this.max),this.setItemTTL=(n,i,a=Vr.now())=>{if(this.starts[n]=i!==0?a:0,this.ttls[n]=i,i!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},i+1);u.unref&&u.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?Vr.now():0},this.statusTTL=(n,i)=>{n&&(n.ttl=this.ttls[i],n.start=this.starts[i],n.now=e||r(),n.remainingTTL=n.now+n.ttl-n.start)};let e=0,r=()=>{let n=Vr.now();if(this.ttlResolution>0){e=n;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return n};this.getRemainingTTL=n=>{let i=this.keyMap.get(n);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(e||r())-this.starts[n]>this.ttls[n]}updateItemAge(e){}statusTTL(e,r){}setItemTTL(e,r,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new er(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,n,i)=>{if(this.isBackgroundFetch(r))return 0;if(!lt(n))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(n=i(r,e),!lt(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.addItemSize=(e,r,n)=>{if(this.sizes[e]=r,this.maxSize){let i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],n&&(n.entrySize=r,n.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,r){for(let n of this.indexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a!==void 0&&e(a,this.keyList[n],this))return this.get(this.keyList[n],r)}}forEach(e,r=this){for(let n of this.indexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.keyList[n],this)}}rforEach(e,r=this){for(let n of this.rindexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.keyList[n],this)}}get prune(){return Li("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){let e=[];for(let r of this.indexes({allowStale:!0})){let n=this.keyList[r],i=this.valList[r],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a===void 0)continue;let u={value:a};if(this.ttls){u.ttl=this.ttls[r];let h=Vr.now()-this.starts[r];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[r]),e.unshift([n,u])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=Vr.now()-i}this.set(r,n.value,n)}}dispose(e,r,n){}set(e,r,{ttl:n=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,status:c}={}){if(u=this.requireSize(e,r,u,h),this.maxEntrySize&&u>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(e),this;let g=this.size===0?void 0:this.keyMap.get(e);if(g===void 0)g=this.newIndex(),this.keyList[g]=e,this.valList[g]=r,this.keyMap.set(e,g),this.next[this.tail]=g,this.prev[g]=this.tail,this.tail=g,this.size++,this.addItemSize(g,u,c),c&&(c.set="add"),f=!1;else{this.moveToTail(g);let b=this.valList[g];if(r!==b){if(this.isBackgroundFetch(b)?b.__abortController.abort(new Error("replaced")):a||(this.dispose(b,e,"set"),this.disposeAfter&&this.disposed.push([b,e,"set"])),this.removeItemSize(g),this.valList[g]=r,this.addItemSize(g,u,c),c){c.set="replace";let m=b&&this.isBackgroundFetch(b)?b.__staleWhileFetching:b;m!==void 0&&(c.oldValue=m)}}else c&&(c.set="update")}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),f||this.setItemTTL(g,n,i),this.statusTTL(c,g),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let r=this.head,n=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas,status:n}={}){let i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))n&&(n.has="stale",this.statusTTL(n,i));else return r&&this.updateItemAge(i),n&&(n.has="hit"),this.statusTTL(n,i),!0;else n&&(n.has="miss");return!1}peek(e,{allowStale:r=this.allowStale}={}){let n=this.keyMap.get(e);if(n!==void 0&&(r||!this.isStale(n))){let i=this.valList[n];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,r,n,i){let a=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(a))return a;let u=new ns;n.signal&&n.signal.addEventListener("abort",()=>u.abort(n.signal.reason));let h={signal:u.signal,options:n,context:i},f=(p,_=!1)=>{let{aborted:R}=u.signal,E=n.ignoreFetchAbort&&p!==void 0;return n.status&&(R&&!_?(n.status.fetchAborted=!0,n.status.fetchError=u.signal.reason,E&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),R&&!E&&!_?g(u.signal.reason):(this.valList[r]===m&&(p===void 0?m.__staleWhileFetching?this.valList[r]=m.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,p,h.options))),p)},c=p=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=p),g(p)),g=p=>{let{aborted:_}=u.signal,R=_&&n.allowStaleOnFetchAbort,E=R||n.allowStaleOnFetchRejection,A=E||n.noDeleteOnFetchRejection;if(this.valList[r]===m&&(!A||m.__staleWhileFetching===void 0?this.delete(e):R||(this.valList[r]=m.__staleWhileFetching)),E)return n.status&&m.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),m.__staleWhileFetching;if(m.__returned===m)throw p},b=(p,_)=>{this.fetchMethod(e,a,h).then(R=>p(R),_),u.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(p(),n.allowStaleOnFetchAbort&&(p=R=>f(R,!0)))})};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(b).then(f,c);return m.__abortController=u,m.__staleWhileFetching=a,m.__returned=null,r===void 0?(this.set(e,m,{...h.options,status:void 0}),r=this.keyMap.get(e)):this.valList[r]=m,m}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,fetchContext:_=this.fetchContext,forceRefresh:R=!1,status:E,signal:A}={}){if(!this.fetchMethod)return E&&(E.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:E});let N={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:u,size:h,sizeCalculation:f,noUpdateTTL:c,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:p,ignoreFetchAbort:m,status:E,signal:A},$=this.keyMap.get(e);if($===void 0){E&&(E.fetch="miss");let T=this.backgroundFetch(e,$,N,_);return T.__returned=T}else{let T=this.valList[$];if(this.isBackgroundFetch(T)){let K=r&&T.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",K&&(E.returnedStale=!0)),K?T.__staleWhileFetching:T.__returned=T}let L=this.isStale($);if(!R&&!L)return E&&(E.fetch="hit"),this.moveToTail($),n&&this.updateItemAge($),this.statusTTL(E,$),T;let D=this.backgroundFetch(e,$,N,_),H=D.__staleWhileFetching!==void 0,V=H&&r;return E&&(E.fetch=H&&L?"stale":"refresh",V&&L&&(E.returnedStale=!0)),V?D.__staleWhileFetching:D.__returned=D}}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}={}){let u=this.keyMap.get(e);if(u!==void 0){let h=this.valList[u],f=this.isBackgroundFetch(h);return this.statusTTL(a,u),this.isStale(u)?(a&&(a.get="stale"),f?(a&&(a.returnedStale=r&&h.__staleWhileFetching!==void 0),r?h.__staleWhileFetching:void 0):(i||this.delete(e),a&&(a.returnedStale=r),r?h:void 0)):(a&&(a.get="hit"),f?h.__staleWhileFetching:(this.moveToTail(u),n&&this.updateItemAge(u),h))}else a&&(a.get="miss")}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return Li("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){let n=this.keyMap.get(e);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);let i=this.valList[n];this.isBackgroundFetch(i)?i.__abortController.abort(new Error("deleted")):(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(let e of this.rindexes({allowStale:!0})){let r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort(new Error("deleted"));else{let n=this.keyList[e];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return Li("reset","clear"),this.clear}get length(){return gb("length","size"),this.size}static get AbortController(){return ns}static get AbortSignal(){return Dc}};Fc.exports=tr});var Mc=C((hS,zc)=>{"use strict";var j=(...t)=>t.every(e=>e)?t.join(""):"",re=t=>t?encodeURIComponent(t):"",Uc=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),bb={sshtemplate:({domain:t,user:e,project:r,committish:n})=>`git@${t}:${e}/${r}.git${j("#",n)}`,sshurltemplate:({domain:t,user:e,project:r,committish:n})=>`git+ssh://git@${t}/${e}/${r}.git${j("#",n)}`,edittemplate:({domain:t,user:e,project:r,committish:n,editpath:i,path:a})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n||"HEAD"),"/",a)}`,browsetemplate:({domain:t,user:e,project:r,committish:n,treepath:i})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:n,treepath:i,path:a,fragment:u,hashformat:h})=>`https://${t}/${e}/${r}/${i}/${re(n||"HEAD")}/${a}${j("#",h(u||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:n,blobpath:i,path:a,fragment:u,hashformat:h})=>`https://${t}/${e}/${r}/${i}/${re(n||"HEAD")}/${a}${j("#",h(u||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:n,committish:i})=>`https://${t}/${e}/${r}${j("/",n,"/",re(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:n,path:i})=>`https://${t}/${e}/${r}/raw/${re(n||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:n})=>`${t}:${e}/${r}${j("#",n)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${j("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:Uc},ut={};ut.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:e,project:r,committish:n,path:i})=>`https://${j(t,"@")}raw.githubusercontent.com/${e}/${r}/${re(n||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://codeload.${t}/${e}/${r}/tar.gz/${re(n||"HEAD")}`,extract:t=>{let[,e,r,n,i]=t.pathname.split("/",5);if(!(n&&n!=="tree")&&(n||(i=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:i}}};ut.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:e,project:r,committish:n,treepath:i,path:a,editpath:u})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/get/${re(n||"HEAD")}.tar.gz`,extract:t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["get"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};ut.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${re(n||"HEAD")}`,extract:t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),n=r.pop();n.endsWith(".git")&&(n=n.slice(0,-4));let i=r.join("/");if(!(!i||!n))return{user:i,project:n,committish:t.hash.slice(1)}}};ut.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${j("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${j("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:n,editpath:i})=>`https://${t}/${e}/${r}${j("/",re(n))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",re(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${j("/",re(r))}${j("#",i(n))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${j("/",re(r))}${j("#",i(n))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",re(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${j("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:n})=>`https://gist.githubusercontent.com/${t}/${e}/raw${j("/",re(r))}/${n}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${j("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${j("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${j("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${re(e||"HEAD")}`,extract:t=>{let[,e,r,n]=t.pathname.split("/",4);if(n!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+Uc(t)}};ut.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:e,project:r,committish:n,path:i})=>`https://${t}/${e}/${r}/blob/${re(n)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}.git${j("#",n)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/archive/${re(n)||"HEAD"}.tar.gz`,bugstemplate:({user:t,project:e})=>`https://todo.sr.ht/${t}/${e}`,extract:t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["archive"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};for(let[t,e]of Object.entries(ut))ut[t]=Object.assign({},bb,e);zc.exports=ut});var Hi=C((fS,kc)=>{var yb=ye("url"),Di=(t,e,r)=>{let n=t.indexOf(r);return t.lastIndexOf(e,n>-1?n:1/0)},Wc=t=>{try{return new yb.URL(t)}catch{}},_b=(t,e)=>{let r=t.indexOf(":"),n=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,n))return t;let i=t.indexOf("@");return i>-1?i>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},wb=t=>{let e=Di(t,"@","#"),r=Di(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Di(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};kc.exports=(t,e)=>{let r=e?_b(t,e):t;return Wc(r)||Wc(wb(r))}});var Vc=C((dS,jc)=>{"use strict";var Sb=Hi(),Rb=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),n=t.indexOf("/",r+1),i=t.indexOf(":"),a=/\s/.exec(t),u=t.indexOf("@"),h=!a||e>-1&&a.index>e,f=u===-1||e>-1&&u>e,c=i===-1||e>-1&&i>e,g=n===-1||e>-1&&n>e,b=r>0,m=e>-1?t[e-1]!=="/":!t.endsWith("/"),p=!t.startsWith(".");return h&&b&&m&&p&&f&&c&&g};jc.exports=(t,e,{gitHosts:r,protocols:n})=>{var R,E;if(!t)return;let i=Rb(t)?`github:${t}`:t,a=Sb(i,n);if(!a)return;let u=r.byShortcut[a.protocol],h=r.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],f=u||h;if(!f)return;let c=r[u||h],g=null;(R=n[a.protocol])!=null&&R.auth&&(a.username||a.password)&&(g=`${a.username}${a.password?":"+a.password:""}`);let b=null,m=null,p=null,_=null;try{if(u){let A=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,N=A.indexOf("@");N>-1&&(A=A.slice(N+1));let $=A.lastIndexOf("/");$>-1?(m=decodeURIComponent(A.slice(0,$)),m||(m=null),p=decodeURIComponent(A.slice($+1))):p=decodeURIComponent(A),p.endsWith(".git")&&(p=p.slice(0,-4)),a.hash&&(b=decodeURIComponent(a.hash.slice(1))),_="shortcut"}else{if(!c.protocols.includes(a.protocol))return;let A=c.extract(a);if(!A)return;m=A.user&&decodeURIComponent(A.user),p=decodeURIComponent(A.project),b=decodeURIComponent(A.committish),_=((E=n[a.protocol])==null?void 0:E.name)||a.protocol.slice(0,-1)}}catch(A){if(A instanceof URIError)return;throw A}return[f,m,g,p,b,_,e]}});var Yc=C((pS,Gc)=>{"use strict";var Eb=qc(),Tb=Mc(),Ab=Vc(),Cb=Hi(),Bi=new Eb({max:1e3}),is=class t{constructor(e,r,n,i,a,u,h={}){Object.assign(this,t.#e[e],{type:e,user:r,auth:n,project:i,committish:a,default:u,opts:h})}static#e={byShortcut:{},byDomain:{}};static#r={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,r){t.#e[e]=r,t.#e.byDomain[r.domain]=e,t.#e.byShortcut[`${e}:`]=e,t.#r[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let n=e+JSON.stringify(r||{});if(!Bi.has(n)){let i=Ab(e,r,{gitHosts:t.#e,protocols:t.#r});Bi.set(n,i?new t(...i):void 0)}return Bi.get(n)}static parseUrl(e){return Cb(e)}#t(e,r){if(typeof e!="function")return null;let n={...this,...this.opts,...r};n.path||(n.path=""),n.path.startsWith("/")&&(n.path=n.path.slice(1)),n.noCommittish&&(n.committish=null);let i=e(n);return n.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#t(this.sshtemplate,e)}sshurl(e){return this.#t(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#t(this.browsetemplate,e):typeof r[0]!="string"?this.#t(this.browsetreetemplate,{...r[0],path:e}):this.#t(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#t(this.browseblobtemplate,{...r[0],path:e}):this.#t(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#t(this.docstemplate,e)}bugs(e){return this.#t(this.bugstemplate,e)}https(e){return this.#t(this.httpstemplate,e)}git(e){return this.#t(this.gittemplate,e)}shortcut(e){return this.#t(this.shortcuttemplate,e)}path(e){return this.#t(this.pathtemplate,e)}tarball(e){return this.#t(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#t(this.filetemplate,{...r,path:e})}edit(e,r){return this.#t(this.edittemplate,{...r,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[t,e]of Object.entries(Tb))is.addHost(t,e);Gc.exports=is});var th=C((SS,eh)=>{"use strict";var vt=class t extends Error{constructor(e,r,n){super("[ParserError] "+e,r,n),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}},us=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},Gr=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new us(this.parseStart)}parse(e){if(e.length===0||e.length==null)return;this._buf=String(e),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let e;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if(typeof e!="function")throw new vt("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,r){r&&this.next(r),this.stack.push(this.state),this.state=new us(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new vt("Stack underflow"));e===void 0&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===1114112)throw this.error(new vt("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new vt("Must declare a parseStart method")}};Gr.END=1114112;Gr.Error=vt;eh.exports=Gr});var nh=C((RS,rh)=>{"use strict";rh.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var cs=C((ES,sh)=>{"use strict";sh.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var oh=C((TS,ih)=>{"use strict";var nr=cs(),zi=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${nr(2,this.getUTCMonth()+1)}-${nr(2,this.getUTCDate())}`,r=`${nr(2,this.getUTCHours())}:${nr(2,this.getUTCMinutes())}:${nr(2,this.getUTCSeconds())}.${nr(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};ih.exports=t=>{let e=new zi(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var uh=C((AS,lh)=>{"use strict";var ah=cs(),Nb=global.Date,Mi=class extends Nb{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${ah(2,this.getUTCMonth()+1)}-${ah(2,this.getUTCDate())}`}};lh.exports=t=>{let e=new Mi(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var hh=C((CS,ch)=>{"use strict";var hs=cs(),Wi=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${hs(2,this.getUTCHours())}:${hs(2,this.getUTCMinutes())}:${hs(2,this.getUTCSeconds())}.${hs(3,this.getUTCMilliseconds())}`}};ch.exports=t=>{let e=new Wi(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var fh=C((exports,module)=>{"use strict";module.exports=makeParserClass(th());module.exports.makeParserClass=makeParserClass;var TomlError=class t extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,t),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=t=>{let e=new TomlError(t.message);return e.code=t.code,e.wrapped=t,e};module.exports.TomlError=TomlError;var createDateTime=nh(),createDateTimeFloat=oh(),createDate=uh(),createTime=hh(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
21
- `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}function isBit(t){return t===CHAR_1||t===CHAR_0}function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}function makeParserClass(t){class e extends t{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(n){let i=this.ctx,a=n.key.pop();for(let u of n.key){if(hasKey(i,u)&&(!isTable(i[u])||i[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[u]=i[u]||Table()}if(hasKey(i,a))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[a]=n.value.valueOf():i[a]=n.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(n){return this.state.resultTable?this.state.resultTable.push(n):this.state.resultTable=[n],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(n){return this.returnNow({key:this.state.resultTable,value:n})}parseComment(){do if(this.char===t.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)&&(!isTable(this.ctx[n])||this.ctx[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[n]=this.ctx[n]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,n))this.ctx=this.ctx[n]=Table();else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];else if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)||(this.ctx[n]=List()),isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[n])){let i=Table();this.ctx[n].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,n))this.ctx=this.ctx[n]=Table();else{if(isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].length-1];else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(n){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===t.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(n){return this.returnNow(n)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===t.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(n){return this.state.buf+=n,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let n="\\u00";return this.char<16&&(n+="0"),n+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${n} instead`))}recordMultiEscapeReplacement(n){return this.state.buf+=n,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(n){try{let i=parseInt(n,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===t.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(n){if(this.state.resultArr){let i=this.state.resultArr[_contentType],a=tomlType(n);if(i!==a)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${a}`))}else this.state.resultArr=InlineList(tomlType(n));return isFloat(n)||isInteger(n)?this.state.resultArr.push(n.valueOf()):this.state.resultArr.push(n),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(n){let i=this.state.resultTable,a=n.key.pop();for(let u of n.key){if(hasKey(i,u)&&(!isTable(i[u])||i[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[u]=i[u]||Table()}if(hasKey(i,a))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[a]=n.value.valueOf():i[a]=n.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return e}});var ph=C((vS,dh)=>{"use strict";dh.exports=Db;function Db(t,e){if(t.pos==null||t.line==null)return t;let r=t.message;if(r+=` at row ${t.line+1}, col ${t.col+1}, pos ${t.pos}:
16
+ `;function ol(t,e){var r=[],n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(a,u,h){var f=t[a];f&&Array.isArray(f)?f.forEach(function(c){n+=Yt(a+"[]")+i+Yt(c)+`
17
+ `}):f&&typeof f=="object"?r.push(a):n+=Yt(a)+i+Yt(f)+ui}),e.section&&n.length&&(n="["+Yt(e.section)+"]"+ui+n),r.forEach(function(a,u,h){var f=al(a).join("\\."),c=(e.section?e.section+".":"")+f,g=ol(t[a],{section:c,whitespace:e.whitespace});n.length&&g.length&&(n+=ui),n+=g}),n}function al(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function ap(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,a=t.split(/[\r\n]+/g);return a.forEach(function(u,h,f){if(!(!u||u.match(/^\s*[;#]/))){var c=u.match(i);if(c){if(c[1]!==void 0){if(n=zn(c[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var g=zn(c[2]);if(g!=="__proto__"){var b=c[3]?zn(c[4]):!0;switch(b){case"true":case"false":case"null":b=JSON.parse(b)}if(g.length>2&&g.slice(-2)==="[]"){if(g=g.substring(0,g.length-2),g==="__proto__")return;r[g]?Array.isArray(r[g])||(r[g]=[r[g]]):r[g]=[]}Array.isArray(r[g])?r[g].push(b):r[g]=b}}}}),Object.keys(e).filter(function(u,h,f){if(!e[u]||typeof e[u]!="object"||Array.isArray(e[u]))return!1;var c=al(u),g=e,b=c.pop(),m=b.replace(/\\\./g,".");return c.forEach(function(p,_,R){p!=="__proto__"&&((!g[p]||typeof g[p]!="object")&&(g[p]={}),g=g[p])}),g===e&&m===b?!1:(g[m]=e[u],!0)}).forEach(function(u,h,f){delete e[u]}),e}function ll(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Yt(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&ll(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function zn(t,e){if(t=(t||"").trim(),ll(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,a=t.length;i<a;i++){var u=t.charAt(i);if(r)"\\;#".indexOf(u)!==-1?n+=u:n+="\\"+u,r=!1;else{if(";#".indexOf(u)!==-1)break;u==="\\"?r=!0:n+=u}}return r&&(n+="\\"),n.trim()}return t}});var fl=C((aw,hl)=>{"use strict";var ci=1,cl=2;function lp(){return""}function up(t,e,r){return t.slice(e,r).replace(/\S/g," ")}hl.exports=function(t,e){e=e||{};for(var r,n,i=!1,a=!1,u=0,h="",f=e.whitespace===!1?lp:up,c=0;c<t.length;c++){if(r=t[c],n=t[c+1],!a&&r==='"'){var g=t[c-1]==="\\"&&t[c-2]!=="\\";g||(i=!i)}if(!i){if(!a&&r+n==="//")h+=t.slice(u,c),u=c,a=ci,c++;else if(a===ci&&r+n===`\r
18
+ `){c++,a=!1,h+=f(t,u,c),u=c;continue}else if(a===ci&&r===`
19
+ `)a=!1,h+=f(t,u,c),u=c;else if(!a&&r+n==="/*"){h+=t.slice(u,c),u=c,a=cl,c++;continue}else if(a===cl&&r+n==="*/"){c++,a=!1,h+=f(t,u,c+1),u=c+1;continue}}}return h+(a?f(t.substr(u)):t.substr(u))}});var pl=C(Qt=>{"use strict";var dl=ye("fs"),cp=ul(),Pr=ye("path"),hp=fl(),fp=Qt.parse=function(t){return/^\s*{/.test(t)?JSON.parse(hp(t)):cp.parse(t)},dp=Qt.file=function(){var t=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in t)if(typeof t[e]!="string")return;var r=Pr.join.apply(null,t),n;try{return dl.readFileSync(r,"utf-8")}catch{return}},lw=Qt.json=function(){var t=dp.apply(null,arguments);return t?fp(t):null},uw=Qt.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var a=i.substring(n).split("__"),u;(u=a.indexOf(""))>-1;)a.splice(u,1);var h=r;a.forEach(function(c,g){!c||typeof h!="object"||(g===a.length-1&&(h[c]=e[i]),h[c]===void 0&&(h[c]={}),h=h[c])})}return r},cw=Qt.find=function(){var t=Pr.join.apply(null,[].slice.call(arguments));function e(r,n){var i=Pr.join(r,n);try{return dl.statSync(i),i}catch{if(Pr.dirname(r)!==r)return e(Pr.dirname(r),n)}}return e(process.cwd(),t)}});var wl=C((fw,_l)=>{"use strict";function gl(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function bl(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function yl(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=yl(r):gl(r)?e[n]=bl(r):e[n]=hi({},r):e[n]=r}),e}function ml(t,e){return e==="__proto__"?void 0:t[e]}var hi=_l.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,n,i;return e.forEach(function(a){typeof a!="object"||a===null||Array.isArray(a)||Object.keys(a).forEach(function(u){if(n=ml(t,u),r=ml(a,u),r!==t)if(typeof r!="object"||r===null){t[u]=r;return}else if(Array.isArray(r)){t[u]=yl(r);return}else if(gl(r)){t[u]=bl(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[u]=hi({},r);return}else{t[u]=hi(n,r);return}})}),t}});var Mn=C((dw,El)=>{var Nr=pl(),Kt=ye("path").join,pp=wl(),Sl="/etc",Rl=process.platform==="win32",Dr=Rl?process.env.USERPROFILE:process.env.HOME;El.exports=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Zs()(process.argv.slice(2))),e=(typeof e=="string"?Nr.json(e):e)||{},n=n||Nr.parse;var i=Nr.env(t+"_"),a=[e],u=[];function h(f){if(!(u.indexOf(f)>=0)){var c=Nr.file(f);c&&(a.push(n(c)),u.push(f))}}return Rl||[Kt(Sl,t,"config"),Kt(Sl,t+"rc")].forEach(h),Dr&&[Kt(Dr,".config",t,"config"),Kt(Dr,".config",t),Kt(Dr,"."+t,"config"),Kt(Dr,"."+t+"rc")].forEach(h),h(Nr.find("."+t+"rc")),i.config&&h(i.config),r.config&&h(r.config),pp.apply(null,a.concat([i,r,u.length?{configs:u,config:u[u.length-1]}:void 0]))}});var $l=C((pw,Il)=>{var fi=ye("url"),xl=il(),mp=xl.decodeBase64,gp=xl.encodeBase64,Tl=":_authToken",Al=":_auth",Cl=":username",vl=":_password";Il.exports=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||Mn()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,Ol(t,e)||bp(e.npmrc)};function Ol(t,e){for(var r=fi.parse(t,!1,!0),n;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,""),a=_p(i,e.npmrc);if(a)return a;if(!e.recursive)return/\/$/.test(t)?void 0:Ol(fi.resolve(t,"."),e);r.pathname=fi.resolve(yp(n),"..")||"/"}}function bp(t){if(t._auth){var e=kn(t._auth);return{token:e,type:"Basic"}}}function yp(t){return t[t.length-1]==="/"?t:t+"/"}function _p(t,e){var r=wp(e[t+Tl]||e[t+"/"+Tl]);if(r)return r;var n=e[t+Cl]||e[t+"/"+Cl],i=e[t+vl]||e[t+"/"+vl],a=Sp(n,i);if(a)return a;var u=Rp(e[t+Al]||e[t+"/"+Al]);if(u)return u}function kn(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function wp(t){if(t){var e=kn(t);return{token:e,type:"Bearer"}}}function Sp(t,e){if(!(!t||!e)){var r=mp(kn(e)),n=gp(t+":"+r);return{token:n,type:"Basic",password:r,username:t}}}function Rp(t){if(t){var e=kn(t);return{token:e,type:"Basic"}}}});var Pl=C((mw,Ll)=>{Ll.exports=function(t,e){var r=e||Mn()("npm",{registry:"https://registry.npmjs.org/"}),n=r[t+":registry"]||r.registry;return n.slice(-1)==="/"?n:n+"/"}});var Hr=C((gw,Nl)=>{var Ep="2.0.0",Tp=Number.MAX_SAFE_INTEGER||9007199254740991,Ap=16;Nl.exports={SEMVER_SPEC_VERSION:Ep,MAX_LENGTH:256,MAX_SAFE_INTEGER:Tp,MAX_SAFE_COMPONENT_LENGTH:Ap}});var Br=C((bw,Dl)=>{var Cp=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Dl.exports=Cp});var Rt=C((lt,Hl)=>{var{MAX_SAFE_COMPONENT_LENGTH:di}=Hr(),vp=Br();lt=Hl.exports={};var xp=lt.re=[],O=lt.src=[],I=lt.t={},Op=0,F=(t,e,r)=>{let n=Op++;vp(t,n,e),I[t]=n,O[n]=e,xp[n]=new RegExp(e,r?"g":void 0)};F("NUMERICIDENTIFIER","0|[1-9]\\d*");F("NUMERICIDENTIFIERLOOSE","[0-9]+");F("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");F("MAINVERSION",`(${O[I.NUMERICIDENTIFIER]})\\.(${O[I.NUMERICIDENTIFIER]})\\.(${O[I.NUMERICIDENTIFIER]})`);F("MAINVERSIONLOOSE",`(${O[I.NUMERICIDENTIFIERLOOSE]})\\.(${O[I.NUMERICIDENTIFIERLOOSE]})\\.(${O[I.NUMERICIDENTIFIERLOOSE]})`);F("PRERELEASEIDENTIFIER",`(?:${O[I.NUMERICIDENTIFIER]}|${O[I.NONNUMERICIDENTIFIER]})`);F("PRERELEASEIDENTIFIERLOOSE",`(?:${O[I.NUMERICIDENTIFIERLOOSE]}|${O[I.NONNUMERICIDENTIFIER]})`);F("PRERELEASE",`(?:-(${O[I.PRERELEASEIDENTIFIER]}(?:\\.${O[I.PRERELEASEIDENTIFIER]})*))`);F("PRERELEASELOOSE",`(?:-?(${O[I.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[I.PRERELEASEIDENTIFIERLOOSE]})*))`);F("BUILDIDENTIFIER","[0-9A-Za-z-]+");F("BUILD",`(?:\\+(${O[I.BUILDIDENTIFIER]}(?:\\.${O[I.BUILDIDENTIFIER]})*))`);F("FULLPLAIN",`v?${O[I.MAINVERSION]}${O[I.PRERELEASE]}?${O[I.BUILD]}?`);F("FULL",`^${O[I.FULLPLAIN]}$`);F("LOOSEPLAIN",`[v=\\s]*${O[I.MAINVERSIONLOOSE]}${O[I.PRERELEASELOOSE]}?${O[I.BUILD]}?`);F("LOOSE",`^${O[I.LOOSEPLAIN]}$`);F("GTLT","((?:<|>)?=?)");F("XRANGEIDENTIFIERLOOSE",`${O[I.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);F("XRANGEIDENTIFIER",`${O[I.NUMERICIDENTIFIER]}|x|X|\\*`);F("XRANGEPLAIN",`[v=\\s]*(${O[I.XRANGEIDENTIFIER]})(?:\\.(${O[I.XRANGEIDENTIFIER]})(?:\\.(${O[I.XRANGEIDENTIFIER]})(?:${O[I.PRERELEASE]})?${O[I.BUILD]}?)?)?`);F("XRANGEPLAINLOOSE",`[v=\\s]*(${O[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[I.XRANGEIDENTIFIERLOOSE]})(?:${O[I.PRERELEASELOOSE]})?${O[I.BUILD]}?)?)?`);F("XRANGE",`^${O[I.GTLT]}\\s*${O[I.XRANGEPLAIN]}$`);F("XRANGELOOSE",`^${O[I.GTLT]}\\s*${O[I.XRANGEPLAINLOOSE]}$`);F("COERCE",`(^|[^\\d])(\\d{1,${di}})(?:\\.(\\d{1,${di}}))?(?:\\.(\\d{1,${di}}))?(?:$|[^\\d])`);F("COERCERTL",O[I.COERCE],!0);F("LONETILDE","(?:~>?)");F("TILDETRIM",`(\\s*)${O[I.LONETILDE]}\\s+`,!0);lt.tildeTrimReplace="$1~";F("TILDE",`^${O[I.LONETILDE]}${O[I.XRANGEPLAIN]}$`);F("TILDELOOSE",`^${O[I.LONETILDE]}${O[I.XRANGEPLAINLOOSE]}$`);F("LONECARET","(?:\\^)");F("CARETTRIM",`(\\s*)${O[I.LONECARET]}\\s+`,!0);lt.caretTrimReplace="$1^";F("CARET",`^${O[I.LONECARET]}${O[I.XRANGEPLAIN]}$`);F("CARETLOOSE",`^${O[I.LONECARET]}${O[I.XRANGEPLAINLOOSE]}$`);F("COMPARATORLOOSE",`^${O[I.GTLT]}\\s*(${O[I.LOOSEPLAIN]})$|^$`);F("COMPARATOR",`^${O[I.GTLT]}\\s*(${O[I.FULLPLAIN]})$|^$`);F("COMPARATORTRIM",`(\\s*)${O[I.GTLT]}\\s*(${O[I.LOOSEPLAIN]}|${O[I.XRANGEPLAIN]})`,!0);lt.comparatorTrimReplace="$1$2$3";F("HYPHENRANGE",`^\\s*(${O[I.XRANGEPLAIN]})\\s+-\\s+(${O[I.XRANGEPLAIN]})\\s*$`);F("HYPHENRANGELOOSE",`^\\s*(${O[I.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[I.XRANGEPLAINLOOSE]})\\s*$`);F("STAR","(<|>)?=?\\s*\\*");F("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");F("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Fr=C((yw,Bl)=>{var Ip=["includePrerelease","loose","rtl"],$p=t=>t?typeof t!="object"?{loose:!0}:Ip.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};Bl.exports=$p});var pi=C((_w,Ul)=>{var Fl=/^[0-9]+$/,ql=(t,e)=>{let r=Fl.test(t),n=Fl.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Lp=(t,e)=>ql(e,t);Ul.exports={compareIdentifiers:ql,rcompareIdentifiers:Lp}});var ae=C((ww,Wl)=>{var Wn=Br(),{MAX_LENGTH:zl,MAX_SAFE_INTEGER:jn}=Hr(),{re:Ml,t:kl}=Rt(),Pp=Fr(),{compareIdentifiers:Xt}=pi(),mi=class t{constructor(e,r){if(r=Pp(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>zl)throw new TypeError(`version is longer than ${zl} characters`);Wn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?Ml[kl.LOOSE]:Ml[kl.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>jn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>jn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>jn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let a=+i;if(a>=0&&a<jn)return a}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Wn("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Xt(this.major,e.major)||Xt(this.minor,e.minor)||Xt(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(Wn("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Xt(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(Wn("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Xt(n,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}r&&(Xt(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Wl.exports=mi});var Et=C((Sw,Yl)=>{var{MAX_LENGTH:Np}=Hr(),{re:jl,t:Vl}=Rt(),Gl=ae(),Dp=Fr(),Hp=(t,e)=>{if(e=Dp(e),t instanceof Gl)return t;if(typeof t!="string"||t.length>Np||!(e.loose?jl[Vl.LOOSE]:jl[Vl.FULL]).test(t))return null;try{return new Gl(t,e)}catch{return null}};Yl.exports=Hp});var Kl=C((Rw,Ql)=>{var Bp=Et(),Fp=(t,e)=>{let r=Bp(t,e);return r?r.version:null};Ql.exports=Fp});var Zl=C((Ew,Xl)=>{var qp=Et(),Up=(t,e)=>{let r=qp(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Xl.exports=Up});var tu=C((Tw,eu)=>{var Jl=ae(),zp=(t,e,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new Jl(t instanceof Jl?t.version:t,r).inc(e,n).version}catch{return null}};eu.exports=zp});var Ae=C((Aw,nu)=>{var ru=ae(),Mp=(t,e,r)=>new ru(t,r).compare(new ru(e,r));nu.exports=Mp});var Vn=C((Cw,su)=>{var kp=Ae(),Wp=(t,e,r)=>kp(t,e,r)===0;su.exports=Wp});var au=C((vw,ou)=>{var iu=Et(),jp=Vn(),Vp=(t,e)=>{if(jp(t,e))return null;{let r=iu(t),n=iu(e),i=r.prerelease.length||n.prerelease.length,a=i?"pre":"",u=i?"prerelease":"";for(let h in r)if((h==="major"||h==="minor"||h==="patch")&&r[h]!==n[h])return a+h;return u}};ou.exports=Vp});var uu=C((xw,lu)=>{var Gp=ae(),Yp=(t,e)=>new Gp(t,e).major;lu.exports=Yp});var hu=C((Ow,cu)=>{var Qp=ae(),Kp=(t,e)=>new Qp(t,e).minor;cu.exports=Kp});var du=C((Iw,fu)=>{var Xp=ae(),Zp=(t,e)=>new Xp(t,e).patch;fu.exports=Zp});var mu=C(($w,pu)=>{var Jp=Et(),em=(t,e)=>{let r=Jp(t,e);return r&&r.prerelease.length?r.prerelease:null};pu.exports=em});var bu=C((Lw,gu)=>{var tm=Ae(),rm=(t,e,r)=>tm(e,t,r);gu.exports=rm});var _u=C((Pw,yu)=>{var nm=Ae(),sm=(t,e)=>nm(t,e,!0);yu.exports=sm});var Gn=C((Nw,Su)=>{var wu=ae(),im=(t,e,r)=>{let n=new wu(t,r),i=new wu(e,r);return n.compare(i)||n.compareBuild(i)};Su.exports=im});var Eu=C((Dw,Ru)=>{var om=Gn(),am=(t,e)=>t.sort((r,n)=>om(r,n,e));Ru.exports=am});var Au=C((Hw,Tu)=>{var lm=Gn(),um=(t,e)=>t.sort((r,n)=>lm(n,r,e));Tu.exports=um});var qr=C((Bw,Cu)=>{var cm=Ae(),hm=(t,e,r)=>cm(t,e,r)>0;Cu.exports=hm});var Yn=C((Fw,vu)=>{var fm=Ae(),dm=(t,e,r)=>fm(t,e,r)<0;vu.exports=dm});var gi=C((qw,xu)=>{var pm=Ae(),mm=(t,e,r)=>pm(t,e,r)!==0;xu.exports=mm});var Qn=C((Uw,Ou)=>{var gm=Ae(),bm=(t,e,r)=>gm(t,e,r)>=0;Ou.exports=bm});var Kn=C((zw,Iu)=>{var ym=Ae(),_m=(t,e,r)=>ym(t,e,r)<=0;Iu.exports=_m});var bi=C((Mw,$u)=>{var wm=Vn(),Sm=gi(),Rm=qr(),Em=Qn(),Tm=Yn(),Am=Kn(),Cm=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return wm(t,r,n);case"!=":return Sm(t,r,n);case">":return Rm(t,r,n);case">=":return Em(t,r,n);case"<":return Tm(t,r,n);case"<=":return Am(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};$u.exports=Cm});var Pu=C((kw,Lu)=>{var vm=ae(),xm=Et(),{re:Xn,t:Zn}=Rt(),Om=(t,e)=>{if(t instanceof vm)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(Xn[Zn.COERCE]);else{let n;for(;(n=Xn[Zn.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),Xn[Zn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Xn[Zn.COERCERTL].lastIndex=-1}return r===null?null:xm(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};Lu.exports=Om});var Du=C((Ww,Nu)=>{"use strict";Nu.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Bu=C((jw,Hu)=>{"use strict";Hu.exports=W;W.Node=Tt;W.create=W;function W(t){var e=this;if(e instanceof W||(e=new W),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)e.push(arguments[r]);return e}W.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};W.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};W.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};W.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)$m(this,arguments[t]);return this.length};W.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Lm(this,arguments[t]);return this.length};W.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};W.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};W.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;r!==null;n++)t.call(e,r.value,n,this),r=r.next};W.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;r!==null;n--)t.call(e,r.value,n,this),r=r.prev};W.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};W.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};W.prototype.map=function(t,e){e=e||this;for(var r=new W,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};W.prototype.mapReverse=function(t,e){e=e||this;for(var r=new W,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};W.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r};W.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r};W.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};W.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};W.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new W;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)r.push(i.value);return r};W.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new W;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r};W.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(var a=[],n=0;i&&n<e;n++)a.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=Im(this,i,r[n]);return a};W.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};function Im(t,e,r){var n=e===t.head?new Tt(r,null,e,t):new Tt(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function $m(t,e){t.tail=new Tt(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Lm(t,e){t.head=new Tt(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Tt(t,e,r,n){if(!(this instanceof Tt))return new Tt(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Du()(W)}catch{}});var Mu=C((Vw,zu)=>{"use strict";var Pm=Bu(),At=Symbol("max"),Qe=Symbol("length"),Zt=Symbol("lengthCalculator"),zr=Symbol("allowStale"),Ct=Symbol("maxAge"),Ye=Symbol("dispose"),Fu=Symbol("noDisposeOnSet"),ie=Symbol("lruList"),He=Symbol("cache"),Uu=Symbol("updateAgeOnGet"),yi=()=>1,wi=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[At]=e.max||1/0,n=e.length||yi;if(this[Zt]=typeof n!="function"?yi:n,this[zr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ct]=e.maxAge||0,this[Ye]=e.dispose,this[Fu]=e.noDisposeOnSet||!1,this[Uu]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[At]=e||1/0,Ur(this)}get max(){return this[At]}set allowStale(e){this[zr]=!!e}get allowStale(){return this[zr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ct]=e,Ur(this)}get maxAge(){return this[Ct]}set lengthCalculator(e){typeof e!="function"&&(e=yi),e!==this[Zt]&&(this[Zt]=e,this[Qe]=0,this[ie].forEach(r=>{r.length=this[Zt](r.value,r.key),this[Qe]+=r.length})),Ur(this)}get lengthCalculator(){return this[Zt]}get length(){return this[Qe]}get itemCount(){return this[ie].length}rforEach(e,r){r=r||this;for(let n=this[ie].tail;n!==null;){let i=n.prev;qu(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[ie].head;n!==null;){let i=n.next;qu(this,e,n,r),n=i}}keys(){return this[ie].toArray().map(e=>e.key)}values(){return this[ie].toArray().map(e=>e.value)}reset(){this[Ye]&&this[ie]&&this[ie].length&&this[ie].forEach(e=>this[Ye](e.key,e.value)),this[He]=new Map,this[ie]=new Pm,this[Qe]=0}dump(){return this[ie].map(e=>Jn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ie]}set(e,r,n){if(n=n||this[Ct],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let i=n?Date.now():0,a=this[Zt](r,e);if(this[He].has(e)){if(a>this[At])return Jt(this,this[He].get(e)),!1;let f=this[He].get(e).value;return this[Ye]&&(this[Fu]||this[Ye](e,f.value)),f.now=i,f.maxAge=n,f.value=r,this[Qe]+=a-f.length,f.length=a,this.get(e),Ur(this),!0}let u=new Si(e,r,a,i,n);return u.length>this[At]?(this[Ye]&&this[Ye](e,r),!1):(this[Qe]+=u.length,this[ie].unshift(u),this[He].set(e,this[ie].head),Ur(this),!0)}has(e){if(!this[He].has(e))return!1;let r=this[He].get(e).value;return!Jn(this,r)}get(e){return _i(this,e,!0)}peek(e){return _i(this,e,!1)}pop(){let e=this[ie].tail;return e?(Jt(this,e),e.value):null}del(e){Jt(this,this[He].get(e))}load(e){this.reset();let r=Date.now();for(let n=e.length-1;n>=0;n--){let i=e[n],a=i.e||0;if(a===0)this.set(i.k,i.v);else{let u=a-r;u>0&&this.set(i.k,i.v,u)}}}prune(){this[He].forEach((e,r)=>_i(this,r,!1))}},_i=(t,e,r)=>{let n=t[He].get(e);if(n){let i=n.value;if(Jn(t,i)){if(Jt(t,n),!t[zr])return}else r&&(t[Uu]&&(n.value.now=Date.now()),t[ie].unshiftNode(n));return i.value}},Jn=(t,e)=>{if(!e||!e.maxAge&&!t[Ct])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ct]&&r>t[Ct]},Ur=t=>{if(t[Qe]>t[At])for(let e=t[ie].tail;t[Qe]>t[At]&&e!==null;){let r=e.prev;Jt(t,e),e=r}},Jt=(t,e)=>{if(e){let r=e.value;t[Ye]&&t[Ye](r.key,r.value),t[Qe]-=r.length,t[He].delete(r.key),t[ie].removeNode(e)}},Si=class{constructor(e,r,n,i,a){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=a||0}},qu=(t,e,r,n)=>{let i=r.value;Jn(t,i)&&(Jt(t,r),t[zr]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};zu.exports=wi});var Ce=C((Gw,Vu)=>{var Ri=class t{constructor(e,r){if(r=Dm(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof Ei)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!Wu(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&Um(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=ku.get(n);if(i)return i;let a=this.options.loose,u=a?me[ce.HYPHENRANGELOOSE]:me[ce.HYPHENRANGE];e=e.replace(u,Km(this.options.includePrerelease)),Q("hyphen replace",e),e=e.replace(me[ce.COMPARATORTRIM],Bm),Q("comparator trim",e),e=e.replace(me[ce.TILDETRIM],Fm),e=e.replace(me[ce.CARETTRIM],qm),e=e.split(/\s+/).join(" ");let h=e.split(" ").map(b=>zm(b,this.options)).join(" ").split(/\s+/).map(b=>Qm(b,this.options));a&&(h=h.filter(b=>(Q("loose invalid filter",b,this.options),!!b.match(me[ce.COMPARATORLOOSE])))),Q("range list",h);let f=new Map,c=h.map(b=>new Ei(b,this.options));for(let b of c){if(Wu(b))return[b];f.set(b.value,b)}f.size>1&&f.has("")&&f.delete("");let g=[...f.values()];return ku.set(n,g),g}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>ju(n,r)&&e.set.some(i=>ju(i,r)&&n.every(a=>i.every(u=>a.intersects(u,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Hm(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Xm(this.set[r],e,this.options))return!0;return!1}};Vu.exports=Ri;var Nm=Mu(),ku=new Nm({max:1e3}),Dm=Fr(),Ei=Mr(),Q=Br(),Hm=ae(),{re:me,t:ce,comparatorTrimReplace:Bm,tildeTrimReplace:Fm,caretTrimReplace:qm}=Rt(),Wu=t=>t.value==="<0.0.0-0",Um=t=>t.value==="",ju=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(a=>i.intersects(a,e)),i=n.pop();return r},zm=(t,e)=>(Q("comp",t,e),t=Wm(t,e),Q("caret",t),t=Mm(t,e),Q("tildes",t),t=Vm(t,e),Q("xrange",t),t=Ym(t,e),Q("stars",t),t),he=t=>!t||t.toLowerCase()==="x"||t==="*",Mm=(t,e)=>t.trim().split(/\s+/).map(r=>km(r,e)).join(" "),km=(t,e)=>{let r=e.loose?me[ce.TILDELOOSE]:me[ce.TILDE];return t.replace(r,(n,i,a,u,h)=>{Q("tilde",t,n,i,a,u,h);let f;return he(i)?f="":he(a)?f=`>=${i}.0.0 <${+i+1}.0.0-0`:he(u)?f=`>=${i}.${a}.0 <${i}.${+a+1}.0-0`:h?(Q("replaceTilde pr",h),f=`>=${i}.${a}.${u}-${h} <${i}.${+a+1}.0-0`):f=`>=${i}.${a}.${u} <${i}.${+a+1}.0-0`,Q("tilde return",f),f})},Wm=(t,e)=>t.trim().split(/\s+/).map(r=>jm(r,e)).join(" "),jm=(t,e)=>{Q("caret",t,e);let r=e.loose?me[ce.CARETLOOSE]:me[ce.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,a,u,h,f)=>{Q("caret",t,i,a,u,h,f);let c;return he(a)?c="":he(u)?c=`>=${a}.0.0${n} <${+a+1}.0.0-0`:he(h)?a==="0"?c=`>=${a}.${u}.0${n} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.0${n} <${+a+1}.0.0-0`:f?(Q("replaceCaret pr",f),a==="0"?u==="0"?c=`>=${a}.${u}.${h}-${f} <${a}.${u}.${+h+1}-0`:c=`>=${a}.${u}.${h}-${f} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.${h}-${f} <${+a+1}.0.0-0`):(Q("no pr"),a==="0"?u==="0"?c=`>=${a}.${u}.${h}${n} <${a}.${u}.${+h+1}-0`:c=`>=${a}.${u}.${h}${n} <${a}.${+u+1}.0-0`:c=`>=${a}.${u}.${h} <${+a+1}.0.0-0`),Q("caret return",c),c})},Vm=(t,e)=>(Q("replaceXRanges",t,e),t.split(/\s+/).map(r=>Gm(r,e)).join(" ")),Gm=(t,e)=>{t=t.trim();let r=e.loose?me[ce.XRANGELOOSE]:me[ce.XRANGE];return t.replace(r,(n,i,a,u,h,f)=>{Q("xRange",t,n,i,a,u,h,f);let c=he(a),g=c||he(u),b=g||he(h),m=b;return i==="="&&m&&(i=""),f=e.includePrerelease?"-0":"",c?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&m?(g&&(u=0),h=0,i===">"?(i=">=",g?(a=+a+1,u=0,h=0):(u=+u+1,h=0)):i==="<="&&(i="<",g?a=+a+1:u=+u+1),i==="<"&&(f="-0"),n=`${i+a}.${u}.${h}${f}`):g?n=`>=${a}.0.0${f} <${+a+1}.0.0-0`:b&&(n=`>=${a}.${u}.0${f} <${a}.${+u+1}.0-0`),Q("xRange return",n),n})},Ym=(t,e)=>(Q("replaceStars",t,e),t.trim().replace(me[ce.STAR],"")),Qm=(t,e)=>(Q("replaceGTE0",t,e),t.trim().replace(me[e.includePrerelease?ce.GTE0PRE:ce.GTE0],"")),Km=t=>(e,r,n,i,a,u,h,f,c,g,b,m,p)=>(he(n)?r="":he(i)?r=`>=${n}.0.0${t?"-0":""}`:he(a)?r=`>=${n}.${i}.0${t?"-0":""}`:u?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,he(c)?f="":he(g)?f=`<${+c+1}.0.0-0`:he(b)?f=`<${c}.${+g+1}.0-0`:m?f=`<=${c}.${g}.${b}-${m}`:t?f=`<${c}.${g}.${+b+1}-0`:f=`<=${f}`,`${r} ${f}`.trim()),Xm=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Q(t[n].semver),t[n].semver!==Ei.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Mr=C((Yw,Xu)=>{var kr=Symbol("SemVer ANY"),Ci=class t{static get ANY(){return kr}constructor(e,r){if(r=Zm(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}Ai("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===kr?this.value="":this.value=this.operator+this.semver.version,Ai("comp",this)}parse(e){let r=this.options.loose?Gu[Yu.COMPARATORLOOSE]:Gu[Yu.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Qu(n[2],this.options.loose):this.semver=kr}toString(){return this.value}test(e){if(Ai("Comparator.test",e,this.options.loose),this.semver===kr||e===kr)return!0;if(typeof e=="string")try{e=new Qu(e,this.options)}catch{return!1}return Ti(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Ku(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Ku(this.value,r).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),a=this.semver.version===e.semver.version,u=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),h=Ti(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),f=Ti(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||a&&u||h||f}};Xu.exports=Ci;var Zm=Fr(),{re:Gu,t:Yu}=Rt(),Ti=bi(),Ai=Br(),Qu=ae(),Ku=Ce()});var Wr=C((Qw,Zu)=>{var Jm=Ce(),eg=(t,e,r)=>{try{e=new Jm(e,r)}catch{return!1}return e.test(t)};Zu.exports=eg});var ec=C((Kw,Ju)=>{var tg=Ce(),rg=(t,e)=>new tg(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Ju.exports=rg});var rc=C((Xw,tc)=>{var ng=ae(),sg=Ce(),ig=(t,e,r)=>{let n=null,i=null,a=null;try{a=new sg(e,r)}catch{return null}return t.forEach(u=>{a.test(u)&&(!n||i.compare(u)===-1)&&(n=u,i=new ng(n,r))}),n};tc.exports=ig});var sc=C((Zw,nc)=>{var og=ae(),ag=Ce(),lg=(t,e,r)=>{let n=null,i=null,a=null;try{a=new ag(e,r)}catch{return null}return t.forEach(u=>{a.test(u)&&(!n||i.compare(u)===1)&&(n=u,i=new og(n,r))}),n};nc.exports=lg});var ac=C((Jw,oc)=>{var vi=ae(),ug=Ce(),ic=qr(),cg=(t,e)=>{t=new ug(t,e);let r=new vi("0.0.0");if(t.test(r)||(r=new vi("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],a=null;i.forEach(u=>{let h=new vi(u.semver.version);switch(u.operator){case">":h.prerelease.length===0?h.patch++:h.prerelease.push(0),h.raw=h.format();case"":case">=":(!a||ic(h,a))&&(a=h);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),a&&(!r||ic(r,a))&&(r=a)}return r&&t.test(r)?r:null};oc.exports=cg});var uc=C((eS,lc)=>{var hg=Ce(),fg=(t,e)=>{try{return new hg(t,e).range||"*"}catch{return null}};lc.exports=fg});var es=C((tS,dc)=>{var dg=ae(),fc=Mr(),{ANY:pg}=fc,mg=Ce(),gg=Wr(),cc=qr(),hc=Yn(),bg=Kn(),yg=Qn(),_g=(t,e,r,n)=>{t=new dg(t,n),e=new mg(e,n);let i,a,u,h,f;switch(r){case">":i=cc,a=bg,u=hc,h=">",f=">=";break;case"<":i=hc,a=yg,u=cc,h="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(gg(t,e,n))return!1;for(let c=0;c<e.set.length;++c){let g=e.set[c],b=null,m=null;if(g.forEach(p=>{p.semver===pg&&(p=new fc(">=0.0.0")),b=b||p,m=m||p,i(p.semver,b.semver,n)?b=p:u(p.semver,m.semver,n)&&(m=p)}),b.operator===h||b.operator===f||(!m.operator||m.operator===h)&&a(t,m.semver))return!1;if(m.operator===f&&u(t,m.semver))return!1}return!0};dc.exports=_g});var mc=C((rS,pc)=>{var wg=es(),Sg=(t,e,r)=>wg(t,e,">",r);pc.exports=Sg});var bc=C((nS,gc)=>{var Rg=es(),Eg=(t,e,r)=>Rg(t,e,"<",r);gc.exports=Eg});var wc=C((sS,_c)=>{var yc=Ce(),Tg=(t,e,r)=>(t=new yc(t,r),e=new yc(e,r),t.intersects(e));_c.exports=Tg});var Rc=C((iS,Sc)=>{var Ag=Wr(),Cg=Ae();Sc.exports=(t,e,r)=>{let n=[],i=null,a=null,u=t.sort((g,b)=>Cg(g,b,r));for(let g of u)Ag(g,e,r)?(a=g,i||(i=g)):(a&&n.push([i,a]),a=null,i=null);i&&n.push([i,null]);let h=[];for(let[g,b]of n)g===b?h.push(g):!b&&g===u[0]?h.push("*"):b?g===u[0]?h.push(`<=${b}`):h.push(`${g} - ${b}`):h.push(`>=${g}`);let f=h.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return f.length<c.length?f:e}});var vc=C((oS,Cc)=>{var Ec=Ce(),ts=Mr(),{ANY:xi}=ts,jr=Wr(),Oi=Ae(),vg=(t,e,r={})=>{if(t===e)return!0;t=new Ec(t,r),e=new Ec(e,r);let n=!1;e:for(let i of t.set){for(let a of e.set){let u=xg(i,a,r);if(n=n||u!==null,u)continue e}if(n)return!1}return!0},xg=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===xi){if(e.length===1&&e[0].semver===xi)return!0;r.includePrerelease?t=[new ts(">=0.0.0-0")]:t=[new ts(">=0.0.0")]}if(e.length===1&&e[0].semver===xi){if(r.includePrerelease)return!0;e=[new ts(">=0.0.0")]}let n=new Set,i,a;for(let p of t)p.operator===">"||p.operator===">="?i=Tc(i,p,r):p.operator==="<"||p.operator==="<="?a=Ac(a,p,r):n.add(p.semver);if(n.size>1)return null;let u;if(i&&a){if(u=Oi(i.semver,a.semver,r),u>0)return null;if(u===0&&(i.operator!==">="||a.operator!=="<="))return null}for(let p of n){if(i&&!jr(p,String(i),r)||a&&!jr(p,String(a),r))return null;for(let _ of e)if(!jr(p,String(_),r))return!1;return!0}let h,f,c,g,b=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;b&&b.prerelease.length===1&&a.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(let p of e){if(g=g||p.operator===">"||p.operator===">=",c=c||p.operator==="<"||p.operator==="<=",i){if(m&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===m.major&&p.semver.minor===m.minor&&p.semver.patch===m.patch&&(m=!1),p.operator===">"||p.operator===">="){if(h=Tc(i,p,r),h===p&&h!==i)return!1}else if(i.operator===">="&&!jr(i.semver,String(p),r))return!1}if(a){if(b&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===b.major&&p.semver.minor===b.minor&&p.semver.patch===b.patch&&(b=!1),p.operator==="<"||p.operator==="<="){if(f=Ac(a,p,r),f===p&&f!==a)return!1}else if(a.operator==="<="&&!jr(a.semver,String(p),r))return!1}if(!p.operator&&(a||i)&&u!==0)return!1}return!(i&&c&&!a&&u!==0||a&&g&&!i&&u!==0||m||b)},Tc=(t,e,r)=>{if(!t)return e;let n=Oi(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Ac=(t,e,r)=>{if(!t)return e;let n=Oi(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};Cc.exports=vg});var Ic=C((aS,Oc)=>{var Ii=Rt(),Og=Hr(),Ig=ae(),xc=pi(),$g=Et(),Lg=Kl(),Pg=Zl(),Ng=tu(),Dg=au(),Hg=uu(),Bg=hu(),Fg=du(),qg=mu(),Ug=Ae(),zg=bu(),Mg=_u(),kg=Gn(),Wg=Eu(),jg=Au(),Vg=qr(),Gg=Yn(),Yg=Vn(),Qg=gi(),Kg=Qn(),Xg=Kn(),Zg=bi(),Jg=Pu(),eb=Mr(),tb=Ce(),rb=Wr(),nb=ec(),sb=rc(),ib=sc(),ob=ac(),ab=uc(),lb=es(),ub=mc(),cb=bc(),hb=wc(),fb=Rc(),db=vc();Oc.exports={parse:$g,valid:Lg,clean:Pg,inc:Ng,diff:Dg,major:Hg,minor:Bg,patch:Fg,prerelease:qg,compare:Ug,rcompare:zg,compareLoose:Mg,compareBuild:kg,sort:Wg,rsort:jg,gt:Vg,lt:Gg,eq:Yg,neq:Qg,gte:Kg,lte:Xg,cmp:Zg,coerce:Jg,Comparator:eb,Range:tb,satisfies:rb,toComparators:nb,maxSatisfying:sb,minSatisfying:ib,minVersion:ob,validRange:ab,outside:lb,gtr:ub,ltr:cb,intersects:hb,simplifyRange:fb,subset:db,SemVer:Ig,re:Ii.re,src:Ii.src,tokens:Ii.t,SEMVER_SPEC_VERSION:Og.SEMVER_SPEC_VERSION,compareIdentifiers:xc.compareIdentifiers,rcompareIdentifiers:xc.rcompareIdentifiers}});var Dc=C((lS,Nc)=>{Nc.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,n=e.align||[],i=e.stringLength||function(f){return String(f).length},a=Lc(t,function(f,c){return Pc(c,function(g,b){var m=$c(g);(!f[b]||m>f[b])&&(f[b]=m)}),f},[]),u=rs(t,function(f){return rs(f,function(c,g){var b=String(c);if(n[g]==="."){var m=$c(b),p=a[g]+(/\./.test(b)?1:2)-(i(b)-m);return b+Array(p).join(" ")}else return b})}),h=Lc(u,function(f,c){return Pc(c,function(g,b){var m=i(g);(!f[b]||m>f[b])&&(f[b]=m)}),f},[]);return rs(u,function(f){return rs(f,function(c,g){var b=h[g]-i(c)||0,m=Array(Math.max(b+1,1)).join(" ");return n[g]==="r"||n[g]==="."?m+c:n[g]==="c"?Array(Math.ceil(b/2+1)).join(" ")+c+Array(Math.floor(b/2+1)).join(" "):c+m}).join(r).replace(/\s+$/,"")}).join(`
20
+ `)};function $c(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function Lc(t,e,r){if(t.reduce)return t.reduce(e,r);for(var n=0,i=arguments.length>=3?r:t[n++];n<t.length;n++)e(i,t[n],n);return i}function Pc(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function rs(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e.call(t,t[n],n));return r}});var Uc=C((hS,qc)=>{var Vr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,pb=typeof AbortController=="function",ns=pb?AbortController:class{constructor(){this.signal=new Hc}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},mb=typeof AbortSignal=="function",gb=typeof ns.AbortSignal=="function",Hc=mb?AbortSignal:gb?ns.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(r=>r(e),this))}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},Ni=new Set,$i=(t,e)=>{let r=`LRU_CACHE_OPTION_${t}`;ss(r)&&Di(r,`${t} option`,`options.${e}`,tr)},Li=(t,e)=>{let r=`LRU_CACHE_METHOD_${t}`;if(ss(r)){let{prototype:n}=tr,{get:i}=Object.getOwnPropertyDescriptor(n,t);Di(r,`${t} method`,`cache.${e}()`,i)}},bb=(t,e)=>{let r=`LRU_CACHE_PROPERTY_${t}`;if(ss(r)){let{prototype:n}=tr,{get:i}=Object.getOwnPropertyDescriptor(n,t);Di(r,`${t} property`,`cache.${e}`,i)}},Bc=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},ss=t=>!Ni.has(t),Di=(t,e,r,n)=>{Ni.add(t);let i=`The ${e} is deprecated. Please use ${r} instead.`;Bc(i,"DeprecationWarning",t,n)},ut=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Fc=t=>ut(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?er:null:null,er=class extends Array{constructor(e){super(e),this.fill(0)}},Pi=class{constructor(e){if(e===0)return[];let r=Fc(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},tr=class t{constructor(e={}){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:f,dispose:c,disposeAfter:g,noDisposeOnSet:b,noUpdateTTL:m,maxSize:p=0,maxEntrySize:_=0,sizeCalculation:R,fetchMethod:E,fetchContext:A,noDeleteOnFetchRejection:N,noDeleteOnStaleGet:L,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:$,ignoreFetchAbort:D}=e,{length:H,maxAge:V,stale:K}=e instanceof t?{}:e;if(r!==0&&!ut(r))throw new TypeError("max option must be a nonnegative integer");let ee=r?Fc(r):Array;if(!ee)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=p,this.maxEntrySize=_||this.maxSize,this.sizeCalculation=R||H,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=E||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=A,!this.fetchMethod&&A!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new ee(r),this.prev=new ee(r),this.head=0,this.tail=0,this.free=new Pi(r),this.initialFill=1,this.size=0,typeof c=="function"&&(this.dispose=c),typeof g=="function"?(this.disposeAfter=g,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!b,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!N,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!$,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(this.maxSize!==0&&!ut(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!ut(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!f||!!K,this.noDeleteOnStaleGet=!!L,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=ut(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=n||V||0,this.ttl){if(!ut(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){let oe="LRU_CACHE_UNBOUNDED";ss(oe)&&(Ni.add(oe),Bc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",oe,t))}K&&$i("stale","allowStale"),V&&$i("maxAge","ttl"),H&&$i("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new er(this.max),this.starts=new er(this.max),this.setItemTTL=(n,i,a=Vr.now())=>{if(this.starts[n]=i!==0?a:0,this.ttls[n]=i,i!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},i+1);u.unref&&u.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?Vr.now():0},this.statusTTL=(n,i)=>{n&&(n.ttl=this.ttls[i],n.start=this.starts[i],n.now=e||r(),n.remainingTTL=n.now+n.ttl-n.start)};let e=0,r=()=>{let n=Vr.now();if(this.ttlResolution>0){e=n;let i=setTimeout(()=>e=0,this.ttlResolution);i.unref&&i.unref()}return n};this.getRemainingTTL=n=>{let i=this.keyMap.get(n);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(e||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(e||r())-this.starts[n]>this.ttls[n]}updateItemAge(e){}statusTTL(e,r){}setItemTTL(e,r,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new er(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,n,i)=>{if(this.isBackgroundFetch(r))return 0;if(!ut(n))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(n=i(r,e),!ut(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.addItemSize=(e,r,n)=>{if(this.sizes[e]=r,this.maxSize){let i=this.maxSize-this.sizes[e];for(;this.calculatedSize>i;)this.evict(!0)}this.calculatedSize+=this.sizes[e],n&&(n.entrySize=r,n.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(let e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(let e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(let e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(let e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(let e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(let e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,r){for(let n of this.indexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a!==void 0&&e(a,this.keyList[n],this))return this.get(this.keyList[n],r)}}forEach(e,r=this){for(let n of this.indexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.keyList[n],this)}}rforEach(e,r=this){for(let n of this.rindexes()){let i=this.valList[n],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;a!==void 0&&e.call(r,a,this.keyList[n],this)}}get prune(){return Li("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(let r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){let e=[];for(let r of this.indexes({allowStale:!0})){let n=this.keyList[r],i=this.valList[r],a=this.isBackgroundFetch(i)?i.__staleWhileFetching:i;if(a===void 0)continue;let u={value:a};if(this.ttls){u.ttl=this.ttls[r];let h=Vr.now()-this.starts[r];u.start=Math.floor(Date.now()-h)}this.sizes&&(u.size=this.sizes[r]),e.unshift([n,u])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=Vr.now()-i}this.set(r,n.value,n)}}dispose(e,r,n){}set(e,r,{ttl:n=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,status:c}={}){if(u=this.requireSize(e,r,u,h),this.maxEntrySize&&u>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(e),this;let g=this.size===0?void 0:this.keyMap.get(e);if(g===void 0)g=this.newIndex(),this.keyList[g]=e,this.valList[g]=r,this.keyMap.set(e,g),this.next[this.tail]=g,this.prev[g]=this.tail,this.tail=g,this.size++,this.addItemSize(g,u,c),c&&(c.set="add"),f=!1;else{this.moveToTail(g);let b=this.valList[g];if(r!==b){if(this.isBackgroundFetch(b)?b.__abortController.abort(new Error("replaced")):a||(this.dispose(b,e,"set"),this.disposeAfter&&this.disposed.push([b,e,"set"])),this.removeItemSize(g),this.valList[g]=r,this.addItemSize(g,u,c),c){c.set="replace";let m=b&&this.isBackgroundFetch(b)?b.__staleWhileFetching:b;m!==void 0&&(c.oldValue=m)}}else c&&(c.set="update")}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),f||this.setItemTTL(g,n,i),this.statusTTL(c,g),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){let e=this.valList[this.head];return this.evict(!0),e}}evict(e){let r=this.head,n=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort(new Error("evicted")):(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas,status:n}={}){let i=this.keyMap.get(e);if(i!==void 0)if(this.isStale(i))n&&(n.has="stale",this.statusTTL(n,i));else return r&&this.updateItemAge(i),n&&(n.has="hit"),this.statusTTL(n,i),!0;else n&&(n.has="miss");return!1}peek(e,{allowStale:r=this.allowStale}={}){let n=this.keyMap.get(e);if(n!==void 0&&(r||!this.isStale(n))){let i=this.valList[n];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(e,r,n,i){let a=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(a))return a;let u=new ns;n.signal&&n.signal.addEventListener("abort",()=>u.abort(n.signal.reason));let h={signal:u.signal,options:n,context:i},f=(p,_=!1)=>{let{aborted:R}=u.signal,E=n.ignoreFetchAbort&&p!==void 0;return n.status&&(R&&!_?(n.status.fetchAborted=!0,n.status.fetchError=u.signal.reason,E&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),R&&!E&&!_?g(u.signal.reason):(this.valList[r]===m&&(p===void 0?m.__staleWhileFetching?this.valList[r]=m.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,p,h.options))),p)},c=p=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=p),g(p)),g=p=>{let{aborted:_}=u.signal,R=_&&n.allowStaleOnFetchAbort,E=R||n.allowStaleOnFetchRejection,A=E||n.noDeleteOnFetchRejection;if(this.valList[r]===m&&(!A||m.__staleWhileFetching===void 0?this.delete(e):R||(this.valList[r]=m.__staleWhileFetching)),E)return n.status&&m.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),m.__staleWhileFetching;if(m.__returned===m)throw p},b=(p,_)=>{this.fetchMethod(e,a,h).then(R=>p(R),_),u.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(p(),n.allowStaleOnFetchAbort&&(p=R=>f(R,!0)))})};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(b).then(f,c);return m.__abortController=u,m.__staleWhileFetching=a,m.__returned=null,r===void 0?(this.set(e,m,{...h.options,status:void 0}),r=this.keyMap.get(e)):this.valList[r]=m,m}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:h=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,fetchContext:_=this.fetchContext,forceRefresh:R=!1,status:E,signal:A}={}){if(!this.fetchMethod)return E&&(E.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:E});let N={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:u,size:h,sizeCalculation:f,noUpdateTTL:c,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:p,ignoreFetchAbort:m,status:E,signal:A},L=this.keyMap.get(e);if(L===void 0){E&&(E.fetch="miss");let T=this.backgroundFetch(e,L,N,_);return T.__returned=T}else{let T=this.valList[L];if(this.isBackgroundFetch(T)){let K=r&&T.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",K&&(E.returnedStale=!0)),K?T.__staleWhileFetching:T.__returned=T}let $=this.isStale(L);if(!R&&!$)return E&&(E.fetch="hit"),this.moveToTail(L),n&&this.updateItemAge(L),this.statusTTL(E,L),T;let D=this.backgroundFetch(e,L,N,_),H=D.__staleWhileFetching!==void 0,V=H&&r;return E&&(E.fetch=H&&$?"stale":"refresh",V&&$&&(E.returnedStale=!0)),V?D.__staleWhileFetching:D.__returned=D}}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}={}){let u=this.keyMap.get(e);if(u!==void 0){let h=this.valList[u],f=this.isBackgroundFetch(h);return this.statusTTL(a,u),this.isStale(u)?(a&&(a.get="stale"),f?(a&&(a.returnedStale=r&&h.__staleWhileFetching!==void 0),r?h.__staleWhileFetching:void 0):(i||this.delete(e),a&&(a.returnedStale=r),r?h:void 0)):(a&&(a.get="hit"),f?h.__staleWhileFetching:(this.moveToTail(u),n&&this.updateItemAge(u),h))}else a&&(a.get="miss")}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return Li("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){let n=this.keyMap.get(e);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);let i=this.valList[n];this.isBackgroundFetch(i)?i.__abortController.abort(new Error("deleted")):(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(let e of this.rindexes({allowStale:!0})){let r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort(new Error("deleted"));else{let n=this.keyList[e];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return Li("reset","clear"),this.clear}get length(){return bb("length","size"),this.size}static get AbortController(){return ns}static get AbortSignal(){return Hc}};qc.exports=tr});var kc=C((fS,Mc)=>{"use strict";var j=(...t)=>t.every(e=>e)?t.join(""):"",re=t=>t?encodeURIComponent(t):"",zc=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),yb={sshtemplate:({domain:t,user:e,project:r,committish:n})=>`git@${t}:${e}/${r}.git${j("#",n)}`,sshurltemplate:({domain:t,user:e,project:r,committish:n})=>`git+ssh://git@${t}/${e}/${r}.git${j("#",n)}`,edittemplate:({domain:t,user:e,project:r,committish:n,editpath:i,path:a})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n||"HEAD"),"/",a)}`,browsetemplate:({domain:t,user:e,project:r,committish:n,treepath:i})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:n,treepath:i,path:a,fragment:u,hashformat:h})=>`https://${t}/${e}/${r}/${i}/${re(n||"HEAD")}/${a}${j("#",h(u||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:n,blobpath:i,path:a,fragment:u,hashformat:h})=>`https://${t}/${e}/${r}/${i}/${re(n||"HEAD")}/${a}${j("#",h(u||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:n,committish:i})=>`https://${t}/${e}/${r}${j("/",n,"/",re(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:n,path:i})=>`https://${t}/${e}/${r}/raw/${re(n||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:n})=>`${t}:${e}/${r}${j("#",n)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${j("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:zc},ct={};ct.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:e,project:r,committish:n,path:i})=>`https://${j(t,"@")}raw.githubusercontent.com/${e}/${r}/${re(n||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://codeload.${t}/${e}/${r}/tar.gz/${re(n||"HEAD")}`,extract:t=>{let[,e,r,n,i]=t.pathname.split("/",5);if(!(n&&n!=="tree")&&(n||(i=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:i}}};ct.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:e,project:r,committish:n,treepath:i,path:a,editpath:u})=>`https://${t}/${e}/${r}${j("/",i,"/",re(n||"HEAD"),"/",a,u)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/get/${re(n||"HEAD")}.tar.gz`,extract:t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["get"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};ct.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:t,domain:e,user:r,project:n,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${n}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${re(n||"HEAD")}`,extract:t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),n=r.pop();n.endsWith(".git")&&(n=n.slice(0,-4));let i=r.join("/");if(!(!i||!n))return{user:i,project:n,committish:t.hash.slice(1)}}};ct.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${j("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${j("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:n,editpath:i})=>`https://${t}/${e}/${r}${j("/",re(n))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",re(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${j("/",re(r))}${j("#",i(n))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:n,hashformat:i})=>`https://${t}/${e}${j("/",re(r))}${j("#",i(n))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",re(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${j("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:n})=>`https://gist.githubusercontent.com/${t}/${e}/raw${j("/",re(r))}/${n}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${j("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${j("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${j("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${re(e||"HEAD")}`,extract:t=>{let[,e,r,n]=t.pathname.split("/",4);if(n!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+zc(t)}};ct.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:e,project:r,committish:n,path:i})=>`https://${t}/${e}/${r}/blob/${re(n)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}.git${j("#",n)}`,tarballtemplate:({domain:t,user:e,project:r,committish:n})=>`https://${t}/${e}/${r}/archive/${re(n)||"HEAD"}.tar.gz`,bugstemplate:({user:t,project:e})=>`https://todo.sr.ht/${t}/${e}`,extract:t=>{let[,e,r,n]=t.pathname.split("/",4);if(!["archive"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};for(let[t,e]of Object.entries(ct))ct[t]=Object.assign({},yb,e);Mc.exports=ct});var Bi=C((dS,jc)=>{var _b=ye("url"),Hi=(t,e,r)=>{let n=t.indexOf(r);return t.lastIndexOf(e,n>-1?n:1/0)},Wc=t=>{try{return new _b.URL(t)}catch{}},wb=(t,e)=>{let r=t.indexOf(":"),n=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,n))return t;let i=t.indexOf("@");return i>-1?i>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},Sb=t=>{let e=Hi(t,"@","#"),r=Hi(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Hi(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};jc.exports=(t,e)=>{let r=e?wb(t,e):t;return Wc(r)||Wc(Sb(r))}});var Gc=C((pS,Vc)=>{"use strict";var Rb=Bi(),Eb=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),n=t.indexOf("/",r+1),i=t.indexOf(":"),a=/\s/.exec(t),u=t.indexOf("@"),h=!a||e>-1&&a.index>e,f=u===-1||e>-1&&u>e,c=i===-1||e>-1&&i>e,g=n===-1||e>-1&&n>e,b=r>0,m=e>-1?t[e-1]!=="/":!t.endsWith("/"),p=!t.startsWith(".");return h&&b&&m&&p&&f&&c&&g};Vc.exports=(t,e,{gitHosts:r,protocols:n})=>{var R,E;if(!t)return;let i=Eb(t)?`github:${t}`:t,a=Rb(i,n);if(!a)return;let u=r.byShortcut[a.protocol],h=r.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],f=u||h;if(!f)return;let c=r[u||h],g=null;(R=n[a.protocol])!=null&&R.auth&&(a.username||a.password)&&(g=`${a.username}${a.password?":"+a.password:""}`);let b=null,m=null,p=null,_=null;try{if(u){let A=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname,N=A.indexOf("@");N>-1&&(A=A.slice(N+1));let L=A.lastIndexOf("/");L>-1?(m=decodeURIComponent(A.slice(0,L)),m||(m=null),p=decodeURIComponent(A.slice(L+1))):p=decodeURIComponent(A),p.endsWith(".git")&&(p=p.slice(0,-4)),a.hash&&(b=decodeURIComponent(a.hash.slice(1))),_="shortcut"}else{if(!c.protocols.includes(a.protocol))return;let A=c.extract(a);if(!A)return;m=A.user&&decodeURIComponent(A.user),p=decodeURIComponent(A.project),b=decodeURIComponent(A.committish),_=((E=n[a.protocol])==null?void 0:E.name)||a.protocol.slice(0,-1)}}catch(A){if(A instanceof URIError)return;throw A}return[f,m,g,p,b,_,e]}});var Qc=C((mS,Yc)=>{"use strict";var Tb=Uc(),Ab=kc(),Cb=Gc(),vb=Bi(),Fi=new Tb({max:1e3}),is=class t{constructor(e,r,n,i,a,u,h={}){Object.assign(this,t.#e[e],{type:e,user:r,auth:n,project:i,committish:a,default:u,opts:h})}static#e={byShortcut:{},byDomain:{}};static#r={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,r){t.#e[e]=r,t.#e.byDomain[r.domain]=e,t.#e.byShortcut[`${e}:`]=e,t.#r[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let n=e+JSON.stringify(r||{});if(!Fi.has(n)){let i=Cb(e,r,{gitHosts:t.#e,protocols:t.#r});Fi.set(n,i?new t(...i):void 0)}return Fi.get(n)}static parseUrl(e){return vb(e)}#t(e,r){if(typeof e!="function")return null;let n={...this,...this.opts,...r};n.path||(n.path=""),n.path.startsWith("/")&&(n.path=n.path.slice(1)),n.noCommittish&&(n.committish=null);let i=e(n);return n.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#t(this.sshtemplate,e)}sshurl(e){return this.#t(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#t(this.browsetemplate,e):typeof r[0]!="string"?this.#t(this.browsetreetemplate,{...r[0],path:e}):this.#t(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#t(this.browseblobtemplate,{...r[0],path:e}):this.#t(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#t(this.docstemplate,e)}bugs(e){return this.#t(this.bugstemplate,e)}https(e){return this.#t(this.httpstemplate,e)}git(e){return this.#t(this.gittemplate,e)}shortcut(e){return this.#t(this.shortcuttemplate,e)}path(e){return this.#t(this.pathtemplate,e)}tarball(e){return this.#t(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#t(this.filetemplate,{...r,path:e})}edit(e,r){return this.#t(this.edittemplate,{...r,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[t,e]of Object.entries(Ab))is.addHost(t,e);Yc.exports=is});var rh=C((RS,th)=>{"use strict";var vt=class t extends Error{constructor(e,r,n){super("[ParserError] "+e,r,n),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}},us=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},Gr=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new us(this.parseStart)}parse(e){if(e.length===0||e.length==null)return;this._buf=String(e),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let e;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if(typeof e!="function")throw new vt("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,r){r&&this.next(r),this.stack.push(this.state),this.state=new us(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new vt("Stack underflow"));e===void 0&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===1114112)throw this.error(new vt("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new vt("Must declare a parseStart method")}};Gr.END=1114112;Gr.Error=vt;th.exports=Gr});var sh=C((ES,nh)=>{"use strict";nh.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var cs=C((TS,ih)=>{"use strict";ih.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var ah=C((AS,oh)=>{"use strict";var nr=cs(),Mi=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${nr(2,this.getUTCMonth()+1)}-${nr(2,this.getUTCDate())}`,r=`${nr(2,this.getUTCHours())}:${nr(2,this.getUTCMinutes())}:${nr(2,this.getUTCSeconds())}.${nr(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};oh.exports=t=>{let e=new Mi(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var ch=C((CS,uh)=>{"use strict";var lh=cs(),Db=global.Date,ki=class extends Db{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${lh(2,this.getUTCMonth()+1)}-${lh(2,this.getUTCDate())}`}};uh.exports=t=>{let e=new ki(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var fh=C((vS,hh)=>{"use strict";var hs=cs(),Wi=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${hs(2,this.getUTCHours())}:${hs(2,this.getUTCMinutes())}:${hs(2,this.getUTCSeconds())}.${hs(3,this.getUTCMilliseconds())}`}};hh.exports=t=>{let e=new Wi(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var dh=C((exports,module)=>{"use strict";module.exports=makeParserClass(rh());module.exports.makeParserClass=makeParserClass;var TomlError=class t extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,t),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=t=>{let e=new TomlError(t.message);return e.code=t.code,e.wrapped=t,e};module.exports.TomlError=TomlError;var createDateTime=sh(),createDateTimeFloat=ah(),createDate=ch(),createTime=fh(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
21
+ `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}function isBit(t){return t===CHAR_1||t===CHAR_0}function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}function makeParserClass(t){class e extends t{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(n){let i=this.ctx,a=n.key.pop();for(let u of n.key){if(hasKey(i,u)&&(!isTable(i[u])||i[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[u]=i[u]||Table()}if(hasKey(i,a))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[a]=n.value.valueOf():i[a]=n.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(n){return this.state.resultTable?this.state.resultTable.push(n):this.state.resultTable=[n],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(n){return this.returnNow({key:this.state.resultTable,value:n})}parseComment(){do if(this.char===t.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)&&(!isTable(this.ctx[n])||this.ctx[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[n]=this.ctx[n]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,n))this.ctx=this.ctx[n]=Table();else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];else if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)||(this.ctx[n]=List()),isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[n])){let i=Table();this.ctx[n].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,n))this.ctx=this.ctx[n]=Table();else{if(isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].length-1];else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(n){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===t.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(n){return this.returnNow(n)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===t.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(n){return this.state.buf+=n,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let n="\\u00";return this.char<16&&(n+="0"),n+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${n} instead`))}recordMultiEscapeReplacement(n){return this.state.buf+=n,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(n){try{let i=parseInt(n,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===t.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(n){if(this.state.resultArr){let i=this.state.resultArr[_contentType],a=tomlType(n);if(i!==a)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${a}`))}else this.state.resultArr=InlineList(tomlType(n));return isFloat(n)||isInteger(n)?this.state.resultArr.push(n.valueOf()):this.state.resultArr.push(n),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(n){let i=this.state.resultTable,a=n.key.pop();for(let u of n.key){if(hasKey(i,u)&&(!isTable(i[u])||i[u][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[u]=i[u]||Table()}if(hasKey(i,a))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[a]=n.value.valueOf():i[a]=n.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return e}});var mh=C((xS,ph)=>{"use strict";ph.exports=Hb;function Hb(t,e){if(t.pos==null||t.line==null)return t;let r=t.message;if(r+=` at row ${t.line+1}, col ${t.col+1}, pos ${t.pos}:
22
22
  `,e&&e.split){let n=e.split(/\n/),i=String(Math.min(n.length,t.line+3)).length,a=" ";for(;a.length<i;)a+=" ";for(let u=Math.max(0,t.line-1);u<Math.min(n.length,t.line+2);++u){let h=String(u+1);if(h.length<i&&(h=" "+h),t.line===u){r+=h+"> "+n[u]+`
23
23
  `,r+=a+" ";for(let f=0;f<t.col;++f)r+=" ";r+=`^
24
24
  `}else r+=h+": "+n[u]+`
25
25
  `}}return t.message=r+`
26
- `,t}});var gh=C((xS,mh)=>{"use strict";mh.exports=Fb;var Hb=fh(),Bb=ph();function Fb(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new Hb;try{return e.parse(t),e.finish()}catch(r){throw Bb(r,t)}}});function Ws({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}var Ys=Re(fa(),1);var da=Ys.default.HttpProxyAgent,pa=Ys.default.HttpsProxyAgent;var vr=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[r,n]of e)this.onEviction(r,n.value)}_deleteIfExpired(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,r.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,r){if(this._deleteIfExpired(e,r)===!1)return r.value}_getItemValue(e,r){return r.expiry?this._getOrDeleteIfExpired(e,r):r.value}_peek(e,r){let n=r.get(e);return this._getItemValue(e,n)}_set(e,r){this.cache.set(e,r),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,r){this.oldCache.delete(e),this._set(e,r)}*_entriesAscending(){for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield e)}for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let r=this.cache.get(e);return this._getItemValue(e,r)}if(this.oldCache.has(e)){let r=this.oldCache.get(e);if(this._deleteIfExpired(e,r)===!1)return this._moveToRecent(e,r),r.value}}set(e,r,{maxAge:n=this.maxAge}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(e)?this.cache.set(e,{value:r,expiry:i}):this._set(e,{value:r,expiry:i})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this._entriesAscending()],n=r.length-e;n<0?(this.cache=new Map(r),this.oldCache=new Map,this._size=r.length):(n>0&&this._emitEvictions(r.slice(0,n)),this.oldCache=new Map(r.slice(n)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}}*entriesDescending(){let e=[...this.cache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}e=[...this.oldCache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this.cache.has(i)||this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}}*entriesAscending(){for(let[e,r]of this._entriesAscending())yield[e,r.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,r=this){for(let[n,i]of this.entriesAscending())e.call(r,i,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var ya=Re(ga(),1);import{Agent as Td}from"node:http";import{Agent as Ad}from"node:https";var Cd={agentCacheSize:512},ba={maxSockets:64,keepAlive:!1},Qs=class t extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,t)}};function Ks(t,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let r={...Cd,...e},n=new vr({maxSize:r.agentCacheSize});async function i(u,h={}){let{origin:f,protocol:c}=new URL(u),g=h!=null&&h.noProxy?null:(0,ya.getProxyForUrl)(u),b=JSON.stringify({proxyUrl:g,origin:f,...h});if(n.has(b))return n.get(b);let m;if("noProxy"in h&&delete h.noProxy,e.undici){let{ProxyAgent:p,Agent:_}=await import("undici"),R={...h};"keepAlive"in R&&!("pipelining"in R)&&(R.pipelining=R.keepAlive?1:0),"keepAlive"in R&&delete R.keepAlive,"maxSockets"in R&&(R.connections=R.maxSockets,delete R.maxSockets),g?m=new p({...R,uri:g}):m=new _(R)}else{let p=c==="https:";g?m=new(p?pa:da)({...h,proxy:g}):m=new(p?Ad:Td)(h)}return n.set(b,m),m}let a=(u,{timeout:h=0,agentOpts:f={},...c}={})=>new Promise(async(g,b)=>{var _;if(!e.undici&&!("agent"in c)){let R=await i(u,{...ba,...f});R&&(c.agent=R)}else if(e.undici&&!("dispatcher"in c)){let R=await i(u,{...ba,...f});R&&(c.dispatcher=R)}let m,p;h&&(!("signal"in c)&&globalThis.AbortController&&(p=new AbortController,c.signal=p.signal),m=setTimeout(()=>{var E;(E=p==null?void 0:p.abort)==null||E.call(p);let R=new Qs(`${c.method||"GET"} ${u} timed out after ${h}ms`);b(R)},h),(_=m==null?void 0:m.unref)==null||_.call(m)),t(u,c).then(R=>{m&&clearTimeout(m),g(R)}).catch(R=>{if(m&&clearTimeout(m),R.name==="AbortError")return g(null);b(R)})});return a.clearCache=()=>{for(let u of n.values())"destroy"in u&&u.destroy();n.clear()},a}var Ih=Re(Xs(),1);import ep from"node:http";import tp from"node:https";import Vt from"node:zlib";import tl,{PassThrough as rl,pipeline as Gt}from"node:stream";import{Buffer as qn}from"node:buffer";function xd(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 r=t.substring(5,e).split(";"),n="",i=!1,a=r[0]||"text/plain",u=a;for(let g=1;g<r.length;g++)r[g]==="base64"?i=!0:r[g]&&(u+=`;${r[g]}`,r[g].indexOf("charset=")===0&&(n=r[g].substring(8)));!r[0]&&!n.length&&(u+=";charset=US-ASCII",n="US-ASCII");let h=i?"base64":"ascii",f=unescape(t.substring(e+1)),c=Buffer.from(f,h);return c.type=a,c.typeFull=u,c.charset=n,c}var Ra=xd;xr();In();import ot,{PassThrough as za}from"node:stream";import{types as Ma,deprecate as oi,promisify as jd}from"node:util";import{Buffer as Ee}from"node:buffer";var Ge=class extends Error{constructor(e,r){super(e),Error.captureStackTrace(this,this.constructor),this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var de=class extends Ge{constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}};var Ln=Symbol.toStringTag,ri=t=>typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&typeof t.sort=="function"&&t[Ln]==="URLSearchParams",Ir=t=>t&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.constructor=="function"&&/^(Blob|File)$/.test(t[Ln]),La=t=>typeof t=="object"&&(t[Ln]==="AbortSignal"||t[Ln]==="EventTarget"),$a=(t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},Pa=(t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n};var Vd=jd(ot.pipeline),pe=Symbol("Body internals"),Ue=class{constructor(e,{size:r=0}={}){let n=null;e===null?e=null:ri(e)?e=Ee.from(e.toString()):Ir(e)||Ee.isBuffer(e)||(Ma.isAnyArrayBuffer(e)?e=Ee.from(e):ArrayBuffer.isView(e)?e=Ee.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ot||(e instanceof yt?(e=Ia(e),n=e.type.split("=")[1]):e=Ee.from(String(e))));let i=e;Ee.isBuffer(e)?i=ot.Readable.from(e):Ir(e)&&(i=ot.Readable.from(e.stream())),this[pe]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof ot&&e.on("error",a=>{let u=a instanceof Ge?a:new de(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[pe].error=u})}get body(){return this[pe].stream}get bodyUsed(){return this[pe].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await ii(this);return e.slice(r,r+n)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let n=new yt,i=new URLSearchParams(await this.text());for(let[a,u]of i)n.append(a,u);return n}let{toFormData:r}=await Promise.resolve().then(()=>(Ua(),qa));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[pe].body&&this[pe].body.type||"",r=await this.arrayBuffer();return new Ve([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await ii(this);return new TextDecoder().decode(e)}buffer(){return ii(this)}};Ue.prototype.buffer=oi(Ue.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Ue.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:oi(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function ii(t){if(t[pe].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[pe].disturbed=!0,t[pe].error)throw t[pe].error;let{body:e}=t;if(e===null)return Ee.alloc(0);if(!(e instanceof ot))return Ee.alloc(0);let r=[],n=0;try{for await(let i of e){if(t.size>0&&n+i.length>t.size){let a=new de(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(a),a}n+=i.length,r.push(i)}}catch(i){throw i instanceof Ge?i:new de(`Invalid response body while trying to fetch ${t.url}: ${i.message}`,"system",i)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?Ee.from(r.join("")):Ee.concat(r,n)}catch(i){throw new de(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new de(`Premature close of server response while trying to fetch ${t.url}`)}var kt=(t,e)=>{let r,n,{body:i}=t[pe];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof ot&&typeof i.getBoundary!="function"&&(r=new za({highWaterMark:e}),n=new za({highWaterMark:e}),i.pipe(r),i.pipe(n),t[pe].stream=r,i=n),i},Gd=oi(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Nn=(t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":ri(t)?"application/x-www-form-urlencoded;charset=UTF-8":Ir(t)?t.type||null:Ee.isBuffer(t)||Ma.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof yt?`multipart/form-data; boundary=${e[pe].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${Gd(t)}`:t instanceof ot?null:"text/plain;charset=UTF-8",Wa=t=>{let{body:e}=t[pe];return e===null?0:Ir(e)?e.size:Ee.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},ka=async(t,{body:e})=>{e===null?t.end():await Vd(e,t)};import{types as ja}from"node:util";import Hn from"node:http";var Dn=typeof Hn.validateHeaderName=="function"?Hn.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},ai=typeof Hn.validateHeaderValue=="function"?Hn.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let r=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},_e=class t extends URLSearchParams{constructor(e){let r=[];if(e instanceof t){let n=e.raw();for(let[i,a]of Object.entries(n))r.push(...a.map(u=>[i,u]))}else if(e!=null)if(typeof e=="object"&&!ja.isBoxedPrimitive(e)){let n=e[Symbol.iterator];if(n==null)r.push(...Object.entries(e));else{if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(i=>{if(typeof i!="object"||ja.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(Dn(n),ai(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,a){switch(i){case"append":case"set":return(u,h)=>(Dn(u),ai(u,String(h)),URLSearchParams.prototype[i].call(n,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(Dn(u),URLSearchParams.prototype[i].call(n,String(u).toLowerCase()));case"keys":return()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,a)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let n=r.join(", ");return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,r=void 0){for(let n of this.keys())Reflect.apply(e,r,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let n=this.getAll(r);return r==="host"?e[r]=n[0]:e[r]=n.length>1?n:n[0],e},{})}};Object.defineProperties(_e.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));function Va(t=[]){return new _e(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return Dn(e),ai(e,String(r)),!0}catch{return!1}}))}var Yd=new Set([301,302,303,307,308]),Bn=t=>Yd.has(t);var De=Symbol("Response internals"),Te=class t extends Ue{constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new _e(r.headers);if(e!==null&&!i.has("Content-Type")){let a=Nn(e,this);a&&i.append("Content-Type",a)}this[De]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[De].type}get url(){return this[De].url||""}get status(){return this[De].status}get ok(){return this[De].status>=200&&this[De].status<300}get redirected(){return this[De].counter>0}get statusText(){return this[De].statusText}get headers(){return this[De].headers}get highWaterMark(){return this[De].highWaterMark}clone(){return new t(kt(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,r=302){if(!Bn(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new t(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new t(null,{status:0,statusText:""});return e[De].type="error",e}static json(e=void 0,r={}){let n=JSON.stringify(e);if(n===void 0)throw new TypeError("data is not JSON serializable");let i=new _e(r&&r.headers);return i.has("content-type")||i.set("content-type","application/json"),new t(n,{...r,headers:i})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Te.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});import{format as Xd}from"node:url";import{deprecate as Zd}from"node:util";var Ga=t=>{if(t.search)return t.search;let e=t.href.length-1,r=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-r.length]==="?"?"?":""};import{isIP as Qd}from"node:net";function Ya(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}var Qa=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Ka="strict-origin-when-cross-origin";function Xa(t){if(!Qa.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function Kd(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=Qd(e);return r===4&&/^127\./.test(e)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:t.host==="localhost"||t.host.endsWith(".localhost")?!1:t.protocol==="file:"}function jt(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:Kd(t)}function Za(t,{referrerURLCallback:e,referrerOriginCallback:r}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let n=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let i=t.referrer,a=Ya(i),u=Ya(i,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),r&&(u=r(u));let h=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return jt(a)&&!jt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:jt(a)&&!jt(h)?"no-referrer":u;case"same-origin":return a.origin===h.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===h.origin?a:u;case"no-referrer-when-downgrade":return jt(a)&&!jt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function Ja(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&Qa.has(n)&&(r=n);return r}var se=Symbol("Request internals"),$r=t=>typeof t=="object"&&typeof t[se]=="object",Jd=Zd(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),wt=class t extends Ue{constructor(e,r={}){let n;if($r(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!$r(r)&&"data"in r&&Jd(),(r.body!=null||$r(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=r.body?r.body:$r(e)&&e.body!==null?kt(e):null;super(a,{size:r.size||e.size||0});let u=new _e(r.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let c=Nn(a,this);c&&u.set("Content-Type",c)}let h=$r(e)?e.signal:null;if("signal"in r&&(h=r.signal),h!=null&&!La(h))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let f=r.referrer==null?e.referrer:r.referrer;if(f==="")f="no-referrer";else if(f){let c=new URL(f);f=/^about:(\/\/)?client$/.test(c)?"client":c}else f=void 0;this[se]={method:i,redirect:r.redirect||e.redirect||"follow",headers:u,parsedURL:n,signal:h,referrer:f},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[se].method}get url(){return Xd(this[se].parsedURL)}get headers(){return this[se].headers}get redirect(){return this[se].redirect}get signal(){return this[se].signal}get referrer(){if(this[se].referrer==="no-referrer")return"";if(this[se].referrer==="client")return"about:client";if(this[se].referrer)return this[se].referrer.toString()}get referrerPolicy(){return this[se].referrerPolicy}set referrerPolicy(e){this[se].referrerPolicy=Xa(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(wt.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var el=t=>{let{parsedURL:e}=t[se],r=new _e(t[se].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(n="0"),t.body!==null){let h=Wa(t);typeof h=="number"&&!Number.isNaN(h)&&(n=String(h))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=Ka),t.referrer&&t.referrer!=="no-referrer"?t[se].referrer=Za(t):t[se].referrer="no-referrer",t[se].referrer instanceof URL&&r.set("Referer",t.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=t;typeof i=="function"&&(i=i(e)),!r.has("Connection")&&!i&&r.set("Connection","close");let a=Ga(e),u={path:e.pathname+a,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:u}};var Fn=class extends Ge{constructor(e,r="aborted"){super(e,r)}};In();ni();var rp=new Set(["data:","http:","https:"]);async function Un(t,e){return new Promise((r,n)=>{let i=new wt(t,e),{parsedURL:a,options:u}=el(i);if(!rp.has(a.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let _=Ra(i.url),R=new Te(_,{headers:{"Content-Type":_.typeFull}});r(R);return}let h=(a.protocol==="https:"?tp:ep).request,{signal:f}=i,c=null,g=()=>{let _=new Fn("The operation was aborted.");n(_),i.body&&i.body instanceof tl.Readable&&i.body.destroy(_),!(!c||!c.body)&&c.body.emit("error",_)};if(f&&f.aborted){g();return}let b=()=>{g(),p()},m=h(a.toString(),u);f&&f.addEventListener("abort",b);let p=()=>{m.abort(),f&&f.removeEventListener("abort",b)};m.on("error",_=>{n(new de(`request to ${i.url} failed, reason: ${_.message}`,"system",_)),p()}),np(m,_=>{c&&c.body&&c.body.destroy(_)}),process.version<"v14"&&m.on("socket",_=>{let R;_.prependListener("end",()=>{R=_._eventsCount}),_.prependListener("close",E=>{if(c&&R<_._eventsCount&&!E){let A=new Error("Premature close");A.code="ERR_STREAM_PREMATURE_CLOSE",c.body.emit("error",A)}})}),m.on("response",_=>{m.setTimeout(0);let R=Va(_.rawHeaders);if(Bn(_.statusCode)){let T=R.get("Location"),L=null;try{L=T===null?null:new URL(T,i.url)}catch{if(i.redirect!=="manual"){n(new de(`uri requested responds with an invalid redirect URL: ${T}`,"invalid-redirect")),p();return}}switch(i.redirect){case"error":n(new de(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if(L===null)break;if(i.counter>=i.follow){n(new de(`maximum redirect reached at: ${i.url}`,"max-redirect")),p();return}let D={headers:new _e(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:kt(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!$a(i.url,L)||!Pa(i.url,L))for(let V of["authorization","www-authenticate","cookie","cookie2"])D.headers.delete(V);if(_.statusCode!==303&&i.body&&e.body instanceof tl.Readable){n(new de("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&i.method==="POST")&&(D.method="GET",D.body=void 0,D.headers.delete("content-length"));let H=Ja(R);H&&(D.referrerPolicy=H),r(Un(new wt(L,D))),p();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}f&&_.once("end",()=>{f.removeEventListener("abort",b)});let E=Gt(_,new rl,T=>{T&&n(T)});process.version<"v12.10"&&_.on("aborted",b);let A={url:i.url,status:_.statusCode,statusText:_.statusMessage,headers:R,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},N=R.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||N===null||_.statusCode===204||_.statusCode===304){c=new Te(E,A),r(c);return}let $={flush:Vt.Z_SYNC_FLUSH,finishFlush:Vt.Z_SYNC_FLUSH};if(N==="gzip"||N==="x-gzip"){E=Gt(E,Vt.createGunzip($),T=>{T&&n(T)}),c=new Te(E,A),r(c);return}if(N==="deflate"||N==="x-deflate"){let T=Gt(_,new rl,L=>{L&&n(L)});T.once("data",L=>{(L[0]&15)===8?E=Gt(E,Vt.createInflate(),D=>{D&&n(D)}):E=Gt(E,Vt.createInflateRaw(),D=>{D&&n(D)}),c=new Te(E,A),r(c)}),T.once("end",()=>{c||(c=new Te(E,A),r(c))});return}if(N==="br"){E=Gt(E,Vt.createBrotliDecompress(),T=>{T&&n(T)}),c=new Te(E,A),r(c);return}c=new Te(E,A),r(c)}),ka(m,i).catch(n)})}function np(t,e){let r=qn.from(`0\r
26
+ `,t}});var bh=C((OS,gh)=>{"use strict";gh.exports=qb;var Bb=dh(),Fb=mh();function qb(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new Bb;try{return e.parse(t),e.finish()}catch(r){throw Fb(r,t)}}});function Ws({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}var Qs=Re(da(),1);var pa=Qs.default.HttpProxyAgent,ma=Qs.default.HttpsProxyAgent;var vr=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[r,n]of e)this.onEviction(r,n.value)}_deleteIfExpired(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,r.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,r){if(this._deleteIfExpired(e,r)===!1)return r.value}_getItemValue(e,r){return r.expiry?this._getOrDeleteIfExpired(e,r):r.value}_peek(e,r){let n=r.get(e);return this._getItemValue(e,n)}_set(e,r){this.cache.set(e,r),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,r){this.oldCache.delete(e),this._set(e,r)}*_entriesAscending(){for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield e)}for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let r=this.cache.get(e);return this._getItemValue(e,r)}if(this.oldCache.has(e)){let r=this.oldCache.get(e);if(this._deleteIfExpired(e,r)===!1)return this._moveToRecent(e,r),r.value}}set(e,r,{maxAge:n=this.maxAge}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(e)?this.cache.set(e,{value:r,expiry:i}):this._set(e,{value:r,expiry:i})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this._entriesAscending()],n=r.length-e;n<0?(this.cache=new Map(r),this.oldCache=new Map,this._size=r.length):(n>0&&this._emitEvictions(r.slice(0,n)),this.oldCache=new Map(r.slice(n)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}}*entriesDescending(){let e=[...this.cache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}e=[...this.oldCache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this.cache.has(i)||this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}}*entriesAscending(){for(let[e,r]of this._entriesAscending())yield[e,r.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,r=this){for(let[n,i]of this.entriesAscending())e.call(r,i,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var _a=Re(ba(),1);import{Agent as Ad}from"node:http";import{Agent as Cd}from"node:https";var vd={agentCacheSize:512},ya={maxSockets:64,keepAlive:!1},Ks=class t extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,t)}};function Xs(t,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let r={...vd,...e},n=new vr({maxSize:r.agentCacheSize});async function i(u,h={}){let{origin:f,protocol:c}=new URL(u),g=h!=null&&h.noProxy?null:(0,_a.getProxyForUrl)(u),b=JSON.stringify({proxyUrl:g,origin:f,...h});if(n.has(b))return n.get(b);let m;if("noProxy"in h&&delete h.noProxy,e.undici){let{ProxyAgent:p,Agent:_}=await import("undici"),R={...h};"keepAlive"in R&&!("pipelining"in R)&&(R.pipelining=R.keepAlive?1:0),"keepAlive"in R&&delete R.keepAlive,"maxSockets"in R&&(R.connections=R.maxSockets,delete R.maxSockets),g?m=new p({...R,uri:g}):m=new _(R)}else{let p=c==="https:";g?m=new(p?ma:pa)({...h,proxy:g}):m=new(p?Cd:Ad)(h)}return n.set(b,m),m}let a=(u,{timeout:h=0,agentOpts:f={},...c}={})=>new Promise(async(g,b)=>{var _;if(!e.undici&&!("agent"in c)){let R=await i(u,{...ya,...f});R&&(c.agent=R)}else if(e.undici&&!("dispatcher"in c)){let R=await i(u,{...ya,...f});R&&(c.dispatcher=R)}let m,p;h&&(!("signal"in c)&&globalThis.AbortController&&(p=new AbortController,c.signal=p.signal),m=setTimeout(()=>{var E;(E=p==null?void 0:p.abort)==null||E.call(p);let R=new Ks(`${c.method||"GET"} ${u} timed out after ${h}ms`);b(R)},h),(_=m==null?void 0:m.unref)==null||_.call(m)),t(u,c).then(R=>{m&&clearTimeout(m),g(R)}).catch(R=>{if(m&&clearTimeout(m),R.name==="AbortError")return g(null);b(R)})});return a.clearCache=()=>{for(let u of n.values())"destroy"in u&&u.destroy();n.clear()},a}var $h=Re(Zs(),1);import tp from"node:http";import rp from"node:https";import Vt from"node:zlib";import rl,{PassThrough as nl,pipeline as Gt}from"node:stream";import{Buffer as qn}from"node:buffer";function Od(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 r=t.substring(5,e).split(";"),n="",i=!1,a=r[0]||"text/plain",u=a;for(let g=1;g<r.length;g++)r[g]==="base64"?i=!0:r[g]&&(u+=`;${r[g]}`,r[g].indexOf("charset=")===0&&(n=r[g].substring(8)));!r[0]&&!n.length&&(u+=";charset=US-ASCII",n="US-ASCII");let h=i?"base64":"ascii",f=unescape(t.substring(e+1)),c=Buffer.from(f,h);return c.type=a,c.typeFull=u,c.charset=n,c}var Ea=Od;xr();In();import at,{PassThrough as Ma}from"node:stream";import{types as ka,deprecate as ai,promisify as Vd}from"node:util";import{Buffer as Ee}from"node:buffer";var Ge=class extends Error{constructor(e,r){super(e),Error.captureStackTrace(this,this.constructor),this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var de=class extends Ge{constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}};var $n=Symbol.toStringTag,ni=t=>typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&typeof t.sort=="function"&&t[$n]==="URLSearchParams",Ir=t=>t&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.constructor=="function"&&/^(Blob|File)$/.test(t[$n]),La=t=>typeof t=="object"&&(t[$n]==="AbortSignal"||t[$n]==="EventTarget"),Pa=(t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},Na=(t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n};var Gd=Vd(at.pipeline),pe=Symbol("Body internals"),Ue=class{constructor(e,{size:r=0}={}){let n=null;e===null?e=null:ni(e)?e=Ee.from(e.toString()):Ir(e)||Ee.isBuffer(e)||(ka.isAnyArrayBuffer(e)?e=Ee.from(e):ArrayBuffer.isView(e)?e=Ee.from(e.buffer,e.byteOffset,e.byteLength):e instanceof at||(e instanceof yt?(e=$a(e),n=e.type.split("=")[1]):e=Ee.from(String(e))));let i=e;Ee.isBuffer(e)?i=at.Readable.from(e):Ir(e)&&(i=at.Readable.from(e.stream())),this[pe]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof at&&e.on("error",a=>{let u=a instanceof Ge?a:new de(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[pe].error=u})}get body(){return this[pe].stream}get bodyUsed(){return this[pe].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await oi(this);return e.slice(r,r+n)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let n=new yt,i=new URLSearchParams(await this.text());for(let[a,u]of i)n.append(a,u);return n}let{toFormData:r}=await Promise.resolve().then(()=>(za(),Ua));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[pe].body&&this[pe].body.type||"",r=await this.arrayBuffer();return new Ve([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await oi(this);return new TextDecoder().decode(e)}buffer(){return oi(this)}};Ue.prototype.buffer=ai(Ue.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Ue.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:ai(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function oi(t){if(t[pe].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[pe].disturbed=!0,t[pe].error)throw t[pe].error;let{body:e}=t;if(e===null)return Ee.alloc(0);if(!(e instanceof at))return Ee.alloc(0);let r=[],n=0;try{for await(let i of e){if(t.size>0&&n+i.length>t.size){let a=new de(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(a),a}n+=i.length,r.push(i)}}catch(i){throw i instanceof Ge?i:new de(`Invalid response body while trying to fetch ${t.url}: ${i.message}`,"system",i)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?Ee.from(r.join("")):Ee.concat(r,n)}catch(i){throw new de(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new de(`Premature close of server response while trying to fetch ${t.url}`)}var Wt=(t,e)=>{let r,n,{body:i}=t[pe];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof at&&typeof i.getBoundary!="function"&&(r=new Ma({highWaterMark:e}),n=new Ma({highWaterMark:e}),i.pipe(r),i.pipe(n),t[pe].stream=r,i=n),i},Yd=ai(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Nn=(t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":ni(t)?"application/x-www-form-urlencoded;charset=UTF-8":Ir(t)?t.type||null:Ee.isBuffer(t)||ka.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof yt?`multipart/form-data; boundary=${e[pe].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${Yd(t)}`:t instanceof at?null:"text/plain;charset=UTF-8",Wa=t=>{let{body:e}=t[pe];return e===null?0:Ir(e)?e.size:Ee.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},ja=async(t,{body:e})=>{e===null?t.end():await Gd(e,t)};import{types as Va}from"node:util";import Hn from"node:http";var Dn=typeof Hn.validateHeaderName=="function"?Hn.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},li=typeof Hn.validateHeaderValue=="function"?Hn.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let r=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},_e=class t extends URLSearchParams{constructor(e){let r=[];if(e instanceof t){let n=e.raw();for(let[i,a]of Object.entries(n))r.push(...a.map(u=>[i,u]))}else if(e!=null)if(typeof e=="object"&&!Va.isBoxedPrimitive(e)){let n=e[Symbol.iterator];if(n==null)r.push(...Object.entries(e));else{if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(i=>{if(typeof i!="object"||Va.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(Dn(n),li(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,a){switch(i){case"append":case"set":return(u,h)=>(Dn(u),li(u,String(h)),URLSearchParams.prototype[i].call(n,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(Dn(u),URLSearchParams.prototype[i].call(n,String(u).toLowerCase()));case"keys":return()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,a)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let n=r.join(", ");return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,r=void 0){for(let n of this.keys())Reflect.apply(e,r,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let n=this.getAll(r);return r==="host"?e[r]=n[0]:e[r]=n.length>1?n:n[0],e},{})}};Object.defineProperties(_e.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));function Ga(t=[]){return new _e(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return Dn(e),li(e,String(r)),!0}catch{return!1}}))}var Qd=new Set([301,302,303,307,308]),Bn=t=>Qd.has(t);var De=Symbol("Response internals"),Te=class t extends Ue{constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new _e(r.headers);if(e!==null&&!i.has("Content-Type")){let a=Nn(e,this);a&&i.append("Content-Type",a)}this[De]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[De].type}get url(){return this[De].url||""}get status(){return this[De].status}get ok(){return this[De].status>=200&&this[De].status<300}get redirected(){return this[De].counter>0}get statusText(){return this[De].statusText}get headers(){return this[De].headers}get highWaterMark(){return this[De].highWaterMark}clone(){return new t(Wt(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,r=302){if(!Bn(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new t(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new t(null,{status:0,statusText:""});return e[De].type="error",e}static json(e=void 0,r={}){let n=JSON.stringify(e);if(n===void 0)throw new TypeError("data is not JSON serializable");let i=new _e(r&&r.headers);return i.has("content-type")||i.set("content-type","application/json"),new t(n,{...r,headers:i})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Te.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});import{format as Zd}from"node:url";import{deprecate as Jd}from"node:util";var Ya=t=>{if(t.search)return t.search;let e=t.href.length-1,r=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-r.length]==="?"?"?":""};import{isIP as Kd}from"node:net";function Qa(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}var Ka=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Xa="strict-origin-when-cross-origin";function Za(t){if(!Ka.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function Xd(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=Kd(e);return r===4&&/^127\./.test(e)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:t.host==="localhost"||t.host.endsWith(".localhost")?!1:t.protocol==="file:"}function jt(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:Xd(t)}function Ja(t,{referrerURLCallback:e,referrerOriginCallback:r}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let n=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let i=t.referrer,a=Qa(i),u=Qa(i,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),r&&(u=r(u));let h=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return jt(a)&&!jt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:jt(a)&&!jt(h)?"no-referrer":u;case"same-origin":return a.origin===h.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===h.origin?a:u;case"no-referrer-when-downgrade":return jt(a)&&!jt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function el(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&Ka.has(n)&&(r=n);return r}var se=Symbol("Request internals"),Lr=t=>typeof t=="object"&&typeof t[se]=="object",ep=Jd(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),wt=class t extends Ue{constructor(e,r={}){let n;if(Lr(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!Lr(r)&&"data"in r&&ep(),(r.body!=null||Lr(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=r.body?r.body:Lr(e)&&e.body!==null?Wt(e):null;super(a,{size:r.size||e.size||0});let u=new _e(r.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let c=Nn(a,this);c&&u.set("Content-Type",c)}let h=Lr(e)?e.signal:null;if("signal"in r&&(h=r.signal),h!=null&&!La(h))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let f=r.referrer==null?e.referrer:r.referrer;if(f==="")f="no-referrer";else if(f){let c=new URL(f);f=/^about:(\/\/)?client$/.test(c)?"client":c}else f=void 0;this[se]={method:i,redirect:r.redirect||e.redirect||"follow",headers:u,parsedURL:n,signal:h,referrer:f},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[se].method}get url(){return Zd(this[se].parsedURL)}get headers(){return this[se].headers}get redirect(){return this[se].redirect}get signal(){return this[se].signal}get referrer(){if(this[se].referrer==="no-referrer")return"";if(this[se].referrer==="client")return"about:client";if(this[se].referrer)return this[se].referrer.toString()}get referrerPolicy(){return this[se].referrerPolicy}set referrerPolicy(e){this[se].referrerPolicy=Za(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(wt.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var tl=t=>{let{parsedURL:e}=t[se],r=new _e(t[se].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(n="0"),t.body!==null){let h=Wa(t);typeof h=="number"&&!Number.isNaN(h)&&(n=String(h))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=Xa),t.referrer&&t.referrer!=="no-referrer"?t[se].referrer=Ja(t):t[se].referrer="no-referrer",t[se].referrer instanceof URL&&r.set("Referer",t.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=t;typeof i=="function"&&(i=i(e)),!r.has("Connection")&&!i&&r.set("Connection","close");let a=Ya(e),u={path:e.pathname+a,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:u}};var Fn=class extends Ge{constructor(e,r="aborted"){super(e,r)}};In();si();var np=new Set(["data:","http:","https:"]);async function Un(t,e){return new Promise((r,n)=>{let i=new wt(t,e),{parsedURL:a,options:u}=tl(i);if(!np.has(a.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let _=Ea(i.url),R=new Te(_,{headers:{"Content-Type":_.typeFull}});r(R);return}let h=(a.protocol==="https:"?rp:tp).request,{signal:f}=i,c=null,g=()=>{let _=new Fn("The operation was aborted.");n(_),i.body&&i.body instanceof rl.Readable&&i.body.destroy(_),!(!c||!c.body)&&c.body.emit("error",_)};if(f&&f.aborted){g();return}let b=()=>{g(),p()},m=h(a.toString(),u);f&&f.addEventListener("abort",b);let p=()=>{m.abort(),f&&f.removeEventListener("abort",b)};m.on("error",_=>{n(new de(`request to ${i.url} failed, reason: ${_.message}`,"system",_)),p()}),sp(m,_=>{c&&c.body&&c.body.destroy(_)}),process.version<"v14"&&m.on("socket",_=>{let R;_.prependListener("end",()=>{R=_._eventsCount}),_.prependListener("close",E=>{if(c&&R<_._eventsCount&&!E){let A=new Error("Premature close");A.code="ERR_STREAM_PREMATURE_CLOSE",c.body.emit("error",A)}})}),m.on("response",_=>{m.setTimeout(0);let R=Ga(_.rawHeaders);if(Bn(_.statusCode)){let T=R.get("Location"),$=null;try{$=T===null?null:new URL(T,i.url)}catch{if(i.redirect!=="manual"){n(new de(`uri requested responds with an invalid redirect URL: ${T}`,"invalid-redirect")),p();return}}switch(i.redirect){case"error":n(new de(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if($===null)break;if(i.counter>=i.follow){n(new de(`maximum redirect reached at: ${i.url}`,"max-redirect")),p();return}let D={headers:new _e(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:Wt(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!Pa(i.url,$)||!Na(i.url,$))for(let V of["authorization","www-authenticate","cookie","cookie2"])D.headers.delete(V);if(_.statusCode!==303&&i.body&&e.body instanceof rl.Readable){n(new de("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&i.method==="POST")&&(D.method="GET",D.body=void 0,D.headers.delete("content-length"));let H=el(R);H&&(D.referrerPolicy=H),r(Un(new wt($,D))),p();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}f&&_.once("end",()=>{f.removeEventListener("abort",b)});let E=Gt(_,new nl,T=>{T&&n(T)});process.version<"v12.10"&&_.on("aborted",b);let A={url:i.url,status:_.statusCode,statusText:_.statusMessage,headers:R,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},N=R.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||N===null||_.statusCode===204||_.statusCode===304){c=new Te(E,A),r(c);return}let L={flush:Vt.Z_SYNC_FLUSH,finishFlush:Vt.Z_SYNC_FLUSH};if(N==="gzip"||N==="x-gzip"){E=Gt(E,Vt.createGunzip(L),T=>{T&&n(T)}),c=new Te(E,A),r(c);return}if(N==="deflate"||N==="x-deflate"){let T=Gt(_,new nl,$=>{$&&n($)});T.once("data",$=>{($[0]&15)===8?E=Gt(E,Vt.createInflate(),D=>{D&&n(D)}):E=Gt(E,Vt.createInflateRaw(),D=>{D&&n(D)}),c=new Te(E,A),r(c)}),T.once("end",()=>{c||(c=new Te(E,A),r(c))});return}if(N==="br"){E=Gt(E,Vt.createBrotliDecompress(),T=>{T&&n(T)}),c=new Te(E,A),r(c);return}c=new Te(E,A),r(c)}),ja(m,i).catch(n)})}function sp(t,e){let r=qn.from(`0\r
27
27
  \r
28
- `),n=!1,i=!1,a;t.on("response",u=>{let{headers:h}=u;n=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),t.on("socket",u=>{let h=()=>{if(n&&!i){let c=new Error("Premature close");c.code="ERR_STREAM_PREMATURE_CLOSE",e(c)}},f=c=>{i=qn.compare(c.slice(-5),r)===0,!i&&a&&(i=qn.compare(a.slice(-3),r.slice(0,3))===0&&qn.compare(c.slice(-2),r.slice(3))===0),a=c};u.prependListener("close",h),u.on("data",f),t.on("close",()=>{u.removeListener("close",h),u.removeListener("data",f)})})}var Lh=Re(Il(),1),$h=Re(Mn(),1),Ph=Re($l(),1),ne=Re(Oc(),1),Nh=Re(Nc(),1),Dh=Re(Yc(),1);import{cwd as Wb,stdout as kb,argv as jb,env as fs,exit as Yr,versions as Vb}from"node:process";import{join as ds,dirname as Hh,basename as Gb}from"node:path";import{lstatSync as Yb,readFileSync as Sh,truncateSync as Qb,writeFileSync as Kb,accessSync as Xb}from"node:fs";import{platform as Zb}from"node:os";import{rootCertificates as Rh}from"node:tls";var vb=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],xb={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"};function os(t,{noAffix:e=!1,times:r=vb,nowThreshold:n=1e4,nowString:i="now",aliases:a=!1,aliasesMap:u=xb}={}){let h=Date.now();if(t=typeof t=="number"?t:Date.parse(t),Number.isNaN(t))return"unknown";let f=!1,c=h-t;if(c<0&&(f=!0,c=Math.abs(c)),c<n)return i;let g,b;for(let p=0,_=r.length;p<_;p++){let R=r[p];if(!(c>=R[1])){g=Math.floor(c/R[0]),b=R[2]+(g>1?"s":"");break}}let m=`${f&&!e?"in ":""}${g} ${b}${!f&&!e?" ago":""}`;return a?u[m]??m:m}import Fi from"node:process";import Ob from"node:os";import Qc from"node:tty";function ve(t,e=globalThis.Deno?globalThis.Deno.args:Fi.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:X}=Fi,as;ve("no-color")||ve("no-colors")||ve("color=false")||ve("color=never")?as=0:(ve("color")||ve("colors")||ve("color=true")||ve("color=always"))&&(as=1);function Ib(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function Lb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function $b(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=Ib();n!==void 0&&(as=n);let i=r?as:n;if(i===0)return 0;if(r){if(ve("color=16m")||ve("color=full")||ve("color=truecolor"))return 3;if(ve("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(t&&!e&&i===void 0)return 0;let a=i||0;if(X.TERM==="dumb")return a;if(Fi.platform==="win32"){let u=Ob.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in X)return"GITHUB_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in X)||X.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let u=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:a}function Kc(t,e={}){let r=$b(t,{streamIsTTY:t&&t.isTTY,...e});return Lb(r)}var Pb={stdout:Kc({isTTY:Qc.isatty(1)}),stderr:Kc({isTTY:Qc.isatty(2)})},Xc=Pb;var Zc=!0;function Jc(){Zc=!1}function qi(t,e,r){return Zc?`\x1B[${e}m${t}\x1B[${r}m`:t}var Ui=t=>qi(t,31,39),rr=t=>qi(t,32,39);var ls=t=>qi(t,35,39);var Bh=Re(gh(),1);var qb=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var ki=new Set(["__proto__","prototype","constructor"]),Ub=new Set("0123456789");function zb(t){let e=[],r="",n="start",i=!1;for(let a of t)switch(a){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=a),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=a;break}if(ki.has(r))return[];e.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=a;break}if(n==="property"){if(ki.has(r))return[];e.push(r),r=""}n="index";break}case"]":{if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!Ub.has(a))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,r+="\\"),r+=a}}switch(i&&(r+="\\"),n){case"property":{if(ki.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Mb(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function bh(t,e,r){if(!qb(t)||typeof e!="string")return r===void 0?t:r;let n=zb(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let a=n[i];if(Mb(t,a)?t=i===n.length-1?void 0:null:t=t[a],t==null){if(i!==n.length-1)return r;break}}return t===void 0?r:t}var ji=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},yh=t=>globalThis.DOMException===void 0?new ji(t):new DOMException(t),_h=t=>{let e=t.reason===void 0?yh("This operation was aborted."):t.reason;return e instanceof Error?e:yh(e)};async function Vi(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise((a,u)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let h=[],f=[],c=new Map,g=!1,b=!1,m=!1,p=0,_=0,R=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),E=N=>{g=!0,b=!0,u(N)};i&&(i.aborted&&E(_h(i)),i.addEventListener("abort",()=>{E(_h(i))}));let A=async()=>{if(b)return;let N=await R.next(),$=_;if(_++,N.done){if(m=!0,p===0&&!b){if(!n&&f.length>0){E(new AggregateError(f));return}if(b=!0,c.size===0){a(h);return}let T=[];for(let[L,D]of h.entries())c.get(L)!==wh&&T.push(D);a(T)}return}p++,(async()=>{try{let T=await N.value;if(b)return;let L=await e(T,$);L===wh&&c.set($,L),h[$]=L,p--,await A()}catch(T){if(n)E(T);else{f.push(T),p--;try{await A()}catch(L){E(L)}}}})()};(async()=>{for(let N=0;N<r;N++){try{await A()}catch($){E($);break}if(m||g)break}})()})}var wh=Symbol("skip");async function Gi(t,e){return Vi(t,r=>r(),e)}function sr(t,e){var r=0,n,i;e=e||{};function a(){var u=n,h=arguments.length,f,c;e:for(;u;){if(u.args.length!==arguments.length){u=u.next;continue}for(c=0;c<h;c++)if(u.args[c]!==arguments[c]){u=u.next;continue e}return u!==n&&(u===i&&(i=u.prev),u.prev.next=u.next,u.next&&(u.next.prev=u.prev),u.next=n,u.prev=null,n.prev=u,n=u),u.val}for(f=new Array(h),c=0;c<h;c++)f[c]=arguments[c];return u={args:f,val:t.apply(null,f)},n?(n.prev=u,u.next=n):i=u,r===e.maxSize?(i=i.prev,i.next=null):r++,n=u,u.val}return a.clear=function(){n=null,i=null,r=0},a}var{fromUrl:Jb}=Dh.default,ur,Oh;globalThis.fetch&&!((Oh=Vb)!=null&&Oh.node)?ur=globalThis.fetch:ur=Ks(Un,{undici:!1});var Fh=96,ct="\0",ey=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,ty=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Ji=/^[0-9a-f]{7,}$/i,Eh=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Th=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),ry=sr(Jb),Yi=sr(Lh.default),ny=sr(Ph.default),ps=sr(t=>t.endsWith("/")?t.substring(0,t.length-1):t),sy=new Set(["patch"]),iy=new Set(["patch","minor"]),oy=new Set(["patch","minor","major"]),qh="14.2.4",xe={},z=(0,Ih.default)(jb.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","l","language","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",h:"help",i:"include",j:"json",l:"language",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});(z["no-color"]||!Xc.stdout)&&Jc();var ir=cr(z.greatest),Qi=cr(z.prerelease),Ki=cr(z.release),or=cr(z.patch),ar=cr(z.minor),lr=cr(z["allow-downgrade"]),ze=(0,$h.default)("npm",{registry:"https://registry.npmjs.org"}),Xi={npmrc:ze,recursive:!0},Ah=z.githubapi?ps(z.githubapi):"https://api.github.com",ay=z.pypiapi?ps(z.pypiapi):"https://pypi.org",Uh=typeof z.sockets=="number"?parseInt(z.sockets):Fh;function Ch(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}function zh(t,e,r){let n=ds(e,t);try{return Xb(n),n}catch{}let i=Hh(e);return r&&n===r||i===e?null:zh(t,i,r)}function ly(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=ps(ny(r,ze));if(n!==e)try{let i=Yi(n,Xi);if(i!=null&&i.token)return[i,n]}catch{}return[Yi(e,Xi),e]}else return[Yi(e,Xi),e]}var Mh=sr((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${qh}`,...r&&{Authorization:`${e} ${r}`}}}));async function uy(t,e,r,n){let[i,a]=ly(t,r),h=(e==="resolutions"?wy(t):t).replace(/\//g,"%2f"),f=`${a}/${h}`;z.verbose&&console.error(`${ls("fetch")} ${f}`);let c=await ur(f,Mh(n,i==null?void 0:i.type,i==null?void 0:i.token));if(c!=null&&c.ok)return z.verbose&&console.error(`${rr("done")} ${f}`),[await c.json(),e,a,t];throw c!=null&&c.status&&(c!=null&&c.statusText)?new Error(`Received ${c.status} ${c.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function cy(t,e,r){let n=`${ay}/pypi/${t}/json`;z.verbose&&console.error(`${ls("fetch")} ${n}`);let i=await ur(n,Mh(r));if(i!=null&&i.ok)return z.verbose&&console.error(`${rr("done")} ${n}`),[await i.json(),e,null,t];throw i!=null&&i.status&&(i!=null&&i.statusText)?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function hy({repository:t,homepage:e,info:r},n,i){r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a;if(n==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let h=typeof t=="string"?t:t.url,f=ry(h);f!=null&&f.browse&&(a=f.browse()),a&&t.directory&&f.treepath&&(a=`${a}/${f.treepath}/HEAD/${t.directory}`),!a&&(t!=null&&t.url)&&/^https?:/.test(t.url)&&(a=t.url)}let u=a||e||"";if(u){let h=new URL(u);h.protocol==="http:"&&h.hostname==="github.com"&&(h.protocol="https:",u=String(h))}return u}function Oe(t,e={}){let r={},n=t instanceof Error;typeof t=="string"?r.message=t:n&&(r.error=t.stack||t.message);for(let i of Object.values(e))"oldPrint"in i&&(i.old=i.oldPrint,delete i.oldPrint),"newPrint"in i&&(i.new=i.newPrint,delete i.newPrint),"oldOriginal"in i&&(i.old=i.oldOriginal,delete i.oldOriginal);if(z.json){if(!n){r.results={};for(let[i,a]of Object.entries(e)){let[u,h]=i.split(ct);r.results[u]||(r.results[u]={}),r.results[u][h]=a}}console.info(JSON.stringify(r))}else Object.keys(e).length&&!n&&console.info(dy(e)),(r.message||r.error)&&(r.message?console.info(r.message):r.error&&console.info(Ui(r.error)));z["error-on-outdated"]?Yr(Object.keys(e).length?2:0):z["error-on-unchanged"]?Yr(Object.keys(e).length?0:2):Yr(r.error?1:0)}function fy(t,e){let r=Zb()==="win32";r&&Qb(t,0),Kb(t,e,r?{flag:"r+"}:void 0)}function vh(t,e,r){let n=t.split(/\./),i=e.split(/\./),a=r?rr:Ui,u=/^[0-9a-zA-Z-.]+$/,h="";for(let f=0;f<n.length;f++)if(n[f]!==i[f]){u.test(n[f])?h+=a(n.slice(f).join(".")):h+=n[f].split("").map(c=>u.test(c)?a(c):c).join("")+a(`.${n.slice(f+1).join(".")}`);break}else h+=`${n[f]}.`;return h}function dy(t){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[r,n]of Object.entries(t))e.push([r.split(ct)[1],vh(n.old,n.new,!1),vh(n.new,n.old,!0),n.age||"",n.info]);return(0,Nh.default)(e,{hsep:" ",stringLength:r=>r.replace(Ws(),"").length})}function py(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(ct)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`"${Th(i)}": +"${Th(a)}"`,"g");r=r.replace(u,`"${i}": "${e[n].new}"`)}return r}function my(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Zi(t){let e=ne.default.parse(t);return e?!!e.prerelease.length:!1}function Wh(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function gy(t){try{return ne.default.coerce(t).version}catch{return null}}function by(t,e,{range:r,semvers:n,usePre:i,useRel:a,useGreatest:u}={}){let h=gy(r),f=0;n=new Set(n),i=Wh(r)||i,i&&(n.add("prerelease"),n.has("patch")&&n.add("prepatch"),n.has("minor")&&n.add("preminor"),n.has("major")&&n.add("premajor"));for(let c of e){let g=ne.default.parse(c);if(g.prerelease.length&&(!i||a))continue;let b=ne.default.diff(h,g.version);if(!(!b||!n.has(b)))if(u||!("time"in t))ne.default.gte(ne.default.coerce(g.version).version,h)&&(h=g.version);else{let m=new Date(t.time[c]).getTime();m>=0&&m>f&&(h=g.version,f=m)}}return h||null}function xh(t){return ne.default.coerce(t).version}function yy(t,{language:e,range:r,useGreatest:n,useRel:i,usePre:a,semvers:u}={}){var c;if(r==="*"||r.includes("||"))return null;let h=Object.keys(e==="py"?t.releases:t.versions).filter(g=>ne.default.valid(g)),f=by(t,h,{range:r,semvers:u,usePre:a,useRel:i,useGreatest:n});if(n)return f;{let g;e==="py"?g=xh(t.info.version):g=t["dist-tags"].latest;let b=xh(r),m=Wh(r),p=Zi(f),_=Zi(g),R=ne.default.gt(f,b);if(!i&&a||m&&p||i&&!R&&m&&!p||m&&!p&&R)return f;if(m&&!p&&!R)return null;let E=ne.default.diff(b,g);return E&&E!=="prerelease"&&!u.has(E.replace(/^pre/,""))||i&&Zi(g)?f:ne.default.lt(g,b)&&!_?lr===!0||(c=lr==null?void 0:lr.has)!=null&&c.call(lr,t.name)?g:null:g}}async function _y([t,e],{useGreatest:r}={}){var f,c;let n=e.old.replace(ey,""),[i,a,u,h]=ty.exec(n)||[];if(!(!a||!u||!h))if(Ji.test(h)){let g={maxSockets:Uh},b=fs.UPDATES_GITHUB_API_TOKEN||fs.GITHUB_API_TOKEN||fs.GH_TOKEN||fs.HOMEBREW_GITHUB_API_TOKEN;b&&(g.headers={Authorization:`Bearer ${b}`});let m=`${Ah}/repos/${a}/${u}/commits`;z.verbose&&console.error(`${ls("fetch")} ${m}`);let p=await ur(m,g);if(z.verbose&&(p!=null&&p.ok)&&console.error(`${rr("done")} ${m}`),!p||!p.ok)return;let _=await p.json(),{sha:R,commit:E}=_[0];if(!R||!R.length)return;let A=((f=E==null?void 0:E.committer)==null?void 0:f.date)??((c=E==null?void 0:E.author)==null?void 0:c.date);if(R=R.substring(0,h.length),h!==R){let N=e.old.replace(h,R);return{key:t,newRange:N,user:a,repo:u,oldRef:h,newRef:R,newDate:A}}}else{let g=await ur(`${Ah}/repos/${a}/${u}/git/refs/tags`);if(!g||!g.ok)return;let m=(await g.json()).map(_=>_.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!ne.default.valid(p))return;if(r){let _=h,R=h.replace(/^v/,"");for(let E of m){let A=E.replace(/^v/,"");ne.default.valid(A)&&(!_||ne.default.gt(A,R))&&(_=E,R=A)}if(ne.default.neq(p,R))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=m[m.length-1],R=_.replace(/^v/,"");if(!ne.default.valid(R))return;if(ne.default.neq(p,R))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function wy(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Sy(t){let e=t.match(Eh);return(e==null?void 0:e.length)!==1?t:t.replace(Eh,ne.default.coerce(e[0]))}function cr(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}async function Ry(){var T,L,D,H,V,K,ee,oe,Be,xt;for(let v of[process.stdout,process.stderr])(L=(T=v==null?void 0:v._handle)==null?void 0:T.setBlocking)==null||L.call(T,!0);let{help:t,version:e,language:r,file:n,types:i,update:a}=z;if(t&&(kb.write(`usage: updates [options]
28
+ `),n=!1,i=!1,a;t.on("response",u=>{let{headers:h}=u;n=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),t.on("socket",u=>{let h=()=>{if(n&&!i){let c=new Error("Premature close");c.code="ERR_STREAM_PREMATURE_CLOSE",e(c)}},f=c=>{i=qn.compare(c.slice(-5),r)===0,!i&&a&&(i=qn.compare(a.slice(-3),r.slice(0,3))===0&&qn.compare(c.slice(-2),r.slice(3))===0),a=c};u.prependListener("close",h),u.on("data",f),t.on("close",()=>{u.removeListener("close",h),u.removeListener("data",f)})})}var Lh=Re($l(),1),Ph=Re(Mn(),1),Nh=Re(Pl(),1),ne=Re(Ic(),1),Dh=Re(Dc(),1),Hh=Re(Qc(),1);import{cwd as Wb,stdout as jb,argv as Vb,env as fs,exit as Yr,versions as Gb}from"node:process";import{join as ds,dirname as Bh,basename as Yb}from"node:path";import{lstatSync as Qb,readFileSync as Rh,truncateSync as Kb,writeFileSync as Xb,accessSync as Zb}from"node:fs";import{platform as Jb}from"node:os";import{rootCertificates as Eh}from"node:tls";var xb=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Ob={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"};function os(t,{noAffix:e=!1,times:r=xb,nowThreshold:n=1e4,nowString:i="now",aliases:a=!1,aliasesMap:u=Ob}={}){let h=Date.now();if(t=typeof t=="number"?t:Date.parse(t),Number.isNaN(t))return"unknown";let f=!1,c=h-t;if(c<0&&(f=!0,c=Math.abs(c)),c<n)return i;let g,b;for(let p=0,_=r.length;p<_;p++){let R=r[p];if(!(c>=R[1])){g=Math.floor(c/R[0]),b=R[2]+(g>1?"s":"");break}}let m=`${f&&!e?"in ":""}${g} ${b}${!f&&!e?" ago":""}`;return a?u[m]??m:m}import qi from"node:process";import Ib from"node:os";import Kc from"node:tty";function ve(t,e=globalThis.Deno?globalThis.Deno.args:qi.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:X}=qi,as;ve("no-color")||ve("no-colors")||ve("color=false")||ve("color=never")?as=0:(ve("color")||ve("colors")||ve("color=true")||ve("color=always"))&&(as=1);function $b(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function Lb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Pb(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=$b();n!==void 0&&(as=n);let i=r?as:n;if(i===0)return 0;if(r){if(ve("color=16m")||ve("color=full")||ve("color=truecolor"))return 3;if(ve("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(t&&!e&&i===void 0)return 0;let a=i||0;if(X.TERM==="dumb")return a;if(qi.platform==="win32"){let u=Ib.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in X)return"GITHUB_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in X)||X.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let u=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:a}function Xc(t,e={}){let r=Pb(t,{streamIsTTY:t&&t.isTTY,...e});return Lb(r)}var Nb={stdout:Xc({isTTY:Kc.isatty(1)}),stderr:Xc({isTTY:Kc.isatty(2)})},Zc=Nb;var Jc=!0;function eh(){Jc=!1}function Ui(t,e,r){return Jc?`\x1B[${e}m${t}\x1B[${r}m`:t}var zi=t=>Ui(t,31,39),rr=t=>Ui(t,32,39);var ls=t=>Ui(t,35,39);var Fh=Re(bh(),1);var Ub=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var ji=new Set(["__proto__","prototype","constructor"]),zb=new Set("0123456789");function Mb(t){let e=[],r="",n="start",i=!1;for(let a of t)switch(a){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=a),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=a;break}if(ji.has(r))return[];e.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=a;break}if(n==="property"){if(ji.has(r))return[];e.push(r),r=""}n="index";break}case"]":{if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!zb.has(a))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,r+="\\"),r+=a}}switch(i&&(r+="\\"),n){case"property":{if(ji.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function kb(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function yh(t,e,r){if(!Ub(t)||typeof e!="string")return r===void 0?t:r;let n=Mb(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let a=n[i];if(kb(t,a)?t=i===n.length-1?void 0:null:t=t[a],t==null){if(i!==n.length-1)return r;break}}return t===void 0?r:t}var Vi=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},_h=t=>globalThis.DOMException===void 0?new Vi(t):new DOMException(t),wh=t=>{let e=t.reason===void 0?_h("This operation was aborted."):t.reason;return e instanceof Error?e:_h(e)};async function Gi(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise((a,u)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let h=[],f=[],c=new Map,g=!1,b=!1,m=!1,p=0,_=0,R=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),E=N=>{g=!0,b=!0,u(N)};i&&(i.aborted&&E(wh(i)),i.addEventListener("abort",()=>{E(wh(i))}));let A=async()=>{if(b)return;let N=await R.next(),L=_;if(_++,N.done){if(m=!0,p===0&&!b){if(!n&&f.length>0){E(new AggregateError(f));return}if(b=!0,c.size===0){a(h);return}let T=[];for(let[$,D]of h.entries())c.get($)!==Sh&&T.push(D);a(T)}return}p++,(async()=>{try{let T=await N.value;if(b)return;let $=await e(T,L);$===Sh&&c.set(L,$),h[L]=$,p--,await A()}catch(T){if(n)E(T);else{f.push(T),p--;try{await A()}catch($){E($)}}}})()};(async()=>{for(let N=0;N<r;N++){try{await A()}catch(L){E(L);break}if(m||g)break}})()})}var Sh=Symbol("skip");async function Yi(t,e){return Gi(t,r=>r(),e)}function sr(t,e){var r=0,n,i;e=e||{};function a(){var u=n,h=arguments.length,f,c;e:for(;u;){if(u.args.length!==arguments.length){u=u.next;continue}for(c=0;c<h;c++)if(u.args[c]!==arguments[c]){u=u.next;continue e}return u!==n&&(u===i&&(i=u.prev),u.prev.next=u.next,u.next&&(u.next.prev=u.prev),u.next=n,u.prev=null,n.prev=u,n=u),u.val}for(f=new Array(h),c=0;c<h;c++)f[c]=arguments[c];return u={args:f,val:t.apply(null,f)},n?(n.prev=u,u.next=n):i=u,r===e.maxSize?(i=i.prev,i.next=null):r++,n=u,u.val}return a.clear=function(){n=null,i=null,r=0},a}var{fromUrl:ey}=Hh.default,ur,Ih;globalThis.fetch&&!((Ih=Gb)!=null&&Ih.node)?ur=globalThis.fetch:ur=Xs(Un,{undici:!1});var qh=96,Ke="\0",ty=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,ry=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,eo=/^[0-9a-f]{7,}$/i,Th=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,ps=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),ny=sr(ey),Qi=sr(Lh.default),sy=sr(Nh.default),ms=sr(t=>t.endsWith("/")?t.substring(0,t.length-1):t),iy=new Set(["patch"]),oy=new Set(["patch","minor"]),ay=new Set(["patch","minor","major"]),Uh="14.2.5",xe={},z=(0,$h.default)(Vb.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","l","language","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",h:"help",i:"include",j:"json",l:"language",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});(z["no-color"]||!Zc.stdout)&&eh();var ir=cr(z.greatest),Ki=cr(z.prerelease),Xi=cr(z.release),or=cr(z.patch),ar=cr(z.minor),lr=cr(z["allow-downgrade"]),ze=(0,Ph.default)("npm",{registry:"https://registry.npmjs.org"}),Zi={npmrc:ze,recursive:!0},Ah=z.githubapi?ms(z.githubapi):"https://api.github.com",ly=z.pypiapi?ms(z.pypiapi):"https://pypi.org",zh=typeof z.sockets=="number"?parseInt(z.sockets):qh;function Ch(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}function Mh(t,e,r){let n=ds(e,t);try{return Zb(n),n}catch{}let i=Bh(e);return r&&n===r||i===e?null:Mh(t,i,r)}function uy(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=ms(sy(r,ze));if(n!==e)try{let i=Qi(n,Zi);if(i!=null&&i.token)return[i,n]}catch{}return[Qi(e,Zi),e]}else return[Qi(e,Zi),e]}var kh=sr((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${Uh}`,...r&&{Authorization:`${e} ${r}`}}}));async function cy(t,e,r,n){let[i,a]=uy(t,r),h=(e==="resolutions"?Sy(t):t).replace(/\//g,"%2f"),f=`${a}/${h}`;z.verbose&&console.error(`${ls("fetch")} ${f}`);let c=await ur(f,kh(n,i==null?void 0:i.type,i==null?void 0:i.token));if(c!=null&&c.ok)return z.verbose&&console.error(`${rr("done")} ${f}`),[await c.json(),e,a,t];throw c!=null&&c.status&&(c!=null&&c.statusText)?new Error(`Received ${c.status} ${c.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function hy(t,e,r){let n=`${ly}/pypi/${t}/json`;z.verbose&&console.error(`${ls("fetch")} ${n}`);let i=await ur(n,kh(r));if(i!=null&&i.ok)return z.verbose&&console.error(`${rr("done")} ${n}`),[await i.json(),e,null,t];throw i!=null&&i.status&&(i!=null&&i.statusText)?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function fy({repository:t,homepage:e,info:r},n,i){r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a;if(n==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let h=typeof t=="string"?t:t.url,f=ny(h);f!=null&&f.browse&&(a=f.browse()),a&&t.directory&&f.treepath&&(a=`${a}/${f.treepath}/HEAD/${t.directory}`),!a&&(t!=null&&t.url)&&/^https?:/.test(t.url)&&(a=t.url)}let u=a||e||"";if(u){let h=new URL(u);h.protocol==="http:"&&h.hostname==="github.com"&&(h.protocol="https:",u=String(h))}return u}function Oe(t,e={}){let r={},n=t instanceof Error;typeof t=="string"?r.message=t:n&&(r.error=t.stack||t.message);for(let i of Object.values(e))"oldPrint"in i&&(i.old=i.oldPrint,delete i.oldPrint),"newPrint"in i&&(i.new=i.newPrint,delete i.newPrint),"oldOriginal"in i&&(i.old=i.oldOriginal,delete i.oldOriginal);if(z.json){if(!n){r.results={};for(let[i,a]of Object.entries(e)){let[u,h]=i.split(Ke);r.results[u]||(r.results[u]={}),r.results[u][h]=a}}console.info(JSON.stringify(r))}else Object.keys(e).length&&!n&&console.info(dy(e)),(r.message||r.error)&&(r.message?console.info(r.message):r.error&&console.info(zi(r.error)));z["error-on-outdated"]?Yr(Object.keys(e).length?2:0):z["error-on-unchanged"]?Yr(Object.keys(e).length?0:2):Yr(r.error?1:0)}function vh(t,e){let r=Jb()==="win32";r&&Kb(t,0),Xb(t,e,r?{flag:"r+"}:void 0)}function xh(t,e,r){let n=t.split(/\./),i=e.split(/\./),a=r?rr:zi,u=/^[0-9a-zA-Z-.]+$/,h="";for(let f=0;f<n.length;f++)if(n[f]!==i[f]){u.test(n[f])?h+=a(n.slice(f).join(".")):h+=n[f].split("").map(c=>u.test(c)?a(c):c).join("")+a(`.${n.slice(f+1).join(".")}`);break}else h+=`${n[f]}.`;return h}function dy(t){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[r,n]of Object.entries(t))e.push([r.split(Ke)[1],xh(n.old,n.new,!1),xh(n.new,n.old,!0),n.age||"",n.info]);return(0,Dh.default)(e,{hsep:" ",stringLength:r=>r.replace(Ws(),"").length})}function py(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`"${ps(i)}": *"${ps(a)}"`,"g");r=r.replace(u,`"${i}": "${e[n].new}"`)}return r}function my(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`${ps(i)} *= *"${ps(a)}"`,"g");r=r.replace(u,`${i} = "${e[n].new}"`)}return r}function gy(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Ji(t){let e=ne.default.parse(t);return e?!!e.prerelease.length:!1}function Wh(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function by(t){try{return ne.default.coerce(t).version}catch{return null}}function yy(t,e,{range:r,semvers:n,usePre:i,useRel:a,useGreatest:u}={}){let h=by(r),f=0;n=new Set(n),i=Wh(r)||i,i&&(n.add("prerelease"),n.has("patch")&&n.add("prepatch"),n.has("minor")&&n.add("preminor"),n.has("major")&&n.add("premajor"));for(let c of e){let g=ne.default.parse(c);if(g.prerelease.length&&(!i||a))continue;let b=ne.default.diff(h,g.version);if(!(!b||!n.has(b)))if(u||!("time"in t))ne.default.gte(ne.default.coerce(g.version).version,h)&&(h=g.version);else{let m=new Date(t.time[c]).getTime();m>=0&&m>f&&(h=g.version,f=m)}}return h||null}function Oh(t){return ne.default.coerce(t).version}function _y(t,{language:e,range:r,useGreatest:n,useRel:i,usePre:a,semvers:u}={}){var c;if(r==="*"||r.includes("||"))return null;let h=Object.keys(e==="py"?t.releases:t.versions).filter(g=>ne.default.valid(g)),f=yy(t,h,{range:r,semvers:u,usePre:a,useRel:i,useGreatest:n});if(n)return f;{let g;e==="py"?g=Oh(t.info.version):g=t["dist-tags"].latest;let b=Oh(r),m=Wh(r),p=Ji(f),_=Ji(g),R=ne.default.gt(f,b);if(!i&&a||m&&p||i&&!R&&m&&!p||m&&!p&&R)return f;if(m&&!p&&!R)return null;let E=ne.default.diff(b,g);return E&&E!=="prerelease"&&!u.has(E.replace(/^pre/,""))||i&&Ji(g)?f:ne.default.lt(g,b)&&!_?lr===!0||(c=lr==null?void 0:lr.has)!=null&&c.call(lr,t.name)?g:null:g}}async function wy([t,e],{useGreatest:r}={}){var f,c;let n=e.old.replace(ty,""),[i,a,u,h]=ry.exec(n)||[];if(!(!a||!u||!h))if(eo.test(h)){let g={maxSockets:zh},b=fs.UPDATES_GITHUB_API_TOKEN||fs.GITHUB_API_TOKEN||fs.GH_TOKEN||fs.HOMEBREW_GITHUB_API_TOKEN;b&&(g.headers={Authorization:`Bearer ${b}`});let m=`${Ah}/repos/${a}/${u}/commits`;z.verbose&&console.error(`${ls("fetch")} ${m}`);let p=await ur(m,g);if(z.verbose&&(p!=null&&p.ok)&&console.error(`${rr("done")} ${m}`),!p||!p.ok)return;let _=await p.json(),{sha:R,commit:E}=_[0];if(!R||!R.length)return;let A=((f=E==null?void 0:E.committer)==null?void 0:f.date)??((c=E==null?void 0:E.author)==null?void 0:c.date);if(R=R.substring(0,h.length),h!==R){let N=e.old.replace(h,R);return{key:t,newRange:N,user:a,repo:u,oldRef:h,newRef:R,newDate:A}}}else{let g=await ur(`${Ah}/repos/${a}/${u}/git/refs/tags`);if(!g||!g.ok)return;let m=(await g.json()).map(_=>_.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!ne.default.valid(p))return;if(r){let _=h,R=h.replace(/^v/,"");for(let E of m){let A=E.replace(/^v/,"");ne.default.valid(A)&&(!_||ne.default.gt(A,R))&&(_=E,R=A)}if(ne.default.neq(p,R))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=m[m.length-1],R=_.replace(/^v/,"");if(!ne.default.valid(R))return;if(ne.default.neq(p,R))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function Sy(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Ry(t){let e=t.match(Th);return(e==null?void 0:e.length)!==1?t:t.replace(Th,ne.default.coerce(e[0]))}function cr(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}async function Ey(){var T,$,D,H,V,K,ee,oe,Be,xt;for(let v of[process.stdout,process.stderr])($=(T=v==null?void 0:v._handle)==null?void 0:T.setBlocking)==null||$.call(T,!0);let{help:t,version:e,language:r,file:n,types:i,update:a}=z;if(t&&(jb.write(`usage: updates [options]
29
29
 
30
30
  Options:
31
31
  -l, --language <lang> Language to check, either 'js' or 'py'
@@ -43,7 +43,7 @@ Content-Type: ${a.type||"application/octet-stream"}\r
43
43
  -U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not
44
44
  -r, --registry <url> Override npm registry URL
45
45
  -f, --file <path> Use given package file or module directory
46
- -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${Fh}
46
+ -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${qh}
47
47
  -j, --json Output a JSON object
48
48
  -n, --no-color Disable color output
49
49
  -v, --version Print the version
@@ -53,4 +53,4 @@ Content-Type: ${a.type||"application/octet-stream"}\r
53
53
  Examples:
54
54
  $ updates
55
55
  $ updates -u && npm i
56
- `),Yr(0)),e&&(console.info(qh),Yr(0)),r&&!["js","py"].includes(r))throw new Error(`Invalid language: ${r}`);if(n){let v=Gb(n);v==="package.json"?r="js":v==="pyproject.toml"&&(r="py")}r||(r="js");let u;r==="py"?u="pyproject.toml":r==="js"&&(u="package.json");let h;if(n){let v;try{v=Yb(n)}catch(Z){Oe(new Error(`Unable to open ${n}: ${Z.message}`))}v!=null&&v.isFile()?h=n:v!=null&&v.isDirectory()?h=ds(n,u):Oe(new Error(`${n} is neither a file nor directory`))}else{let v=Wb();if(h=zh(u,v),!h)return Oe(new Error(`Unable to find ${u} in ${v} or any of its parent directories`))}let f=Hh(h);try{xe=(await import(ds(f,"updates.config.js"))).default}catch{try{xe=(await import(ds(f,"updates.config.mjs"))).default}catch{}}let c={};if(r==="js"&&(ze["strict-ssl"]===!1&&(c.rejectUnauthorized=!1),"cafile"in ze&&(c.ca=Rh.concat(Ch(Sh(ze.cafile,"utf8")))),"ca"in ze)){let v=Array.isArray(ze.ca)?ze.ca:[ze.ca];c.ca=Rh.concat(v.map(Z=>Ch(Z)))}let g;i?g=Array.isArray(i)?i:i.split(","):"types"in xe&&Array.isArray(xe.types)?g=xe.types:r==="js"?g=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:g=["tool.poetry.dependencies","tool.poetry.group.dev.dependencies"];let b,m;try{m=Sh(h,"utf8")}catch(v){Oe(new Error(`Unable to open ${h}: ${v.message}`))}try{r==="js"?b=JSON.parse(m):b=(0,Bh.default)(m)}catch(v){Oe(new Error(`Error parsing ${h}: ${v.message}`))}let p,_;z.include&&z.include!==!0?p=new Set((Array.isArray(z.include)?z.include:[z.include]).flatMap(v=>v.split(","))):"include"in xe&&Array.isArray(xe.include)&&(p=new Set(xe.include)),z.exclude&&z.exclude!==!0?_=new Set((Array.isArray(z.exclude)?z.exclude:[z.exclude]).flatMap(v=>v.split(","))):"exclude"in xe&&Array.isArray(xe.exclude)&&(_=new Set(xe.exclude));function R(v,Z){var J,le;return!(Z==="py"&&v==="python"||((J=_==null?void 0:_.has)==null?void 0:J.call(_,v))===!0||((le=p==null?void 0:p.has)==null?void 0:le.call(p,v))===!1)}let E={},A={};for(let v of g){let Z;r==="js"?Z=b[v]||{}:Z=bh(b,v)||{};for(let[J,le]of Object.entries(Z))ne.default.validRange(le)&&R(J,r)?E[`${v}${ct}${J}`]={old:Sy(le),oldOriginal:le}:r==="js"&&R(J,r)&&(A[`${v}${ct}${J}`]={old:le})}!Object.keys(E).length&&!Object.keys(A).length&&Oe(p||_?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let N;r==="js"&&(N=ps(z.registry||xe.registry||ze.registry));let $=await Gi(Object.keys(E).map(v=>()=>{let[Z,J]=v.split(ct);return r==="js"?uy(J,Z,N,c):cy(J,Z,c)}),{concurrency:Uh});for(let[v,Z,J,le]of $){if(v!=null&&v.error)throw new Error(v.error);let Ke=typeof ir=="boolean"?ir:ir.has(v.name),Ot=typeof Qi=="boolean"?Qi:Qi.has(v.name),Xe=typeof Ki=="boolean"?Ki:Ki.has(v.name),we;or===!0||(D=or==null?void 0:or.has)!=null&&D.call(or,v.name)?we=sy:ar===!0||(H=ar==null?void 0:ar.has)!=null&&H.call(ar,v.name)?we=iy:we=oy;let ge=`${Z}${ct}${le}`,It=E[ge].old,Me=yy(v,{usePre:Ot,useRel:Xe,useGreatest:Ke,semvers:we,range:It,language:r}),Qr=my(It,Me);if(!Me||It===Qr)delete E[ge];else{E[ge].new=Qr;let Ie=((V=v==null?void 0:v.versions)==null?void 0:V[Me])||v;E[ge].info=hy(Ie,J,v.name),(K=v.time)!=null&&K[Me]?E[ge].age=os(v.time[Me],{noAffix:!0}):(oe=(ee=v.releases)==null?void 0:ee[Me][0])!=null&&oe.upload_time_iso_8601&&(E[ge].age=os((xt=(Be=v.releases)==null?void 0:Be[Me][0])==null?void 0:xt.upload_time_iso_8601,{noAffix:!0}))}}if(Object.keys(A).length){let v=await Promise.all(Object.entries(A).map(([Z,J])=>{let le=Z.split(ct)[1],Ke=typeof ir=="boolean"?ir:ir.has(le);return _y([Z,J],{useGreatest:Ke})}));for(let Z of(v||[]).filter(Boolean)){let{key:J,newRange:le,user:Ke,repo:Ot,oldRef:Xe,newRef:we,newDate:ge}=Z;E[J]={old:A[J].old,new:le,oldPrint:Ji.test(Xe)?Xe.substring(0,7):Xe,newPrint:Ji.test(we)?we.substring(0,7):we,info:`https://github.com/${Ke}/${Ot}`,...ge?{age:os(ge,{noAffix:!0})}:{}}}}Object.keys(E).length||Oe("All dependencies are up to date."),a||Oe(void 0,E);try{fy(h,py(m,E))}catch(v){Oe(new Error(`Error writing ${h}: ${v.message}`))}Oe(rr("\u2728 package.json updated"),E)}Ry().catch(Oe);
56
+ `),Yr(0)),e&&(console.info(Uh),Yr(0)),r&&!["js","py"].includes(r))throw new Error(`Invalid language: ${r}`);if(n){let v=Yb(n);v==="package.json"?r="js":v==="pyproject.toml"&&(r="py")}r||(r="js");let u;r==="py"?u="pyproject.toml":r==="js"&&(u="package.json");let h;if(n){let v;try{v=Qb(n)}catch(Z){Oe(new Error(`Unable to open ${n}: ${Z.message}`))}v!=null&&v.isFile()?h=n:v!=null&&v.isDirectory()?h=ds(n,u):Oe(new Error(`${n} is neither a file nor directory`))}else{let v=Wb();if(h=Mh(u,v),!h)return Oe(new Error(`Unable to find ${u} in ${v} or any of its parent directories`))}let f=Bh(h);try{xe=(await import(ds(f,"updates.config.js"))).default}catch{try{xe=(await import(ds(f,"updates.config.mjs"))).default}catch{}}let c={};if(r==="js"&&(ze["strict-ssl"]===!1&&(c.rejectUnauthorized=!1),"cafile"in ze&&(c.ca=Eh.concat(Ch(Rh(ze.cafile,"utf8")))),"ca"in ze)){let v=Array.isArray(ze.ca)?ze.ca:[ze.ca];c.ca=Eh.concat(v.map(Z=>Ch(Z)))}let g;i?g=Array.isArray(i)?i:i.split(","):"types"in xe&&Array.isArray(xe.types)?g=xe.types:r==="js"?g=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:g=["tool.poetry.dependencies","tool.poetry.group.dev.dependencies"];let b,m;try{m=Rh(h,"utf8")}catch(v){Oe(new Error(`Unable to open ${h}: ${v.message}`))}try{r==="js"?b=JSON.parse(m):b=(0,Fh.default)(m)}catch(v){Oe(new Error(`Error parsing ${h}: ${v.message}`))}let p,_;z.include&&z.include!==!0?p=new Set((Array.isArray(z.include)?z.include:[z.include]).flatMap(v=>v.split(","))):"include"in xe&&Array.isArray(xe.include)&&(p=new Set(xe.include)),z.exclude&&z.exclude!==!0?_=new Set((Array.isArray(z.exclude)?z.exclude:[z.exclude]).flatMap(v=>v.split(","))):"exclude"in xe&&Array.isArray(xe.exclude)&&(_=new Set(xe.exclude));function R(v,Z){var J,le;return!(Z==="py"&&v==="python"||((J=_==null?void 0:_.has)==null?void 0:J.call(_,v))===!0||((le=p==null?void 0:p.has)==null?void 0:le.call(p,v))===!1)}let E={},A={};for(let v of g){let Z;r==="js"?Z=b[v]||{}:Z=yh(b,v)||{};for(let[J,le]of Object.entries(Z))ne.default.validRange(le)&&R(J,r)?E[`${v}${Ke}${J}`]={old:Ry(le),oldOriginal:le}:r==="js"&&R(J,r)&&(A[`${v}${Ke}${J}`]={old:le})}!Object.keys(E).length&&!Object.keys(A).length&&Oe(p||_?new Error("No dependencies match the given include/exclude filters"):"No dependencies present, nothing to do");let N;r==="js"&&(N=ms(z.registry||xe.registry||ze.registry));let L=await Yi(Object.keys(E).map(v=>()=>{let[Z,J]=v.split(Ke);return r==="js"?cy(J,Z,N,c):hy(J,Z,c)}),{concurrency:zh});for(let[v,Z,J,le]of L){if(v!=null&&v.error)throw new Error(v.error);let Xe=typeof ir=="boolean"?ir:ir.has(v.name),Ot=typeof Ki=="boolean"?Ki:Ki.has(v.name),Ze=typeof Xi=="boolean"?Xi:Xi.has(v.name),we;or===!0||(D=or==null?void 0:or.has)!=null&&D.call(or,v.name)?we=iy:ar===!0||(H=ar==null?void 0:ar.has)!=null&&H.call(ar,v.name)?we=oy:we=ay;let ge=`${Z}${Ke}${le}`,It=E[ge].old,Me=_y(v,{usePre:Ot,useRel:Ze,useGreatest:Xe,semvers:we,range:It,language:r}),Qr=gy(It,Me);if(!Me||It===Qr)delete E[ge];else{E[ge].new=Qr;let Ie=((V=v==null?void 0:v.versions)==null?void 0:V[Me])||v;E[ge].info=fy(Ie,J,v.name),(K=v.time)!=null&&K[Me]?E[ge].age=os(v.time[Me],{noAffix:!0}):(oe=(ee=v.releases)==null?void 0:ee[Me][0])!=null&&oe.upload_time_iso_8601&&(E[ge].age=os((xt=(Be=v.releases)==null?void 0:Be[Me][0])==null?void 0:xt.upload_time_iso_8601,{noAffix:!0}))}}if(Object.keys(A).length){let v=await Promise.all(Object.entries(A).map(([Z,J])=>{let le=Z.split(Ke)[1],Xe=typeof ir=="boolean"?ir:ir.has(le);return wy([Z,J],{useGreatest:Xe})}));for(let Z of(v||[]).filter(Boolean)){let{key:J,newRange:le,user:Xe,repo:Ot,oldRef:Ze,newRef:we,newDate:ge}=Z;E[J]={old:A[J].old,new:le,oldPrint:eo.test(Ze)?Ze.substring(0,7):Ze,newPrint:eo.test(we)?we.substring(0,7):we,info:`https://github.com/${Xe}/${Ot}`,...ge?{age:os(ge,{noAffix:!0})}:{}}}}Object.keys(E).length||Oe("All dependencies are up to date."),a||Oe(void 0,E);try{r==="js"?vh(h,py(m,E)):vh(h,my(m,E))}catch(v){Oe(new Error(`Error writing ${h}: ${v.message}`))}Oe(rr(`\u2728 ${h} updated`),E)}Ey().catch(Oe);