pipane 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{g as KA,c as ut,t as Dt,a as ct}from"./index-DQxrqu4K.js";import{c as ht,d as lt,e as wt}from"./_node-stub_stream-DDexIdn_.js";function ZA(l,d){for(var w=0;w<d.length;w++){const h=d[w];if(typeof h!="string"&&!Array.isArray(h)){for(const y in h)if(y!=="default"&&!(y in l)){const g=Object.getOwnPropertyDescriptor(h,y);g&&Object.defineProperty(l,y,g.get?g:{enumerable:!0,get:()=>h[y]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}var _A={};const fI=KA(ht),yI=KA(lt),Ze=new Proxy({},{get(l,d){return d==="__esModule"?!0:new Proxy(function(){},{get:()=>()=>{},apply:()=>({})})}}),ft=ZA({__proto__:null,default:Ze},[Ze]),Yg=KA(ft);var De,Xe;function yt(){if(Xe)return De;Xe=1;const l=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,w=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new g}abort(s=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||s,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},h=typeof AbortSignal=="function",y=typeof w.AbortSignal=="function",g=h?AbortSignal:y?w.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(s){s.type==="abort"&&(this.aborted=!0,this.onabort(s),this._listeners.forEach(a=>a(s),this))}onabort(){}addEventListener(s,a){s==="abort"&&this._listeners.push(a)}removeEventListener(s,a){s==="abort"&&(this._listeners=this._listeners.filter(D=>D!==a))}},n=new Set,u=(o,s)=>{const a=`LRU_CACHE_OPTION_${o}`;Q(a)&&I(a,`${o} option`,`options.${s}`,E)},t=(o,s)=>{const a=`LRU_CACHE_METHOD_${o}`;if(Q(a)){const{prototype:D}=E,{get:f}=Object.getOwnPropertyDescriptor(D,o);I(a,`${o} method`,`cache.${s}()`,f)}},A=(o,s)=>{const a=`LRU_CACHE_PROPERTY_${o}`;if(Q(a)){const{prototype:D}=E,{get:f}=Object.getOwnPropertyDescriptor(D,o);I(a,`${o} property`,`cache.${s}`,f)}},C=(...o)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...o):console.error(...o)},Q=o=>!n.has(o),I=(o,s,a,D)=>{n.add(o);const f=`The ${s} is deprecated. Please use ${a} instead.`;C(f,"DeprecationWarning",o,D)},r=o=>o&&o===Math.floor(o)&&o>0&&isFinite(o),i=o=>r(o)?o<=Math.pow(2,8)?Uint8Array:o<=Math.pow(2,16)?Uint16Array:o<=Math.pow(2,32)?Uint32Array:o<=Number.MAX_SAFE_INTEGER?e:null:null;class e extends Array{constructor(s){super(s),this.fill(0)}}class B{constructor(s){if(s===0)return[];const a=i(s);this.heap=new a(s),this.length=0}push(s){this.heap[this.length++]=s}pop(){return this.heap[--this.length]}}class E{constructor(s={}){const{max:a=0,ttl:D,ttlResolution:f=1,ttlAutopurge:F,updateAgeOnGet:S,updateAgeOnHas:p,allowStale:G,dispose:N,disposeAfter:m,noDisposeOnSet:J,noUpdateTTL:v,maxSize:X=0,maxEntrySize:CA=0,sizeCalculation:z,fetchMethod:j,fetchContext:iA,noDeleteOnFetchRejection:aA,noDeleteOnStaleGet:uA,allowStaleOnFetchRejection:Z,allowStaleOnFetchAbort:SA,ignoreFetchAbort:UA}=s,{length:FA,maxAge:QA,stale:yA}=s instanceof E?{}:s;if(a!==0&&!r(a))throw new TypeError("max option must be a nonnegative integer");const HA=a?i(a):Array;if(!HA)throw new Error("invalid max value: "+a);if(this.max=a,this.maxSize=X,this.maxEntrySize=CA||this.maxSize,this.sizeCalculation=z||FA,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=j||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=iA,!this.fetchMethod&&iA!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(a).fill(null),this.valList=new Array(a).fill(null),this.next=new HA(a),this.prev=new HA(a),this.head=0,this.tail=0,this.free=new B(a),this.initialFill=1,this.size=0,typeof N=="function"&&(this.dispose=N),typeof m=="function"?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!J,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!aA,this.allowStaleOnFetchRejection=!!Z,this.allowStaleOnFetchAbort=!!SA,this.ignoreFetchAbort=!!UA,this.maxEntrySize!==0){if(this.maxSize!==0&&!r(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!r(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!G||!!yA,this.noDeleteOnStaleGet=!!uA,this.updateAgeOnGet=!!S,this.updateAgeOnHas=!!p,this.ttlResolution=r(f)||f===0?f:1,this.ttlAutopurge=!!F,this.ttl=D||QA||0,this.ttl){if(!r(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){const XA="LRU_CACHE_UNBOUNDED";Q(XA)&&(n.add(XA),C("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",XA,E))}yA&&u("stale","allowStale"),QA&&u("maxAge","ttl"),FA&&u("length","sizeCalculation")}getRemainingTTL(s){return this.has(s,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new e(this.max),this.starts=new e(this.max),this.setItemTTL=(D,f,F=l.now())=>{if(this.starts[D]=f!==0?F:0,this.ttls[D]=f,f!==0&&this.ttlAutopurge){const S=setTimeout(()=>{this.isStale(D)&&this.delete(this.keyList[D])},f+1);S.unref&&S.unref()}},this.updateItemAge=D=>{this.starts[D]=this.ttls[D]!==0?l.now():0},this.statusTTL=(D,f)=>{D&&(D.ttl=this.ttls[f],D.start=this.starts[f],D.now=s||a(),D.remainingTTL=D.now+D.ttl-D.start)};let s=0;const a=()=>{const D=l.now();if(this.ttlResolution>0){s=D;const f=setTimeout(()=>s=0,this.ttlResolution);f.unref&&f.unref()}return D};this.getRemainingTTL=D=>{const f=this.keyMap.get(D);return f===void 0?0:this.ttls[f]===0||this.starts[f]===0?1/0:this.starts[f]+this.ttls[f]-(s||a())},this.isStale=D=>this.ttls[D]!==0&&this.starts[D]!==0&&(s||a())-this.starts[D]>this.ttls[D]}updateItemAge(s){}statusTTL(s,a){}setItemTTL(s,a,D){}isStale(s){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new e(this.max),this.removeItemSize=s=>{this.calculatedSize-=this.sizes[s],this.sizes[s]=0},this.requireSize=(s,a,D,f)=>{if(this.isBackgroundFetch(a))return 0;if(!r(D))if(f){if(typeof f!="function")throw new TypeError("sizeCalculation must be a function");if(D=f(a,s),!r(D))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 D},this.addItemSize=(s,a,D)=>{if(this.sizes[s]=a,this.maxSize){const f=this.maxSize-this.sizes[s];for(;this.calculatedSize>f;)this.evict(!0)}this.calculatedSize+=this.sizes[s],D&&(D.entrySize=a,D.totalCalculatedSize=this.calculatedSize)}}removeItemSize(s){}addItemSize(s,a){}requireSize(s,a,D,f){if(D||f)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:s=this.allowStale}={}){if(this.size)for(let a=this.tail;!(!this.isValidIndex(a)||((s||!this.isStale(a))&&(yield a),a===this.head));)a=this.prev[a]}*rindexes({allowStale:s=this.allowStale}={}){if(this.size)for(let a=this.head;!(!this.isValidIndex(a)||((s||!this.isStale(a))&&(yield a),a===this.tail));)a=this.next[a]}isValidIndex(s){return s!==void 0&&this.keyMap.get(this.keyList[s])===s}*entries(){for(const s of this.indexes())this.valList[s]!==void 0&&this.keyList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield[this.keyList[s],this.valList[s]])}*rentries(){for(const s of this.rindexes())this.valList[s]!==void 0&&this.keyList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield[this.keyList[s],this.valList[s]])}*keys(){for(const s of this.indexes())this.keyList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield this.keyList[s])}*rkeys(){for(const s of this.rindexes())this.keyList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield this.keyList[s])}*values(){for(const s of this.indexes())this.valList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield this.valList[s])}*rvalues(){for(const s of this.rindexes())this.valList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield this.valList[s])}[Symbol.iterator](){return this.entries()}find(s,a){for(const D of this.indexes()){const f=this.valList[D],F=this.isBackgroundFetch(f)?f.__staleWhileFetching:f;if(F!==void 0&&s(F,this.keyList[D],this))return this.get(this.keyList[D],a)}}forEach(s,a=this){for(const D of this.indexes()){const f=this.valList[D],F=this.isBackgroundFetch(f)?f.__staleWhileFetching:f;F!==void 0&&s.call(a,F,this.keyList[D],this)}}rforEach(s,a=this){for(const D of this.rindexes()){const f=this.valList[D],F=this.isBackgroundFetch(f)?f.__staleWhileFetching:f;F!==void 0&&s.call(a,F,this.keyList[D],this)}}get prune(){return t("prune","purgeStale"),this.purgeStale}purgeStale(){let s=!1;for(const a of this.rindexes({allowStale:!0}))this.isStale(a)&&(this.delete(this.keyList[a]),s=!0);return s}dump(){const s=[];for(const a of this.indexes({allowStale:!0})){const D=this.keyList[a],f=this.valList[a],F=this.isBackgroundFetch(f)?f.__staleWhileFetching:f;if(F===void 0)continue;const S={value:F};if(this.ttls){S.ttl=this.ttls[a];const p=l.now()-this.starts[a];S.start=Math.floor(Date.now()-p)}this.sizes&&(S.size=this.sizes[a]),s.unshift([D,S])}return s}load(s){this.clear();for(const[a,D]of s){if(D.start){const f=Date.now()-D.start;D.start=l.now()-f}this.set(a,D.value,D)}}dispose(s,a,D){}set(s,a,{ttl:D=this.ttl,start:f,noDisposeOnSet:F=this.noDisposeOnSet,size:S=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:G=this.noUpdateTTL,status:N}={}){if(S=this.requireSize(s,a,S,p),this.maxEntrySize&&S>this.maxEntrySize)return N&&(N.set="miss",N.maxEntrySizeExceeded=!0),this.delete(s),this;let m=this.size===0?void 0:this.keyMap.get(s);if(m===void 0)m=this.newIndex(),this.keyList[m]=s,this.valList[m]=a,this.keyMap.set(s,m),this.next[this.tail]=m,this.prev[m]=this.tail,this.tail=m,this.size++,this.addItemSize(m,S,N),N&&(N.set="add"),G=!1;else{this.moveToTail(m);const J=this.valList[m];if(a!==J){if(this.isBackgroundFetch(J)?J.__abortController.abort(new Error("replaced")):F||(this.dispose(J,s,"set"),this.disposeAfter&&this.disposed.push([J,s,"set"])),this.removeItemSize(m),this.valList[m]=a,this.addItemSize(m,S,N),N){N.set="replace";const v=J&&this.isBackgroundFetch(J)?J.__staleWhileFetching:J;v!==void 0&&(N.oldValue=v)}}else N&&(N.set="update")}if(D!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),G||this.setItemTTL(m,D,f),this.statusTTL(N,m),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){const s=this.valList[this.head];return this.evict(!0),s}}evict(s){const a=this.head,D=this.keyList[a],f=this.valList[a];return this.isBackgroundFetch(f)?f.__abortController.abort(new Error("evicted")):(this.dispose(f,D,"evict"),this.disposeAfter&&this.disposed.push([f,D,"evict"])),this.removeItemSize(a),s&&(this.keyList[a]=null,this.valList[a]=null,this.free.push(a)),this.head=this.next[a],this.keyMap.delete(D),this.size--,a}has(s,{updateAgeOnHas:a=this.updateAgeOnHas,status:D}={}){const f=this.keyMap.get(s);if(f!==void 0)if(this.isStale(f))D&&(D.has="stale",this.statusTTL(D,f));else return a&&this.updateItemAge(f),D&&(D.has="hit"),this.statusTTL(D,f),!0;else D&&(D.has="miss");return!1}peek(s,{allowStale:a=this.allowStale}={}){const D=this.keyMap.get(s);if(D!==void 0&&(a||!this.isStale(D))){const f=this.valList[D];return this.isBackgroundFetch(f)?f.__staleWhileFetching:f}}backgroundFetch(s,a,D,f){const F=a===void 0?void 0:this.valList[a];if(this.isBackgroundFetch(F))return F;const S=new w;D.signal&&D.signal.addEventListener("abort",()=>S.abort(D.signal.reason));const p={signal:S.signal,options:D,context:f},G=(X,CA=!1)=>{const{aborted:z}=S.signal,j=D.ignoreFetchAbort&&X!==void 0;return D.status&&(z&&!CA?(D.status.fetchAborted=!0,D.status.fetchError=S.signal.reason,j&&(D.status.fetchAbortIgnored=!0)):D.status.fetchResolved=!0),z&&!j&&!CA?m(S.signal.reason):(this.valList[a]===v&&(X===void 0?v.__staleWhileFetching?this.valList[a]=v.__staleWhileFetching:this.delete(s):(D.status&&(D.status.fetchUpdated=!0),this.set(s,X,p.options))),X)},N=X=>(D.status&&(D.status.fetchRejected=!0,D.status.fetchError=X),m(X)),m=X=>{const{aborted:CA}=S.signal,z=CA&&D.allowStaleOnFetchAbort,j=z||D.allowStaleOnFetchRejection,iA=j||D.noDeleteOnFetchRejection;if(this.valList[a]===v&&(!iA||v.__staleWhileFetching===void 0?this.delete(s):z||(this.valList[a]=v.__staleWhileFetching)),j)return D.status&&v.__staleWhileFetching!==void 0&&(D.status.returnedStale=!0),v.__staleWhileFetching;if(v.__returned===v)throw X},J=(X,CA)=>{this.fetchMethod(s,F,p).then(z=>X(z),CA),S.signal.addEventListener("abort",()=>{(!D.ignoreFetchAbort||D.allowStaleOnFetchAbort)&&(X(),D.allowStaleOnFetchAbort&&(X=z=>G(z,!0)))})};D.status&&(D.status.fetchDispatched=!0);const v=new Promise(J).then(G,N);return v.__abortController=S,v.__staleWhileFetching=F,v.__returned=null,a===void 0?(this.set(s,v,{...p.options,status:void 0}),a=this.keyMap.get(s)):this.valList[a]=v,v}isBackgroundFetch(s){return s&&typeof s=="object"&&typeof s.then=="function"&&Object.prototype.hasOwnProperty.call(s,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(s,"__returned")&&(s.__returned===s||s.__returned===null)}async fetch(s,{allowStale:a=this.allowStale,updateAgeOnGet:D=this.updateAgeOnGet,noDeleteOnStaleGet:f=this.noDeleteOnStaleGet,ttl:F=this.ttl,noDisposeOnSet:S=this.noDisposeOnSet,size:p=0,sizeCalculation:G=this.sizeCalculation,noUpdateTTL:N=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:J=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:X=this.allowStaleOnFetchAbort,fetchContext:CA=this.fetchContext,forceRefresh:z=!1,status:j,signal:iA}={}){if(!this.fetchMethod)return j&&(j.fetch="get"),this.get(s,{allowStale:a,updateAgeOnGet:D,noDeleteOnStaleGet:f,status:j});const aA={allowStale:a,updateAgeOnGet:D,noDeleteOnStaleGet:f,ttl:F,noDisposeOnSet:S,size:p,sizeCalculation:G,noUpdateTTL:N,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:J,allowStaleOnFetchAbort:X,ignoreFetchAbort:v,status:j,signal:iA};let uA=this.keyMap.get(s);if(uA===void 0){j&&(j.fetch="miss");const Z=this.backgroundFetch(s,uA,aA,CA);return Z.__returned=Z}else{const Z=this.valList[uA];if(this.isBackgroundFetch(Z)){const yA=a&&Z.__staleWhileFetching!==void 0;return j&&(j.fetch="inflight",yA&&(j.returnedStale=!0)),yA?Z.__staleWhileFetching:Z.__returned=Z}const SA=this.isStale(uA);if(!z&&!SA)return j&&(j.fetch="hit"),this.moveToTail(uA),D&&this.updateItemAge(uA),this.statusTTL(j,uA),Z;const UA=this.backgroundFetch(s,uA,aA,CA),FA=UA.__staleWhileFetching!==void 0,QA=FA&&a;return j&&(j.fetch=FA&&SA?"stale":"refresh",QA&&SA&&(j.returnedStale=!0)),QA?UA.__staleWhileFetching:UA.__returned=UA}}get(s,{allowStale:a=this.allowStale,updateAgeOnGet:D=this.updateAgeOnGet,noDeleteOnStaleGet:f=this.noDeleteOnStaleGet,status:F}={}){const S=this.keyMap.get(s);if(S!==void 0){const p=this.valList[S],G=this.isBackgroundFetch(p);return this.statusTTL(F,S),this.isStale(S)?(F&&(F.get="stale"),G?(F&&(F.returnedStale=a&&p.__staleWhileFetching!==void 0),a?p.__staleWhileFetching:void 0):(f||this.delete(s),F&&(F.returnedStale=a),a?p:void 0)):(F&&(F.get="hit"),G?p.__staleWhileFetching:(this.moveToTail(S),D&&this.updateItemAge(S),p))}else F&&(F.get="miss")}connect(s,a){this.prev[a]=s,this.next[s]=a}moveToTail(s){s!==this.tail&&(s===this.head?this.head=this.next[s]:this.connect(this.prev[s],this.next[s]),this.connect(this.tail,s),this.tail=s)}get del(){return t("del","delete"),this.delete}delete(s){let a=!1;if(this.size!==0){const D=this.keyMap.get(s);if(D!==void 0)if(a=!0,this.size===1)this.clear();else{this.removeItemSize(D);const f=this.valList[D];this.isBackgroundFetch(f)?f.__abortController.abort(new Error("deleted")):(this.dispose(f,s,"delete"),this.disposeAfter&&this.disposed.push([f,s,"delete"])),this.keyMap.delete(s),this.keyList[D]=null,this.valList[D]=null,D===this.tail?this.tail=this.prev[D]:D===this.head?this.head=this.next[D]:(this.next[this.prev[D]]=this.next[D],this.prev[this.next[D]]=this.prev[D]),this.size--,this.free.push(D)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return a}clear(){for(const s of this.rindexes({allowStale:!0})){const a=this.valList[s];if(this.isBackgroundFetch(a))a.__abortController.abort(new Error("deleted"));else{const D=this.keyList[s];this.dispose(a,D,"delete"),this.disposeAfter&&this.disposed.push([a,D,"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 t("reset","clear"),this.clear}get length(){return A("length","size"),this.size}static get AbortController(){return w}static get AbortSignal(){return g}}return De=E,De}var jA={};const _e=new Proxy({},{get(l,d){return d==="__esModule"?!0:new Proxy(function(){},{get:()=>()=>{},apply:()=>({})})}}),dt=ZA({__proto__:null,default:_e},[_e]),Dg=KA(dt);var xA={},je;function Ft(){if(je)return xA;je=1;var l=xA&&xA.__createBinding||(Object.create?(function(t,A,C,Q){Q===void 0&&(Q=C);var I=Object.getOwnPropertyDescriptor(A,C);(!I||("get"in I?!A.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return A[C]}}),Object.defineProperty(t,Q,I)}):(function(t,A,C,Q){Q===void 0&&(Q=C),t[Q]=A[C]})),d=xA&&xA.__setModuleDefault||(Object.create?(function(t,A){Object.defineProperty(t,"default",{enumerable:!0,value:A})}):function(t,A){t.default=A}),w=xA&&xA.__importStar||function(t){if(t&&t.__esModule)return t;var A={};if(t!=null)for(var C in t)C!=="default"&&Object.prototype.hasOwnProperty.call(t,C)&&l(A,t,C);return d(A,t),A};Object.defineProperty(xA,"__esModule",{value:!0}),xA.req=xA.json=xA.toBuffer=void 0;const h=w(fI),y=w(yI);async function g(t){let A=0;const C=[];for await(const Q of t)A+=Q.length,C.push(Q);return Buffer.concat(C,A)}xA.toBuffer=g;async function n(t){const C=(await g(t)).toString("utf8");try{return JSON.parse(C)}catch(Q){const I=Q;throw I.message+=` (input: ${C})`,I}}xA.json=n;function u(t,A={}){const Q=((typeof t=="string"?t:t.href).startsWith("https:")?y:h).request(t,A),I=new Promise((r,i)=>{Q.once("response",r).once("error",i).end()});return Q.then=I.then.bind(I),Q}return xA.req=u,xA}var ze;function dI(){return ze||(ze=1,(function(l){var d=jA&&jA.__createBinding||(Object.create?(function(C,Q,I,r){r===void 0&&(r=I);var i=Object.getOwnPropertyDescriptor(Q,I);(!i||("get"in i?!Q.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return Q[I]}}),Object.defineProperty(C,r,i)}):(function(C,Q,I,r){r===void 0&&(r=I),C[r]=Q[I]})),w=jA&&jA.__setModuleDefault||(Object.create?(function(C,Q){Object.defineProperty(C,"default",{enumerable:!0,value:Q})}):function(C,Q){C.default=Q}),h=jA&&jA.__importStar||function(C){if(C&&C.__esModule)return C;var Q={};if(C!=null)for(var I in C)I!=="default"&&Object.prototype.hasOwnProperty.call(C,I)&&d(Q,C,I);return w(Q,C),Q},y=jA&&jA.__exportStar||function(C,Q){for(var I in C)I!=="default"&&!Object.prototype.hasOwnProperty.call(Q,I)&&d(Q,C,I)};Object.defineProperty(l,"__esModule",{value:!0}),l.Agent=void 0;const g=h(Dg),n=h(fI),u=yI;y(Ft(),l);const t=Symbol("AgentBaseInternalState");class A extends n.Agent{constructor(Q){super(Q),this[t]={}}isSecureEndpoint(Q){if(Q){if(typeof Q.secureEndpoint=="boolean")return Q.secureEndpoint;if(typeof Q.protocol=="string")return Q.protocol==="https:"}const{stack:I}=new Error;return typeof I!="string"?!1:I.split(`
1
+ import{g as KA,c as ut,t as Dt,a as ct}from"./index-Cp2vV6HJ.js";import{c as ht,d as lt,e as wt}from"./_node-stub_stream-DDexIdn_.js";function ZA(l,d){for(var w=0;w<d.length;w++){const h=d[w];if(typeof h!="string"&&!Array.isArray(h)){for(const y in h)if(y!=="default"&&!(y in l)){const g=Object.getOwnPropertyDescriptor(h,y);g&&Object.defineProperty(l,y,g.get?g:{enumerable:!0,get:()=>h[y]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}var _A={};const fI=KA(ht),yI=KA(lt),Ze=new Proxy({},{get(l,d){return d==="__esModule"?!0:new Proxy(function(){},{get:()=>()=>{},apply:()=>({})})}}),ft=ZA({__proto__:null,default:Ze},[Ze]),Yg=KA(ft);var De,Xe;function yt(){if(Xe)return De;Xe=1;const l=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,w=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new g}abort(s=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||s,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},h=typeof AbortSignal=="function",y=typeof w.AbortSignal=="function",g=h?AbortSignal:y?w.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(s){s.type==="abort"&&(this.aborted=!0,this.onabort(s),this._listeners.forEach(a=>a(s),this))}onabort(){}addEventListener(s,a){s==="abort"&&this._listeners.push(a)}removeEventListener(s,a){s==="abort"&&(this._listeners=this._listeners.filter(D=>D!==a))}},n=new Set,u=(o,s)=>{const a=`LRU_CACHE_OPTION_${o}`;Q(a)&&I(a,`${o} option`,`options.${s}`,E)},t=(o,s)=>{const a=`LRU_CACHE_METHOD_${o}`;if(Q(a)){const{prototype:D}=E,{get:f}=Object.getOwnPropertyDescriptor(D,o);I(a,`${o} method`,`cache.${s}()`,f)}},A=(o,s)=>{const a=`LRU_CACHE_PROPERTY_${o}`;if(Q(a)){const{prototype:D}=E,{get:f}=Object.getOwnPropertyDescriptor(D,o);I(a,`${o} property`,`cache.${s}`,f)}},C=(...o)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...o):console.error(...o)},Q=o=>!n.has(o),I=(o,s,a,D)=>{n.add(o);const f=`The ${s} is deprecated. Please use ${a} instead.`;C(f,"DeprecationWarning",o,D)},r=o=>o&&o===Math.floor(o)&&o>0&&isFinite(o),i=o=>r(o)?o<=Math.pow(2,8)?Uint8Array:o<=Math.pow(2,16)?Uint16Array:o<=Math.pow(2,32)?Uint32Array:o<=Number.MAX_SAFE_INTEGER?e:null:null;class e extends Array{constructor(s){super(s),this.fill(0)}}class B{constructor(s){if(s===0)return[];const a=i(s);this.heap=new a(s),this.length=0}push(s){this.heap[this.length++]=s}pop(){return this.heap[--this.length]}}class E{constructor(s={}){const{max:a=0,ttl:D,ttlResolution:f=1,ttlAutopurge:F,updateAgeOnGet:S,updateAgeOnHas:p,allowStale:G,dispose:N,disposeAfter:m,noDisposeOnSet:J,noUpdateTTL:v,maxSize:X=0,maxEntrySize:CA=0,sizeCalculation:z,fetchMethod:j,fetchContext:iA,noDeleteOnFetchRejection:aA,noDeleteOnStaleGet:uA,allowStaleOnFetchRejection:Z,allowStaleOnFetchAbort:SA,ignoreFetchAbort:UA}=s,{length:FA,maxAge:QA,stale:yA}=s instanceof E?{}:s;if(a!==0&&!r(a))throw new TypeError("max option must be a nonnegative integer");const HA=a?i(a):Array;if(!HA)throw new Error("invalid max value: "+a);if(this.max=a,this.maxSize=X,this.maxEntrySize=CA||this.maxSize,this.sizeCalculation=z||FA,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=j||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=iA,!this.fetchMethod&&iA!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(a).fill(null),this.valList=new Array(a).fill(null),this.next=new HA(a),this.prev=new HA(a),this.head=0,this.tail=0,this.free=new B(a),this.initialFill=1,this.size=0,typeof N=="function"&&(this.dispose=N),typeof m=="function"?(this.disposeAfter=m,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!J,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!aA,this.allowStaleOnFetchRejection=!!Z,this.allowStaleOnFetchAbort=!!SA,this.ignoreFetchAbort=!!UA,this.maxEntrySize!==0){if(this.maxSize!==0&&!r(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!r(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!G||!!yA,this.noDeleteOnStaleGet=!!uA,this.updateAgeOnGet=!!S,this.updateAgeOnHas=!!p,this.ttlResolution=r(f)||f===0?f:1,this.ttlAutopurge=!!F,this.ttl=D||QA||0,this.ttl){if(!r(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){const XA="LRU_CACHE_UNBOUNDED";Q(XA)&&(n.add(XA),C("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",XA,E))}yA&&u("stale","allowStale"),QA&&u("maxAge","ttl"),FA&&u("length","sizeCalculation")}getRemainingTTL(s){return this.has(s,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new e(this.max),this.starts=new e(this.max),this.setItemTTL=(D,f,F=l.now())=>{if(this.starts[D]=f!==0?F:0,this.ttls[D]=f,f!==0&&this.ttlAutopurge){const S=setTimeout(()=>{this.isStale(D)&&this.delete(this.keyList[D])},f+1);S.unref&&S.unref()}},this.updateItemAge=D=>{this.starts[D]=this.ttls[D]!==0?l.now():0},this.statusTTL=(D,f)=>{D&&(D.ttl=this.ttls[f],D.start=this.starts[f],D.now=s||a(),D.remainingTTL=D.now+D.ttl-D.start)};let s=0;const a=()=>{const D=l.now();if(this.ttlResolution>0){s=D;const f=setTimeout(()=>s=0,this.ttlResolution);f.unref&&f.unref()}return D};this.getRemainingTTL=D=>{const f=this.keyMap.get(D);return f===void 0?0:this.ttls[f]===0||this.starts[f]===0?1/0:this.starts[f]+this.ttls[f]-(s||a())},this.isStale=D=>this.ttls[D]!==0&&this.starts[D]!==0&&(s||a())-this.starts[D]>this.ttls[D]}updateItemAge(s){}statusTTL(s,a){}setItemTTL(s,a,D){}isStale(s){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new e(this.max),this.removeItemSize=s=>{this.calculatedSize-=this.sizes[s],this.sizes[s]=0},this.requireSize=(s,a,D,f)=>{if(this.isBackgroundFetch(a))return 0;if(!r(D))if(f){if(typeof f!="function")throw new TypeError("sizeCalculation must be a function");if(D=f(a,s),!r(D))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 D},this.addItemSize=(s,a,D)=>{if(this.sizes[s]=a,this.maxSize){const f=this.maxSize-this.sizes[s];for(;this.calculatedSize>f;)this.evict(!0)}this.calculatedSize+=this.sizes[s],D&&(D.entrySize=a,D.totalCalculatedSize=this.calculatedSize)}}removeItemSize(s){}addItemSize(s,a){}requireSize(s,a,D,f){if(D||f)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:s=this.allowStale}={}){if(this.size)for(let a=this.tail;!(!this.isValidIndex(a)||((s||!this.isStale(a))&&(yield a),a===this.head));)a=this.prev[a]}*rindexes({allowStale:s=this.allowStale}={}){if(this.size)for(let a=this.head;!(!this.isValidIndex(a)||((s||!this.isStale(a))&&(yield a),a===this.tail));)a=this.next[a]}isValidIndex(s){return s!==void 0&&this.keyMap.get(this.keyList[s])===s}*entries(){for(const s of this.indexes())this.valList[s]!==void 0&&this.keyList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield[this.keyList[s],this.valList[s]])}*rentries(){for(const s of this.rindexes())this.valList[s]!==void 0&&this.keyList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield[this.keyList[s],this.valList[s]])}*keys(){for(const s of this.indexes())this.keyList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield this.keyList[s])}*rkeys(){for(const s of this.rindexes())this.keyList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield this.keyList[s])}*values(){for(const s of this.indexes())this.valList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield this.valList[s])}*rvalues(){for(const s of this.rindexes())this.valList[s]!==void 0&&!this.isBackgroundFetch(this.valList[s])&&(yield this.valList[s])}[Symbol.iterator](){return this.entries()}find(s,a){for(const D of this.indexes()){const f=this.valList[D],F=this.isBackgroundFetch(f)?f.__staleWhileFetching:f;if(F!==void 0&&s(F,this.keyList[D],this))return this.get(this.keyList[D],a)}}forEach(s,a=this){for(const D of this.indexes()){const f=this.valList[D],F=this.isBackgroundFetch(f)?f.__staleWhileFetching:f;F!==void 0&&s.call(a,F,this.keyList[D],this)}}rforEach(s,a=this){for(const D of this.rindexes()){const f=this.valList[D],F=this.isBackgroundFetch(f)?f.__staleWhileFetching:f;F!==void 0&&s.call(a,F,this.keyList[D],this)}}get prune(){return t("prune","purgeStale"),this.purgeStale}purgeStale(){let s=!1;for(const a of this.rindexes({allowStale:!0}))this.isStale(a)&&(this.delete(this.keyList[a]),s=!0);return s}dump(){const s=[];for(const a of this.indexes({allowStale:!0})){const D=this.keyList[a],f=this.valList[a],F=this.isBackgroundFetch(f)?f.__staleWhileFetching:f;if(F===void 0)continue;const S={value:F};if(this.ttls){S.ttl=this.ttls[a];const p=l.now()-this.starts[a];S.start=Math.floor(Date.now()-p)}this.sizes&&(S.size=this.sizes[a]),s.unshift([D,S])}return s}load(s){this.clear();for(const[a,D]of s){if(D.start){const f=Date.now()-D.start;D.start=l.now()-f}this.set(a,D.value,D)}}dispose(s,a,D){}set(s,a,{ttl:D=this.ttl,start:f,noDisposeOnSet:F=this.noDisposeOnSet,size:S=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:G=this.noUpdateTTL,status:N}={}){if(S=this.requireSize(s,a,S,p),this.maxEntrySize&&S>this.maxEntrySize)return N&&(N.set="miss",N.maxEntrySizeExceeded=!0),this.delete(s),this;let m=this.size===0?void 0:this.keyMap.get(s);if(m===void 0)m=this.newIndex(),this.keyList[m]=s,this.valList[m]=a,this.keyMap.set(s,m),this.next[this.tail]=m,this.prev[m]=this.tail,this.tail=m,this.size++,this.addItemSize(m,S,N),N&&(N.set="add"),G=!1;else{this.moveToTail(m);const J=this.valList[m];if(a!==J){if(this.isBackgroundFetch(J)?J.__abortController.abort(new Error("replaced")):F||(this.dispose(J,s,"set"),this.disposeAfter&&this.disposed.push([J,s,"set"])),this.removeItemSize(m),this.valList[m]=a,this.addItemSize(m,S,N),N){N.set="replace";const v=J&&this.isBackgroundFetch(J)?J.__staleWhileFetching:J;v!==void 0&&(N.oldValue=v)}}else N&&(N.set="update")}if(D!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),G||this.setItemTTL(m,D,f),this.statusTTL(N,m),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){const s=this.valList[this.head];return this.evict(!0),s}}evict(s){const a=this.head,D=this.keyList[a],f=this.valList[a];return this.isBackgroundFetch(f)?f.__abortController.abort(new Error("evicted")):(this.dispose(f,D,"evict"),this.disposeAfter&&this.disposed.push([f,D,"evict"])),this.removeItemSize(a),s&&(this.keyList[a]=null,this.valList[a]=null,this.free.push(a)),this.head=this.next[a],this.keyMap.delete(D),this.size--,a}has(s,{updateAgeOnHas:a=this.updateAgeOnHas,status:D}={}){const f=this.keyMap.get(s);if(f!==void 0)if(this.isStale(f))D&&(D.has="stale",this.statusTTL(D,f));else return a&&this.updateItemAge(f),D&&(D.has="hit"),this.statusTTL(D,f),!0;else D&&(D.has="miss");return!1}peek(s,{allowStale:a=this.allowStale}={}){const D=this.keyMap.get(s);if(D!==void 0&&(a||!this.isStale(D))){const f=this.valList[D];return this.isBackgroundFetch(f)?f.__staleWhileFetching:f}}backgroundFetch(s,a,D,f){const F=a===void 0?void 0:this.valList[a];if(this.isBackgroundFetch(F))return F;const S=new w;D.signal&&D.signal.addEventListener("abort",()=>S.abort(D.signal.reason));const p={signal:S.signal,options:D,context:f},G=(X,CA=!1)=>{const{aborted:z}=S.signal,j=D.ignoreFetchAbort&&X!==void 0;return D.status&&(z&&!CA?(D.status.fetchAborted=!0,D.status.fetchError=S.signal.reason,j&&(D.status.fetchAbortIgnored=!0)):D.status.fetchResolved=!0),z&&!j&&!CA?m(S.signal.reason):(this.valList[a]===v&&(X===void 0?v.__staleWhileFetching?this.valList[a]=v.__staleWhileFetching:this.delete(s):(D.status&&(D.status.fetchUpdated=!0),this.set(s,X,p.options))),X)},N=X=>(D.status&&(D.status.fetchRejected=!0,D.status.fetchError=X),m(X)),m=X=>{const{aborted:CA}=S.signal,z=CA&&D.allowStaleOnFetchAbort,j=z||D.allowStaleOnFetchRejection,iA=j||D.noDeleteOnFetchRejection;if(this.valList[a]===v&&(!iA||v.__staleWhileFetching===void 0?this.delete(s):z||(this.valList[a]=v.__staleWhileFetching)),j)return D.status&&v.__staleWhileFetching!==void 0&&(D.status.returnedStale=!0),v.__staleWhileFetching;if(v.__returned===v)throw X},J=(X,CA)=>{this.fetchMethod(s,F,p).then(z=>X(z),CA),S.signal.addEventListener("abort",()=>{(!D.ignoreFetchAbort||D.allowStaleOnFetchAbort)&&(X(),D.allowStaleOnFetchAbort&&(X=z=>G(z,!0)))})};D.status&&(D.status.fetchDispatched=!0);const v=new Promise(J).then(G,N);return v.__abortController=S,v.__staleWhileFetching=F,v.__returned=null,a===void 0?(this.set(s,v,{...p.options,status:void 0}),a=this.keyMap.get(s)):this.valList[a]=v,v}isBackgroundFetch(s){return s&&typeof s=="object"&&typeof s.then=="function"&&Object.prototype.hasOwnProperty.call(s,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(s,"__returned")&&(s.__returned===s||s.__returned===null)}async fetch(s,{allowStale:a=this.allowStale,updateAgeOnGet:D=this.updateAgeOnGet,noDeleteOnStaleGet:f=this.noDeleteOnStaleGet,ttl:F=this.ttl,noDisposeOnSet:S=this.noDisposeOnSet,size:p=0,sizeCalculation:G=this.sizeCalculation,noUpdateTTL:N=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:J=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:X=this.allowStaleOnFetchAbort,fetchContext:CA=this.fetchContext,forceRefresh:z=!1,status:j,signal:iA}={}){if(!this.fetchMethod)return j&&(j.fetch="get"),this.get(s,{allowStale:a,updateAgeOnGet:D,noDeleteOnStaleGet:f,status:j});const aA={allowStale:a,updateAgeOnGet:D,noDeleteOnStaleGet:f,ttl:F,noDisposeOnSet:S,size:p,sizeCalculation:G,noUpdateTTL:N,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:J,allowStaleOnFetchAbort:X,ignoreFetchAbort:v,status:j,signal:iA};let uA=this.keyMap.get(s);if(uA===void 0){j&&(j.fetch="miss");const Z=this.backgroundFetch(s,uA,aA,CA);return Z.__returned=Z}else{const Z=this.valList[uA];if(this.isBackgroundFetch(Z)){const yA=a&&Z.__staleWhileFetching!==void 0;return j&&(j.fetch="inflight",yA&&(j.returnedStale=!0)),yA?Z.__staleWhileFetching:Z.__returned=Z}const SA=this.isStale(uA);if(!z&&!SA)return j&&(j.fetch="hit"),this.moveToTail(uA),D&&this.updateItemAge(uA),this.statusTTL(j,uA),Z;const UA=this.backgroundFetch(s,uA,aA,CA),FA=UA.__staleWhileFetching!==void 0,QA=FA&&a;return j&&(j.fetch=FA&&SA?"stale":"refresh",QA&&SA&&(j.returnedStale=!0)),QA?UA.__staleWhileFetching:UA.__returned=UA}}get(s,{allowStale:a=this.allowStale,updateAgeOnGet:D=this.updateAgeOnGet,noDeleteOnStaleGet:f=this.noDeleteOnStaleGet,status:F}={}){const S=this.keyMap.get(s);if(S!==void 0){const p=this.valList[S],G=this.isBackgroundFetch(p);return this.statusTTL(F,S),this.isStale(S)?(F&&(F.get="stale"),G?(F&&(F.returnedStale=a&&p.__staleWhileFetching!==void 0),a?p.__staleWhileFetching:void 0):(f||this.delete(s),F&&(F.returnedStale=a),a?p:void 0)):(F&&(F.get="hit"),G?p.__staleWhileFetching:(this.moveToTail(S),D&&this.updateItemAge(S),p))}else F&&(F.get="miss")}connect(s,a){this.prev[a]=s,this.next[s]=a}moveToTail(s){s!==this.tail&&(s===this.head?this.head=this.next[s]:this.connect(this.prev[s],this.next[s]),this.connect(this.tail,s),this.tail=s)}get del(){return t("del","delete"),this.delete}delete(s){let a=!1;if(this.size!==0){const D=this.keyMap.get(s);if(D!==void 0)if(a=!0,this.size===1)this.clear();else{this.removeItemSize(D);const f=this.valList[D];this.isBackgroundFetch(f)?f.__abortController.abort(new Error("deleted")):(this.dispose(f,s,"delete"),this.disposeAfter&&this.disposed.push([f,s,"delete"])),this.keyMap.delete(s),this.keyList[D]=null,this.valList[D]=null,D===this.tail?this.tail=this.prev[D]:D===this.head?this.head=this.next[D]:(this.next[this.prev[D]]=this.next[D],this.prev[this.next[D]]=this.prev[D]),this.size--,this.free.push(D)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return a}clear(){for(const s of this.rindexes({allowStale:!0})){const a=this.valList[s];if(this.isBackgroundFetch(a))a.__abortController.abort(new Error("deleted"));else{const D=this.keyList[s];this.dispose(a,D,"delete"),this.disposeAfter&&this.disposed.push([a,D,"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 t("reset","clear"),this.clear}get length(){return A("length","size"),this.size}static get AbortController(){return w}static get AbortSignal(){return g}}return De=E,De}var jA={};const _e=new Proxy({},{get(l,d){return d==="__esModule"?!0:new Proxy(function(){},{get:()=>()=>{},apply:()=>({})})}}),dt=ZA({__proto__:null,default:_e},[_e]),Dg=KA(dt);var xA={},je;function Ft(){if(je)return xA;je=1;var l=xA&&xA.__createBinding||(Object.create?(function(t,A,C,Q){Q===void 0&&(Q=C);var I=Object.getOwnPropertyDescriptor(A,C);(!I||("get"in I?!A.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return A[C]}}),Object.defineProperty(t,Q,I)}):(function(t,A,C,Q){Q===void 0&&(Q=C),t[Q]=A[C]})),d=xA&&xA.__setModuleDefault||(Object.create?(function(t,A){Object.defineProperty(t,"default",{enumerable:!0,value:A})}):function(t,A){t.default=A}),w=xA&&xA.__importStar||function(t){if(t&&t.__esModule)return t;var A={};if(t!=null)for(var C in t)C!=="default"&&Object.prototype.hasOwnProperty.call(t,C)&&l(A,t,C);return d(A,t),A};Object.defineProperty(xA,"__esModule",{value:!0}),xA.req=xA.json=xA.toBuffer=void 0;const h=w(fI),y=w(yI);async function g(t){let A=0;const C=[];for await(const Q of t)A+=Q.length,C.push(Q);return Buffer.concat(C,A)}xA.toBuffer=g;async function n(t){const C=(await g(t)).toString("utf8");try{return JSON.parse(C)}catch(Q){const I=Q;throw I.message+=` (input: ${C})`,I}}xA.json=n;function u(t,A={}){const Q=((typeof t=="string"?t:t.href).startsWith("https:")?y:h).request(t,A),I=new Promise((r,i)=>{Q.once("response",r).once("error",i).end()});return Q.then=I.then.bind(I),Q}return xA.req=u,xA}var ze;function dI(){return ze||(ze=1,(function(l){var d=jA&&jA.__createBinding||(Object.create?(function(C,Q,I,r){r===void 0&&(r=I);var i=Object.getOwnPropertyDescriptor(Q,I);(!i||("get"in i?!Q.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return Q[I]}}),Object.defineProperty(C,r,i)}):(function(C,Q,I,r){r===void 0&&(r=I),C[r]=Q[I]})),w=jA&&jA.__setModuleDefault||(Object.create?(function(C,Q){Object.defineProperty(C,"default",{enumerable:!0,value:Q})}):function(C,Q){C.default=Q}),h=jA&&jA.__importStar||function(C){if(C&&C.__esModule)return C;var Q={};if(C!=null)for(var I in C)I!=="default"&&Object.prototype.hasOwnProperty.call(C,I)&&d(Q,C,I);return w(Q,C),Q},y=jA&&jA.__exportStar||function(C,Q){for(var I in C)I!=="default"&&!Object.prototype.hasOwnProperty.call(Q,I)&&d(Q,C,I)};Object.defineProperty(l,"__esModule",{value:!0}),l.Agent=void 0;const g=h(Dg),n=h(fI),u=yI;y(Ft(),l);const t=Symbol("AgentBaseInternalState");class A extends n.Agent{constructor(Q){super(Q),this[t]={}}isSecureEndpoint(Q){if(Q){if(typeof Q.secureEndpoint=="boolean")return Q.secureEndpoint;if(typeof Q.protocol=="string")return Q.protocol==="https:"}const{stack:I}=new Error;return typeof I!="string"?!1:I.split(`
2
2
  `).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(Q){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[Q]||(this.sockets[Q]=[]);const I=new g.Socket({writable:!1});return this.sockets[Q].push(I),this.totalSocketCount++,I}decrementSockets(Q,I){if(!this.sockets[Q]||I===null)return;const r=this.sockets[Q],i=r.indexOf(I);i!==-1&&(r.splice(i,1),this.totalSocketCount--,r.length===0&&delete this.sockets[Q])}getName(Q){return this.isSecureEndpoint(Q)?u.Agent.prototype.getName.call(this,Q):super.getName(Q)}createSocket(Q,I,r){const i={...I,secureEndpoint:this.isSecureEndpoint(I)},e=this.getName(i),B=this.incrementSockets(e);Promise.resolve().then(()=>this.connect(Q,i)).then(E=>{if(this.decrementSockets(e,B),E instanceof n.Agent)try{return E.addRequest(Q,i)}catch(o){return r(o)}this[t].currentSocket=E,super.createSocket(Q,I,r)},E=>{this.decrementSockets(e,B),r(E)})}createConnection(){const Q=this[t].currentSocket;if(this[t].currentSocket=void 0,!Q)throw new Error("No socket was returned in the `connect()` function");return Q}get defaultPort(){return this[t].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(Q){this[t]&&(this[t].defaultPort=Q)}get protocol(){return this[t].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(Q){this[t]&&(this[t].protocol=Q)}}l.Agent=A})(jA)),jA}var kI={exports:{}},ce,$e;function pt(){if($e)return ce;$e=1;var l=1e3,d=l*60,w=d*60,h=w*24,y=h*7,g=h*365.25;ce=function(C,Q){Q=Q||{};var I=typeof C;if(I==="string"&&C.length>0)return n(C);if(I==="number"&&isFinite(C))return Q.long?t(C):u(C);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(C))};function n(C){if(C=String(C),!(C.length>100)){var Q=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(C);if(Q){var I=parseFloat(Q[1]),r=(Q[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return I*g;case"weeks":case"week":case"w":return I*y;case"days":case"day":case"d":return I*h;case"hours":case"hour":case"hrs":case"hr":case"h":return I*w;case"minutes":case"minute":case"mins":case"min":case"m":return I*d;case"seconds":case"second":case"secs":case"sec":case"s":return I*l;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}function u(C){var Q=Math.abs(C);return Q>=h?Math.round(C/h)+"d":Q>=w?Math.round(C/w)+"h":Q>=d?Math.round(C/d)+"m":Q>=l?Math.round(C/l)+"s":C+"ms"}function t(C){var Q=Math.abs(C);return Q>=h?A(C,Q,h,"day"):Q>=w?A(C,Q,w,"hour"):Q>=d?A(C,Q,d,"minute"):Q>=l?A(C,Q,l,"second"):C+" ms"}function A(C,Q,I,r){var i=Q>=I*1.5;return Math.round(C/I)+" "+r+(i?"s":"")}return ce}var he,AC;function St(){if(AC)return he;AC=1;function l(d){h.debug=h,h.default=h,h.coerce=A,h.disable=u,h.enable=g,h.enabled=t,h.humanize=pt(),h.destroy=C,Object.keys(d).forEach(Q=>{h[Q]=d[Q]}),h.names=[],h.skips=[],h.formatters={};function w(Q){let I=0;for(let r=0;r<Q.length;r++)I=(I<<5)-I+Q.charCodeAt(r),I|=0;return h.colors[Math.abs(I)%h.colors.length]}h.selectColor=w;function h(Q){let I,r=null,i,e;function B(...E){if(!B.enabled)return;const o=B,s=Number(new Date),a=s-(I||s);o.diff=a,o.prev=I,o.curr=s,I=s,E[0]=h.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let D=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(F,S)=>{if(F==="%%")return"%";D++;const p=h.formatters[S];if(typeof p=="function"){const G=E[D];F=p.call(o,G),E.splice(D,1),D--}return F}),h.formatArgs.call(o,E),(o.log||h.log).apply(o,E)}return B.namespace=Q,B.useColors=h.useColors(),B.color=h.selectColor(Q),B.extend=y,B.destroy=h.destroy,Object.defineProperty(B,"enabled",{enumerable:!0,configurable:!1,get:()=>r!==null?r:(i!==h.namespaces&&(i=h.namespaces,e=h.enabled(Q)),e),set:E=>{r=E}}),typeof h.init=="function"&&h.init(B),B}function y(Q,I){const r=h(this.namespace+(typeof I>"u"?":":I)+Q);return r.log=this.log,r}function g(Q){h.save(Q),h.namespaces=Q,h.names=[],h.skips=[];const I=(typeof Q=="string"?Q:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const r of I)r[0]==="-"?h.skips.push(r.slice(1)):h.names.push(r)}function n(Q,I){let r=0,i=0,e=-1,B=0;for(;r<Q.length;)if(i<I.length&&(I[i]===Q[r]||I[i]==="*"))I[i]==="*"?(e=i,B=r,i++):(r++,i++);else if(e!==-1)i=e+1,B++,r=B;else return!1;for(;i<I.length&&I[i]==="*";)i++;return i===I.length}function u(){const Q=[...h.names,...h.skips.map(I=>"-"+I)].join(",");return h.enable(""),Q}function t(Q){for(const I of h.skips)if(n(Q,I))return!1;for(const I of h.names)if(n(Q,I))return!0;return!1}function A(Q){return Q instanceof Error?Q.stack||Q.message:Q}function C(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return h.enable(h.load()),h}return he=l,he}var gC;function Bg(){return gC||(gC=1,(function(l,d){var w={};d.formatArgs=y,d.save=g,d.load=n,d.useColors=h,d.storage=u(),d.destroy=(()=>{let A=!1;return()=>{A||(A=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),d.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function h(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let A;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(A=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(A[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function y(A){if(A[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+A[0]+(this.useColors?"%c ":" ")+"+"+l.exports.humanize(this.diff),!this.useColors)return;const C="color: "+this.color;A.splice(1,0,C,"color: inherit");let Q=0,I=0;A[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(Q++,r==="%c"&&(I=Q))}),A.splice(I,0,C)}d.log=console.debug||console.log||(()=>{});function g(A){try{A?d.storage.setItem("debug",A):d.storage.removeItem("debug")}catch{}}function n(){let A;try{A=d.storage.getItem("debug")||d.storage.getItem("DEBUG")}catch{}return!A&&typeof process<"u"&&"env"in process&&(A=w.DEBUG),A}function u(){try{return localStorage}catch{}}l.exports=St()(d);const{formatters:t}=l.exports;t.j=function(A){try{return JSON.stringify(A)}catch(C){return"[UnexpectedJSONParseError]: "+C.message}}})(kI,kI.exports)),kI.exports}var le={},IC;function Rt(){if(IC)return le;IC=1;var l={},d=Yg.parse,w={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},h=String.prototype.endsWith||function(u){return u.length<=this.length&&this.indexOf(u,this.length-u.length)!==-1};function y(u){var t=typeof u=="string"?d(u):u||{},A=t.protocol,C=t.host,Q=t.port;if(typeof C!="string"||!C||typeof A!="string"||(A=A.split(":",1)[0],C=C.replace(/:\d*$/,""),Q=parseInt(Q)||w[A]||0,!g(C,Q)))return"";var I=n("npm_config_"+A+"_proxy")||n(A+"_proxy")||n("npm_config_proxy")||n("all_proxy");return I&&I.indexOf("://")===-1&&(I=A+"://"+I),I}function g(u,t){var A=(n("npm_config_no_proxy")||n("no_proxy")).toLowerCase();return A?A==="*"?!1:A.split(/[,\s]/).every(function(C){if(!C)return!0;var Q=C.match(/^(.+):(\d+)$/),I=Q?Q[1]:C,r=Q?parseInt(Q[2]):0;return r&&r!==t?!0:/^[.*]/.test(I)?(I.charAt(0)==="*"&&(I=I.slice(1)),!h.call(u,I)):u!==I}):!0}function n(u){return l[u.toLowerCase()]||l[u.toUpperCase()]||""}return le.getProxyForUrl=y,le}var PA={};const eC=new Proxy({},{get(l,d){return d==="__esModule"?!0:new Proxy(function(){},{get:()=>()=>{},apply:()=>({})})}}),kt=ZA({__proto__:null,default:eC},[eC]),xg=KA(kt),CC=new Proxy({},{get(l,d){return d==="__esModule"?!0:new Proxy(function(){},{get:()=>()=>{},apply:()=>({})})}}),Mt=ZA({__proto__:null,default:CC},[CC]),ne=KA(Mt);var BC;function mQ(){if(BC)return PA;BC=1;var l=PA&&PA.__createBinding||(Object.create?(function(r,i,e,B){B===void 0&&(B=e);var E=Object.getOwnPropertyDescriptor(i,e);(!E||("get"in E?!i.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return i[e]}}),Object.defineProperty(r,B,E)}):(function(r,i,e,B){B===void 0&&(B=e),r[B]=i[e]})),d=PA&&PA.__setModuleDefault||(Object.create?(function(r,i){Object.defineProperty(r,"default",{enumerable:!0,value:i})}):function(r,i){r.default=i}),w=PA&&PA.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&l(i,r,e);return d(i,r),i},h=PA&&PA.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(PA,"__esModule",{value:!0}),PA.HttpProxyAgent=void 0;const y=w(Dg),g=w(xg),n=h(Bg()),u=ne,t=dI(),A=Yg,C=(0,n.default)("http-proxy-agent");class Q extends t.Agent{constructor(i,e){super(e),this.proxy=typeof i=="string"?new A.URL(i):i,this.proxyHeaders=e?.headers??{},C("Creating new HttpProxyAgent instance: %o",this.proxy.href);const B=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),E=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...e?I(e,"headers"):null,host:B,port:E}}addRequest(i,e){i._header=null,this.setRequestProps(i,e),super.addRequest(i,e)}setRequestProps(i,e){const{proxy:B}=this,E=e.secureEndpoint?"https:":"http:",o=i.getHeader("host")||"localhost",s=`${E}//${o}`,a=new A.URL(i.path,s);e.port!==80&&(a.port=String(e.port)),i.path=String(a);const D=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(B.username||B.password){const f=`${decodeURIComponent(B.username)}:${decodeURIComponent(B.password)}`;D["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}D["Proxy-Connection"]||(D["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const f of Object.keys(D)){const F=D[f];F&&i.setHeader(f,F)}}async connect(i,e){i._header=null,i.path.includes("://")||this.setRequestProps(i,e);let B,E;C("Regenerating stored HTTP header string for request"),i._implicitHeader(),i.outputData&&i.outputData.length>0&&(C("Patching connection write() output buffer with updated header"),B=i.outputData[0].data,E=B.indexOf(`\r
3
3
  \r
4
4
  `)+4,i.outputData[0].data=i._header+B.substring(E),C("Output buffer: %o",i.outputData[0].data));let o;return this.proxy.protocol==="https:"?(C("Creating `tls.Socket`: %o",this.connectOpts),o=g.connect(this.connectOpts)):(C("Creating `net.Socket`: %o",this.connectOpts),o=y.connect(this.connectOpts)),await(0,u.once)(o,"connect"),o}}Q.protocols=["http","https"],PA.HttpProxyAgent=Q;function I(r,...i){const e={};let B;for(B in r)i.includes(B)||(e[B]=r[B]);return e}return PA}var qA={};const QC=new Proxy({},{get(l,d){return d==="__esModule"?!0:new Proxy(function(){},{get:()=>()=>{},apply:()=>({})})}}),Gt=ZA({__proto__:null,default:QC},[QC]),Nt=KA(Gt);var wg={},tC;function Ut(){if(tC)return wg;tC=1;var l=wg&&wg.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(wg,"__esModule",{value:!0}),wg.parseProxyResponse=void 0;const w=(0,l(Bg()).default)("https-proxy-agent:parse-proxy-response");function h(y){return new Promise((g,n)=>{let u=0;const t=[];function A(){const i=y.read();i?r(i):y.once("readable",A)}function C(){y.removeListener("end",Q),y.removeListener("error",I),y.removeListener("readable",A)}function Q(){C(),w("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function I(i){C(),w("onerror %o",i),n(i)}function r(i){t.push(i),u+=i.length;const e=Buffer.concat(t,u),B=e.indexOf(`\r