setup-bun/dist/setup/index.js

241 lines
2.3 MiB
JavaScript
Raw Normal View History

2024-07-29 20:07:21 +00:00
var rue=Object.create;var Zm=Object.defineProperty;var iue=Object.getOwnPropertyDescriptor;var sue=Object.getOwnPropertyNames;var nue=Object.getPrototypeOf,aue=Object.prototype.hasOwnProperty;var dA=(A,e)=>()=>(A&&(e=A(A=0)),e);var E=(A,e)=>()=>(e||A((e={exports:{}}).exports,e),e.exports),_b=(A,e)=>{for(var t in e)Zm(A,t,{get:e[t],enumerable:!0})},E7=(A,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of sue(e))!aue.call(A,i)&&i!==t&&Zm(A,i,{get:()=>e[i],enumerable:!(r=iue(e,i))||r.enumerable});return A};var Si=(A,e,t)=>(t=A!=null?rue(nue(A)):{},E7(e||!A||!A.__esModule?Zm(t,"default",{value:A,enumerable:!0}):t,A)),cc=A=>E7(Zm({},"__esModule",{value:!0}),A);var Km=E(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.toCommandProperties=Ip.toCommandValue=void 0;function oue(A){return A==null?"":typeof A=="string"||A instanceof String?A:JSON.stringify(A)}Ip.toCommandValue=oue;function cue(A){return Object.keys(A).length?{title:A.title,file:A.file,line:A.startLine,endLine:A.endLine,col:A.startColumn,endColumn:A.endColumn}:{}}Ip.toCommandProperties=cue});var B7=E(Ws=>{"use strict";var lue=Ws&&Ws.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),due=Ws&&Ws.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),pue=Ws&&Ws.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&lue(e,A,t);return due(e,A),e};Object.defineProperty(Ws,"__esModule",{value:!0});Ws.issue=Ws.issueCommand=void 0;var uue=pue(require("os")),Q7=Km();function m7(A,e,t){let r=new Jb(A,e,t);process.stdout.write(r.toString()+uue.EOL)}Ws.issueCommand=m7;function gue(A,e=""){m7(A,{},e)}Ws.issue=gue;var C7="::",Jb=class{constructor(e,t,r){e||(e="missing.command"),this.command=e,this.properties=t,this.message=r}toString(){let e=C7+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=!0;for(let r in this.properties)if(this.properties.hasOwnProperty(r)){let i=this.properties[r];i&&(t?t=!1:e+=",",e+=`${r}=${Eue(i)}`)}}return e+=`${C7}${hue(this.message)}`,e}};function hue(A){return Q7.toCommandValue(A).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function Eue(A){return Q7.toCommandValue(A).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});function aE(){return $m>eB.length-16&&(I7.default.randomFillSync(eB),$m=0),eB.slice($m,$m+=16)}var I7,eB,$m,Vb=dA(()=>{I7=Si(require("crypto")),eB=new Uint8Array(256),$m=eB.length});var f7,y7=dA(()=>{f7=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function Cue(A){return typeof A=="string"&&f7.test(A)}var lc,oE=dA(()=>{y7();lc=Cue});function Que(A,e=0){let t=(Dr[A[e+0]]+Dr[A[e+1]]+Dr[A[e+2]]+Dr[A[e+3]]+"-"+Dr[A[e+4]]+Dr[A[e+5]]+"-"+Dr[A[e+6]]+Dr[A[e+7]]+"-"+Dr[A[e+8]]+Dr[A[e+9]]+"-"+Dr[A[e+10]]+Dr[A[e+11]]+Dr[A[e+12]]+Dr[A[e+13]]+Dr[A[e+14]]+Dr[A[e+15]]).toLowerCase();if(!lc(t))throw TypeError("Stringified UUID is invalid");return t}var Dr,dc,cE=dA(()=>{oE();Dr=[];for(let A=0;A<256;++A)Dr.push((A+256).toString(16).substr(1));dc=Que});function mue(A,e,t){let r=e&&t||0,i=e||new Array(16);A=A||{};let s=A.node||w7,n=A.clockseq!==void 0?A.clockseq:Wb;if(s==null||n==null){let p=A.random||(A.rng||aE)();s==null&&(s=w7=[p[0]|1,p[1],p[2],p[3],p[4],p[5]]),n==null&&(n=Wb=(p[6]<<8|p[7])&16383)}let a=A.msecs!==void 0?A.msecs:Date.now(),o=A.nsecs!==void 0?A.nsecs:jb+1,c=a-zb+(o-jb)/1e4;if(c<0&&A.clockseq===void 0&&(n=n+1&16383),(c<0||a>zb)&&A.nsecs===void 0&&(o=0),o>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");zb=a,jb=o,Wb=n,a+=122192928e5;let l=((a&268435455)*1e4+o)%4294967296;i[r++]=l>>>24&255,i[r++]=l>>>16&255,i[r++]=l>>>8&255,i[r++]=l&255;let d=a/4294967296*1e4&268435455;i[r++]=d>>>8&255,i[r++]=d&255,i[r++]=d>
`,d.message,d.stack);var p=new Error("tunneling socket could not be established, cause="+d.message);p.code="ECONNRESET",e.request.emit("error",p),r.removeSocket(i)}};to.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(t!==-1){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,function(i){r.request.onSocket(i)})}};function K7(A,e){var t=this;to.prototype.createSocket.call(t,A,function(r){var i=A.request.getHeader("host"),s=eN({},t.options,{socket:r,servername:i?i.replace(/:.*$/,""):A.host}),n=Tue.connect(0,s);t.sockets[t.sockets.indexOf(r)]=n,e(n)})}function $7(A,e,t){return typeof A=="string"?{host:A,port:e,localAddress:t}:A}function eN(A){for(var e=1,t=arguments.length;e<t;++e){var r=arguments[e];if(typeof r=="object")for(var i=Object.keys(r),s=0,n=i.length;s<n;++s){var a=i[s];r[a]!==void 0&&(A[a]=r[a])}}return A}var pc;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?pc=function(){var A=Array.prototype.slice.call(arguments);typeof A[0]=="string"?A[0]="TUNNEL: "+A[0]:A.unshift("TUNNEL:"),console.error.apply(console,A)}:pc=function(){};yp.debug=pc});var lE=E((reA,AL)=>{AL.exports=eL()});var nt=E((ieA,tL)=>{tL.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version")}});var qA=E((seA,rL)=>{"use strict";var Gt=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}},AN=class A extends Gt{constructor(e){super(e),Error.captureStackTrace(this,A),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},tN=class A extends Gt{constructor(e){super(e),Error.captureStackTrace(this,A),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},rN=class A extends Gt{constructor(e){super(e),Error.captureStackTrace(this,A),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},iN=class A extends Gt{constructor(e){super(e),Error.captureStackTrace(this,A),this.name="BodyTimeoutError",this.message=e||"Body Timeout E
\r
`),Nge=/\r\n/g,Dge=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function bp(A){wL.call(this),A=A||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=yL(A,"maxHeaderPairs",2e3),this.maxHeaderSize=yL(A,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new wge(bge),this.ss.on("info",function(t,r,i,s){r&&!e.maxed&&(e.nread+s-i>=e.maxHeaderSize?(s=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=s-i,e.buffer+=r.toString("binary",i,s)),t&&e._finish()})}yge(bp,wL);bp.prototype.push=function(A){let e=this.ss.push(A);if(this.finished)return e};bp.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};bp.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let A=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",A)};bp.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let A=this.buffer.split(Nge),e=A.length,t,r;for(var i=0;i<e;++i){if(A[i].length===0)continue;if((A[i][0]===" "||A[i][0]===" ")&&r){this.header[r][this.header[r].length-1]+=A[i];continue}let s=A[i].indexOf(":");if(s===-1||s===0)return;if(t=Dge.exec(A[i]),r=t[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(t[2]||""),++this.npairs===this.maxHeaderPairs)break}};bL.exports=bp});var bN=E((peA,RL)=>{"use strict";var wN=require("node:stream").Writable,Rge=require("node:util").inherits,xge=fN(),DL=IL(),Sge=NL(),vge=45,kge=Buffer.from("-"),Fge=Buffer.from(`\r
`),Lge=function(){};function Sn(A){if(!(this instanceof Sn))return new Sn(A);if(wN.call(this,A),!A||!A.headerFirst&&typeof A.boundary!="string")throw new TypeError("Boundary required");typeof A.boundary=="string"?this.setBoundary(A.boundary):this._bparser=void 0,this._headerFirst=A.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:A.partHwm},this._pause=!1;let e=this;this._hparser=new Sge(A),this._hparser.on("header",function(t){e._inHeader=!1,e._part.emit("header",t)})}Rge(Sn,wN);Sn.prototype.emit=function(A){if(A==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else wN.prototype.emit.apply(this,arguments)};Sn.prototype._write=function(A,e,t){if(!this._hparser&&!this._bparser)return t();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new DL(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(A);if(!this._inHeader&&r!==void 0&&r<A.length)A=A.slice(r);else return t()}this._firstWrite&&(this._bparser.push(Fge),this._firstWrite=!1),this._bparser.push(A),this._pause?this._cb=t:t()};Sn.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Sn.prototype.setBoundary=function(A){let e=this;this._bparser=new xge(`\r
--`+A),this._bparser.on("info",function(t,r,i,s){e._oninfo(t,r,i,s)})};Sn.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",Lge),this._part.resume())};Sn.prototype._oninfo=function(A,e,t,r){let i,s=this,n=0,a,o=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&t+n<r;)if(e[t+n]===vge)++n,++this._dashes;else{this._dashes&&(i=kge),this._dashes=0;break}if(this._dashes===2&&(t+n<r&&this._events.trailer&&this.emit("trailer",e.slice(t+n,r)),this.reset(),this._finished=!0,s._parts===0&&(s._realFinish=!0,s.emit("finish"),s._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new DL(this._partOpts),this._part._read=function(c){s._unpause()},this._isPreamble&&this._events.preamble?this.emit("preamble",this._part):this._isPreamble!==!0&&this._events.part?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&t<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(o=this._part.push(i)),o=this._part.push(e.slice(t,r)),o||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),a=this._hparser.push(e.slice(t,r)),!this._inHeader&&a!==void 0&&a<r&&this._oninfo(!1,e,t+a,r))),A&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:t!==r&&(++this._parts,this._part.on("end",function(){--s._parts===0&&(s._finished?(s._realFinish=!0,s.emit("finish"),s._realFinish=!1):s._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};Sn.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let A=this._cb;this._cb=void 0,A()}};RL.exports=Sn});var cB=E((ueA,SL)=>{"use strict";var xL=new TextDecoder("utf-8"),oB=new Map([["utf-8",xL],["utf8",xL]]);function Uge(A,e,t){if(A)if(oB.has(t))try{return oB.get(t).decode(Buffer.from(A,e))}catch{}else try{return oB.set(t,new TextDecoder(t)),oB.get(t).decode(Buffer.from(A,e))}catch{}return A}SL.exports=Uge});var NN=E((geA,FL)=>{"use strict";var lB=cB(),vL=/%([a-fA-F0-9]{2})/g;function kL(A,e){return String.fromCharCode(parseInt(e,16))}function Mge(A){let e=[],t="key",r="",i=!1,s=!1,n=0,a="";for(var o=0,c=A.length;o<c;++o){let l=A[o];if(l==="\\"&&i)if(s)s=!1;else{s=!0;continue}else if(l==='"')if(s)s=!1;else{i?(i=!1,t="key"):i=!0;continue}else if(s&&i&&(a+="\\"),s=!1,(t==="charset"||t==="lang")&&l==="'"){t==="charset"?(t="lang",r=a.substring(1)):t="value",a="";continue}else if(t==="key"&&(l==="*"||l==="=")&&e.length){l==="*"?t="charset":t="value",e[n]=[a,void 0],a="";continue}else if(!i&&l===";"){t="key",r?(a.length&&(a=lB(a.replace(vL,kL),"binary",r)),r=""):a.length&&(a=lB(a,"binary","utf8")),e[n]===void 0?e[n]=a:e[n][1]=a,a="",++n;continue}else if(!i&&(l===" "||l===" "))continue;a+=l}return r&&a.length?a=lB(a.replace(vL,kL),"binary",r):a&&(a=lB(a,"binary","utf8")),e[n]===void 0?a&&(e[n]=a):e[n][1]=a,e}FL.exports=Mge});var UL=E((heA,LL)=>{"use strict";LL.exports=function(e){if(typeof e!="string")return"";for(var t=e.length-1;t>=0;--t)switch(e.charCodeAt(t)){case 47:case 92:return e=e.slice(t+1),e===".."||e==="."?"":e}return e===".."||e==="."?"":e}});var YL=E((EeA,OL)=>{"use strict";var{Readable:TL}=require("node:stream"),{inherits:Tge}=require("node:util"),Oge=bN(),ML=NN(),Yge=cB(),qge=UL(),Tl=aB(),Pge=/^boundary$/i,Hge=/^form-data$/i,Gge=/^charset$/i,_ge=/^filename$/i,Jge=/^name$/i;dB.detect=/^multipart\/form-data/i;function dB(A,e){let t,r,i=this,s,n=e.limits,a=e.isPartAFile||((S,x,F)=>x==="application/octet-stream"||F!==void 0),o=e.parsedConType||[],c=e.defCharset||"utf8",l=e.preservePath,d={highWaterMark:e.fileHwm};for(t=0,r=o.length;t<r;++t)if(Array.isArray(o[t])&&Pge.test(o[t][0])){s=o[t][1];break}function p(){b===0&&v&&!A._done&&(v=!1,i.end())}if(typeof s!="string")throw new Error("Multipart: Boundary not found");let u=Tl(n,"fieldSize",1*1024*1024),g=Tl(n,"fileSize",1/0),h=Tl(n,"files",1/0),Q=Tl(n,"fields",1/0),B=Tl(n,"parts",1/0),w=Tl(n,"headerPairs",2e3),I=Tl(n,"headerSize",80*1024),C=0,m=0,b=0,R,y,v=!1;this._needDrain=!1,this._pause=!1,this._cb=void 0,th
`))}function Lhe(A,e){let{headersList:t}=e,r=(t.get("referrer-policy")??"").split(","),i="";if(r.length>0)for(let s=r.length;s!==0;s--){let n=r[s-1].trim();if(Ihe.includes(n)){i=n;break}}i!==""&&(A.referrerPolicy=i)}function Uhe(){return"allowed"}function Mhe(){return"success"}function The(){return"success"}function Ohe(A){let e=null;e=A.mode,A.headersList.set("sec-fetch-mode",e)}function Yhe(A){let e=A.origin;if(A.responseTainting==="cors"||A.mode==="websocket")e&&A.headersList.append("origin",e);else if(A.method!=="GET"&&A.method!=="HEAD"){switch(A.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":A.origin&&LN(A.origin)&&!LN(hE(A))&&(e=null);break;case"same-origin":uB(A,hE(A))||(e=null);break;default:}e&&A.headersList.append("origin",e)}}function qhe(A){return yhe.now()}function Phe(A){return{startTime:A.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:A.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function Hhe(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function Ghe(A){return{referrerPolicy:A.referrerPolicy}}function _he(A){let e=A.referrerPolicy;Sp(e);let t=null;if(A.referrer==="client"){let a=fhe();if(!a||a.origin==="null")return"no-referrer";t=new URL(a)}else A.referrer instanceof URL&&(t=A.referrer);let r=kN(t),i=kN(t,!0);r.toString().length>4096&&(r=i);let s=uB(A,r),n=uE(r)&&!uE(A.url);switch(e){case"origin":return i??kN(t,!0);case"unsafe-url":return r;case"same-origin":return s?i:"no-referrer";case"origin-when-cross-origin":return s?r:i;case"strict-origin-when-cross-origin":{let a=hE(A);return uB(r,a)?r:uE(r)&&!uE(a)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return n?"no-referrer":i}}function kN(A,e){return Sp(A instanceof URL),A.protocol==="file:"||A.protocol==="about:"||A.protocol==="blank:"?"no-referrer":(A.username="",A.password="",A.hash="",e&&(A.pathname="",A.search=""),A)}function uE(A){if(!(A instanceof URL))return!1;if(A.href==="about:blank"||A.href==="about:srcdoc"||A.protocol==="data:"||A.protocol==="file:")return!0;return e(A.origin);function e(t){if(t==null||t==="null")return!1;let r=new URL(t);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}function Jhe(A,e){if(gE===void 0)return!0;let t=Whe(e);if(t==="no metadata"||t.length===0)return!0;let r=t.sort((n,a)=>a.algo.localeCompare(n.algo)),i=r[0].algo,s=r.filter(n=>n.algo===i);for(let n of s){let a=n.algo,o=n.hash;o.endsWith("==")&&(o=o.slice(0,-2));let c=gE.createHash(a).update(A).digest("base64");if(c.endsWith("==")&&(c=c.slice(0,-2)),c===o)return!0;let l=gE.createHash(a).update(A).digest("base64url");if(l.endsWith("==")&&(l=l.slice(0,-2)),l===o)return!0}return!1}var Vhe=/((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function Whe(A){let e=[],t=!0,r=gE.getHashes();for(let i of A.split(" ")){t=!1;let s=Vhe.exec(i);if(s===null||s.groups===void 0)continue;let n=s.groups.algo;r.includes(n.toLowerCase())&&e.push(s.groups)}return t===!0?"no metadata":e}function zhe(A){}function uB(A,e){return A.origin===e.origin&&A.origin==="null"||A.protocol===e.protocol&&A.hostname===e.hostname&&A.port===e.port}function jhe(){let A,e;return{promise:new Promise((r,i)=>{A=r,e=i}),resolve:A,reject:e}}function Xhe(A){return A.controller.state==="aborted"}function Zhe(A){return A.controller.state==="aborted"||A.controller.state==="terminated"}function Khe(A){return/^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(A)?A.toUpperCase():A}function $he(A){let e=JSON.stringify(A);if(e===void 0)throw new TypeError("Value is not JSON serializable");return Sp(typeof e=="string"),e}var eEe=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function AEe(A,e,t){let r={index:
`||A===" "||A===" "}function UN(A,e=!0,t=!0){let r=0,i=A.length-1;if(e)for(;r<A.length&&iU(A[r]);r++);if(t)for(;i>0&&iU(A[i]);i--);return A.slice(r,i+1)}function sU(A){return A==="\r"||A===`
`||A===" "||A==="\f"||A===" "}function IEe(A,e=!0,t=!0){let r=0,i=A.length-1;if(e)for(;r<A.length&&sU(A[r]);r++);if(t)for(;i>0&&sU(A[i]);i--);return A.slice(r,i+1)}cU.exports={dataURLProcessor:CEe,URLSerializer:nU,collectASequenceOfCodePoints:EB,collectASequenceOfCodePointsFast:vp,stringPercentDecode:aU,parseMIMEType:MN,collectAnHTTPQuotedString:oU,serializeAMimeType:BEe}});var CB=E((NeA,gU)=>{"use strict";var{Blob:pU,File:lU}=require("buffer"),{types:TN}=require("util"),{kState:ss}=io(),{isBlobLike:uU}=js(),{webidl:hA}=oi(),{parseMIMEType:fEe,serializeAMimeType:yEe}=vn(),{kEnumerableProperty:dU}=iA(),EE=class A extends pU{constructor(e,t,r={}){hA.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=hA.converters["sequence<BlobPart>"](e),t=hA.converters.USVString(t),r=hA.converters.FilePropertyBag(r);let i=t,s=r.type,n;e:{if(s){if(s=fEe(s),s==="failure"){s="";break e}s=yEe(s).toLowerCase()}n=r.lastModified}super(wEe(e,r),{type:s}),this[ss]={name:i,lastModified:n,type:s}}get name(){return hA.brandCheck(this,A),this[ss].name}get lastModified(){return hA.brandCheck(this,A),this[ss].lastModified}get type(){return hA.brandCheck(this,A),this[ss].type}},ON=class A{constructor(e,t,r={}){let i=t,s=r.type,n=r.lastModified??Date.now();this[ss]={blobLike:e,name:i,type:s,lastModified:n}}stream(...e){return hA.brandCheck(this,A),this[ss].blobLike.stream(...e)}arrayBuffer(...e){return hA.brandCheck(this,A),this[ss].blobLike.arrayBuffer(...e)}slice(...e){return hA.brandCheck(this,A),this[ss].blobLike.slice(...e)}text(...e){return hA.brandCheck(this,A),this[ss].blobLike.text(...e)}get size(){return hA.brandCheck(this,A),this[ss].blobLike.size}get type(){return hA.brandCheck(this,A),this[ss].blobLike.type}get name(){return hA.brandCheck(this,A),this[ss].name}get lastModified(){return hA.brandCheck(this,A),this[ss].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(EE.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:dU,lastModified:dU});hA.converters.Blob=hA.interfaceConverter(pU);hA.converters.BlobPart=function(A,e){if(hA.util.Type(A)==="Object"){if(uU(A))return hA.converters.Blob(A,{strict:!1});if(ArrayBuffer.isView(A)||TN.isAnyArrayBuffer(A))return hA.converters.BufferSource(A,e)}return hA.converters.USVString(A,e)};hA.converters["sequence<BlobPart>"]=hA.sequenceConverter(hA.converters.BlobPart);hA.converters.FilePropertyBag=hA.dictionaryConverter([{key:"lastModified",converter:hA.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:hA.converters.DOMString,defaultValue:""},{key:"endings",converter:A=>(A=hA.converters.DOMString(A),A=A.toLowerCase(),A!=="native"&&(A="transparent"),A),defaultValue:"transparent"}]);function wEe(A,e){let t=[];for(let r of A)if(typeof r=="string"){let i=r;e.endings==="native"&&(i=bEe(i)),t.push(new TextEncoder().encode(i))}else TN.isAnyArrayBuffer(r)||TN.isTypedArray(r)?r.buffer?t.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):t.push(new Uint8Array(r)):uU(r)&&t.push(r);return t}function bEe(A){let e=`
2024-07-29 19:19:44 +00:00
`;return process.platform==="win32"&&(e=`\r
2024-07-29 20:07:21 +00:00
`),A.replace(/\r?\n/g,e)}function NEe(A){return lU&&A instanceof lU||A instanceof EE||A&&(typeof A.stream=="function"||typeof A.arrayBuffer=="function")&&A[Symbol.toStringTag]==="File"}gU.exports={File:EE,FileLike:ON,isFileLike:NEe}});var mB=E((DeA,mU)=>{"use strict";var{isBlobLike:QB,toUSVString:DEe,makeIterator:YN}=js(),{kState:Vr}=io(),{File:QU,FileLike:hU,isFileLike:REe}=CB(),{webidl:DA}=oi(),{Blob:xEe,File:qN}=require("buffer"),EU=qN??QU,kp=class A{constructor(e){if(e!==void 0)throw DA.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[Vr]=[]}append(e,t,r=void 0){if(DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!QB(t))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=DA.converters.USVString(e),t=QB(t)?DA.converters.Blob(t,{strict:!1}):DA.converters.USVString(t),r=arguments.length===3?DA.converters.USVString(r):void 0;let i=CU(e,t,r);this[Vr].push(i)}delete(e){DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=DA.converters.USVString(e),this[Vr]=this[Vr].filter(t=>t.name!==e)}get(e){DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=DA.converters.USVString(e);let t=this[Vr].findIndex(r=>r.name===e);return t===-1?null:this[Vr][t].value}getAll(e){return DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=DA.converters.USVString(e),this[Vr].filter(t=>t.name===e).map(t=>t.value)}has(e){return DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=DA.converters.USVString(e),this[Vr].findIndex(t=>t.name===e)!==-1}set(e,t,r=void 0){if(DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!QB(t))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=DA.converters.USVString(e),t=QB(t)?DA.converters.Blob(t,{strict:!1}):DA.converters.USVString(t),r=arguments.length===3?DEe(r):void 0;let i=CU(e,t,r),s=this[Vr].findIndex(n=>n.name===e);s!==-1?this[Vr]=[...this[Vr].slice(0,s),i,...this[Vr].slice(s+1).filter(n=>n.name!==e)]:this[Vr].push(i)}entries(){return DA.brandCheck(this,A),YN(()=>this[Vr].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return DA.brandCheck(this,A),YN(()=>this[Vr].map(e=>[e.name,e.value]),"FormData","key")}values(){return DA.brandCheck(this,A),YN(()=>this[Vr].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,t=globalThis){if(DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(t,[i,r,this])}};kp.prototype[Symbol.iterator]=kp.prototype.entries;Object.defineProperties(kp.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function CU(A,e,t){if(A=Buffer.from(A).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(REe(e)||(e=e instanceof xEe?new EU([e],"blob",{type:e.type}):new hU(e,"blob",{type:e.type})),t!==void 0){let r={type:e.type,lastModified:e.lastModified};e=qN&&e instanceof qN||e instanceof QU?new EU([e],t,r):new hU(e,t,r)}return{name:A,value:e}}mU.exports={FormData:kp}});var CE=E((ReA,RU)=>{"use strict";var SEe=VL(),Fp=iA(),{ReadableStreamFrom:vEe,isBlobLike:BU,isReadableStreamLike:kEe,readableStreamClose:FEe,createDeferredPromise:LEe,fullyReadBody:UEe}=js(),{FormData:IU}=mB(),{kState:no}=io(),{webidl:PN}=oi(),{DOMException:wU,structuredClone:MEe}=hc(),{Blob:TEe,File:OEe}=require("buffer"),{kBodyUsed:YEe}=nt(),HN=require("assert"),{isErrored:qEe}=iA(),{isUint8Array:bU,isArrayBuffer:PEe}=require("util/types"),{File:HEe}=CB(),{parseMIMEType:GEe,serializeAMimeType:_Ee}=vn(),so=globalThis.ReadableStream,fU=OEe??HEe;function NU(A,e=!1){so||(so=require("stream/web").ReadableStream);let t=null;A instanceof so?t=A:BU(A)?t=A.stream():t=new so({async pull(o){o.enqueue(typeof i=="string"?new T
2024-07-29 19:19:44 +00:00
Content-Disposition: form-data`;let l=B=>B.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),d=B=>B.replace(/\r?\n|\r/g,`\r
`),p=new TextEncoder,u=[],g=new Uint8Array([13,10]);s=0;let h=!1;for(let[B,w]of A)if(typeof w=="string"){let I=p.encode(c+`; name="${l(d(B))}"\r
\r
${d(w)}\r
`);u.push(I),s+=I.byteLength}else{let I=p.encode(`${c}; name="${l(d(B))}"`+(w.name?`; filename="${l(w.name)}"`:"")+`\r
Content-Type: ${w.type||"application/octet-stream"}\r
\r
2024-07-29 20:07:21 +00:00
`);u.push(I,w,g),typeof w.size=="number"?s+=I.byteLength+w.size+g.byteLength:h=!0}let Q=p.encode(`--${o}--`);u.push(Q),s+=Q.byteLength,h&&(s=null),i=A,r=async function*(){for(let B of u)B.stream?yield*B.stream():yield B},n="multipart/form-data; boundary="+o}else if(BU(A))i=A,s=A.size,A.type&&(n=A.type);else if(typeof A[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Fp.isDisturbed(A)||A.locked)throw new TypeError("Response body object should not be disturbed or locked");t=A instanceof so?A:vEe(A)}if((typeof i=="string"||Fp.isBuffer(i))&&(s=Buffer.byteLength(i)),r!=null){let o;t=new so({async start(){o=r(A)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:d}=await o.next();return d?queueMicrotask(()=>{c.close()}):qEe(t)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await o.return()},type:void 0})}return[{stream:t,source:i,length:s},n]}function JEe(A,e=!1){return so||(so=require("stream/web").ReadableStream),A instanceof so&&(HN(!Fp.isDisturbed(A),"The body has already been consumed."),HN(!A.locked,"The stream is locked.")),NU(A,e)}function VEe(A){let[e,t]=A.stream.tee(),r=MEe(t,{transfer:[t]}),[,i]=r.tee();return A.stream=e,{stream:i,length:A.length,source:A.source}}async function*yU(A){if(A)if(bU(A))yield A;else{let e=A.stream;if(Fp.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[YEe]=!0,yield*e}}function GN(A){if(A.aborted)throw new wU("The operation was aborted.","AbortError")}function WEe(A){return{blob(){return BB(this,t=>{let r=ZEe(this);return r==="failure"?r="":r&&(r=_Ee(r)),new TEe([t],{type:r})},A)},arrayBuffer(){return BB(this,t=>new Uint8Array(t).buffer,A)},text(){return BB(this,DU,A)},json(){return BB(this,XEe,A)},async formData(){PN.brandCheck(this,A),GN(this[no]);let t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){let r={};for(let[a,o]of this.headers)r[a.toLowerCase()]=o;let i=new IU,s;try{s=new SEe({headers:r,preservePath:!0})}catch(a){throw new wU(`${a}`,"AbortError")}s.on("field",(a,o)=>{i.append(a,o)}),s.on("file",(a,o,c,l,d)=>{let p=[];if(l==="base64"||l.toLowerCase()==="base64"){let u="";o.on("data",g=>{u+=g.toString().replace(/[\r\n]/gm,"");let h=u.length-u.length%4;p.push(Buffer.from(u.slice(0,h),"base64")),u=u.slice(h)}),o.on("end",()=>{p.push(Buffer.from(u,"base64")),i.append(a,new fU(p,c,{type:d}))})}else o.on("data",u=>{p.push(u)}),o.on("end",()=>{i.append(a,new fU(p,c,{type:d}))})});let n=new Promise((a,o)=>{s.on("finish",a),s.on("error",c=>o(new TypeError(c)))});if(this.body!==null)for await(let a of yU(this[no].body))s.write(a);return s.end(),await n,i}else if(/application\/x-www-form-urlencoded/.test(t)){let r;try{let s="",n=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of yU(this[no].body)){if(!bU(a))throw new TypeError("Expected Uint8Array chunk");s+=n.decode(a,{stream:!0})}s+=n.decode(),r=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new IU;for(let[s,n]of r)i.append(s,n);return i}else throw await Promise.resolve(),GN(this[no]),PN.errors.exception({header:`${A.name}.formData`,message:"Could not parse content as FormData."})}}}function zEe(A){Object.assign(A.prototype,WEe(A))}async function BB(A,e,t){if(PN.brandCheck(A,t),GN(A[no]),jEe(A[no].body))throw new TypeError("Body is unusable");let r=LEe(),i=n=>r.reject(n),s=n=>{try{r.resolve(e(n))}catch(a){i(a)}};return A[no].body==null?(s(new Uint8Array),r.promise):(await UEe(A[no].body,s,i),r.promise)}function jEe(A){return A!=null&&(A.stream.locked||Fp.isDisturbed(A.stream))}function DU(A){return A.length===0?"":(A[0]===239&&A[1]===187&&A[2]===191&&(A=A.subarray(3)),new TextDecoder().decode(A))}function XEe(A){return JSON.parse(DU(A))}function ZEe(A){let{headersList:e}=A[no],t=e.get("content-type");return t===null?"failure":GEe(t)}RU.exports={extractBody:NU,safelyExtractBody:JEe,cloneBody:VEe,mixinBody:zEe}});var kU=E((xeA,vU)=>{"use strict";var{InvalidArgumentError:PA,NotSupportedError:KEe}=qA(),ao=require("assert"),{kHTTP2BuildRequest:$Ee,
2024-07-29 19:19:44 +00:00
`),this.body=Q.stream,this.contentLength=Q.length}else ns.isBlobLike(i)&&this.contentType==null&&i.type&&(this.contentType=i.type,this.headers+=`content-type: ${i.type}\r
2024-07-29 20:07:21 +00:00
`);ns.validateHandler(h,r,c),this.servername=ns.getServerName(this.host),this[oo]=h,_t.create.hasSubscribers&&_t.create.publish({request:this})}onBodySent(e){if(this[oo].onBodySent)try{this[oo].onBodySent(e)}catch(t){this.onError(t)}}onRequestSent(){_t.bodySent.hasSubscribers&&_t.bodySent.publish({request:this})}onConnect(e){return ao(!this.aborted),ao(!this.completed),this[oo].onConnect(e)}onHeaders(e,t,r,i){return ao(!this.aborted),ao(!this.completed),_t.headers.hasSubscribers&&_t.headers.publish({request:this,response:{statusCode:e,headers:t,statusText:i}}),this[oo].onHeaders(e,t,r,i)}onData(e){return ao(!this.aborted),ao(!this.completed),this[oo].onData(e)}onUpgrade(e,t,r){return ao(!this.aborted),ao(!this.completed),this[oo].onUpgrade(e,t,r)}onComplete(e){return ao(!this.aborted),this.completed=!0,_t.trailers.hasSubscribers&&_t.trailers.publish({request:this,trailers:e}),this[oo].onComplete(e)}onError(e){if(_t.error.hasSubscribers&&_t.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[oo].onError(e)}addHeader(e,t){return QE(this,e,t),this}static[ACe](e,t,r){return new A(e,t,r)}static[$Ee](e,t,r){let i=t.headers;t={...t,headers:null};let s=new A(e,t,r);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new PA("headers array must be even");for(let n=0;n<i.length;n+=2)QE(s,i[n],i[n+1],!0)}else if(i&&typeof i=="object"){let n=Object.keys(i);for(let a=0;a<n.length;a++){let o=n[a];QE(s,o,i[o],!0)}}else if(i!=null)throw new PA("headers must be an object or an array");return s}static[eCe](e){let t=e.split(`\r
`),r={};for(let i of t){let[s,n]=i.split(": ");n==null||n.length===0||(r[s]?r[s]+=`,${n}`:r[s]=n)}return r}};function Ol(A,e,t){if(e&&typeof e=="object")throw new PA(`invalid ${A} header`);if(e=e!=null?`${e}`:"",SU.exec(e)!==null)throw new PA(`invalid ${A} header`);return t?e:`${A}: ${e}\r
`}function QE(A,e,t,r=!1){if(t&&typeof t=="object"&&!Array.isArray(t))throw new PA(`invalid ${e} header`);if(t===void 0)return;if(A.host===null&&e.length===4&&e.toLowerCase()==="host"){if(SU.exec(t)!==null)throw new PA(`invalid ${e} header`);A.host=t}else if(A.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(A.contentLength=parseInt(t,10),!Number.isFinite(A.contentLength))throw new PA("invalid content-length header")}else if(A.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")A.contentType=t,r?A.headers[e]=Ol(e,t,r):A.headers+=Ol(e,t);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new PA("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof t=="string"?t.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new PA("invalid connection header");i==="close"&&(A.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new PA("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new PA("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new KEe("expect header not supported");if(xU.exec(e)===null)throw new PA("invalid header key");if(Array.isArray(t))for(let i=0;i<t.length;i++)r?A.headers[e]?A.headers[e]+=`,${Ol(e,t[i],r)}`:A.headers[e]=Ol(e,t[i],r):A.headers+=Ol(e,t[i]);else r?A.headers[e]=Ol(e,t,r):A.headers+=Ol(e,t)}}}vU.exports=JN});var IB=E((SeA,FU)=>{"use strict";var rCe=require("events"),VN=class extends rCe{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};FU.exports=VN});var BE=E((veA,LU)=>{"use strict";var iCe=IB(),{ClientDestroyedError:WN,ClientClosedError:sCe,InvalidArgumentError:Lp}=qA(),{kDestroy:nCe,kClose:aCe,kDispatch:zN,kInterceptors:Yl}=nt(),Up=Symbol("destroyed"),mE=Symbol("closed"),co=Symbol("onDestroyed"),Mp=Symbol("onClosed"),fB=Symbol("Intercepted Dispatch"),jN=class extends iCe{constructor(){super(),this[Up]=!1,this[co]=null,this[mE]=!1,this[Mp]=[]}get destroyed(){return this[Up]}get closed(){return this[mE]}get interceptors(){return this[Yl]}set interceptors(e){if(e){for(let t=e.length-1;t>=0;t--)if(typeof this[Yl][t]!="function")throw new Lp("interceptor must be an function")}this[Yl]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((s,n)=>s?i(s):r(n))});if(typeof e!="function")throw new Lp("invalid callback");if(this[Up]){queueMicrotask(()=>e(new WN,null));return}if(this[mE]){this[Mp]?this[Mp].push(e):queueMicrotask(()=>e(null,null));return}this[mE]=!0,this[Mp].push(e);let t=()=>{let r=this[Mp];this[Mp]=null;for(let i=0;i<r.length;i++)r[i](null,null)};this[aCe]().then(()=>this.destroy()).then(()=>{queueMicrotask(t)})}destroy(e,t){if(typeof e=="function"&&(t=e,e=null),t===void 0)return new Promise((i,s)=>{this.destroy(e,(n,a)=>n?s(n):i(a))});if(typeof t!="function")throw new Lp("invalid callback");if(this[Up]){this[co]?this[co].push(t):queueMicrotask(()=>t(null,null));return}e||(e=new WN),this[Up]=!0,this[co]=this[co]||[],this[co].push(t);let r=()=>{let i=this[co];this[co]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[nCe](e).then(()=>{queueMicrotask(r)})}[fB](e,t){if(!this[Yl]||this[Yl].length===0)return this[fB]=this[zN],this[zN](e,t);let r=this[zN].bind(this);for(let i=this[Yl].length-1;i>=0;i--)r=this[Yl][i](r);return this[fB]=r,r(e,t)}dispatch(e,t){if(!t||typeof t!="object")throw new Lp("handler must be an object");try{if(!e||typeof e!="object")throw new Lp("opts must be an object.");if(this[Up]||this[co])throw new WN;if(this[mE])throw new sCe;return this[fB](e,t)}catch(r){if(typeof t.onError!="function")throw new Lp("invalid onError method");return t.onError(r),!1}}};LU.exports=jN});var IE=E((LeA,TU)=>{"use strict";var oCe=require("net"),UU=require("assert"),MU=iA(),{InvalidArgumentError:cCe,ConnectTimeoutError:lCe}=qA(),XN,ZN;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?ZN=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(
`,this[eM]=o??3e5,this[$U]=i??3e5,this[DE]=w??!0,this[PCe]=C,this[RE]=b,this[Cc]=null,this[tM]=y>-1?y:-1,this[ca]="h1",this[os]=null,this[SB]=S?{openStreams:0,maxConcurrentStreams:x??100}:null,this[rM]=`${this[xr].hostname}${this[xr].port?`:${this[xr].port}`:""}`,this[XA]=[],this[ZA]=0,this[as]=0}get pipelining(){return this[mc]}set pipelining(e){this[mc]=e,cs(this,!0)}get[Hl](){return this[XA].length-this[as]}get[pt](){return this[as]-this[ZA]}get[Pl](){return this[XA].length-this[ZA]}get[qCe](){return!!this[Qt]&&!this[Yp]&&!this[Qt].destroyed}get[sD](){let e=this[Qt];return e&&(e[ci]||e[po]||e[Pp])||this[Pl]>=(this[mc]||1)||this[Hl]>0}[YCe](e){aM(this),this.once("connect",e)}[_Ce](e,t){let r=e.origin||this[xr].origin,i=this[ca]==="h2"?iD[VCe](r,e,t):iD[zCe](r,e,t);return this[XA].push(i),this[ql]||(de.bodyLength(i.body)==null&&de.isIterable(i.body)?(this[ql]=1,process.nextTick(cs,this)):cs(this,!0)),this[ql]&&this[Qc]!==2&&this[sD]&&(this[Qc]=2),this[Qc]<2}async[HCe](){return new Promise(e=>{this[Pl]?this[Cc]=e:e(null)})}async[GCe](e){return new Promise(t=>{let r=this[XA].splice(this[as]);for(let s=0;s<r.length;s++){let n=r[s];vr(this,n,e)}let i=()=>{this[Cc]&&(this[Cc](),this[Cc]=null),t()};this[os]!=null&&(de.destroy(this[os],e),this[os]=null,this[SB]=null),this[Qt]?de.destroy(this[Qt].on("close",i),e):queueMicrotask(i),cs(this)})}};function tQe(A){ee(A.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Qt][Sr]=A,LB(this[oa],A)}function rQe(A,e,t){let r=new aa(`HTTP/2: "frameError" received - type ${A}, code ${e}`);t===0&&(this[Qt][Sr]=r,LB(this[oa],r))}function iQe(){de.destroy(this,new qp("other side closed")),de.destroy(this[Qt],new qp("other side closed"))}function sQe(A){let e=this[oa],t=new aa(`HTTP/2: "GOAWAY" frame received with code ${A}`);if(e[Qt]=null,e[os]=null,e.destroyed){ee(this[Hl]===0);let r=e[XA].splice(e[ZA]);for(let i=0;i<r.length;i++){let s=r[i];vr(this,s,t)}}else if(e[pt]>0){let r=e[XA][e[ZA]];e[XA][e[ZA]++]=null,vr(e,r,t)}e[as]=e[ZA],ee(e[pt]===0),e.emit("disconnect",e[xr],[e],t),cs(e)}var ia=YU(),nQe=bB(),aQe=Buffer.alloc(0);async function oQe(){let A=process.env.JEST_WORKER_ID?AD():void 0,e;try{e=await WebAssembly.compile(Buffer.from(VU(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(A||AD(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(t,r,i)=>0,wasm_on_status:(t,r,i)=>{ee.strictEqual(Ar.ptr,t);let s=r-na+sa.byteOffset;return Ar.onStatus(new NB(sa.buffer,s,i))||0},wasm_on_message_begin:t=>(ee.strictEqual(Ar.ptr,t),Ar.onMessageBegin()||0),wasm_on_header_field:(t,r,i)=>{ee.strictEqual(Ar.ptr,t);let s=r-na+sa.byteOffset;return Ar.onHeaderField(new NB(sa.buffer,s,i))||0},wasm_on_header_value:(t,r,i)=>{ee.strictEqual(Ar.ptr,t);let s=r-na+sa.byteOffset;return Ar.onHeaderValue(new NB(sa.buffer,s,i))||0},wasm_on_headers_complete:(t,r,i,s)=>(ee.strictEqual(Ar.ptr,t),Ar.onHeadersComplete(r,!!i,!!s)||0),wasm_on_body:(t,r,i)=>{ee.strictEqual(Ar.ptr,t);let s=r-na+sa.byteOffset;return Ar.onBody(new NB(sa.buffer,s,i))||0},wasm_on_message_complete:t=>(ee.strictEqual(Ar.ptr,t),Ar.onMessageComplete()||0)}})}var rD=null,oD=oQe();oD.catch();var Ar=null,sa=null,DB=0,na=null,Hp=1,xB=2,cD=3,lD=class{constructor(e,t,{exports:r}){ee(Number.isFinite(e[RB])&&e[RB]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(ia.TYPE.RESPONSE),this.client=e,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[RB],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[tM]}setTimeout(e,t){this.timeoutType=t,e!==this.timeoutValue?(tD.clearTimeout(this.timeout),e?(this.timeout=tD.setTimeout(cQe,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(ee(this.ptr!=null),ee(Ar==null),this.llhttp.llhttp_resume(this.ptr),ee(
2024-07-29 19:19:44 +00:00
`;return typeof s=="string"?u+=`host: ${s}\r
2024-07-29 20:07:21 +00:00
`:u+=A[XU],n?u+=`connection: upgrade\r
2024-07-29 19:19:44 +00:00
upgrade: ${n}\r
`:A[mc]&&!p[ci]?u+=`connection: keep-alive\r
`:u+=`connection: close\r
`,a&&(u+=a),Wr.sendHeaders.hasSubscribers&&Wr.sendHeaders.publish({request:e,headers:u,socket:p}),t?de.isBuffer(t)?(ee(d===t.byteLength,"buffer body must have content length"),p.cork(),p.write(`${u}content-length: ${d}\r
\r
2024-07-29 20:07:21 +00:00
`,"latin1"),p.write(t),p.uncork(),e.onBodySent(t),e.onRequestSent(),l||(p[ci]=!0)):de.isBlobLike(t)?typeof t.stream=="function"?kB({body:t.stream(),client:A,request:e,socket:p,contentLength:d,header:u,expectsPayload:l}):cM({body:t,client:A,request:e,socket:p,contentLength:d,header:u,expectsPayload:l}):de.isStream(t)?oM({body:t,client:A,request:e,socket:p,contentLength:d,header:u,expectsPayload:l}):de.isIterable(t)?kB({body:t,client:A,request:e,socket:p,contentLength:d,header:u,expectsPayload:l}):ee(!1):(d===0?p.write(`${u}content-length: 0\r
2024-07-29 19:19:44 +00:00
\r
`,"latin1"):(ee(d===null,"no body must not have content length"),p.write(`${u}\r
2024-07-29 20:07:21 +00:00
`,"latin1")),e.onRequestSent()),!0}function pQe(A,e,t){let{body:r,method:i,path:s,host:n,upgrade:a,expectContinue:o,signal:c,headers:l}=t,d;if(typeof l=="string"?d=iD[WCe](l.trim()):d=l,a)return vr(A,t,new Error("Upgrade not supported for H2")),!1;try{t.onConnect(w=>{t.aborted||t.completed||vr(A,t,w||new pD)})}catch(w){vr(A,t,w)}if(t.aborted)return!1;let p,u=A[SB];if(d[jCe]=n||A[rM],d[XCe]=i,i==="CONNECT")return e.ref(),p=e.request(d,{endStream:!1,signal:c}),p.id&&!p.pending?(t.onUpgrade(null,null,p),++u.openStreams):p.once("ready",()=>{t.onUpgrade(null,null,p),++u.openStreams}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),!0;d[ZCe]=s,d[KCe]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let h=de.bodyLength(r);if(h==null&&(h=t.contentLength),(h===0||!g)&&(h=null),t.contentLength!=null&&t.contentLength!==h){if(A[DE])return vr(A,t,new lo),!1;process.emitWarning(new lo)}h!=null&&(ee(r,"no body must not have content length"),d[$Ce]=`${h}`),e.ref();let Q=i==="GET"||i==="HEAD";return o?(d[eQe]="100-continue",p=e.request(d,{endStream:Q,signal:c}),p.once("continue",B)):(p=e.request(d,{endStream:Q,signal:c}),B()),++u.openStreams,p.once("response",w=>{t.onHeaders(Number(w[AQe]),w,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{t.onComplete([])}),p.on("data",w=>{t.onData(w)===!1&&p.pause()}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),p.once("error",function(w){A[os]&&!A[os].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,de.destroy(p,w))}),p.once("frameError",(w,I)=>{let C=new aa(`HTTP/2: "frameError" received - type ${w}, code ${I}`);vr(A,t,C),A[os]&&!A[os].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,de.destroy(p,C))}),!0;function B(){r?de.isBuffer(r)?(ee(h===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),t.onBodySent(r),t.onRequestSent()):de.isBlobLike(r)?typeof r.stream=="function"?kB({client:A,request:t,contentLength:h,h2stream:p,expectsPayload:g,body:r.stream(),socket:A[Qt],header:""}):cM({body:r,client:A,request:t,contentLength:h,expectsPayload:g,h2stream:p,header:"",socket:A[Qt]}):de.isStream(r)?oM({body:r,client:A,request:t,contentLength:h,expectsPayload:g,socket:A[Qt],h2stream:p,header:""}):de.isIterable(r)?kB({body:r,client:A,request:t,contentLength:h,expectsPayload:g,header:"",h2stream:p,socket:A[Qt]}):ee(!1):t.onRequestSent()}}function oM({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){if(ee(s!==0||t[pt]===0,"stream body cannot be pipelined"),t[ca]==="h2"){let h=function(Q){r.onBodySent(Q)},g=xCe(e,A,Q=>{Q?(de.destroy(e,Q),de.destroy(A,Q)):r.onRequestSent()});g.on("data",h),g.once("end",()=>{g.removeListener("data",h),de.destroy(g)});return}let o=!1,c=new FB({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n}),l=function(g){if(!o)try{!c.write(g)&&this.pause&&this.pause()}catch(h){de.destroy(this,h)}},d=function(){o||e.resume&&e.resume()},p=function(){u(new pD)},u=function(g){if(!o){if(o=!0,ee(i.destroyed||i[po]&&t[pt]<=1),i.off("drain",d).off("error",u),e.removeListener("data",l).removeListener("end",u).removeListener("error",u).removeListener("close",p),!g)try{c.end()}catch(h){g=h}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?de.destroy(e,g):de.destroy(e)}};e.on("data",l).on("end",u).on("error",u).on("close",p),e.resume&&e.resume(),i.on("drain",d).on("error",u)}async function cM({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){ee(s===e.size,"blob body must have content length");let o=t[ca]==="h2";try{if(s!=null&&s!==e.size)throw new lo;let c=Buffer.from(await e.arrayBuffer());o?(A.cork(),A.write(c),A.uncork()):(i.cork(),i.write(`${n}content-length: ${s}\r
2024-07-29 19:19:44 +00:00
\r
`,"latin1"),i.write(c),i.uncork()),r.onBodySent(c),r.onRequestSent(),a||(i[ci]=!0),cs(t)}catch(c){de.destroy(o?A:i,c)}}async function kB({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){ee(s!==0||t[pt]===0,"iterator body cannot be pipelined");let o=null;function c(){if(o){let p=o;o=null,p()}}let l=()=>new Promise((p,u)=>{ee(o===null),i[Sr]?u(i[Sr]):o=p});if(t[ca]==="h2"){A.on("close",c).on("drain",c);try{for await(let p of e){if(i[Sr])throw i[Sr];let u=A.write(p);r.onBodySent(p),u||await l()}}catch(p){A.destroy(p)}finally{r.onRequestSent(),A.end(),A.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let d=new FB({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n});try{for await(let p of e){if(i[Sr])throw i[Sr];d.write(p)||await l()}d.end()}catch(p){d.destroy(p)}finally{i.off("close",c).off("drain",c)}}var FB=class{constructor({socket:e,request:t,contentLength:r,client:i,expectsPayload:s,header:n}){this.socket=e,this.request=t,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=n,e[po]=!0}write(e){let{socket:t,request:r,contentLength:i,client:s,bytesWritten:n,expectsPayload:a,header:o}=this;if(t[Sr])throw t[Sr];if(t.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&n+c>i){if(s[DE])throw new lo;process.emitWarning(new lo)}t.cork(),n===0&&(a||(t[ci]=!0),i===null?t.write(`${o}transfer-encoding: chunked\r
`,"latin1"):t.write(`${o}content-length: ${i}\r
\r
`,"latin1")),i===null&&t.write(`\r
${c.toString(16)}\r
`,"latin1"),this.bytesWritten+=c;let l=t.write(e);return t.uncork(),r.onBodySent(e),l||t[Ct].timeout&&t[Ct].timeoutType===Hp&&t[Ct].timeout.refresh&&t[Ct].timeout.refresh(),l}end(){let{socket:e,contentLength:t,client:r,bytesWritten:i,expectsPayload:s,header:n,request:a}=this;if(a.onRequestSent(),e[po]=!1,e[Sr])throw e[Sr];if(!e.destroyed){if(i===0?s?e.write(`${n}content-length: 0\r
\r
`,"latin1"):e.write(`${n}\r
`,"latin1"):t===null&&e.write(`\r
0\r
\r
2024-07-29 20:07:21 +00:00
`,"latin1"),t!==null&&i!==t){if(r[DE])throw new lo;process.emitWarning(new lo)}e[Ct].timeout&&e[Ct].timeoutType===Hp&&e[Ct].timeout.refresh&&e[Ct].timeout.refresh(),cs(r)}}destroy(e){let{socket:t,client:r}=this;t[po]=!1,e&&(ee(r[pt]<=1,"pipeline should only contain this request"),de.destroy(t,e))}};function vr(A,e,t){try{e.onError(t),ee(e.aborted)}catch(r){A.emit("error",r)}}lM.exports=aD});var pM=E((GeA,dM)=>{"use strict";var UB=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};dM.exports=class{constructor(){this.head=this.tail=new UB}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new UB),this.head.push(e)}shift(){let e=this.tail,t=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),t}}});var gM=E((_eA,uM)=>{var{kFree:uQe,kConnected:gQe,kPending:hQe,kQueued:EQe,kRunning:CQe,kSize:QQe}=nt(),Gl=Symbol("pool"),uD=class{constructor(e){this[Gl]=e}get connected(){return this[Gl][gQe]}get free(){return this[Gl][uQe]}get pending(){return this[Gl][hQe]}get queued(){return this[Gl][EQe]}get running(){return this[Gl][CQe]}get size(){return this[Gl][QQe]}};uM.exports=uD});var mD=E((JeA,wM)=>{"use strict";var mQe=BE(),BQe=pM(),{kConnected:gD,kSize:hM,kRunning:EM,kPending:CM,kQueued:SE,kBusy:IQe,kFree:fQe,kUrl:yQe,kClose:wQe,kDestroy:bQe,kDispatch:NQe}=nt(),DQe=gM(),vi=Symbol("clients"),li=Symbol("needDrain"),vE=Symbol("queue"),hD=Symbol("closed resolve"),ED=Symbol("onDrain"),QM=Symbol("onConnect"),mM=Symbol("onDisconnect"),BM=Symbol("onConnectionError"),CD=Symbol("get dispatcher"),fM=Symbol("add client"),yM=Symbol("remove client"),IM=Symbol("stats"),QD=class extends mQe{constructor(){super(),this[vE]=new BQe,this[vi]=[],this[SE]=0;let e=this;this[ED]=function(r,i){let s=e[vE],n=!1;for(;!n;){let a=s.shift();if(!a)break;e[SE]--,n=!this.dispatch(a.opts,a.handler)}this[li]=n,!this[li]&&e[li]&&(e[li]=!1,e.emit("drain",r,[e,...i])),e[hD]&&s.isEmpty()&&Promise.all(e[vi].map(a=>a.close())).then(e[hD])},this[QM]=(t,r)=>{e.emit("connect",t,[e,...r])},this[mM]=(t,r,i)=>{e.emit("disconnect",t,[e,...r],i)},this[BM]=(t,r,i)=>{e.emit("connectionError",t,[e,...r],i)},this[IM]=new DQe(this)}get[IQe](){return this[li]}get[gD](){return this[vi].filter(e=>e[gD]).length}get[fQe](){return this[vi].filter(e=>e[gD]&&!e[li]).length}get[CM](){let e=this[SE];for(let{[CM]:t}of this[vi])e+=t;return e}get[EM](){let e=0;for(let{[EM]:t}of this[vi])e+=t;return e}get[hM](){let e=this[SE];for(let{[hM]:t}of this[vi])e+=t;return e}get stats(){return this[IM]}async[wQe](){return this[vE].isEmpty()?Promise.all(this[vi].map(e=>e.close())):new Promise(e=>{this[hD]=e})}async[bQe](e){for(;;){let t=this[vE].shift();if(!t)break;t.handler.onError(e)}return Promise.all(this[vi].map(t=>t.destroy(e)))}[NQe](e,t){let r=this[CD]();return r?r.dispatch(e,t)||(r[li]=!0,this[li]=!this[CD]()):(this[li]=!0,this[vE].push({opts:e,handler:t}),this[SE]++),!this[li]}[fM](e){return e.on("drain",this[ED]).on("connect",this[QM]).on("disconnect",this[mM]).on("connectionError",this[BM]),this[vi].push(e),this[li]&&process.nextTick(()=>{this[li]&&this[ED](e[yQe],[this,e])}),this}[yM](e){e.close(()=>{let t=this[vi].indexOf(e);t!==-1&&this[vi].splice(t,1)}),this[li]=this[vi].some(t=>!t[li]&&t.closed!==!0&&t.destroyed!==!0)}};wM.exports={PoolBase:QD,kClients:vi,kNeedDrain:li,kAddClient:fM,kRemoveClient:yM,kGetDispatcher:CD}});var Gp=E((VeA,RM)=>{"use strict";var{PoolBase:RQe,kClients:bM,kNeedDrain:xQe,kAddClient:SQe,kGetDispatcher:vQe}=mD(),kQe=xE(),{InvalidArgumentError:BD}=qA(),ID=iA(),{kUrl:NM,kInterceptors:FQe}=nt(),LQe=IE(),fD=Symbol("options"),yD=Symbol("connections"),DM=Symbol("factory");function UQe(A,e){return new kQe(A,e)}var wD=class extends RQe{constructor(e,{connections:t,factory:r=UQe,connect:i,connectTimeout:s,tls:n,maxCachedSessions
2024-07-29 19:19:44 +00:00
${r.count} ${r.noun} ${r.is} pending:
${e.format(t)}
2024-07-29 20:07:21 +00:00
`.trim())}};nO.exports=o4});var uO=E((CAA,pO)=>{"use strict";var{kProxy:MBe,kClose:TBe,kDestroy:OBe,kInterceptors:YBe}=nt(),{URL:oO}=require("url"),cO=FE(),qBe=Gp(),PBe=BE(),{InvalidArgumentError:TE,RequestAbortedError:HBe}=qA(),lO=IE(),ME=Symbol("proxy agent"),eI=Symbol("proxy client"),AI=Symbol("proxy headers"),c4=Symbol("request tls settings"),GBe=Symbol("proxy tls settings"),dO=Symbol("connect endpoint function");function _Be(A){return A==="https:"?443:80}function JBe(A){if(typeof A=="string"&&(A={uri:A}),!A||!A.uri)throw new TE("Proxy opts.uri is mandatory");return{uri:A.uri,protocol:A.protocol||"https"}}function VBe(A,e){return new qBe(A,e)}var l4=class extends PBe{constructor(e){if(super(e),this[MBe]=JBe(e),this[ME]=new cO(e),this[YBe]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new TE("Proxy opts.uri is mandatory");let{clientFactory:t=VBe}=e;if(typeof t!="function")throw new TE("Proxy opts.clientFactory must be a function.");if(this[c4]=e.requestTls,this[GBe]=e.proxyTls,this[AI]=e.headers||{},e.auth&&e.token)throw new TE("opts.auth cannot be used in combination with opts.token");e.auth?this[AI]["proxy-authorization"]=`Basic ${e.auth}`:e.token&&(this[AI]["proxy-authorization"]=e.token);let r=new oO(e.uri),{origin:i,port:s,host:n}=r,a=lO({...e.proxyTls});this[dO]=lO({...e.requestTls}),this[eI]=t(r,{connect:a}),this[ME]=new cO({...e,connect:async(o,c)=>{let l=o.host;o.port||(l+=`:${_Be(o.protocol)}`);try{let{socket:d,statusCode:p}=await this[eI].connect({origin:i,port:s,path:l,signal:o.signal,headers:{...this[AI],host:n}});if(p!==200&&(d.on("error",()=>{}).destroy(),c(new HBe("Proxy response !== 200 when HTTP Tunneling"))),o.protocol!=="https:"){c(null,d);return}let u;this[c4]?u=this[c4].servername:u=o.servername,this[dO]({...o,servername:u,httpSocket:d},c)}catch(d){c(d)}}})}dispatch(e,t){let{host:r}=new oO(e.origin),i=WBe(e.headers);return zBe(i),this[ME].dispatch({...e,headers:{...i,host:r}},t)}async[TBe](){await this[ME].close(),await this[eI].close()}async[OBe](){await this[ME].destroy(),await this[eI].destroy()}};function WBe(A){if(Array.isArray(A)){let e={};for(let t=0;t<A.length;t+=2)e[A[t]]=A[t+1];return e}return A}function zBe(A){if(A&&Object.keys(A).find(t=>t.toLowerCase()==="proxy-authorization"))throw new TE("Proxy-Authorization should be sent in ProxyAgent constructor")}pO.exports=l4});var $p=E((QAA,CO)=>{"use strict";var gO=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:jBe}=qA(),XBe=FE();EO()===void 0&&hO(new XBe);function hO(A){if(!A||typeof A.dispatch!="function")throw new jBe("Argument agent must implement Agent");Object.defineProperty(globalThis,gO,{value:A,writable:!0,enumerable:!1,configurable:!1})}function EO(){return globalThis[gO]}CO.exports={setGlobalDispatcher:hO,getGlobalDispatcher:EO}});var mO=E((BAA,QO)=>{"use strict";QO.exports=class{constructor(e){this.handler=e}onConnect(...e){return this.handler.onConnect(...e)}onError(...e){return this.handler.onError(...e)}onUpgrade(...e){return this.handler.onUpgrade(...e)}onHeaders(...e){return this.handler.onHeaders(...e)}onData(...e){return this.handler.onData(...e)}onComplete(...e){return this.handler.onComplete(...e)}onBodySent(...e){return this.handler.onBodySent(...e)}}});var Xl=E((IAA,yO)=>{"use strict";var{kHeadersList:ki}=nt(),{kGuard:jl}=io(),{kEnumerableProperty:da}=iA(),{makeIterator:d4,isValidHeaderName:OE,isValidHeaderValue:BO}=js(),{webidl:_e}=oi(),ZBe=require("assert"),Fi=Symbol("headers map"),Li=Symbol("headers map sorted");function IO(A){let e=A.length;for(;/[\r\n\t ]/.test(A.charAt(--e)););return A.slice(0,e+1).replace(/^[\r\n\t ]+/,"")}function fO(A,e){if(Array.isArray(e))for(let t of e){if(t.length!==2)throw _e.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${t.length}.`});A.append(t[0],t[1])}else if(typeof e=="object"&&e!==null)for(let[t,r]of Object.entries(e))A.append(t,r);else throw _e.errors.conversionFailed({prefix:"Headers constructo
2024-07-29 18:31:34 +00:00
2024-07-29 19:19:44 +00:00
Error Code : ${n.statusCode}
2024-07-29 18:31:34 +00:00
2024-07-29 20:07:21 +00:00
Error Message: ${n.message}`)})).result)===null||t===void 0?void 0:t.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(e){return Iq(this,void 0,void 0,function*(){try{let t=A.getIDTokenUrl();if(e){let i=encodeURIComponent(e);t=`${t}&audience=${i}`}fq.debug(`ID token url is ${t}`);let r=yield A.getCall(t);return fq.setSecret(r),r}catch(t){throw new Error(`Error message: ${t.message}`)}})}};uu.OidcClient=AR});var sR=E(Ti=>{"use strict";var tR=Ti&&Ti.__awaiter||function(A,e,t,r){function i(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function a(l){try{c(r.next(l))}catch(d){n(d)}}function o(l){try{c(r.throw(l))}catch(d){n(d)}}function c(l){l.done?s(l.value):i(l.value).then(a,o)}c((r=r.apply(A,e||[])).next())})};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.summary=Ti.markdownSummary=Ti.SUMMARY_DOCS_URL=Ti.SUMMARY_ENV_VAR=void 0;var T0e=require("os"),rR=require("fs"),{access:O0e,appendFile:Y0e,writeFile:q0e}=rR.promises;Ti.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Ti.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var iR=class{constructor(){this._buffer=""}filePath(){return tR(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Ti.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${Ti.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield O0e(e,rR.constants.R_OK|rR.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,t,r={}){let i=Object.entries(r).map(([s,n])=>` ${s}="${n}"`).join("");return t?`<${e}${i}>${t}</${e}>`:`<${e}${i}>`}write(e){return tR(this,void 0,void 0,function*(){let t=!!e?.overwrite,r=yield this.filePath();return yield(t?q0e:Y0e)(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return tR(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,t=!1){return this._buffer+=e,t?this.addEOL():this}addEOL(){return this.addRaw(T0e.EOL)}addCodeBlock(e,t){let r=Object.assign({},t&&{lang:t}),i=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(i).addEOL()}addList(e,t=!1){let r=t?"ol":"ul",i=e.map(n=>this.wrap("li",n)).join(""),s=this.wrap(r,i);return this.addRaw(s).addEOL()}addTable(e){let t=e.map(i=>{let s=i.map(n=>{if(typeof n=="string")return this.wrap("td",n);let{header:a,data:o,colspan:c,rowspan:l}=n,d=a?"th":"td",p=Object.assign(Object.assign({},c&&{colspan:c}),l&&{rowspan:l});return this.wrap(d,o,p)}).join("");return this.wrap("tr",s)}).join(""),r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){let r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){let{width:i,height:s}=r||{},n=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),a=this.wrap("img",null,Object.assign({src:e,alt:t},n));return this.addRaw(a).addEOL()}addHeading(e,t){let r=`h${t}`,i=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",s=this.wrap(i,e);return this.addRaw(s).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){let r=Object.assign({},t&&{cite:t}),i=this.wrap("blockquote",e,r);return this.addRaw(i).addEOL()}addLink(e,t){let r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}},wq=new iR;Ti.markdownSummary=wq;Ti.summary=wq});var bq=E(Oi=>{"use strict";var P0e=Oi&&Oi.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),H0e=Oi&&Oi.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e}
`).filter(r=>r!=="");return e&&e.trimWhitespace===!1?t:t.map(r=>r.trim())}ce.getMultilineInput=Aye;function tye(A,e){let t=["true","True","TRUE"],r=["false","False","FALSE"],i=nR(A,e);if(t.includes(i))return!0;if(r.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${A}
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}ce.getBooleanInput=tye;function rye(A,e){if(process.env.GITHUB_OUTPUT||"")return td.issueFileCommand("OUTPUT",td.prepareKeyValueMessage(A,e));process.stdout.write(Rq.EOL),tn.issueCommand("set-output",{name:A},gu.toCommandValue(e))}ce.setOutput=rye;function iye(A){tn.issue("echo",A?"on":"off")}ce.setCommandEcho=iye;function sye(A){process.exitCode=xq.Failure,Sq(A)}ce.setFailed=sye;function nye(){return process.env.RUNNER_DEBUG==="1"}ce.isDebug=nye;function aye(A){tn.issueCommand("debug",{},A)}ce.debug=aye;function Sq(A,e={}){tn.issueCommand("error",gu.toCommandProperties(e),A instanceof Error?A.toString():A)}ce.error=Sq;function oye(A,e={}){tn.issueCommand("warning",gu.toCommandProperties(e),A instanceof Error?A.toString():A)}ce.warning=oye;function cye(A,e={}){tn.issueCommand("notice",gu.toCommandProperties(e),A instanceof Error?A.toString():A)}ce.notice=cye;function lye(A){process.stdout.write(A+Rq.EOL)}ce.info=lye;function vq(A){tn.issue("group",A)}ce.startGroup=vq;function kq(){tn.issue("endgroup")}ce.endGroup=kq;function dye(A,e){return Dq(this,void 0,void 0,function*(){vq(A);let t;try{t=yield e()}finally{kq()}return t})}ce.group=dye;function pye(A,e){if(process.env.GITHUB_STATE||"")return td.issueFileCommand("STATE",td.prepareKeyValueMessage(A,e));tn.issueCommand("save-state",{name:A},gu.toCommandValue(e))}ce.saveState=pye;function uye(A){return process.env[`STATE_${A}`]||""}ce.getState=uye;function gye(A){return Dq(this,void 0,void 0,function*(){return yield Z0e.OidcClient.getIDToken(A)})}ce.getIDToken=gye;var hye=sR();Object.defineProperty(ce,"summary",{enumerable:!0,get:function(){return hye.summary}});var Eye=sR();Object.defineProperty(ce,"markdownSummary",{enumerable:!0,get:function(){return Eye.markdownSummary}});var aR=bq();Object.defineProperty(ce,"toPosixPath",{enumerable:!0,get:function(){return aR.toPosixPath}});Object.defineProperty(ce,"toWin32Path",{enumerable:!0,get:function(){return aR.toWin32Path}});Object.defineProperty(ce,"toPlatformPath",{enumerable:!0,get:function(){return aR.toPlatformPath}})});var cR=E(ne=>{"use strict";var Cye=ne&&ne.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),Qye=ne&&ne.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),Lq=ne&&ne.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&Cye(e,A,t);return Qye(e,A),e},oR=ne&&ne.__awaiter||function(A,e,t,r){function i(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function a(l){try{c(r.next(l))}catch(d){n(d)}}function o(l){try{c(r.throw(l))}catch(d){n(d)}}function c(l){l.done?s(l.value):i(l.value).then(a,o)}c((r=r.apply(A,e||[])).next())})},Yi;Object.defineProperty(ne,"__esModule",{value:!0});ne.getCmdPath=ne.tryGetExecutablePath=ne.isRooted=ne.isDirectory=ne.exists=ne.READONLY=ne.UV_FS_O_EXLOCK=ne.IS_WINDOWS=ne.unlink=ne.symlink=ne.stat=ne.rmdir=ne.rm=ne.rename=ne.readlink=ne.readdir=ne.open=ne.mkdir=ne.lstat=ne.copyFile=ne.chmod=void 0;var Uq=Lq(require("fs")),_I=Lq(require("path"));Yi=Uq.promises,ne.chmod=Yi.chmod,ne.copyFile=Yi.copyFile,ne.lstat=Yi.lstat,ne.mkdir=Yi.mkdir,ne.open=Yi.open,ne.readdir=Yi.readdir,ne.readlink=Yi.readlink,ne.rename=Yi.rename,ne.rm=Yi.rm,ne.rmdir=Yi.rmdir,ne.stat=Yi.stat,ne.symlink=Yi.symlink,ne.unlink=Yi.unlink;ne.IS_WINDOWS=process.platform==="win32";ne.UV_FS_O_EXLOCK=268435456;ne.READONLY=Uq.constants.O_RDONLY;function mye(A){return oR(this,void 0,void 0,function*(){try{yield ne.stat(A)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}ne.exists=mye;function Bye(A,e=!1){return oR(this,void 0,void 0,function*(){return(e?yield ne.stat(A):yield ne.lstat(A)).isDirectory()})}ne.isDirectory=Bye;function Iye(A){if(A=yye(A),!A)throw new Error('isRooted() parameter "p" ca
%s`,m,m,w,r);var b=w.type==="*"?mR:w.type==="?"?QR:"\\"+w.type;i=!0,r=r.slice(0,w.reStart)+b+"\\("+m}g(),s&&(r+="\\\\");var R=!1;switch(r.charAt(0)){case"[":case".":case"(":R=!0}for(var y=a.length-1;y>-1;y--){var v=a[y],D=r.slice(0,v.reStart),S=r.slice(v.reStart,v.reEnd-8),x=r.slice(v.reEnd-8,v.reEnd),F=r.slice(v.reEnd);x+=F;var q=D.split("(").length-1,oe=F;for(h=0;h<q;h++)oe=oe.replace(/\)[+*?]?/,"");F=oe;var T="";F===""&&e!==XI&&(T="$");var Ze=D+S+F+T+x;r=Ze}if(r!==""&&i&&(r="(?=.)"+r),R&&(r=p+r),e===XI)return[r,i];if(!i)return N2e(A);var be=t.nocase?"i":"";try{var bA=new RegExp("^"+r+"$",be)}catch{return new RegExp("$.")}return bA._glob=A,bA._src=r,bA}Es.makeRe=function(A,e){return new kr(A,e||{}).makeRe()};kr.prototype.makeRe=b2e;function b2e(){if(this.regexp||this.regexp===!1)return this.regexp;var A=this.set;if(!A.length)return this.regexp=!1,this.regexp;var e=this.options,t=e.noglobstar?mR:e.dot?C2e:Q2e,r=e.nocase?"i":"",i=A.map(function(s){return s.map(function(n){return n===BR?t:typeof n=="string"?D2e(n):n._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,r)}catch{this.regexp=!1}return this.regexp}Es.match=function(A,e,t){t=t||{};var r=new kr(e,t);return A=A.filter(function(i){return r.match(i)}),r.options.nonull&&!A.length&&A.push(e),A};kr.prototype.match=function(e,t){if(typeof t>"u"&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;var r=this.options;AC.sep!=="/"&&(e=e.split(AC.sep).join("/")),e=e.split(CP),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var s,n;for(n=e.length-1;n>=0&&(s=e[n],!s);n--);for(n=0;n<i.length;n++){var a=i[n],o=e;r.matchBase&&a.length===1&&(o=[s]);var c=this.matchOne(o,a,t);if(c)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate};kr.prototype.matchOne=function(A,e,t){var r=this.options;this.debug("matchOne",{this:this,file:A,pattern:e}),this.debug("matchOne",A.length,e.length);for(var i=0,s=0,n=A.length,a=e.length;i<n&&s<a;i++,s++){this.debug("matchOne loop");var o=e[s],c=A[i];if(this.debug(e,o,c),o===!1)return!1;if(o===BR){this.debug("GLOBSTAR",[e,o,c]);var l=i,d=s+1;if(d===a){for(this.debug("** at the end");i<n;i++)if(A[i]==="."||A[i]===".."||!r.dot&&A[i].charAt(0)===".")return!1;return!0}for(;l<n;){var p=A[l];if(this.debug(`
2024-07-29 19:19:44 +00:00
globstar while`,A,l,e,d,p),this.matchOne(A.slice(l),e.slice(d),t))return this.debug("globstar found match!",l,n,p),!0;if(p==="."||p===".."||!r.dot&&p.charAt(0)==="."){this.debug("dot detected!",A,l,e,d);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(t&&(this.debug(`
2024-07-29 20:07:21 +00:00
>>> no match, partial?`,A,l,e,d),l===n))}var u;if(typeof o=="string"?(u=c===o,this.debug("string match",o,c,u)):(u=c.match(o),this.debug("pattern match",o,c,u)),!u)return!1}if(i===n&&s===a)return!0;if(i===n)return t;if(s===a)return i===n-1&&A[i]==="";throw new Error("wtf?")};function N2e(A){return A.replace(/\\(.)/g,"$1")}function D2e(A){return A.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var fP=E(rn=>{"use strict";var R2e=rn&&rn.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),x2e=rn&&rn.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),IP=rn&&rn.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&R2e(e,A,t);return x2e(e,A),e},S2e=rn&&rn.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(rn,"__esModule",{value:!0});rn.Path=void 0;var tC=IP(require("path")),xc=IP(zI()),rC=S2e(require("assert")),v2e=process.platform==="win32",IR=class{constructor(e){if(this.segments=[],typeof e=="string")if(rC.default(e,"Parameter 'itemPath' must not be empty"),e=xc.safeTrimTrailingSeparator(e),!xc.hasRoot(e))this.segments=e.split(tC.sep);else{let t=e,r=xc.dirname(t);for(;r!==t;){let i=tC.basename(t);this.segments.unshift(i),t=r,r=xc.dirname(t)}this.segments.unshift(t)}else{rC.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let t=0;t<e.length;t++){let r=e[t];rC.default(r,"Parameter 'itemPath' must not contain any empty segments"),r=xc.normalizeSeparators(e[t]),t===0&&xc.hasRoot(r)?(r=xc.safeTrimTrailingSeparator(r),rC.default(r===xc.dirname(r),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(r)):(rC.default(!r.includes(tC.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(r))}}}toString(){let e=this.segments[0],t=e.endsWith(tC.sep)||v2e&&/^[A-Z]:$/i.test(e);for(let r=1;r<this.segments.length;r++)t?t=!1:e+=tC.sep,e+=this.segments[r];return e}};rn.Path=IR});var yP=E(sn=>{"use strict";var k2e=sn&&sn.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),F2e=sn&&sn.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),wR=sn&&sn.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&k2e(e,A,t);return F2e(e,A),e},L2e=sn&&sn.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(sn,"__esModule",{value:!0});sn.Pattern=void 0;var U2e=wR(require("os")),iC=wR(require("path")),Gi=wR(zI()),id=L2e(require("assert")),M2e=BP(),fR=jI(),KI=fP(),Co=process.platform==="win32",yR=class A{constructor(e,t=!1,r,i){this.negate=!1;let s;if(typeof e=="string")s=e.trim();else{r=r||[],id.default(r.length,"Parameter 'segments' must not empty");let c=A.getLiteral(r[0]);id.default(c&&Gi.hasAbsoluteRoot(c),"Parameter 'segments' first element must be a root path"),s=new KI.Path(r).toString().trim(),e&&(s=`!${s}`)}for(;s.startsWith("!");)this.negate=!this.negate,s=s.substr(1).trim();s=A.fixupPattern(s,i),this.segments=new KI.Path(s).segments,this.trailingSeparator=Gi.normalizeSeparators(s).endsWith(iC.sep),s=Gi.safeTrimTrailingSeparator(s);let n=!1,a=this.segments.map(c=>A.getLiteral(c)).filter(c=>!n&&!(n=c===""));this.searchPath=new KI.Path(a).toString(),this.rootRegExp=new RegExp(A.regExpEscape(a[0]),Co?"i":""),this.isImplicitPattern=t;let o={dot:!0,nobrace:!0,nocase:Co,nocomment:!0,noext:!0,nonegate:!0};s=Co?s.replace(/\\/g,"/"):s,this.minimatch=new M2e.Minimatch(s,o)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Gi.normalizeSeparators(e),!e.endsWith(iC.sep)&&this.isImplici
2024-07-29 18:31:34 +00:00
`),e=e.replace(/\r/g,`
2024-07-29 19:19:44 +00:00
`));let i=e.split(`
2024-07-29 20:07:21 +00:00
`).map(s=>s.trim());for(let s of i)!s||s.startsWith("#")||r.patterns.push(new DP.Pattern(s));return r.searchPaths.push(...ef.getSearchPaths(r.patterns)),r})}static stat(e,t,r){return NR(this,void 0,void 0,function*(){let i;if(t.followSymbolicLinks)try{i=yield sC.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(t.omitBrokenSymbolicLinks){DR.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else i=yield sC.promises.lstat(e.path);if(i.isDirectory()&&t.followSymbolicLinks){let s=yield sC.promises.realpath(e.path);for(;r.length>=e.level;)r.pop();if(r.some(n=>n===s)){DR.debug(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}r.push(s)}return i})}};gr.DefaultGlobber=RR});var SP=E(Cu=>{"use strict";var G2e=Cu&&Cu.__awaiter||function(A,e,t,r){function i(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function a(l){try{c(r.next(l))}catch(d){n(d)}}function o(l){try{c(r.throw(l))}catch(d){n(d)}}function c(l){l.done?s(l.value):i(l.value).then(a,o)}c((r=r.apply(A,e||[])).next())})};Object.defineProperty(Cu,"__esModule",{value:!0});Cu.create=void 0;var _2e=xP();function J2e(A,e){return G2e(this,void 0,void 0,function*(){return yield _2e.DefaultGlobber.create(A,e)})}Cu.create=J2e});var nf=E((xe,UP)=>{xe=UP.exports=Ye;var QA;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?QA=function(){var A=Array.prototype.slice.call(arguments,0);A.unshift("SEMVER"),console.log.apply(console,A)}:QA=function(){};xe.SEMVER_SPEC_VERSION="2.0.0";var aC=256,Af=Number.MAX_SAFE_INTEGER||9007199254740991,xR=16,V2e=aC-6,Qu=xe.re=[],CA=xe.safeRe=[],U=xe.src=[],L=xe.tokens={},FP=0;function We(A){L[A]=FP++}var vR="[a-zA-Z0-9-]",SR=[["\\s",1],["\\d",aC],[vR,V2e]];function cC(A){for(var e=0;e<SR.length;e++){var t=SR[e][0],r=SR[e][1];A=A.split(t+"*").join(t+"{0,"+r+"}").split(t+"+").join(t+"{1,"+r+"}")}return A}We("NUMERICIDENTIFIER");U[L.NUMERICIDENTIFIER]="0|[1-9]\\d*";We("NUMERICIDENTIFIERLOOSE");U[L.NUMERICIDENTIFIERLOOSE]="\\d+";We("NONNUMERICIDENTIFIER");U[L.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+vR+"*";We("MAINVERSION");U[L.MAINVERSION]="("+U[L.NUMERICIDENTIFIER]+")\\.("+U[L.NUMERICIDENTIFIER]+")\\.("+U[L.NUMERICIDENTIFIER]+")";We("MAINVERSIONLOOSE");U[L.MAINVERSIONLOOSE]="("+U[L.NUMERICIDENTIFIERLOOSE]+")\\.("+U[L.NUMERICIDENTIFIERLOOSE]+")\\.("+U[L.NUMERICIDENTIFIERLOOSE]+")";We("PRERELEASEIDENTIFIER");U[L.PRERELEASEIDENTIFIER]="(?:"+U[L.NUMERICIDENTIFIER]+"|"+U[L.NONNUMERICIDENTIFIER]+")";We("PRERELEASEIDENTIFIERLOOSE");U[L.PRERELEASEIDENTIFIERLOOSE]="(?:"+U[L.NUMERICIDENTIFIERLOOSE]+"|"+U[L.NONNUMERICIDENTIFIER]+")";We("PRERELEASE");U[L.PRERELEASE]="(?:-("+U[L.PRERELEASEIDENTIFIER]+"(?:\\."+U[L.PRERELEASEIDENTIFIER]+")*))";We("PRERELEASELOOSE");U[L.PRERELEASELOOSE]="(?:-?("+U[L.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+U[L.PRERELEASEIDENTIFIERLOOSE]+")*))";We("BUILDIDENTIFIER");U[L.BUILDIDENTIFIER]=vR+"+";We("BUILD");U[L.BUILD]="(?:\\+("+U[L.BUILDIDENTIFIER]+"(?:\\."+U[L.BUILDIDENTIFIER]+")*))";We("FULL");We("FULLPLAIN");U[L.FULLPLAIN]="v?"+U[L.MAINVERSION]+U[L.PRERELEASE]+"?"+U[L.BUILD]+"?";U[L.FULL]="^"+U[L.FULLPLAIN]+"$";We("LOOSEPLAIN");U[L.LOOSEPLAIN]="[v=\\s]*"+U[L.MAINVERSIONLOOSE]+U[L.PRERELEASELOOSE]+"?"+U[L.BUILD]+"?";We("LOOSE");U[L.LOOSE]="^"+U[L.LOOSEPLAIN]+"$";We("GTLT");U[L.GTLT]="((?:<|>)?=?)";We("XRANGEIDENTIFIERLOOSE");U[L.XRANGEIDENTIFIERLOOSE]=U[L.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";We("XRANGEIDENTIFIER");U[L.XRANGEIDENTIFIER]=U[L.NUMERICIDENTIFIER]+"|x|X|\\*";We("XRANGEPLAIN");U[L.XRANGEPLAIN]="[v=\\s]*("+U[L.XRANGEIDENTIFIER]+")(?:\\.("+U[L.XRANGEIDENTIFIER]+")(?:\\.("+U[L.XRANGEIDENTIFIER]+")(?:"+U[L.PRERELEASE]+")?"+U[L.BUILD]+"?)?)?";We("XRANGEPLAINLOOSE");U[L.XRANGEPLAINLOOSE]="[v=\\s]*("+U[L.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+U[L.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+U[L.XRANGEIDENTIFIERLOOSE]+")(?:"+U[L.PRERELEASELOOSE]+")?"+U[L.BUILD]+"?)?)?";We("XRANGE");U[L.XRANGE]="^"+U[L.GTLT]+"\\s*"+U[L.XRANGEPLAI
`),{implicitDescendants:!1});try{for(var c=!0,l=qwe(o.globGenerator()),d;d=yield l.next(),e=d.done,!e;c=!0){i=d.value,c=!1;let p=i,u=af.relative(a,p).replace(new RegExp(`\\${af.sep}`,"g"),"/");pC.debug(`Matched: ${u}`),u===""?n.push("."):n.push(`${u}`)}}catch(p){t={error:p}}finally{try{!c&&!e&&(r=l.return)&&(yield r.call(l))}finally{if(t)throw t.error}}return n})}mA.resolvePaths=zwe;function jwe(A){return Bu(this,void 0,void 0,function*(){return _we.promisify(GR.unlink)(A)})}mA.unlinkFile=jwe;function XP(A,e=[]){return Bu(this,void 0,void 0,function*(){let t="";e.push("--version"),pC.debug(`Checking ${A} ${e.join(" ")}`);try{yield Pwe.exec(`${A}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:r=>t+=r.toString(),stderr:r=>t+=r.toString()}})}catch(r){pC.debug(r.message)}return t=t.trim(),pC.debug(t),t})}function Xwe(){return Bu(this,void 0,void 0,function*(){let A=yield XP("zstd",["--quiet"]),e=Gwe.clean(A);return pC.debug(`zstd version: ${e}`),A===""?ad.CompressionMethod.Gzip:ad.CompressionMethod.ZstdWithoutLong})}mA.getCompressionMethod=Xwe;function Zwe(A){return A===ad.CompressionMethod.Gzip?ad.CacheFilename.Gzip:ad.CacheFilename.Zstd}mA.getCacheFileName=Zwe;function Kwe(){return Bu(this,void 0,void 0,function*(){return GR.existsSync(ad.GnuTarPathOnWindows)?ad.GnuTarPathOnWindows:(yield XP("tar")).toLowerCase().includes("gnu tar")?jP.which("tar"):""})}mA.getGnuTarPathOnWindows=Kwe;function $we(A,e){if(e===void 0)throw Error(`Expected ${A} but value was undefiend`);return e}mA.assertDefined=$we;function ebe(){let e=new URL(process.env.GITHUB_SERVER_URL||"https://github.com").hostname.trimEnd().toUpperCase(),t=e==="GITHUB.COM",r=e.endsWith(".GHE.COM")||e.endsWith(".GHE.LOCALHOST");return!t&&!r}mA.isGhes=ebe});var KP=E(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.checkBypass=Iu.getProxyUrl=void 0;function Abe(A){let e=A.protocol==="https:";if(ZP(A))return;let t=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(t)try{return new URL(t)}catch{if(!t.startsWith("http://")&&!t.startsWith("https://"))return new URL(`http://${t}`)}else return}Iu.getProxyUrl=Abe;function ZP(A){if(!A.hostname)return!1;let e=A.hostname;if(tbe(e))return!0;let t=process.env.no_proxy||process.env.NO_PROXY||"";if(!t)return!1;let r;A.port?r=Number(A.port):A.protocol==="http:"?r=80:A.protocol==="https:"&&(r=443);let i=[A.hostname.toUpperCase()];typeof r=="number"&&i.push(`${i[0]}:${r}`);for(let s of t.split(",").map(n=>n.trim().toUpperCase()).filter(n=>n))if(s==="*"||i.some(n=>n===s||n.endsWith(`.${s}`)||s.startsWith(".")&&n.endsWith(`${s}`)))return!0;return!1}Iu.checkBypass=ZP;function tbe(A){let e=A.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}});var GA=E((wtA,$P)=>{$P.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clie
2024-07-29 19:19:44 +00:00
\r
2024-07-29 20:07:21 +00:00
`),qbe=/\r\n/g,Pbe=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function yu(A){IH.call(this),A=A||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=BH(A,"maxHeaderPairs",2e3),this.maxHeaderSize=BH(A,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new Obe(Ybe),this.ss.on("info",function(t,r,i,s){r&&!e.maxed&&(e.nread+s-i>=e.maxHeaderSize?(s=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=s-i,e.buffer+=r.toString("binary",i,s)),t&&e._finish()})}Tbe(yu,IH);yu.prototype.push=function(A){let e=this.ss.push(A);if(this.finished)return e};yu.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};yu.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let A=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",A)};yu.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let A=this.buffer.split(qbe),e=A.length,t,r;for(var i=0;i<e;++i){if(A[i].length===0)continue;if((A[i][0]===" "||A[i][0]===" ")&&r){this.header[r][this.header[r].length-1]+=A[i];continue}let s=A[i].indexOf(":");if(s===-1||s===0)return;if(t=Pbe.exec(A[i]),r=t[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(t[2]||""),++this.npairs===this.maxHeaderPairs)break}};fH.exports=yu});var h6=E((ktA,bH)=>{"use strict";var g6=require("node:stream").Writable,Hbe=require("node:util").inherits,Gbe=p6(),wH=QH(),_be=yH(),Jbe=45,Vbe=Buffer.from("-"),Wbe=Buffer.from(`\r
`),zbe=function(){};function Un(A){if(!(this instanceof Un))return new Un(A);if(g6.call(this,A),!A||!A.headerFirst&&typeof A.boundary!="string")throw new TypeError("Boundary required");typeof A.boundary=="string"?this.setBoundary(A.boundary):this._bparser=void 0,this._headerFirst=A.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:A.partHwm},this._pause=!1;let e=this;this._hparser=new _be(A),this._hparser.on("header",function(t){e._inHeader=!1,e._part.emit("header",t)})}Hbe(Un,g6);Un.prototype.emit=function(A){if(A==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else g6.prototype.emit.apply(this,arguments)};Un.prototype._write=function(A,e,t){if(!this._hparser&&!this._bparser)return t();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new wH(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(A);if(!this._inHeader&&r!==void 0&&r<A.length)A=A.slice(r);else return t()}this._firstWrite&&(this._bparser.push(Wbe),this._firstWrite=!1),this._bparser.push(A),this._pause?this._cb=t:t()};Un.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Un.prototype.setBoundary=function(A){let e=this;this._bparser=new Gbe(`\r
--`+A),this._bparser.on("info",function(t,r,i,s){e._oninfo(t,r,i,s)})};Un.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",zbe),this._part.resume())};Un.prototype._oninfo=function(A,e,t,r){let i,s=this,n=0,a,o=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&t+n<r;)if(e[t+n]===Jbe)++n,++this._dashes;else{this._dashes&&(i=Vbe),this._dashes=0;break}if(this._dashes===2&&(t+n<r&&this.listenerCount("trailer")!==0&&this.emit("trailer",e.slice(t+n,r)),this.reset(),this._finished=!0,s._parts===0&&(s._realFinish=!0,s.emit("finish"),s._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new wH(this._partOpts),this._part._read=function(c){s._unpause()},this._isPreamble&&this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._isPreamble!==!0&&this.listenerCount("part")!==0?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&t<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(o=this._part.push(i)),o=this._part.push(e.slice(t,r)),o||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),a=this._hparser.push(e.slice(t,r)),!this._inHeader&&a!==void 0&&a<r&&this._oninfo(!1,e,t+a,r))),A&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:t!==r&&(++this._parts,this._part.on("end",function(){--s._parts===0&&(s._finished?(s._realFinish=!0,s.emit("finish"),s._realFinish=!1):s._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};Un.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let A=this._cb;this._cb=void 0,A()}};bH.exports=Un});var pf=E((E6,RH)=>{"use strict";var NH=new TextDecoder("utf-8"),DH=new Map([["utf-8",NH],["utf8",NH]]);function jbe(A){let e;for(;;)switch(A){case"utf-8":case"utf8":return hC.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return hC.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return hC.utf16le;case"base64":return hC.base64;default:if(e===void 0){e=!0,A=A.toLowerCase();continue}return hC.other.bind(A)}}var hC={utf8:(A,e)=>A.length===0?"":(typeof A=="string"&&(A=Buffer.from(A,e)),A.utf8Slice(0,A.length)),latin1:(A,e)=>A.length===0?"":typeof A=="string"?A:A.latin1Slice(0,A.length),utf16le:(A,e)=>A.length===0?"":(typeof A=="string"&&(A=Buffer.from(A,e)),A.ucs2Slice(0,A.length)),base64:(A,e)=>A.length===0?"":(typeof A=="string"&&(A=Buffer.from(A,e)),A.base64Slice(0,A.length)),other:(A,e)=>{if(A.length===0)return"";if(typeof A=="string"&&(A=Buffer.from(A,e)),DH.has(E6.toString()))try{return DH.get(E6).decode(A)}catch{}return typeof A=="string"?A:A.toString()}};function Xbe(A,e,t){return A&&jbe(t)(A,e)}RH.exports=Xbe});var Q6=E((FtA,FH)=>{"use strict";var uf=pf(),xH=/%[a-fA-F0-9][a-fA-F0-9]/g,Zbe={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"\x07","%08":"\b","%09":" ","%0a":`
2024-07-29 19:19:44 +00:00
`,"%0A":`
2024-07-29 20:07:21 +00:00
`,"%0b":"\v","%0B":"\v","%0c":"\f","%0C":"\f","%0d":"\r","%0D":"\r","%0e":"","%0E":"","%0f":"","%0F":"","%10":"","%11":"","%12":"","%13":"","%14":"","%15":"","%16":"","%17":"","%18":"","%19":"","%1a":"","%1A":"","%1b":"\x1B","%1B":"\x1B","%1c":"","%1C":"","%1d":"","%1D":"","%1e":"","%1E":"","%1f":"","%1F":"","%20":" ","%21":"!","%22":'"',"%23":"#","%24":"$","%25":"%","%26":"&","%27":"'","%28":"(","%29":")","%2a":"*","%2A":"*","%2b":"+","%2B":"+","%2c":",","%2C":",","%2d":"-","%2D":"-","%2e":".","%2E":".","%2f":"/","%2F":"/","%30":"0","%31":"1","%32":"2","%33":"3","%34":"4","%35":"5","%36":"6","%37":"7","%38":"8","%39":"9","%3a":":","%3A":":","%3b":";","%3B":";","%3c":"<","%3C":"<","%3d":"=","%3D":"=","%3e":">","%3E":">","%3f":"?","%3F":"?","%40":"@","%41":"A","%42":"B","%43":"C","%44":"D","%45":"E","%46":"F","%47":"G","%48":"H","%49":"I","%4a":"J","%4A":"J","%4b":"K","%4B":"K","%4c":"L","%4C":"L","%4d":"M","%4D":"M","%4e":"N","%4E":"N","%4f":"O","%4F":"O","%50":"P","%51":"Q","%52":"R","%53":"S","%54":"T","%55":"U","%56":"V","%57":"W","%58":"X","%59":"Y","%5a":"Z","%5A":"Z","%5b":"[","%5B":"[","%5c":"\\","%5C":"\\","%5d":"]","%5D":"]","%5e":"^","%5E":"^","%5f":"_","%5F":"_","%60":"`","%61":"a","%62":"b","%63":"c","%64":"d","%65":"e","%66":"f","%67":"g","%68":"h","%69":"i","%6a":"j","%6A":"j","%6b":"k","%6B":"k","%6c":"l","%6C":"l","%6d":"m","%6D":"m","%6e":"n","%6E":"n","%6f":"o","%6F":"o","%70":"p","%71":"q","%72":"r","%73":"s","%74":"t","%75":"u","%76":"v","%77":"w","%78":"x","%79":"y","%7a":"z","%7A":"z","%7b":"{","%7B":"{","%7c":"|","%7C":"|","%7d":"}","%7D":"}","%7e":"~","%7E":"~","%7f":"\x7F","%7F":"\x7F","%80":"\x80","%81":"\x81","%82":"\x82","%83":"\x83","%84":"\x84","%85":"\x85","%86":"\x86","%87":"\x87","%88":"\x88","%89":"\x89","%8a":"\x8A","%8A":"\x8A","%8b":"\x8B","%8B":"\x8B","%8c":"\x8C","%8C":"\x8C","%8d":"\x8D","%8D":"\x8D","%8e":"\x8E","%8E":"\x8E","%8f":"\x8F","%8F":"\x8F","%90":"\x90","%91":"\x91","%92":"\x92","%93":"\x93","%94":"\x94","%95":"\x95","%96":"\x96","%97":"\x97","%98":"\x98","%99":"\x99","%9a":"\x9A","%9A":"\x9A","%9b":"\x9B","%9B":"\x9B","%9c":"\x9C","%9C":"\x9C","%9d":"\x9D","%9D":"\x9D","%9e":"\x9E","%9E":"\x9E","%9f":"\x9F","%9F":"\x9F","%a0":"\xA0","%A0":"\xA0","%a1":"\xA1","%A1":"\xA1","%a2":"\xA2","%A2":"\xA2","%a3":"\xA3","%A3":"\xA3","%a4":"\xA4","%A4":"\xA4","%a5":"\xA5","%A5":"\xA5","%a6":"\xA6","%A6":"\xA6","%a7":"\xA7","%A7":"\xA7","%a8":"\xA8","%A8":"\xA8","%a9":"\xA9","%A9":"\xA9","%aa":"\xAA","%Aa":"\xAA","%aA":"\xAA","%AA":"\xAA","%ab":"\xAB","%Ab":"\xAB","%aB":"\xAB","%AB":"\xAB","%ac":"\xAC","%Ac":"\xAC","%aC":"\xAC","%AC":"\xAC","%ad":"\xAD","%Ad":"\xAD","%aD":"\xAD","%AD":"\xAD","%ae":"\xAE","%Ae":"\xAE","%aE":"\xAE","%AE":"\xAE","%af":"\xAF","%Af":"\xAF","%aF":"\xAF","%AF":"\xAF","%b0":"\xB0","%B0":"\xB0","%b1":"\xB1","%B1":"\xB1","%b2":"\xB2","%B2":"\xB2","%b3":"\xB3","%B3":"\xB3","%b4":"\xB4","%B4":"\xB4","%b5":"\xB5","%B5":"\xB5","%b6":"\xB6","%B6":"\xB6","%b7":"\xB7","%B7":"\xB7","%b8":"\xB8","%B8":"\xB8","%b9":"\xB9","%B9":"\xB9","%ba":"\xBA","%Ba":"\xBA","%bA":"\xBA","%BA":"\xBA","%bb":"\xBB","%Bb":"\xBB","%bB":"\xBB","%BB":"\xBB","%bc":"\xBC","%Bc":"\xBC","%bC":"\xBC","%BC":"\xBC","%bd":"\xBD","%Bd":"\xBD","%bD":"\xBD","%BD":"\xBD","%be":"\xBE","%Be":"\xBE","%bE":"\xBE","%BE":"\xBE","%bf":"\xBF","%Bf":"\xBF","%bF":"\xBF","%BF":"\xBF","%c0":"\xC0","%C0":"\xC0","%c1":"\xC1","%C1":"\xC1","%c2":"\xC2","%C2":"\xC2","%c3":"\xC3","%C3":"\xC3","%c4":"\xC4","%C4":"\xC4","%c5":"\xC5","%C5":"\xC5","%c6":"\xC6","%C6":"\xC6","%c7":"\xC7","%C7":"\xC7","%c8":"\xC8","%C8":"\xC8","%c9":"\xC9","%C9":"\xC9","%ca":"\xCA","%Ca":"\xCA","%cA":"\xCA","%CA":"\xCA","%cb":"\xCB","%Cb":"\xCB","%cB":"\xCB","%CB":"\xCB","%cc":"\xCC","%Cc":"\xCC","%cC":"\xCC","%CC":"\xCC","%cd":"\xCD","%Cd":"\xCD","%cD":"\xCD","%CD":"\xCD","%ce":"\xCE","%Ce":"\xCE","%cE":"\xCE","%CE":"\xCE","%cf":"\xCF","%Cf":"\xCF","%cF":"\xCF","%CF":"\xCF","%d0":"\xD0","%D0":"\xD0","%d1":"\xD1","%D1":"\xD1","%d2":"\xD2","%D2":"\xD2","%d3":"\xD3","%D3":"\xD3","%d4":"\xD4","%D4":"\xD4","%d5":"\xD5","%
`))}function XNe(A,e){let{headersList:t}=e,r=(t.get("referrer-policy")??"").split(","),i="";if(r.length>0)for(let s=r.length;s!==0;s--){let n=r[s-1].trim();if(MNe.has(n)){i=n;break}}i!==""&&(A.referrerPolicy=i)}function ZNe(){return"allowed"}function KNe(){return"success"}function $Ne(){return"success"}function eDe(A){let e=null;e=A.mode,A.headersList.set("sec-fetch-mode",e)}function ADe(A){let e=A.origin;if(A.responseTainting==="cors"||A.mode==="websocket")e&&A.headersList.append("origin",e);else if(A.method!=="GET"&&A.method!=="HEAD"){switch(A.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":A.origin&&N6(A.origin)&&!N6(mC(A))&&(e=null);break;case"same-origin":Cf(A,mC(A))||(e=null);break;default:}e&&A.headersList.append("origin",e)}}function tDe(A){return YNe.now()}function rDe(A){return{startTime:A.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:A.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function iDe(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function sDe(A){return{referrerPolicy:A.referrerPolicy}}function nDe(A){let e=A.referrerPolicy;Ru(e);let t=null;if(A.referrer==="client"){let a=ONe();if(!a||a.origin==="null")return"no-referrer";t=new URL(a)}else A.referrer instanceof URL&&(t=A.referrer);let r=w6(t),i=w6(t,!0);r.toString().length>4096&&(r=i);let s=Cf(A,r),n=CC(r)&&!CC(A.url);switch(e){case"origin":return i??w6(t,!0);case"unsafe-url":return r;case"same-origin":return s?i:"no-referrer";case"origin-when-cross-origin":return s?r:i;case"strict-origin-when-cross-origin":{let a=mC(A);return Cf(r,a)?r:CC(r)&&!CC(a)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return n?"no-referrer":i}}function w6(A,e){return Ru(A instanceof URL),A.protocol==="file:"||A.protocol==="about:"||A.protocol==="blank:"?"no-referrer":(A.username="",A.password="",A.hash="",e&&(A.pathname="",A.search=""),A)}function CC(A){if(!(A instanceof URL))return!1;if(A.href==="about:blank"||A.href==="about:srcdoc"||A.protocol==="data:"||A.protocol==="file:")return!0;return e(A.origin);function e(t){if(t==null||t==="null")return!1;let r=new URL(t);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}function aDe(A,e){if(QC===void 0)return!0;let t=cDe(e);if(t==="no metadata"||t.length===0)return!0;let r=t.sort((n,a)=>a.algo.localeCompare(n.algo)),i=r[0].algo,s=r.filter(n=>n.algo===i);for(let n of s){let a=n.algo,o=n.hash;o.endsWith("==")&&(o=o.slice(0,-2));let c=QC.createHash(a).update(A).digest("base64");if(c.endsWith("==")&&(c=c.slice(0,-2)),c===o)return!0;let l=QC.createHash(a).update(A).digest("base64url");if(l.endsWith("==")&&(l=l.slice(0,-2)),l===o)return!0}return!1}var oDe=/((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function cDe(A){let e=[],t=!0,r=QC.getHashes();for(let i of A.split(" ")){t=!1;let s=oDe.exec(i);if(s===null||s.groups===void 0)continue;let n=s.groups.algo;r.includes(n.toLowerCase())&&e.push(s.groups)}return t===!0?"no metadata":e}function lDe(A){}function Cf(A,e){return A.origin===e.origin&&A.origin==="null"||A.protocol===e.protocol&&A.hostname===e.hostname&&A.port===e.port}function dDe(){let A,e;return{promise:new Promise((r,i)=>{A=r,e=i}),resolve:A,reject:e}}function pDe(A){return A.controller.state==="aborted"}function uDe(A){return A.controller.state==="aborted"||A.controller.state==="terminated"}var D6={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"};Object.setPrototypeOf(D6,null);function gDe(A){return D6[A.toLowerCase()]??A}function hDe(A){let e=JSON.stringify(A);if(e===void 0)throw new TypeError("Value is not JSON seriali
`||A===" "||A===" "}function R6(A,e=!0,t=!0){let r=0,i=A.length-1;if(e)for(;r<A.length&&dG(A[r]);r++);if(t)for(;i>0&&dG(A[i]);i--);return A.slice(r,i+1)}function pG(A){return A==="\r"||A===`
`||A===" "||A==="\f"||A===" "}function TDe(A,e=!0,t=!0){let r=0,i=A.length-1;if(e)for(;r<A.length&&pG(A[r]);r++);if(t)for(;i>0&&pG(A[i]);i--);return A.slice(r,i+1)}EG.exports={dataURLProcessor:FDe,URLSerializer:uG,collectASequenceOfCodePoints:Bf,collectASequenceOfCodePointsFast:xu,stringPercentDecode:gG,parseMIMEType:x6,collectAnHTTPQuotedString:hG,serializeAMimeType:MDe}});var If=E((JtA,IG)=>{"use strict";var{Blob:mG,File:CG}=require("buffer"),{types:S6}=require("util"),{kState:Cs}=Bo(),{isBlobLike:BG}=an(),{webidl:BA}=hi(),{parseMIMEType:ODe,serializeAMimeType:YDe}=Mn(),{kEnumerableProperty:QG}=rA(),qDe=new TextEncoder,BC=class A extends mG{constructor(e,t,r={}){BA.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=BA.converters["sequence<BlobPart>"](e),t=BA.converters.USVString(t),r=BA.converters.FilePropertyBag(r);let i=t,s=r.type,n;e:{if(s){if(s=ODe(s),s==="failure"){s="";break e}s=YDe(s).toLowerCase()}n=r.lastModified}super(PDe(e,r),{type:s}),this[Cs]={name:i,lastModified:n,type:s}}get name(){return BA.brandCheck(this,A),this[Cs].name}get lastModified(){return BA.brandCheck(this,A),this[Cs].lastModified}get type(){return BA.brandCheck(this,A),this[Cs].type}},v6=class A{constructor(e,t,r={}){let i=t,s=r.type,n=r.lastModified??Date.now();this[Cs]={blobLike:e,name:i,type:s,lastModified:n}}stream(...e){return BA.brandCheck(this,A),this[Cs].blobLike.stream(...e)}arrayBuffer(...e){return BA.brandCheck(this,A),this[Cs].blobLike.arrayBuffer(...e)}slice(...e){return BA.brandCheck(this,A),this[Cs].blobLike.slice(...e)}text(...e){return BA.brandCheck(this,A),this[Cs].blobLike.text(...e)}get size(){return BA.brandCheck(this,A),this[Cs].blobLike.size}get type(){return BA.brandCheck(this,A),this[Cs].blobLike.type}get name(){return BA.brandCheck(this,A),this[Cs].name}get lastModified(){return BA.brandCheck(this,A),this[Cs].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(BC.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:QG,lastModified:QG});BA.converters.Blob=BA.interfaceConverter(mG);BA.converters.BlobPart=function(A,e){if(BA.util.Type(A)==="Object"){if(BG(A))return BA.converters.Blob(A,{strict:!1});if(ArrayBuffer.isView(A)||S6.isAnyArrayBuffer(A))return BA.converters.BufferSource(A,e)}return BA.converters.USVString(A,e)};BA.converters["sequence<BlobPart>"]=BA.sequenceConverter(BA.converters.BlobPart);BA.converters.FilePropertyBag=BA.dictionaryConverter([{key:"lastModified",converter:BA.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:BA.converters.DOMString,defaultValue:""},{key:"endings",converter:A=>(A=BA.converters.DOMString(A),A=A.toLowerCase(),A!=="native"&&(A="transparent"),A),defaultValue:"transparent"}]);function PDe(A,e){let t=[];for(let r of A)if(typeof r=="string"){let i=r;e.endings==="native"&&(i=HDe(i)),t.push(qDe.encode(i))}else S6.isAnyArrayBuffer(r)||S6.isTypedArray(r)?r.buffer?t.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):t.push(new Uint8Array(r)):BG(r)&&t.push(r);return t}function HDe(A){let e=`
2024-07-29 19:19:44 +00:00
`;return process.platform==="win32"&&(e=`\r
2024-07-29 20:07:21 +00:00
`),A.replace(/\r?\n/g,e)}function GDe(A){return CG&&A instanceof CG||A instanceof BC||A&&(typeof A.stream=="function"||typeof A.arrayBuffer=="function")&&A[Symbol.toStringTag]==="File"}IG.exports={File:BC,FileLike:v6,isFileLike:GDe}});var yf=E((VtA,NG)=>{"use strict";var{isBlobLike:ff,toUSVString:_De,makeIterator:k6}=an(),{kState:jr}=Bo(),{File:bG,FileLike:fG,isFileLike:JDe}=If(),{webidl:RA}=hi(),{Blob:VDe,File:F6}=require("buffer"),yG=F6??bG,Su=class A{constructor(e){if(e!==void 0)throw RA.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[jr]=[]}append(e,t,r=void 0){if(RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!ff(t))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=RA.converters.USVString(e),t=ff(t)?RA.converters.Blob(t,{strict:!1}):RA.converters.USVString(t),r=arguments.length===3?RA.converters.USVString(r):void 0;let i=wG(e,t,r);this[jr].push(i)}delete(e){RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=RA.converters.USVString(e),this[jr]=this[jr].filter(t=>t.name!==e)}get(e){RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=RA.converters.USVString(e);let t=this[jr].findIndex(r=>r.name===e);return t===-1?null:this[jr][t].value}getAll(e){return RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=RA.converters.USVString(e),this[jr].filter(t=>t.name===e).map(t=>t.value)}has(e){return RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=RA.converters.USVString(e),this[jr].findIndex(t=>t.name===e)!==-1}set(e,t,r=void 0){if(RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!ff(t))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=RA.converters.USVString(e),t=ff(t)?RA.converters.Blob(t,{strict:!1}):RA.converters.USVString(t),r=arguments.length===3?_De(r):void 0;let i=wG(e,t,r),s=this[jr].findIndex(n=>n.name===e);s!==-1?this[jr]=[...this[jr].slice(0,s),i,...this[jr].slice(s+1).filter(n=>n.name!==e)]:this[jr].push(i)}entries(){return RA.brandCheck(this,A),k6(()=>this[jr].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return RA.brandCheck(this,A),k6(()=>this[jr].map(e=>[e.name,e.value]),"FormData","key")}values(){return RA.brandCheck(this,A),k6(()=>this[jr].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,t=globalThis){if(RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(t,[i,r,this])}};Su.prototype[Symbol.iterator]=Su.prototype.entries;Object.defineProperties(Su.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function wG(A,e,t){if(A=Buffer.from(A).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(JDe(e)||(e=e instanceof VDe?new yG([e],"blob",{type:e.type}):new fG(e,"blob",{type:e.type})),t!==void 0){let r={type:e.type,lastModified:e.lastModified};e=F6&&e instanceof F6||e instanceof bG?new yG([e],t,r):new fG(e,t,r)}return{name:A,value:e}}NG.exports={FormData:Su}});var IC=E((WtA,UG)=>{"use strict";var WDe=VH(),vu=rA(),{ReadableStreamFrom:zDe,isBlobLike:DG,isReadableStreamLike:jDe,readableStreamClose:XDe,createDeferredPromise:ZDe,fullyReadBody:KDe}=an(),{FormData:RG}=yf(),{kState:fo}=Bo(),{webidl:L6}=hi(),{DOMException:vG,structuredClone:$De}=Lc(),{Blob:e4e,File:A4e}=require("buffer"),{kBodyUsed:t4e}=GA(),U6=require("assert"),{isErrored:r4e}=rA(),{isUint8Array:kG,isArrayBuffer:i4e}=require("util/types"),{File:s4e}=If(),{parseMIMEType:n4e,serializeAMimeType:a4e}=Mn(),Io=globalThis.ReadableStream,xG=A4e??s4e,wf=new TextEncoder,o4e=new TextDecoder;function FG(A,e=!1){Io||(Io=require("stream/web").ReadableStream);let t=null;A instanceof Io?t=A:DG(A)?t=A.stream():t=new Io({async pul
2024-07-29 19:19:44 +00:00
Content-Disposition: form-data`;let l=Q=>Q.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),d=Q=>Q.replace(/\r?\n|\r/g,`\r
`),p=[],u=new Uint8Array([13,10]);s=0;let g=!1;for(let[Q,B]of A)if(typeof B=="string"){let w=wf.encode(c+`; name="${l(d(Q))}"\r
\r
${d(B)}\r
`);p.push(w),s+=w.byteLength}else{let w=wf.encode(`${c}; name="${l(d(Q))}"`+(B.name?`; filename="${l(B.name)}"`:"")+`\r
Content-Type: ${B.type||"application/octet-stream"}\r
\r
2024-07-29 20:07:21 +00:00
`);p.push(w,B,u),typeof B.size=="number"?s+=w.byteLength+B.size+u.byteLength:g=!0}let h=wf.encode(`--${o}--`);p.push(h),s+=h.byteLength,g&&(s=null),i=A,r=async function*(){for(let Q of p)Q.stream?yield*Q.stream():yield Q},n="multipart/form-data; boundary="+o}else if(DG(A))i=A,s=A.size,A.type&&(n=A.type);else if(typeof A[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(vu.isDisturbed(A)||A.locked)throw new TypeError("Response body object should not be disturbed or locked");t=A instanceof Io?A:zDe(A)}if((typeof i=="string"||vu.isBuffer(i))&&(s=Buffer.byteLength(i)),r!=null){let o;t=new Io({async start(){o=r(A)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:d}=await o.next();return d?queueMicrotask(()=>{c.close()}):r4e(t)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await o.return()},type:void 0})}return[{stream:t,source:i,length:s},n]}function c4e(A,e=!1){return Io||(Io=require("stream/web").ReadableStream),A instanceof Io&&(U6(!vu.isDisturbed(A),"The body has already been consumed."),U6(!A.locked,"The stream is locked.")),FG(A,e)}function l4e(A){let[e,t]=A.stream.tee(),r=$De(t,{transfer:[t]}),[,i]=r.tee();return A.stream=e,{stream:i,length:A.length,source:A.source}}async function*SG(A){if(A)if(kG(A))yield A;else{let e=A.stream;if(vu.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[t4e]=!0,yield*e}}function M6(A){if(A.aborted)throw new vG("The operation was aborted.","AbortError")}function d4e(A){return{blob(){return bf(this,t=>{let r=h4e(this);return r==="failure"?r="":r&&(r=a4e(r)),new e4e([t],{type:r})},A)},arrayBuffer(){return bf(this,t=>new Uint8Array(t).buffer,A)},text(){return bf(this,LG,A)},json(){return bf(this,g4e,A)},async formData(){L6.brandCheck(this,A),M6(this[fo]);let t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){let r={};for(let[a,o]of this.headers)r[a.toLowerCase()]=o;let i=new RG,s;try{s=new WDe({headers:r,preservePath:!0})}catch(a){throw new vG(`${a}`,"AbortError")}s.on("field",(a,o)=>{i.append(a,o)}),s.on("file",(a,o,c,l,d)=>{let p=[];if(l==="base64"||l.toLowerCase()==="base64"){let u="";o.on("data",g=>{u+=g.toString().replace(/[\r\n]/gm,"");let h=u.length-u.length%4;p.push(Buffer.from(u.slice(0,h),"base64")),u=u.slice(h)}),o.on("end",()=>{p.push(Buffer.from(u,"base64")),i.append(a,new xG(p,c,{type:d}))})}else o.on("data",u=>{p.push(u)}),o.on("end",()=>{i.append(a,new xG(p,c,{type:d}))})});let n=new Promise((a,o)=>{s.on("finish",a),s.on("error",c=>o(new TypeError(c)))});if(this.body!==null)for await(let a of SG(this[fo].body))s.write(a);return s.end(),await n,i}else if(/application\/x-www-form-urlencoded/.test(t)){let r;try{let s="",n=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of SG(this[fo].body)){if(!kG(a))throw new TypeError("Expected Uint8Array chunk");s+=n.decode(a,{stream:!0})}s+=n.decode(),r=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new RG;for(let[s,n]of r)i.append(s,n);return i}else throw await Promise.resolve(),M6(this[fo]),L6.errors.exception({header:`${A.name}.formData`,message:"Could not parse content as FormData."})}}}function p4e(A){Object.assign(A.prototype,d4e(A))}async function bf(A,e,t){if(L6.brandCheck(A,t),M6(A[fo]),u4e(A[fo].body))throw new TypeError("Body is unusable");let r=ZDe(),i=n=>r.reject(n),s=n=>{try{r.resolve(e(n))}catch(a){i(a)}};return A[fo].body==null?(s(new Uint8Array),r.promise):(await KDe(A[fo].body,s,i),r.promise)}function u4e(A){return A!=null&&(A.stream.locked||vu.isDisturbed(A.stream))}function LG(A){return A.length===0?"":(A[0]===239&&A[1]===187&&A[2]===191&&(A=A.subarray(3)),o4e.decode(A))}function g4e(A){return JSON.parse(LG(A))}function h4e(A){let{headersList:e}=A[fo],t=e.get("content-type");return t===null?"failure":n4e(t)}UG.exports={extractBody:FG,safelyExtractBody:c4e,cloneBody:l4e,mixinBody:p4e}});var YG=E((ztA,OG)=>{"use strict";var{InvalidArgumentError:_A,NotSupportedError:E4e}=UA(),yo=require("assert"),{kHTTP2BuildRequest:C4e,kHTTP2CopyHea
2024-07-29 19:19:44 +00:00
`),this.body=Q.stream,this.contentLength=Q.length}else _i.isBlobLike(i)&&this.contentType==null&&i.type&&(this.contentType=i.type,this.headers+=`content-type: ${i.type}\r
2024-07-29 20:07:21 +00:00
`);_i.validateHandler(h,r,c),this.servername=_i.getServerName(this.host),this[Tn]=h,Vt.create.hasSubscribers&&Vt.create.publish({request:this})}onBodySent(e){if(this[Tn].onBodySent)try{return this[Tn].onBodySent(e)}catch(t){this.abort(t)}}onRequestSent(){if(Vt.bodySent.hasSubscribers&&Vt.bodySent.publish({request:this}),this[Tn].onRequestSent)try{return this[Tn].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(yo(!this.aborted),yo(!this.completed),this.error)e(this.error);else return this.abort=e,this[Tn].onConnect(e)}onHeaders(e,t,r,i){yo(!this.aborted),yo(!this.completed),Vt.headers.hasSubscribers&&Vt.headers.publish({request:this,response:{statusCode:e,headers:t,statusText:i}});try{return this[Tn].onHeaders(e,t,r,i)}catch(s){this.abort(s)}}onData(e){yo(!this.aborted),yo(!this.completed);try{return this[Tn].onData(e)}catch(t){return this.abort(t),!1}}onUpgrade(e,t,r){return yo(!this.aborted),yo(!this.completed),this[Tn].onUpgrade(e,t,r)}onComplete(e){this.onFinally(),yo(!this.aborted),this.completed=!0,Vt.trailers.hasSubscribers&&Vt.trailers.publish({request:this,trailers:e});try{return this[Tn].onComplete(e)}catch(t){this.onError(t)}}onError(e){if(this.onFinally(),Vt.error.hasSubscribers&&Vt.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Tn].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,t){return fC(this,e,t),this}static[m4e](e,t,r){return new A(e,t,r)}static[C4e](e,t,r){let i=t.headers;t={...t,headers:null};let s=new A(e,t,r);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new _A("headers array must be even");for(let n=0;n<i.length;n+=2)fC(s,i[n],i[n+1],!0)}else if(i&&typeof i=="object"){let n=Object.keys(i);for(let a=0;a<n.length;a++){let o=n[a];fC(s,o,i[o],!0)}}else if(i!=null)throw new _A("headers must be an object or an array");return s}static[Q4e](e){let t=e.split(`\r
`),r={};for(let i of t){let[s,n]=i.split(": ");n==null||n.length===0||(r[s]?r[s]+=`,${n}`:r[s]=n)}return r}};function ld(A,e,t){if(e&&typeof e=="object")throw new _A(`invalid ${A} header`);if(e=e!=null?`${e}`:"",TG.exec(e)!==null)throw new _A(`invalid ${A} header`);return t?e:`${A}: ${e}\r
`}function fC(A,e,t,r=!1){if(t&&typeof t=="object"&&!Array.isArray(t))throw new _A(`invalid ${e} header`);if(t===void 0)return;if(A.host===null&&e.length===4&&e.toLowerCase()==="host"){if(TG.exec(t)!==null)throw new _A(`invalid ${e} header`);A.host=t}else if(A.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(A.contentLength=parseInt(t,10),!Number.isFinite(A.contentLength))throw new _A("invalid content-length header")}else if(A.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")A.contentType=t,r?A.headers[e]=ld(e,t,r):A.headers+=ld(e,t);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new _A("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof t=="string"?t.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new _A("invalid connection header");i==="close"&&(A.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new _A("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new _A("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new E4e("expect header not supported");if(MG.exec(e)===null)throw new _A("invalid header key");if(Array.isArray(t))for(let i=0;i<t.length;i++)r?A.headers[e]?A.headers[e]+=`,${ld(e,t[i],r)}`:A.headers[e]=ld(e,t[i],r):A.headers+=ld(e,t[i]);else r?A.headers[e]=ld(e,t,r):A.headers+=ld(e,t)}}}OG.exports=O6});var Nf=E((jtA,qG)=>{"use strict";var I4e=require("events"),Y6=class extends I4e{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};qG.exports=Y6});var wC=E((XtA,PG)=>{"use strict";var f4e=Nf(),{ClientDestroyedError:q6,ClientClosedError:y4e,InvalidArgumentError:ku}=UA(),{kDestroy:w4e,kClose:b4e,kDispatch:P6,kInterceptors:dd}=GA(),Fu=Symbol("destroyed"),yC=Symbol("closed"),wo=Symbol("onDestroyed"),Lu=Symbol("onClosed"),Df=Symbol("Intercepted Dispatch"),H6=class extends f4e{constructor(){super(),this[Fu]=!1,this[wo]=null,this[yC]=!1,this[Lu]=[]}get destroyed(){return this[Fu]}get closed(){return this[yC]}get interceptors(){return this[dd]}set interceptors(e){if(e){for(let t=e.length-1;t>=0;t--)if(typeof this[dd][t]!="function")throw new ku("interceptor must be an function")}this[dd]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((s,n)=>s?i(s):r(n))});if(typeof e!="function")throw new ku("invalid callback");if(this[Fu]){queueMicrotask(()=>e(new q6,null));return}if(this[yC]){this[Lu]?this[Lu].push(e):queueMicrotask(()=>e(null,null));return}this[yC]=!0,this[Lu].push(e);let t=()=>{let r=this[Lu];this[Lu]=null;for(let i=0;i<r.length;i++)r[i](null,null)};this[b4e]().then(()=>this.destroy()).then(()=>{queueMicrotask(t)})}destroy(e,t){if(typeof e=="function"&&(t=e,e=null),t===void 0)return new Promise((i,s)=>{this.destroy(e,(n,a)=>n?s(n):i(a))});if(typeof t!="function")throw new ku("invalid callback");if(this[Fu]){this[wo]?this[wo].push(t):queueMicrotask(()=>t(null,null));return}e||(e=new q6),this[Fu]=!0,this[wo]=this[wo]||[],this[wo].push(t);let r=()=>{let i=this[wo];this[wo]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[w4e](e).then(()=>{queueMicrotask(r)})}[Df](e,t){if(!this[dd]||this[dd].length===0)return this[Df]=this[P6],this[P6](e,t);let r=this[P6].bind(this);for(let i=this[dd].length-1;i>=0;i--)r=this[dd][i](r);return this[Df]=r,r(e,t)}dispatch(e,t){if(!t||typeof t!="object")throw new ku("handler must be an object");try{if(!e||typeof e!="object")throw new ku("opts must be an object.");if(this[Fu]||this[wo])throw new q6;if(this[yC])throw new y4e;return this[Df](e,t)}catch(r){if(typeof t.onError!="function")throw new ku("invalid onError method");return t.onError(r),!1}}};PG.exports=H6});var bC=E(($tA,_G)=>{"use strict";var N4e=require("net"),HG=require("assert"),GG=rA(),{InvalidArgumentError:D4e,ConnectTimeoutError:R4e}=UA(),G6,_6;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?_6=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(
`,this[a_]=o??3e5,this[n_]=i??3e5,this[vC]=w??!0,this[sRe]=C,this[kC]=b,this[Mc]=null,this[c_]=y>-1?y:-1,this[wa]="h1",this[ms]=null,this[Uf]=S?{openStreams:0,maxConcurrentStreams:x??100}:null,this[l_]=`${this[Lr].hostname}${this[Lr].port?`:${this[Lr].port}`:""}`,this[$A]=[],this[et]=0,this[Qs]=0}get pipelining(){return this[Oc]}set pipelining(e){this[Oc]=e,Bs(this,!0)}get[gd](){return this[$A].length-this[Qs]}get[gt](){return this[Qs]-this[et]}get[ud](){return this[$A].length-this[et]}get[iRe](){return!!this[yt]&&!this[Tu]&&!this[yt].destroyed}get[K6](){let e=this[yt];return e&&(e[Ei]||e[No]||e[Yu])||this[ud]>=(this[Oc]||1)||this[gd]>0}[rRe](e){g_(this),this.once("connect",e)}[oRe](e,t){let r=e.origin||this[Lr].origin,i=this[wa]==="h2"?Z6[lRe](r,e,t):Z6[pRe](r,e,t);return this[$A].push(i),this[pd]||(he.bodyLength(i.body)==null&&he.isIterable(i.body)?(this[pd]=1,process.nextTick(Bs,this)):Bs(this,!0)),this[pd]&&this[Tc]!==2&&this[K6]&&(this[Tc]=2),this[Tc]<2}async[nRe](){return new Promise(e=>{this[ud]?this[Mc]=e:e(null)})}async[aRe](e){return new Promise(t=>{let r=this[$A].splice(this[Qs]);for(let s=0;s<r.length;s++){let n=r[s];Ci(this,n,e)}let i=()=>{this[Mc]&&(this[Mc](),this[Mc]=null),t()};this[ms]!=null&&(he.destroy(this[ms],e),this[ms]=null,this[Uf]=null),this[yt]?he.destroy(this[yt].on("close",i),e):queueMicrotask(i),Bs(this)})}};function BRe(A){te(A.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[yt][Ur]=A,Yf(this[ya],A)}function IRe(A,e,t){let r=new fa(`HTTP/2: "frameError" received - type ${A}, code ${e}`);t===0&&(this[yt][Ur]=r,Yf(this[ya],r))}function fRe(){he.destroy(this,new Ou("other side closed")),he.destroy(this[yt],new Ou("other side closed"))}function yRe(A){let e=this[ya],t=new fa(`HTTP/2: "GOAWAY" frame received with code ${A}`);if(e[yt]=null,e[ms]=null,e.destroyed){te(this[gd]===0);let r=e[$A].splice(e[et]);for(let i=0;i<r.length;i++){let s=r[i];Ci(this,s,t)}}else if(e[gt]>0){let r=e[$A][e[et]];e[$A][e[et]++]=null,Ci(e,r,t)}e[Qs]=e[et],te(e[gt]===0),e.emit("disconnect",e[Lr],[e],t),Bs(e)}var ma=VG(),wRe=Sf(),bRe=Buffer.alloc(0);async function NRe(){let A=process.env.JEST_WORKER_ID?z6():void 0,e;try{e=await WebAssembly.compile(Buffer.from($G(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(A||z6(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(t,r,i)=>0,wasm_on_status:(t,r,i)=>{te.strictEqual(tr.ptr,t);let s=r-Ia+Ba.byteOffset;return tr.onStatus(new vf(Ba.buffer,s,i))||0},wasm_on_message_begin:t=>(te.strictEqual(tr.ptr,t),tr.onMessageBegin()||0),wasm_on_header_field:(t,r,i)=>{te.strictEqual(tr.ptr,t);let s=r-Ia+Ba.byteOffset;return tr.onHeaderField(new vf(Ba.buffer,s,i))||0},wasm_on_header_value:(t,r,i)=>{te.strictEqual(tr.ptr,t);let s=r-Ia+Ba.byteOffset;return tr.onHeaderValue(new vf(Ba.buffer,s,i))||0},wasm_on_headers_complete:(t,r,i,s)=>(te.strictEqual(tr.ptr,t),tr.onHeadersComplete(r,!!i,!!s)||0),wasm_on_body:(t,r,i)=>{te.strictEqual(tr.ptr,t);let s=r-Ia+Ba.byteOffset;return tr.onBody(new vf(Ba.buffer,s,i))||0},wasm_on_message_complete:t=>(te.strictEqual(tr.ptr,t),tr.onMessageComplete()||0)}})}var X6=null,A9=NRe();A9.catch();var tr=null,Ba=null,kf=0,Ia=null,qu=1,Lf=2,t9=3,r9=class{constructor(e,t,{exports:r}){te(Number.isFinite(e[Ff])&&e[Ff]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(ma.TYPE.RESPONSE),this.client=e,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[Ff],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[c_]}setTimeout(e,t){this.timeoutType=t,e!==this.timeoutValue?(j6.clearTimeout(this.timeout),e?(this.timeout=j6.setTimeout(DRe,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(te(this.ptr!=null),te(tr==null),this.llhttp.llhttp_resume(this.ptr),te(
2024-07-29 19:19:44 +00:00
`;return typeof s=="string"?g+=`host: ${s}\r
2024-07-29 20:07:21 +00:00
`:g+=A[r_],n?g+=`connection: upgrade\r
2024-07-29 19:19:44 +00:00
upgrade: ${n}\r
`:A[Oc]&&!u[Ei]?g+=`connection: keep-alive\r
`:g+=`connection: close\r
`,a&&(g+=a),Xr.sendHeaders.hasSubscribers&&Xr.sendHeaders.publish({request:e,headers:g,socket:u}),!t||d===0?(p===0?u.write(`${g}content-length: 0\r
\r
`,"latin1"):(te(p===null,"no body must not have content length"),u.write(`${g}\r
`,"latin1")),e.onRequestSent()):he.isBuffer(t)?(te(p===t.byteLength,"buffer body must have content length"),u.cork(),u.write(`${g}content-length: ${p}\r
\r
2024-07-29 20:07:21 +00:00
`,"latin1"),u.write(t),u.uncork(),e.onBodySent(t),e.onRequestSent(),l||(u[Ei]=!0)):he.isBlobLike(t)?typeof t.stream=="function"?Tf({body:t.stream(),client:A,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):C_({body:t,client:A,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):he.isStream(t)?E_({body:t,client:A,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):he.isIterable(t)?Tf({body:t,client:A,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):te(!1),!0}function SRe(A,e,t){let{body:r,method:i,path:s,host:n,upgrade:a,expectContinue:o,signal:c,headers:l}=t,d;if(typeof l=="string"?d=Z6[dRe](l.trim()):d=l,a)return Ci(A,t,new Error("Upgrade not supported for H2")),!1;try{t.onConnect(w=>{t.aborted||t.completed||Ci(A,t,w||new s9)})}catch(w){Ci(A,t,w)}if(t.aborted)return!1;let p,u=A[Uf];if(d[uRe]=n||A[l_],d[gRe]=i,i==="CONNECT")return e.ref(),p=e.request(d,{endStream:!1,signal:c}),p.id&&!p.pending?(t.onUpgrade(null,null,p),++u.openStreams):p.once("ready",()=>{t.onUpgrade(null,null,p),++u.openStreams}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),!0;d[hRe]=s,d[ERe]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let h=he.bodyLength(r);if(h==null&&(h=t.contentLength),(h===0||!g)&&(h=null),h_(i)&&h>0&&t.contentLength!=null&&t.contentLength!==h){if(A[vC])return Ci(A,t,new bo),!1;process.emitWarning(new bo)}h!=null&&(te(r,"no body must not have content length"),d[CRe]=`${h}`),e.ref();let Q=i==="GET"||i==="HEAD";return o?(d[QRe]="100-continue",p=e.request(d,{endStream:Q,signal:c}),p.once("continue",B)):(p=e.request(d,{endStream:Q,signal:c}),B()),++u.openStreams,p.once("response",w=>{let{[mRe]:I,...C}=w;t.onHeaders(Number(I),C,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{t.onComplete([])}),p.on("data",w=>{t.onData(w)===!1&&p.pause()}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),p.once("error",function(w){A[ms]&&!A[ms].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,he.destroy(p,w))}),p.once("frameError",(w,I)=>{let C=new fa(`HTTP/2: "frameError" received - type ${w}, code ${I}`);Ci(A,t,C),A[ms]&&!A[ms].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,he.destroy(p,C))}),!0;function B(){r?he.isBuffer(r)?(te(h===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),t.onBodySent(r),t.onRequestSent()):he.isBlobLike(r)?typeof r.stream=="function"?Tf({client:A,request:t,contentLength:h,h2stream:p,expectsPayload:g,body:r.stream(),socket:A[yt],header:""}):C_({body:r,client:A,request:t,contentLength:h,expectsPayload:g,h2stream:p,header:"",socket:A[yt]}):he.isStream(r)?E_({body:r,client:A,request:t,contentLength:h,expectsPayload:g,socket:A[yt],h2stream:p,header:""}):he.isIterable(r)?Tf({body:r,client:A,request:t,contentLength:h,expectsPayload:g,header:"",h2stream:p,socket:A[yt]}):te(!1):t.onRequestSent()}}function E_({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){if(te(s!==0||t[gt]===0,"stream body cannot be pipelined"),t[wa]==="h2"){let h=function(Q){r.onBodySent(Q)},g=W4e(e,A,Q=>{Q?(he.destroy(e,Q),he.destroy(A,Q)):r.onRequestSent()});g.on("data",h),g.once("end",()=>{g.removeListener("data",h),he.destroy(g)});return}let o=!1,c=new Of({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n}),l=function(g){if(!o)try{!c.write(g)&&this.pause&&this.pause()}catch(h){he.destroy(this,h)}},d=function(){o||e.resume&&e.resume()},p=function(){if(o)return;let g=new s9;queueMicrotask(()=>u(g))},u=function(g){if(!o){if(o=!0,te(i.destroyed||i[No]&&t[gt]<=1),i.off("drain",d).off("error",u),e.removeListener("data",l).removeListener("end",u).removeListener("error",u).removeListener("close",p),!g)try{c.end()}catch(h){g=h}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?he.destroy(e,g):he.destroy(e)}};e.on("data",l).on("end",u).on("error",u).on("close",p),e.resume&&e.resume(),i.on("drain",d).on("error",u)}async function C_({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,heade
2024-07-29 19:19:44 +00:00
\r
`,"latin1"),i.write(c),i.uncork()),r.onBodySent(c),r.onRequestSent(),a||(i[Ei]=!0),Bs(t)}catch(c){he.destroy(o?A:i,c)}}async function Tf({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){te(s!==0||t[gt]===0,"iterator body cannot be pipelined");let o=null;function c(){if(o){let p=o;o=null,p()}}let l=()=>new Promise((p,u)=>{te(o===null),i[Ur]?u(i[Ur]):o=p});if(t[wa]==="h2"){A.on("close",c).on("drain",c);try{for await(let p of e){if(i[Ur])throw i[Ur];let u=A.write(p);r.onBodySent(p),u||await l()}}catch(p){A.destroy(p)}finally{r.onRequestSent(),A.end(),A.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let d=new Of({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n});try{for await(let p of e){if(i[Ur])throw i[Ur];d.write(p)||await l()}d.end()}catch(p){d.destroy(p)}finally{i.off("close",c).off("drain",c)}}var Of=class{constructor({socket:e,request:t,contentLength:r,client:i,expectsPayload:s,header:n}){this.socket=e,this.request=t,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=n,e[No]=!0}write(e){let{socket:t,request:r,contentLength:i,client:s,bytesWritten:n,expectsPayload:a,header:o}=this;if(t[Ur])throw t[Ur];if(t.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&n+c>i){if(s[vC])throw new bo;process.emitWarning(new bo)}t.cork(),n===0&&(a||(t[Ei]=!0),i===null?t.write(`${o}transfer-encoding: chunked\r
`,"latin1"):t.write(`${o}content-length: ${i}\r
\r
`,"latin1")),i===null&&t.write(`\r
${c.toString(16)}\r
`,"latin1"),this.bytesWritten+=c;let l=t.write(e);return t.uncork(),r.onBodySent(e),l||t[ft].timeout&&t[ft].timeoutType===qu&&t[ft].timeout.refresh&&t[ft].timeout.refresh(),l}end(){let{socket:e,contentLength:t,client:r,bytesWritten:i,expectsPayload:s,header:n,request:a}=this;if(a.onRequestSent(),e[No]=!1,e[Ur])throw e[Ur];if(!e.destroyed){if(i===0?s?e.write(`${n}content-length: 0\r
\r
`,"latin1"):e.write(`${n}\r
`,"latin1"):t===null&&e.write(`\r
0\r
\r
2024-07-29 20:07:21 +00:00
`,"latin1"),t!==null&&i!==t){if(r[vC])throw new bo;process.emitWarning(new bo)}e[ft].timeout&&e[ft].timeoutType===qu&&e[ft].timeout.refresh&&e[ft].timeout.refresh(),Bs(r)}}destroy(e){let{socket:t,client:r}=this;t[No]=!1,e&&(te(r[gt]<=1,"pipeline should only contain this request"),he.destroy(t,e))}};function Ci(A,e,t){try{e.onError(t),te(e.aborted)}catch(r){A.emit("error",r)}}Q_.exports=e9});var B_=E((orA,m_)=>{"use strict";var qf=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};m_.exports=class{constructor(){this.head=this.tail=new qf}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new qf),this.head.push(e)}shift(){let e=this.tail,t=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),t}}});var f_=E((crA,I_)=>{var{kFree:vRe,kConnected:kRe,kPending:FRe,kQueued:LRe,kRunning:URe,kSize:MRe}=GA(),hd=Symbol("pool"),n9=class{constructor(e){this[hd]=e}get connected(){return this[hd][kRe]}get free(){return this[hd][vRe]}get pending(){return this[hd][FRe]}get queued(){return this[hd][LRe]}get running(){return this[hd][URe]}get size(){return this[hd][MRe]}};I_.exports=n9});var p9=E((lrA,k_)=>{"use strict";var TRe=wC(),ORe=B_(),{kConnected:a9,kSize:y_,kRunning:w_,kPending:b_,kQueued:LC,kBusy:YRe,kFree:qRe,kUrl:PRe,kClose:HRe,kDestroy:GRe,kDispatch:_Re}=GA(),JRe=f_(),Ji=Symbol("clients"),Qi=Symbol("needDrain"),UC=Symbol("queue"),o9=Symbol("closed resolve"),c9=Symbol("onDrain"),N_=Symbol("onConnect"),D_=Symbol("onDisconnect"),R_=Symbol("onConnectionError"),l9=Symbol("get dispatcher"),S_=Symbol("add client"),v_=Symbol("remove client"),x_=Symbol("stats"),d9=class extends TRe{constructor(){super(),this[UC]=new ORe,this[Ji]=[],this[LC]=0;let e=this;this[c9]=function(r,i){let s=e[UC],n=!1;for(;!n;){let a=s.shift();if(!a)break;e[LC]--,n=!this.dispatch(a.opts,a.handler)}this[Qi]=n,!this[Qi]&&e[Qi]&&(e[Qi]=!1,e.emit("drain",r,[e,...i])),e[o9]&&s.isEmpty()&&Promise.all(e[Ji].map(a=>a.close())).then(e[o9])},this[N_]=(t,r)=>{e.emit("connect",t,[e,...r])},this[D_]=(t,r,i)=>{e.emit("disconnect",t,[e,...r],i)},this[R_]=(t,r,i)=>{e.emit("connectionError",t,[e,...r],i)},this[x_]=new JRe(this)}get[YRe](){return this[Qi]}get[a9](){return this[Ji].filter(e=>e[a9]).length}get[qRe](){return this[Ji].filter(e=>e[a9]&&!e[Qi]).length}get[b_](){let e=this[LC];for(let{[b_]:t}of this[Ji])e+=t;return e}get[w_](){let e=0;for(let{[w_]:t}of this[Ji])e+=t;return e}get[y_](){let e=this[LC];for(let{[y_]:t}of this[Ji])e+=t;return e}get stats(){return this[x_]}async[HRe](){return this[UC].isEmpty()?Promise.all(this[Ji].map(e=>e.close())):new Promise(e=>{this[o9]=e})}async[GRe](e){for(;;){let t=this[UC].shift();if(!t)break;t.handler.onError(e)}return Promise.all(this[Ji].map(t=>t.destroy(e)))}[_Re](e,t){let r=this[l9]();return r?r.dispatch(e,t)||(r[Qi]=!0,this[Qi]=!this[l9]()):(this[Qi]=!0,this[UC].push({opts:e,handler:t}),this[LC]++),!this[Qi]}[S_](e){return e.on("drain",this[c9]).on("connect",this[N_]).on("disconnect",this[D_]).on("connectionError",this[R_]),this[Ji].push(e),this[Qi]&&process.nextTick(()=>{this[Qi]&&this[c9](e[PRe],[this,e])}),this}[v_](e){e.close(()=>{let t=this[Ji].indexOf(e);t!==-1&&this[Ji].splice(t,1)}),this[Qi]=this[Ji].some(t=>!t[Qi]&&t.closed!==!0&&t.destroyed!==!0)}};k_.exports={PoolBase:d9,kClients:Ji,kNeedDrain:Qi,kAddClient:S_,kRemoveClient:v_,kGetDispatcher:l9}});var Pu=E((drA,M_)=>{"use strict";var{PoolBase:VRe,kClients:F_,kNeedDrain:WRe,kAddClient:zRe,kGetDispatcher:jRe}=p9(),XRe=FC(),{InvalidArgumentError:u9}=UA(),g9=rA(),{kUrl:L_,kInterceptors:ZRe}=GA(),KRe=bC(),h9=Symbol("options"),E9=Symbol("connections"),U_=Symbol("factory");function $Re(A,e){return new XRe(A,e)}var C9=class extends VRe{constructor(e,{connections:t,factory:r=$Re,connect:i,connectTimeout:s,tls:n,maxCachedSessions
2024-07-29 19:19:44 +00:00
${r.count} ${r.noun} ${r.is} pending:
${e.format(t)}
2024-07-29 20:07:21 +00:00
`.trim())}};gV.exports=A8});var IV=E((MrA,BV)=>{"use strict";var{kProxy:e8e,kClose:A8e,kDestroy:t8e,kInterceptors:r8e}=GA(),{URL:EV}=require("url"),CV=TC(),i8e=Pu(),s8e=wC(),{InvalidArgumentError:HC,RequestAbortedError:n8e}=UA(),QV=bC(),qC=Symbol("proxy agent"),a1=Symbol("proxy client"),PC=Symbol("proxy headers"),t8=Symbol("request tls settings"),a8e=Symbol("proxy tls settings"),mV=Symbol("connect endpoint function");function o8e(A){return A==="https:"?443:80}function c8e(A){if(typeof A=="string"&&(A={uri:A}),!A||!A.uri)throw new HC("Proxy opts.uri is mandatory");return{uri:A.uri,protocol:A.protocol||"https"}}function l8e(A,e){return new i8e(A,e)}var r8=class extends s8e{constructor(e){if(super(e),this[e8e]=c8e(e),this[qC]=new CV(e),this[r8e]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new HC("Proxy opts.uri is mandatory");let{clientFactory:t=l8e}=e;if(typeof t!="function")throw new HC("Proxy opts.clientFactory must be a function.");this[t8]=e.requestTls,this[a8e]=e.proxyTls,this[PC]=e.headers||{};let r=new EV(e.uri),{origin:i,port:s,host:n,username:a,password:o}=r;if(e.auth&&e.token)throw new HC("opts.auth cannot be used in combination with opts.token");e.auth?this[PC]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[PC]["proxy-authorization"]=e.token:a&&o&&(this[PC]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(a)}:${decodeURIComponent(o)}`).toString("base64")}`);let c=QV({...e.proxyTls});this[mV]=QV({...e.requestTls}),this[a1]=t(r,{connect:c}),this[qC]=new CV({...e,connect:async(l,d)=>{let p=l.host;l.port||(p+=`:${o8e(l.protocol)}`);try{let{socket:u,statusCode:g}=await this[a1].connect({origin:i,port:s,path:p,signal:l.signal,headers:{...this[PC],host:n}});if(g!==200&&(u.on("error",()=>{}).destroy(),d(new n8e(`Proxy response (${g}) !== 200 when HTTP Tunneling`))),l.protocol!=="https:"){d(null,u);return}let h;this[t8]?h=this[t8].servername:h=l.servername,this[mV]({...l,servername:h,httpSocket:u},d)}catch(u){d(u)}}})}dispatch(e,t){let{host:r}=new EV(e.origin),i=d8e(e.headers);return p8e(i),this[qC].dispatch({...e,headers:{...i,host:r}},t)}async[A8e](){await this[qC].close(),await this[a1].close()}async[t8e](){await this[qC].destroy(),await this[a1].destroy()}};function d8e(A){if(Array.isArray(A)){let e={};for(let t=0;t<A.length;t+=2)e[A[t]]=A[t+1];return e}return A}function p8e(A){if(A&&Object.keys(A).find(t=>t.toLowerCase()==="proxy-authorization"))throw new HC("Proxy-Authorization should be sent in ProxyAgent constructor")}BV.exports=r8});var NV=E((TrA,bV)=>{var Id=require("assert"),{kRetryHandlerDefaultRetry:fV}=GA(),{RequestRetryError:o1}=UA(),{isDisturbed:yV,parseHeaders:u8e,parseRangeHeader:wV}=rA();function g8e(A){let e=Date.now();return new Date(A).getTime()-e}var i8=class A{constructor(e,t){let{retryOptions:r,...i}=e,{retry:s,maxRetries:n,maxTimeout:a,minTimeout:o,timeoutFactor:c,methods:l,errorCodes:d,retryAfter:p,statusCodes:u}=r??{};this.dispatch=t.dispatch,this.handler=t.handler,this.opts=i,this.abort=null,this.aborted=!1,this.retryOpts={retry:s??A[fV],retryAfter:p??!0,maxTimeout:a??30*1e3,timeout:o??500,timeoutFactor:c??2,maxRetries:n??5,methods:l??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:u??[500,502,503,504,429],errorCodes:d??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(g=>{this.aborted=!0,this.abort?this.abort(g):this.reason=g})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,t,r){this.handler.onUpgrade&&this.handler.onUpgrade(e,t,r)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[fV](e,{state:t,opts:r},i){let{statusCode:s,code:n,headers:a}=e,{method:o,retryOptions:c}=r,{maxRetries:l,timeout:d,maxTimeout:p,timeoutFactor:u,statusCodes:g,errorCodes:h,methods:Q}=c,{count
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(Ax)});var va=E((Nj,Wc)=>{(function(){var A,e,t,r,i,s,n,a=[].slice,o={}.hasOwnProperty;A=function(){var c,l,d,p,u,g;if(g=arguments[0],u=2<=arguments.length?a.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(c=0,d=u.length;c<d;c++)if(p=u[c],p!=null)for(l in p)o.call(p,l)&&(g[l]=p[l]);return g},i=function(c){return!!c&&Object.prototype.toString.call(c)==="[object Function]"},s=function(c){var l;return!!c&&((l=typeof c)=="function"||l==="object")},t=function(c){return i(Array.isArray)?Array.isArray(c):Object.prototype.toString.call(c)==="[object Array]"},r=function(c){var l;if(t(c))return!c.length;for(l in c)if(o.call(c,l))return!1;return!0},n=function(c){var l,d;return s(c)&&(d=Object.getPrototypeOf(c))&&(l=d.constructor)&&typeof l=="function"&&l instanceof l&&Function.prototype.toString.call(l)===Function.prototype.toString.call(Object)},e=function(c){return i(c.valueOf)?c.valueOf():c},Wc.exports.assign=A,Wc.exports.isFunction=i,Wc.exports.isObject=s,Wc.exports.isArray=t,Wc.exports.isEmpty=r,Wc.exports.isPlainObject=n,Wc.exports.getValue=e}).call(Nj)});var tx=E((Dj,Rj)=>{(function(){var A;Rj.exports=A=function(){function e(){}return e.prototype.hasFeature=function(t,r){return!0},e.prototype.createDocumentType=function(t,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(t,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(t,r){throw new Error("This DOM method is not implemented.")},e}()}).call(Dj)});var vj=E((xj,Sj)=>{(function(){var A;Sj.exports=A=function(){function e(){}return e.prototype.handleError=function(t){throw new Error(t)},e}()}).call(xj)});var Lj=E((kj,Fj)=>{(function(){var A;Fj.exports=A=function(){function e(t){this.arr=t||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(t){return this.arr[t]||null},e.prototype.contains=function(t){return this.arr.indexOf(t)!==-1},e}()}).call(kj)});var Tj=E((Uj,Mj)=>{(function(){var A,e,t;e=vj(),t=Lj(),Mj.exports=A=function(){function r(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=Object.create(this.defaultParams)}return Object.defineProperty(r.prototype,"parameterNames",{get:function(){return new t(Object.keys(this.defaultParams))}}),r.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},r.prototype.canSetParameter=function(i,s){return!0},r.prototype.setParameter=function(i,s){return s!=null?this.params[i]=s:delete this.params[i]},r}()}).call(Uj)});var Yt=E((Oj,Yj)=>{(function(){Yj.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(Oj)});var rx=E((qj,Pj)=>{(function(){var A,e,t;A=Yt(),t=Ds(),Pj.exports=e=function(){function r(i,s,n){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(n),this.type=A.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(r.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(r.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(r.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defin
`,C.offset=(R=I.offset)!=null?R:0,C.dontPrettyTextNodes=(y=(v=I.dontPrettyTextNodes)!=null?v:I.dontprettytextnodes)!=null?y:0,C.spaceBeforeSlash=(D=(S=I.spaceBeforeSlash)!=null?S:I.spacebeforeslash)!=null?D:"",C.spaceBeforeSlash===!0&&(C.spaceBeforeSlash=" "),C.suppressPrettyCount=0,C.user={},C.state=e.None,C},w.prototype.indent=function(I,C,m){var b;return!C.pretty||C.suppressPrettyCount?"":C.pretty&&(b=(m||0)+C.offset+1,b>0)?new Array(b).join(C.indent):""},w.prototype.endline=function(I,C,m){return!C.pretty||C.suppressPrettyCount?"":C.newline},w.prototype.attribute=function(I,C,m){var b;return this.openAttribute(I,C,m),b=" "+I.name+'="'+I.value+'"',this.closeAttribute(I,C,m),b},w.prototype.cdata=function(I,C,m){var b;return this.openNode(I,C,m),C.state=e.OpenTag,b=this.indent(I,C,m)+"<![CDATA[",C.state=e.InsideTag,b+=I.value,C.state=e.CloseTag,b+="]]>"+this.endline(I,C,m),C.state=e.None,this.closeNode(I,C,m),b},w.prototype.comment=function(I,C,m){var b;return this.openNode(I,C,m),C.state=e.OpenTag,b=this.indent(I,C,m)+"<!-- ",C.state=e.InsideTag,b+=I.value,C.state=e.CloseTag,b+=" -->"+this.endline(I,C,m),C.state=e.None,this.closeNode(I,C,m),b},w.prototype.declaration=function(I,C,m){var b;return this.openNode(I,C,m),C.state=e.OpenTag,b=this.indent(I,C,m)+"<?xml",C.state=e.InsideTag,b+=' version="'+I.version+'"',I.encoding!=null&&(b+=' encoding="'+I.encoding+'"'),I.standalone!=null&&(b+=' standalone="'+I.standalone+'"'),C.state=e.CloseTag,b+=C.spaceBeforeSlash+"?>",b+=this.endline(I,C,m),C.state=e.None,this.closeNode(I,C,m),b},w.prototype.docType=function(I,C,m){var b,R,y,v,D;if(m||(m=0),this.openNode(I,C,m),C.state=e.OpenTag,v=this.indent(I,C,m),v+="<!DOCTYPE "+I.root().name,I.pubID&&I.sysID?v+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.sysID&&(v+=' SYSTEM "'+I.sysID+'"'),I.children.length>0){for(v+=" [",v+=this.endline(I,C,m),C.state=e.InsideTag,D=I.children,R=0,y=D.length;R<y;R++)b=D[R],v+=this.writeChildNode(b,C,m+1);C.state=e.CloseTag,v+="]"}return C.state=e.CloseTag,v+=C.spaceBeforeSlash+">",v+=this.endline(I,C,m),C.state=e.None,this.closeNode(I,C,m),v},w.prototype.element=function(I,C,m){var b,R,y,v,D,S,x,F,q,oe,T,Ze,be,bA;m||(m=0),oe=!1,T="",this.openNode(I,C,m),C.state=e.OpenTag,T+=this.indent(I,C,m)+"<"+I.name,Ze=I.attribs;for(q in Ze)B.call(Ze,q)&&(b=Ze[q],T+=this.attribute(b,C,m));if(y=I.children.length,v=y===0?null:I.children[0],y===0||I.children.every(function(oA){return(oA.type===A.Text||oA.type===A.Raw)&&oA.value===""}))C.allowEmpty?(T+=">",C.state=e.CloseTag,T+="</"+I.name+">"+this.endline(I,C,m)):(C.state=e.CloseTag,T+=C.spaceBeforeSlash+"/>"+this.endline(I,C,m));else if(C.pretty&&y===1&&(v.type===A.Text||v.type===A.Raw)&&v.value!=null)T+=">",C.state=e.InsideTag,C.suppressPrettyCount++,oe=!0,T+=this.writeChildNode(v,C,m+1),C.suppressPrettyCount--,oe=!1,C.state=e.CloseTag,T+="</"+I.name+">"+this.endline(I,C,m);else{if(C.dontPrettyTextNodes){for(be=I.children,D=0,x=be.length;D<x;D++)if(R=be[D],(R.type===A.Text||R.type===A.Raw)&&R.value!=null){C.suppressPrettyCount++,oe=!0;break}}for(T+=">"+this.endline(I,C,m),C.state=e.InsideTag,bA=I.children,S=0,F=bA.length;S<F;S++)R=bA[S],T+=this.writeChildNode(R,C,m+1);C.state=e.CloseTag,T+=this.indent(I,C,m)+"</"+I.name+">",oe&&C.suppressPrettyCount--,T+=this.endline(I,C,m),C.state=e.None}return this.closeNode(I,C,m),T},w.prototype.writeChildNode=function(I,C,m){switch(I.type){case A.CData:return this.cdata(I,C,m);case A.Comment:return this.comment(I,C,m);case A.Element:return this.element(I,C,m);case A.Raw:return this.raw(I,C,m);case A.Text:return this.text(I,C,m);case A.ProcessingInstruction:return this.processingInstruction(I,C,m);case A.Dummy:return"";case A.Declaration:return this.declaration(I,C,m);case A.DocType:return this.docType(I,C,m);case A.AttributeDeclaration:return this.dtdAttList(I,C,m);case A.ElementDeclaration:return this.dtdElement(I,C,m);case A.EntityDeclaration:return this.dtdEntity(I,C,m);case A.NotationDeclaration:return this.dtdNotation(I,C,m);default:throw new Error("Unknown XML node type: "+I.constructor.name)}},w.prototype.processingInstructi
2024-07-29 19:19:44 +00:00
`||N==="\r"||N===" "}function C(N){return N==='"'||N==="'"}function m(N){return N===">"||I(N)}function b(N,f){return N.test(f)}function R(N,f){return!b(N,f)}var y=0;A.STATE={BEGIN:y++,BEGIN_WHITESPACE:y++,TEXT:y++,TEXT_ENTITY:y++,OPEN_WAKA:y++,SGML_DECL:y++,SGML_DECL_QUOTED:y++,DOCTYPE:y++,DOCTYPE_QUOTED:y++,DOCTYPE_DTD:y++,DOCTYPE_DTD_QUOTED:y++,COMMENT_STARTING:y++,COMMENT:y++,COMMENT_ENDING:y++,COMMENT_ENDED:y++,CDATA:y++,CDATA_ENDING:y++,CDATA_ENDING_2:y++,PROC_INST:y++,PROC_INST_BODY:y++,PROC_INST_ENDING:y++,OPEN_TAG:y++,OPEN_TAG_SLASH:y++,ATTRIB:y++,ATTRIB_NAME:y++,ATTRIB_NAME_SAW_WHITE:y++,ATTRIB_VALUE:y++,ATTRIB_VALUE_QUOTED:y++,ATTRIB_VALUE_CLOSED:y++,ATTRIB_VALUE_UNQUOTED:y++,ATTRIB_VALUE_ENTITY_Q:y++,ATTRIB_VALUE_ENTITY_U:y++,CLOSE_TAG:y++,CLOSE_TAG_SAW_WHITE:y++,SCRIPT:y++,SCRIPT_ENDING:y++},A.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},A.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(A.ENTITIES).forEach(function(N){var f=A.ENTITIES[N],M=typeof f=="number"?String.fromCharCode(f):f;A.ENTITIES[N]=M});for(var v in A.STATE)A.STATE[A.STATE[v]]=v;y=A.STATE;function D(N,f,M){N[f]&&N[f](M)}function S(N,f,M){N.textNode&&x(N),D(N,f,M)}function x(N){N.textNode=F(N.opt,N.textNode),N.textNode&&D(N,"ontext",N.textNode),N.textNode=""}function F(N,f){return N.trim&&(f=f.trim()),N.normalize&&(f=f.replace(/\s+/g," ")),f}function q(N,f){return x(N),N.trackPosition&&(f+=`
Line: `+N.line+`
Column: `+N.column+`
Char: `+N.c),f=new Error(f),N.error=f,D(N,"onerror",f),N}function oe(N){return N.sawRoot&&!N.closedRoot&&T(N,"Unclosed root tag"),N.state!==y.BEGIN&&N.state!==y.BEGIN_WHITESPACE&&N.state!==y.TEXT&&q(N,"Unexpected end"),x(N),N.c="",N.closed=!0,D(N,"onend"),t.call(N,N.strict,N.opt),N}function T(N,f){if(typeof N!="object"||!(N instanceof t))throw new Error("bad call to strictFail");N.strict&&q(N,f)}function Ze(N){N.strict||(N.tagName=N.tagName[N.looseCase]());var f=N.tags[N.tags.length-1]||N,M=N.tag={name:N.tagName,attributes:{}};N.opt.xmlns&&(M.ns=f.ns),N.attribList.length=0,S(N,"onopentagstart",M)}function be(N,f){var M=N.indexOf(":"),k=M<0?["",N]:N.split(":"),NA=k[0],$t=k[1];return f&&N==="xmlns"&&(NA="xmlns",$t=""),{prefix:NA,local:$t}}function bA(N){if(N.strict||(N.attribName=N.attribName[N.looseCase]()),N.attribList.indexOf(N.attribName)!==-1||N.tag.attributes.hasOwnProperty(N.attribName)){N.attribName=N.attribValue="";return}if(N.opt.xmlns){var f=be(N.attribName,!0),M=f.prefix,k=f.local;if(M==="xmlns")if(k==="xml"&&N.attribValue!==p)T(N,"xml: prefix must be bound to "+p+`
Actual: `+N.attribValue);else if(k==="xmlns"&&N.attribValue!==u)T(N,"xmlns: prefix must be bound to "+u+`
2024-07-29 20:07:21 +00:00
Actual: `+N.attribValue);else{var NA=N.tag,$t=N.tags[N.tags.length-1]||N;NA.ns===$t.ns&&(NA.ns=Object.create($t.ns)),NA.ns[k]=N.attribValue}N.attribList.push([N.attribName,N.attribValue])}else N.tag.attributes[N.attribName]=N.attribValue,S(N,"onattribute",{name:N.attribName,value:N.attribValue});N.attribName=N.attribValue=""}function oA(N,f){if(N.opt.xmlns){var M=N.tag,k=be(N.tagName);M.prefix=k.prefix,M.local=k.local,M.uri=M.ns[k.prefix]||"",M.prefix&&!M.uri&&(T(N,"Unbound namespace prefix: "+JSON.stringify(N.tagName)),M.uri=k.prefix);var NA=N.tags[N.tags.length-1]||N;M.ns&&NA.ns!==M.ns&&Object.keys(M.ns).forEach(function(h7){S(N,"onopennamespace",{prefix:h7,uri:M.ns[h7]})});for(var $t=0,er=N.attribList.length;$t<er;$t++){var xi=N.attribList[$t],Vs=xi[0],Bp=xi[1],Nr=be(Vs,!0),Ao=Nr.prefix,tue=Nr.local,g7=Ao===""?"":M.ns[Ao]||"",Gb={name:Vs,value:Bp,prefix:Ao,local:tue,uri:g7};Ao&&Ao!=="xmlns"&&!g7&&(T(N,"Unbound namespace prefix: "+JSON.stringify(Ao)),Gb.uri=Ao),N.tag.attributes[Vs]=Gb,S(N,"onattribute",Gb)}N.attribList.length=0}N.tag.isSelfClosing=!!f,N.sawRoot=!0,N.tags.push(N.tag),S(N,"onopentag",N.tag),f||(!N.noscript&&N.tagName.toLowerCase()==="script"?N.state=y.SCRIPT:N.state=y.TEXT,N.tag=null,N.tagName=""),N.attribName=N.attribValue="",N.attribList.length=0}function cr(N){if(!N.tagName){T(N,"Weird empty close tag."),N.textNode+="</>",N.state=y.TEXT;return}if(N.script){if(N.tagName!=="script"){N.script+="</"+N.tagName+">",N.tagName="",N.state=y.SCRIPT;return}S(N,"onscript",N.script),N.script=""}var f=N.tags.length,M=N.tagName;N.strict||(M=M[N.looseCase]());for(var k=M;f--;){var NA=N.tags[f];if(NA.name!==k)T(N,"Unexpected close tag");else break}if(f<0){T(N,"Unmatched closing tag: "+N.tagName),N.textNode+="</"+N.tagName+">",N.state=y.TEXT;return}N.tagName=M;for(var $t=N.tags.length;$t-- >f;){var er=N.tag=N.tags.pop();N.tagName=N.tag.name,S(N,"onclosetag",N.tagName);var xi={};for(var Vs in er.ns)xi[Vs]=er.ns[Vs];var Bp=N.tags[N.tags.length-1]||N;N.opt.xmlns&&er.ns!==Bp.ns&&Object.keys(er.ns).forEach(function(Nr){var Ao=er.ns[Nr];S(N,"onclosenamespace",{prefix:Nr,uri:Ao})})}f===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=y.TEXT}function lr(N){var f=N.entity,M=f.toLowerCase(),k,NA="";return N.ENTITIES[f]?N.ENTITIES[f]:N.ENTITIES[M]?N.ENTITIES[M]:(f=M,f.charAt(0)==="#"&&(f.charAt(1)==="x"?(f=f.slice(2),k=parseInt(f,16),NA=k.toString(16)):(f=f.slice(1),k=parseInt(f,10),NA=k.toString(10))),f=f.replace(/^0+/,""),isNaN(k)||NA.toLowerCase()!==f?(T(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(k))}function le(N,f){f==="<"?(N.state=y.OPEN_WAKA,N.startTagPosition=N.position):I(f)||(T(N,"Non-whitespace before first tag."),N.textNode=f,N.state=y.TEXT)}function tA(N,f){var M="";return f<N.length&&(M=N.charAt(f)),M}function lA(N){var f=this;if(this.error)throw this.error;if(f.closed)return q(f,"Cannot write after close. Assign an onready handler.");if(N===null)return oe(f);typeof N=="object"&&(N=N.toString());for(var M=0,k="";k=tA(N,M++),f.c=k,!!k;)switch(f.trackPosition&&(f.position++,k===`
2024-07-29 19:19:44 +00:00
`?(f.line++,f.column=0):f.column++),f.state){case y.BEGIN:if(f.state=y.BEGIN_WHITESPACE,k==="\uFEFF")continue;le(f,k);continue;case y.BEGIN_WHITESPACE:le(f,k);continue;case y.TEXT:if(f.sawRoot&&!f.closedRoot){for(var NA=M-1;k&&k!=="<"&&k!=="&";)k=tA(N,M++),k&&f.trackPosition&&(f.position++,k===`
2024-07-29 20:07:21 +00:00
`?(f.line++,f.column=0):f.column++);f.textNode+=N.substring(NA,M-1)}k==="<"&&!(f.sawRoot&&f.closedRoot&&!f.strict)?(f.state=y.OPEN_WAKA,f.startTagPosition=f.position):(!I(k)&&(!f.sawRoot||f.closedRoot)&&T(f,"Text data outside of root node."),k==="&"?f.state=y.TEXT_ENTITY:f.textNode+=k);continue;case y.SCRIPT:k==="<"?f.state=y.SCRIPT_ENDING:f.script+=k;continue;case y.SCRIPT_ENDING:k==="/"?f.state=y.CLOSE_TAG:(f.script+="<"+k,f.state=y.SCRIPT);continue;case y.OPEN_WAKA:if(k==="!")f.state=y.SGML_DECL,f.sgmlDecl="";else if(!I(k))if(b(h,k))f.state=y.OPEN_TAG,f.tagName=k;else if(k==="/")f.state=y.CLOSE_TAG,f.tagName="";else if(k==="?")f.state=y.PROC_INST,f.procInstName=f.procInstBody="";else{if(T(f,"Unencoded <"),f.startTagPosition+1<f.position){var $t=f.position-f.startTagPosition;k=new Array($t).join(" ")+k}f.textNode+="<"+k,f.state=y.TEXT}continue;case y.SGML_DECL:(f.sgmlDecl+k).toUpperCase()===l?(S(f,"onopencdata"),f.state=y.CDATA,f.sgmlDecl="",f.cdata=""):f.sgmlDecl+k==="--"?(f.state=y.COMMENT,f.comment="",f.sgmlDecl=""):(f.sgmlDecl+k).toUpperCase()===d?(f.state=y.DOCTYPE,(f.doctype||f.sawRoot)&&T(f,"Inappropriately located doctype declaration"),f.doctype="",f.sgmlDecl=""):k===">"?(S(f,"onsgmldeclaration",f.sgmlDecl),f.sgmlDecl="",f.state=y.TEXT):(C(k)&&(f.state=y.SGML_DECL_QUOTED),f.sgmlDecl+=k);continue;case y.SGML_DECL_QUOTED:k===f.q&&(f.state=y.SGML_DECL,f.q=""),f.sgmlDecl+=k;continue;case y.DOCTYPE:k===">"?(f.state=y.TEXT,S(f,"ondoctype",f.doctype),f.doctype=!0):(f.doctype+=k,k==="["?f.state=y.DOCTYPE_DTD:C(k)&&(f.state=y.DOCTYPE_QUOTED,f.q=k));continue;case y.DOCTYPE_QUOTED:f.doctype+=k,k===f.q&&(f.q="",f.state=y.DOCTYPE);continue;case y.DOCTYPE_DTD:f.doctype+=k,k==="]"?f.state=y.DOCTYPE:C(k)&&(f.state=y.DOCTYPE_DTD_QUOTED,f.q=k);continue;case y.DOCTYPE_DTD_QUOTED:f.doctype+=k,k===f.q&&(f.state=y.DOCTYPE_DTD,f.q="");continue;case y.COMMENT:k==="-"?f.state=y.COMMENT_ENDING:f.comment+=k;continue;case y.COMMENT_ENDING:k==="-"?(f.state=y.COMMENT_ENDED,f.comment=F(f.opt,f.comment),f.comment&&S(f,"oncomment",f.comment),f.comment=""):(f.comment+="-"+k,f.state=y.COMMENT);continue;case y.COMMENT_ENDED:k!==">"?(T(f,"Malformed comment"),f.comment+="--"+k,f.state=y.COMMENT):f.state=y.TEXT;continue;case y.CDATA:k==="]"?f.state=y.CDATA_ENDING:f.cdata+=k;continue;case y.CDATA_ENDING:k==="]"?f.state=y.CDATA_ENDING_2:(f.cdata+="]"+k,f.state=y.CDATA);continue;case y.CDATA_ENDING_2:k===">"?(f.cdata&&S(f,"oncdata",f.cdata),S(f,"onclosecdata"),f.cdata="",f.state=y.TEXT):k==="]"?f.cdata+="]":(f.cdata+="]]"+k,f.state=y.CDATA);continue;case y.PROC_INST:k==="?"?f.state=y.PROC_INST_ENDING:I(k)?f.state=y.PROC_INST_BODY:f.procInstName+=k;continue;case y.PROC_INST_BODY:if(!f.procInstBody&&I(k))continue;k==="?"?f.state=y.PROC_INST_ENDING:f.procInstBody+=k;continue;case y.PROC_INST_ENDING:k===">"?(S(f,"onprocessinginstruction",{name:f.procInstName,body:f.procInstBody}),f.procInstName=f.procInstBody="",f.state=y.TEXT):(f.procInstBody+="?"+k,f.state=y.PROC_INST_BODY);continue;case y.OPEN_TAG:b(Q,k)?f.tagName+=k:(Ze(f),k===">"?oA(f):k==="/"?f.state=y.OPEN_TAG_SLASH:(I(k)||T(f,"Invalid character in tag name"),f.state=y.ATTRIB));continue;case y.OPEN_TAG_SLASH:k===">"?(oA(f,!0),cr(f)):(T(f,"Forward-slash in opening tag not followed by >"),f.state=y.ATTRIB);continue;case y.ATTRIB:if(I(k))continue;k===">"?oA(f):k==="/"?f.state=y.OPEN_TAG_SLASH:b(h,k)?(f.attribName=k,f.attribValue="",f.state=y.ATTRIB_NAME):T(f,"Invalid attribute name");continue;case y.ATTRIB_NAME:k==="="?f.state=y.ATTRIB_VALUE:k===">"?(T(f,"Attribute without value"),f.attribValue=f.attribName,bA(f),oA(f)):I(k)?f.state=y.ATTRIB_NAME_SAW_WHITE:b(Q,k)?f.attribName+=k:T(f,"Invalid attribute name");continue;case y.ATTRIB_NAME_SAW_WHITE:if(k==="=")f.state=y.ATTRIB_VALUE;else{if(I(k))continue;T(f,"Attribute without value"),f.tag.attributes[f.attribName]="",f.attribValue="",S(f,"onattribute",{name:f.attribName,value:""}),f.attribName="",k===">"?oA(f):b(h,k)?(f.attribName=k,f.state=y.ATTRIB_NAME):(T(f,"Invalid attribute name"),f.state=y.ATTRIB)}continue;case y.ATTRIB_VALUE:if(I(k))continue;C(k)?
`;sA.DEFAULT_CONTENT_TYPE="application/octet-stream";sA.prototype.append=function(A,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var r=Mx.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),pK.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(A,e,t),s=this._multiPartFooter();r(i),r(e),r(s),this._trackLength(i,e,t)};sA.prototype._trackLength=function(A,e,t){var r=0;t.knownLength!=null?r+=+t.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(A)+sA.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof $ve))&&(t.knownLength||this._valuesToMeasure.push(e))};sA.prototype._lengthRetriever=function(A,e){A.hasOwnProperty("fd")?A.end!=null&&A.end!=1/0&&A.start!=null?e(null,A.end+1-(A.start?A.start:0)):Kve.stat(A.path,function(t,r){var i;if(t){e(t);return}i=r.size-(A.start?A.start:0),e(null,i)}):A.hasOwnProperty("httpVersion")?e(null,+A.headers["content-length"]):A.hasOwnProperty("httpModule")?(A.on("response",function(t){A.pause(),e(null,+t.headers["content-length"])}),A.resume()):e("Unknown stream")};sA.prototype._multiPartHeader=function(A,e,t){if(typeof t.header=="string")return t.header;var r=this._getContentDisposition(e,t),i=this._getContentType(e,t),s="",n={"Content-Disposition":["form-data",'name="'+A+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof t.header=="object"&&Ux(n,t.header);var a;for(var o in n)n.hasOwnProperty(o)&&(a=n[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(s+=o+": "+a.join("; ")+sA.LINE_BREAK)));return"--"+this.getBoundary()+sA.LINE_BREAK+s+sA.LINE_BREAK};sA.prototype._getContentDisposition=function(A,e){var t,r;return typeof e.filepath=="string"?t=Fx.normalize(e.filepath).replace(/\\/g,"/"):e.filename||A.name||A.path?t=Fx.basename(e.filename||A.name||A.path):A.readable&&A.hasOwnProperty("httpVersion")&&(t=Fx.basename(A.client._httpMessage.path||"")),t&&(r='filename="'+t+'"'),r};sA.prototype._getContentType=function(A,e){var t=e.contentType;return!t&&A.name&&(t=Lx.lookup(A.name)),!t&&A.path&&(t=Lx.lookup(A.path)),!t&&A.readable&&A.hasOwnProperty("httpVersion")&&(t=A.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=Lx.lookup(e.filepath||e.filename)),!t&&typeof A=="object"&&(t=sA.DEFAULT_CONTENT_TYPE),t};sA.prototype._multiPartFooter=function(){return function(A){var e=sA.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),A(e)}.bind(this)};sA.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+sA.LINE_BREAK};sA.prototype.getHeaders=function(A){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in A)A.hasOwnProperty(e)&&(t[e.toLowerCase()]=A[e]);return t};sA.prototype.setBoundary=function(A){this._boundary=A};sA.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};sA.prototype.getBuffer=function(){for(var A=new Buffer.alloc(0),e=this.getBoundary(),t=0,r=this._streams.length;t<r;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?A=Buffer.concat([A,this._streams[t]]):A=Buffer.concat([A,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(A=Buffer.concat([A,Buffer.from(sA.LINE_BREAK)])));return Buffer.concat([A,Buffer.from(this._lastBoundary())])};sA.prototype._generateBoundary=function(){for(var A="--------------------------",e=0;e<24;e++)A+=Math.floor(Math.random()*10).toString(16);this._boundary=A};sA.prototype.getLengthSync=function(){var A=this._overheadLength+this._valueLength;return this._streams.length&&(A+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),A};sA.prototype.hasKnownLength=function(){var A=!0;return this._valuesToMeasure.length&&(A=!1),A};sA.prototype.getLength=function(A){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure
${WLe.sanitize(this)}`}};Ss.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";Ss.PARSE_ERROR="PARSE_ERROR";var Vn=J7e.createClientLogger("core-http");function uee(A,e){return A?e.httpsAgent:e.httpAgent}var Hy=class extends X7e.Transform{constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,t,r){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),r(void 0)}};function Uy(A){return A&&typeof A.pipe=="function"}function gee(A,e){return new Promise(t=>{A.once("close",()=>{e?.abort(),t()}),A.once("end",t),A.once("error",t)})}function zLe(A){let e=new tl;return A.forEach((t,r)=>{e.set(r,t)}),e}var Gy=class{constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={}}async sendRequest(e){var t;if(!e&&typeof e!="object")throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");let r=new My.AbortController,i;if(e.abortSignal){if(e.abortSignal.aborted)throw new My.AbortError("The operation was aborted.");i=c=>{c.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",i)}if(e.timeout&&setTimeout(()=>{r.abort()},e.timeout),e.formData){let c=e.formData,l=new $7e.default,d=(u,g)=>{typeof g=="function"&&(g=g()),g&&Object.prototype.hasOwnProperty.call(g,"value")&&Object.prototype.hasOwnProperty.call(g,"options")?l.append(u,g.value,g.options):l.append(u,g)};for(let u of Object.keys(c)){let g=c[u];if(Array.isArray(g))for(let h=0;h<g.length;h++)d(u,g[h]);else d(u,g)}e.body=l,e.formData=void 0;let p=e.headers.get("Content-Type");p&&p.indexOf("multipart/form-data")!==-1&&(typeof l.getBoundary=="function"?e.headers.set("Content-Type",`multipart/form-data; boundary=${l.getBoundary()}`):e.headers.remove("Content-Type"))}let s=e.body?typeof e.body=="function"?e.body():e.body:void 0;if(e.onUploadProgress&&e.body){let c=e.onUploadProgress,l=new Hy(c);Uy(s)?s.pipe(l):l.end(s),s=l}let n=await this.prepareRequest(e),a=Object.assign({body:s,headers:e.headers.rawHeaders(),method:e.method,signal:r.signal,redirect:"manual"},n),o;try{let c=await this.fetch(e.url,a),l=zLe(c.headers),d=((t=e.streamResponseStatusCodes)===null||t===void 0?void 0:t.has(c.status))||e.streamResponseBody;o={headers:l,request:e,status:c.status,readableStreamBody:d?c.body:void 0,bodyAsText:d?void 0:await c.text()};let p=e.onDownloadProgress;if(p){let u=c.body||void 0;if(Uy(u)){let g=new Hy(p);u.pipe(g),o.readableStreamBody=g}else{let g=parseInt(l.get("Content-Length"))||void 0;g&&p({loadedBytes:g})}}return await this.processRequest(o),o}catch(c){let l=c;throw l.code==="ENOTFOUND"?new Ss(l.message,Ss.REQUEST_SEND_ERROR,void 0,e):l.type==="aborted"?new My.AbortError("The operation was aborted."):l}finally{if(e.abortSignal&&i){let c=Promise.resolve();Uy(s)&&(c=gee(s));let l=Promise.resolve();Uy(o?.readableStreamBody)&&(l=gee(o.readableStreamBody,r)),Promise.all([c,l]).then(()=>{var d;(d=e.abortSignal)===null||d===void 0||d.removeEventListener("abort",i)}).catch(d=>{Vn.warning("Error when cleaning up abortListener on httpRequest",d)})}}}getOrCreateAgent(e){var t;let r=JS(e.url);if(e.proxySettings){let{host:i,port:s,username:n,password:a}=e.proxySettings,o=`${i}:${s}:${n}:${a}`,c=(t=this.proxyAgentMap.get(o))!==null&&t!==void 0?t:{},l=uee(r,c);if(l)return l;let d=GLe(e.url,e.proxySettings,e.headers);return l=d.agent,d.isHttps?c.httpsAgent=d.agent:c.httpAgent=d.agent,this.proxyAgentMap.set(o,c),l}else if(e.keepAlive){let i=uee(r,this.keepAliveAgents);if(i)return i;let s={keepAlive:e.keepAlive};return r?i=this.keepAliveAgents.httpsAgent=new oee.Agent(s):i=this.keepAliveAgents.httpAgent=new aee.Agent(s),i}else return r?oee.globalAgent:aee.globalAgent}async fetch(e,t){return eLe.default(e,t)}async prepareRequest(e){let t={};return t.agent=this.getOrCreateAgent(e),t.compress=e.decompressResponse,t}async processRequest(e){}};X.HttpPipelineLogLevel=void 0;(function(A){A[A.OFF=0]="OFF",A[A.ERROR=1]="ERROR",A[A.WARNING=2]="WARNING",A[A.INFO=3]="INFO"})(X.HttpPipelineLogLevel||(X.HttpPipelineLogLevel={}));function jLe(A){let{requestOptions:e,tracingOptions:t}=A,i=G7e.__rest(A,[
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},Oy=Object.assign({},Lee);Oy.explicitArray=!1;var vQ=Object.assign({},Lee);vQ.explicitArray=!1;vQ.renderOpts={pretty:!1};function VS(A,e={}){var t;return vQ.rootName=e.rootName,vQ.charkey=(t=e.xmlCharKey)!==null&&t!==void 0?t:Yo,new yee.Builder(vQ).buildObject(A)}function Uee(A,e={}){var t;Oy.explicitRoot=!!e.includeRoot,Oy.charkey=(t=e.xmlCharKey)!==null&&t!==void 0?t:Yo;let r=new yee.Parser(Oy);return new Promise((i,s)=>{A?r.parseString(A,(n,a)=>{n?s(n):i(a)}):s(new Error("Document is empty"))})}function E3(A,e){return{create:(t,r)=>new WS(t,r,A,e)}}var Mee=["application/json","text/json"],Tee=["application/xml","application/atom+xml"],XLe={expectedContentTypes:{json:Mee,xml:Tee}},WS=class extends sr{constructor(e,t,r,i={}){var s;super(e,t),this.jsonContentTypes=r&&r.json||Mee,this.xmlContentTypes=r&&r.xml||Tee,this.xmlCharKey=(s=i.xmlCharKey)!==null&&s!==void 0?s:Yo}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(t=>Oee(this.jsonContentTypes,this.xmlContentTypes,t,{xmlCharKey:this.xmlCharKey}))}};function ZLe(A){let e,t=A.request,r=t.operationSpec;if(r){let i=t.operationResponseGetter;i?e=i(r,A):e=r.responses[A.status]}return e}function KLe(A){let e=A.request.shouldDeserialize,t;return e===void 0?t=!0:typeof e=="boolean"?t=e:t=e(A),t}function Oee(A,e,t,r={}){var i,s,n;let a={rootName:(i=r.rootName)!==null&&i!==void 0?i:"",includeRoot:(s=r.includeRoot)!==null&&s!==void 0?s:!1,xmlCharKey:(n=r.xmlCharKey)!==null&&n!==void 0?n:Yo};return AUe(A,e,t,a).then(o=>{if(!KLe(o))return o;let c=o.request.operationSpec;if(!c||!c.responses)return o;let l=ZLe(o),{error:d,shouldReturnResponse:p}=eUe(o,c,l);if(d)throw d;if(p)return o;if(l){if(l.bodyMapper){let u=o.parsedBody;c.isXML&&l.bodyMapper.type.name===Yd.Sequence&&(u=typeof u=="object"?u[l.bodyMapper.xmlElementName]:[]);try{o.parsedBody=c.serializer.deserialize(l.bodyMapper,u,"operationRes.parsedBody",r)}catch(g){throw new Ss(`Error ${g} occurred in deserializing the responseBody - ${o.bodyAsText}`,void 0,o.status,o.request,o)}}else c.httpMethod==="HEAD"&&(o.parsedBody=t.status>=200&&t.status<300);l.headersMapper&&(o.parsedHeaders=c.serializer.deserialize(l.headersMapper,o.headers.toJson(),"operationRes.parsedHeaders",r))}return o})}function $Le(A){let e=Object.keys(A.responses);return e.length===0||e.length===1&&e[0]==="default"}function eUe(A,e,t){var r;let i=200<=A.status&&A.status<300;if($Le(e)?i:!!t)if(t){if(!t.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let n=t??e.responses.default,o=((r=A.request.streamResponseStatusCodes)===null||r===void 0?void 0:r.has(A.status))||A.request.streamResponseBody?`Unexpected status code: ${A.status}`:A.bodyAsText,c=new Ss(o,void 0,A.status,A.request,A);if(!n)throw c;let l=n.bodyMapper,d=n.headersMapper;try{if(A.parsedBody){let p=A.parsedBody,u;if(l){let h=p;e.isXML&&l.type.name===Yd.Sequence&&(h=typeof p=="object"?p[l.xmlElementName]:[]),u=e.serializer.deserialize(l,h,"error.response.parsedBody")}let g=p.error||u||p;c.code=g.code,g.message&&(c.message=g.message),l&&(c.response.parsedBody=u)}A.headers&&d&&(c.response.parsedHeaders=e.serializer.deserialize(d,A.headers.toJson(),"operationRes.parsedHeaders"))}catch(p){c.message=`Error "${p.message}" occurred in deserializing the responseBody - "${A.bodyAsText}" for the default response.`}return{error:c,shouldReturnResponse:!1}}function AUe(A,e,t,r){var i;let s=a=>{let o=`Error "${a}" occurred while parsing the response body - ${t.bodyAsText}.`,c=a.code||Ss.PARSE_ERROR,l=new Ss(o,c,t.status,t.request,t);return Promise.reject(l)};if(!(((i=t.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(t.status))||t.request.streamResponseBody)&&t.bodyAsText){let a=t.bodyAsText,o=t.headers.get("Content-Type")||"",c=o?o.split(";").map(l=>l.toLowerCase()):[];if(c.length===0||c.some(l=>A.indexOf(l)!==-1))return new Promise(l=>{t.parsedBody=JSON.parse(a),l(t)}).catch(s);if(c.some(l=>e.indexOf(l)!==-1))return Uee(a,r).then(l=>(t.parsedBody=l,t)).catch(s)}return Promise.resolve(t
`).join(""))}return this._nextPolicy.sendRequest(e)}},Wee=[],zee=!1,hUe=new Map;function EUe(){if(!process)return;let A=Ty(Cn.HTTPS_PROXY),e=Ty(Cn.ALL_PROXY),t=Ty(Cn.HTTP_PROXY);return A||e||t}function CUe(A,e,t){if(e.length===0)return!1;let r=Oa.parse(A).getHost();if(t?.has(r))return t.get(r);let i=!1;for(let s of e)s[0]==="."?(r.endsWith(s)||r.length===s.length-1&&r===s.slice(1))&&(i=!0):r===s&&(i=!0);return t?.set(r,i),i}function QUe(){let A=Ty(Cn.NO_PROXY);return zee=!0,A?A.split(",").map(e=>e.trim()).filter(e=>e.length):[]}function jee(A){if(!A&&(A=EUe(),!A))return;let{username:e,password:t,urlWithoutAuth:r}=mUe(A),i=Oa.parse(r);return{host:(i.getScheme()?i.getScheme()+"://":"")+i.getHost(),port:Number.parseInt(i.getPort()||"80"),username:e,password:t}}function b3(A,e){return A||(A=jee()),zee||Wee.push(...QUe()),{create:(t,r)=>new r3(t,r,A,e?.customNoProxyList)}}function mUe(A){let e=A.indexOf("@");if(e===-1)return{urlWithoutAuth:A};let t=A.indexOf("://"),r=t!==-1?t+3:0,i=A.substring(r,e),s=i.indexOf(":"),n=s!==-1,a=n?i.substring(0,s):i,o=n?i.substring(s+1):void 0,c=A.substring(0,r)+A.substring(e+1);return{username:a,password:o,urlWithoutAuth:c}}var r3=class extends sr{constructor(e,t,r,i){super(e,t),this.proxySettings=r,this.customNoProxyList=i}sendRequest(e){var t;return!e.proxySettings&&!CUe(e.url,(t=this.customNoProxyList)!==null&&t!==void 0?t:Wee,this.customNoProxyList?void 0:hUe)&&(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}};function BUe(A=30){return{create:(e,t)=>new i3(e,t,A)}}var i3=class extends sr{constructor(e,t,r=30){super(e,t),this._retryTimeout=r}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(t=>IUe(this,e,t))}};function IUe(A,e,t){if(t.status===409){let r=fUe(t.bodyAsText);if(r){let i=yUe(e.url);return wUe(A,i,r,e).catch(()=>!1).then(s=>s?(e.headers.set("x-ms-client-request-id",Wy()),A._nextPolicy.sendRequest(e.clone())):t)}}return Promise.resolve(t)}function Xee(A,e=!1){let t=A.clone();return e&&(t.url=A.url),t.headers.set("x-ms-client-request-id",Wy()),t.headers.set("Content-Type","application/json; charset=utf-8"),t}function fUe(A){let e,t;if(A){try{t=JSON.parse(A)}catch{}if(t&&t.error&&t.error.message&&t.error.code&&t.error.code==="MissingSubscriptionRegistration"){let r=t.error.message.match(/.*'(.*)'/i);r&&(e=r.pop())}}return e}function yUe(A){let e,t=A.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(t&&t[0])e=t[0];else throw new Error(`Unable to extract subscriptionId from the given url - ${A}.`);return e}async function wUe(A,e,t,r){let i=`${e}providers/${t}/register?api-version=2016-02-01`,s=`${e}providers/${t}?api-version=2016-02-01`,n=Xee(r);if(n.method="POST",n.url=i,(await A._nextPolicy.sendRequest(n)).status!==200)throw new Error(`Autoregistration of ${t} failed. Please try registering manually.`);return Zee(A,s,r)}async function Zee(A,e,t){let r=Xee(t);r.url=e,r.method="GET";let i=await A._nextPolicy.sendRequest(r),s=i.parsedBody;return i.parsedBody&&s.registrationState&&s.registrationState==="Registered"?!0:(await Ta.delay(A._retryTimeout*1e3),Zee(A,e,t))}function Kee(A){return{create:(e,t)=>new s3(e,t,A)}}var s3=class extends sr{constructor(e,t,r){super(e,t),this.authenticationProvider=r}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(t=>this._nextPolicy.sendRequest(t))}};function N3(A,e,t,r){return{create:(i,s)=>new n3(i,s,A,e,t,r)}}var n3=class extends sr{constructor(e,t,r,i,s,n){super(e,t),this.retryCount=Od(r)?r:Q3,this.retryInterval=Od(i)?i:m3,this.minRetryInterval=Od(s)?s:rUe,this.maxRetryInterval=Od(n)?n:B3}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(t=>$ee(this,e,t.response,t))}};async function $ee(A,e,t,r,i){i=Gee(A,i,r);function s(n,a){return!!(a&&a.code&&(a.code==="ETIMEDOUT"||a.code==="ESOCKETTIMEDOUT"||a.code==="ECONNREFUSED"||a.code==="ECONNRESET"||a.code==="ENOENT"))}if(Hee(A.retryCount,s,i,t,r))try{return await Ta.delay(i.retryInterval),A._nextPolicy.sendRequest(e.clone())}catch(n){return $ee(A,e,t,n,i)}else return r?Promise.reject(i.erro
2024-07-29 19:19:44 +00:00
Polling from: ${t.config.operationLocation}
2024-07-29 18:31:34 +00:00
Operation status: ${l}
2024-07-29 20:07:21 +00:00
Polling status: ${lAe.terminalStates.includes(l)?"Stopped":"Running"}`),l==="succeeded"){let d=n(c,t);if(d!==void 0)return{response:await e(d).catch(cAe({state:t,stateProxy:r,isOperationError:a})),status:l}}return{response:c,status:l}}async function _Ue(A){let{poll:e,state:t,stateProxy:r,options:i,getOperationStatus:s,getResourceLocation:n,getOperationLocation:a,isOperationError:o,withOperationLocation:c,getPollingInterval:l,processResult:d,getError:p,updateState:u,setDelay:g,isDone:h,setErrorAsResult:Q}=A,{operationLocation:B}=t.config;if(B!==void 0){let{response:w,status:I}=await GUe({poll:e,getOperationStatus:s,state:t,stateProxy:r,operationLocation:B,getResourceLocation:n,isOperationError:o,options:i});if(dAe({status:I,response:w,state:t,stateProxy:r,isDone:h,processResult:d,getError:p,setErrorAsResult:Q}),!lAe.terminalStates.includes(I)){let C=l?.(w);C&&g(C);let m=a?.(w,t);if(m!==void 0){let b=B!==m;t.config.operationLocation=m,c?.(m,b)}else c?.(B,!1)}u?.(t,w)}}sl.pollOperation=_Ue});var k3=E(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.pollHttpOperation=Rt.isOperationError=Rt.getResourceLocation=Rt.getOperationStatus=Rt.getOperationLocation=Rt.initHttpOperation=Rt.getStatusFromInitialResponse=Rt.getErrorFromResponse=Rt.parseRetryAfter=Rt.inferLroMode=void 0;var pAe=t2(),x3=e2();function uAe(A){let{azureAsyncOperation:e,operationLocation:t}=A;return t??e}function gAe(A){return A.headers.location}function hAe(A){return A.headers["operation-location"]}function EAe(A){return A.headers["azure-asyncoperation"]}function JUe(A){let{location:e,requestMethod:t,requestPath:r,resourceLocationConfig:i}=A;switch(t){case"PUT":return r;case"DELETE":return;case"PATCH":return s()??r;default:return s()}function s(){switch(i){case"azure-async-operation":return;case"original-uri":return r;case"location":default:return e}}}function CAe(A){let{rawResponse:e,requestMethod:t,requestPath:r,resourceLocationConfig:i}=A,s=hAe(e),n=EAe(e),a=uAe({operationLocation:s,azureAsyncOperation:n}),o=gAe(e),c=t?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:JUe({requestMethod:c,location:o,requestPath:r,resourceLocationConfig:i})}:o!==void 0?{mode:"ResourceLocation",operationLocation:o}:c==="PUT"&&r?{mode:"Body",operationLocation:r}:void 0}Rt.inferLroMode=CAe;function QAe(A){let{status:e,statusCode:t}=A;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return S3(t);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return x3.logger.verbose(`LRO: unrecognized operation status: ${e}`),e}}function VUe(A){let{status:e}=A.body??{};return QAe({status:e,statusCode:A.statusCode})}function WUe(A){let{properties:e,provisioningState:t}=A.body??{},r=e?.provisioningState??t;return QAe({status:r,statusCode:A.statusCode})}function S3(A){return A===202?"running":A<300?"succeeded":"failed"}function mAe({rawResponse:A}){let e=A.headers["retry-after"];if(e!==void 0){let t=parseInt(e);return isNaN(t)?zUe(new Date(e)):t*1e3}}Rt.parseRetryAfter=mAe;function BAe(A){let e=yAe(A,"error");if(!e){x3.logger.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){x3.logger.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}Rt.getErrorFromResponse=BAe;function zUe(A){let e=Math.floor(new Date().getTime()),t=A.getTime();if(e<t)return t-e}function IAe(A){let{response:e,state:t,operationLocation:r}=A;function i(){switch(t.config.metadata?.mode){case void 0:return S3(e.rawResponse.statusCode);case"Body":return v3(e,t)
`,Fse="HTTP/1.1",kYe="AES256",FYe="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",LYe=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"],UYe=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],MYe="BlobUsesCustomerSpecifiedEncryption",TYe="BlobDoesNotUseCustomerSpecifiedEncryption",OYe=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function YYe(A){let e=O.URLBuilder.parse(A),t=e.getPath();return t=t||"/",t=PYe(t),e.setPath(t),e.toString()}function qYe(A){let e="";if(A.search("DevelopmentStorageProxyUri=")!==-1){let t=A.split(";");for(let r of t)r.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=r.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}function Hd(A,e){let t=A.split(";");for(let r of t)if(r.trim().startsWith(e))return r.trim().match(e+"=(.*)")[1];return""}function nh(A){let e="";A.startsWith("UseDevelopmentStorage=true")&&(e=qYe(A),A=FYe);let t=Hd(A,"BlobEndpoint");if(t=t.endsWith("/")?t.slice(0,-1):t,A.search("DefaultEndpointsProtocol=")!==-1&&A.search("AccountKey=")!==-1){let r="",i="",s=Buffer.from("accountKey","base64"),n="";if(i=Hd(A,"AccountName"),s=Buffer.from(Hd(A,"AccountKey"),"base64"),!t){r=Hd(A,"DefaultEndpointsProtocol");let a=r.toLowerCase();if(a!=="https"&&a!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(n=Hd(A,"EndpointSuffix"),!n)throw new Error("Invalid EndpointSuffix in the provided Connection String");t=`${r}://${i}.blob.${n}`}if(i){if(s.length===0)throw new Error("Invalid AccountKey in the provided Connection St
2024-07-29 18:31:34 +00:00
`)+`
2024-07-29 19:19:44 +00:00
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),r=this.factory.computeHMACSHA256(t);return e.headers.set(VA.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${r}`),e}getHeaderValueToSign(e,t){let r=e.headers.get(t);return!r||t===VA.CONTENT_LENGTH&&r==="0"?"":r}getCanonicalizedHeadersString(e){let t=e.headers.headersArray().filter(i=>i.name.toLowerCase().startsWith(VA.PREFIX_FOR_STORAGE));t.sort((i,s)=>i.name.toLowerCase().localeCompare(s.name.toLowerCase())),t=t.filter((i,s,n)=>!(s>0&&i.name.toLowerCase()===n[s-1].name.toLowerCase()));let r="";return t.forEach(i=>{r+=`${i.name.toLowerCase().trimRight()}:${i.value.trimLeft()}
2024-07-29 20:07:21 +00:00
`}),r}getCanonicalizedResourceString(e){let t=W5(e.url)||"/",r="";r+=`/${this.factory.accountName}${t}`;let i=JYe(e.url),s={};if(i){let n=[];for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){let o=a.toLowerCase();s[o]=i[a],n.push(o)}n.sort();for(let a of n)r+=`
${a}:${decodeURIComponent(s[a])}`}return r}},St=class extends PQ{constructor(e,t){super(),this.accountName=e,this.accountKey=Buffer.from(t,"base64")}create(e,t){return new x2(e,t,this)}computeHMACSHA256(e){return pte.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},nqe="azure-storage-blob",aqe="12.17.0",GQ=class extends V.ServiceClient{constructor(e,t){if(e===void 0)throw new Error("'url' cannot be null");if(t||(t={}),!t.userAgent){let r=V.getDefaultUserAgentValue();t.userAgent=`${nqe}/${aqe} ${r}`}super(void 0,t),this.requestContentType="application/json; charset=utf-8",this.baseUri=t.endpoint||"{url}",this.url=e,this.version=t.version||"2023-11-03"}},_Q=class{constructor(e,t){this.url=YYe(e),this.accountName=Use(e),this.pipeline=t,this.storageClientContext=new GQ(this.url,t.toServiceClientOptions()),this.isHttps=Lse(GYe(this.url)||"","https"),this.credential=new kA;for(let i of this.pipeline.factories)O.isNode&&i instanceof St||i instanceof kA?this.credential=i:O.isTokenCredential(i.credential)&&(this.credential=i.credential);let r=this.storageClientContext;r.requestContentType=void 0}},_=Y.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function re(A){var e,t;return{spanOptions:(e=A?.tracingOptions)===null||e===void 0?void 0:e.spanOptions,tracingContext:(t=A?.tracingOptions)===null||t===void 0?void 0:t.tracingContext}}var Ho=class A{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let t=new A;for(let r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"x":t.deleteVersion=!0;break;case"t":t.tag=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;default:throw new RangeError(`Invalid permission: ${r}`)}return t}static from(e){let t=new A;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),t}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}},Go=class A{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let t=new A;for(let r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"l":t.list=!0;break;case"t":t.tag=!0;break;case"x":t.deleteVersion=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;case"f":t.filterByTags=!0;break;default:throw new RangeError(`Invalid permission ${r}`)}return t}static from(e){let t=new A;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.list&&(t.list=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),e.filterByTags&&(t.filterByTags=!0),t}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),
`),s=e.computeHMACSHA256(i);return new qa(A.version,s,r,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType)}function cqe(A,e){if(A=oh(A),!A.identifier&&!(A.permissions&&A.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),A.identifier,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.cacheControl?A.cacheControl:"",A.contentDisposition?A.contentDisposition:"",A.contentEncoding?A.contentEncoding:"",A.contentLanguage?A.contentLanguage:"",A.contentType?A.contentType:""].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType)}function lqe(A,e){if(A=oh(A),!A.identifier&&!(A.permissions&&A.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),A.identifier,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.encryptionScope,A.cacheControl?A.cacheControl:"",A.contentDisposition?A.contentDisposition:"",A.contentEncoding?A.contentEncoding:"",A.contentLanguage?A.contentLanguage:"",A.contentType?A.contentType:""].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType,void 0,void 0,void 0,A.encryptionScope)}function dqe(A,e){if(A=oh(A),!A.permissions||!A.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?IA(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?IA(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType,e.userDelegationKey)}function pqe(A,e){if(A=oh(A),!A.permissions||!A.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?IA(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?IA(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,A.preauthorizedAgentObjectId,void 0,A.correlationId,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType,e.userDelegationKey,A.preauthorizedAgentObjectId,A.correlationId)}function uqe(A,e){if(A=oh(A),!A.permissions||!A.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?IA(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?IA(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,A.preauthorizedAgentObjectId,void 0,A.correlationId,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.encryptionScope,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType,e.userDelegationKey,A.preauthorizedAgentObjectId,A.correlationId,A.encryptionScope)}function ah(A,e,t){let r=[`/blob/${A}/${e}`];return t&&r.push(`/${t}`),r.join("")}function oh(A){let e=A.version?A.version:J5;if(A.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(A.blobName===void 0&&A.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(A.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(A.blobName===void 0&&A.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(A.permissions&&A.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(A.permissions&&A.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(A.permissions&&A.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(A.permissions&&A.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&A.permissions&&(A.permissions.move||A.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&A.permissions&&A.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(A.preauthorizedAgentObjectId||A.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(A.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return A.version=e,A}var JQ=class{constructor(e,t){let r=new GQ(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new Vd(r)):(this._isContainer=!1,this._containerOrBlobOperation=new OQ(r)),t||(t=O.generateUuid()),this._leaseId=t}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,t={}){var r,i,s,n,a,o;let{span:c,updatedOptions:l}=_("BlobLeaseClient-acquireLease",t);if(this._isContainer&&(!((r=t.conditions)===null||r===void 0)&&r.ifMatch&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==Ya||!((s=t.conditions)===null||s===void 0)&&s.ifNoneMatch&&((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==Ya||!((a=t.conditions)===null||a===void 0)&&a.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(o=t.conditions)===null||o===void 0?void 0:o.tagConditions}),proposedLeaseId:this._leaseId},re(l)))}catch(d){throw c.setStatus({code:Y.SpanStatusCode.ERROR,message:d.message}),d}finally{c.end()}}async changeLease(e,t={}){var r,i,s,n,a,o;let{span:c,updatedOptions:l}=_("BlobLeaseClient-changeLease",t);if(this._isContainer&&(!((r=t.conditions)===null||r===void 0)&&r.ifMatch&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==Ya||!((s=t.conditions)===null||s===void 0)&&s.ifNoneMatch&&((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==Ya||!((a=t.conditions)===null||a===void 0)&&a.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{let d=await this._containerOrBlobOperati
2024-07-29 19:19:44 +00:00
`):n=[e.accountName,r,i,s,A.startsOn?IA(A.startsOn,!1):"",IA(A.expiresOn,!1),A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",t,""].join(`
2024-07-29 20:07:21 +00:00
`);let a=e.computeHMACSHA256(n);return new qa(t,a,r.toString(),i,s,A.protocol,A.startsOn,A.expiresOn,A.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,A.encryptionScope)}var D5=class A extends _Q{constructor(e,t,r){let i;Cl(t)?i=t:O.isNode&&t instanceof St||t instanceof kA||O.isTokenCredential(t)?i=OA(t,r):i=OA(new kA,r),super(e,i),this.serviceContext=new f2(this.storageClientContext)}static fromConnectionString(e,t){t=t||{};let r=nh(e);if(r.kind==="AccountConnString")if(O.isNode){let i=new St(r.accountName,r.accountKey);t.proxyOptions||(t.proxyOptions=O.getDefaultProxySettings(r.proxyUri));let s=OA(i,t);return new A(r.url,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(r.kind==="SASConnString"){let i=OA(new kA,t);return new A(r.url+"?"+r.accountSas,i)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}getContainerClient(e){return new v2(ht(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,t={}){let{span:r,updatedOptions:i}=_("BlobServiceClient-createContainer",t);try{let s=this.getContainerClient(e),n=await s.create(i);return{containerClient:s,containerCreateResponse:n}}catch(s){throw r.setStatus({code:Y.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}async deleteContainer(e,t={}){let{span:r,updatedOptions:i}=_("BlobServiceClient-deleteContainer",t);try{return await this.getContainerClient(e).delete(i)}catch(s){throw r.setStatus({code:Y.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}async undeleteContainer(e,t,r={}){let{span:i,updatedOptions:s}=_("BlobServiceClient-undeleteContainer",r);try{let n=this.getContainerClient(r.destinationContainerName||e),o=await new Vd(n.storageClientContext).restore(Object.assign({deletedContainerName:e,deletedContainerVersion:t},s));return{containerClient:n,containerUndeleteResponse:o}}catch(n){throw i.setStatus({code:Y.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async renameContainer(e,t,r={}){var i;let{span:s,updatedOptions:n}=_("BlobServiceClient-renameContainer",r);try{let a=this.getContainerClient(t),c=await new Vd(a.storageClientContext).rename(e,Object.assign(Object.assign({},n),{sourceLeaseId:(i=r.sourceCondition)===null||i===void 0?void 0:i.leaseId}));return{containerClient:a,containerRenameResponse:c}}catch(a){throw s.setStatus({code:Y.SpanStatusCode.ERROR,message:a.message}),a}finally{s.end()}}async getProperties(e={}){let{span:t,updatedOptions:r}=_("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},re(r)))}catch(i){throw t.setStatus({code:Y.SpanStatusCode.ERROR,message:i.message}),i}finally{t.end()}}async setProperties(e,t={}){let{span:r,updatedOptions:i}=_("BlobServiceClient-setProperties",t);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:t.abortSignal},re(i)))}catch(s){throw r.setStatus({code:Y.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}async getStatistics(e={}){let{span:t,updatedOptions:r}=_("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},re(r)))}catch(i){throw t.setStatus({code:Y.SpanStatusCode.ERROR,message:i.message}),i}finally{t.end()}}async getAccountInfo(e={}){let{span:t,updatedOptions:r}=_("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},re(r)))}catch(i){throw t.setStatus({code:Y.SpanStatusCode.ERROR,message:i.message}),i}finally{t.end()}}async listContainersSegment(e,t={}){let{span:r,updatedOptions:i}=_("BlobServiceClient-listContainersSegment",t);try{return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({abortSignal:t.abortSignal,marker:e},t),{include:typeof t.include=="string"?[t.include]:t.include}),re(i)))}catch(s){throw r.setStatus({code:Y.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}async findBlobsByTagsSegmen
Other caches with similar key:`);for(let a of s?.artifactCaches||[])Fs.debug(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function cPe(A,e,t){return Ki(this,void 0,void 0,function*(){let r=new rPe.URL(A),i=(0,jse.getDownloadOptions)(t);r.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield(0,H2.downloadCacheStorageSDK)(A,e,i):i.concurrentBlobDownloads?yield(0,H2.downloadCacheHttpClientConcurrent)(A,e,i):yield(0,H2.downloadCacheHttpClient)(A,e):yield(0,H2.downloadCacheHttpClient)(A,e)})}zt.downloadCache=cPe;function lPe(A,e,t){return Ki(this,void 0,void 0,function*(){let r=Av(),i=tv(e,t?.compressionMethod,t?.enableCrossOsArchive),s={key:A,version:i,cacheSize:t?.cacheSize};return yield(0,ml.retryTypedResponse)("reserveCache",()=>Ki(this,void 0,void 0,function*(){return r.postJson(im("caches"),s)}))})}zt.reserveCache=lPe;function zse(A,e){return`bytes ${A}-${e}/*`}function dPe(A,e,t,r,i){return Ki(this,void 0,void 0,function*(){Fs.debug(`Uploading chunk of size ${i-r+1} bytes at offset ${r} with content range: ${zse(r,i)}`);let s={"Content-Type":"application/octet-stream","Content-Range":zse(r,i)},n=yield(0,ml.retryHttpClientResponse)(`uploadChunk (start: ${r}, end: ${i})`,()=>Ki(this,void 0,void 0,function*(){return A.sendStream("PATCH",e,t(),s)}));if(!(0,ml.isSuccessStatusCode)(n.message.statusCode))throw new Error(`Cache service responded with ${n.message.statusCode} during upload chunk.`)})}function pPe(A,e,t,r){return Ki(this,void 0,void 0,function*(){let i=G2.getArchiveFileSizeInBytes(t),s=im(`caches/${e.toString()}`),n=ev.openSync(t,"r"),a=(0,jse.getUploadOptions)(r),o=G2.assertDefined("uploadConcurrency",a.uploadConcurrency),c=G2.assertDefined("uploadChunkSize",a.uploadChunkSize),l=[...new Array(o).keys()];Fs.debug("Awaiting all uploads");let d=0;try{yield Promise.all(l.map(()=>Ki(this,void 0,void 0,function*(){for(;d<i;){let p=Math.min(i-d,c),u=d,g=d+p-1;d+=c,yield dPe(A,s,()=>ev.createReadStream(t,{fd:n,start:u,end:g,autoClose:!1}).on("error",h=>{throw new Error(`Cache upload failed because file read failed with ${h.message}`)}),u,g)}})))}finally{ev.closeSync(n)}})}function uPe(A,e,t){return Ki(this,void 0,void 0,function*(){let r={size:t};return yield(0,ml.retryTypedResponse)("commitCache",()=>Ki(this,void 0,void 0,function*(){return A.postJson(im(`caches/${e.toString()}`),r)}))})}function gPe(A,e,t){return Ki(this,void 0,void 0,function*(){let r=Av();Fs.debug("Upload cache"),yield pPe(r,A,e,t),Fs.debug("Commiting cache");let i=G2.getArchiveFileSizeInBytes(e);Fs.info(`Cache Size: ~${Math.round(i/(1024*1024))} MB (${i} B)`);let s=yield uPe(r,A,i);if(!(0,ml.isSuccessStatusCode)(s.statusCode))throw new Error(`Cache service responded with ${s.statusCode} during commit cache.`);Fs.info("Cache saved successfully")})}zt.saveCache=gPe});var $se=E(ri=>{"use strict";var hPe=ri&&ri.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(A,r,i)}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),EPe=ri&&ri.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),rv=ri&&ri.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.prototype.hasOwnProperty.call(A,t)&&hPe(e,A,t);return EPe(e,A),e},Wo=ri&&ri.__awaiter||function(A,e,t,r){function i(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function a(l){try{c(r.next(l))}catch(d){n(d)}}function o(l){try{c(r.throw(l))}catch(d){n(d)}}function c(l){l.done?s(l.value):i(l.value).then(a,o)}c((r=r.apply(A,e||[])).next())})};Object.defineProperty(ri,"__esModule",{value:!0});ri.createTar=ri.extractTar=ri.listTar=void 0;var CPe=KE(),J2=rv(ZE()),Zse=require("fs"),Xn=rv(require("path")),iv=rv(uC()),tt=dC(),Bl=process.platform==="win32";func
`));let r=yield sv(t,"create");yield nv(r,A)})}ri.createTar=wPe});var ine=E(jt=>{"use strict";var bPe=jt&&jt.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(A,r,i)}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),NPe=jt&&jt.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),z2=jt&&jt.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.prototype.hasOwnProperty.call(A,t)&&bPe(e,A,t);return NPe(e,A),e},ene=jt&&jt.__awaiter||function(A,e,t,r){function i(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function a(l){try{c(r.next(l))}catch(d){n(d)}}function o(l){try{c(r.throw(l))}catch(d){n(d)}}function c(l){l.done?s(l.value):i(l.value).then(a,o)}c((r=r.apply(A,e||[])).next())})};Object.defineProperty(jt,"__esModule",{value:!0});jt.saveCache=jt.restoreCache=jt.isFeatureAvailable=jt.ReserveCacheError=jt.ValidationError=void 0;var ar=z2(ur()),Ane=z2(require("path")),Bn=z2(uC()),V2=z2(Xse()),W2=$se(),zo=class A extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,A.prototype)}};jt.ValidationError=zo;var sm=class A extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,A.prototype)}};jt.ReserveCacheError=sm;function tne(A){if(!A||A.length===0)throw new zo("Path Validation Error: At least one directory or file path is required")}function rne(A){if(A.length>512)throw new zo(`Key Validation Error: ${A} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(A))throw new zo(`Key Validation Error: ${A} cannot contain commas.`)}function DPe(){return!!process.env.ACTIONS_CACHE_URL}jt.isFeatureAvailable=DPe;function RPe(A,e,t,r,i=!1){return ene(this,void 0,void 0,function*(){tne(A),t=t||[];let s=[e,...t];if(ar.debug("Resolved Keys:"),ar.debug(JSON.stringify(s)),s.length>10)throw new zo("Key Validation Error: Keys are limited to a maximum of 10.");for(let o of s)rne(o);let n=yield Bn.getCompressionMethod(),a="";try{let o=yield V2.getCacheEntry(s,A,{compressionMethod:n,enableCrossOsArchive:i});if(!o?.archiveLocation)return;if(r?.lookupOnly)return ar.info("Lookup only - skipping download"),o.cacheKey;a=Ane.join(yield Bn.createTempDirectory(),Bn.getCacheFileName(n)),ar.debug(`Archive Path: ${a}`),yield V2.downloadCache(o.archiveLocation,a,r),ar.isDebug()&&(yield(0,W2.listTar)(a,n));let c=Bn.getArchiveFileSizeInBytes(a);return ar.info(`Cache Size: ~${Math.round(c/(1024*1024))} MB (${c} B)`),yield(0,W2.extractTar)(a,n),ar.info("Cache restored successfully"),o.cacheKey}catch(o){if(o.name===zo.name)throw o;ar.warning(`Failed to restore: ${o.message}`)}finally{try{yield Bn.unlinkFile(a)}catch(o){ar.debug(`Failed to delete archive: ${o}`)}}})}jt.restoreCache=RPe;function xPe(A,e,t,r=!1){var i,s,n,a,o;return ene(this,void 0,void 0,function*(){tne(A),rne(e);let c=yield Bn.getCompressionMethod(),l=-1,d=yield Bn.resolvePaths(A);if(ar.debug("Cache Paths:"),ar.debug(`${JSON.stringify(d)}`),d.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let p=yield Bn.createTempDirectory(),u=Ane.join(p,Bn.getCacheFileName(c));ar.debug(`Archive Path: ${u}`);try{yield(0,W2.createTar)(p,d,c),ar.isDebug()&&(yield(0,W2.listTar)(u,c));let g=10*1024*1024*1024,h=Bn.getArchiveFileSizeInBytes(u);if(ar.debug(`File Size: ${h}`),h>g&&!Bn.isGhes())throw new Error(`Cache size of ~${Math.round(h/(1024*1024))} MB (${h} B) is over the 10GB limit, not saving cache.`);ar.debug("Reserving Cache");let Q=yield V2.reserveCache(e,A,{compressionMethod:c,enableCrossOsArchive:r,cacheSize:h});if(!((i=Q?.result)===null||i===void 0)&&i.cacheId)l=(s=Q?.result)===null||s===void 0?void 0:s.cacheId;else throw Q?.statusCode===400?new Error((a=(n=Q?.er
`);for(let i of r){let s=i.split("=");if(s.length===2&&(s[0].trim()==="VERSION_ID"||s[0].trim()==="DISTRIB_RELEASE")){e=s[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return e}ii._getOsVersion=MPe;function TPe(){let A="/etc/lsb-release",e="/etc/os-release",t="";return j2.existsSync(A)?t=j2.readFileSync(A).toString():j2.existsSync(e)&&(t=j2.readFileSync(e).toString()),t}ii._readLinuxVersionFile=TPe});var cne=E(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.checkBypass=dh.getProxyUrl=void 0;function OPe(A){let e=A.protocol==="https:";if(one(A))return;let t=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(t)try{return new URL(t)}catch{if(!t.startsWith("http://")&&!t.startsWith("https://"))return new URL(`http://${t}`)}else return}dh.getProxyUrl=OPe;function one(A){if(!A.hostname)return!1;let e=A.hostname;if(YPe(e))return!0;let t=process.env.no_proxy||process.env.NO_PROXY||"";if(!t)return!1;let r;A.port?r=Number(A.port):A.protocol==="http:"?r=80:A.protocol==="https:"&&(r=443);let i=[A.hostname.toUpperCase()];typeof r=="number"&&i.push(`${i[0]}:${r}`);for(let s of t.split(",").map(n=>n.trim().toUpperCase()).filter(n=>n))if(s==="*"||i.some(n=>n===s||n.endsWith(`.${s}`)||s.startsWith(".")&&n.endsWith(`${s}`)))return!0;return!1}dh.checkBypass=one;function YPe(A){let e=A.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}});var lt=E((FaA,lne)=>{lne.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version")}});var WA=E((LaA,dne)=>{"use strict";var Xt=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}},cv=class A extends Xt{constructor(e){super(e),Error.captureStackTrace(this,A),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},lv=class A extends Xt{constructor(e){super(e),Error.captureStackTrace(this,A),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},dv=c
\r
`),fHe=/\r\n/g,yHe=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function uh(A){kne.call(this),A=A||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=vne(A,"maxHeaderPairs",2e3),this.maxHeaderSize=vne(A,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new BHe(IHe),this.ss.on("info",function(t,r,i,s){r&&!e.maxed&&(e.nread+s-i>=e.maxHeaderSize?(s=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=s-i,e.buffer+=r.toString("binary",i,s)),t&&e._finish()})}mHe(uh,kne);uh.prototype.push=function(A){let e=this.ss.push(A);if(this.finished)return e};uh.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};uh.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let A=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",A)};uh.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let A=this.buffer.split(fHe),e=A.length,t,r;for(var i=0;i<e;++i){if(A[i].length===0)continue;if((A[i][0]===" "||A[i][0]===" ")&&r){this.header[r][this.header[r].length-1]+=A[i];continue}let s=A[i].indexOf(":");if(s===-1||s===0)return;if(t=yHe.exec(A[i]),r=t[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(t[2]||""),++this.npairs===this.maxHeaderPairs)break}};Fne.exports=uh});var Fv=E((PaA,Mne)=>{"use strict";var kv=require("node:stream").Writable,wHe=require("node:util").inherits,bHe=Sv(),Une=xne(),NHe=Lne(),DHe=45,RHe=Buffer.from("-"),xHe=Buffer.from(`\r
`),SHe=function(){};function Zn(A){if(!(this instanceof Zn))return new Zn(A);if(kv.call(this,A),!A||!A.headerFirst&&typeof A.boundary!="string")throw new TypeError("Boundary required");typeof A.boundary=="string"?this.setBoundary(A.boundary):this._bparser=void 0,this._headerFirst=A.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:A.partHwm},this._pause=!1;let e=this;this._hparser=new NHe(A),this._hparser.on("header",function(t){e._inHeader=!1,e._part.emit("header",t)})}wHe(Zn,kv);Zn.prototype.emit=function(A){if(A==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else kv.prototype.emit.apply(this,arguments)};Zn.prototype._write=function(A,e,t){if(!this._hparser&&!this._bparser)return t();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new Une(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(A);if(!this._inHeader&&r!==void 0&&r<A.length)A=A.slice(r);else return t()}this._firstWrite&&(this._bparser.push(xHe),this._firstWrite=!1),this._bparser.push(A),this._pause?this._cb=t:t()};Zn.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Zn.prototype.setBoundary=function(A){let e=this;this._bparser=new bHe(`\r
--`+A),this._bparser.on("info",function(t,r,i,s){e._oninfo(t,r,i,s)})};Zn.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",SHe),this._part.resume())};Zn.prototype._oninfo=function(A,e,t,r){let i,s=this,n=0,a,o=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&t+n<r;)if(e[t+n]===DHe)++n,++this._dashes;else{this._dashes&&(i=RHe),this._dashes=0;break}if(this._dashes===2&&(t+n<r&&this._events.trailer&&this.emit("trailer",e.slice(t+n,r)),this.reset(),this._finished=!0,s._parts===0&&(s._realFinish=!0,s.emit("finish"),s._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new Une(this._partOpts),this._part._read=function(c){s._unpause()},this._isPreamble&&this._events.preamble?this.emit("preamble",this._part):this._isPreamble!==!0&&this._events.part?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&t<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(o=this._part.push(i)),o=this._part.push(e.slice(t,r)),o||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),a=this._hparser.push(e.slice(t,r)),!this._inHeader&&a!==void 0&&a<r&&this._oninfo(!1,e,t+a,r))),A&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:t!==r&&(++this._parts,this._part.on("end",function(){--s._parts===0&&(s._finished?(s._realFinish=!0,s.emit("finish"),s._realFinish=!1):s._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};Zn.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let A=this._cb;this._cb=void 0,A()}};Mne.exports=Zn});var tw=E((HaA,One)=>{"use strict";var Tne=new TextDecoder("utf-8"),Aw=new Map([["utf-8",Tne],["utf8",Tne]]);function vHe(A,e,t){if(A)if(Aw.has(t))try{return Aw.get(t).decode(Buffer.from(A,e))}catch{}else try{return Aw.set(t,new TextDecoder(t)),Aw.get(t).decode(Buffer.from(A,e))}catch{}return A}One.exports=vHe});var Lv=E((GaA,Pne)=>{"use strict";var rw=tw(),Yne=/%([a-fA-F0-9]{2})/g;function qne(A,e){return String.fromCharCode(parseInt(e,16))}function kHe(A){let e=[],t="key",r="",i=!1,s=!1,n=0,a="";for(var o=0,c=A.length;o<c;++o){let l=A[o];if(l==="\\"&&i)if(s)s=!1;else{s=!0;continue}else if(l==='"')if(s)s=!1;else{i?(i=!1,t="key"):i=!0;continue}else if(s&&i&&(a+="\\"),s=!1,(t==="charset"||t==="lang")&&l==="'"){t==="charset"?(t="lang",r=a.substring(1)):t="value",a="";continue}else if(t==="key"&&(l==="*"||l==="=")&&e.length){l==="*"?t="charset":t="value",e[n]=[a,void 0],a="";continue}else if(!i&&l===";"){t="key",r?(a.length&&(a=rw(a.replace(Yne,qne),"binary",r)),r=""):a.length&&(a=rw(a,"binary","utf8")),e[n]===void 0?e[n]=a:e[n][1]=a,a="",++n;continue}else if(!i&&(l===" "||l===" "))continue;a+=l}return r&&a.length?a=rw(a.replace(Yne,qne),"binary",r):a&&(a=rw(a,"binary","utf8")),e[n]===void 0?a&&(e[n]=a):e[n][1]=a,e}Pne.exports=kHe});var Gne=E((_aA,Hne)=>{"use strict";Hne.exports=function(e){if(typeof e!="string")return"";for(var t=e.length-1;t>=0;--t)switch(e.charCodeAt(t)){case 47:case 92:return e=e.slice(t+1),e===".."||e==="."?"":e}return e===".."||e==="."?"":e}});var Wne=E((JaA,Vne)=>{"use strict";var{Readable:Jne}=require("node:stream"),{inherits:FHe}=require("node:util"),LHe=Fv(),_ne=Lv(),UHe=tw(),MHe=Gne(),ep=ew(),THe=/^boundary$/i,OHe=/^form-data$/i,YHe=/^charset$/i,qHe=/^filename$/i,PHe=/^name$/i;iw.detect=/^multipart\/form-data/i;function iw(A,e){let t,r,i=this,s,n=e.limits,a=e.isPartAFile||((S,x,F)=>x==="application/octet-stream"||F!==void 0),o=e.parsedConType||[],c=e.defCharset||"utf8",l=e.preservePath,d={highWaterMark:e.fileHwm};for(t=0,r=o.length;t<r;++t)if(Array.isArray(o[t])&&THe.test(o[t][0])){s=o[t][1];break}function p(){b===0&&v&&!A._done&&(v=!1,i.end())}if(typeof s!="string")throw new Error("Multipart: Boundary not found");let u=ep(n,"fieldSize",1*1024*1024),g=ep(n,"fileSize",1/0),h=ep(n,"files",1/0),Q=ep(n,"fields",1/0),B=ep(n,"parts",1/0),w=ep(n,"headerPairs",2e3),I=ep(n,"headerSize",80*1024),C=0,m=0,b=0,R,y,v=!1;this._needDrain=!1,this._paus
`))}function SGe(A,e){let{headersList:t}=e,r=(t.get("referrer-policy")??"").split(","),i="";if(r.length>0)for(let s=r.length;s!==0;s--){let n=r[s-1].trim();if(CGe.includes(n)){i=n;break}}i!==""&&(A.referrerPolicy=i)}function vGe(){return"allowed"}function kGe(){return"success"}function FGe(){return"success"}function LGe(A){let e=null;e=A.mode,A.headersList.set("sec-fetch-mode",e)}function UGe(A){let e=A.origin;if(A.responseTainting==="cors"||A.mode==="websocket")e&&A.headersList.append("origin",e);else if(A.method!=="GET"&&A.method!=="HEAD"){switch(A.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":A.origin&&Hv(A.origin)&&!Hv(lm(A))&&(e=null);break;case"same-origin":nw(A,lm(A))||(e=null);break;default:}e&&A.headersList.append("origin",e)}}function MGe(A){return mGe.now()}function TGe(A){return{startTime:A.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:A.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function OGe(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function YGe(A){return{referrerPolicy:A.referrerPolicy}}function qGe(A){let e=A.referrerPolicy;Qh(e);let t=null;if(A.referrer==="client"){let a=QGe();if(!a||a.origin==="null")return"no-referrer";t=new URL(a)}else A.referrer instanceof URL&&(t=A.referrer);let r=qv(t),i=qv(t,!0);r.toString().length>4096&&(r=i);let s=nw(A,r),n=om(r)&&!om(A.url);switch(e){case"origin":return i??qv(t,!0);case"unsafe-url":return r;case"same-origin":return s?i:"no-referrer";case"origin-when-cross-origin":return s?r:i;case"strict-origin-when-cross-origin":{let a=lm(A);return nw(r,a)?r:om(r)&&!om(a)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return n?"no-referrer":i}}function qv(A,e){return Qh(A instanceof URL),A.protocol==="file:"||A.protocol==="about:"||A.protocol==="blank:"?"no-referrer":(A.username="",A.password="",A.hash="",e&&(A.pathname="",A.search=""),A)}function om(A){if(!(A instanceof URL))return!1;if(A.href==="about:blank"||A.href==="about:srcdoc"||A.protocol==="data:"||A.protocol==="file:")return!0;return e(A.origin);function e(t){if(t==null||t==="null")return!1;let r=new URL(t);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}function PGe(A,e){if(cm===void 0)return!0;let t=GGe(e);if(t==="no metadata"||t.length===0)return!0;let r=t.sort((n,a)=>a.algo.localeCompare(n.algo)),i=r[0].algo,s=r.filter(n=>n.algo===i);for(let n of s){let a=n.algo,o=n.hash;o.endsWith("==")&&(o=o.slice(0,-2));let c=cm.createHash(a).update(A).digest("base64");if(c.endsWith("==")&&(c=c.slice(0,-2)),c===o)return!0;let l=cm.createHash(a).update(A).digest("base64url");if(l.endsWith("==")&&(l=l.slice(0,-2)),l===o)return!0}return!1}var HGe=/((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function GGe(A){let e=[],t=!0,r=cm.getHashes();for(let i of A.split(" ")){t=!1;let s=HGe.exec(i);if(s===null||s.groups===void 0)continue;let n=s.groups.algo;r.includes(n.toLowerCase())&&e.push(s.groups)}return t===!0?"no metadata":e}function _Ge(A){}function nw(A,e){return A.origin===e.origin&&A.origin==="null"||A.protocol===e.protocol&&A.hostname===e.hostname&&A.port===e.port}function JGe(){let A,e;return{promise:new Promise((r,i)=>{A=r,e=i}),resolve:A,reject:e}}function VGe(A){return A.controller.state==="aborted"}function WGe(A){return A.controller.state==="aborted"||A.controller.state==="terminated"}function zGe(A){return/^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(A)?A.toUpperCase():A}function jGe(A){let e=JSON.stringify(A);if(e===void 0)throw new TypeError("Value is not JSON serializable");return Qh(typeof e=="string"),e}var XGe=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function ZGe(A,e,t){let r={index:
`||A===" "||A===" "}function Gv(A,e=!0,t=!0){let r=0,i=A.length-1;if(e)for(;r<A.length&&pae(A[r]);r++);if(t)for(;i>0&&pae(A[i]);i--);return A.slice(r,i+1)}function uae(A){return A==="\r"||A===`
`||A===" "||A==="\f"||A===" "}function C_e(A,e=!0,t=!0){let r=0,i=A.length-1;if(e)for(;r<A.length&&uae(A[r]);r++);if(t)for(;i>0&&uae(A[i]);i--);return A.slice(r,i+1)}Cae.exports={dataURLProcessor:u_e,URLSerializer:gae,collectASequenceOfCodePoints:cw,collectASequenceOfCodePointsFast:mh,stringPercentDecode:hae,parseMIMEType:_v,collectAnHTTPQuotedString:Eae,serializeAMimeType:E_e}});var lw=E((AoA,fae)=>{"use strict";var{Blob:Bae,File:Qae}=require("buffer"),{types:Jv}=require("util"),{kState:Ls}=Xo(),{isBlobLike:Iae}=In(),{webidl:wA}=fi(),{parseMIMEType:Q_e,serializeAMimeType:m_e}=Kn(),{kEnumerableProperty:mae}=aA(),dm=class A extends Bae{constructor(e,t,r={}){wA.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=wA.converters["sequence<BlobPart>"](e),t=wA.converters.USVString(t),r=wA.converters.FilePropertyBag(r);let i=t,s=r.type,n;e:{if(s){if(s=Q_e(s),s==="failure"){s="";break e}s=m_e(s).toLowerCase()}n=r.lastModified}super(B_e(e,r),{type:s}),this[Ls]={name:i,lastModified:n,type:s}}get name(){return wA.brandCheck(this,A),this[Ls].name}get lastModified(){return wA.brandCheck(this,A),this[Ls].lastModified}get type(){return wA.brandCheck(this,A),this[Ls].type}},Vv=class A{constructor(e,t,r={}){let i=t,s=r.type,n=r.lastModified??Date.now();this[Ls]={blobLike:e,name:i,type:s,lastModified:n}}stream(...e){return wA.brandCheck(this,A),this[Ls].blobLike.stream(...e)}arrayBuffer(...e){return wA.brandCheck(this,A),this[Ls].blobLike.arrayBuffer(...e)}slice(...e){return wA.brandCheck(this,A),this[Ls].blobLike.slice(...e)}text(...e){return wA.brandCheck(this,A),this[Ls].blobLike.text(...e)}get size(){return wA.brandCheck(this,A),this[Ls].blobLike.size}get type(){return wA.brandCheck(this,A),this[Ls].blobLike.type}get name(){return wA.brandCheck(this,A),this[Ls].name}get lastModified(){return wA.brandCheck(this,A),this[Ls].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(dm.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:mae,lastModified:mae});wA.converters.Blob=wA.interfaceConverter(Bae);wA.converters.BlobPart=function(A,e){if(wA.util.Type(A)==="Object"){if(Iae(A))return wA.converters.Blob(A,{strict:!1});if(ArrayBuffer.isView(A)||Jv.isAnyArrayBuffer(A))return wA.converters.BufferSource(A,e)}return wA.converters.USVString(A,e)};wA.converters["sequence<BlobPart>"]=wA.sequenceConverter(wA.converters.BlobPart);wA.converters.FilePropertyBag=wA.dictionaryConverter([{key:"lastModified",converter:wA.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:wA.converters.DOMString,defaultValue:""},{key:"endings",converter:A=>(A=wA.converters.DOMString(A),A=A.toLowerCase(),A!=="native"&&(A="transparent"),A),defaultValue:"transparent"}]);function B_e(A,e){let t=[];for(let r of A)if(typeof r=="string"){let i=r;e.endings==="native"&&(i=I_e(i)),t.push(new TextEncoder().encode(i))}else Jv.isAnyArrayBuffer(r)||Jv.isTypedArray(r)?r.buffer?t.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):t.push(new Uint8Array(r)):Iae(r)&&t.push(r);return t}function I_e(A){let e=`
2024-07-29 19:19:44 +00:00
`;return process.platform==="win32"&&(e=`\r
2024-07-29 20:07:21 +00:00
`),A.replace(/\r?\n/g,e)}function f_e(A){return Qae&&A instanceof Qae||A instanceof dm||A&&(typeof A.stream=="function"||typeof A.arrayBuffer=="function")&&A[Symbol.toStringTag]==="File"}fae.exports={File:dm,FileLike:Vv,isFileLike:f_e}});var pw=E((toA,Dae)=>{"use strict";var{isBlobLike:dw,toUSVString:y_e,makeIterator:Wv}=In(),{kState:si}=Xo(),{File:Nae,FileLike:yae,isFileLike:w_e}=lw(),{webidl:xA}=fi(),{Blob:b_e,File:zv}=require("buffer"),wae=zv??Nae,Bh=class A{constructor(e){if(e!==void 0)throw xA.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[si]=[]}append(e,t,r=void 0){if(xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!dw(t))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=xA.converters.USVString(e),t=dw(t)?xA.converters.Blob(t,{strict:!1}):xA.converters.USVString(t),r=arguments.length===3?xA.converters.USVString(r):void 0;let i=bae(e,t,r);this[si].push(i)}delete(e){xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=xA.converters.USVString(e),this[si]=this[si].filter(t=>t.name!==e)}get(e){xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=xA.converters.USVString(e);let t=this[si].findIndex(r=>r.name===e);return t===-1?null:this[si][t].value}getAll(e){return xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=xA.converters.USVString(e),this[si].filter(t=>t.name===e).map(t=>t.value)}has(e){return xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=xA.converters.USVString(e),this[si].findIndex(t=>t.name===e)!==-1}set(e,t,r=void 0){if(xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!dw(t))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=xA.converters.USVString(e),t=dw(t)?xA.converters.Blob(t,{strict:!1}):xA.converters.USVString(t),r=arguments.length===3?y_e(r):void 0;let i=bae(e,t,r),s=this[si].findIndex(n=>n.name===e);s!==-1?this[si]=[...this[si].slice(0,s),i,...this[si].slice(s+1).filter(n=>n.name!==e)]:this[si].push(i)}entries(){return xA.brandCheck(this,A),Wv(()=>this[si].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return xA.brandCheck(this,A),Wv(()=>this[si].map(e=>[e.name,e.value]),"FormData","key")}values(){return xA.brandCheck(this,A),Wv(()=>this[si].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,t=globalThis){if(xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(t,[i,r,this])}};Bh.prototype[Symbol.iterator]=Bh.prototype.entries;Object.defineProperties(Bh.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function bae(A,e,t){if(A=Buffer.from(A).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(w_e(e)||(e=e instanceof b_e?new wae([e],"blob",{type:e.type}):new yae(e,"blob",{type:e.type})),t!==void 0){let r={type:e.type,lastModified:e.lastModified};e=zv&&e instanceof zv||e instanceof Nae?new wae([e],t,r):new yae(e,t,r)}return{name:A,value:e}}Dae.exports={FormData:Bh}});var pm=E((roA,Mae)=>{"use strict";var N_e=eae(),Ih=aA(),{ReadableStreamFrom:D_e,isBlobLike:Rae,isReadableStreamLike:R_e,readableStreamClose:x_e,createDeferredPromise:S_e,fullyReadBody:v_e}=In(),{FormData:xae}=pw(),{kState:Ko}=Xo(),{webidl:jv}=fi(),{DOMException:kae,structuredClone:k_e}=yl(),{Blob:F_e,File:L_e}=require("buffer"),{kBodyUsed:U_e}=lt(),Xv=require("assert"),{isErrored:M_e}=aA(),{isUint8Array:Fae,isArrayBuffer:T_e}=require("util/types"),{File:O_e}=lw(),{parseMIMEType:Y_e,serializeAMimeType:q_e}=Kn(),Zo=globalThis.ReadableStream,Sae=L_e??O_e;function Lae(A,e=!1){Zo||(Zo=require("stream/web").ReadableStream);let t=null;A instanceof Zo?t=A:Rae(A)?t=A.stream():t=new Zo({async pull(o){o.enqueu
2024-07-29 19:19:44 +00:00
Content-Disposition: form-data`;let l=B=>B.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),d=B=>B.replace(/\r?\n|\r/g,`\r
`),p=new TextEncoder,u=[],g=new Uint8Array([13,10]);s=0;let h=!1;for(let[B,w]of A)if(typeof w=="string"){let I=p.encode(c+`; name="${l(d(B))}"\r
\r
${d(w)}\r
`);u.push(I),s+=I.byteLength}else{let I=p.encode(`${c}; name="${l(d(B))}"`+(w.name?`; filename="${l(w.name)}"`:"")+`\r
Content-Type: ${w.type||"application/octet-stream"}\r
\r
2024-07-29 20:07:21 +00:00
`);u.push(I,w,g),typeof w.size=="number"?s+=I.byteLength+w.size+g.byteLength:h=!0}let Q=p.encode(`--${o}--`);u.push(Q),s+=Q.byteLength,h&&(s=null),i=A,r=async function*(){for(let B of u)B.stream?yield*B.stream():yield B},n="multipart/form-data; boundary="+o}else if(Rae(A))i=A,s=A.size,A.type&&(n=A.type);else if(typeof A[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Ih.isDisturbed(A)||A.locked)throw new TypeError("Response body object should not be disturbed or locked");t=A instanceof Zo?A:D_e(A)}if((typeof i=="string"||Ih.isBuffer(i))&&(s=Buffer.byteLength(i)),r!=null){let o;t=new Zo({async start(){o=r(A)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:d}=await o.next();return d?queueMicrotask(()=>{c.close()}):M_e(t)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await o.return()},type:void 0})}return[{stream:t,source:i,length:s},n]}function P_e(A,e=!1){return Zo||(Zo=require("stream/web").ReadableStream),A instanceof Zo&&(Xv(!Ih.isDisturbed(A),"The body has already been consumed."),Xv(!A.locked,"The stream is locked.")),Lae(A,e)}function H_e(A){let[e,t]=A.stream.tee(),r=k_e(t,{transfer:[t]}),[,i]=r.tee();return A.stream=e,{stream:i,length:A.length,source:A.source}}async function*vae(A){if(A)if(Fae(A))yield A;else{let e=A.stream;if(Ih.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[U_e]=!0,yield*e}}function Zv(A){if(A.aborted)throw new kae("The operation was aborted.","AbortError")}function G_e(A){return{blob(){return uw(this,t=>{let r=W_e(this);return r==="failure"?r="":r&&(r=q_e(r)),new F_e([t],{type:r})},A)},arrayBuffer(){return uw(this,t=>new Uint8Array(t).buffer,A)},text(){return uw(this,Uae,A)},json(){return uw(this,V_e,A)},async formData(){jv.brandCheck(this,A),Zv(this[Ko]);let t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){let r={};for(let[a,o]of this.headers)r[a.toLowerCase()]=o;let i=new xae,s;try{s=new N_e({headers:r,preservePath:!0})}catch(a){throw new kae(`${a}`,"AbortError")}s.on("field",(a,o)=>{i.append(a,o)}),s.on("file",(a,o,c,l,d)=>{let p=[];if(l==="base64"||l.toLowerCase()==="base64"){let u="";o.on("data",g=>{u+=g.toString().replace(/[\r\n]/gm,"");let h=u.length-u.length%4;p.push(Buffer.from(u.slice(0,h),"base64")),u=u.slice(h)}),o.on("end",()=>{p.push(Buffer.from(u,"base64")),i.append(a,new Sae(p,c,{type:d}))})}else o.on("data",u=>{p.push(u)}),o.on("end",()=>{i.append(a,new Sae(p,c,{type:d}))})});let n=new Promise((a,o)=>{s.on("finish",a),s.on("error",c=>o(new TypeError(c)))});if(this.body!==null)for await(let a of vae(this[Ko].body))s.write(a);return s.end(),await n,i}else if(/application\/x-www-form-urlencoded/.test(t)){let r;try{let s="",n=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of vae(this[Ko].body)){if(!Fae(a))throw new TypeError("Expected Uint8Array chunk");s+=n.decode(a,{stream:!0})}s+=n.decode(),r=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new xae;for(let[s,n]of r)i.append(s,n);return i}else throw await Promise.resolve(),Zv(this[Ko]),jv.errors.exception({header:`${A.name}.formData`,message:"Could not parse content as FormData."})}}}function __e(A){Object.assign(A.prototype,G_e(A))}async function uw(A,e,t){if(jv.brandCheck(A,t),Zv(A[Ko]),J_e(A[Ko].body))throw new TypeError("Body is unusable");let r=S_e(),i=n=>r.reject(n),s=n=>{try{r.resolve(e(n))}catch(a){i(a)}};return A[Ko].body==null?(s(new Uint8Array),r.promise):(await v_e(A[Ko].body,s,i),r.promise)}function J_e(A){return A!=null&&(A.stream.locked||Ih.isDisturbed(A.stream))}function Uae(A){return A.length===0?"":(A[0]===239&&A[1]===187&&A[2]===191&&(A=A.subarray(3)),new TextDecoder().decode(A))}function V_e(A){return JSON.parse(Uae(A))}function W_e(A){let{headersList:e}=A[Ko],t=e.get("content-type");return t===null?"failure":Y_e(t)}Mae.exports={extractBody:Lae,safelyExtractBody:P_e,cloneBody:H_e,mixinBody:__e}});var qae=E((ioA,Yae)=>{"use strict";var{InvalidArgumentError:zA,NotSupportedError:z_e}=WA(),$o=require("assert"),{kHT
2024-07-29 19:19:44 +00:00
`),this.body=Q.stream,this.contentLength=Q.length}else Us.isBlobLike(i)&&this.contentType==null&&i.type&&(this.contentType=i.type,this.headers+=`content-type: ${i.type}\r
2024-07-29 20:07:21 +00:00
`);Us.validateHandler(h,r,c),this.servername=Us.getServerName(this.host),this[ec]=h,Zt.create.hasSubscribers&&Zt.create.publish({request:this})}onBodySent(e){if(this[ec].onBodySent)try{this[ec].onBodySent(e)}catch(t){this.onError(t)}}onRequestSent(){Zt.bodySent.hasSubscribers&&Zt.bodySent.publish({request:this})}onConnect(e){return $o(!this.aborted),$o(!this.completed),this[ec].onConnect(e)}onHeaders(e,t,r,i){return $o(!this.aborted),$o(!this.completed),Zt.headers.hasSubscribers&&Zt.headers.publish({request:this,response:{statusCode:e,headers:t,statusText:i}}),this[ec].onHeaders(e,t,r,i)}onData(e){return $o(!this.aborted),$o(!this.completed),this[ec].onData(e)}onUpgrade(e,t,r){return $o(!this.aborted),$o(!this.completed),this[ec].onUpgrade(e,t,r)}onComplete(e){return $o(!this.aborted),this.completed=!0,Zt.trailers.hasSubscribers&&Zt.trailers.publish({request:this,trailers:e}),this[ec].onComplete(e)}onError(e){if(Zt.error.hasSubscribers&&Zt.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[ec].onError(e)}addHeader(e,t){return um(this,e,t),this}static[Z_e](e,t,r){return new A(e,t,r)}static[j_e](e,t,r){let i=t.headers;t={...t,headers:null};let s=new A(e,t,r);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new zA("headers array must be even");for(let n=0;n<i.length;n+=2)um(s,i[n],i[n+1],!0)}else if(i&&typeof i=="object"){let n=Object.keys(i);for(let a=0;a<n.length;a++){let o=n[a];um(s,o,i[o],!0)}}else if(i!=null)throw new zA("headers must be an object or an array");return s}static[X_e](e){let t=e.split(`\r
`),r={};for(let i of t){let[s,n]=i.split(": ");n==null||n.length===0||(r[s]?r[s]+=`,${n}`:r[s]=n)}return r}};function Ap(A,e,t){if(e&&typeof e=="object")throw new zA(`invalid ${A} header`);if(e=e!=null?`${e}`:"",Oae.exec(e)!==null)throw new zA(`invalid ${A} header`);return t?e:`${A}: ${e}\r
`}function um(A,e,t,r=!1){if(t&&typeof t=="object"&&!Array.isArray(t))throw new zA(`invalid ${e} header`);if(t===void 0)return;if(A.host===null&&e.length===4&&e.toLowerCase()==="host"){if(Oae.exec(t)!==null)throw new zA(`invalid ${e} header`);A.host=t}else if(A.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(A.contentLength=parseInt(t,10),!Number.isFinite(A.contentLength))throw new zA("invalid content-length header")}else if(A.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")A.contentType=t,r?A.headers[e]=Ap(e,t,r):A.headers+=Ap(e,t);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new zA("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof t=="string"?t.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new zA("invalid connection header");i==="close"&&(A.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new zA("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new zA("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new z_e("expect header not supported");if(Tae.exec(e)===null)throw new zA("invalid header key");if(Array.isArray(t))for(let i=0;i<t.length;i++)r?A.headers[e]?A.headers[e]+=`,${Ap(e,t[i],r)}`:A.headers[e]=Ap(e,t[i],r):A.headers+=Ap(e,t[i]);else r?A.headers[e]=Ap(e,t,r):A.headers+=Ap(e,t)}}}Yae.exports=$v});var gw=E((soA,Pae)=>{"use strict";var $_e=require("events"),ek=class extends $_e{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};Pae.exports=ek});var hm=E((noA,Hae)=>{"use strict";var eJe=gw(),{ClientDestroyedError:Ak,ClientClosedError:AJe,InvalidArgumentError:fh}=WA(),{kDestroy:tJe,kClose:rJe,kDispatch:tk,kInterceptors:tp}=lt(),yh=Symbol("destroyed"),gm=Symbol("closed"),Ac=Symbol("onDestroyed"),wh=Symbol("onClosed"),hw=Symbol("Intercepted Dispatch"),rk=class extends eJe{constructor(){super(),this[yh]=!1,this[Ac]=null,this[gm]=!1,this[wh]=[]}get destroyed(){return this[yh]}get closed(){return this[gm]}get interceptors(){return this[tp]}set interceptors(e){if(e){for(let t=e.length-1;t>=0;t--)if(typeof this[tp][t]!="function")throw new fh("interceptor must be an function")}this[tp]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((s,n)=>s?i(s):r(n))});if(typeof e!="function")throw new fh("invalid callback");if(this[yh]){queueMicrotask(()=>e(new Ak,null));return}if(this[gm]){this[wh]?this[wh].push(e):queueMicrotask(()=>e(null,null));return}this[gm]=!0,this[wh].push(e);let t=()=>{let r=this[wh];this[wh]=null;for(let i=0;i<r.length;i++)r[i](null,null)};this[rJe]().then(()=>this.destroy()).then(()=>{queueMicrotask(t)})}destroy(e,t){if(typeof e=="function"&&(t=e,e=null),t===void 0)return new Promise((i,s)=>{this.destroy(e,(n,a)=>n?s(n):i(a))});if(typeof t!="function")throw new fh("invalid callback");if(this[yh]){this[Ac]?this[Ac].push(t):queueMicrotask(()=>t(null,null));return}e||(e=new Ak),this[yh]=!0,this[Ac]=this[Ac]||[],this[Ac].push(t);let r=()=>{let i=this[Ac];this[Ac]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[tJe](e).then(()=>{queueMicrotask(r)})}[hw](e,t){if(!this[tp]||this[tp].length===0)return this[hw]=this[tk],this[tk](e,t);let r=this[tk].bind(this);for(let i=this[tp].length-1;i>=0;i--)r=this[tp][i](r);return this[hw]=r,r(e,t)}dispatch(e,t){if(!t||typeof t!="object")throw new fh("handler must be an object");try{if(!e||typeof e!="object")throw new fh("opts must be an object.");if(this[yh]||this[Ac])throw new Ak;if(this[gm])throw new AJe;return this[hw](e,t)}catch(r){if(typeof t.onError!="function")throw new fh("invalid onError method");return t.onError(r),!1}}};Hae.exports=rk});var Em=E((coA,Jae)=>{"use strict";var iJe=require("net"),Gae=require("assert"),_ae=aA(),{InvalidArgumentError:sJe,ConnectTimeoutError:nJe}=WA(),ik,sk;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?sk=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.Finalizatio
`,this[ooe]=o??3e5,this[aoe]=i??3e5,this[fm]=w??!0,this[TJe]=C,this[ym]=b,this[bl]=null,this[loe]=y>-1?y:-1,this[za]="h1",this[Ts]=null,this[yw]=S?{openStreams:0,maxConcurrentStreams:x??100}:null,this[doe]=`${this[Hr].hostname}${this[Hr].port?`:${this[Hr].port}`:""}`,this[rt]=[],this[it]=0,this[Ms]=0}get pipelining(){return this[Dl]}set pipelining(e){this[Dl]=e,Os(this,!0)}get[sp](){return this[rt].length-this[Ms]}get[Et](){return this[Ms]-this[it]}get[ip](){return this[rt].length-this[it]}get[MJe](){return!!this[Ft]&&!this[Dh]&&!this[Ft].destroyed}get[uk](){let e=this[Ft];return e&&(e[yi]||e[rc]||e[xh])||this[ip]>=(this[Dl]||1)||this[sp]>0}[UJe](e){hoe(this),this.once("connect",e)}[qJe](e,t){let r=e.origin||this[Hr].origin,i=this[za]==="h2"?pk[HJe](r,e,t):pk[_Je](r,e,t);return this[rt].push(i),this[rp]||(ge.bodyLength(i.body)==null&&ge.isIterable(i.body)?(this[rp]=1,process.nextTick(Os,this)):Os(this,!0)),this[rp]&&this[Nl]!==2&&this[uk]&&(this[Nl]=2),this[Nl]<2}async[OJe](){return new Promise(e=>{this[ip]?this[bl]=e:e(null)})}async[YJe](e){return new Promise(t=>{let r=this[rt].splice(this[Ms]);for(let s=0;s<r.length;s++){let n=r[s];_r(this,n,e)}let i=()=>{this[bl]&&(this[bl](),this[bl]=null),t()};this[Ts]!=null&&(ge.destroy(this[Ts],e),this[Ts]=null,this[yw]=null),this[Ft]?ge.destroy(this[Ft].on("close",i),e):queueMicrotask(i),Os(this)})}};function KJe(A){Ae(A.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Ft][Gr]=A,Dw(this[Wa],A)}function $Je(A,e,t){let r=new Va(`HTTP/2: "frameError" received - type ${A}, code ${e}`);t===0&&(this[Ft][Gr]=r,Dw(this[Wa],r))}function eVe(){ge.destroy(this,new Rh("other side closed")),ge.destroy(this[Ft],new Rh("other side closed"))}function AVe(A){let e=this[Wa],t=new Va(`HTTP/2: "GOAWAY" frame received with code ${A}`);if(e[Ft]=null,e[Ts]=null,e.destroyed){Ae(this[sp]===0);let r=e[rt].splice(e[it]);for(let i=0;i<r.length;i++){let s=r[i];_r(this,s,t)}}else if(e[Et]>0){let r=e[rt][e[it]];e[rt][e[it]++]=null,_r(e,r,t)}e[Ms]=e[it],Ae(e[Et]===0),e.emit("disconnect",e[Hr],[e],t),Os(e)}var Ga=Wae(),tVe=Qw(),rVe=Buffer.alloc(0);async function iVe(){let A=process.env.JEST_WORKER_ID?ck():void 0,e;try{e=await WebAssembly.compile(Buffer.from(eoe(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(A||ck(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(t,r,i)=>0,wasm_on_status:(t,r,i)=>{Ae.strictEqual(or.ptr,t);let s=r-Ja+_a.byteOffset;return or.onStatus(new mw(_a.buffer,s,i))||0},wasm_on_message_begin:t=>(Ae.strictEqual(or.ptr,t),or.onMessageBegin()||0),wasm_on_header_field:(t,r,i)=>{Ae.strictEqual(or.ptr,t);let s=r-Ja+_a.byteOffset;return or.onHeaderField(new mw(_a.buffer,s,i))||0},wasm_on_header_value:(t,r,i)=>{Ae.strictEqual(or.ptr,t);let s=r-Ja+_a.byteOffset;return or.onHeaderValue(new mw(_a.buffer,s,i))||0},wasm_on_headers_complete:(t,r,i,s)=>(Ae.strictEqual(or.ptr,t),or.onHeadersComplete(r,!!i,!!s)||0),wasm_on_body:(t,r,i)=>{Ae.strictEqual(or.ptr,t);let s=r-Ja+_a.byteOffset;return or.onBody(new mw(_a.buffer,s,i))||0},wasm_on_message_complete:t=>(Ae.strictEqual(or.ptr,t),or.onMessageComplete()||0)}})}var dk=null,Ek=iVe();Ek.catch();var or=null,_a=null,Bw=0,Ja=null,Sh=1,fw=2,Ck=3,Qk=class{constructor(e,t,{exports:r}){Ae(Number.isFinite(e[Iw])&&e[Iw]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(Ga.TYPE.RESPONSE),this.client=e,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[Iw],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[loe]}setTimeout(e,t){this.timeoutType=t,e!==this.timeoutValue?(lk.clearTimeout(this.timeout),e?(this.timeout=lk.setTimeout(sVe,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(Ae(this.ptr!=null),Ae(or==null),this.llhttp.llhttp_resume(this.
2024-07-29 19:19:44 +00:00
`;return typeof s=="string"?u+=`host: ${s}\r
2024-07-29 20:07:21 +00:00
`:u+=A[ioe],n?u+=`connection: upgrade\r
2024-07-29 19:19:44 +00:00
upgrade: ${n}\r
`:A[Dl]&&!p[yi]?u+=`connection: keep-alive\r
`:u+=`connection: close\r
`,a&&(u+=a),ni.sendHeaders.hasSubscribers&&ni.sendHeaders.publish({request:e,headers:u,socket:p}),t?ge.isBuffer(t)?(Ae(d===t.byteLength,"buffer body must have content length"),p.cork(),p.write(`${u}content-length: ${d}\r
\r
2024-07-29 20:07:21 +00:00
`,"latin1"),p.write(t),p.uncork(),e.onBodySent(t),e.onRequestSent(),l||(p[yi]=!0)):ge.isBlobLike(t)?typeof t.stream=="function"?bw({body:t.stream(),client:A,request:e,socket:p,contentLength:d,header:u,expectsPayload:l}):Coe({body:t,client:A,request:e,socket:p,contentLength:d,header:u,expectsPayload:l}):ge.isStream(t)?Eoe({body:t,client:A,request:e,socket:p,contentLength:d,header:u,expectsPayload:l}):ge.isIterable(t)?bw({body:t,client:A,request:e,socket:p,contentLength:d,header:u,expectsPayload:l}):Ae(!1):(d===0?p.write(`${u}content-length: 0\r
2024-07-29 19:19:44 +00:00
\r
`,"latin1"):(Ae(d===null,"no body must not have content length"),p.write(`${u}\r
2024-07-29 20:07:21 +00:00
`,"latin1")),e.onRequestSent()),!0}function oVe(A,e,t){let{body:r,method:i,path:s,host:n,upgrade:a,expectContinue:o,signal:c,headers:l}=t,d;if(typeof l=="string"?d=pk[GJe](l.trim()):d=l,a)return _r(A,t,new Error("Upgrade not supported for H2")),!1;try{t.onConnect(w=>{t.aborted||t.completed||_r(A,t,w||new Bk)})}catch(w){_r(A,t,w)}if(t.aborted)return!1;let p,u=A[yw];if(d[JJe]=n||A[doe],d[VJe]=i,i==="CONNECT")return e.ref(),p=e.request(d,{endStream:!1,signal:c}),p.id&&!p.pending?(t.onUpgrade(null,null,p),++u.openStreams):p.once("ready",()=>{t.onUpgrade(null,null,p),++u.openStreams}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),!0;d[WJe]=s,d[zJe]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let h=ge.bodyLength(r);if(h==null&&(h=t.contentLength),(h===0||!g)&&(h=null),t.contentLength!=null&&t.contentLength!==h){if(A[fm])return _r(A,t,new tc),!1;process.emitWarning(new tc)}h!=null&&(Ae(r,"no body must not have content length"),d[jJe]=`${h}`),e.ref();let Q=i==="GET"||i==="HEAD";return o?(d[XJe]="100-continue",p=e.request(d,{endStream:Q,signal:c}),p.once("continue",B)):(p=e.request(d,{endStream:Q,signal:c}),B()),++u.openStreams,p.once("response",w=>{t.onHeaders(Number(w[ZJe]),w,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{t.onComplete([])}),p.on("data",w=>{t.onData(w)===!1&&p.pause()}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),p.once("error",function(w){A[Ts]&&!A[Ts].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,ge.destroy(p,w))}),p.once("frameError",(w,I)=>{let C=new Va(`HTTP/2: "frameError" received - type ${w}, code ${I}`);_r(A,t,C),A[Ts]&&!A[Ts].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,ge.destroy(p,C))}),!0;function B(){r?ge.isBuffer(r)?(Ae(h===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),t.onBodySent(r),t.onRequestSent()):ge.isBlobLike(r)?typeof r.stream=="function"?bw({client:A,request:t,contentLength:h,h2stream:p,expectsPayload:g,body:r.stream(),socket:A[Ft],header:""}):Coe({body:r,client:A,request:t,contentLength:h,expectsPayload:g,h2stream:p,header:"",socket:A[Ft]}):ge.isStream(r)?Eoe({body:r,client:A,request:t,contentLength:h,expectsPayload:g,socket:A[Ft],h2stream:p,header:""}):ge.isIterable(r)?bw({body:r,client:A,request:t,contentLength:h,expectsPayload:g,header:"",h2stream:p,socket:A[Ft]}):Ae(!1):t.onRequestSent()}}function Eoe({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){if(Ae(s!==0||t[Et]===0,"stream body cannot be pipelined"),t[za]==="h2"){let h=function(Q){r.onBodySent(Q)},g=bJe(e,A,Q=>{Q?(ge.destroy(e,Q),ge.destroy(A,Q)):r.onRequestSent()});g.on("data",h),g.once("end",()=>{g.removeListener("data",h),ge.destroy(g)});return}let o=!1,c=new Nw({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n}),l=function(g){if(!o)try{!c.write(g)&&this.pause&&this.pause()}catch(h){ge.destroy(this,h)}},d=function(){o||e.resume&&e.resume()},p=function(){u(new Bk)},u=function(g){if(!o){if(o=!0,Ae(i.destroyed||i[rc]&&t[Et]<=1),i.off("drain",d).off("error",u),e.removeListener("data",l).removeListener("end",u).removeListener("error",u).removeListener("close",p),!g)try{c.end()}catch(h){g=h}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?ge.destroy(e,g):ge.destroy(e)}};e.on("data",l).on("end",u).on("error",u).on("close",p),e.resume&&e.resume(),i.on("drain",d).on("error",u)}async function Coe({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){Ae(s===e.size,"blob body must have content length");let o=t[za]==="h2";try{if(s!=null&&s!==e.size)throw new tc;let c=Buffer.from(await e.arrayBuffer());o?(A.cork(),A.write(c),A.uncork()):(i.cork(),i.write(`${n}content-length: ${s}\r
2024-07-29 19:19:44 +00:00
\r
`,"latin1"),i.write(c),i.uncork()),r.onBodySent(c),r.onRequestSent(),a||(i[yi]=!0),Os(t)}catch(c){ge.destroy(o?A:i,c)}}async function bw({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){Ae(s!==0||t[Et]===0,"iterator body cannot be pipelined");let o=null;function c(){if(o){let p=o;o=null,p()}}let l=()=>new Promise((p,u)=>{Ae(o===null),i[Gr]?u(i[Gr]):o=p});if(t[za]==="h2"){A.on("close",c).on("drain",c);try{for await(let p of e){if(i[Gr])throw i[Gr];let u=A.write(p);r.onBodySent(p),u||await l()}}catch(p){A.destroy(p)}finally{r.onRequestSent(),A.end(),A.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let d=new Nw({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n});try{for await(let p of e){if(i[Gr])throw i[Gr];d.write(p)||await l()}d.end()}catch(p){d.destroy(p)}finally{i.off("close",c).off("drain",c)}}var Nw=class{constructor({socket:e,request:t,contentLength:r,client:i,expectsPayload:s,header:n}){this.socket=e,this.request=t,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=n,e[rc]=!0}write(e){let{socket:t,request:r,contentLength:i,client:s,bytesWritten:n,expectsPayload:a,header:o}=this;if(t[Gr])throw t[Gr];if(t.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&n+c>i){if(s[fm])throw new tc;process.emitWarning(new tc)}t.cork(),n===0&&(a||(t[yi]=!0),i===null?t.write(`${o}transfer-encoding: chunked\r
`,"latin1"):t.write(`${o}content-length: ${i}\r
\r
`,"latin1")),i===null&&t.write(`\r
${c.toString(16)}\r
`,"latin1"),this.bytesWritten+=c;let l=t.write(e);return t.uncork(),r.onBodySent(e),l||t[kt].timeout&&t[kt].timeoutType===Sh&&t[kt].timeout.refresh&&t[kt].timeout.refresh(),l}end(){let{socket:e,contentLength:t,client:r,bytesWritten:i,expectsPayload:s,header:n,request:a}=this;if(a.onRequestSent(),e[rc]=!1,e[Gr])throw e[Gr];if(!e.destroyed){if(i===0?s?e.write(`${n}content-length: 0\r
\r
`,"latin1"):e.write(`${n}\r
`,"latin1"):t===null&&e.write(`\r
0\r
\r
2024-07-29 20:07:21 +00:00
`,"latin1"),t!==null&&i!==t){if(r[fm])throw new tc;process.emitWarning(new tc)}e[kt].timeout&&e[kt].timeoutType===Sh&&e[kt].timeout.refresh&&e[kt].timeout.refresh(),Os(r)}}destroy(e){let{socket:t,client:r}=this;t[rc]=!1,e&&(Ae(r[Et]<=1,"pipeline should only contain this request"),ge.destroy(t,e))}};function _r(A,e,t){try{e.onError(t),Ae(e.aborted)}catch(r){A.emit("error",r)}}Qoe.exports=hk});var Boe=E((QoA,moe)=>{"use strict";var Rw=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};moe.exports=class{constructor(){this.head=this.tail=new Rw}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Rw),this.head.push(e)}shift(){let e=this.tail,t=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),t}}});var foe=E((moA,Ioe)=>{var{kFree:cVe,kConnected:lVe,kPending:dVe,kQueued:pVe,kRunning:uVe,kSize:gVe}=lt(),np=Symbol("pool"),Ik=class{constructor(e){this[np]=e}get connected(){return this[np][lVe]}get free(){return this[np][cVe]}get pending(){return this[np][dVe]}get queued(){return this[np][pVe]}get running(){return this[np][uVe]}get size(){return this[np][gVe]}};Ioe.exports=Ik});var Dk=E((BoA,koe)=>{"use strict";var hVe=hm(),EVe=Boe(),{kConnected:fk,kSize:yoe,kRunning:woe,kPending:boe,kQueued:bm,kBusy:CVe,kFree:QVe,kUrl:mVe,kClose:BVe,kDestroy:IVe,kDispatch:fVe}=lt(),yVe=foe(),$i=Symbol("clients"),wi=Symbol("needDrain"),Nm=Symbol("queue"),yk=Symbol("closed resolve"),wk=Symbol("onDrain"),Noe=Symbol("onConnect"),Doe=Symbol("onDisconnect"),Roe=Symbol("onConnectionError"),bk=Symbol("get dispatcher"),Soe=Symbol("add client"),voe=Symbol("remove client"),xoe=Symbol("stats"),Nk=class extends hVe{constructor(){super(),this[Nm]=new EVe,this[$i]=[],this[bm]=0;let e=this;this[wk]=function(r,i){let s=e[Nm],n=!1;for(;!n;){let a=s.shift();if(!a)break;e[bm]--,n=!this.dispatch(a.opts,a.handler)}this[wi]=n,!this[wi]&&e[wi]&&(e[wi]=!1,e.emit("drain",r,[e,...i])),e[yk]&&s.isEmpty()&&Promise.all(e[$i].map(a=>a.close())).then(e[yk])},this[Noe]=(t,r)=>{e.emit("connect",t,[e,...r])},this[Doe]=(t,r,i)=>{e.emit("disconnect",t,[e,...r],i)},this[Roe]=(t,r,i)=>{e.emit("connectionError",t,[e,...r],i)},this[xoe]=new yVe(this)}get[CVe](){return this[wi]}get[fk](){return this[$i].filter(e=>e[fk]).length}get[QVe](){return this[$i].filter(e=>e[fk]&&!e[wi]).length}get[boe](){let e=this[bm];for(let{[boe]:t}of this[$i])e+=t;return e}get[woe](){let e=0;for(let{[woe]:t}of this[$i])e+=t;return e}get[yoe](){let e=this[bm];for(let{[yoe]:t}of this[$i])e+=t;return e}get stats(){return this[xoe]}async[BVe](){return this[Nm].isEmpty()?Promise.all(this[$i].map(e=>e.close())):new Promise(e=>{this[yk]=e})}async[IVe](e){for(;;){let t=this[Nm].shift();if(!t)break;t.handler.onError(e)}return Promise.all(this[$i].map(t=>t.destroy(e)))}[fVe](e,t){let r=this[bk]();return r?r.dispatch(e,t)||(r[wi]=!0,this[wi]=!this[bk]()):(this[wi]=!0,this[Nm].push({opts:e,handler:t}),this[bm]++),!this[wi]}[Soe](e){return e.on("drain",this[wk]).on("connect",this[Noe]).on("disconnect",this[Doe]).on("connectionError",this[Roe]),this[$i].push(e),this[wi]&&process.nextTick(()=>{this[wi]&&this[wk](e[mVe],[this,e])}),this}[voe](e){e.close(()=>{let t=this[$i].indexOf(e);t!==-1&&this[$i].splice(t,1)}),this[wi]=this[$i].some(t=>!t[wi]&&t.closed!==!0&&t.destroyed!==!0)}};koe.exports={PoolBase:Nk,kClients:$i,kNeedDrain:wi,kAddClient:Soe,kRemoveClient:voe,kGetDispatcher:bk}});var vh=E((IoA,Moe)=>{"use strict";var{PoolBase:wVe,kClients:Foe,kNeedDrain:bVe,kAddClient:NVe,kGetDispatcher:DVe}=Dk(),RVe=wm(),{InvalidArgumentError:Rk}=WA(),xk=aA(),{kUrl:Loe,kInterceptors:xVe}=lt(),SVe=Em(),Sk=Symbol("options"),vk=Symbol("connections"),Uoe=Symbol("factory");function vVe(A,e){return new RVe(A,e)}var kk=class extends wVe{constructor(e,{connections:t,factory:r=vVe,connect:
2024-07-29 19:19:44 +00:00
${r.count} ${r.noun} ${r.is} pending:
${e.format(t)}
2024-07-29 20:07:21 +00:00
`.trim())}};gle.exports=EF});var Ile=E((VoA,Ble)=>{"use strict";var{kProxy:kze,kClose:Fze,kDestroy:Lze,kInterceptors:Uze}=lt(),{URL:Ele}=require("url"),Cle=Rm(),Mze=vh(),Tze=hm(),{InvalidArgumentError:km,RequestAbortedError:Oze}=WA(),Qle=Em(),vm=Symbol("proxy agent"),Ww=Symbol("proxy client"),zw=Symbol("proxy headers"),CF=Symbol("request tls settings"),Yze=Symbol("proxy tls settings"),mle=Symbol("connect endpoint function");function qze(A){return A==="https:"?443:80}function Pze(A){if(typeof A=="string"&&(A={uri:A}),!A||!A.uri)throw new km("Proxy opts.uri is mandatory");return{uri:A.uri,protocol:A.protocol||"https"}}function Hze(A,e){return new Mze(A,e)}var QF=class extends Tze{constructor(e){if(super(e),this[kze]=Pze(e),this[vm]=new Cle(e),this[Uze]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new km("Proxy opts.uri is mandatory");let{clientFactory:t=Hze}=e;if(typeof t!="function")throw new km("Proxy opts.clientFactory must be a function.");if(this[CF]=e.requestTls,this[Yze]=e.proxyTls,this[zw]=e.headers||{},e.auth&&e.token)throw new km("opts.auth cannot be used in combination with opts.token");e.auth?this[zw]["proxy-authorization"]=`Basic ${e.auth}`:e.token&&(this[zw]["proxy-authorization"]=e.token);let r=new Ele(e.uri),{origin:i,port:s,host:n}=r,a=Qle({...e.proxyTls});this[mle]=Qle({...e.requestTls}),this[Ww]=t(r,{connect:a}),this[vm]=new Cle({...e,connect:async(o,c)=>{let l=o.host;o.port||(l+=`:${qze(o.protocol)}`);try{let{socket:d,statusCode:p}=await this[Ww].connect({origin:i,port:s,path:l,signal:o.signal,headers:{...this[zw],host:n}});if(p!==200&&(d.on("error",()=>{}).destroy(),c(new Oze("Proxy response !== 200 when HTTP Tunneling"))),o.protocol!=="https:"){c(null,d);return}let u;this[CF]?u=this[CF].servername:u=o.servername,this[mle]({...o,servername:u,httpSocket:d},c)}catch(d){c(d)}}})}dispatch(e,t){let{host:r}=new Ele(e.origin),i=Gze(e.headers);return _ze(i),this[vm].dispatch({...e,headers:{...i,host:r}},t)}async[Fze](){await this[vm].close(),await this[Ww].close()}async[Lze](){await this[vm].destroy(),await this[Ww].destroy()}};function Gze(A){if(Array.isArray(A)){let e={};for(let t=0;t<A.length;t+=2)e[A[t]]=A[t+1];return e}return A}function _ze(A){if(A&&Object.keys(A).find(t=>t.toLowerCase()==="proxy-authorization"))throw new km("Proxy-Authorization should be sent in ProxyAgent constructor")}Ble.exports=QF});var Ph=E((WoA,ble)=>{"use strict";var fle=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Jze}=WA(),Vze=Rm();wle()===void 0&&yle(new Vze);function yle(A){if(!A||typeof A.dispatch!="function")throw new Jze("Argument agent must implement Agent");Object.defineProperty(globalThis,fle,{value:A,writable:!0,enumerable:!1,configurable:!1})}function wle(){return globalThis[fle]}ble.exports={setGlobalDispatcher:yle,getGlobalDispatcher:wle}});var Dle=E((joA,Nle)=>{"use strict";Nle.exports=class{constructor(e){this.handler=e}onConnect(...e){return this.handler.onConnect(...e)}onError(...e){return this.handler.onError(...e)}onUpgrade(...e){return this.handler.onUpgrade(...e)}onHeaders(...e){return this.handler.onHeaders(...e)}onData(...e){return this.handler.onData(...e)}onComplete(...e){return this.handler.onComplete(...e)}onBodySent(...e){return this.handler.onBodySent(...e)}}});var up=E((XoA,vle)=>{"use strict";var{kHeadersList:es}=lt(),{kGuard:pp}=Xo(),{kEnumerableProperty:Xa}=aA(),{makeIterator:mF,isValidHeaderName:Fm,isValidHeaderValue:Rle}=In(),{webidl:Ve}=fi(),Wze=require("assert"),As=Symbol("headers map"),ts=Symbol("headers map sorted");function xle(A){let e=A.length;for(;/[\r\n\t ]/.test(A.charAt(--e)););return A.slice(0,e+1).replace(/^[\r\n\t ]+/,"")}function Sle(A,e){if(Array.isArray(e))for(let t of e){if(t.length!==2)throw Ve.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${t.length}.`});A.append(t[0],t[1])}else if(typeof e=="object"&&e!==null)for(let[t,r]of Object.entries(e))A.append(t,r);else throw Ve.errors.conversion
2024-07-29 20:17:23 +00:00
${t}`);return t}function Gpe(A,e){return A.endsWith(e)?A:((0,rE.renameSync)(A,A+e),A+e)}function c7(){let A=process.platform;return A==="win32"?"windows":A}function l7(){let A=process.arch;return A==="arm64"?"aarch64":A}var i$e={"package.json":A=>JSON.parse(A).packageManager?.split("bun@")?.[1],".tool-versions":A=>A.match(/^bun\s?(?<version>.*?)$/m)?.groups?.version,".bumrc":A=>A,".bun-version":A=>A};function _pe(A){let e=process.env.GITHUB_WORKSPACE;if(!e||!A)return;(0,tE.debug)(`Reading version from ${A}`);let t=(0,Yb.join)(e,A),r=(0,Yb.basename)(A);if(!(0,rE.existsSync)(t)){(0,tE.warning)(`File ${t} not found`);return}let i=i$e[r]??(()=>{}),s;try{if(s=i((0,rE.readFileSync)(t,"utf8"))?.trim(),!s){(0,tE.warning)(`Failed to read version from ${A}`);return}}catch(n){let{message:a}=n;(0,tE.warning)(`Failed to read ${A}: ${a}`)}finally{if(s)return(0,Hpe.info)(`Obtained version ${s} from ${A}`),s}}var d7=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,iE=A=>{if(typeof A!="string")throw new TypeError("Invalid argument expected string");let e=A.match(d7);if(!e)throw new Error(`Invalid argument not valid semver ('${A}' received)`);return e.shift(),e},Jpe=A=>A==="*"||A==="x"||A==="X",Vpe=A=>{let e=parseInt(A,10);return isNaN(e)?A:e},s$e=(A,e)=>typeof A!=typeof e?[String(A),String(e)]:[A,e],n$e=(A,e)=>{if(Jpe(A)||Jpe(e))return 0;let[t,r]=s$e(Vpe(A),Vpe(e));return t>r?1:t<r?-1:0},Ul=(A,e)=>{for(let t=0;t<Math.max(A.length,e.length);t++){let r=n$e(A[t]||"x",e[t]||"x");if(r!==0)return r}return 0};var jm=(A,e)=>{let t=iE(A),r=iE(e),i=t.pop(),s=r.pop(),n=Ul(t,r);return n!==0?n:i&&s?Ul(i.split("."),s.split(".")):i||s?i?-1:1:0};var zpe=(A,e,t)=>{a$e(t);let r=jm(A,e);return jpe[t].includes(r)},jpe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Wpe=Object.keys(jpe),a$e=A=>{if(typeof A!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof A}`);if(Wpe.indexOf(A)===-1)throw new Error(`Invalid operator, expected one of ${Wpe.join("|")}`)};var sE=(A,e)=>{if(e=e.replace(/([><=]+)\s+/g,"$1"),e.includes("||"))return e.split("||").some(Q=>sE(A,Q));if(e.includes(" - ")){let[Q,B]=e.split(" - ",2);return sE(A,`>=${Q} <=${B}`)}else if(e.includes(" "))return e.trim().replace(/\s{2,}/g," ").split(" ").every(Q=>sE(A,Q));let t=e.match(/^([<>=~^]+)/),r=t?t[1]:"=";if(r!=="^"&&r!=="~")return zpe(A,e,r);let[i,s,n,,a]=iE(A),[o,c,l,,d]=iE(e),p=[i,s??"x",n??"x"],u=[o,c??"x",l??"x"];if(d&&(!a||Ul(p,u)!==0||Ul(a.split("."),d.split("."))===-1))return!1;let g=u.findIndex(Q=>Q!=="0")+1,h=r==="~"?2:g>1?g:1;return!(Ul(p.slice(0,h),u.slice(0,h))!==0||Ul(p.slice(h),u.slice(h))===-1)};var Pb=A=>typeof A=="string"&&/^[v\d]/.test(A)&&d7.test(A);async function Xpe(A){let{customUrl:e}=A;return e?{url:e}:A.version&&/^[0-9a-f]{40}$/i.test(A.version)?await o$e(A):await c$e(A)}async function o$e(A){let e,t=1,r;for(;(e=await(await qb(`https://api.github.com/repos/oven-sh/bun/actions/workflows/ci.yml/runs?per_page=100&page=${t}`,{headers:{Authorization:`Bearer ${A.token}`}})).json())&&(r=e.workflow_runs.find(p=>p.head_sha===A.version),!r);)t++;let i=await(await qb(`https://api.github.com/repos/oven-sh/bun/actions/runs/${r.id}/artifacts`,{headers:{Authorization:`Bearer ${A.token}`}})).json(),{os:s,arch:n,avx2:a,profile:o,token:c}=A,l=`bun-${s??c7()}-${n??l7()}${a?"-baseline":""}${o?"-profile":""}`,d=i.artifacts.find(p=>p.name===l);if(!d)throw new Error(`Failed to find artifact '${l}' in run '${r.id}'`);return{url:d.archive_download_url,auth:`Bearer ${c}`}}async function c$e(A){let t=(await(await qb("https://api.github.com/repos/oven-sh/bun/git/refs/tags",{headers:{Authorization:`Bearer ${A.token}`}})).json()).filter(h=>h.ref.startsWith("refs/tags/bun-v")||h.ref==="refs/tags/canary").map(h=>h.ref.replace(/refs\/tags\/(bun-v)?/g,"")),{version:r,os:i,arch:s,avx2:n,profile:a}=A,o=t.find(h=>h===r);o?Pb(o)&&(o=`bun-v${o}`):(t=t.filter(h=>Pb(h)).sort(jm),r==="latest"?o=`bun-v${t.at(-1)}`:o=`bun-v${t.filter(h=>sE(h,r)).at(-1)}`);let c=encodeURICompone
2024-07-29 18:31:34 +00:00
/*! Bundled license information:
2024-07-29 19:19:44 +00:00
undici/lib/fetch/body.js:
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
undici/lib/websocket/frame.js:
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
undici/lib/fetch/body.js:
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
undici/lib/websocket/frame.js:
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
2024-07-29 18:31:34 +00:00
sax/lib/sax.js:
(*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
mime-db/index.js:
(*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*)
mime-types/index.js:
(*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*)
2024-07-29 19:19:44 +00:00
undici/lib/fetch/body.js:
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
undici/lib/websocket/frame.js:
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
2024-07-29 18:31:34 +00:00
*/