UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

8 lines 1.19 MB
"use strict";var ba=Object.create,jI=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,xa=Object.getOwnPropertyNames,va=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty,Pa=(I,A)=>()=>(I&&(A=I(I=0)),A),N=(I,A)=>()=>(A||I((A={exports:{}}).exports,A),A.exports),HQ=(I,A)=>{for(var e in A)jI(I,e,{get:A[e],enumerable:!0})},bQ=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of xa(A))!Ta.call(I,C)&&C!==e&&jI(I,C,{get:()=>A[C],enumerable:!(g=Ya(A,C))||g.enumerable});return I},YQ=(I,A,e)=>(e=I!=null?ba(va(I)):{},bQ(A||!I||!I.__esModule?jI(e,"default",{value:I,enumerable:!0}):e,I)),NA=I=>bQ(jI({},"__esModule",{value:!0}),I),_Q=N((IF,ZQ)=>{"use strict";var zI=Object.defineProperty,Oa=Object.getOwnPropertyDescriptor,qa=Object.getOwnPropertyNames,Va=Object.prototype.hasOwnProperty,$I=(I,A)=>zI(I,"name",{value:A,configurable:!0}),Wa=(I,A)=>{for(var e in A)zI(I,e,{get:A[e],enumerable:!0})},Za=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of qa(A))!Va.call(I,C)&&C!==e&&zI(I,C,{get:()=>A[C],enumerable:!(g=Oa(A,C))||g.enumerable});return I},_a=I=>Za(zI({},"__esModule",{value:!0}),I),xQ={};Wa(xQ,{AlgorithmId:()=>OQ,EndpointURLScheme:()=>PQ,FieldPosition:()=>qQ,HttpApiKeyAuthLocation:()=>TQ,HttpAuthLocation:()=>vQ,IniSectionType:()=>VQ,RequestHandlerProtocol:()=>WQ,SMITHY_CONTEXT_KEY:()=>Au,getDefaultClientConfiguration:()=>za,resolveDefaultRuntimeConfig:()=>$a}),ZQ.exports=_a(xQ);var vQ=(I=>(I.HEADER="header",I.QUERY="query",I))(vQ||{}),TQ=(I=>(I.HEADER="header",I.QUERY="query",I))(TQ||{}),PQ=(I=>(I.HTTP="http",I.HTTPS="https",I))(PQ||{}),OQ=(I=>(I.MD5="md5",I.CRC32="crc32",I.CRC32C="crc32c",I.SHA1="sha1",I.SHA256="sha256",I))(OQ||{}),Xa=$I(I=>{let A=[];return I.sha256!==void 0&&A.push({algorithmId:()=>"sha256",checksumConstructor:()=>I.sha256}),I.md5!=null&&A.push({algorithmId:()=>"md5",checksumConstructor:()=>I.md5}),{_checksumAlgorithms:A,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),ja=$I(I=>{let A={};return I.checksumAlgorithms().forEach(e=>{A[e.algorithmId()]=e.checksumConstructor()}),A},"resolveChecksumRuntimeConfig"),za=$I(I=>({...Xa(I)}),"getDefaultClientConfiguration"),$a=$I(I=>({...ja(I)}),"resolveDefaultRuntimeConfig"),qQ=(I=>(I[I.HEADER=0]="HEADER",I[I.TRAILER=1]="TRAILER",I))(qQ||{}),Au="__smithy_context",VQ=(I=>(I.PROFILE="profile",I.SSO_SESSION="sso-session",I.SERVICES="services",I))(VQ||{}),WQ=(I=>(I.HTTP_0_9="http/0.9",I.HTTP_1_0="http/1.0",I.TDS_8_0="tds/8.0",I))(WQ||{})}),tE=N((iF,CE)=>{"use strict";var AC=Object.defineProperty,eu=Object.getOwnPropertyDescriptor,gu=Object.getOwnPropertyNames,Iu=Object.prototype.hasOwnProperty,Ag=(I,A)=>AC(I,"name",{value:A,configurable:!0}),Cu=(I,A)=>{for(var e in A)AC(I,e,{get:A[e],enumerable:!0})},tu=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of gu(A))!Iu.call(I,C)&&C!==e&&AC(I,C,{get:()=>A[C],enumerable:!(g=eu(A,C))||g.enumerable});return I},Bu=I=>tu(AC({},"__esModule",{value:!0}),I),XQ={};Cu(XQ,{Field:()=>Eu,Fields:()=>su,HttpRequest:()=>ru,HttpResponse:()=>ou,IHttpRequest:()=>jQ.HttpRequest,getHttpHandlerExtensionConfiguration:()=>iu,isValidHostname:()=>IE,resolveHttpHandlerRuntimeConfig:()=>Qu}),CE.exports=Bu(XQ);var iu=Ag(I=>{let A=I.httpHandler;return{setHttpHandler(e){A=e},httpHandler(){return A},updateHttpClientConfig(e,g){A.updateHttpClientConfig(e,g)},httpHandlerConfigs(){return A.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Qu=Ag(I=>({httpHandler:I.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),jQ=_Q(),zQ=class{constructor({name:A,kind:e=jQ.FieldPosition.HEADER,values:g=[]}){this.name=A,this.kind=e,this.values=g}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter(e=>e!==A)}toString(){return this.values.map(A=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}};Ag(zQ,"Field");var Eu=zQ,$Q=class{constructor({fields:A=[],encoding:e="utf-8"}){this.entries={},A.forEach(this.setField.bind(this)),this.encoding=e}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter(e=>e.kind===A)}};Ag($Q,"Fields");var su=$Q,AE=class qt{constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let e=new qt({...A,headers:{...A.headers}});return e.query&&(e.query=eE(e.query)),e}static isInstance(A){if(!A)return!1;let e=A;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&typeof e.query=="object"&&typeof e.headers=="object"}clone(){return qt.clone(this)}};Ag(AE,"HttpRequest");var ru=AE;function eE(I){return Object.keys(I).reduce((A,e)=>{let g=I[e];return{...A,[e]:Array.isArray(g)?[...g]:g}},{})}Ag(eE,"cloneQuery");var gE=class{constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let e=A;return typeof e.statusCode=="number"&&typeof e.headers=="object"}};Ag(gE,"HttpResponse");var ou=gE;function IE(I){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(I)}Ag(IE,"isValidHostname")}),EE=N((QF,QE)=>{"use strict";var eC=Object.defineProperty,nu=Object.getOwnPropertyDescriptor,au=Object.getOwnPropertyNames,uu=Object.prototype.hasOwnProperty,Vt=(I,A)=>eC(I,"name",{value:A,configurable:!0}),cu=(I,A)=>{for(var e in A)eC(I,e,{get:A[e],enumerable:!0})},Du=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of au(A))!uu.call(I,C)&&C!==e&&eC(I,C,{get:()=>A[C],enumerable:!(g=nu(A,C))||g.enumerable});return I},hu=I=>Du(eC({},"__esModule",{value:!0}),I),BE={};cu(BE,{escapeUri:()=>iE,escapeUriPath:()=>wu}),QE.exports=hu(BE);var iE=Vt(I=>encodeURIComponent(I).replace(/[!'()*]/g,lu),"escapeUri"),lu=Vt(I=>`%${I.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),wu=Vt(I=>I.split("/").map(iE).join("/"),"escapeUriPath")}),nE=N((EF,oE)=>{"use strict";var gC=Object.defineProperty,fu=Object.getOwnPropertyDescriptor,du=Object.getOwnPropertyNames,yu=Object.prototype.hasOwnProperty,Fu=(I,A)=>gC(I,"name",{value:A,configurable:!0}),pu=(I,A)=>{for(var e in A)gC(I,e,{get:A[e],enumerable:!0})},Su=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of du(A))!yu.call(I,C)&&C!==e&&gC(I,C,{get:()=>A[C],enumerable:!(g=fu(A,C))||g.enumerable});return I},Ru=I=>Su(gC({},"__esModule",{value:!0}),I),sE={};pu(sE,{buildQueryString:()=>rE}),oE.exports=Ru(sE);var Wt=EE();function rE(I){let A=[];for(let e of Object.keys(I).sort()){let g=I[e];if(e=(0,Wt.escapeUri)(e),Array.isArray(g))for(let C=0,t=g.length;C<t;C++)A.push(`${e}=${(0,Wt.escapeUri)(g[C])}`);else{let C=e;(g||typeof g=="string")&&(C+=`=${(0,Wt.escapeUri)(g)}`),A.push(C)}}return A.join("&")}Fu(rE,"buildQueryString")}),UE=N((nF,NE)=>{"use strict";var ku=Object.create,SI=Object.defineProperty,Mu=Object.getOwnPropertyDescriptor,Gu=Object.getOwnPropertyNames,mu=Object.getPrototypeOf,Nu=Object.prototype.hasOwnProperty,dA=(I,A)=>SI(I,"name",{value:A,configurable:!0}),Uu=(I,A)=>{for(var e in A)SI(I,e,{get:A[e],enumerable:!0})},hE=(I,A,e,g)=>{if(A&&typeof A=="object"||typeof A=="function")for(let C of Gu(A))!Nu.call(I,C)&&C!==e&&SI(I,C,{get:()=>A[C],enumerable:!(g=Mu(A,C))||g.enumerable});return I},Lu=(I,A,e)=>(e=I!=null?ku(mu(I)):{},hE(A||!I||!I.__esModule?SI(e,"default",{value:I,enumerable:!0}):e,I)),Ju=I=>hE(SI({},"__esModule",{value:!0}),I),lE={};Uu(lE,{DEFAULT_REQUEST_TIMEOUT:()=>vu,NodeHttp2Handler:()=>Vu,NodeHttpHandler:()=>Tu,streamCollector:()=>Zu}),NE.exports=Ju(lE);var wE=tE(),fE=nE(),Zt=require("http"),_t=require("https"),Ku=["ECONNRESET","EPIPE","ETIMEDOUT"],dE=dA(I=>{let A={};for(let e of Object.keys(I)){let g=I[e];A[e]=Array.isArray(g)?g.join(","):g}return A},"getTransformedHeaders"),Be={setTimeout:(I,A)=>setTimeout(I,A),clearTimeout:I=>clearTimeout(I)},aE=1e3,Hu=dA((I,A,e=0)=>{if(!e)return-1;let g=dA(C=>{let t=Be.setTimeout(()=>{I.destroy(),A(Object.assign(new Error(`Socket timed out without establishing a connection within ${e} ms`),{name:"TimeoutError"}))},e-C),Q=dA(a=>{a?.connecting?a.on("connect",()=>{Be.clearTimeout(t)}):Be.clearTimeout(t)},"doWithSocket");I.socket?Q(I.socket):I.on("socket",Q)},"registerTimeout");return e<2e3?(g(0),0):Be.setTimeout(g.bind(null,aE),aE)},"setConnectionTimeout"),bu=3e3,Yu=dA((I,{keepAlive:A,keepAliveMsecs:e},g=bu)=>{if(A!==!0)return-1;let C=dA(()=>{I.socket?I.socket.setKeepAlive(A,e||0):I.on("socket",t=>{t.setKeepAlive(A,e||0)})},"registerListener");return g===0?(C(),0):Be.setTimeout(C,g)},"setSocketKeepAlive"),uE=3e3,xu=dA((I,A,e=0)=>{let g=dA(C=>{let t=e-C,Q=dA(()=>{I.destroy(),A(Object.assign(new Error(`Connection timed out after ${e} ms`),{name:"TimeoutError"}))},"onTimeout");I.socket?I.socket.setTimeout(t,Q):I.setTimeout(t,Q)},"registerTimeout");return 0<e&&e<6e3?(g(0),0):Be.setTimeout(g.bind(null,e===0?0:uE),uE)},"setSocketTimeout"),yE=require("stream"),cE=1e3;async function jt(I,A,e=cE){let g=A.headers??{},C=g.Expect||g.expect,t=-1,Q=!0;C==="100-continue"&&(Q=await Promise.race([new Promise(a=>{t=Number(Be.setTimeout(a,Math.max(cE,e)))}),new Promise(a=>{I.on("continue",()=>{Be.clearTimeout(t),a(!0)}),I.on("response",()=>{Be.clearTimeout(t),a(!1)}),I.on("error",()=>{Be.clearTimeout(t),a(!1)})})])),Q&&FE(I,A.body)}dA(jt,"writeRequestBody");function FE(I,A){if(A instanceof yE.Readable){A.pipe(I);return}if(A){if(Buffer.isBuffer(A)||typeof A=="string"){I.end(A);return}let e=A;if(typeof e=="object"&&e.buffer&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number"){I.end(Buffer.from(e.buffer,e.byteOffset,e.byteLength));return}I.end(Buffer.from(A));return}I.end()}dA(FE,"writeBody");var vu=0,pE=class Xt{constructor(A){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((e,g)=>{typeof A=="function"?A().then(C=>{e(this.resolveDefaultConfig(C))}).catch(g):e(this.resolveDefaultConfig(A))})}static create(A){return typeof A?.handle=="function"?A:new Xt(A)}static checkSocketUsage(A,e,g=console){var C,t,Q;let{sockets:a,requests:c,maxSockets:D}=A;if(typeof D!="number"||D===1/0||Date.now()-15e3<e)return e;if(a&&c)for(let u in a){let r=((C=a[u])==null?void 0:C.length)??0,B=((t=c[u])==null?void 0:t.length)??0;if(r>=D&&B>=2*D)return(Q=g?.warn)==null||Q.call(g,`@smithy/node-http-handler:WARN - socket usage at capacity=${r} and ${B} additional requests are enqueued. See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return e}resolveDefaultConfig(A){let{requestTimeout:e,connectionTimeout:g,socketTimeout:C,httpAgent:t,httpsAgent:Q}=A||{},a=!0,c=50;return{connectionTimeout:g,requestTimeout:e??C,httpAgent:t instanceof Zt.Agent||typeof t?.destroy=="function"?t:new Zt.Agent({keepAlive:a,maxSockets:c,...t}),httpsAgent:Q instanceof _t.Agent||typeof Q?.destroy=="function"?Q:new _t.Agent({keepAlive:a,maxSockets:c,...Q}),logger:console}}destroy(){var A,e,g,C;(e=(A=this.config)==null?void 0:A.httpAgent)==null||e.destroy(),(C=(g=this.config)==null?void 0:g.httpsAgent)==null||C.destroy()}async handle(A,{abortSignal:e}={}){return this.config||(this.config=await this.configProvider),new Promise((g,C)=>{let t,Q=[],a=dA(async y=>{await t,Q.forEach(Be.clearTimeout),g(y)},"resolve"),c=dA(async y=>{await t,Q.forEach(Be.clearTimeout),C(y)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(e?.aborted){let y=new Error("Request aborted");y.name="AbortError",c(y);return}let D=A.protocol==="https:",n=D?this.config.httpsAgent:this.config.httpAgent;Q.push(Be.setTimeout(()=>{this.socketWarningTimestamp=Xt.checkSocketUsage(n,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2e3)+(this.config.connectionTimeout??1e3)));let u=(0,fE.buildQueryString)(A.query||{}),r;if(A.username!=null||A.password!=null){let y=A.username??"",F=A.password??"";r=`${y}:${F}`}let B=A.path;u&&(B+=`?${u}`),A.fragment&&(B+=`#${A.fragment}`);let i=A.hostname??"";i[0]==="["&&i.endsWith("]")?i=A.hostname.slice(1,-1):i=A.hostname;let E={headers:A.headers,host:i,method:A.method,path:B,port:A.port,agent:n,auth:r},h=(D?_t.request:Zt.request)(E,y=>{let F=new wE.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:dE(y.headers),body:y});a({response:F})});if(h.on("error",y=>{Ku.includes(y.code)?c(Object.assign(y,{name:"TimeoutError"})):c(y)}),e){let y=dA(()=>{h.destroy();let F=new Error("Request aborted");F.name="AbortError",c(F)},"onAbort");if(typeof e.addEventListener=="function"){let F=e;F.addEventListener("abort",y,{once:!0}),h.once("close",()=>F.removeEventListener("abort",y))}else e.onabort=y}Q.push(Hu(h,c,this.config.connectionTimeout)),Q.push(xu(h,c,this.config.requestTimeout));let w=E.agent;typeof w=="object"&&"keepAlive"in w&&Q.push(Yu(h,{keepAlive:w.keepAlive,keepAliveMsecs:w.keepAliveMsecs})),t=jt(h,A,this.config.requestTimeout).catch(y=>(Q.forEach(Be.clearTimeout),C(y)))})}updateHttpClientConfig(A,e){this.config=void 0,this.configProvider=this.configProvider.then(g=>({...g,[A]:e}))}httpHandlerConfigs(){return this.config??{}}};dA(pE,"NodeHttpHandler");var Tu=pE,DE=require("http2"),Pu=Lu(require("http2")),SE=class{constructor(A){this.sessions=[],this.sessions=A??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(A){this.sessions.push(A)}contains(A){return this.sessions.includes(A)}remove(A){this.sessions=this.sessions.filter(e=>e!==A)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(A){for(let e of this.sessions)e===A&&(e.destroyed||e.destroy())}};dA(SE,"NodeHttp2ConnectionPool");var Ou=SE,RE=class{constructor(A){if(this.sessionCache=new Map,this.config=A,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(A,e){let g=this.getUrlString(A),C=this.sessionCache.get(g);if(C){let c=C.poll();if(c&&!this.config.disableConcurrency)return c}let t=Pu.default.connect(g);this.config.maxConcurrency&&t.settings({maxConcurrentStreams:this.config.maxConcurrency},c=>{if(c)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+A.destination.toString())}),t.unref();let Q=dA(()=>{t.destroy(),this.deleteSession(g,t)},"destroySessionCb");t.on("goaway",Q),t.on("error",Q),t.on("frameError",Q),t.on("close",()=>this.deleteSession(g,t)),e.requestTimeout&&t.setTimeout(e.requestTimeout,Q);let a=this.sessionCache.get(g)||new Ou;return a.offerLast(t),this.sessionCache.set(g,a),t}deleteSession(A,e){let g=this.sessionCache.get(A);g&&g.contains(e)&&(g.remove(e),this.sessionCache.set(A,g))}release(A,e){var g;let C=this.getUrlString(A);(g=this.sessionCache.get(C))==null||g.offerLast(e)}destroy(){for(let[A,e]of this.sessionCache){for(let g of e)g.destroyed||g.destroy(),e.remove(g);this.sessionCache.delete(A)}}setMaxConcurrentStreams(A){if(A&&A<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=A}setDisableConcurrentStreams(A){this.config.disableConcurrency=A}getUrlString(A){return A.destination.toString()}};dA(RE,"NodeHttp2ConnectionManager");var qu=RE,kE=class ME{constructor(A){this.metadata={handlerProtocol:"h2"},this.connectionManager=new qu({}),this.configProvider=new Promise((e,g)=>{typeof A=="function"?A().then(C=>{e(C||{})}).catch(g):e(A||{})})}static create(A){return typeof A?.handle=="function"?A:new ME(A)}destroy(){this.connectionManager.destroy()}async handle(A,{abortSignal:e}={}){this.config||(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams&&this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams));let{requestTimeout:g,disableConcurrentStreams:C}=this.config;return new Promise((t,Q)=>{var a;let c=!1,D,n=dA(async H=>{await D,t(H)},"resolve"),u=dA(async H=>{await D,Q(H)},"reject");if(e?.aborted){c=!0;let H=new Error("Request aborted");H.name="AbortError",u(H);return}let{hostname:r,method:B,port:i,protocol:E,query:s}=A,h="";if(A.username!=null||A.password!=null){let H=A.username??"",Z=A.password??"";h=`${H}:${Z}@`}let w=`${E}//${h}${r}${i?`:${i}`:""}`,y={destination:new URL(w)},F=this.connectionManager.lease(y,{requestTimeout:(a=this.config)==null?void 0:a.sessionTimeout,disableConcurrentStreams:C||!1}),S=dA(H=>{C&&this.destroySession(F),c=!0,u(H)},"rejectWithDestroy"),k=(0,fE.buildQueryString)(s||{}),M=A.path;k&&(M+=`?${k}`),A.fragment&&(M+=`#${A.fragment}`);let Y=F.request({...A.headers,[DE.constants.HTTP2_HEADER_PATH]:M,[DE.constants.HTTP2_HEADER_METHOD]:B});if(F.ref(),Y.on("response",H=>{let Z=new wE.HttpResponse({statusCode:H[":status"]||-1,headers:dE(H),body:Y});c=!0,n({response:Z}),C&&(F.close(),this.connectionManager.deleteSession(w,F))}),g&&Y.setTimeout(g,()=>{Y.close();let H=new Error(`Stream timed out because of no activity for ${g} ms`);H.name="TimeoutError",S(H)}),e){let H=dA(()=>{Y.close();let Z=new Error("Request aborted");Z.name="AbortError",S(Z)},"onAbort");if(typeof e.addEventListener=="function"){let Z=e;Z.addEventListener("abort",H,{once:!0}),Y.once("close",()=>Z.removeEventListener("abort",H))}else e.onabort=H}Y.on("frameError",(H,Z,W)=>{S(new Error(`Frame type id ${H} in stream id ${W} has failed with code ${Z}.`))}),Y.on("error",S),Y.on("aborted",()=>{S(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Y.rstCode}.`))}),Y.on("close",()=>{F.unref(),C&&F.destroy(),c||S(new Error("Unexpected error: http2 request did not get a response"))}),D=jt(Y,A,g)})}updateHttpClientConfig(A,e){this.config=void 0,this.configProvider=this.configProvider.then(g=>({...g,[A]:e}))}httpHandlerConfigs(){return this.config??{}}destroySession(A){A.destroyed||A.destroy()}};dA(kE,"NodeHttp2Handler");var Vu=kE,GE=class extends yE.Writable{constructor(){super(...arguments),this.bufferedBytes=[]}_write(A,e,g){this.bufferedBytes.push(A),g()}};dA(GE,"Collector");var Wu=GE,Zu=dA(I=>_u(I)?mE(I):new Promise((A,e)=>{let g=new Wu;I.pipe(g),I.on("error",C=>{g.end(),e(C)}),g.on("error",e),g.on("finish",function(){let C=new Uint8Array(Buffer.concat(this.bufferedBytes));A(C)})}),"streamCollector"),_u=dA(I=>typeof ReadableStream=="function"&&I instanceof ReadableStream,"isReadableStreamInstance");async function mE(I){let A=[],e=I.getReader(),g=!1,C=0;for(;!g;){let{done:a,value:c}=await e.read();c&&(A.push(c),C+=c.length),g=a}let t=new Uint8Array(C),Q=0;for(let a of A)t.set(a,Q),Q+=a.length;return t}dA(mE,"collectReadableStream")}),bE=N((cF,HE)=>{"use strict";var RI=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Xu=typeof AbortController=="function",IC=Xu?AbortController:class{constructor(){this.signal=new LE}abort(A=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||A,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},ju=typeof AbortSignal=="function",zu=typeof IC.AbortSignal=="function",LE=ju?AbortSignal:zu?IC.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(A){A.type==="abort"&&(this.aborted=!0,this.onabort(A),this._listeners.forEach(e=>e(A),this))}onabort(){}addEventListener(A,e){A==="abort"&&this._listeners.push(e)}removeEventListener(A,e){A==="abort"&&(this._listeners=this._listeners.filter(g=>g!==e))}},eB=new Set,zt=(I,A)=>{let e=`LRU_CACHE_OPTION_${I}`;CC(e)&&gB(e,`${I} option`,`options.${A}`,Ng)},$t=(I,A)=>{let e=`LRU_CACHE_METHOD_${I}`;if(CC(e)){let{prototype:g}=Ng,{get:C}=Object.getOwnPropertyDescriptor(g,I);gB(e,`${I} method`,`cache.${A}()`,C)}},$u=(I,A)=>{let e=`LRU_CACHE_PROPERTY_${I}`;if(CC(e)){let{prototype:g}=Ng,{get:C}=Object.getOwnPropertyDescriptor(g,I);gB(e,`${I} property`,`cache.${A}`,C)}},JE=(...I)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...I):console.error(...I)},CC=I=>!eB.has(I),gB=(I,A,e,g)=>{eB.add(I);let C=`The ${A} is deprecated. Please use ${e} instead.`;JE(C,"DeprecationWarning",I,g)},eg=I=>I&&I===Math.floor(I)&&I>0&&isFinite(I),KE=I=>eg(I)?I<=Math.pow(2,8)?Uint8Array:I<=Math.pow(2,16)?Uint16Array:I<=Math.pow(2,32)?Uint32Array:I<=Number.MAX_SAFE_INTEGER?mg:null:null,mg=class extends Array{constructor(A){super(A),this.fill(0)}},AB=class{constructor(A){if(A===0)return[];let e=KE(A);this.heap=new e(A),this.length=0}push(A){this.heap[this.length++]=A}pop(){return this.heap[--this.length]}},Ng=class I{constructor(A={}){let{max:e=0,ttl:g,ttlResolution:C=1,ttlAutopurge:t,updateAgeOnGet:Q,updateAgeOnHas:a,allowStale:c,dispose:D,disposeAfter:n,noDisposeOnSet:u,noUpdateTTL:r,maxSize:B=0,maxEntrySize:i=0,sizeCalculation:E,fetchMethod:s,fetchContext:h,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:S,ignoreFetchAbort:k}=A,{length:M,maxAge:Y,stale:H}=A instanceof I?{}:A;if(e!==0&&!eg(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?KE(e):Array;if(!Z)throw new Error("invalid max value: "+e);if(this.max=e,this.maxSize=B,this.maxEntrySize=i||this.maxSize,this.sizeCalculation=E||M,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=s||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=h,!this.fetchMethod&&h!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(e).fill(null),this.valList=new Array(e).fill(null),this.next=new Z(e),this.prev=new Z(e),this.head=0,this.tail=0,this.free=new AB(e),this.initialFill=1,this.size=0,typeof D=="function"&&(this.dispose=D),typeof n=="function"?(this.disposeAfter=n,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!u,this.noUpdateTTL=!!r,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!F,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.maxSize!==0&&!eg(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!eg(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!c||!!H,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!Q,this.updateAgeOnHas=!!a,this.ttlResolution=eg(C)||C===0?C:1,this.ttlAutopurge=!!t,this.ttl=g||Y||0,this.ttl){if(!eg(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 W="LRU_CACHE_UNBOUNDED";CC(W)&&(eB.add(W),JE("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",W,I))}H&&zt("stale","allowStale"),Y&&zt("maxAge","ttl"),M&&zt("length","sizeCalculation")}getRemainingTTL(A){return this.has(A,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new mg(this.max),this.starts=new mg(this.max),this.setItemTTL=(g,C,t=RI.now())=>{if(this.starts[g]=C!==0?t:0,this.ttls[g]=C,C!==0&&this.ttlAutopurge){let Q=setTimeout(()=>{this.isStale(g)&&this.delete(this.keyList[g])},C+1);Q.unref&&Q.unref()}},this.updateItemAge=g=>{this.starts[g]=this.ttls[g]!==0?RI.now():0},this.statusTTL=(g,C)=>{g&&(g.ttl=this.ttls[C],g.start=this.starts[C],g.now=A||e(),g.remainingTTL=g.now+g.ttl-g.start)};let A=0,e=()=>{let g=RI.now();if(this.ttlResolution>0){A=g;let C=setTimeout(()=>A=0,this.ttlResolution);C.unref&&C.unref()}return g};this.getRemainingTTL=g=>{let C=this.keyMap.get(g);return C===void 0?0:this.ttls[C]===0||this.starts[C]===0?1/0:this.starts[C]+this.ttls[C]-(A||e())},this.isStale=g=>this.ttls[g]!==0&&this.starts[g]!==0&&(A||e())-this.starts[g]>this.ttls[g]}updateItemAge(A){}statusTTL(A,e){}setItemTTL(A,e,g){}isStale(A){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new mg(this.max),this.removeItemSize=A=>{this.calculatedSize-=this.sizes[A],this.sizes[A]=0},this.requireSize=(A,e,g,C)=>{if(this.isBackgroundFetch(e))return 0;if(!eg(g))if(C){if(typeof C!="function")throw new TypeError("sizeCalculation must be a function");if(g=C(e,A),!eg(g))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 g},this.addItemSize=(A,e,g)=>{if(this.sizes[A]=e,this.maxSize){let C=this.maxSize-this.sizes[A];for(;this.calculatedSize>C;)this.evict(!0)}this.calculatedSize+=this.sizes[A],g&&(g.entrySize=e,g.totalCalculatedSize=this.calculatedSize)}}removeItemSize(A){}addItemSize(A,e){}requireSize(A,e,g,C){if(g||C)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:A=this.allowStale}={}){if(this.size)for(let e=this.tail;!(!this.isValidIndex(e)||((A||!this.isStale(e))&&(yield e),e===this.head));)e=this.prev[e]}*rindexes({allowStale:A=this.allowStale}={}){if(this.size)for(let e=this.head;!(!this.isValidIndex(e)||((A||!this.isStale(e))&&(yield e),e===this.tail));)e=this.next[e]}isValidIndex(A){return A!==void 0&&this.keyMap.get(this.keyList[A])===A}*entries(){for(let A of this.indexes())this.valList[A]!==void 0&&this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield[this.keyList[A],this.valList[A]])}*rentries(){for(let A of this.rindexes())this.valList[A]!==void 0&&this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield[this.keyList[A],this.valList[A]])}*keys(){for(let A of this.indexes())this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.keyList[A])}*rkeys(){for(let A of this.rindexes())this.keyList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.keyList[A])}*values(){for(let A of this.indexes())this.valList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.valList[A])}*rvalues(){for(let A of this.rindexes())this.valList[A]!==void 0&&!this.isBackgroundFetch(this.valList[A])&&(yield this.valList[A])}[Symbol.iterator](){return this.entries()}find(A,e){for(let g of this.indexes()){let C=this.valList[g],t=this.isBackgroundFetch(C)?C.__staleWhileFetching:C;if(t!==void 0&&A(t,this.keyList[g],this))return this.get(this.keyList[g],e)}}forEach(A,e=this){for(let g of this.indexes()){let C=this.valList[g],t=this.isBackgroundFetch(C)?C.__staleWhileFetching:C;t!==void 0&&A.call(e,t,this.keyList[g],this)}}rforEach(A,e=this){for(let g of this.rindexes()){let C=this.valList[g],t=this.isBackgroundFetch(C)?C.__staleWhileFetching:C;t!==void 0&&A.call(e,t,this.keyList[g],this)}}get prune(){return $t("prune","purgeStale"),this.purgeStale}purgeStale(){let A=!1;for(let e of this.rindexes({allowStale:!0}))this.isStale(e)&&(this.delete(this.keyList[e]),A=!0);return A}dump(){let A=[];for(let e of this.indexes({allowStale:!0})){let g=this.keyList[e],C=this.valList[e],t=this.isBackgroundFetch(C)?C.__staleWhileFetching:C;if(t===void 0)continue;let Q={value:t};if(this.ttls){Q.ttl=this.ttls[e];let a=RI.now()-this.starts[e];Q.start=Math.floor(Date.now()-a)}this.sizes&&(Q.size=this.sizes[e]),A.unshift([g,Q])}return A}load(A){this.clear();for(let[e,g]of A){if(g.start){let C=Date.now()-g.start;g.start=RI.now()-C}this.set(e,g.value,g)}}dispose(A,e,g){}set(A,e,{ttl:g=this.ttl,start:C,noDisposeOnSet:t=this.noDisposeOnSet,size:Q=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,status:D}={}){if(Q=this.requireSize(A,e,Q,a),this.maxEntrySize&&Q>this.maxEntrySize)return D&&(D.set="miss",D.maxEntrySizeExceeded=!0),this.delete(A),this;let n=this.size===0?void 0:this.keyMap.get(A);if(n===void 0)n=this.newIndex(),this.keyList[n]=A,this.valList[n]=e,this.keyMap.set(A,n),this.next[this.tail]=n,this.prev[n]=this.tail,this.tail=n,this.size++,this.addItemSize(n,Q,D),D&&(D.set="add"),c=!1;else{this.moveToTail(n);let u=this.valList[n];if(e!==u){if(this.isBackgroundFetch(u)?u.__abortController.abort(new Error("replaced")):t||(this.dispose(u,A,"set"),this.disposeAfter&&this.disposed.push([u,A,"set"])),this.removeItemSize(n),this.valList[n]=e,this.addItemSize(n,Q,D),D){D.set="replace";let r=u&&this.isBackgroundFetch(u)?u.__staleWhileFetching:u;r!==void 0&&(D.oldValue=r)}}else D&&(D.set="update")}if(g!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),c||this.setItemTTL(n,g,C),this.statusTTL(D,n),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 A=this.valList[this.head];return this.evict(!0),A}}evict(A){let e=this.head,g=this.keyList[e],C=this.valList[e];return this.isBackgroundFetch(C)?C.__abortController.abort(new Error("evicted")):(this.dispose(C,g,"evict"),this.disposeAfter&&this.disposed.push([C,g,"evict"])),this.removeItemSize(e),A&&(this.keyList[e]=null,this.valList[e]=null,this.free.push(e)),this.head=this.next[e],this.keyMap.delete(g),this.size--,e}has(A,{updateAgeOnHas:e=this.updateAgeOnHas,status:g}={}){let C=this.keyMap.get(A);if(C!==void 0)if(this.isStale(C))g&&(g.has="stale",this.statusTTL(g,C));else return e&&this.updateItemAge(C),g&&(g.has="hit"),this.statusTTL(g,C),!0;else g&&(g.has="miss");return!1}peek(A,{allowStale:e=this.allowStale}={}){let g=this.keyMap.get(A);if(g!==void 0&&(e||!this.isStale(g))){let C=this.valList[g];return this.isBackgroundFetch(C)?C.__staleWhileFetching:C}}backgroundFetch(A,e,g,C){let t=e===void 0?void 0:this.valList[e];if(this.isBackgroundFetch(t))return t;let Q=new IC;g.signal&&g.signal.addEventListener("abort",()=>Q.abort(g.signal.reason));let a={signal:Q.signal,options:g,context:C},c=(B,i=!1)=>{let{aborted:E}=Q.signal,s=g.ignoreFetchAbort&&B!==void 0;return g.status&&(E&&!i?(g.status.fetchAborted=!0,g.status.fetchError=Q.signal.reason,s&&(g.status.fetchAbortIgnored=!0)):g.status.fetchResolved=!0),E&&!s&&!i?n(Q.signal.reason):(this.valList[e]===r&&(B===void 0?r.__staleWhileFetching?this.valList[e]=r.__staleWhileFetching:this.delete(A):(g.status&&(g.status.fetchUpdated=!0),this.set(A,B,a.options))),B)},D=B=>(g.status&&(g.status.fetchRejected=!0,g.status.fetchError=B),n(B)),n=B=>{let{aborted:i}=Q.signal,E=i&&g.allowStaleOnFetchAbort,s=E||g.allowStaleOnFetchRejection,h=s||g.noDeleteOnFetchRejection;if(this.valList[e]===r&&(!h||r.__staleWhileFetching===void 0?this.delete(A):E||(this.valList[e]=r.__staleWhileFetching)),s)return g.status&&r.__staleWhileFetching!==void 0&&(g.status.returnedStale=!0),r.__staleWhileFetching;if(r.__returned===r)throw B},u=(B,i)=>{this.fetchMethod(A,t,a).then(E=>B(E),i),Q.signal.addEventListener("abort",()=>{(!g.ignoreFetchAbort||g.allowStaleOnFetchAbort)&&(B(),g.allowStaleOnFetchAbort&&(B=E=>c(E,!0)))})};g.status&&(g.status.fetchDispatched=!0);let r=new Promise(u).then(c,D);return r.__abortController=Q,r.__staleWhileFetching=t,r.__returned=null,e===void 0?(this.set(A,r,{...a.options,status:void 0}),e=this.keyMap.get(A)):this.valList[e]=r,r}isBackgroundFetch(A){return A&&typeof A=="object"&&typeof A.then=="function"&&Object.prototype.hasOwnProperty.call(A,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(A,"__returned")&&(A.__returned===A||A.__returned===null)}async fetch(A,{allowStale:e=this.allowStale,updateAgeOnGet:g=this.updateAgeOnGet,noDeleteOnStaleGet:C=this.noDeleteOnStaleGet,ttl:t=this.ttl,noDisposeOnSet:Q=this.noDisposeOnSet,size:a=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:D=this.noUpdateTTL,noDeleteOnFetchRejection:n=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:r=this.ignoreFetchAbort,allowStaleOnFetchAbort:B=this.allowStaleOnFetchAbort,fetchContext:i=this.fetchContext,forceRefresh:E=!1,status:s,signal:h}={}){if(!this.fetchMethod)return s&&(s.fetch="get"),this.get(A,{allowStale:e,updateAgeOnGet:g,noDeleteOnStaleGet:C,status:s});let w={allowStale:e,updateAgeOnGet:g,noDeleteOnStaleGet:C,ttl:t,noDisposeOnSet:Q,size:a,sizeCalculation:c,noUpdateTTL:D,noDeleteOnFetchRejection:n,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:B,ignoreFetchAbort:r,status:s,signal:h},y=this.keyMap.get(A);if(y===void 0){s&&(s.fetch="miss");let F=this.backgroundFetch(A,y,w,i);return F.__returned=F}else{let F=this.valList[y];if(this.isBackgroundFetch(F)){let H=e&&F.__staleWhileFetching!==void 0;return s&&(s.fetch="inflight",H&&(s.returnedStale=!0)),H?F.__staleWhileFetching:F.__returned=F}let S=this.isStale(y);if(!E&&!S)return s&&(s.fetch="hit"),this.moveToTail(y),g&&this.updateItemAge(y),this.statusTTL(s,y),F;let k=this.backgroundFetch(A,y,w,i),M=k.__staleWhileFetching!==void 0,Y=M&&e;return s&&(s.fetch=M&&S?"stale":"refresh",Y&&S&&(s.returnedStale=!0)),Y?k.__staleWhileFetching:k.__returned=k}}get(A,{allowStale:e=this.allowStale,updateAgeOnGet:g=this.updateAgeOnGet,noDeleteOnStaleGet:C=this.noDeleteOnStaleGet,status:t}={}){let Q=this.keyMap.get(A);if(Q!==void 0){let a=this.valList[Q],c=this.isBackgroundFetch(a);return this.statusTTL(t,Q),this.isStale(Q)?(t&&(t.get="stale"),c?(t&&(t.returnedStale=e&&a.__staleWhileFetching!==void 0),e?a.__staleWhileFetching:void 0):(C||this.delete(A),t&&(t.returnedStale=e),e?a:void 0)):(t&&(t.get="hit"),c?a.__staleWhileFetching:(this.moveToTail(Q),g&&this.updateItemAge(Q),a))}else t&&(t.get="miss")}connect(A,e){this.prev[e]=A,this.next[A]=e}moveToTail(A){A!==this.tail&&(A===this.head?this.head=this.next[A]:this.connect(this.prev[A],this.next[A]),this.connect(this.tail,A),this.tail=A)}get del(){return $t("del","delete"),this.delete}delete(A){let e=!1;if(this.size!==0){let g=this.keyMap.get(A);if(g!==void 0)if(e=!0,this.size===1)this.clear();else{this.removeItemSize(g);let C=this.valList[g];this.isBackgroundFetch(C)?C.__abortController.abort(new Error("deleted")):(this.dispose(C,A,"delete"),this.disposeAfter&&this.disposed.push([C,A,"delete"])),this.keyMap.delete(A),this.keyList[g]=null,this.valList[g]=null,g===this.tail?this.tail=this.prev[g]:g===this.head?this.head=this.next[g]:(this.next[this.prev[g]]=this.next[g],this.prev[this.next[g]]=this.prev[g]),this.size--,this.free.push(g)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return e}clear(){for(let A of this.rindexes({allowStale:!0})){let e=this.valList[A];if(this.isBackgroundFetch(e))e.__abortController.abort(new Error("deleted"));else{let g=this.keyList[A];this.dispose(e,g,"delete"),this.disposeAfter&&this.disposed.push([e,g,"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 $u("length","size"),this.size}static get AbortController(){return IC}static get AbortSignal(){return LE}};HE.exports=Ng}),vE=N(ie=>{"use strict";var Ac=ie&&ie.__createBinding||(Object.create?(function(I,A,e,g){g===void 0&&(g=e);var C=Object.getOwnPropertyDescriptor(A,e);(!C||("get"in C?!A.__esModule:C.writable||C.configurable))&&(C={enumerable:!0,get:function(){return A[e]}}),Object.defineProperty(I,g,C)}):(function(I,A,e,g){g===void 0&&(g=e),I[g]=A[e]})),ec=ie&&ie.__setModuleDefault||(Object.create?(function(I,A){Object.defineProperty(I,"default",{enumerable:!0,value:A})}):function(I,A){I.default=A}),YE=ie&&ie.__importStar||function(I){if(I&&I.__esModule)return I;var A={};if(I!=null)for(var e in I)e!=="default"&&Object.prototype.hasOwnProperty.call(I,e)&&Ac(A,I,e);return ec(A,I),A};Object.defineProperty(ie,"__esModule",{value:!0}),ie.req=ie.json=ie.toBuffer=void 0;var gc=YE(require("http")),Ic=YE(require("https"));async function xE(I){let A=0,e=[];for await(let g of I)A+=g.length,e.push(g);return Buffer.concat(e,A)}ie.toBuffer=xE;async function Cc(I){let e=(await xE(I)).toString("utf8");try{return JSON.parse(e)}catch(g){let C=g;throw C.message+=` (input: ${e})`,C}}ie.json=Cc;function tc(I,A={}){let g=((typeof I=="string"?I:I.href).startsWith("https:")?Ic:gc).request(I,A),C=new Promise((t,Q)=>{g.once("response",t).once("error",Q).end()});return g.then=C.then.bind(C),g}ie.req=tc}),Ug=N(re=>{"use strict";var PE=re&&re.__createBinding||(Object.create?(function(I,A,e,g){g===void 0&&(g=e);var C=Object.getOwnPropertyDescriptor(A,e);(!C||("get"in C?!A.__esModule:C.writable||C.configurable))&&(C={enumerable:!0,get:function(){return A[e]}}),Object.defineProperty(I,g,C)}):(function(I,A,e,g){g===void 0&&(g=e),I[g]=A[e]})),Bc=re&&re.__setModuleDefault||(Object.create?(function(I,A){Object.defineProperty(I,"default",{enumerable:!0,value:A})}):function(I,A){I.default=A}),OE=re&&re.__importStar||function(I){if(I&&I.__esModule)return I;var A={};if(I!=null)for(var e in I)e!=="default"&&Object.prototype.hasOwnProperty.call(I,e)&&PE(A,I,e);return Bc(A,I),A},ic=re&&re.__exportStar||function(I,A){for(var e in I)e!=="default"&&!Object.prototype.hasOwnProperty.call(A,e)&&PE(A,I,e)};Object.defineProperty(re,"__esModule",{value:!0}),re.Agent=void 0;var Qc=OE(require("net")),TE=OE(require("http")),Ec=require("https");ic(vE(),re);var Ue=Symbol("AgentBaseInternalState"),IB=class extends TE.Agent{constructor(A){super(A),this[Ue]={}}isSecureEndpoint(A){if(A){if(typeof A.secureEndpoint=="boolean")return A.secureEndpoint;if(typeof A.protocol=="string")return A.protocol==="https:"}let{stack:e}=new Error;return typeof e!="string"?!1:e.split(` `).some(g=>g.indexOf("(https.js:")!==-1||g.indexOf("node:https:")!==-1)}incrementSockets(A){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[A]||(this.sockets[A]=[]);let e=new Qc.Socket({writable:!1});return this.sockets[A].push(e),this.totalSocketCount++,e}decrementSockets(A,e){if(!this.sockets[A]||e===null)return;let g=this.sockets[A],C=g.indexOf(e);C!==-1&&(g.splice(C,1),this.totalSocketCount--,g.length===0&&delete this.sockets[A])}getName(A){return this.isSecureEndpoint(A)?Ec.Agent.prototype.getName.call(this,A):super.getName(A)}createSocket(A,e,g){let C={...e,secureEndpoint:this.isSecureEndpoint(e)},t=this.getName(C),Q=this.incrementSockets(t);Promise.resolve().then(()=>this.connect(A,C)).then(a=>{if(this.decrementSockets(t,Q),a instanceof TE.Agent)try{return a.addRequest(A,C)}catch(c){return g(c)}this[Ue].currentSocket=a,super.createSocket(A,e,g)},a=>{this.decrementSockets(t,Q),g(a)})}createConnection(){let A=this[Ue].currentSocket;if(this[Ue].currentSocket=void 0,!A)throw new Error("No socket was returned in the `connect()` function");return A}get defaultPort(){return this[Ue].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(A){this[Ue]&&(this[Ue].defaultPort=A)}get protocol(){return this[Ue].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(A){this[Ue]&&(this[Ue].protocol=A)}};re.Agent=IB}),VE=N((lF,qE)=>{"use strict";var Lg=1e3,Jg=Lg*60,Kg=Jg*60,ug=Kg*24,sc=ug*7,rc=ug*365.25;qE.exports=function(I,A){A=A||{};var e=typeof I;if(e==="string"&&I.length>0)return oc(I);if(e==="number"&&isFinite(I))return A.long?ac(I):nc(I);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(I))};function oc(I){if(I=String(I),!(I.length>100)){var A=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(I);if(A){var e=parseFloat(A[1]),g=(A[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return e*rc;case"weeks":case"week":case"w":return e*sc;case"days":case"day":case"d":return e*ug;case"hours":case"hour":case"hrs":case"hr":case"h":return e*Kg;case"minutes":case"minute":case"mins":case"min":case"m":return e*Jg;case"seconds":case"second":case"secs":case"sec":case"s":return e*Lg;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function nc(I){var A=Math.abs(I);return A>=ug?Math.round(I/ug)+"d":A>=Kg?Math.round(I/Kg)+"h":A>=Jg?Math.round(I/Jg)+"m":A>=Lg?Math.round(I/Lg)+"s":I+"ms"}function ac(I){var A=Math.abs(I);return A>=ug?tC(I,A,ug,"day"):A>=Kg?tC(I,A,Kg,"hour"):A>=Jg?tC(I,A,Jg,"minute"):A>=Lg?tC(I,A,Lg,"second"):I+" ms"}function tC(I,A,e,g){var C=A>=e*1.5;return Math.round(I/e)+" "+g+(C?"s":"")}}),CB=N((wF,WE)=>{"use strict";function uc(I){e.debug=e,e.default=e,e.coerce=c,e.disable=Q,e.enable=C,e.enabled=a,e.humanize=VE(),e.destroy=D,Object.keys(I).forEach(n=>{e[n]=I[n]}),e.names=[],e.skips=[],e.formatters={};function A(n){let u=0;for(let r=0;r<n.length;r++)u=(u<<5)-u+n.charCodeAt(r),u|=0;return e.colors[Math.abs(u)%e.colors.length]}e.selectColor=A;function e(n){let u,r=null,B,i;function E(...s){if(!E.enabled)return;let h=E,w=Number(new Date),y=w-(u||w);h.diff=y,h.prev=u,h.curr=w,u=w,s[0]=e.coerce(s[0]),typeof s[0]!="string"&&s.unshift("%O");let F=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(k,M)=>{if(k==="%%")return"%";F++;let Y=e.formatters[M];if(typeof Y=="function"){let H=s[F];k=Y.call(h,H),s.splice(F,1),F--}return k}),e.formatArgs.call(h,s),(h.log||e.log).apply(h,s)}return E.namespace=n,E.useColors=e.useColors(),E.color=e.selectColor(n),E.extend=g,E.destroy=e.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>r!==null?r:(B!==e.namespaces&&(B=e.namespaces,i=e.enabled(n)),i),set:s=>{r=s}}),typeof e.init=="function"&&e.init(E),E}function g(n,u){let r=e(this.namespace+(typeof u>"u"?":":u)+n);return r.log=this.log,r}function C(n){e.save(n),e.namespaces=n,e.names=[],e.skips=[];let u=(typeof n=="string"?n:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let r of u)r[0]==="-"?e.skips.push(r.slice(1)):e.names.push(r)}function t(n,u){let r=0,B=0,i=-1,E=0;for(;r<n.length;)if(B<u.length&&(u[B]===n[r]||u[B]==="*"))u[B]==="*"?(i=B,E=r,B++):(r++,B++);else if(i!==-1)B=i+1,E++,r=E;else return!1;for(;B<u.length&&u[B]==="*";)B++;return B===u.length}function Q(){let n=[...e.names,...e.skips.map(u=>"-"+u)].join(",");return e.enable(""),n}function a(n){for(let u of e.skips)if(t(n,u))return!1;for(let u of e.names)if(t(n,u))return!0;return!1}function c(n){return n instanceof Error?n.stack||n.message:n}function D(){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 e.enable(e.load()),e}WE.exports=uc}),ZE=N((Qe,BC)=>{"use strict";Qe.formatArgs=Dc,Qe.save=hc,Qe.load=lc,Qe.useColors=cc,Qe.storage=wc(),Qe.destroy=(()=>{let I=!1;return()=>{I||(I=!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`."))}})(),Qe.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 cc(){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 I;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&&(I=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(I[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Dc(I){if(I[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+I[0]+(this.useColors?"%c ":" ")+"+"+BC.exports.humanize(this.diff),!this.useColors)return;let A="color: "+this.color;I.splice(1,0,A,"color: inherit");let e=0,g=0;I[0].replace(/%[a-zA-Z%]/g,C=>{C!=="%%"&&(e++,C==="%c"&&(g=e))}),I.splice(g,0,A)}Qe.log=console.debug||console.log||(()=>{});function hc(I){try{I?Qe.storage.setItem("debug",I):Qe.storage.removeItem("debug")}catch{}}function lc(){let I;try{I=Qe.storage.getItem("debug")||Qe.storage.getItem("DEBUG")}catch{}return!I&&typeof process<"u"&&"env"in process&&(I=process.env.DEBUG),I}function wc(){try{return localStorage}catch{}}BC.exports=CB()(Qe);var{formatters:fc}=BC.exports;fc.j=function(I){try{return JSON.stringify(I)}catch(A){return"[UnexpectedJSONParseError]: "+A.message}}}),XE=N((fF,_E)=>{"use strict";_E.exports=(I,A=process.argv)=>{let e=I.startsWith("-")?"":I.length===1?"-":"--",g=A.indexOf(e+I),C=A.indexOf("--");return g!==-1&&(C===-1||g<C)}}),$E=N((dF,zE)=>{"use strict";var dc=require("os"),jE=require("tty"),ue=XE(),{env:PA}=process,gg;ue("no-color")||ue("no-colors")||ue("color=false")||ue("color=never")?gg=0:(ue("color")||ue("colors")||ue("color=true")||ue("color=always"))&&(gg=1),"FORCE_COLOR"in PA&&(PA.FORCE_COLOR==="true"?gg=1:PA.FORCE_COLOR==="false"?gg=0:gg=PA.FORCE_COLOR.length===0?1:Math.min(parseInt(PA.FORCE_COLOR,10),3));function tB(I){return I===0?!1:{level:I,hasBasic:!0,has256:I>=2,has16m:I>=3}}function BB(I,A){if(gg===0)return 0;if(ue("color=16m")||ue("color=full")||ue("color=truecolor"))return 3;if(ue("color=256"))return 2;if(I&&!A&&gg===void 0)return 0;let e=gg||0;if(PA.TERM==="dumb")return e;if(process.platform==="win32"){let g=dc.release().split(".");return Number(g[0])>=10&&Number(g[2])>=10586?Number(g[2])>=14931?3:2:1}if("CI"in PA)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(g=>g in PA)||PA.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in PA)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(PA.TEAMCITY_VERSION)?1:0;if(PA.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in PA){let g=parseInt((PA.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(PA.TERM_PROGRAM){case"iTerm.app":return g>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(PA.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(PA.TERM)||"COLORTERM"in PA?1:e}function yc(I){let A=BB(I,I&&I.isTTY);return tB(A)}zE.exports={supportsColor:yc,stdout:tB(BB(!0,jE.isatty(1))),stderr:tB(BB(!0,jE.isatty(2)))}}),es=N((OA,QC)=>{"use strict";var Fc=require("tty"),iC=require("util");OA.init=mc,OA.log=kc,OA.formatArgs=Sc,OA.save=Mc,OA.load=Gc,OA.useColors=pc,OA.destroy=iC.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),OA.colors=[6,2,3,4,5,1];try{let I=$E();I&&(I.stderr||I).level>=2&&(OA.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}OA.inspectOpts=Object.keys(process.env).filter(I=>/^debug_/i.test(I)).reduce((I,A)=>{let e=A.substring(6).toLowerCase().replace(/_([a-z])/g,(C,t)=>t.toUpperCase()),g=process.env[A];return/^(yes|on|true|enabled)$/i.test(g)?g=!0:/^(no|off|false|disabled)$/i.test(g)?g=!1:g==="null"?g=null:g=Number(g),I[e]=g,I},{});function pc(){return"colors"in OA.inspectOpts?!!OA.inspectOpts.colors:Fc.isatty(process.stderr.fd)}function Sc(I){let{namespace:A,useColors:e}=this;if(e){let g=this.color,C="\x1B[3"+(g<8?g:"8;5;"+g),t=` ${C};1m${A} \x1B[0m`;I[0]=t+I[0].split(` `).join(` `+t),I.push(C+"m+"+QC.exports.humanize(this.diff)+"\x1B[0m")}else I[0]=Rc()+A+" "+I[0]}function Rc(){return OA.inspectOpts.hideDate?"":new Date().toISOString()+" "}function kc(...I){return process.stderr.write(iC.formatWithOptions(OA.inspectOpts,...I)+` `)}function Mc(I){I?process.env.DEBUG=I:delete process.env.DEBUG}function Gc(){return process.env.DEBUG}function mc(I){I.inspectOpts={};let A=Object.keys(OA.inspectOpts);for(let e=0;e<A.length;e++)I.inspectOpts[A[e]]=OA.inspectOpts[A[e]]}QC.exports=CB()(OA);var{formatters:As}=QC.exports;As.o=function(I){return this.inspectOpts.colors=this.useColors,iC.inspect(I,this.inspectOpts).split(` `).map(A=>A.trim()).join(" ")},As.O=function(I){return this.inspectOpts.colors=this.useColors,iC.inspect(I,this.inspectOpts)}}),ce=N((yF,iB)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?iB.exports=ZE():iB.exports=es()}),Is=N(gs=>{"use strict";var Nc=require("url").parse,Uc={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Lc=String.prototype.endsWith||function(I){return I.length<=this.length&&t