this[rn][n][ps]&&!s[Uh]&&(n=this[Xc]),this[Xc]===0&&(this[Kc]=this[Kc]-this[HL],this[Kc]<=0&&(this[Kc]=this[fy])),s[ps]>=this[Kc]&&!s[Uh])return s}return this[Kc]=this[rn][n][ps],this[Xc]=n,this[rn][n]}};jL.exports=fw});var hw=A(($nt,WL)=>{"use strict";var{kConnected:VL,kSize:YL}=zt(),my=class{constructor(e){this.value=e}deref(){return this.value[VL]===0&&this.value[YL]===0?void 0:this.value}},gy=class{constructor(e){this.finalizer=e}register(e,r){e.on&&e.on("disconnect",()=>{e[VL]===0&&e[YL]===0&&this.finalizer(r)})}};WL.exports=function(){return process.env.NODE_V8_COVERAGE?{WeakRef:my,FinalizationRegistry:gy}:{WeakRef:global.WeakRef||my,FinalizationRegistry:global.FinalizationRegistry||gy}}});var qh=A((Knt,rF)=>{"use strict";var{InvalidArgumentError:yy}=Dt(),{kClients:ml,kRunning:JL,kClose:zge,kDestroy:Vge,kDispatch:Yge,kInterceptors:Wge}=zt(),Jge=vh(),$ge=Uu(),Kge=Lh(),Xge=ut(),Zge=ty(),{WeakRef:e0e,FinalizationRegistry:t0e}=hw()(),$L=Symbol("onConnect"),KL=Symbol("onDisconnect"),XL=Symbol("onConnectionError"),r0e=Symbol("maxRedirections"),ZL=Symbol("onDrain"),eF=Symbol("factory"),tF=Symbol("finalizer"),mw=Symbol("options");function i0e(t,e){return e&&e.connections===1?new Kge(t,e):new $ge(t,e)}var gw=class extends Jge{constructor({factory:e=i0e,maxRedirections:r=0,connect:i,...n}={}){if(super(),typeof e!="function")throw new yy("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new yy("connect must be a function or an object");if(!Number.isInteger(r)||r<0)throw new yy("maxRedirections must be a positive number");i&&typeof i!="function"&&(i={...i}),this[Wge]=n.interceptors&&n.interceptors.Agent&&Array.isArray(n.interceptors.Agent)?n.interceptors.Agent:[Zge({maxRedirections:r})],this[mw]={...Xge.deepClone(n),connect:i},this[mw].interceptors=n.interceptors?{...n.interceptors}:void 0,this[r0e]=r,this[eF]=e,this[ml]=new Map,this[tF]=new t0e(a=>{let o=this[ml].get(a);o!==void 0&&o.deref()===void 0&&this[ml].delete(a)});let s=this;this[ZL]=(a,o)=>{s.emit("drain",a,[s,...o])},this[$L]=(a,o)=>{s.emit("connect",a,[s,...o])},this[KL]=(a,o,l)=>{s.emit("disconnect",a,[s,...o],l)},this[XL]=(a,o,l)=>{s.emit("connectionError",a,[s,...o],l)}}get[JL](){let e=0;for(let r of this[ml].values()){let i=r.deref();i&&(e+=i[JL])}return e}[Yge](e,r){let i;if(e.origin&&(typeof e.origin=="string"||e.origin instanceof URL))i=String(e.origin);else throw new yy("opts.origin must be a non-empty string or URL.");let n=this[ml].get(i),s=n?n.deref():null;return s||(s=this[eF](e.origin,this[mw]).on("drain",this[ZL]).on("connect",this[$L]).on("disconnect",this[KL]).on("connectionError",this[XL]),this[ml].set(i,new e0e(s)),this[tF].register(s,i)),s.dispatch(e,r)}async[zge](){let e=[];for(let r of this[ml].values()){let i=r.deref();i&&e.push(i.close())}await Promise.all(e)}async[Vge](e){let r=[];for(let i of this[ml].values()){let n=i.deref();n&&r.push(n.destroy(e))}await Promise.all(r)}};rF.exports=gw});var uF=A((Znt,dF)=>{"use strict";var aF=require("assert"),{Readable:n0e}=require("stream"),{RequestAbortedError:oF,NotSupportedError:s0e,InvalidArgumentError:a0e}=Dt(),by=ut(),{ReadableStreamFrom:o0e,toUSVString:l0e}=ut(),yw,Vn=Symbol("kConsume"),Ey=Symbol("kReading"),gl=Symbol("kBody"),iF=Symbol("abort"),lF=Symbol("kContentType"),nF=()=>{};dF.exports=class extends n0e{constructor({resume:e,abort:r,contentType:i="",highWaterMark:n=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:n}),this._readableState.dataEmitted=!1,this[iF]=r,this[Vn]=null,this[gl]=null,this[lF]=i,this[Ey]=!1}destroy(e){return this.destroyed?this:(!e&&!this._readableState.endEmitted&&(e=new oF),e&&this[iF](),super.destroy(e))}emit(e,...r){return e==="data"?this._readableState.dataEmitted=!0:e==="error"&&(this._readableState.errorEmitted=!0),super.emit(e,...r)}on(e,...r){return(e==="data"||e==="readable")&&(this[Ey]=!0),super.on(e,...r)}addListener(e,...r){return this.on(e,...r)}off(e,...r){let i=super.off(e,...r);return(e==="data"||e==="readable")&&(this[Ey]=this.listenerCount("data")>0||this.listenerCount("readable")>0),i}removeListener(e,...r){return this.off(e,...r)}push(e){return this[Vn]&&e!==null&&this.readableLength===0?(cF(this[Vn],e),this[Ey]?super.push(e):!0):super.push(e)}async text(){return Cy(this,"text")}async json(){return Cy(this,"json")}async blob(){return Cy(this,"blob")}async arrayBuffer(){return Cy(this,"arrayBuffer")}async formData(){throw new s0e}get bodyUsed(){return by.isDisturbed(this)}get body(){return this[gl]||(this[gl]=o0e(this),this[Vn]&&(this[gl].getReader(),aF(this[gl].locked))),this[gl]}dump(e){let r=e&&Number.isFinite(e.limit)?e.limit:262144,i=e&&e.signal;if(i)try{if(typeof i!="object"||!("aborted"in i))throw new a0e("signal must be an AbortSignal");by.throwIfAborted(i)}catch(n){return Promise.reject(n)}return this.closed?Promise.resolve(null):new Promise((n,s)=>{let a=i?by.addAbortListener(i,()=>{this.destroy()}):nF;this.on("close",function(){a(),i&&i.aborted?s(i.reason||Object.assign(new Error("The operation was aborted"),{name:"AbortError"})):n(null)}).on("error",nF).on("data",function(o){r-=o.length,r<=0&&this.destroy()}).resume()})}};function c0e(t){return t[gl]&&t[gl].locked===!0||t[Vn]}function d0e(t){return by.isDisturbed(t)||c0e(t)}async function Cy(t,e){if(d0e(t))throw new TypeError("unusable");return aF(!t[Vn]),new Promise((r,i)=>{t[Vn]={type:e,stream:t,resolve:r,reject:i,length:0,body:[]},t.on("error",function(n){Ew(this[Vn],n)}).on("close",function(){this[Vn].body!==null&&Ew(this[Vn],new oF)}),process.nextTick(u0e,t[Vn])})}function u0e(t){if(t.body===null)return;let{_readableState:e}=t.stream;for(let r of e.buffer)cF(t,r);for(e.endEmitted?sF(this[Vn]):t.stream.on("end",function(){sF(this[Vn])}),t.stream.resume();t.stream.read()!=null;);}function sF(t){let{type:e,body:r,resolve:i,stream:n,length:s}=t;try{if(e==="text")i(l0e(Buffer.concat(r)));else if(e==="json")i(JSON.parse(Buffer.concat(r)));else if(e==="arrayBuffer"){let a=new Uint8Array(s),o=0;for(let l of r)a.set(l,o),o+=l.byteLength;i(a.buffer)}else e==="blob"&&(yw||(yw=require("buffer").Blob),i(new yw(r,{type:n[lF]})));Ew(t)}catch(a){n.destroy(a)}}function cF(t,e){t.length+=e.length,t.body.push(e)}function Ew(t,e){t.body!==null&&(e?t.reject(e):t.resolve(),t.type=null,t.stream=null,t.resolve=null,t.reject=null,t.length=0,t.body=null)}});var Cw=A((est,pF)=>{var A0e=require("assert"),{ResponseStatusCodeError:Iy}=Dt(),{toUSVString:AF}=ut();async function p0e({callback:t,body:e,contentType:r,statusCode:i,statusMessage:n,headers:s}){A0e(e);let a=[],o=0;for await(let l of e)if(a.push(l),o+=l.length,o>128*1024){a=null;break}if(i===204||!r||!a){process.nextTick(t,new Iy(`Response status code ${i}${n?`: ${n}`:""}`,i,s));return}try{if(r.startsWith("application/json")){let l=JSON.parse(AF(Buffer.concat(a)));process.nextTick(t,new Iy(`Response status code ${i}${n?`: ${n}`:""}`,i,s,l));return}if(r.startsWith("text/")){let l=AF(Buffer.concat(a));process.nextTick(t,new Iy(`Response status code ${i}${n?`: ${n}`:""}`,i,s,l));return}}catch{}process.nextTick(t,new Iy(`Response status code ${i}${n?`: ${n}`:""}`,i,s))}pF.exports={getResolveErrorBodyCallback:p0e}});var Hu=A((tst,hF)=>{var{addAbortListener:f0e}=ut(),{RequestAbortedError:h0e}=Dt(),qu=Symbol("kListener"),yl=Symbol("kSignal");function fF(t){t.abort?t.abort():t.onError(new h0e)}function m0e(t,e){if(t[yl]=null,t[qu]=null,!!e){if(e.aborted){fF(t);return}t[yl]=e,t[qu]=()=>{fF(t)},f0e(t[yl],t[qu])}}function g0e(t){t[yl]&&("removeEventListener"in t[yl]?t[yl].removeEventListener("abort",t[qu]):t[yl].removeListener("abort",t[qu]),t[yl]=null,t[qu]=null)}hF.exports={addSignal:m0e,removeSignal:g0e}});var yF=A((rst,bw)=>{"use strict";var y0e=uF(),{InvalidArgumentError:Gu,RequestAbortedError:E0e}=Dt(),Ia=ut(),{getResolveErrorBodyCallback:C0e}=Cw(),{AsyncResource:b0e}=require("async_hooks"),{addSignal:I0e,removeSignal:mF}=Hu(),By=class extends b0e{constructor(e,r){if(!e||typeof e!="object")throw new Gu("invalid opts");let{signal:i,method:n,opaque:s,body:a,onInfo:o,responseHeaders:l,throwOnError:c,highWaterMark:d}=e;try{if(typeof r!="function")throw new Gu("invalid callback");if(d&&(typeof d!="number"||d<0))throw new Gu("invalid highWaterMark");if(i&&typeof i.on!="function"&&typeof i.addEventListener!="function")throw new Gu("signal must be an EventEmitter or EventTarget");if(n==="CONNECT")throw new Gu("invalid method");if(o&&typeof o!="function")throw new Gu("invalid onInfo callback");super("UNDICI_REQUEST")}catch(u){throw Ia.isStream(a)&&Ia.destroy(a.on("error",Ia.nop),u),u}this.responseHeaders=l||null,this.opaque=s||null,this.callback=r,this.res=null,this.abort=null,this.body=a,this.trailers={},this.context=null,this.onInfo=o||null,this.throwOnError=c,this.highWaterMark=d,Ia.isStream(a)&&a.on("error",u=>{this.onError(u)}),I0e(this,i)}onConnect(e,r){if(!this.callback)throw new E0e;this.abort=e,this.context=r}onHeaders(e,r,i,n){let{callback:s,opaque:a,abort:o,context:l,responseHeaders:c,highWaterMark:d}=this,u=c==="raw"?Ia.parseRawHeaders(r):Ia.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:u});return}let f=(c==="raw"?Ia.parseHeaders(r):u)["content-type"],h=new y0e({resume:i,abort:o,contentType:f,highWaterMark:d});this.callback=null,this.res=h,s!==null&&(this.throwOnError&&e>=400?this.runInAsyncScope(C0e,null,{callback:s,body:h,contentType:f,statusCode:e,statusMessage:n,headers:u}):this.runInAsyncScope(s,null,null,{statusCode:e,headers:u,trailers:this.trailers,opaque:a,body:h,context:l}))}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;mF(this),Ia.parseHeaders(e,this.trailers),r.push(null)}onError(e){let{res:r,callback:i,body:n,opaque:s}=this;mF(this),i&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(i,null,e,{opaque:s})})),r&&(this.res=null,queueMicrotask(()=>{Ia.destroy(r,e)})),n&&(this.body=null,Ia.destroy(n,e))}};function gF(t,e){if(e===void 0)return new Promise((r,i)=>{gF.call(this,t,(n,s)=>n?i(n):r(s))});try{this.dispatch(t,new By(t,e))}catch(r){if(typeof e!="function")throw r;let i=t&&t.opaque;queueMicrotask(()=>e(r,{opaque:i}))}}bw.exports=gF;bw.exports.RequestHandler=By});var IF=A((ist,bF)=>{"use strict";var{finished:B0e,PassThrough:w0e}=require("stream"),{InvalidArgumentError:ju,InvalidReturnValueError:Q0e,RequestAbortedError:S0e}=Dt(),$s=ut(),{getResolveErrorBodyCallback:_0e}=Cw(),{AsyncResource:v0e}=require("async_hooks"),{addSignal:N0e,removeSignal:EF}=Hu(),Iw=class extends v0e{constructor(e,r,i){if(!e||typeof e!="object")throw new ju("invalid opts");let{signal:n,method:s,opaque:a,body:o,onInfo:l,responseHeaders:c,throwOnError:d}=e;try{if(typeof i!="function")throw new ju("invalid callback");if(typeof r!="function")throw new ju("invalid factory");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new ju("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new ju("invalid method");if(l&&typeof l!="function")throw new ju("invalid onInfo callback");super("UNDICI_STREAM")}catch(u){throw $s.isStream(o)&&$s.destroy(o.on("error",$s.nop),u),u}this.responseHeaders=c||null,this.opaque=a||null,this.factory=r,this.callback=i,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=o,this.onInfo=l||null,this.throwOnError=d||!1,$s.isStream(o)&&o.on("error",u=>{this.onError(u)}),N0e(this,n)}onConnect(e,r){if(!this.callback)throw new S0e;this.abort=e,this.context=r}onHeaders(e,r,i,n){let{factory:s,opaque:a,context:o,callback:l,responseHeaders:c}=this,d=c==="raw"?$s.parseRawHeaders(r):$s.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:d});return}this.factory=null;let u;if(this.throwOnError&&e>=400){let h=(c==="raw"?$s.parseHeaders(r):d)["content-type"];u=new w0e,this.callback=null,this.runInAsyncScope(_0e,null,{callback:l,body:u,contentType:h,statusCode:e,statusMessage:n,headers:d})}else{if(s===null)return;if(u=this.runInAsyncScope(s,null,{statusCode:e,headers:d,opaque:a,context:o}),!u||typeof u.write!="function"||typeof u.end!="function"||typeof u.on!="function")throw new Q0e("expected Writable");B0e(u,{readable:!1},f=>{let{callback:h,res:E,opaque:C,trailers:b,abort:N}=this;this.res=null,(f||!E.readable)&&$s.destroy(E,f),this.callback=null,this.runInAsyncScope(h,null,f||null,{opaque:C,trailers:b}),f&&N()})}return u.on("drain",i),this.res=u,(u.writableNeedDrain!==void 0?u.writableNeedDrain:u._writableState&&u._writableState.needDrain)!==!0}onData(e){let{res:r}=this;return r?r.write(e):!0}onComplete(e){let{res:r}=this;EF(this),r&&(this.trailers=$s.parseHeaders(e),r.end())}onError(e){let{res:r,callback:i,opaque:n,body:s}=this;EF(this),this.factory=null,r?(this.res=null,$s.destroy(r,e)):i&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(i,null,e,{opaque:n})})),s&&(this.body=null,$s.destroy(s,e))}};function CF(t,e,r){if(r===void 0)return new Promise((i,n)=>{CF.call(this,t,e,(s,a)=>s?n(s):i(a))});try{this.dispatch(t,new Iw(t,e,r))}catch(i){if(typeof r!="function")throw i;let n=t&&t.opaque;queueMicrotask(()=>r(i,{opaque:n}))}}bF.exports=CF});var QF=A((nst,wF)=>{"use strict";var{Readable:BF,Duplex:x0e,PassThrough:R0e}=require("stream"),{InvalidArgumentError:Hh,InvalidReturnValueError:T0e,RequestAbortedError:wy}=Dt(),fs=ut(),{AsyncResource:D0e}=require("async_hooks"),{addSignal:P0e,removeSignal:k0e}=Hu(),O0e=require("assert"),zu=Symbol("resume"),Bw=class extends BF{constructor(){super({autoDestroy:!0}),this[zu]=null}_read(){let{[zu]:e}=this;e&&(this[zu]=null,e())}_destroy(e,r){this._read(),r(e)}},ww=class extends BF{constructor(e){super({autoDestroy:!0}),this[zu]=e}_read(){this[zu]()}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new wy),r(e)}},Qw=class extends D0e{constructor(e,r){if(!e||typeof e!="object")throw new Hh("invalid opts");if(typeof r!="function")throw new Hh("invalid handler");let{signal:i,method:n,opaque:s,onInfo:a,responseHeaders:o}=e;if(i&&typeof i.on!="function"&&typeof i.addEventListener!="function")throw new Hh("signal must be an EventEmitter or EventTarget");if(n==="CONNECT")throw new Hh("invalid method");if(a&&typeof a!="function")throw new Hh("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=s||null,this.responseHeaders=o||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=a||null,this.req=new Bw().on("error",fs.nop),this.ret=new x0e({readableObjectMode:e.objectMode,autoDestroy:!0,read:()=>{let{body:l}=this;l&&l.resume&&l.resume()},write:(l,c,d)=>{let{req:u}=this;u.push(l,c)||u._readableState.destroyed?d():u[zu]=d},destroy:(l,c)=>{let{body:d,req:u,res:p,ret:f,abort:h}=this;!l&&!f._readableState.endEmitted&&(l=new wy),h&&l&&h(),fs.destroy(d,l),fs.destroy(u,l),fs.destroy(p,l),k0e(this),c(l)}}).on("prefinish",()=>{let{req:l}=this;l.push(null)}),this.res=null,P0e(this,i)}onConnect(e,r){let{ret:i,res:n}=this;if(O0e(!n,"pipeline cannot be retried"),i.destroyed)throw new wy;this.abort=e,this.context=r}onHeaders(e,r,i){let{opaque:n,handler:s,context:a}=this;if(e<200){if(this.onInfo){let l=this.responseHeaders==="raw"?fs.parseRawHeaders(r):fs.parseHeaders(r);this.onInfo({statusCode:e,headers:l})}return}this.res=new ww(i);let o;try{this.handler=null;let l=this.responseHeaders==="raw"?fs.parseRawHeaders(r):fs.parseHeaders(r);o=this.runInAsyncScope(s,null,{statusCode:e,headers:l,opaque:n,body:this.res,context:a})}catch(l){throw this.res.on("error",fs.nop),l}if(!o||typeof o.on!="function")throw new T0e("expected Readable");o.on("data",l=>{let{ret:c,body:d}=this;!c.push(l)&&d.pause&&d.pause()}).on("error",l=>{let{ret:c}=this;fs.destroy(c,l)}).on("end",()=>{let{ret:l}=this;l.push(null)}).on("close",()=>{let{ret:l}=this;l._readableState.ended||fs.destroy(l,new wy)}),this.body=o}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;r.push(null)}onError(e){let{ret:r}=this;this.handler=null,fs.destroy(r,e)}};function L0e(t,e){try{let r=new Qw(t,e);return this.dispatch({...t,body:r.req},r),r.ret}catch(r){return new R0e().destroy(r)}}wF.exports=L0e});var xF=A((sst,NF)=>{"use strict";var{InvalidArgumentError:Sw,RequestAbortedError:F0e,SocketError:M0e}=Dt(),{AsyncResource:U0e}=require("async_hooks"),SF=ut(),{addSignal:q0e,removeSignal:_F}=Hu(),H0e=require("assert"),_w=class extends U0e{constructor(e,r){if(!e||typeof e!="object")throw new Sw("invalid opts");if(typeof r!="function")throw new Sw("invalid callback");let{signal:i,opaque:n,responseHeaders:s}=e;if(i&&typeof i.on!="function"&&typeof i.addEventListener!="function")throw new Sw("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=s||null,this.opaque=n||null,this.callback=r,this.abort=null,this.context=null,q0e(this,i)}onConnect(e,r){if(!this.callback)throw new F0e;this.abort=e,this.context=null}onHeaders(){throw new M0e("bad upgrade",null)}onUpgrade(e,r,i){let{callback:n,opaque:s,context:a}=this;H0e.strictEqual(e,101),_F(this),this.callback=null;let o=this.responseHeaders==="raw"?SF.parseRawHeaders(r):SF.parseHeaders(r);this.runInAsyncScope(n,null,null,{headers:o,socket:i,opaque:s,context:a})}onError(e){let{callback:r,opaque:i}=this;_F(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:i})}))}};function vF(t,e){if(e===void 0)return new Promise((r,i)=>{vF.call(this,t,(n,s)=>n?i(n):r(s))});try{let r=new _w(t,e);this.dispatch({...t,method:t.method||"GET",upgrade:t.protocol||"Websocket"},r)}catch(r){if(typeof e!="function")throw r;let i=t&&t.opaque;queueMicrotask(()=>e(r,{opaque:i}))}}NF.exports=vF});var kF=A((ast,PF)=>{"use strict";var{AsyncResource:G0e}=require("async_hooks"),{InvalidArgumentError:vw,RequestAbortedError:j0e,SocketError:z0e}=Dt(),RF=ut(),{addSignal:V0e,removeSignal:TF}=Hu(),Nw=class extends G0e{constructor(e,r){if(!e||typeof e!="object")throw new vw("invalid opts");if(typeof r!="function")throw new vw("invalid callback");let{signal:i,opaque:n,responseHeaders:s}=e;if(i&&typeof i.on!="function"&&typeof i.addEventListener!="function")throw new vw("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=n||null,this.responseHeaders=s||null,this.callback=r,this.abort=null,V0e(this,i)}onConnect(e,r){if(!this.callback)throw new j0e;this.abort=e,this.context=r}onHeaders(){throw new z0e("bad connect",null)}onUpgrade(e,r,i){let{callback:n,opaque:s,context:a}=this;TF(this),this.callback=null;let o=r;o!=null&&(o=this.responseHeaders==="raw"?RF.parseRawHeaders(r):RF.parseHeaders(r)),this.runInAsyncScope(n,null,null,{statusCode:e,headers:o,socket:i,opaque:s,context:a})}onError(e){let{callback:r,opaque:i}=this;TF(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:i})}))}};function DF(t,e){if(e===void 0)return new Promise((r,i)=>{DF.call(this,t,(n,s)=>n?i(n):r(s))});try{let r=new Nw(t,e);this.dispatch({...t,method:"CONNECT"},r)}catch(r){if(typeof e!="function")throw r;let i=t&&t.opaque;queueMicrotask(()=>e(r,{opaque:i}))}}PF.exports=DF});var OF=A((ost,Vu)=>{"use strict";Vu.exports.request=yF();Vu.exports.stream=IF();Vu.exports.pipeline=QF();Vu.exports.upgrade=xF();Vu.exports.connect=kF()});var Rw=A((lst,LF)=>{"use strict";var{UndiciError:Y0e}=Dt(),xw=class t extends Y0e{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}};LF.exports={MockNotMatchedError:xw}});var Yu=A((cst,FF)=>{"use strict";FF.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var Gh=A((dst,$F)=>{"use strict";var{MockNotMatchedError:Zc}=Rw(),{kDispatches:Qy,kMockAgent:W0e,kOriginalDispatch:J0e,kOrigin:$0e,kGetNetConnect:K0e}=Yu(),{buildURL:X0e,nop:Z0e}=ut(),{STATUS_CODES:eye}=require("http"),{types:{isPromise:tye}}=require("util");function wo(t,e){return typeof t=="string"?t===e:t instanceof RegExp?t.test(e):typeof t=="function"?t(e)===!0:!1}function UF(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLocaleLowerCase(),r]))}function qF(t,e){if(Array.isArray(t)){for(let r=0;r"u")return!0;if(typeof e!="object"||typeof t.headers!="object")return!1;for(let[r,i]of Object.entries(t.headers)){let n=qF(e,r);if(!wo(i,n))return!1}return!0}function MF(t){if(typeof t!="string")return t;let e=t.split("?");if(e.length!==2)return t;let r=new URLSearchParams(e.pop());return r.sort(),[...e,r.toString()].join("?")}function rye(t,{path:e,method:r,body:i,headers:n}){let s=wo(t.path,e),a=wo(t.method,r),o=typeof t.body<"u"?wo(t.body,i):!0,l=GF(t,n);return s&&a&&o&&l}function jF(t){return Buffer.isBuffer(t)?t:typeof t=="object"?JSON.stringify(t):t.toString()}function zF(t,e){let r=e.query?X0e(e.path,e.query):e.path,i=typeof r=="string"?MF(r):r,n=t.filter(({consumed:s})=>!s).filter(({path:s})=>wo(MF(s),i));if(n.length===0)throw new Zc(`Mock dispatch not matched for path '${i}'`);if(n=n.filter(({method:s})=>wo(s,e.method)),n.length===0)throw new Zc(`Mock dispatch not matched for method '${e.method}'`);if(n=n.filter(({body:s})=>typeof s<"u"?wo(s,e.body):!0),n.length===0)throw new Zc(`Mock dispatch not matched for body '${e.body}'`);if(n=n.filter(s=>GF(s,e.headers)),n.length===0)throw new Zc(`Mock dispatch not matched for headers '${typeof e.headers=="object"?JSON.stringify(e.headers):e.headers}'`);return n[0]}function iye(t,e,r){let i={timesInvoked:0,times:1,persist:!1,consumed:!1},n=typeof r=="function"?{callback:r}:{...r},s={...i,...e,pending:!0,data:{error:null,...n}};return t.push(s),s}function Tw(t,e){let r=t.findIndex(i=>i.consumed?rye(i,e):!1);r!==-1&&t.splice(r,1)}function VF(t){let{path:e,method:r,body:i,headers:n,query:s}=t;return{path:e,method:r,body:i,headers:n,query:s}}function Dw(t){return Object.entries(t).reduce((e,[r,i])=>[...e,Buffer.from(`${r}`),Array.isArray(i)?i.map(n=>Buffer.from(`${n}`)):Buffer.from(`${i}`)],[])}function YF(t){return eye[t]||"unknown"}async function nye(t){let e=[];for await(let r of t)e.push(r);return Buffer.concat(e).toString("utf8")}function WF(t,e){let r=VF(t),i=zF(this[Qy],r);i.timesInvoked++,i.data.callback&&(i.data={...i.data,...i.data.callback(t)});let{data:{statusCode:n,data:s,headers:a,trailers:o,error:l},delay:c,persist:d}=i,{timesInvoked:u,times:p}=i;if(i.consumed=!d&&u>=p,i.pending=u0?setTimeout(()=>{f(this[Qy])},c):f(this[Qy]);function f(E,C=s){let b=Array.isArray(t.headers)?HF(t.headers):t.headers,N=typeof C=="function"?C({...t,headers:b}):C;if(tye(N)){N.then(ne=>f(E,ne));return}let D=jF(N),O=Dw(a),K=Dw(o);e.abort=Z0e,e.onHeaders(n,O,h,YF(n)),e.onData(Buffer.from(D)),e.onComplete(K),Tw(E,r)}function h(){}return!0}function sye(){let t=this[W0e],e=this[$0e],r=this[J0e];return function(n,s){if(t.isMockActive)try{WF.call(this,n,s)}catch(a){if(a instanceof Zc){let o=t[K0e]();if(o===!1)throw new Zc(`${a.message}: subsequent request to origin ${e} was not allowed (net.connect disabled)`);if(JF(o,e))r.call(this,n,s);else throw new Zc(`${a.message}: subsequent request to origin ${e} was not allowed (net.connect is not enabled for this origin)`)}else throw a}else r.call(this,n,s)}}function JF(t,e){let r=new URL(e);return t===!0?!0:!!(Array.isArray(t)&&t.some(i=>wo(i,r.host)))}function aye(t){if(t){let{agent:e,...r}=t;return r}}$F.exports={getResponseData:jF,getMockDispatch:zF,addMockDispatch:iye,deleteMockDispatch:Tw,buildKey:VF,generateKeyValues:Dw,matchValue:wo,getResponse:nye,getStatusText:YF,mockDispatch:WF,buildMockDispatch:sye,checkNetConnect:JF,buildMockOptions:aye,getHeaderByName:qF}});var Uw=A((ust,Mw)=>{"use strict";var{getResponseData:oye,buildKey:lye,addMockDispatch:Pw}=Gh(),{kDispatches:Sy,kDispatchKey:_y,kDefaultHeaders:kw,kDefaultTrailers:Ow,kContentLength:Lw,kMockDispatch:vy}=Yu(),{InvalidArgumentError:Ks}=Dt(),{buildURL:cye}=ut(),Wu=class{constructor(e){this[vy]=e}delay(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Ks("waitInMs must be a valid integer > 0");return this[vy].delay=e,this}persist(){return this[vy].persist=!0,this}times(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Ks("repeatTimes must be a valid integer > 0");return this[vy].times=e,this}},Fw=class{constructor(e,r){if(typeof e!="object")throw new Ks("opts must be an object");if(typeof e.path>"u")throw new Ks("opts.path must be defined");if(typeof e.method>"u"&&(e.method="GET"),typeof e.path=="string")if(e.query)e.path=cye(e.path,e.query);else{let i=new URL(e.path,"data://");e.path=i.pathname+i.search}typeof e.method=="string"&&(e.method=e.method.toUpperCase()),this[_y]=lye(e),this[Sy]=r,this[kw]={},this[Ow]={},this[Lw]=!1}createMockScopeDispatchData(e,r,i={}){let n=oye(r),s=this[Lw]?{"content-length":n.length}:{},a={...this[kw],...s,...i.headers},o={...this[Ow],...i.trailers};return{statusCode:e,data:r,headers:a,trailers:o}}validateReplyParameters(e,r,i){if(typeof e>"u")throw new Ks("statusCode must be defined");if(typeof r>"u")throw new Ks("data must be defined");if(typeof i!="object")throw new Ks("responseOptions must be an object")}reply(e){if(typeof e=="function"){let o=c=>{let d=e(c);if(typeof d!="object")throw new Ks("reply options callback must return an object");let{statusCode:u,data:p="",responseOptions:f={}}=d;return this.validateReplyParameters(u,p,f),{...this.createMockScopeDispatchData(u,p,f)}},l=Pw(this[Sy],this[_y],o);return new Wu(l)}let[r,i="",n={}]=[...arguments];this.validateReplyParameters(r,i,n);let s=this.createMockScopeDispatchData(r,i,n),a=Pw(this[Sy],this[_y],s);return new Wu(a)}replyWithError(e){if(typeof e>"u")throw new Ks("error must be defined");let r=Pw(this[Sy],this[_y],{error:e});return new Wu(r)}defaultReplyHeaders(e){if(typeof e>"u")throw new Ks("headers must be defined");return this[kw]=e,this}defaultReplyTrailers(e){if(typeof e>"u")throw new Ks("trailers must be defined");return this[Ow]=e,this}replyContentLength(){return this[Lw]=!0,this}};Mw.exports.MockInterceptor=Fw;Mw.exports.MockScope=Wu});var Gw=A((Ast,iM)=>{"use strict";var{promisify:dye}=require("util"),uye=Lh(),{buildMockDispatch:Aye}=Gh(),{kDispatches:KF,kMockAgent:XF,kClose:ZF,kOriginalClose:eM,kOrigin:tM,kOriginalDispatch:pye,kConnected:qw}=Yu(),{MockInterceptor:fye}=Uw(),rM=zt(),{InvalidArgumentError:hye}=Dt(),Hw=class extends uye{constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new hye("Argument opts.agent must implement Agent");this[XF]=r.agent,this[tM]=e,this[KF]=[],this[qw]=1,this[pye]=this.dispatch,this[eM]=this.close.bind(this),this.dispatch=Aye.call(this),this.close=this[ZF]}get[rM.kConnected](){return this[qw]}intercept(e){return new fye(e,this[KF])}async[ZF](){await dye(this[eM])(),this[qw]=0,this[XF][rM.kClients].delete(this[tM])}};iM.exports=Hw});var Vw=A((pst,dM)=>{"use strict";var{promisify:mye}=require("util"),gye=Uu(),{buildMockDispatch:yye}=Gh(),{kDispatches:nM,kMockAgent:sM,kClose:aM,kOriginalClose:oM,kOrigin:lM,kOriginalDispatch:Eye,kConnected:jw}=Yu(),{MockInterceptor:Cye}=Uw(),cM=zt(),{InvalidArgumentError:bye}=Dt(),zw=class extends gye{constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new bye("Argument opts.agent must implement Agent");this[sM]=r.agent,this[lM]=e,this[nM]=[],this[jw]=1,this[Eye]=this.dispatch,this[oM]=this.close.bind(this),this.dispatch=yye.call(this),this.close=this[aM]}get[cM.kConnected](){return this[jw]}intercept(e){return new Cye(e,this[nM])}async[aM](){await mye(this[oM])(),this[jw]=0,this[sM][cM.kClients].delete(this[lM])}};dM.exports=zw});var AM=A((hst,uM)=>{"use strict";var Iye={pronoun:"it",is:"is",was:"was",this:"this"},Bye={pronoun:"they",is:"are",was:"were",this:"these"};uM.exports=class{constructor(e,r){this.singular=e,this.plural=r}pluralize(e){let r=e===1,i=r?Iye:Bye,n=r?this.singular:this.plural;return{...i,count:e,noun:n}}}});var fM=A((gst,pM)=>{"use strict";var{Transform:wye}=require("stream"),{Console:Qye}=require("console");pM.exports=class{constructor({disableColors:e}={}){this.transform=new wye({transform(r,i,n){n(null,r)}}),this.logger=new Qye({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let r=e.map(({method:i,path:n,data:{statusCode:s},persist:a,times:o,timesInvoked:l,origin:c})=>({Method:i,Origin:c,Path:n,"Status code":s,Persistent:a?"\u2705":"\u274C",Invocations:l,Remaining:a?1/0:o-l}));return this.logger.table(r),this.transform.read().toString()}}});var yM=A((yst,gM)=>{"use strict";var{kClients:ed}=zt(),Sye=qh(),{kAgent:Yw,kMockAgentSet:Ny,kMockAgentGet:hM,kDispatches:Ww,kIsMockActive:xy,kNetConnect:td,kGetNetConnect:_ye,kOptions:Ry,kFactory:Ty}=Yu(),vye=Gw(),Nye=Vw(),{matchValue:xye,buildMockOptions:Rye}=Gh(),{InvalidArgumentError:mM,UndiciError:Tye}=Dt(),Dye=K0(),Pye=AM(),kye=fM(),Jw=class{constructor(e){this.value=e}deref(){return this.value}},$w=class extends Dye{constructor(e){if(super(e),this[td]=!0,this[xy]=!0,e&&e.agent&&typeof e.agent.dispatch!="function")throw new mM("Argument opts.agent must implement Agent");let r=e&&e.agent?e.agent:new Sye(e);this[Yw]=r,this[ed]=r[ed],this[Ry]=Rye(e)}get(e){let r=this[hM](e);return r||(r=this[Ty](e),this[Ny](e,r)),r}dispatch(e,r){return this.get(e.origin),this[Yw].dispatch(e,r)}async close(){await this[Yw].close(),this[ed].clear()}deactivate(){this[xy]=!1}activate(){this[xy]=!0}enableNetConnect(e){if(typeof e=="string"||typeof e=="function"||e instanceof RegExp)Array.isArray(this[td])?this[td].push(e):this[td]=[e];else if(typeof e>"u")this[td]=!0;else throw new mM("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[td]=!1}get isMockActive(){return this[xy]}[Ny](e,r){this[ed].set(e,new Jw(r))}[Ty](e){let r=Object.assign({agent:this},this[Ry]);return this[Ry]&&this[Ry].connections===1?new vye(e,r):new Nye(e,r)}[hM](e){let r=this[ed].get(e);if(r)return r.deref();if(typeof e!="string"){let i=this[Ty]("http://localhost:9999");return this[Ny](e,i),i}for(let[i,n]of Array.from(this[ed])){let s=n.deref();if(s&&typeof i!="string"&&xye(i,e)){let a=this[Ty](e);return this[Ny](e,a),a[Ww]=s[Ww],a}}}[_ye](){return this[td]}pendingInterceptors(){let e=this[ed];return Array.from(e.entries()).flatMap(([r,i])=>i.deref()[Ww].map(n=>({...n,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new kye}={}){let r=this.pendingInterceptors();if(r.length===0)return;let i=new Pye("interceptor","interceptors").pluralize(r.length);throw new Tye(`
-${i.count} ${i.noun} ${i.is} pending:
+`,"latin1"),r!==null&&i!==r){if(n[Oh])throw new Jo;process.emitWarning(new Jo)}e[fr].timeout&&e[fr].timeoutType===KA&&e[fr].timeout.refresh&&e[fr].timeout.refresh(),Ri(n)}}destroy(e){let{socket:r,client:n}=this;r[Vo]=!1,e&&(fe(n[cr]<=1,"pipeline should only contain this request"),Qe.destroy(r,e))}};function qn(t,e,r){try{e.onError(r),fe(e.aborted)}catch(n){t.emit("error",n)}}eH.exports=bS});var rH=f((ntt,tH)=>{"use strict";var nE=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)}};tH.exports=class{constructor(){this.head=this.tail=new nE}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new nE),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var iH=f((itt,nH)=>{var{kFree:vhe,kConnected:The,kPending:Phe,kQueued:Dhe,kRunning:khe,kSize:Ohe}=Ht(),dl=Symbol("pool"),RS=class{constructor(e){this[dl]=e}get connected(){return this[dl][The]}get free(){return this[dl][vhe]}get pending(){return this[dl][Phe]}get queued(){return this[dl][Dhe]}get running(){return this[dl][khe]}get size(){return this[dl][Ohe]}};nH.exports=RS});var kS=f((stt,hH)=>{"use strict";var Lhe=Rh(),Mhe=rH(),{kConnected:xS,kSize:sH,kRunning:oH,kPending:aH,kQueued:Fh,kBusy:Fhe,kFree:Uhe,kUrl:qhe,kClose:Hhe,kDestroy:Ghe,kDispatch:jhe}=Ht(),zhe=iH(),si=Symbol("clients"),Hn=Symbol("needDrain"),Uh=Symbol("queue"),vS=Symbol("closed resolve"),TS=Symbol("onDrain"),cH=Symbol("onConnect"),lH=Symbol("onDisconnect"),AH=Symbol("onConnectionError"),PS=Symbol("get dispatcher"),dH=Symbol("add client"),fH=Symbol("remove client"),uH=Symbol("stats"),DS=class extends Lhe{constructor(){super(),this[Uh]=new Mhe,this[si]=[],this[Fh]=0;let e=this;this[TS]=function(n,i){let s=e[Uh],o=!1;for(;!o;){let a=s.shift();if(!a)break;e[Fh]--,o=!this.dispatch(a.opts,a.handler)}this[Hn]=o,!this[Hn]&&e[Hn]&&(e[Hn]=!1,e.emit("drain",n,[e,...i])),e[vS]&&s.isEmpty()&&Promise.all(e[si].map(a=>a.close())).then(e[vS])},this[cH]=(r,n)=>{e.emit("connect",r,[e,...n])},this[lH]=(r,n,i)=>{e.emit("disconnect",r,[e,...n],i)},this[AH]=(r,n,i)=>{e.emit("connectionError",r,[e,...n],i)},this[uH]=new zhe(this)}get[Fhe](){return this[Hn]}get[xS](){return this[si].filter(e=>e[xS]).length}get[Uhe](){return this[si].filter(e=>e[xS]&&!e[Hn]).length}get[aH](){let e=this[Fh];for(let{[aH]:r}of this[si])e+=r;return e}get[oH](){let e=0;for(let{[oH]:r}of this[si])e+=r;return e}get[sH](){let e=this[Fh];for(let{[sH]:r}of this[si])e+=r;return e}get stats(){return this[uH]}async[Hhe](){return this[Uh].isEmpty()?Promise.all(this[si].map(e=>e.close())):new Promise(e=>{this[vS]=e})}async[Ghe](e){for(;;){let r=this[Uh].shift();if(!r)break;r.handler.onError(e)}return Promise.all(this[si].map(r=>r.destroy(e)))}[jhe](e,r){let n=this[PS]();return n?n.dispatch(e,r)||(n[Hn]=!0,this[Hn]=!this[PS]()):(this[Hn]=!0,this[Uh].push({opts:e,handler:r}),this[Fh]++),!this[Hn]}[dH](e){return e.on("drain",this[TS]).on("connect",this[cH]).on("disconnect",this[lH]).on("connectionError",this[AH]),this[si].push(e),this[Hn]&&process.nextTick(()=>{this[Hn]&&this[TS](e[qhe],[this,e])}),this}[fH](e){e.close(()=>{let r=this[si].indexOf(e);r!==-1&&this[si].splice(r,1)}),this[Hn]=this[si].some(r=>!r[Hn]&&r.closed!==!0&&r.destroyed!==!0)}};hH.exports={PoolBase:DS,kClients:si,kNeedDrain:Hn,kAddClient:dH,kRemoveClient:fH,kGetDispatcher:PS}});var XA=f((ott,mH)=>{"use strict";var{PoolBase:Yhe,kClients:iE,kNeedDrain:Whe,kAddClient:Jhe,kGetDispatcher:Vhe}=kS(),$he=Mh(),{InvalidArgumentError:OS}=vt(),LS=lt(),{kUrl:pH,kInterceptors:Khe}=Ht(),Xhe=xh(),MS=Symbol("options"),FS=Symbol("connections"),gH=Symbol("factory");function Zhe(t,e){return new $he(t,e)}var US=class extends Yhe{constructor(e,{connections:r,factory:n=Zhe,connect:i,connectTimeout:s,tls:o,maxCachedSessions:a,socketPath:c,autoSelectFamily:l,autoSelectFamilyAttemptTimeout:A,allowH2:u,...d}={}){if(super(),r!=null&&(!Number.isFinite(r)||r<0))throw new OS("invalid connections");if(typeof n!="function")throw new OS("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new OS("connect must be a function or an object");typeof i!="function"&&(i=Xhe({...o,maxCachedSessions:a,allowH2:u,socketPath:c,timeout:s,...LS.nodeHasAutoSelectFamily&&l?{autoSelectFamily:l,autoSelectFamilyAttemptTimeout:A}:void 0,...i})),this[Khe]=d.interceptors&&d.interceptors.Pool&&Array.isArray(d.interceptors.Pool)?d.interceptors.Pool:[],this[FS]=r||null,this[pH]=LS.parseOrigin(e),this[MS]={...LS.deepClone(d),connect:i,allowH2:u},this[MS].interceptors=d.interceptors?{...d.interceptors}:void 0,this[gH]=n,this.on("connectionError",(h,g,E)=>{for(let C of g){let I=this[iE].indexOf(C);I!==-1&&this[iE].splice(I,1)}})}[Vhe](){let e=this[iE].find(r=>!r[Whe]);return e||((!this[FS]||this[iE].length{"use strict";var{BalancedPoolMissingUpstreamError:epe,InvalidArgumentError:tpe}=vt(),{PoolBase:rpe,kClients:Gn,kNeedDrain:qh,kAddClient:npe,kRemoveClient:ipe,kGetDispatcher:spe}=kS(),ope=XA(),{kUrl:qS,kInterceptors:ape}=Ht(),{parseOrigin:yH}=lt(),EH=Symbol("factory"),sE=Symbol("options"),CH=Symbol("kGreatestCommonDivisor"),fl=Symbol("kCurrentWeight"),hl=Symbol("kIndex"),Ki=Symbol("kWeight"),oE=Symbol("kMaxWeightPerServer"),aE=Symbol("kErrorPenalty");function IH(t,e){return e===0?t:IH(e,t%e)}function cpe(t,e){return new ope(t,e)}var HS=class extends rpe{constructor(e=[],{factory:r=cpe,...n}={}){if(super(),this[sE]=n,this[hl]=-1,this[fl]=0,this[oE]=this[sE].maxWeightPerServer||100,this[aE]=this[sE].errorPenalty||15,Array.isArray(e)||(e=[e]),typeof r!="function")throw new tpe("factory must be a function.");this[ape]=n.interceptors&&n.interceptors.BalancedPool&&Array.isArray(n.interceptors.BalancedPool)?n.interceptors.BalancedPool:[],this[EH]=r;for(let i of e)this.addUpstream(i);this._updateBalancedPoolStats()}addUpstream(e){let r=yH(e).origin;if(this[Gn].find(i=>i[qS].origin===r&&i.closed!==!0&&i.destroyed!==!0))return this;let n=this[EH](r,Object.assign({},this[sE]));this[npe](n),n.on("connect",()=>{n[Ki]=Math.min(this[oE],n[Ki]+this[aE])}),n.on("connectionError",()=>{n[Ki]=Math.max(1,n[Ki]-this[aE]),this._updateBalancedPoolStats()}),n.on("disconnect",(...i)=>{let s=i[2];s&&s.code==="UND_ERR_SOCKET"&&(n[Ki]=Math.max(1,n[Ki]-this[aE]),this._updateBalancedPoolStats())});for(let i of this[Gn])i[Ki]=this[oE];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){this[CH]=this[Gn].map(e=>e[Ki]).reduce(IH,0)}removeUpstream(e){let r=yH(e).origin,n=this[Gn].find(i=>i[qS].origin===r&&i.closed!==!0&&i.destroyed!==!0);return n&&this[ipe](n),this}get upstreams(){return this[Gn].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[qS].origin)}[spe](){if(this[Gn].length===0)throw new epe;if(!this[Gn].find(s=>!s[qh]&&s.closed!==!0&&s.destroyed!==!0)||this[Gn].map(s=>s[qh]).reduce((s,o)=>s&&o,!0))return;let n=0,i=this[Gn].findIndex(s=>!s[qh]);for(;n++this[Gn][i][Ki]&&!s[qh]&&(i=this[hl]),this[hl]===0&&(this[fl]=this[fl]-this[CH],this[fl]<=0&&(this[fl]=this[oE])),s[Ki]>=this[fl]&&!s[qh])return s}return this[fl]=this[Gn][i][Ki],this[hl]=i,this[Gn][i]}};BH.exports=HS});var GS=f((ctt,_H)=>{"use strict";var{kConnected:wH,kSize:QH}=Ht(),cE=class{constructor(e){this.value=e}deref(){return this.value[wH]===0&&this.value[QH]===0?void 0:this.value}},lE=class{constructor(e){this.finalizer=e}register(e,r){e.on&&e.on("disconnect",()=>{e[wH]===0&&e[QH]===0&&this.finalizer(r)})}};_H.exports=function(){return process.env.NODE_V8_COVERAGE?{WeakRef:cE,FinalizationRegistry:lE}:{WeakRef:global.WeakRef||cE,FinalizationRegistry:global.FinalizationRegistry||lE}}});var Hh=f((ltt,DH)=>{"use strict";var{InvalidArgumentError:AE}=vt(),{kClients:Fa,kRunning:SH,kClose:lpe,kDestroy:Ape,kDispatch:upe,kInterceptors:dpe}=Ht(),fpe=Rh(),hpe=XA(),ppe=Mh(),gpe=lt(),mpe=Wy(),{WeakRef:ype,FinalizationRegistry:Epe}=GS()(),NH=Symbol("onConnect"),RH=Symbol("onDisconnect"),xH=Symbol("onConnectionError"),Cpe=Symbol("maxRedirections"),vH=Symbol("onDrain"),TH=Symbol("factory"),PH=Symbol("finalizer"),jS=Symbol("options");function Ipe(t,e){return e&&e.connections===1?new ppe(t,e):new hpe(t,e)}var zS=class extends fpe{constructor({factory:e=Ipe,maxRedirections:r=0,connect:n,...i}={}){if(super(),typeof e!="function")throw new AE("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new AE("connect must be a function or an object");if(!Number.isInteger(r)||r<0)throw new AE("maxRedirections must be a positive number");n&&typeof n!="function"&&(n={...n}),this[dpe]=i.interceptors&&i.interceptors.Agent&&Array.isArray(i.interceptors.Agent)?i.interceptors.Agent:[mpe({maxRedirections:r})],this[jS]={...gpe.deepClone(i),connect:n},this[jS].interceptors=i.interceptors?{...i.interceptors}:void 0,this[Cpe]=r,this[TH]=e,this[Fa]=new Map,this[PH]=new Epe(o=>{let a=this[Fa].get(o);a!==void 0&&a.deref()===void 0&&this[Fa].delete(o)});let s=this;this[vH]=(o,a)=>{s.emit("drain",o,[s,...a])},this[NH]=(o,a)=>{s.emit("connect",o,[s,...a])},this[RH]=(o,a,c)=>{s.emit("disconnect",o,[s,...a],c)},this[xH]=(o,a,c)=>{s.emit("connectionError",o,[s,...a],c)}}get[SH](){let e=0;for(let r of this[Fa].values()){let n=r.deref();n&&(e+=n[SH])}return e}[upe](e,r){let n;if(e.origin&&(typeof e.origin=="string"||e.origin instanceof URL))n=String(e.origin);else throw new AE("opts.origin must be a non-empty string or URL.");let i=this[Fa].get(n),s=i?i.deref():null;return s||(s=this[TH](e.origin,this[jS]).on("drain",this[vH]).on("connect",this[NH]).on("disconnect",this[RH]).on("connectionError",this[xH]),this[Fa].set(n,new ype(s)),this[PH].register(s,n)),s.dispatch(e,r)}async[lpe](){let e=[];for(let r of this[Fa].values()){let n=r.deref();n&&e.push(n.close())}await Promise.all(e)}async[Ape](e){let r=[];for(let n of this[Fa].values()){let i=n.deref();i&&r.push(i.destroy(e))}await Promise.all(r)}};DH.exports=zS});var GH=f((utt,HH)=>{"use strict";var MH=require("assert"),{Readable:Bpe}=require("stream"),{RequestAbortedError:FH,NotSupportedError:bpe,InvalidArgumentError:wpe}=vt(),fE=lt(),{ReadableStreamFrom:Qpe,toUSVString:_pe}=lt(),YS,xi=Symbol("kConsume"),uE=Symbol("kReading"),Ua=Symbol("kBody"),kH=Symbol("abort"),UH=Symbol("kContentType"),OH=()=>{};HH.exports=class extends Bpe{constructor({resume:e,abort:r,contentType:n="",highWaterMark:i=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:i}),this._readableState.dataEmitted=!1,this[kH]=r,this[xi]=null,this[Ua]=null,this[UH]=n,this[uE]=!1}destroy(e){return this.destroyed?this:(!e&&!this._readableState.endEmitted&&(e=new FH),e&&this[kH](),super.destroy(e))}emit(e,...r){return e==="data"?this._readableState.dataEmitted=!0:e==="error"&&(this._readableState.errorEmitted=!0),super.emit(e,...r)}on(e,...r){return(e==="data"||e==="readable")&&(this[uE]=!0),super.on(e,...r)}addListener(e,...r){return this.on(e,...r)}off(e,...r){let n=super.off(e,...r);return(e==="data"||e==="readable")&&(this[uE]=this.listenerCount("data")>0||this.listenerCount("readable")>0),n}removeListener(e,...r){return this.off(e,...r)}push(e){return this[xi]&&e!==null&&this.readableLength===0?(qH(this[xi],e),this[uE]?super.push(e):!0):super.push(e)}async text(){return dE(this,"text")}async json(){return dE(this,"json")}async blob(){return dE(this,"blob")}async arrayBuffer(){return dE(this,"arrayBuffer")}async formData(){throw new bpe}get bodyUsed(){return fE.isDisturbed(this)}get body(){return this[Ua]||(this[Ua]=Qpe(this),this[xi]&&(this[Ua].getReader(),MH(this[Ua].locked))),this[Ua]}dump(e){let r=e&&Number.isFinite(e.limit)?e.limit:262144,n=e&&e.signal;if(n)try{if(typeof n!="object"||!("aborted"in n))throw new wpe("signal must be an AbortSignal");fE.throwIfAborted(n)}catch(i){return Promise.reject(i)}return this.closed?Promise.resolve(null):new Promise((i,s)=>{let o=n?fE.addAbortListener(n,()=>{this.destroy()}):OH;this.on("close",function(){o(),n&&n.aborted?s(n.reason||Object.assign(new Error("The operation was aborted"),{name:"AbortError"})):i(null)}).on("error",OH).on("data",function(a){r-=a.length,r<=0&&this.destroy()}).resume()})}};function Spe(t){return t[Ua]&&t[Ua].locked===!0||t[xi]}function Npe(t){return fE.isDisturbed(t)||Spe(t)}async function dE(t,e){if(Npe(t))throw new TypeError("unusable");return MH(!t[xi]),new Promise((r,n)=>{t[xi]={type:e,stream:t,resolve:r,reject:n,length:0,body:[]},t.on("error",function(i){WS(this[xi],i)}).on("close",function(){this[xi].body!==null&&WS(this[xi],new FH)}),process.nextTick(Rpe,t[xi])})}function Rpe(t){if(t.body===null)return;let{_readableState:e}=t.stream;for(let r of e.buffer)qH(t,r);for(e.endEmitted?LH(this[xi]):t.stream.on("end",function(){LH(this[xi])}),t.stream.resume();t.stream.read()!=null;);}function LH(t){let{type:e,body:r,resolve:n,stream:i,length:s}=t;try{if(e==="text")n(_pe(Buffer.concat(r)));else if(e==="json")n(JSON.parse(Buffer.concat(r)));else if(e==="arrayBuffer"){let o=new Uint8Array(s),a=0;for(let c of r)o.set(c,a),a+=c.byteLength;n(o.buffer)}else e==="blob"&&(YS||(YS=require("buffer").Blob),n(new YS(r,{type:i[UH]})));WS(t)}catch(o){i.destroy(o)}}function qH(t,e){t.length+=e.length,t.body.push(e)}function WS(t,e){t.body!==null&&(e?t.reject(e):t.resolve(),t.type=null,t.stream=null,t.resolve=null,t.reject=null,t.length=0,t.body=null)}});var JS=f((dtt,zH)=>{var xpe=require("assert"),{ResponseStatusCodeError:hE}=vt(),{toUSVString:jH}=lt();async function vpe({callback:t,body:e,contentType:r,statusCode:n,statusMessage:i,headers:s}){xpe(e);let o=[],a=0;for await(let c of e)if(o.push(c),a+=c.length,a>128*1024){o=null;break}if(n===204||!r||!o){process.nextTick(t,new hE(`Response status code ${n}${i?`: ${i}`:""}`,n,s));return}try{if(r.startsWith("application/json")){let c=JSON.parse(jH(Buffer.concat(o)));process.nextTick(t,new hE(`Response status code ${n}${i?`: ${i}`:""}`,n,s,c));return}if(r.startsWith("text/")){let c=jH(Buffer.concat(o));process.nextTick(t,new hE(`Response status code ${n}${i?`: ${i}`:""}`,n,s,c));return}}catch{}process.nextTick(t,new hE(`Response status code ${n}${i?`: ${i}`:""}`,n,s))}zH.exports={getResolveErrorBodyCallback:vpe}});var eu=f((ftt,WH)=>{var{addAbortListener:Tpe}=lt(),{RequestAbortedError:Ppe}=vt(),ZA=Symbol("kListener"),qa=Symbol("kSignal");function YH(t){t.abort?t.abort():t.onError(new Ppe)}function Dpe(t,e){if(t[qa]=null,t[ZA]=null,!!e){if(e.aborted){YH(t);return}t[qa]=e,t[ZA]=()=>{YH(t)},Tpe(t[qa],t[ZA])}}function kpe(t){t[qa]&&("removeEventListener"in t[qa]?t[qa].removeEventListener("abort",t[ZA]):t[qa].removeListener("abort",t[ZA]),t[qa]=null,t[ZA]=null)}WH.exports={addSignal:Dpe,removeSignal:kpe}});var $H=f((htt,VS)=>{"use strict";var Ope=GH(),{InvalidArgumentError:tu,RequestAbortedError:Lpe}=vt(),Xs=lt(),{getResolveErrorBodyCallback:Mpe}=JS(),{AsyncResource:Fpe}=require("async_hooks"),{addSignal:Upe,removeSignal:JH}=eu(),pE=class extends Fpe{constructor(e,r){if(!e||typeof e!="object")throw new tu("invalid opts");let{signal:n,method:i,opaque:s,body:o,onInfo:a,responseHeaders:c,throwOnError:l,highWaterMark:A}=e;try{if(typeof r!="function")throw new tu("invalid callback");if(A&&(typeof A!="number"||A<0))throw new tu("invalid highWaterMark");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new tu("signal must be an EventEmitter or EventTarget");if(i==="CONNECT")throw new tu("invalid method");if(a&&typeof a!="function")throw new tu("invalid onInfo callback");super("UNDICI_REQUEST")}catch(u){throw Xs.isStream(o)&&Xs.destroy(o.on("error",Xs.nop),u),u}this.responseHeaders=c||null,this.opaque=s||null,this.callback=r,this.res=null,this.abort=null,this.body=o,this.trailers={},this.context=null,this.onInfo=a||null,this.throwOnError=l,this.highWaterMark=A,Xs.isStream(o)&&o.on("error",u=>{this.onError(u)}),Upe(this,n)}onConnect(e,r){if(!this.callback)throw new Lpe;this.abort=e,this.context=r}onHeaders(e,r,n,i){let{callback:s,opaque:o,abort:a,context:c,responseHeaders:l,highWaterMark:A}=this,u=l==="raw"?Xs.parseRawHeaders(r):Xs.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:u});return}let h=(l==="raw"?Xs.parseHeaders(r):u)["content-type"],g=new Ope({resume:n,abort:a,contentType:h,highWaterMark:A});this.callback=null,this.res=g,s!==null&&(this.throwOnError&&e>=400?this.runInAsyncScope(Mpe,null,{callback:s,body:g,contentType:h,statusCode:e,statusMessage:i,headers:u}):this.runInAsyncScope(s,null,null,{statusCode:e,headers:u,trailers:this.trailers,opaque:o,body:g,context:c}))}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;JH(this),Xs.parseHeaders(e,this.trailers),r.push(null)}onError(e){let{res:r,callback:n,body:i,opaque:s}=this;JH(this),n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:s})})),r&&(this.res=null,queueMicrotask(()=>{Xs.destroy(r,e)})),i&&(this.body=null,Xs.destroy(i,e))}};function VH(t,e){if(e===void 0)return new Promise((r,n)=>{VH.call(this,t,(i,s)=>i?n(i):r(s))});try{this.dispatch(t,new pE(t,e))}catch(r){if(typeof e!="function")throw r;let n=t&&t.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}VS.exports=VH;VS.exports.RequestHandler=pE});var eG=f((ptt,ZH)=>{"use strict";var{finished:qpe,PassThrough:Hpe}=require("stream"),{InvalidArgumentError:ru,InvalidReturnValueError:Gpe,RequestAbortedError:jpe}=vt(),Ss=lt(),{getResolveErrorBodyCallback:zpe}=JS(),{AsyncResource:Ype}=require("async_hooks"),{addSignal:Wpe,removeSignal:KH}=eu(),$S=class extends Ype{constructor(e,r,n){if(!e||typeof e!="object")throw new ru("invalid opts");let{signal:i,method:s,opaque:o,body:a,onInfo:c,responseHeaders:l,throwOnError:A}=e;try{if(typeof n!="function")throw new ru("invalid callback");if(typeof r!="function")throw new ru("invalid factory");if(i&&typeof i.on!="function"&&typeof i.addEventListener!="function")throw new ru("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new ru("invalid method");if(c&&typeof c!="function")throw new ru("invalid onInfo callback");super("UNDICI_STREAM")}catch(u){throw Ss.isStream(a)&&Ss.destroy(a.on("error",Ss.nop),u),u}this.responseHeaders=l||null,this.opaque=o||null,this.factory=r,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=a,this.onInfo=c||null,this.throwOnError=A||!1,Ss.isStream(a)&&a.on("error",u=>{this.onError(u)}),Wpe(this,i)}onConnect(e,r){if(!this.callback)throw new jpe;this.abort=e,this.context=r}onHeaders(e,r,n,i){let{factory:s,opaque:o,context:a,callback:c,responseHeaders:l}=this,A=l==="raw"?Ss.parseRawHeaders(r):Ss.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:A});return}this.factory=null;let u;if(this.throwOnError&&e>=400){let g=(l==="raw"?Ss.parseHeaders(r):A)["content-type"];u=new Hpe,this.callback=null,this.runInAsyncScope(zpe,null,{callback:c,body:u,contentType:g,statusCode:e,statusMessage:i,headers:A})}else{if(s===null)return;if(u=this.runInAsyncScope(s,null,{statusCode:e,headers:A,opaque:o,context:a}),!u||typeof u.write!="function"||typeof u.end!="function"||typeof u.on!="function")throw new Gpe("expected Writable");qpe(u,{readable:!1},h=>{let{callback:g,res:E,opaque:C,trailers:I,abort:R}=this;this.res=null,(h||!E.readable)&&Ss.destroy(E,h),this.callback=null,this.runInAsyncScope(g,null,h||null,{opaque:C,trailers:I}),h&&R()})}return u.on("drain",n),this.res=u,(u.writableNeedDrain!==void 0?u.writableNeedDrain:u._writableState&&u._writableState.needDrain)!==!0}onData(e){let{res:r}=this;return r?r.write(e):!0}onComplete(e){let{res:r}=this;KH(this),r&&(this.trailers=Ss.parseHeaders(e),r.end())}onError(e){let{res:r,callback:n,opaque:i,body:s}=this;KH(this),this.factory=null,r?(this.res=null,Ss.destroy(r,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:i})})),s&&(this.body=null,Ss.destroy(s,e))}};function XH(t,e,r){if(r===void 0)return new Promise((n,i)=>{XH.call(this,t,e,(s,o)=>s?i(s):n(o))});try{this.dispatch(t,new $S(t,e,r))}catch(n){if(typeof r!="function")throw n;let i=t&&t.opaque;queueMicrotask(()=>r(n,{opaque:i}))}}ZH.exports=XH});var nG=f((gtt,rG)=>{"use strict";var{Readable:tG,Duplex:Jpe,PassThrough:Vpe}=require("stream"),{InvalidArgumentError:Gh,InvalidReturnValueError:$pe,RequestAbortedError:gE}=vt(),Xi=lt(),{AsyncResource:Kpe}=require("async_hooks"),{addSignal:Xpe,removeSignal:Zpe}=eu(),ege=require("assert"),nu=Symbol("resume"),KS=class extends tG{constructor(){super({autoDestroy:!0}),this[nu]=null}_read(){let{[nu]:e}=this;e&&(this[nu]=null,e())}_destroy(e,r){this._read(),r(e)}},XS=class extends tG{constructor(e){super({autoDestroy:!0}),this[nu]=e}_read(){this[nu]()}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new gE),r(e)}},ZS=class extends Kpe{constructor(e,r){if(!e||typeof e!="object")throw new Gh("invalid opts");if(typeof r!="function")throw new Gh("invalid handler");let{signal:n,method:i,opaque:s,onInfo:o,responseHeaders:a}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new Gh("signal must be an EventEmitter or EventTarget");if(i==="CONNECT")throw new Gh("invalid method");if(o&&typeof o!="function")throw new Gh("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=s||null,this.responseHeaders=a||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=o||null,this.req=new KS().on("error",Xi.nop),this.ret=new Jpe({readableObjectMode:e.objectMode,autoDestroy:!0,read:()=>{let{body:c}=this;c&&c.resume&&c.resume()},write:(c,l,A)=>{let{req:u}=this;u.push(c,l)||u._readableState.destroyed?A():u[nu]=A},destroy:(c,l)=>{let{body:A,req:u,res:d,ret:h,abort:g}=this;!c&&!h._readableState.endEmitted&&(c=new gE),g&&c&&g(),Xi.destroy(A,c),Xi.destroy(u,c),Xi.destroy(d,c),Zpe(this),l(c)}}).on("prefinish",()=>{let{req:c}=this;c.push(null)}),this.res=null,Xpe(this,n)}onConnect(e,r){let{ret:n,res:i}=this;if(ege(!i,"pipeline cannot be retried"),n.destroyed)throw new gE;this.abort=e,this.context=r}onHeaders(e,r,n){let{opaque:i,handler:s,context:o}=this;if(e<200){if(this.onInfo){let c=this.responseHeaders==="raw"?Xi.parseRawHeaders(r):Xi.parseHeaders(r);this.onInfo({statusCode:e,headers:c})}return}this.res=new XS(n);let a;try{this.handler=null;let c=this.responseHeaders==="raw"?Xi.parseRawHeaders(r):Xi.parseHeaders(r);a=this.runInAsyncScope(s,null,{statusCode:e,headers:c,opaque:i,body:this.res,context:o})}catch(c){throw this.res.on("error",Xi.nop),c}if(!a||typeof a.on!="function")throw new $pe("expected Readable");a.on("data",c=>{let{ret:l,body:A}=this;!l.push(c)&&A.pause&&A.pause()}).on("error",c=>{let{ret:l}=this;Xi.destroy(l,c)}).on("end",()=>{let{ret:c}=this;c.push(null)}).on("close",()=>{let{ret:c}=this;c._readableState.ended||Xi.destroy(c,new gE)}),this.body=a}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;r.push(null)}onError(e){let{ret:r}=this;this.handler=null,Xi.destroy(r,e)}};function tge(t,e){try{let r=new ZS(t,e);return this.dispatch({...t,body:r.req},r),r.ret}catch(r){return new Vpe().destroy(r)}}rG.exports=tge});var cG=f((mtt,aG)=>{"use strict";var{InvalidArgumentError:eN,RequestAbortedError:rge,SocketError:nge}=vt(),{AsyncResource:ige}=require("async_hooks"),iG=lt(),{addSignal:sge,removeSignal:sG}=eu(),oge=require("assert"),tN=class extends ige{constructor(e,r){if(!e||typeof e!="object")throw new eN("invalid opts");if(typeof r!="function")throw new eN("invalid callback");let{signal:n,opaque:i,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new eN("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=s||null,this.opaque=i||null,this.callback=r,this.abort=null,this.context=null,sge(this,n)}onConnect(e,r){if(!this.callback)throw new rge;this.abort=e,this.context=null}onHeaders(){throw new nge("bad upgrade",null)}onUpgrade(e,r,n){let{callback:i,opaque:s,context:o}=this;oge.strictEqual(e,101),sG(this),this.callback=null;let a=this.responseHeaders==="raw"?iG.parseRawHeaders(r):iG.parseHeaders(r);this.runInAsyncScope(i,null,null,{headers:a,socket:n,opaque:s,context:o})}onError(e){let{callback:r,opaque:n}=this;sG(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function oG(t,e){if(e===void 0)return new Promise((r,n)=>{oG.call(this,t,(i,s)=>i?n(i):r(s))});try{let r=new tN(t,e);this.dispatch({...t,method:t.method||"GET",upgrade:t.protocol||"Websocket"},r)}catch(r){if(typeof e!="function")throw r;let n=t&&t.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}aG.exports=oG});var fG=f((ytt,dG)=>{"use strict";var{AsyncResource:age}=require("async_hooks"),{InvalidArgumentError:rN,RequestAbortedError:cge,SocketError:lge}=vt(),lG=lt(),{addSignal:Age,removeSignal:AG}=eu(),nN=class extends age{constructor(e,r){if(!e||typeof e!="object")throw new rN("invalid opts");if(typeof r!="function")throw new rN("invalid callback");let{signal:n,opaque:i,responseHeaders:s}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new rN("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=i||null,this.responseHeaders=s||null,this.callback=r,this.abort=null,Age(this,n)}onConnect(e,r){if(!this.callback)throw new cge;this.abort=e,this.context=r}onHeaders(){throw new lge("bad connect",null)}onUpgrade(e,r,n){let{callback:i,opaque:s,context:o}=this;AG(this),this.callback=null;let a=r;a!=null&&(a=this.responseHeaders==="raw"?lG.parseRawHeaders(r):lG.parseHeaders(r)),this.runInAsyncScope(i,null,null,{statusCode:e,headers:a,socket:n,opaque:s,context:o})}onError(e){let{callback:r,opaque:n}=this;AG(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function uG(t,e){if(e===void 0)return new Promise((r,n)=>{uG.call(this,t,(i,s)=>i?n(i):r(s))});try{let r=new nN(t,e);this.dispatch({...t,method:"CONNECT"},r)}catch(r){if(typeof e!="function")throw r;let n=t&&t.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}dG.exports=uG});var hG=f((Ett,iu)=>{"use strict";iu.exports.request=$H();iu.exports.stream=eG();iu.exports.pipeline=nG();iu.exports.upgrade=cG();iu.exports.connect=fG()});var sN=f((Ctt,pG)=>{"use strict";var{UndiciError:uge}=vt(),iN=class t extends uge{constructor(e){super(e),Error.captureStackTrace(this,t),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}};pG.exports={MockNotMatchedError:iN}});var su=f((Itt,gG)=>{"use strict";gG.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var jh=f((Btt,NG)=>{"use strict";var{MockNotMatchedError:pl}=sN(),{kDispatches:mE,kMockAgent:dge,kOriginalDispatch:fge,kOrigin:hge,kGetNetConnect:pge}=su(),{buildURL:gge,nop:mge}=lt(),{STATUS_CODES:yge}=require("http"),{types:{isPromise:Ege}}=require("util");function $o(t,e){return typeof t=="string"?t===e:t instanceof RegExp?t.test(e):typeof t=="function"?t(e)===!0:!1}function yG(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLocaleLowerCase(),r]))}function EG(t,e){if(Array.isArray(t)){for(let r=0;r"u")return!0;if(typeof e!="object"||typeof t.headers!="object")return!1;for(let[r,n]of Object.entries(t.headers)){let i=EG(e,r);if(!$o(n,i))return!1}return!0}function mG(t){if(typeof t!="string")return t;let e=t.split("?");if(e.length!==2)return t;let r=new URLSearchParams(e.pop());return r.sort(),[...e,r.toString()].join("?")}function Cge(t,{path:e,method:r,body:n,headers:i}){let s=$o(t.path,e),o=$o(t.method,r),a=typeof t.body<"u"?$o(t.body,n):!0,c=IG(t,i);return s&&o&&a&&c}function BG(t){return Buffer.isBuffer(t)?t:typeof t=="object"?JSON.stringify(t):t.toString()}function bG(t,e){let r=e.query?gge(e.path,e.query):e.path,n=typeof r=="string"?mG(r):r,i=t.filter(({consumed:s})=>!s).filter(({path:s})=>$o(mG(s),n));if(i.length===0)throw new pl(`Mock dispatch not matched for path '${n}'`);if(i=i.filter(({method:s})=>$o(s,e.method)),i.length===0)throw new pl(`Mock dispatch not matched for method '${e.method}'`);if(i=i.filter(({body:s})=>typeof s<"u"?$o(s,e.body):!0),i.length===0)throw new pl(`Mock dispatch not matched for body '${e.body}'`);if(i=i.filter(s=>IG(s,e.headers)),i.length===0)throw new pl(`Mock dispatch not matched for headers '${typeof e.headers=="object"?JSON.stringify(e.headers):e.headers}'`);return i[0]}function Ige(t,e,r){let n={timesInvoked:0,times:1,persist:!1,consumed:!1},i=typeof r=="function"?{callback:r}:{...r},s={...n,...e,pending:!0,data:{error:null,...i}};return t.push(s),s}function oN(t,e){let r=t.findIndex(n=>n.consumed?Cge(n,e):!1);r!==-1&&t.splice(r,1)}function wG(t){let{path:e,method:r,body:n,headers:i,query:s}=t;return{path:e,method:r,body:n,headers:i,query:s}}function aN(t){return Object.entries(t).reduce((e,[r,n])=>[...e,Buffer.from(`${r}`),Array.isArray(n)?n.map(i=>Buffer.from(`${i}`)):Buffer.from(`${n}`)],[])}function QG(t){return yge[t]||"unknown"}async function Bge(t){let e=[];for await(let r of t)e.push(r);return Buffer.concat(e).toString("utf8")}function _G(t,e){let r=wG(t),n=bG(this[mE],r);n.timesInvoked++,n.data.callback&&(n.data={...n.data,...n.data.callback(t)});let{data:{statusCode:i,data:s,headers:o,trailers:a,error:c},delay:l,persist:A}=n,{timesInvoked:u,times:d}=n;if(n.consumed=!A&&u>=d,n.pending=u0?setTimeout(()=>{h(this[mE])},l):h(this[mE]);function h(E,C=s){let I=Array.isArray(t.headers)?CG(t.headers):t.headers,R=typeof C=="function"?C({...t,headers:I}):C;if(Ege(R)){R.then(se=>h(E,se));return}let P=BG(R),M=aN(o),ee=aN(a);e.abort=mge,e.onHeaders(i,M,g,QG(i)),e.onData(Buffer.from(P)),e.onComplete(ee),oN(E,r)}function g(){}return!0}function bge(){let t=this[dge],e=this[hge],r=this[fge];return function(i,s){if(t.isMockActive)try{_G.call(this,i,s)}catch(o){if(o instanceof pl){let a=t[pge]();if(a===!1)throw new pl(`${o.message}: subsequent request to origin ${e} was not allowed (net.connect disabled)`);if(SG(a,e))r.call(this,i,s);else throw new pl(`${o.message}: subsequent request to origin ${e} was not allowed (net.connect is not enabled for this origin)`)}else throw o}else r.call(this,i,s)}}function SG(t,e){let r=new URL(e);return t===!0?!0:!!(Array.isArray(t)&&t.some(n=>$o(n,r.host)))}function wge(t){if(t){let{agent:e,...r}=t;return r}}NG.exports={getResponseData:BG,getMockDispatch:bG,addMockDispatch:Ige,deleteMockDispatch:oN,buildKey:wG,generateKeyValues:aN,matchValue:$o,getResponse:Bge,getStatusText:QG,mockDispatch:_G,buildMockDispatch:bge,checkNetConnect:SG,buildMockOptions:wge,getHeaderByName:EG}});var hN=f((btt,fN)=>{"use strict";var{getResponseData:Qge,buildKey:_ge,addMockDispatch:cN}=jh(),{kDispatches:yE,kDispatchKey:EE,kDefaultHeaders:lN,kDefaultTrailers:AN,kContentLength:uN,kMockDispatch:CE}=su(),{InvalidArgumentError:Ns}=vt(),{buildURL:Sge}=lt(),ou=class{constructor(e){this[CE]=e}delay(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Ns("waitInMs must be a valid integer > 0");return this[CE].delay=e,this}persist(){return this[CE].persist=!0,this}times(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Ns("repeatTimes must be a valid integer > 0");return this[CE].times=e,this}},dN=class{constructor(e,r){if(typeof e!="object")throw new Ns("opts must be an object");if(typeof e.path>"u")throw new Ns("opts.path must be defined");if(typeof e.method>"u"&&(e.method="GET"),typeof e.path=="string")if(e.query)e.path=Sge(e.path,e.query);else{let n=new URL(e.path,"data://");e.path=n.pathname+n.search}typeof e.method=="string"&&(e.method=e.method.toUpperCase()),this[EE]=_ge(e),this[yE]=r,this[lN]={},this[AN]={},this[uN]=!1}createMockScopeDispatchData(e,r,n={}){let i=Qge(r),s=this[uN]?{"content-length":i.length}:{},o={...this[lN],...s,...n.headers},a={...this[AN],...n.trailers};return{statusCode:e,data:r,headers:o,trailers:a}}validateReplyParameters(e,r,n){if(typeof e>"u")throw new Ns("statusCode must be defined");if(typeof r>"u")throw new Ns("data must be defined");if(typeof n!="object")throw new Ns("responseOptions must be an object")}reply(e){if(typeof e=="function"){let a=l=>{let A=e(l);if(typeof A!="object")throw new Ns("reply options callback must return an object");let{statusCode:u,data:d="",responseOptions:h={}}=A;return this.validateReplyParameters(u,d,h),{...this.createMockScopeDispatchData(u,d,h)}},c=cN(this[yE],this[EE],a);return new ou(c)}let[r,n="",i={}]=[...arguments];this.validateReplyParameters(r,n,i);let s=this.createMockScopeDispatchData(r,n,i),o=cN(this[yE],this[EE],s);return new ou(o)}replyWithError(e){if(typeof e>"u")throw new Ns("error must be defined");let r=cN(this[yE],this[EE],{error:e});return new ou(r)}defaultReplyHeaders(e){if(typeof e>"u")throw new Ns("headers must be defined");return this[lN]=e,this}defaultReplyTrailers(e){if(typeof e>"u")throw new Ns("trailers must be defined");return this[AN]=e,this}replyContentLength(){return this[uN]=!0,this}};fN.exports.MockInterceptor=dN;fN.exports.MockScope=ou});var mN=f((wtt,kG)=>{"use strict";var{promisify:Nge}=require("util"),Rge=Mh(),{buildMockDispatch:xge}=jh(),{kDispatches:RG,kMockAgent:xG,kClose:vG,kOriginalClose:TG,kOrigin:PG,kOriginalDispatch:vge,kConnected:pN}=su(),{MockInterceptor:Tge}=hN(),DG=Ht(),{InvalidArgumentError:Pge}=vt(),gN=class extends Rge{constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new Pge("Argument opts.agent must implement Agent");this[xG]=r.agent,this[PG]=e,this[RG]=[],this[pN]=1,this[vge]=this.dispatch,this[TG]=this.close.bind(this),this.dispatch=xge.call(this),this.close=this[vG]}get[DG.kConnected](){return this[pN]}intercept(e){return new Tge(e,this[RG])}async[vG](){await Nge(this[TG])(),this[pN]=0,this[xG][DG.kClients].delete(this[PG])}};kG.exports=gN});var CN=f((Qtt,HG)=>{"use strict";var{promisify:Dge}=require("util"),kge=XA(),{buildMockDispatch:Oge}=jh(),{kDispatches:OG,kMockAgent:LG,kClose:MG,kOriginalClose:FG,kOrigin:UG,kOriginalDispatch:Lge,kConnected:yN}=su(),{MockInterceptor:Mge}=hN(),qG=Ht(),{InvalidArgumentError:Fge}=vt(),EN=class extends kge{constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new Fge("Argument opts.agent must implement Agent");this[LG]=r.agent,this[UG]=e,this[OG]=[],this[yN]=1,this[Lge]=this.dispatch,this[FG]=this.close.bind(this),this.dispatch=Oge.call(this),this.close=this[MG]}get[qG.kConnected](){return this[yN]}intercept(e){return new Mge(e,this[OG])}async[MG](){await Dge(this[FG])(),this[yN]=0,this[LG][qG.kClients].delete(this[UG])}};HG.exports=EN});var jG=f((Stt,GG)=>{"use strict";var Uge={pronoun:"it",is:"is",was:"was",this:"this"},qge={pronoun:"they",is:"are",was:"were",this:"these"};GG.exports=class{constructor(e,r){this.singular=e,this.plural=r}pluralize(e){let r=e===1,n=r?Uge:qge,i=r?this.singular:this.plural;return{...n,count:e,noun:i}}}});var YG=f((Rtt,zG)=>{"use strict";var{Transform:Hge}=require("stream"),{Console:Gge}=require("console");zG.exports=class{constructor({disableColors:e}={}){this.transform=new Hge({transform(r,n,i){i(null,r)}}),this.logger=new Gge({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let r=e.map(({method:n,path:i,data:{statusCode:s},persist:o,times:a,timesInvoked:c,origin:l})=>({Method:n,Origin:l,Path:i,"Status code":s,Persistent:o?"\u2705":"\u274C",Invocations:c,Remaining:o?1/0:a-c}));return this.logger.table(r),this.transform.read().toString()}}});var $G=f((xtt,VG)=>{"use strict";var{kClients:gl}=Ht(),jge=Hh(),{kAgent:IN,kMockAgentSet:IE,kMockAgentGet:WG,kDispatches:BN,kIsMockActive:BE,kNetConnect:ml,kGetNetConnect:zge,kOptions:bE,kFactory:wE}=su(),Yge=mN(),Wge=CN(),{matchValue:Jge,buildMockOptions:Vge}=jh(),{InvalidArgumentError:JG,UndiciError:$ge}=vt(),Kge=Gy(),Xge=jG(),Zge=YG(),bN=class{constructor(e){this.value=e}deref(){return this.value}},wN=class extends Kge{constructor(e){if(super(e),this[ml]=!0,this[BE]=!0,e&&e.agent&&typeof e.agent.dispatch!="function")throw new JG("Argument opts.agent must implement Agent");let r=e&&e.agent?e.agent:new jge(e);this[IN]=r,this[gl]=r[gl],this[bE]=Vge(e)}get(e){let r=this[WG](e);return r||(r=this[wE](e),this[IE](e,r)),r}dispatch(e,r){return this.get(e.origin),this[IN].dispatch(e,r)}async close(){await this[IN].close(),this[gl].clear()}deactivate(){this[BE]=!1}activate(){this[BE]=!0}enableNetConnect(e){if(typeof e=="string"||typeof e=="function"||e instanceof RegExp)Array.isArray(this[ml])?this[ml].push(e):this[ml]=[e];else if(typeof e>"u")this[ml]=!0;else throw new JG("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[ml]=!1}get isMockActive(){return this[BE]}[IE](e,r){this[gl].set(e,new bN(r))}[wE](e){let r=Object.assign({agent:this},this[bE]);return this[bE]&&this[bE].connections===1?new Yge(e,r):new Wge(e,r)}[WG](e){let r=this[gl].get(e);if(r)return r.deref();if(typeof e!="string"){let n=this[wE]("http://localhost:9999");return this[IE](e,n),n}for(let[n,i]of Array.from(this[gl])){let s=i.deref();if(s&&typeof n!="string"&&Jge(n,e)){let o=this[wE](e);return this[IE](e,o),o[BN]=s[BN],o}}}[zge](){return this[ml]}pendingInterceptors(){let e=this[gl];return Array.from(e.entries()).flatMap(([r,n])=>n.deref()[BN].map(i=>({...i,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new Zge}={}){let r=this.pendingInterceptors();if(r.length===0)return;let n=new Xge("interceptor","interceptors").pluralize(r.length);throw new $ge(`
+${n.count} ${n.noun} ${n.is} pending:
${e.format(r)}
-`.trim())}};gM.exports=$w});var wM=A((Est,BM)=>{"use strict";var{kProxy:Oye,kClose:Lye,kDestroy:Fye,kInterceptors:Mye}=zt(),{URL:EM}=require("url"),CM=qh(),Uye=Uu(),qye=vh(),{InvalidArgumentError:Vh,RequestAbortedError:Hye}=Dt(),bM=Nh(),jh=Symbol("proxy agent"),Dy=Symbol("proxy client"),zh=Symbol("proxy headers"),Kw=Symbol("request tls settings"),Gye=Symbol("proxy tls settings"),IM=Symbol("connect endpoint function");function jye(t){return t==="https:"?443:80}function zye(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new Vh("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}function Vye(t,e){return new Uye(t,e)}var Xw=class extends qye{constructor(e){if(super(e),this[Oye]=zye(e),this[jh]=new CM(e),this[Mye]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new Vh("Proxy opts.uri is mandatory");let{clientFactory:r=Vye}=e;if(typeof r!="function")throw new Vh("Proxy opts.clientFactory must be a function.");this[Kw]=e.requestTls,this[Gye]=e.proxyTls,this[zh]=e.headers||{};let i=new EM(e.uri),{origin:n,port:s,host:a,username:o,password:l}=i;if(e.auth&&e.token)throw new Vh("opts.auth cannot be used in combination with opts.token");e.auth?this[zh]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[zh]["proxy-authorization"]=e.token:o&&l&&(this[zh]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(o)}:${decodeURIComponent(l)}`).toString("base64")}`);let c=bM({...e.proxyTls});this[IM]=bM({...e.requestTls}),this[Dy]=r(i,{connect:c}),this[jh]=new CM({...e,connect:async(d,u)=>{let p=d.host;d.port||(p+=`:${jye(d.protocol)}`);try{let{socket:f,statusCode:h}=await this[Dy].connect({origin:n,port:s,path:p,signal:d.signal,headers:{...this[zh],host:a}});if(h!==200&&(f.on("error",()=>{}).destroy(),u(new Hye(`Proxy response (${h}) !== 200 when HTTP Tunneling`))),d.protocol!=="https:"){u(null,f);return}let E;this[Kw]?E=this[Kw].servername:E=d.servername,this[IM]({...d,servername:E,httpSocket:f},u)}catch(f){u(f)}}})}dispatch(e,r){let{host:i}=new EM(e.origin),n=Yye(e.headers);return Wye(n),this[jh].dispatch({...e,headers:{...n,host:i}},r)}async[Lye](){await this[jh].close(),await this[Dy].close()}async[Fye](){await this[jh].destroy(),await this[Dy].destroy()}};function Yye(t){if(Array.isArray(t)){let e={};for(let r=0;rr.toLowerCase()==="proxy-authorization"))throw new Vh("Proxy-Authorization should be sent in ProxyAgent constructor")}BM.exports=Xw});var NM=A((Cst,vM)=>{var rd=require("assert"),{kRetryHandlerDefaultRetry:QM}=zt(),{RequestRetryError:Py}=Dt(),{isDisturbed:SM,parseHeaders:Jye,parseRangeHeader:_M}=ut();function $ye(t){let e=Date.now();return new Date(t).getTime()-e}var Zw=class t{constructor(e,r){let{retryOptions:i,...n}=e,{retry:s,maxRetries:a,maxTimeout:o,minTimeout:l,timeoutFactor:c,methods:d,errorCodes:u,retryAfter:p,statusCodes:f}=i??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts=n,this.abort=null,this.aborted=!1,this.retryOpts={retry:s??t[QM],retryAfter:p??!0,maxTimeout:o??30*1e3,timeout:l??500,timeoutFactor:c??2,maxRetries:a??5,methods:d??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:f??[500,502,503,504,429],errorCodes:u??["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(h=>{this.aborted=!0,this.abort?this.abort(h):this.reason=h})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,r,i){this.handler.onUpgrade&&this.handler.onUpgrade(e,r,i)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[QM](e,{state:r,opts:i},n){let{statusCode:s,code:a,headers:o}=e,{method:l,retryOptions:c}=i,{maxRetries:d,timeout:u,maxTimeout:p,timeoutFactor:f,statusCodes:h,errorCodes:E,methods:C}=c,{counter:b,currentTimeout:N}=r;if(N=N!=null&&N>0?N:u,a&&a!=="UND_ERR_REQ_RETRY"&&a!=="UND_ERR_SOCKET"&&!E.includes(a)){n(e);return}if(Array.isArray(C)&&!C.includes(l)){n(e);return}if(s!=null&&Array.isArray(h)&&!h.includes(s)){n(e);return}if(b>d){n(e);return}let D=o!=null&&o["retry-after"];D&&(D=Number(D),D=isNaN(D)?$ye(D):D*1e3);let O=D>0?Math.min(D,p):Math.min(N*f**b,p);r.currentTimeout=O,setTimeout(()=>n(null),O)}onHeaders(e,r,i,n){let s=Jye(r);if(this.retryCount+=1,e>=300)return this.abort(new Py("Request failed",e,{headers:s,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,e!==206)return!0;let o=_M(s["content-range"]);if(!o)return this.abort(new Py("Content-Range mismatch",e,{headers:s,count:this.retryCount})),!1;if(this.etag!=null&&this.etag!==s.etag)return this.abort(new Py("ETag mismatch",e,{headers:s,count:this.retryCount})),!1;let{start:l,size:c,end:d=c}=o;return rd(this.start===l,"content-range mismatch"),rd(this.end==null||this.end===d,"content-range mismatch"),this.resume=i,!0}if(this.end==null){if(e===206){let o=_M(s["content-range"]);if(o==null)return this.handler.onHeaders(e,r,i,n);let{start:l,size:c,end:d=c}=o;rd(l!=null&&Number.isFinite(l)&&this.start!==l,"content-range mismatch"),rd(Number.isFinite(l)),rd(d!=null&&Number.isFinite(d)&&this.end!==d,"invalid content-length"),this.start=l,this.end=d}if(this.end==null){let o=s["content-length"];this.end=o!=null?Number(o):null}return rd(Number.isFinite(this.start)),rd(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=i,this.etag=s.etag!=null?s.etag:null,this.handler.onHeaders(e,r,i,n)}let a=new Py("Request failed",e,{headers:s,count:this.retryCount});return this.abort(a),!1}onData(e){return this.start+=e.length,this.handler.onData(e)}onComplete(e){return this.retryCount=0,this.handler.onComplete(e)}onError(e){if(this.aborted||SM(this.opts.body))return this.handler.onError(e);this.retryOpts.retry(e,{state:{counter:this.retryCount++,currentTimeout:this.retryAfter},opts:{retryOptions:this.retryOpts,...this.opts}},r.bind(this));function r(i){if(i!=null||this.aborted||SM(this.opts.body))return this.handler.onError(i);this.start!==0&&(this.opts={...this.opts,headers:{...this.opts.headers,range:`bytes=${this.start}-${this.end??""}`}});try{this.dispatch(this.opts,this)}catch(n){this.handler.onError(n)}}}};vM.exports=Zw});var Ju=A((bst,DM)=>{"use strict";var xM=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Kye}=Dt(),Xye=qh();TM()===void 0&&RM(new Xye);function RM(t){if(!t||typeof t.dispatch!="function")throw new Kye("Argument agent must implement Agent");Object.defineProperty(globalThis,xM,{value:t,writable:!0,enumerable:!1,configurable:!1})}function TM(){return globalThis[xM]}DM.exports={setGlobalDispatcher:RM,getGlobalDispatcher:TM}});var kM=A((Bst,PM)=>{"use strict";PM.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 id=A((wst,UM)=>{"use strict";var{kHeadersList:bn,kConstruct:Zye}=zt(),{kGuard:wa}=mo(),{kEnumerableProperty:Ba}=ut(),{makeIterator:$u,isValidHeaderName:Yh,isValidHeaderValue:LM}=As(),e2e=require("util"),{webidl:$e}=Xi(),t2e=require("assert"),Cn=Symbol("headers map"),Ei=Symbol("headers map sorted");function OM(t){return t===10||t===13||t===9||t===32}function FM(t){let e=0,r=t.length;for(;r>e&&OM(t.charCodeAt(r-1));)--r;for(;r>e&&OM(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}function MM(t,e){if(Array.isArray(e))for(let r=0;r>","record"]})}function e3(t,e,r){if(r=FM(r),Yh(e)){if(!LM(r))throw $e.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw $e.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(t[wa]==="immutable")throw new TypeError("immutable");return t[wa],t[bn].append(e,r)}var ky=class t{cookies=null;constructor(e){e instanceof t?(this[Cn]=new Map(e[Cn]),this[Ei]=e[Ei],this.cookies=e.cookies===null?null:[...e.cookies]):(this[Cn]=new Map(e),this[Ei]=null)}contains(e){return e=e.toLowerCase(),this[Cn].has(e)}clear(){this[Cn].clear(),this[Ei]=null,this.cookies=null}append(e,r){this[Ei]=null;let i=e.toLowerCase(),n=this[Cn].get(i);if(n){let s=i==="cookie"?"; ":", ";this[Cn].set(i,{name:n.name,value:`${n.value}${s}${r}`})}else this[Cn].set(i,{name:e,value:r});i==="set-cookie"&&(this.cookies??=[],this.cookies.push(r))}set(e,r){this[Ei]=null;let i=e.toLowerCase();i==="set-cookie"&&(this.cookies=[r]),this[Cn].set(i,{name:e,value:r})}delete(e){this[Ei]=null,e=e.toLowerCase(),e==="set-cookie"&&(this.cookies=null),this[Cn].delete(e)}get(e){let r=this[Cn].get(e.toLowerCase());return r===void 0?null:r.value}*[Symbol.iterator](){for(let[e,{value:r}]of this[Cn])yield[e,r]}get entries(){let e={};if(this[Cn].size)for(let{name:r,value:i}of this[Cn].values())e[r]=i;return e}},Ku=class t{constructor(e=void 0){e!==Zye&&(this[bn]=new ky,this[wa]="none",e!==void 0&&(e=$e.converters.HeadersInit(e),MM(this,e)))}append(e,r){return $e.brandCheck(this,t),$e.argumentLengthCheck(arguments,2,{header:"Headers.append"}),e=$e.converters.ByteString(e),r=$e.converters.ByteString(r),e3(this,e,r)}delete(e){if($e.brandCheck(this,t),$e.argumentLengthCheck(arguments,1,{header:"Headers.delete"}),e=$e.converters.ByteString(e),!Yh(e))throw $e.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"});if(this[wa]==="immutable")throw new TypeError("immutable");this[wa],this[bn].contains(e)&&this[bn].delete(e)}get(e){if($e.brandCheck(this,t),$e.argumentLengthCheck(arguments,1,{header:"Headers.get"}),e=$e.converters.ByteString(e),!Yh(e))throw $e.errors.invalidArgument({prefix:"Headers.get",value:e,type:"header name"});return this[bn].get(e)}has(e){if($e.brandCheck(this,t),$e.argumentLengthCheck(arguments,1,{header:"Headers.has"}),e=$e.converters.ByteString(e),!Yh(e))throw $e.errors.invalidArgument({prefix:"Headers.has",value:e,type:"header name"});return this[bn].contains(e)}set(e,r){if($e.brandCheck(this,t),$e.argumentLengthCheck(arguments,2,{header:"Headers.set"}),e=$e.converters.ByteString(e),r=$e.converters.ByteString(r),r=FM(r),Yh(e)){if(!LM(r))throw $e.errors.invalidArgument({prefix:"Headers.set",value:r,type:"header value"})}else throw $e.errors.invalidArgument({prefix:"Headers.set",value:e,type:"header name"});if(this[wa]==="immutable")throw new TypeError("immutable");this[wa],this[bn].set(e,r)}getSetCookie(){$e.brandCheck(this,t);let e=this[bn].cookies;return e?[...e]:[]}get[Ei](){if(this[bn][Ei])return this[bn][Ei];let e=[],r=[...this[bn]].sort((n,s)=>n[0]e,"Headers","key")}return $u(()=>[...this[Ei].values()],"Headers","key")}values(){if($e.brandCheck(this,t),this[wa]==="immutable"){let e=this[Ei];return $u(()=>e,"Headers","value")}return $u(()=>[...this[Ei].values()],"Headers","value")}entries(){if($e.brandCheck(this,t),this[wa]==="immutable"){let e=this[Ei];return $u(()=>e,"Headers","key+value")}return $u(()=>[...this[Ei].values()],"Headers","key+value")}forEach(e,r=globalThis){if($e.brandCheck(this,t),$e.argumentLengthCheck(arguments,1,{header:"Headers.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");for(let[i,n]of this)e.apply(r,[n,i,this])}[Symbol.for("nodejs.util.inspect.custom")](){return $e.brandCheck(this,t),this[bn]}};Ku.prototype[Symbol.iterator]=Ku.prototype.entries;Object.defineProperties(Ku.prototype,{append:Ba,delete:Ba,get:Ba,has:Ba,set:Ba,getSetCookie:Ba,keys:Ba,values:Ba,entries:Ba,forEach:Ba,[Symbol.iterator]:{enumerable:!1},[Symbol.toStringTag]:{value:"Headers",configurable:!0},[e2e.inspect.custom]:{enumerable:!1}});$e.converters.HeadersInit=function(t){if($e.util.Type(t)==="Object")return t[Symbol.iterator]?$e.converters["sequence>"](t):$e.converters["record"](t);throw $e.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};UM.exports={fill:MM,Headers:Ku,HeadersList:ky}});var My=A((Qst,WM)=>{"use strict";var{Headers:r2e,HeadersList:qM,fill:i2e}=id(),{extractBody:HM,cloneBody:n2e,mixinBody:s2e}=Qh(),i3=ut(),{kEnumerableProperty:Wn}=i3,{isValidReasonPhrase:a2e,isCancelled:o2e,isAborted:l2e,isBlobLike:c2e,serializeJavascriptValueToJSONString:d2e,isErrorLike:u2e,isomorphicEncode:A2e}=As(),{redirectStatusSet:p2e,nullBodyStatus:f2e,DOMException:GM}=ul(),{kState:ir,kHeaders:Kr,kGuard:Xu,kRealm:Yn}=mo(),{webidl:Ye}=Xi(),{FormData:h2e}=W0(),{getGlobalOrigin:m2e}=_u(),{URLSerializer:jM}=Ws(),{kHeadersList:t3,kConstruct:g2e}=zt(),n3=require("assert"),{types:r3}=require("util"),VM=globalThis.ReadableStream||require("stream/web").ReadableStream,y2e=new TextEncoder("utf-8"),Zu=class t{static error(){let e={settingsObject:{}},r=new t;return r[ir]=Ly(),r[Yn]=e,r[Kr][t3]=r[ir].headersList,r[Kr][Xu]="immutable",r[Kr][Yn]=e,r}static json(e,r={}){Ye.argumentLengthCheck(arguments,1,{header:"Response.json"}),r!==null&&(r=Ye.converters.ResponseInit(r));let i=y2e.encode(d2e(e)),n=HM(i),s={settingsObject:{}},a=new t;return a[Yn]=s,a[Kr][Xu]="response",a[Kr][Yn]=s,zM(a,r,{body:n[0],type:"application/json"}),a}static redirect(e,r=302){let i={settingsObject:{}};Ye.argumentLengthCheck(arguments,1,{header:"Response.redirect"}),e=Ye.converters.USVString(e),r=Ye.converters["unsigned short"](r);let n;try{n=new URL(e,m2e())}catch(o){throw Object.assign(new TypeError("Failed to parse URL from "+e),{cause:o})}if(!p2e.has(r))throw new RangeError("Invalid status code "+r);let s=new t;s[Yn]=i,s[Kr][Xu]="immutable",s[Kr][Yn]=i,s[ir].status=r;let a=A2e(jM(n));return s[ir].headersList.append("location",a),s}constructor(e=null,r={}){e!==null&&(e=Ye.converters.BodyInit(e)),r=Ye.converters.ResponseInit(r),this[Yn]={settingsObject:{}},this[ir]=Fy({}),this[Kr]=new r2e(g2e),this[Kr][Xu]="response",this[Kr][t3]=this[ir].headersList,this[Kr][Yn]=this[Yn];let i=null;if(e!=null){let[n,s]=HM(e);i={body:n,type:s}}zM(this,r,i)}get type(){return Ye.brandCheck(this,t),this[ir].type}get url(){Ye.brandCheck(this,t);let e=this[ir].urlList,r=e[e.length-1]??null;return r===null?"":jM(r,!0)}get redirected(){return Ye.brandCheck(this,t),this[ir].urlList.length>1}get status(){return Ye.brandCheck(this,t),this[ir].status}get ok(){return Ye.brandCheck(this,t),this[ir].status>=200&&this[ir].status<=299}get statusText(){return Ye.brandCheck(this,t),this[ir].statusText}get headers(){return Ye.brandCheck(this,t),this[Kr]}get body(){return Ye.brandCheck(this,t),this[ir].body?this[ir].body.stream:null}get bodyUsed(){return Ye.brandCheck(this,t),!!this[ir].body&&i3.isDisturbed(this[ir].body.stream)}clone(){if(Ye.brandCheck(this,t),this.bodyUsed||this.body&&this.body.locked)throw Ye.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let e=s3(this[ir]),r=new t;return r[ir]=e,r[Yn]=this[Yn],r[Kr][t3]=e.headersList,r[Kr][Xu]=this[Kr][Xu],r[Kr][Yn]=this[Kr][Yn],r}};s2e(Zu);Object.defineProperties(Zu.prototype,{type:Wn,url:Wn,status:Wn,ok:Wn,redirected:Wn,statusText:Wn,headers:Wn,clone:Wn,body:Wn,bodyUsed:Wn,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(Zu,{json:Wn,redirect:Wn,error:Wn});function s3(t){if(t.internalResponse)return YM(s3(t.internalResponse),t.type);let e=Fy({...t,body:null});return t.body!=null&&(e.body=n2e(t.body)),e}function Fy(t){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...t,headersList:t.headersList?new qM(t.headersList):new qM,urlList:t.urlList?[...t.urlList]:[]}}function Ly(t){let e=u2e(t);return Fy({type:"error",status:0,error:e?t:new Error(t&&String(t)),aborted:t&&t.name==="AbortError"})}function Oy(t,e){return e={internalResponse:t,...e},new Proxy(t,{get(r,i){return i in e?e[i]:r[i]},set(r,i,n){return n3(!(i in e)),r[i]=n,!0}})}function YM(t,e){if(e==="basic")return Oy(t,{type:"basic",headersList:t.headersList});if(e==="cors")return Oy(t,{type:"cors",headersList:t.headersList});if(e==="opaque")return Oy(t,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});if(e==="opaqueredirect")return Oy(t,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});n3(!1)}function E2e(t,e=null){return n3(o2e(t)),l2e(t)?Ly(Object.assign(new GM("The operation was aborted.","AbortError"),{cause:e})):Ly(Object.assign(new GM("Request was cancelled."),{cause:e}))}function zM(t,e,r){if(e.status!==null&&(e.status<200||e.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in e&&e.statusText!=null&&!a2e(String(e.statusText)))throw new TypeError("Invalid statusText");if("status"in e&&e.status!=null&&(t[ir].status=e.status),"statusText"in e&&e.statusText!=null&&(t[ir].statusText=e.statusText),"headers"in e&&e.headers!=null&&i2e(t[Kr],e.headers),r){if(f2e.includes(t.status))throw Ye.errors.exception({header:"Response constructor",message:"Invalid response status code "+t.status});t[ir].body=r.body,r.type!=null&&!t[ir].headersList.contains("Content-Type")&&t[ir].headersList.append("content-type",r.type)}}Ye.converters.ReadableStream=Ye.interfaceConverter(VM);Ye.converters.FormData=Ye.interfaceConverter(h2e);Ye.converters.URLSearchParams=Ye.interfaceConverter(URLSearchParams);Ye.converters.XMLHttpRequestBodyInit=function(t){return typeof t=="string"?Ye.converters.USVString(t):c2e(t)?Ye.converters.Blob(t,{strict:!1}):r3.isArrayBuffer(t)||r3.isTypedArray(t)||r3.isDataView(t)?Ye.converters.BufferSource(t):i3.isFormDataLike(t)?Ye.converters.FormData(t,{strict:!1}):t instanceof URLSearchParams?Ye.converters.URLSearchParams(t):Ye.converters.DOMString(t)};Ye.converters.BodyInit=function(t){return t instanceof VM?Ye.converters.ReadableStream(t):t?.[Symbol.asyncIterator]?t:Ye.converters.XMLHttpRequestBodyInit(t)};Ye.converters.ResponseInit=Ye.dictionaryConverter([{key:"status",converter:Ye.converters["unsigned short"],defaultValue:200},{key:"statusText",converter:Ye.converters.ByteString,defaultValue:""},{key:"headers",converter:Ye.converters.HeadersInit}]);WM.exports={makeNetworkError:Ly,makeResponse:Fy,makeAppropriateNetworkError:E2e,filterResponse:YM,Response:Zu,cloneResponse:s3}});var $h=A((Sst,eU)=>{"use strict";var{extractBody:C2e,mixinBody:b2e,cloneBody:I2e}=Qh(),{Headers:JM,fill:B2e,HeadersList:Gy}=id(),{FinalizationRegistry:w2e}=hw()(),Jh=ut(),{isValidHTTPToken:Q2e,sameOrigin:$M,normalizeMethod:S2e,makePolicyContainer:_2e,normalizeMethodRecord:v2e}=As(),{forbiddenMethodsSet:N2e,corsSafeListedMethodsSet:x2e,referrerPolicy:R2e,requestRedirect:T2e,requestMode:D2e,requestCredentials:P2e,requestCache:k2e,requestDuplex:O2e}=ul(),{kEnumerableProperty:Pr}=Jh,{kHeaders:ki,kSignal:Wh,kState:Wt,kGuard:Uy,kRealm:Jn}=mo(),{webidl:Fe}=Xi(),{getGlobalOrigin:L2e}=_u(),{URLSerializer:F2e}=Ws(),{kHeadersList:qy,kConstruct:Hy}=zt(),M2e=require("assert"),{getMaxListeners:KM,setMaxListeners:XM,getEventListeners:U2e,defaultMaxListeners:ZM}=require("events"),a3=globalThis.TransformStream,q2e=Symbol("abortController"),H2e=new w2e(({signal:t,abort:e})=>{t.removeEventListener("abort",e)}),nd=class t{constructor(e,r={}){if(e===Hy)return;Fe.argumentLengthCheck(arguments,1,{header:"Request constructor"}),e=Fe.converters.RequestInfo(e),r=Fe.converters.RequestInit(r),this[Jn]={settingsObject:{baseUrl:L2e(),get origin(){return this.baseUrl?.origin},policyContainer:_2e()}};let i=null,n=null,s=this[Jn].settingsObject.baseUrl,a=null;if(typeof e=="string"){let C;try{C=new URL(e,s)}catch(b){throw new TypeError("Failed to parse URL from "+e,{cause:b})}if(C.username||C.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+e);i=jy({urlList:[C]}),n="cors"}else M2e(e instanceof t),i=e[Wt],a=e[Wh];let o=this[Jn].settingsObject.origin,l="client";if(i.window?.constructor?.name==="EnvironmentSettingsObject"&&$M(i.window,o)&&(l=i.window),r.window!=null)throw new TypeError(`'window' option '${l}' must be null`);"window"in r&&(l="no-window"),i=jy({method:i.method,headersList:i.headersList,unsafeRequest:i.unsafeRequest,client:this[Jn].settingsObject,window:l,priority:i.priority,origin:i.origin,referrer:i.referrer,referrerPolicy:i.referrerPolicy,mode:i.mode,credentials:i.credentials,cache:i.cache,redirect:i.redirect,integrity:i.integrity,keepalive:i.keepalive,reloadNavigation:i.reloadNavigation,historyNavigation:i.historyNavigation,urlList:[...i.urlList]});let c=Object.keys(r).length!==0;if(c&&(i.mode==="navigate"&&(i.mode="same-origin"),i.reloadNavigation=!1,i.historyNavigation=!1,i.origin="client",i.referrer="client",i.referrerPolicy="",i.url=i.urlList[i.urlList.length-1],i.urlList=[i.url]),r.referrer!==void 0){let C=r.referrer;if(C==="")i.referrer="no-referrer";else{let b;try{b=new URL(C,s)}catch(N){throw new TypeError(`Referrer "${C}" is not a valid URL.`,{cause:N})}b.protocol==="about:"&&b.hostname==="client"||o&&!$M(b,this[Jn].settingsObject.baseUrl)?i.referrer="client":i.referrer=b}}r.referrerPolicy!==void 0&&(i.referrerPolicy=r.referrerPolicy);let d;if(r.mode!==void 0?d=r.mode:d=n,d==="navigate")throw Fe.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(d!=null&&(i.mode=d),r.credentials!==void 0&&(i.credentials=r.credentials),r.cache!==void 0&&(i.cache=r.cache),i.cache==="only-if-cached"&&i.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(r.redirect!==void 0&&(i.redirect=r.redirect),r.integrity!=null&&(i.integrity=String(r.integrity)),r.keepalive!==void 0&&(i.keepalive=!!r.keepalive),r.method!==void 0){let C=r.method;if(!Q2e(C))throw new TypeError(`'${C}' is not a valid HTTP method.`);if(N2e.has(C.toUpperCase()))throw new TypeError(`'${C}' HTTP method is unsupported.`);C=v2e[C]??S2e(C),i.method=C}r.signal!==void 0&&(a=r.signal),this[Wt]=i;let u=new AbortController;if(this[Wh]=u.signal,this[Wh][Jn]=this[Jn],a!=null){if(!a||typeof a.aborted!="boolean"||typeof a.addEventListener!="function")throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(a.aborted)u.abort(a.reason);else{this[q2e]=u;let C=new WeakRef(u),b=function(){let N=C.deref();N!==void 0&&N.abort(this.reason)};try{(typeof KM=="function"&&KM(a)===ZM||U2e(a,"abort").length>=ZM)&&XM(100,a)}catch{}Jh.addAbortListener(a,b),H2e.register(u,{signal:a,abort:b})}}if(this[ki]=new JM(Hy),this[ki][qy]=i.headersList,this[ki][Uy]="request",this[ki][Jn]=this[Jn],d==="no-cors"){if(!x2e.has(i.method))throw new TypeError(`'${i.method} is unsupported in no-cors mode.`);this[ki][Uy]="request-no-cors"}if(c){let C=this[ki][qy],b=r.headers!==void 0?r.headers:new Gy(C);if(C.clear(),b instanceof Gy){for(let[N,D]of b)C.append(N,D);C.cookies=b.cookies}else B2e(this[ki],b)}let p=e instanceof t?e[Wt].body:null;if((r.body!=null||p!=null)&&(i.method==="GET"||i.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let f=null;if(r.body!=null){let[C,b]=C2e(r.body,i.keepalive);f=C,b&&!this[ki][qy].contains("content-type")&&this[ki].append("content-type",b)}let h=f??p;if(h!=null&&h.source==null){if(f!=null&&r.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(i.mode!=="same-origin"&&i.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');i.useCORSPreflightFlag=!0}let E=h;if(f==null&&p!=null){if(Jh.isDisturbed(p.stream)||p.stream.locked)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");a3||(a3=require("stream/web").TransformStream);let C=new a3;p.stream.pipeThrough(C),E={source:p.source,length:p.length,stream:C.readable}}this[Wt].body=E}get method(){return Fe.brandCheck(this,t),this[Wt].method}get url(){return Fe.brandCheck(this,t),F2e(this[Wt].url)}get headers(){return Fe.brandCheck(this,t),this[ki]}get destination(){return Fe.brandCheck(this,t),this[Wt].destination}get referrer(){return Fe.brandCheck(this,t),this[Wt].referrer==="no-referrer"?"":this[Wt].referrer==="client"?"about:client":this[Wt].referrer.toString()}get referrerPolicy(){return Fe.brandCheck(this,t),this[Wt].referrerPolicy}get mode(){return Fe.brandCheck(this,t),this[Wt].mode}get credentials(){return this[Wt].credentials}get cache(){return Fe.brandCheck(this,t),this[Wt].cache}get redirect(){return Fe.brandCheck(this,t),this[Wt].redirect}get integrity(){return Fe.brandCheck(this,t),this[Wt].integrity}get keepalive(){return Fe.brandCheck(this,t),this[Wt].keepalive}get isReloadNavigation(){return Fe.brandCheck(this,t),this[Wt].reloadNavigation}get isHistoryNavigation(){return Fe.brandCheck(this,t),this[Wt].historyNavigation}get signal(){return Fe.brandCheck(this,t),this[Wh]}get body(){return Fe.brandCheck(this,t),this[Wt].body?this[Wt].body.stream:null}get bodyUsed(){return Fe.brandCheck(this,t),!!this[Wt].body&&Jh.isDisturbed(this[Wt].body.stream)}get duplex(){return Fe.brandCheck(this,t),"half"}clone(){if(Fe.brandCheck(this,t),this.bodyUsed||this.body?.locked)throw new TypeError("unusable");let e=G2e(this[Wt]),r=new t(Hy);r[Wt]=e,r[Jn]=this[Jn],r[ki]=new JM(Hy),r[ki][qy]=e.headersList,r[ki][Uy]=this[ki][Uy],r[ki][Jn]=this[ki][Jn];let i=new AbortController;return this.signal.aborted?i.abort(this.signal.reason):Jh.addAbortListener(this.signal,()=>{i.abort(this.signal.reason)}),r[Wh]=i.signal,r}};b2e(nd);function jy(t){let e={method:"GET",localURLsOnly:!1,unsafeRequest:!1,body:null,client:null,reservedClient:null,replacesClientId:"",window:"client",keepalive:!1,serviceWorkers:"all",initiator:"",destination:"",priority:null,origin:"client",policyContainer:"client",referrer:"client",referrerPolicy:"",mode:"no-cors",useCORSPreflightFlag:!1,credentials:"same-origin",useCredentials:!1,cache:"default",redirect:"follow",integrity:"",cryptoGraphicsNonceMetadata:"",parserMetadata:"",reloadNavigation:!1,historyNavigation:!1,userActivation:!1,taintedOrigin:!1,redirectCount:0,responseTainting:"basic",preventNoCacheCacheControlHeaderModification:!1,done:!1,timingAllowFailed:!1,...t,headersList:t.headersList?new Gy(t.headersList):new Gy};return e.url=e.urlList[0],e}function G2e(t){let e=jy({...t,body:null});return t.body!=null&&(e.body=I2e(t.body)),e}Object.defineProperties(nd.prototype,{method:Pr,url:Pr,headers:Pr,redirect:Pr,clone:Pr,signal:Pr,duplex:Pr,destination:Pr,body:Pr,bodyUsed:Pr,isHistoryNavigation:Pr,isReloadNavigation:Pr,keepalive:Pr,integrity:Pr,cache:Pr,credentials:Pr,attribute:Pr,referrerPolicy:Pr,referrer:Pr,mode:Pr,[Symbol.toStringTag]:{value:"Request",configurable:!0}});Fe.converters.Request=Fe.interfaceConverter(nd);Fe.converters.RequestInfo=function(t){return typeof t=="string"?Fe.converters.USVString(t):t instanceof nd?Fe.converters.Request(t):Fe.converters.USVString(t)};Fe.converters.AbortSignal=Fe.interfaceConverter(AbortSignal);Fe.converters.RequestInit=Fe.dictionaryConverter([{key:"method",converter:Fe.converters.ByteString},{key:"headers",converter:Fe.converters.HeadersInit},{key:"body",converter:Fe.nullableConverter(Fe.converters.BodyInit)},{key:"referrer",converter:Fe.converters.USVString},{key:"referrerPolicy",converter:Fe.converters.DOMString,allowedValues:R2e},{key:"mode",converter:Fe.converters.DOMString,allowedValues:D2e},{key:"credentials",converter:Fe.converters.DOMString,allowedValues:P2e},{key:"cache",converter:Fe.converters.DOMString,allowedValues:k2e},{key:"redirect",converter:Fe.converters.DOMString,allowedValues:T2e},{key:"integrity",converter:Fe.converters.DOMString},{key:"keepalive",converter:Fe.converters.boolean},{key:"signal",converter:Fe.nullableConverter(t=>Fe.converters.AbortSignal(t,{strict:!1}))},{key:"window",converter:Fe.converters.any},{key:"duplex",converter:Fe.converters.DOMString,allowedValues:O2e}]);eU.exports={Request:nd,makeRequest:jy}});var Ky=A((_st,fU)=>{"use strict";var{Response:j2e,makeNetworkError:Pt,makeAppropriateNetworkError:zy,filterResponse:o3,makeResponse:Vy}=My(),{Headers:tU}=id(),{Request:z2e,makeRequest:V2e}=$h(),Kh=require("zlib"),{bytesMatch:Y2e,makePolicyContainer:W2e,clonePolicyContainer:J2e,requestBadPort:$2e,TAOCheck:K2e,appendRequestOriginHeader:X2e,responseLocationURL:Z2e,requestCurrentURL:Qa,setRequestReferrerPolicyOnRedirect:eEe,tryUpgradeRequestToAPotentiallyTrustworthyURL:tEe,createOpaqueTimingInfo:m3,appendFetchMetadata:rEe,corsCheck:iEe,crossOriginResourcePolicyCheck:nEe,determineRequestsReferrer:sEe,coarsenedSharedCurrentTime:g3,createDeferredPromise:aEe,isBlobLike:oEe,sameOrigin:p3,isCancelled:tA,isAborted:rU,isErrorLike:lEe,fullyReadBody:aU,readableStreamClose:cEe,isomorphicEncode:f3,urlIsLocal:dEe,urlIsHttpHttpsScheme:y3,urlHasHttpsScheme:uEe}=As(),{kState:h3,kHeaders:l3,kGuard:AEe,kRealm:iU}=mo(),rA=require("assert"),{safelyExtractBody:Yy}=Qh(),{redirectStatusSet:oU,nullBodyStatus:lU,safeMethodsSet:pEe,requestBodyHeader:fEe,subresourceSet:hEe,DOMException:Wy}=ul(),{kHeadersList:eA}=zt(),mEe=require("events"),{Readable:gEe,pipeline:yEe}=require("stream"),{addAbortListener:EEe,isErrored:CEe,isReadable:Jy,nodeMajor:nU,nodeMinor:bEe}=ut(),{dataURLProcessor:IEe,serializeAMimeType:BEe}=Ws(),{TransformStream:wEe}=require("stream/web"),{getGlobalDispatcher:QEe}=Ju(),{webidl:SEe}=Xi(),{STATUS_CODES:_Ee}=require("http"),vEe=["GET","HEAD"],c3,d3=globalThis.ReadableStream,$y=class extends mEe{constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state="ongoing",this.setMaxListeners(21)}terminate(e){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(e),this.emit("terminated",e))}abort(e){this.state==="ongoing"&&(this.state="aborted",e||(e=new Wy("The operation was aborted.","AbortError")),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit("terminated",e))}};function NEe(t,e={}){SEe.argumentLengthCheck(arguments,1,{header:"globalThis.fetch"});let r=aEe(),i;try{i=new z2e(t,e)}catch(p){return r.reject(p),r.promise}let n=i[h3];if(i.signal.aborted)return u3(r,n,null,i.signal.reason),r.promise;n.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(n.serviceWorkers="none");let a=null,o=null,l=!1,c=null;return EEe(i.signal,()=>{l=!0,rA(c!=null),c.abort(i.signal.reason),u3(r,n,a,i.signal.reason)}),c=dU({request:n,processResponseEndOfBody:p=>cU(p,"fetch"),processResponse:p=>{if(l)return Promise.resolve();if(p.aborted)return u3(r,n,a,c.serializedAbortReason),Promise.resolve();if(p.type==="error")return r.reject(Object.assign(new TypeError("fetch failed"),{cause:p.error})),Promise.resolve();a=new j2e,a[h3]=p,a[iU]=o,a[l3][eA]=p.headersList,a[l3][AEe]="immutable",a[l3][iU]=o,r.resolve(a)},dispatcher:e.dispatcher??QEe()}),r.promise}function cU(t,e="other"){if(t.type==="error"&&t.aborted||!t.urlList?.length)return;let r=t.urlList[0],i=t.timingInfo,n=t.cacheState;y3(r)&&i!==null&&(t.timingAllowPassed||(i=m3({startTime:i.startTime}),n=""),i.endTime=g3(),t.timingInfo=i,xEe(i,r,e,globalThis,n))}function xEe(t,e,r,i,n){(nU>18||nU===18&&bEe>=2)&&performance.markResourceTiming(t,e.href,r,i,n)}function u3(t,e,r,i){if(i||(i=new Wy("The operation was aborted.","AbortError")),t.reject(i),e.body!=null&&Jy(e.body?.stream)&&e.body.stream.cancel(i).catch(s=>{if(s.code!=="ERR_INVALID_STATE")throw s}),r==null)return;let n=r[h3];n.body!=null&&Jy(n.body?.stream)&&n.body.stream.cancel(i).catch(s=>{if(s.code!=="ERR_INVALID_STATE")throw s})}function dU({request:t,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:i,processResponseEndOfBody:n,processResponseConsumeBody:s,useParallelQueue:a=!1,dispatcher:o}){let l=null,c=!1;t.client!=null&&(l=t.client.globalObject,c=t.client.crossOriginIsolatedCapability);let d=g3(c),u=m3({startTime:d}),p={controller:new $y(o),request:t,timingInfo:u,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:i,processResponseConsumeBody:s,processResponseEndOfBody:n,taskDestination:l,crossOriginIsolatedCapability:c};return rA(!t.body||t.body.stream),t.window==="client"&&(t.window=t.client?.globalObject?.constructor?.name==="Window"?t.client:"no-window"),t.origin==="client"&&(t.origin=t.client?.origin),t.policyContainer==="client"&&(t.client!=null?t.policyContainer=J2e(t.client.policyContainer):t.policyContainer=W2e()),t.headersList.contains("accept")||t.headersList.append("accept","*/*"),t.headersList.contains("accept-language")||t.headersList.append("accept-language","*"),t.priority,hEe.has(t.destination),uU(p).catch(f=>{p.controller.terminate(f)}),p.controller}async function uU(t,e=!1){let r=t.request,i=null;if(r.localURLsOnly&&!dEe(Qa(r))&&(i=Pt("local URLs only")),tEe(r),$2e(r)==="blocked"&&(i=Pt("bad port")),r.referrerPolicy===""&&(r.referrerPolicy=r.policyContainer.referrerPolicy),r.referrer!=="no-referrer"&&(r.referrer=sEe(r)),i===null&&(i=await(async()=>{let s=Qa(r);return p3(s,r.url)&&r.responseTainting==="basic"||s.protocol==="data:"||r.mode==="navigate"||r.mode==="websocket"?(r.responseTainting="basic",await sU(t)):r.mode==="same-origin"?Pt('request mode cannot be "same-origin"'):r.mode==="no-cors"?r.redirect!=="follow"?Pt('redirect mode cannot be "follow" for "no-cors" request'):(r.responseTainting="opaque",await sU(t)):y3(Qa(r))?(r.responseTainting="cors",await AU(t)):Pt("URL scheme must be a HTTP(S) scheme")})()),e)return i;i.status!==0&&!i.internalResponse&&(r.responseTainting,r.responseTainting==="basic"?i=o3(i,"basic"):r.responseTainting==="cors"?i=o3(i,"cors"):r.responseTainting==="opaque"?i=o3(i,"opaque"):rA(!1));let n=i.status===0?i:i.internalResponse;if(n.urlList.length===0&&n.urlList.push(...r.urlList),r.timingAllowFailed||(i.timingAllowPassed=!0),i.type==="opaque"&&n.status===206&&n.rangeRequested&&!r.headers.contains("range")&&(i=n=Pt()),i.status!==0&&(r.method==="HEAD"||r.method==="CONNECT"||lU.includes(n.status))&&(n.body=null,t.controller.dump=!0),r.integrity){let s=o=>A3(t,Pt(o));if(r.responseTainting==="opaque"||i.body==null){s(i.error);return}let a=o=>{if(!Y2e(o,r.integrity)){s("integrity mismatch");return}i.body=Yy(o)[0],A3(t,i)};await aU(i.body,a,s)}else A3(t,i)}function sU(t){if(tA(t)&&t.request.redirectCount===0)return Promise.resolve(zy(t));let{request:e}=t,{protocol:r}=Qa(e);switch(r){case"about:":return Promise.resolve(Pt("about scheme is not supported"));case"blob:":{c3||(c3=require("buffer").resolveObjectURL);let i=Qa(e);if(i.search.length!==0)return Promise.resolve(Pt("NetworkError when attempting to fetch resource."));let n=c3(i.toString());if(e.method!=="GET"||!oEe(n))return Promise.resolve(Pt("invalid method"));let s=Yy(n),a=s[0],o=f3(`${a.length}`),l=s[1]??"",c=Vy({statusText:"OK",headersList:[["content-length",{name:"Content-Length",value:o}],["content-type",{name:"Content-Type",value:l}]]});return c.body=a,Promise.resolve(c)}case"data:":{let i=Qa(e),n=IEe(i);if(n==="failure")return Promise.resolve(Pt("failed to fetch the data URL"));let s=BEe(n.mimeType);return Promise.resolve(Vy({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:s}]],body:Yy(n.body)[0]}))}case"file:":return Promise.resolve(Pt("not implemented... yet..."));case"http:":case"https:":return AU(t).catch(i=>Pt(i));default:return Promise.resolve(Pt("unknown scheme"))}}function REe(t,e){t.request.done=!0,t.processResponseDone!=null&&queueMicrotask(()=>t.processResponseDone(e))}function A3(t,e){e.type==="error"&&(e.urlList=[t.request.urlList[0]],e.timingInfo=m3({startTime:t.timingInfo.startTime}));let r=()=>{t.request.done=!0,t.processResponseEndOfBody!=null&&queueMicrotask(()=>t.processResponseEndOfBody(e))};if(t.processResponse!=null&&queueMicrotask(()=>t.processResponse(e)),e.body==null)r();else{let i=(s,a)=>{a.enqueue(s)},n=new wEe({start(){},transform:i,flush:r},{size(){return 1}},{size(){return 1}});e.body={stream:e.body.stream.pipeThrough(n)}}if(t.processResponseConsumeBody!=null){let i=s=>t.processResponseConsumeBody(e,s),n=s=>t.processResponseConsumeBody(e,s);if(e.body==null)queueMicrotask(()=>i(null));else return aU(e.body,i,n);return Promise.resolve()}}async function AU(t){let e=t.request,r=null,i=null,n=t.timingInfo;if(e.serviceWorkers,r===null){if(e.redirect==="follow"&&(e.serviceWorkers="none"),i=r=await pU(t),e.responseTainting==="cors"&&iEe(e,r)==="failure")return Pt("cors failure");K2e(e,r)==="failure"&&(e.timingAllowFailed=!0)}return(e.responseTainting==="opaque"||r.type==="opaque")&&nEe(e.origin,e.client,e.destination,i)==="blocked"?Pt("blocked"):(oU.has(i.status)&&(e.redirect!=="manual"&&t.controller.connection.destroy(),e.redirect==="error"?r=Pt("unexpected redirect"):e.redirect==="manual"?r=i:e.redirect==="follow"?r=await TEe(t,r):rA(!1)),r.timingInfo=n,r)}function TEe(t,e){let r=t.request,i=e.internalResponse?e.internalResponse:e,n;try{if(n=Z2e(i,Qa(r).hash),n==null)return e}catch(a){return Promise.resolve(Pt(a))}if(!y3(n))return Promise.resolve(Pt("URL scheme must be a HTTP(S) scheme"));if(r.redirectCount===20)return Promise.resolve(Pt("redirect count exceeded"));if(r.redirectCount+=1,r.mode==="cors"&&(n.username||n.password)&&!p3(r,n))return Promise.resolve(Pt('cross origin not allowed for request mode "cors"'));if(r.responseTainting==="cors"&&(n.username||n.password))return Promise.resolve(Pt('URL cannot contain credentials for request mode "cors"'));if(i.status!==303&&r.body!=null&&r.body.source==null)return Promise.resolve(Pt());if([301,302].includes(i.status)&&r.method==="POST"||i.status===303&&!vEe.includes(r.method)){r.method="GET",r.body=null;for(let a of fEe)r.headersList.delete(a)}p3(Qa(r),n)||(r.headersList.delete("authorization"),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie"),r.headersList.delete("host")),r.body!=null&&(rA(r.body.source!=null),r.body=Yy(r.body.source)[0]);let s=t.timingInfo;return s.redirectEndTime=s.postRedirectStartTime=g3(t.crossOriginIsolatedCapability),s.redirectStartTime===0&&(s.redirectStartTime=s.startTime),r.urlList.push(n),eEe(r,i),uU(t,!0)}async function pU(t,e=!1,r=!1){let i=t.request,n=null,s=null,a=null,o=null,l=!1;i.window==="no-window"&&i.redirect==="error"?(n=t,s=i):(s=V2e(i),n={...t},n.request=s);let c=i.credentials==="include"||i.credentials==="same-origin"&&i.responseTainting==="basic",d=s.body?s.body.length:null,u=null;if(s.body==null&&["POST","PUT"].includes(s.method)&&(u="0"),d!=null&&(u=f3(`${d}`)),u!=null&&s.headersList.append("content-length",u),d!=null&&s.keepalive,s.referrer instanceof URL&&s.headersList.append("referer",f3(s.referrer.href)),X2e(s),rEe(s),s.headersList.contains("user-agent")||s.headersList.append("user-agent",typeof esbuildDetection>"u"?"undici":"node"),s.cache==="default"&&(s.headersList.contains("if-modified-since")||s.headersList.contains("if-none-match")||s.headersList.contains("if-unmodified-since")||s.headersList.contains("if-match")||s.headersList.contains("if-range"))&&(s.cache="no-store"),s.cache==="no-cache"&&!s.preventNoCacheCacheControlHeaderModification&&!s.headersList.contains("cache-control")&&s.headersList.append("cache-control","max-age=0"),(s.cache==="no-store"||s.cache==="reload")&&(s.headersList.contains("pragma")||s.headersList.append("pragma","no-cache"),s.headersList.contains("cache-control")||s.headersList.append("cache-control","no-cache")),s.headersList.contains("range")&&s.headersList.append("accept-encoding","identity"),s.headersList.contains("accept-encoding")||(uEe(Qa(s))?s.headersList.append("accept-encoding","br, gzip, deflate"):s.headersList.append("accept-encoding","gzip, deflate")),s.headersList.delete("host"),o==null&&(s.cache="no-store"),s.mode!=="no-store"&&s.mode,a==null){if(s.mode==="only-if-cached")return Pt("only if cached");let p=await DEe(n,c,r);!pEe.has(s.method)&&p.status>=200&&p.status<=399,l&&p.status,a==null&&(a=p)}if(a.urlList=[...s.urlList],s.headersList.contains("range")&&(a.rangeRequested=!0),a.requestIncludesCredentials=c,a.status===407)return i.window==="no-window"?Pt():tA(t)?zy(t):Pt("proxy authentication required");if(a.status===421&&!r&&(i.body==null||i.body.source!=null)){if(tA(t))return zy(t);t.controller.connection.destroy(),a=await pU(t,e,!0)}return a}async function DEe(t,e=!1,r=!1){rA(!t.controller.connection||t.controller.connection.destroyed),t.controller.connection={abort:null,destroyed:!1,destroy(h){this.destroyed||(this.destroyed=!0,this.abort?.(h??new Wy("The operation was aborted.","AbortError")))}};let i=t.request,n=null,s=t.timingInfo;null==null&&(i.cache="no-store");let o=r?"yes":"no";i.mode;let l=null;if(i.body==null&&t.processRequestEndOfBody)queueMicrotask(()=>t.processRequestEndOfBody());else if(i.body!=null){let h=async function*(b){tA(t)||(yield b,t.processRequestBodyChunkLength?.(b.byteLength))},E=()=>{tA(t)||t.processRequestEndOfBody&&t.processRequestEndOfBody()},C=b=>{tA(t)||(b.name==="AbortError"?t.controller.abort():t.controller.terminate(b))};l=(async function*(){try{for await(let b of i.body.stream)yield*h(b);E()}catch(b){C(b)}})()}try{let{body:h,status:E,statusText:C,headersList:b,socket:N}=await f({body:l});if(N)n=Vy({status:E,statusText:C,headersList:b,socket:N});else{let D=h[Symbol.asyncIterator]();t.controller.next=()=>D.next(),n=Vy({status:E,statusText:C,headersList:b})}}catch(h){return h.name==="AbortError"?(t.controller.connection.destroy(),zy(t,h)):Pt(h)}let c=()=>{t.controller.resume()},d=h=>{t.controller.abort(h)};d3||(d3=require("stream/web").ReadableStream);let u=new d3({async start(h){t.controller.controller=h},async pull(h){await c(h)},async cancel(h){await d(h)}},{highWaterMark:0,size(){return 1}});n.body={stream:u},t.controller.on("terminated",p),t.controller.resume=async()=>{for(;;){let h,E;try{let{done:C,value:b}=await t.controller.next();if(rU(t))break;h=C?void 0:b}catch(C){t.controller.ended&&!s.encodedBodySize?h=void 0:(h=C,E=!0)}if(h===void 0){cEe(t.controller.controller),REe(t,n);return}if(s.decodedBodySize+=h?.byteLength??0,E){t.controller.terminate(h);return}if(t.controller.controller.enqueue(new Uint8Array(h)),CEe(u)){t.controller.terminate();return}if(!t.controller.controller.desiredSize)return}};function p(h){rU(t)?(n.aborted=!0,Jy(u)&&t.controller.controller.error(t.controller.serializedAbortReason)):Jy(u)&&t.controller.controller.error(new TypeError("terminated",{cause:lEe(h)?h:void 0})),t.controller.connection.destroy()}return n;async function f({body:h}){let E=Qa(i),C=t.controller.dispatcher;return new Promise((b,N)=>C.dispatch({path:E.pathname+E.search,origin:E.origin,method:i.method,body:t.controller.dispatcher.isMockActive?i.body&&(i.body.source||i.body.stream):h,headers:i.headersList.entries,maxRedirections:0,upgrade:i.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(D){let{connection:O}=t.controller;O.destroyed?D(new Wy("The operation was aborted.","AbortError")):(t.controller.on("terminated",D),this.abort=O.abort=D)},onHeaders(D,O,K,ne){if(D<200)return;let U=[],te="",F=new tU;if(Array.isArray(O))for(let Z=0;Zqe.trim()):de.toLowerCase()==="location"&&(te=we),F[eA].append(de,we)}else{let Z=Object.keys(O);for(let de of Z){let we=O[de];de.toLowerCase()==="content-encoding"?U=we.toLowerCase().split(",").map(qe=>qe.trim()).reverse():de.toLowerCase()==="location"&&(te=we),F[eA].append(de,we)}}this.body=new gEe({read:K});let $=[],X=i.redirect==="follow"&&te&&oU.has(D);if(i.method!=="HEAD"&&i.method!=="CONNECT"&&!lU.includes(D)&&!X)for(let Z of U)if(Z==="x-gzip"||Z==="gzip")$.push(Kh.createGunzip({flush:Kh.constants.Z_SYNC_FLUSH,finishFlush:Kh.constants.Z_SYNC_FLUSH}));else if(Z==="deflate")$.push(Kh.createInflate());else if(Z==="br")$.push(Kh.createBrotliDecompress());else{$.length=0;break}return b({status:D,statusText:ne,headersList:F[eA],body:$.length?yEe(this.body,...$,()=>{}):this.body.on("error",()=>{})}),!0},onData(D){if(t.controller.dump)return;let O=D;return s.encodedBodySize+=O.byteLength,this.body.push(O)},onComplete(){this.abort&&t.controller.off("terminated",this.abort),t.controller.ended=!0,this.body.push(null)},onError(D){this.abort&&t.controller.off("terminated",this.abort),this.body?.destroy(D),t.controller.terminate(D),N(D)},onUpgrade(D,O,K){if(D!==101)return;let ne=new tU;for(let U=0;U{"use strict";hU.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var gU=A((Nst,mU)=>{"use strict";var{webidl:$n}=Xi(),Xy=Symbol("ProgressEvent state"),C3=class t extends Event{constructor(e,r={}){e=$n.converters.DOMString(e),r=$n.converters.ProgressEventInit(r??{}),super(e,r),this[Xy]={lengthComputable:r.lengthComputable,loaded:r.loaded,total:r.total}}get lengthComputable(){return $n.brandCheck(this,t),this[Xy].lengthComputable}get loaded(){return $n.brandCheck(this,t),this[Xy].loaded}get total(){return $n.brandCheck(this,t),this[Xy].total}};$n.converters.ProgressEventInit=$n.dictionaryConverter([{key:"lengthComputable",converter:$n.converters.boolean,defaultValue:!1},{key:"loaded",converter:$n.converters["unsigned long long"],defaultValue:0},{key:"total",converter:$n.converters["unsigned long long"],defaultValue:0},{key:"bubbles",converter:$n.converters.boolean,defaultValue:!1},{key:"cancelable",converter:$n.converters.boolean,defaultValue:!1},{key:"composed",converter:$n.converters.boolean,defaultValue:!1}]);mU.exports={ProgressEvent:C3}});var EU=A((xst,yU)=>{"use strict";function PEe(t){if(!t)return"failure";switch(t.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}yU.exports={getEncoding:PEe}});var _U=A((Rst,SU)=>{"use strict";var{kState:iA,kError:b3,kResult:CU,kAborted:Xh,kLastProgressEventFired:I3}=E3(),{ProgressEvent:kEe}=gU(),{getEncoding:bU}=EU(),{DOMException:OEe}=ul(),{serializeAMimeType:LEe,parseMIMEType:IU}=Ws(),{types:FEe}=require("util"),{StringDecoder:BU}=require("string_decoder"),{btoa:wU}=require("buffer"),MEe={enumerable:!0,writable:!1,configurable:!1};function UEe(t,e,r,i){if(t[iA]==="loading")throw new OEe("Invalid state","InvalidStateError");t[iA]="loading",t[CU]=null,t[b3]=null;let s=e.stream().getReader(),a=[],o=s.read(),l=!0;(async()=>{for(;!t[Xh];)try{let{done:c,value:d}=await o;if(l&&!t[Xh]&&queueMicrotask(()=>{El("loadstart",t)}),l=!1,!c&&FEe.isUint8Array(d))a.push(d),(t[I3]===void 0||Date.now()-t[I3]>=50)&&!t[Xh]&&(t[I3]=Date.now(),queueMicrotask(()=>{El("progress",t)})),o=s.read();else if(c){queueMicrotask(()=>{t[iA]="done";try{let u=qEe(a,r,e.type,i);if(t[Xh])return;t[CU]=u,El("load",t)}catch(u){t[b3]=u,El("error",t)}t[iA]!=="loading"&&El("loadend",t)});break}}catch(c){if(t[Xh])return;queueMicrotask(()=>{t[iA]="done",t[b3]=c,El("error",t),t[iA]!=="loading"&&El("loadend",t)});break}})()}function El(t,e){let r=new kEe(t,{bubbles:!1,cancelable:!1});e.dispatchEvent(r)}function qEe(t,e,r,i){switch(e){case"DataURL":{let n="data:",s=IU(r||"application/octet-stream");s!=="failure"&&(n+=LEe(s)),n+=";base64,";let a=new BU("latin1");for(let o of t)n+=wU(a.write(o));return n+=wU(a.end()),n}case"Text":{let n="failure";if(i&&(n=bU(i)),n==="failure"&&r){let s=IU(r);s!=="failure"&&(n=bU(s.parameters.get("charset")))}return n==="failure"&&(n="UTF-8"),HEe(t,n)}case"ArrayBuffer":return QU(t).buffer;case"BinaryString":{let n="",s=new BU("latin1");for(let a of t)n+=s.write(a);return n+=s.end(),n}}}function HEe(t,e){let r=QU(t),i=GEe(r),n=0;i!==null&&(e=i,n=i==="UTF-8"?3:2);let s=r.slice(n);return new TextDecoder(e).decode(s)}function GEe(t){let[e,r,i]=t;return e===239&&r===187&&i===191?"UTF-8":e===254&&r===255?"UTF-16BE":e===255&&r===254?"UTF-16LE":null}function QU(t){let e=t.reduce((i,n)=>i+n.byteLength,0),r=0;return t.reduce((i,n)=>(i.set(n,r),r+=n.byteLength,i),new Uint8Array(e))}SU.exports={staticPropertyDescriptors:MEe,readOperation:UEe,fireAProgressEvent:El}});var RU=A((Tst,xU)=>{"use strict";var{staticPropertyDescriptors:nA,readOperation:Zy,fireAProgressEvent:vU}=_U(),{kState:sd,kError:NU,kResult:e2,kEvents:Et,kAborted:jEe}=E3(),{webidl:xt}=Xi(),{kEnumerableProperty:In}=ut(),Xs=class t extends EventTarget{constructor(){super(),this[sd]="empty",this[e2]=null,this[NU]=null,this[Et]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(e){xt.brandCheck(this,t),xt.argumentLengthCheck(arguments,1,{header:"FileReader.readAsArrayBuffer"}),e=xt.converters.Blob(e,{strict:!1}),Zy(this,e,"ArrayBuffer")}readAsBinaryString(e){xt.brandCheck(this,t),xt.argumentLengthCheck(arguments,1,{header:"FileReader.readAsBinaryString"}),e=xt.converters.Blob(e,{strict:!1}),Zy(this,e,"BinaryString")}readAsText(e,r=void 0){xt.brandCheck(this,t),xt.argumentLengthCheck(arguments,1,{header:"FileReader.readAsText"}),e=xt.converters.Blob(e,{strict:!1}),r!==void 0&&(r=xt.converters.DOMString(r)),Zy(this,e,"Text",r)}readAsDataURL(e){xt.brandCheck(this,t),xt.argumentLengthCheck(arguments,1,{header:"FileReader.readAsDataURL"}),e=xt.converters.Blob(e,{strict:!1}),Zy(this,e,"DataURL")}abort(){if(this[sd]==="empty"||this[sd]==="done"){this[e2]=null;return}this[sd]==="loading"&&(this[sd]="done",this[e2]=null),this[jEe]=!0,vU("abort",this),this[sd]!=="loading"&&vU("loadend",this)}get readyState(){switch(xt.brandCheck(this,t),this[sd]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return xt.brandCheck(this,t),this[e2]}get error(){return xt.brandCheck(this,t),this[NU]}get onloadend(){return xt.brandCheck(this,t),this[Et].loadend}set onloadend(e){xt.brandCheck(this,t),this[Et].loadend&&this.removeEventListener("loadend",this[Et].loadend),typeof e=="function"?(this[Et].loadend=e,this.addEventListener("loadend",e)):this[Et].loadend=null}get onerror(){return xt.brandCheck(this,t),this[Et].error}set onerror(e){xt.brandCheck(this,t),this[Et].error&&this.removeEventListener("error",this[Et].error),typeof e=="function"?(this[Et].error=e,this.addEventListener("error",e)):this[Et].error=null}get onloadstart(){return xt.brandCheck(this,t),this[Et].loadstart}set onloadstart(e){xt.brandCheck(this,t),this[Et].loadstart&&this.removeEventListener("loadstart",this[Et].loadstart),typeof e=="function"?(this[Et].loadstart=e,this.addEventListener("loadstart",e)):this[Et].loadstart=null}get onprogress(){return xt.brandCheck(this,t),this[Et].progress}set onprogress(e){xt.brandCheck(this,t),this[Et].progress&&this.removeEventListener("progress",this[Et].progress),typeof e=="function"?(this[Et].progress=e,this.addEventListener("progress",e)):this[Et].progress=null}get onload(){return xt.brandCheck(this,t),this[Et].load}set onload(e){xt.brandCheck(this,t),this[Et].load&&this.removeEventListener("load",this[Et].load),typeof e=="function"?(this[Et].load=e,this.addEventListener("load",e)):this[Et].load=null}get onabort(){return xt.brandCheck(this,t),this[Et].abort}set onabort(e){xt.brandCheck(this,t),this[Et].abort&&this.removeEventListener("abort",this[Et].abort),typeof e=="function"?(this[Et].abort=e,this.addEventListener("abort",e)):this[Et].abort=null}};Xs.EMPTY=Xs.prototype.EMPTY=0;Xs.LOADING=Xs.prototype.LOADING=1;Xs.DONE=Xs.prototype.DONE=2;Object.defineProperties(Xs.prototype,{EMPTY:nA,LOADING:nA,DONE:nA,readAsArrayBuffer:In,readAsBinaryString:In,readAsText:In,readAsDataURL:In,abort:In,readyState:In,result:In,error:In,onloadstart:In,onprogress:In,onload:In,onabort:In,onerror:In,onloadend:In,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Xs,{EMPTY:nA,LOADING:nA,DONE:nA});xU.exports={FileReader:Xs}});var t2=A((Dst,TU)=>{"use strict";TU.exports={kConstruct:zt().kConstruct}});var kU=A((Pst,PU)=>{"use strict";var zEe=require("assert"),{URLSerializer:DU}=Ws(),{isValidHeaderName:VEe}=As();function YEe(t,e,r=!1){let i=DU(t,r),n=DU(e,r);return i===n}function WEe(t){zEe(t!==null);let e=[];for(let r of t.split(",")){if(r=r.trim(),r.length){if(!VEe(r))continue}else continue;e.push(r)}return e}PU.exports={urlEquals:YEe,fieldValues:WEe}});var qU=A((kst,UU)=>{"use strict";var{kConstruct:JEe}=t2(),{urlEquals:$Ee,fieldValues:B3}=kU(),{kEnumerableProperty:ad,isDisturbed:KEe}=ut(),{kHeadersList:OU}=zt(),{webidl:ve}=Xi(),{Response:FU,cloneResponse:XEe}=My(),{Request:Sa}=$h(),{kState:nn,kHeaders:r2,kGuard:LU,kRealm:ZEe}=mo(),{fetching:eCe}=Ky(),{urlIsHttpHttpsScheme:i2,createDeferredPromise:sA,readAllBytes:tCe}=As(),w3=require("assert"),{getGlobalDispatcher:rCe}=Ju(),n2=class t{#e;constructor(){arguments[0]!==JEe&&ve.illegalConstructor(),this.#e=arguments[1]}async match(e,r={}){ve.brandCheck(this,t),ve.argumentLengthCheck(arguments,1,{header:"Cache.match"}),e=ve.converters.RequestInfo(e),r=ve.converters.CacheQueryOptions(r);let i=await this.matchAll(e,r);if(i.length!==0)return i[0]}async matchAll(e=void 0,r={}){ve.brandCheck(this,t),e!==void 0&&(e=ve.converters.RequestInfo(e)),r=ve.converters.CacheQueryOptions(r);let i=null;if(e!==void 0)if(e instanceof Sa){if(i=e[nn],i.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(i=new Sa(e)[nn]);let n=[];if(e===void 0)for(let a of this.#e)n.push(a[1]);else{let a=this.#i(i,r);for(let o of a)n.push(o[1])}let s=[];for(let a of n){let o=new FU(a.body?.source??null),l=o[nn].body;o[nn]=a,o[nn].body=l,o[r2][OU]=a.headersList,o[r2][LU]="immutable",s.push(o)}return Object.freeze(s)}async add(e){ve.brandCheck(this,t),ve.argumentLengthCheck(arguments,1,{header:"Cache.add"}),e=ve.converters.RequestInfo(e);let r=[e];return await this.addAll(r)}async addAll(e){ve.brandCheck(this,t),ve.argumentLengthCheck(arguments,1,{header:"Cache.addAll"}),e=ve.converters["sequence"](e);let r=[],i=[];for(let u of e){if(typeof u=="string")continue;let p=u[nn];if(!i2(p.url)||p.method!=="GET")throw ve.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme when method is not GET."})}let n=[];for(let u of e){let p=new Sa(u)[nn];if(!i2(p.url))throw ve.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme."});p.initiator="fetch",p.destination="subresource",i.push(p);let f=sA();n.push(eCe({request:p,dispatcher:rCe(),processResponse(h){if(h.type==="error"||h.status===206||h.status<200||h.status>299)f.reject(ve.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(h.headersList.contains("vary")){let E=B3(h.headersList.get("vary"));for(let C of E)if(C==="*"){f.reject(ve.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let b of n)b.abort();return}}},processResponseEndOfBody(h){if(h.aborted){f.reject(new DOMException("aborted","AbortError"));return}f.resolve(h)}})),r.push(f.promise)}let a=await Promise.all(r),o=[],l=0;for(let u of a){let p={type:"put",request:i[l],response:u};o.push(p),l++}let c=sA(),d=null;try{this.#r(o)}catch(u){d=u}return queueMicrotask(()=>{d===null?c.resolve(void 0):c.reject(d)}),c.promise}async put(e,r){ve.brandCheck(this,t),ve.argumentLengthCheck(arguments,2,{header:"Cache.put"}),e=ve.converters.RequestInfo(e),r=ve.converters.Response(r);let i=null;if(e instanceof Sa?i=e[nn]:i=new Sa(e)[nn],!i2(i.url)||i.method!=="GET")throw ve.errors.exception({header:"Cache.put",message:"Expected an http/s scheme when method is not GET"});let n=r[nn];if(n.status===206)throw ve.errors.exception({header:"Cache.put",message:"Got 206 status"});if(n.headersList.contains("vary")){let p=B3(n.headersList.get("vary"));for(let f of p)if(f==="*")throw ve.errors.exception({header:"Cache.put",message:"Got * vary field value"})}if(n.body&&(KEe(n.body.stream)||n.body.stream.locked))throw ve.errors.exception({header:"Cache.put",message:"Response body is locked or disturbed"});let s=XEe(n),a=sA();if(n.body!=null){let f=n.body.stream.getReader();tCe(f).then(a.resolve,a.reject)}else a.resolve(void 0);let o=[],l={type:"put",request:i,response:s};o.push(l);let c=await a.promise;s.body!=null&&(s.body.source=c);let d=sA(),u=null;try{this.#r(o)}catch(p){u=p}return queueMicrotask(()=>{u===null?d.resolve():d.reject(u)}),d.promise}async delete(e,r={}){ve.brandCheck(this,t),ve.argumentLengthCheck(arguments,1,{header:"Cache.delete"}),e=ve.converters.RequestInfo(e),r=ve.converters.CacheQueryOptions(r);let i=null;if(e instanceof Sa){if(i=e[nn],i.method!=="GET"&&!r.ignoreMethod)return!1}else w3(typeof e=="string"),i=new Sa(e)[nn];let n=[],s={type:"delete",request:i,options:r};n.push(s);let a=sA(),o=null,l;try{l=this.#r(n)}catch(c){o=c}return queueMicrotask(()=>{o===null?a.resolve(!!l?.length):a.reject(o)}),a.promise}async keys(e=void 0,r={}){ve.brandCheck(this,t),e!==void 0&&(e=ve.converters.RequestInfo(e)),r=ve.converters.CacheQueryOptions(r);let i=null;if(e!==void 0)if(e instanceof Sa){if(i=e[nn],i.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(i=new Sa(e)[nn]);let n=sA(),s=[];if(e===void 0)for(let a of this.#e)s.push(a[0]);else{let a=this.#i(i,r);for(let o of a)s.push(o[0])}return queueMicrotask(()=>{let a=[];for(let o of s){let l=new Sa("https://a");l[nn]=o,l[r2][OU]=o.headersList,l[r2][LU]="immutable",l[ZEe]=o.client,a.push(l)}n.resolve(Object.freeze(a))}),n.promise}#r(e){let r=this.#e,i=[...r],n=[],s=[];try{for(let a of e){if(a.type!=="delete"&&a.type!=="put")throw ve.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(a.type==="delete"&&a.response!=null)throw ve.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#i(a.request,a.options,n).length)throw new DOMException("???","InvalidStateError");let o;if(a.type==="delete"){if(o=this.#i(a.request,a.options),o.length===0)return[];for(let l of o){let c=r.indexOf(l);w3(c!==-1),r.splice(c,1)}}else if(a.type==="put"){if(a.response==null)throw ve.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let l=a.request;if(!i2(l.url))throw ve.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(l.method!=="GET")throw ve.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(a.options!=null)throw ve.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});o=this.#i(a.request);for(let c of o){let d=r.indexOf(c);w3(d!==-1),r.splice(d,1)}r.push([a.request,a.response]),n.push([a.request,a.response])}s.push([a.request,a.response])}return s}catch(a){throw this.#e.length=0,this.#e=i,a}}#i(e,r,i){let n=[],s=i??this.#e;for(let a of s){let[o,l]=a;this.#t(e,o,l,r)&&n.push(a)}return n}#t(e,r,i=null,n){let s=new URL(e.url),a=new URL(r.url);if(n?.ignoreSearch&&(a.search="",s.search=""),!$Ee(s,a,!0))return!1;if(i==null||n?.ignoreVary||!i.headersList.contains("vary"))return!0;let o=B3(i.headersList.get("vary"));for(let l of o){if(l==="*")return!1;let c=r.headersList.get(l),d=e.headersList.get(l);if(c!==d)return!1}return!0}};Object.defineProperties(n2.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:ad,matchAll:ad,add:ad,addAll:ad,put:ad,delete:ad,keys:ad});var MU=[{key:"ignoreSearch",converter:ve.converters.boolean,defaultValue:!1},{key:"ignoreMethod",converter:ve.converters.boolean,defaultValue:!1},{key:"ignoreVary",converter:ve.converters.boolean,defaultValue:!1}];ve.converters.CacheQueryOptions=ve.dictionaryConverter(MU);ve.converters.MultiCacheQueryOptions=ve.dictionaryConverter([...MU,{key:"cacheName",converter:ve.converters.DOMString}]);ve.converters.Response=ve.interfaceConverter(FU);ve.converters["sequence"]=ve.sequenceConverter(ve.converters.RequestInfo);UU.exports={Cache:n2}});var GU=A((Ost,HU)=>{"use strict";var{kConstruct:Zh}=t2(),{Cache:s2}=qU(),{webidl:sn}=Xi(),{kEnumerableProperty:em}=ut(),a2=class t{#e=new Map;constructor(){arguments[0]!==Zh&&sn.illegalConstructor()}async match(e,r={}){if(sn.brandCheck(this,t),sn.argumentLengthCheck(arguments,1,{header:"CacheStorage.match"}),e=sn.converters.RequestInfo(e),r=sn.converters.MultiCacheQueryOptions(r),r.cacheName!=null){if(this.#e.has(r.cacheName)){let i=this.#e.get(r.cacheName);return await new s2(Zh,i).match(e,r)}}else for(let i of this.#e.values()){let s=await new s2(Zh,i).match(e,r);if(s!==void 0)return s}}async has(e){return sn.brandCheck(this,t),sn.argumentLengthCheck(arguments,1,{header:"CacheStorage.has"}),e=sn.converters.DOMString(e),this.#e.has(e)}async open(e){if(sn.brandCheck(this,t),sn.argumentLengthCheck(arguments,1,{header:"CacheStorage.open"}),e=sn.converters.DOMString(e),this.#e.has(e)){let i=this.#e.get(e);return new s2(Zh,i)}let r=[];return this.#e.set(e,r),new s2(Zh,r)}async delete(e){return sn.brandCheck(this,t),sn.argumentLengthCheck(arguments,1,{header:"CacheStorage.delete"}),e=sn.converters.DOMString(e),this.#e.delete(e)}async keys(){return sn.brandCheck(this,t),[...this.#e.keys()]}};Object.defineProperties(a2.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:em,has:em,open:em,delete:em,keys:em});HU.exports={CacheStorage:a2}});var zU=A((Lst,jU)=>{"use strict";jU.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var Q3=A((Fst,$U)=>{"use strict";function iCe(t){if(t.length===0)return!1;for(let e of t){let r=e.charCodeAt(0);if(r>=0||r<=8||r>=10||r<=31||r===127)return!1}}function VU(t){for(let e of t){let r=e.charCodeAt(0);if(r<=32||r>127||e==="("||e===")"||e===">"||e==="<"||e==="@"||e===","||e===";"||e===":"||e==="\\"||e==='"'||e==="/"||e==="["||e==="]"||e==="?"||e==="="||e==="{"||e==="}")throw new Error("Invalid cookie name")}}function YU(t){for(let e of t){let r=e.charCodeAt(0);if(r<33||r===34||r===44||r===59||r===92||r>126)throw new Error("Invalid header value")}}function WU(t){for(let e of t)if(e.charCodeAt(0)<33||e===";")throw new Error("Invalid cookie path")}function nCe(t){if(t.startsWith("-")||t.endsWith(".")||t.endsWith("-"))throw new Error("Invalid cookie domain")}function JU(t){typeof t=="number"&&(t=new Date(t));let e=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=e[t.getUTCDay()],n=t.getUTCDate().toString().padStart(2,"0"),s=r[t.getUTCMonth()],a=t.getUTCFullYear(),o=t.getUTCHours().toString().padStart(2,"0"),l=t.getUTCMinutes().toString().padStart(2,"0"),c=t.getUTCSeconds().toString().padStart(2,"0");return`${i}, ${n} ${s} ${a} ${o}:${l}:${c} GMT`}function sCe(t){if(t<0)throw new Error("Invalid cookie max-age")}function aCe(t){if(t.name.length===0)return null;VU(t.name),YU(t.value);let e=[`${t.name}=${t.value}`];t.name.startsWith("__Secure-")&&(t.secure=!0),t.name.startsWith("__Host-")&&(t.secure=!0,t.domain=null,t.path="/"),t.secure&&e.push("Secure"),t.httpOnly&&e.push("HttpOnly"),typeof t.maxAge=="number"&&(sCe(t.maxAge),e.push(`Max-Age=${t.maxAge}`)),t.domain&&(nCe(t.domain),e.push(`Domain=${t.domain}`)),t.path&&(WU(t.path),e.push(`Path=${t.path}`)),t.expires&&t.expires.toString()!=="Invalid Date"&&e.push(`Expires=${JU(t.expires)}`),t.sameSite&&e.push(`SameSite=${t.sameSite}`);for(let r of t.unparsed){if(!r.includes("="))throw new Error("Invalid unparsed");let[i,...n]=r.split("=");e.push(`${i.trim()}=${n.join("=")}`)}return e.join("; ")}$U.exports={isCTLExcludingHtab:iCe,validateCookieName:VU,validateCookiePath:WU,validateCookieValue:YU,toIMFDate:JU,stringify:aCe}});var XU=A((Mst,KU)=>{"use strict";var{maxNameValuePairSize:oCe,maxAttributeValueSize:lCe}=zU(),{isCTLExcludingHtab:cCe}=Q3(),{collectASequenceOfCodePointsFast:o2}=Ws(),dCe=require("assert");function uCe(t){if(cCe(t))return null;let e="",r="",i="",n="";if(t.includes(";")){let s={position:0};e=o2(";",t,s),r=t.slice(s.position)}else e=t;if(!e.includes("="))n=e;else{let s={position:0};i=o2("=",e,s),n=e.slice(s.position+1)}return i=i.trim(),n=n.trim(),i.length+n.length>oCe?null:{name:i,value:n,...aA(r)}}function aA(t,e={}){if(t.length===0)return e;dCe(t[0]===";"),t=t.slice(1);let r="";t.includes(";")?(r=o2(";",t,{position:0}),t=t.slice(r.length)):(r=t,t="");let i="",n="";if(r.includes("=")){let a={position:0};i=o2("=",r,a),n=r.slice(a.position+1)}else i=r;if(i=i.trim(),n=n.trim(),n.length>lCe)return aA(t,e);let s=i.toLowerCase();if(s==="expires"){let a=new Date(n);e.expires=a}else if(s==="max-age"){let a=n.charCodeAt(0);if((a<48||a>57)&&n[0]!=="-"||!/^\d+$/.test(n))return aA(t,e);let o=Number(n);e.maxAge=o}else if(s==="domain"){let a=n;a[0]==="."&&(a=a.slice(1)),a=a.toLowerCase(),e.domain=a}else if(s==="path"){let a="";n.length===0||n[0]!=="/"?a="/":a=n,e.path=a}else if(s==="secure")e.secure=!0;else if(s==="httponly")e.httpOnly=!0;else if(s==="samesite"){let a="Default",o=n.toLowerCase();o.includes("none")&&(a="None"),o.includes("strict")&&(a="Strict"),o.includes("lax")&&(a="Lax"),e.sameSite=a}else e.unparsed??=[],e.unparsed.push(`${i}=${n}`);return aA(t,e)}KU.exports={parseSetCookie:uCe,parseUnparsedAttributes:aA}});var rq=A((Ust,tq)=>{"use strict";var{parseSetCookie:ACe}=XU(),{stringify:ZU}=Q3(),{webidl:rt}=Xi(),{Headers:l2}=id();function pCe(t){rt.argumentLengthCheck(arguments,1,{header:"getCookies"}),rt.brandCheck(t,l2,{strict:!1});let e=t.get("cookie"),r={};if(!e)return r;for(let i of e.split(";")){let[n,...s]=i.split("=");r[n.trim()]=s.join("=")}return r}function fCe(t,e,r){rt.argumentLengthCheck(arguments,2,{header:"deleteCookie"}),rt.brandCheck(t,l2,{strict:!1}),e=rt.converters.DOMString(e),r=rt.converters.DeleteCookieAttributes(r),eq(t,{name:e,value:"",expires:new Date(0),...r})}function hCe(t){rt.argumentLengthCheck(arguments,1,{header:"getSetCookies"}),rt.brandCheck(t,l2,{strict:!1});let e=t.getSetCookie();return e?e.map(r=>ACe(r)):[]}function eq(t,e){rt.argumentLengthCheck(arguments,2,{header:"setCookie"}),rt.brandCheck(t,l2,{strict:!1}),e=rt.converters.Cookie(e),ZU(e)&&t.append("Set-Cookie",ZU(e))}rt.converters.DeleteCookieAttributes=rt.dictionaryConverter([{converter:rt.nullableConverter(rt.converters.DOMString),key:"path",defaultValue:null},{converter:rt.nullableConverter(rt.converters.DOMString),key:"domain",defaultValue:null}]);rt.converters.Cookie=rt.dictionaryConverter([{converter:rt.converters.DOMString,key:"name"},{converter:rt.converters.DOMString,key:"value"},{converter:rt.nullableConverter(t=>typeof t=="number"?rt.converters["unsigned long long"](t):new Date(t)),key:"expires",defaultValue:null},{converter:rt.nullableConverter(rt.converters["long long"]),key:"maxAge",defaultValue:null},{converter:rt.nullableConverter(rt.converters.DOMString),key:"domain",defaultValue:null},{converter:rt.nullableConverter(rt.converters.DOMString),key:"path",defaultValue:null},{converter:rt.nullableConverter(rt.converters.boolean),key:"secure",defaultValue:null},{converter:rt.nullableConverter(rt.converters.boolean),key:"httpOnly",defaultValue:null},{converter:rt.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:rt.sequenceConverter(rt.converters.DOMString),key:"unparsed",defaultValue:[]}]);tq.exports={getCookies:pCe,deleteCookie:fCe,getSetCookies:hCe,setCookie:eq}});var oA=A((qst,iq)=>{"use strict";var mCe="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",gCe={enumerable:!0,writable:!1,configurable:!1},yCe={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},ECe={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},CCe=2**16-1,bCe={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},ICe=Buffer.allocUnsafe(0);iq.exports={uid:mCe,staticPropertyDescriptors:gCe,states:yCe,opcodes:ECe,maxUnsigned16Bit:CCe,parserStates:bCe,emptyBuffer:ICe}});var tm=A((Hst,nq)=>{"use strict";nq.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var _3=A((Gst,sq)=>{"use strict";var{webidl:Ne}=Xi(),{kEnumerableProperty:Bn}=ut(),{MessagePort:BCe}=require("worker_threads"),c2=class t extends Event{#e;constructor(e,r={}){Ne.argumentLengthCheck(arguments,1,{header:"MessageEvent constructor"}),e=Ne.converters.DOMString(e),r=Ne.converters.MessageEventInit(r),super(e,r),this.#e=r}get data(){return Ne.brandCheck(this,t),this.#e.data}get origin(){return Ne.brandCheck(this,t),this.#e.origin}get lastEventId(){return Ne.brandCheck(this,t),this.#e.lastEventId}get source(){return Ne.brandCheck(this,t),this.#e.source}get ports(){return Ne.brandCheck(this,t),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(e,r=!1,i=!1,n=null,s="",a="",o=null,l=[]){return Ne.brandCheck(this,t),Ne.argumentLengthCheck(arguments,1,{header:"MessageEvent.initMessageEvent"}),new t(e,{bubbles:r,cancelable:i,data:n,origin:s,lastEventId:a,source:o,ports:l})}},d2=class t extends Event{#e;constructor(e,r={}){Ne.argumentLengthCheck(arguments,1,{header:"CloseEvent constructor"}),e=Ne.converters.DOMString(e),r=Ne.converters.CloseEventInit(r),super(e,r),this.#e=r}get wasClean(){return Ne.brandCheck(this,t),this.#e.wasClean}get code(){return Ne.brandCheck(this,t),this.#e.code}get reason(){return Ne.brandCheck(this,t),this.#e.reason}},u2=class t extends Event{#e;constructor(e,r){Ne.argumentLengthCheck(arguments,1,{header:"ErrorEvent constructor"}),super(e,r),e=Ne.converters.DOMString(e),r=Ne.converters.ErrorEventInit(r??{}),this.#e=r}get message(){return Ne.brandCheck(this,t),this.#e.message}get filename(){return Ne.brandCheck(this,t),this.#e.filename}get lineno(){return Ne.brandCheck(this,t),this.#e.lineno}get colno(){return Ne.brandCheck(this,t),this.#e.colno}get error(){return Ne.brandCheck(this,t),this.#e.error}};Object.defineProperties(c2.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:Bn,origin:Bn,lastEventId:Bn,source:Bn,ports:Bn,initMessageEvent:Bn});Object.defineProperties(d2.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:Bn,code:Bn,wasClean:Bn});Object.defineProperties(u2.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:Bn,filename:Bn,lineno:Bn,colno:Bn,error:Bn});Ne.converters.MessagePort=Ne.interfaceConverter(BCe);Ne.converters["sequence"]=Ne.sequenceConverter(Ne.converters.MessagePort);var S3=[{key:"bubbles",converter:Ne.converters.boolean,defaultValue:!1},{key:"cancelable",converter:Ne.converters.boolean,defaultValue:!1},{key:"composed",converter:Ne.converters.boolean,defaultValue:!1}];Ne.converters.MessageEventInit=Ne.dictionaryConverter([...S3,{key:"data",converter:Ne.converters.any,defaultValue:null},{key:"origin",converter:Ne.converters.USVString,defaultValue:""},{key:"lastEventId",converter:Ne.converters.DOMString,defaultValue:""},{key:"source",converter:Ne.nullableConverter(Ne.converters.MessagePort),defaultValue:null},{key:"ports",converter:Ne.converters["sequence"],get defaultValue(){return[]}}]);Ne.converters.CloseEventInit=Ne.dictionaryConverter([...S3,{key:"wasClean",converter:Ne.converters.boolean,defaultValue:!1},{key:"code",converter:Ne.converters["unsigned short"],defaultValue:0},{key:"reason",converter:Ne.converters.USVString,defaultValue:""}]);Ne.converters.ErrorEventInit=Ne.dictionaryConverter([...S3,{key:"message",converter:Ne.converters.DOMString,defaultValue:""},{key:"filename",converter:Ne.converters.USVString,defaultValue:""},{key:"lineno",converter:Ne.converters["unsigned long"],defaultValue:0},{key:"colno",converter:Ne.converters["unsigned long"],defaultValue:0},{key:"error",converter:Ne.converters.any}]);sq.exports={MessageEvent:c2,CloseEvent:d2,ErrorEvent:u2}});var f2=A((jst,lq)=>{"use strict";var{kReadyState:A2,kController:wCe,kResponse:QCe,kBinaryType:SCe,kWebSocketURL:_Ce}=tm(),{states:p2,opcodes:aq}=oA(),{MessageEvent:vCe,ErrorEvent:NCe}=_3();function xCe(t){return t[A2]===p2.OPEN}function RCe(t){return t[A2]===p2.CLOSING}function TCe(t){return t[A2]===p2.CLOSED}function v3(t,e,r=Event,i){let n=new r(t,i);e.dispatchEvent(n)}function DCe(t,e,r){if(t[A2]!==p2.OPEN)return;let i;if(e===aq.TEXT)try{i=new TextDecoder("utf-8",{fatal:!0}).decode(r)}catch{oq(t,"Received invalid UTF-8 in text frame.");return}else e===aq.BINARY&&(t[SCe]==="blob"?i=new Blob([r]):i=new Uint8Array(r).buffer);v3("message",t,vCe,{origin:t[_Ce].origin,data:i})}function PCe(t){if(t.length===0)return!1;for(let e of t){let r=e.charCodeAt(0);if(r<33||r>126||e==="("||e===")"||e==="<"||e===">"||e==="@"||e===","||e===";"||e===":"||e==="\\"||e==='"'||e==="/"||e==="["||e==="]"||e==="?"||e==="="||e==="{"||e==="}"||r===32||r===9)return!1}return!0}function kCe(t){return t>=1e3&&t<1015?t!==1004&&t!==1005&&t!==1006:t>=3e3&&t<=4999}function oq(t,e){let{[wCe]:r,[QCe]:i}=t;r.abort(),i?.socket&&!i.socket.destroyed&&i.socket.destroy(),e&&v3("error",t,NCe,{error:new Error(e)})}lq.exports={isEstablished:xCe,isClosing:RCe,isClosed:TCe,fireEvent:v3,isValidSubprotocol:PCe,isValidStatusCode:kCe,failWebsocketConnection:oq,websocketMessageReceived:DCe}});var fq=A((zst,pq)=>{"use strict";var x3=require("diagnostics_channel"),{uid:OCe,states:dq}=oA(),{kReadyState:uq,kSentClose:cq,kByteParser:Aq,kReceivedClose:LCe}=tm(),{fireEvent:FCe,failWebsocketConnection:od}=f2(),{CloseEvent:MCe}=_3(),{makeRequest:UCe}=$h(),{fetching:qCe}=Ky(),{Headers:HCe}=id(),{getGlobalDispatcher:GCe}=Ju(),{kHeadersList:jCe}=zt(),Qo={};Qo.open=x3.channel("undici:websocket:open");Qo.close=x3.channel("undici:websocket:close");Qo.socketError=x3.channel("undici:websocket:socket_error");var N3;try{N3=require("crypto")}catch{}function zCe(t,e,r,i,n){let s=t;s.protocol=t.protocol==="ws:"?"http:":"https:";let a=UCe({urlList:[s],serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(n.headers){let d=new HCe(n.headers)[jCe];a.headersList=d}let o=N3.randomBytes(16).toString("base64");a.headersList.append("sec-websocket-key",o),a.headersList.append("sec-websocket-version","13");for(let d of e)a.headersList.append("sec-websocket-protocol",d);let l="";return qCe({request:a,useParallelQueue:!0,dispatcher:n.dispatcher??GCe(),processResponse(d){if(d.type==="error"||d.status!==101){od(r,"Received network error or non-101 status code.");return}if(e.length!==0&&!d.headersList.get("Sec-WebSocket-Protocol")){od(r,"Server did not respond with sent protocols.");return}if(d.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){od(r,'Server did not set Upgrade header to "websocket".');return}if(d.headersList.get("Connection")?.toLowerCase()!=="upgrade"){od(r,'Server did not set Connection header to "upgrade".');return}let u=d.headersList.get("Sec-WebSocket-Accept"),p=N3.createHash("sha1").update(o+OCe).digest("base64");if(u!==p){od(r,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let f=d.headersList.get("Sec-WebSocket-Extensions");if(f!==null&&f!==l){od(r,"Received different permessage-deflate than the one set.");return}let h=d.headersList.get("Sec-WebSocket-Protocol");if(h!==null&&h!==a.headersList.get("Sec-WebSocket-Protocol")){od(r,"Protocol was not set in the opening handshake.");return}d.socket.on("data",VCe),d.socket.on("close",YCe),d.socket.on("error",WCe),Qo.open.hasSubscribers&&Qo.open.publish({address:d.socket.address(),protocol:h,extensions:f}),i(d)}})}function VCe(t){this.ws[Aq].write(t)||this.pause()}function YCe(){let{ws:t}=this,e=t[cq]&&t[LCe],r=1005,i="",n=t[Aq].closingInfo;n?(r=n.code??1005,i=n.reason):t[cq]||(r=1006),t[uq]=dq.CLOSED,FCe("close",t,MCe,{wasClean:e,code:r,reason:i}),Qo.close.hasSubscribers&&Qo.close.publish({websocket:t,code:r,reason:i})}function WCe(t){let{ws:e}=this;e[uq]=dq.CLOSING,Qo.socketError.hasSubscribers&&Qo.socketError.publish(t),this.destroy()}pq.exports={establishWebSocketConnection:zCe}});var T3=A((Vst,mq)=>{"use strict";var{maxUnsigned16Bit:JCe}=oA(),hq;try{hq=require("crypto")}catch{}var R3=class{constructor(e){this.frameData=e,this.maskKey=hq.randomBytes(4)}createFrame(e){let r=this.frameData?.byteLength??0,i=r,n=6;r>JCe?(n+=8,i=127):r>125&&(n+=2,i=126);let s=Buffer.allocUnsafe(r+n);s[0]=s[1]=0,s[0]|=128,s[0]=(s[0]&240)+e;s[n-4]=this.maskKey[0],s[n-3]=this.maskKey[1],s[n-2]=this.maskKey[2],s[n-1]=this.maskKey[3],s[1]=i,i===126?s.writeUInt16BE(r,2):i===127&&(s[2]=s[3]=0,s.writeUIntBE(r,4,6)),s[1]|=128;for(let a=0;a{"use strict";var{Writable:$Ce}=require("stream"),Iq=require("diagnostics_channel"),{parserStates:hs,opcodes:ms,states:KCe,emptyBuffer:XCe}=oA(),{kReadyState:ZCe,kSentClose:gq,kResponse:yq,kReceivedClose:Eq}=tm(),{isValidStatusCode:Cq,failWebsocketConnection:rm,websocketMessageReceived:e4e}=f2(),{WebsocketFrameSend:bq}=T3(),lA={};lA.ping=Iq.channel("undici:websocket:ping");lA.pong=Iq.channel("undici:websocket:pong");var D3=class extends $Ce{#e=[];#r=0;#i=hs.INFO;#t={};#a=[];constructor(e){super(),this.ws=e}_write(e,r,i){this.#e.push(e),this.#r+=e.length,this.run(i)}run(e){for(;;){if(this.#i===hs.INFO){if(this.#r<2)return e();let r=this.consume(2);if(this.#t.fin=(r[0]&128)!==0,this.#t.opcode=r[0]&15,this.#t.originalOpcode??=this.#t.opcode,this.#t.fragmented=!this.#t.fin&&this.#t.opcode!==ms.CONTINUATION,this.#t.fragmented&&this.#t.opcode!==ms.BINARY&&this.#t.opcode!==ms.TEXT){rm(this.ws,"Invalid frame type was fragmented.");return}let i=r[1]&127;if(i<=125?(this.#t.payloadLength=i,this.#i=hs.READ_DATA):i===126?this.#i=hs.PAYLOADLENGTH_16:i===127&&(this.#i=hs.PAYLOADLENGTH_64),this.#t.fragmented&&i>125){rm(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#t.opcode===ms.PING||this.#t.opcode===ms.PONG||this.#t.opcode===ms.CLOSE)&&i>125){rm(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#t.opcode===ms.CLOSE){if(i===1){rm(this.ws,"Received close frame with a 1-byte body.");return}let n=this.consume(i);if(this.#t.closeInfo=this.parseCloseBody(!1,n),!this.ws[gq]){let s=Buffer.allocUnsafe(2);s.writeUInt16BE(this.#t.closeInfo.code,0);let a=new bq(s);this.ws[yq].socket.write(a.createFrame(ms.CLOSE),o=>{o||(this.ws[gq]=!0)})}this.ws[ZCe]=KCe.CLOSING,this.ws[Eq]=!0,this.end();return}else if(this.#t.opcode===ms.PING){let n=this.consume(i);if(!this.ws[Eq]){let s=new bq(n);this.ws[yq].socket.write(s.createFrame(ms.PONG)),lA.ping.hasSubscribers&&lA.ping.publish({payload:n})}if(this.#i=hs.INFO,this.#r>0)continue;e();return}else if(this.#t.opcode===ms.PONG){let n=this.consume(i);if(lA.pong.hasSubscribers&&lA.pong.publish({payload:n}),this.#r>0)continue;e();return}}else if(this.#i===hs.PAYLOADLENGTH_16){if(this.#r<2)return e();let r=this.consume(2);this.#t.payloadLength=r.readUInt16BE(0),this.#i=hs.READ_DATA}else if(this.#i===hs.PAYLOADLENGTH_64){if(this.#r<8)return e();let r=this.consume(8),i=r.readUInt32BE(0);if(i>2**31-1){rm(this.ws,"Received payload length > 2^31 bytes.");return}let n=r.readUInt32BE(4);this.#t.payloadLength=(i<<8)+n,this.#i=hs.READ_DATA}else if(this.#i===hs.READ_DATA){if(this.#r=this.#t.payloadLength){let r=this.consume(this.#t.payloadLength);if(this.#a.push(r),!this.#t.fragmented||this.#t.fin&&this.#t.opcode===ms.CONTINUATION){let i=Buffer.concat(this.#a);e4e(this.ws,this.#t.originalOpcode,i),this.#t={},this.#a.length=0}this.#i=hs.INFO}}if(!(this.#r>0)){e();break}}}consume(e){if(e>this.#r)return null;if(e===0)return XCe;if(this.#e[0].length===e)return this.#r-=this.#e[0].length,this.#e.shift();let r=Buffer.allocUnsafe(e),i=0;for(;i!==e;){let n=this.#e[0],{length:s}=n;if(s+i===e){r.set(this.#e.shift(),i);break}else if(s+i>e){r.set(n.subarray(0,e-i),i),this.#e[0]=n.subarray(e-i);break}else r.set(this.#e.shift(),i),i+=n.length}return this.#r-=e,r}parseCloseBody(e,r){let i;if(r.length>=2&&(i=r.readUInt16BE(0)),e)return Cq(i)?{code:i}:null;let n=r.subarray(2);if(n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3)),i!==void 0&&!Cq(i))return null;try{n=new TextDecoder("utf-8",{fatal:!0}).decode(n)}catch{return null}return{code:i,reason:n}}get closingInfo(){return this.#t.closeInfo}};Bq.exports={ByteParser:D3}});var Tq=A((Wst,Rq)=>{"use strict";var{webidl:Me}=Xi(),{DOMException:Cl}=ul(),{URLSerializer:t4e}=Ws(),{getGlobalOrigin:r4e}=_u(),{staticPropertyDescriptors:bl,states:cA,opcodes:im,emptyBuffer:i4e}=oA(),{kWebSocketURL:Qq,kReadyState:So,kController:n4e,kBinaryType:h2,kResponse:m2,kSentClose:s4e,kByteParser:a4e}=tm(),{isEstablished:Sq,isClosing:_q,isValidSubprotocol:o4e,failWebsocketConnection:l4e,fireEvent:c4e}=f2(),{establishWebSocketConnection:d4e}=fq(),{WebsocketFrameSend:nm}=T3(),{ByteParser:u4e}=wq(),{kEnumerableProperty:gs,isBlobLike:Nq}=ut(),{getGlobalDispatcher:A4e}=Ju(),{types:xq}=require("util"),vq=!1,Kn=class t extends EventTarget{#e={open:null,error:null,close:null,message:null};#r=0;#i="";#t="";constructor(e,r=[]){super(),Me.argumentLengthCheck(arguments,1,{header:"WebSocket constructor"}),vq||(vq=!0,process.emitWarning("WebSockets are experimental, expect them to change at any time.",{code:"UNDICI-WS"}));let i=Me.converters["DOMString or sequence or WebSocketInit"](r);e=Me.converters.USVString(e),r=i.protocols;let n=r4e(),s;try{s=new URL(e,n)}catch(a){throw new Cl(a,"SyntaxError")}if(s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),s.protocol!=="ws:"&&s.protocol!=="wss:")throw new Cl(`Expected a ws: or wss: protocol, got ${s.protocol}`,"SyntaxError");if(s.hash||s.href.endsWith("#"))throw new Cl("Got fragment","SyntaxError");if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(a=>a.toLowerCase())).size)throw new Cl("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(a=>o4e(a)))throw new Cl("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[Qq]=new URL(s.href),this[n4e]=d4e(s,r,this,a=>this.#a(a),i),this[So]=t.CONNECTING,this[h2]="blob"}close(e=void 0,r=void 0){if(Me.brandCheck(this,t),e!==void 0&&(e=Me.converters["unsigned short"](e,{clamp:!0})),r!==void 0&&(r=Me.converters.USVString(r)),e!==void 0&&e!==1e3&&(e<3e3||e>4999))throw new Cl("invalid code","InvalidAccessError");let i=0;if(r!==void 0&&(i=Buffer.byteLength(r),i>123))throw new Cl(`Reason must be less than 123 bytes; received ${i}`,"SyntaxError");if(!(this[So]===t.CLOSING||this[So]===t.CLOSED))if(!Sq(this))l4e(this,"Connection was closed before it was established."),this[So]=t.CLOSING;else if(_q(this))this[So]=t.CLOSING;else{let n=new nm;e!==void 0&&r===void 0?(n.frameData=Buffer.allocUnsafe(2),n.frameData.writeUInt16BE(e,0)):e!==void 0&&r!==void 0?(n.frameData=Buffer.allocUnsafe(2+i),n.frameData.writeUInt16BE(e,0),n.frameData.write(r,2,"utf-8")):n.frameData=i4e,this[m2].socket.write(n.createFrame(im.CLOSE),a=>{a||(this[s4e]=!0)}),this[So]=cA.CLOSING}}send(e){if(Me.brandCheck(this,t),Me.argumentLengthCheck(arguments,1,{header:"WebSocket.send"}),e=Me.converters.WebSocketSendData(e),this[So]===t.CONNECTING)throw new Cl("Sent before connected.","InvalidStateError");if(!Sq(this)||_q(this))return;let r=this[m2].socket;if(typeof e=="string"){let i=Buffer.from(e),s=new nm(i).createFrame(im.TEXT);this.#r+=i.byteLength,r.write(s,()=>{this.#r-=i.byteLength})}else if(xq.isArrayBuffer(e)){let i=Buffer.from(e),s=new nm(i).createFrame(im.BINARY);this.#r+=i.byteLength,r.write(s,()=>{this.#r-=i.byteLength})}else if(ArrayBuffer.isView(e)){let i=Buffer.from(e,e.byteOffset,e.byteLength),s=new nm(i).createFrame(im.BINARY);this.#r+=i.byteLength,r.write(s,()=>{this.#r-=i.byteLength})}else if(Nq(e)){let i=new nm;e.arrayBuffer().then(n=>{let s=Buffer.from(n);i.frameData=s;let a=i.createFrame(im.BINARY);this.#r+=s.byteLength,r.write(a,()=>{this.#r-=s.byteLength})})}}get readyState(){return Me.brandCheck(this,t),this[So]}get bufferedAmount(){return Me.brandCheck(this,t),this.#r}get url(){return Me.brandCheck(this,t),t4e(this[Qq])}get extensions(){return Me.brandCheck(this,t),this.#t}get protocol(){return Me.brandCheck(this,t),this.#i}get onopen(){return Me.brandCheck(this,t),this.#e.open}set onopen(e){Me.brandCheck(this,t),this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onerror(){return Me.brandCheck(this,t),this.#e.error}set onerror(e){Me.brandCheck(this,t),this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}get onclose(){return Me.brandCheck(this,t),this.#e.close}set onclose(e){Me.brandCheck(this,t),this.#e.close&&this.removeEventListener("close",this.#e.close),typeof e=="function"?(this.#e.close=e,this.addEventListener("close",e)):this.#e.close=null}get onmessage(){return Me.brandCheck(this,t),this.#e.message}set onmessage(e){Me.brandCheck(this,t),this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get binaryType(){return Me.brandCheck(this,t),this[h2]}set binaryType(e){Me.brandCheck(this,t),e!=="blob"&&e!=="arraybuffer"?this[h2]="blob":this[h2]=e}#a(e){this[m2]=e;let r=new u4e(this);r.on("drain",function(){this.ws[m2].socket.resume()}),e.socket.ws=this,this[a4e]=r,this[So]=cA.OPEN;let i=e.headersList.get("sec-websocket-extensions");i!==null&&(this.#t=i);let n=e.headersList.get("sec-websocket-protocol");n!==null&&(this.#i=n),c4e("open",this)}};Kn.CONNECTING=Kn.prototype.CONNECTING=cA.CONNECTING;Kn.OPEN=Kn.prototype.OPEN=cA.OPEN;Kn.CLOSING=Kn.prototype.CLOSING=cA.CLOSING;Kn.CLOSED=Kn.prototype.CLOSED=cA.CLOSED;Object.defineProperties(Kn.prototype,{CONNECTING:bl,OPEN:bl,CLOSING:bl,CLOSED:bl,url:gs,readyState:gs,bufferedAmount:gs,onopen:gs,onerror:gs,onclose:gs,close:gs,onmessage:gs,binaryType:gs,send:gs,extensions:gs,protocol:gs,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Kn,{CONNECTING:bl,OPEN:bl,CLOSING:bl,CLOSED:bl});Me.converters["sequence"]=Me.sequenceConverter(Me.converters.DOMString);Me.converters["DOMString or sequence"]=function(t){return Me.util.Type(t)==="Object"&&Symbol.iterator in t?Me.converters["sequence"](t):Me.converters.DOMString(t)};Me.converters.WebSocketInit=Me.dictionaryConverter([{key:"protocols",converter:Me.converters["DOMString or sequence"],get defaultValue(){return[]}},{key:"dispatcher",converter:t=>t,get defaultValue(){return A4e()}},{key:"headers",converter:Me.nullableConverter(Me.converters.HeadersInit)}]);Me.converters["DOMString or sequence or WebSocketInit"]=function(t){return Me.util.Type(t)==="Object"&&!(Symbol.iterator in t)?Me.converters.WebSocketInit(t):{protocols:Me.converters["DOMString or sequence"](t)}};Me.converters.WebSocketSendData=function(t){if(Me.util.Type(t)==="Object"){if(Nq(t))return Me.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||xq.isAnyArrayBuffer(t))return Me.converters.BufferSource(t)}return Me.converters.USVString(t)};Rq.exports={WebSocket:Kn}});var Oq=A((Jst,Ge)=>{"use strict";var p4e=Lh(),Dq=K0(),Pq=Dt(),f4e=Uu(),h4e=zL(),m4e=qh(),ld=ut(),{InvalidArgumentError:g2}=Pq,dA=OF(),g4e=Nh(),y4e=Gw(),E4e=yM(),C4e=Vw(),b4e=Rw(),I4e=wM(),B4e=NM(),{getGlobalDispatcher:kq,setGlobalDispatcher:w4e}=Ju(),Q4e=kM(),S4e=H8(),_4e=ty(),P3;try{require("crypto"),P3=!0}catch{P3=!1}Object.assign(Dq.prototype,dA);Ge.exports.Dispatcher=Dq;Ge.exports.Client=p4e;Ge.exports.Pool=f4e;Ge.exports.BalancedPool=h4e;Ge.exports.Agent=m4e;Ge.exports.ProxyAgent=I4e;Ge.exports.RetryHandler=B4e;Ge.exports.DecoratorHandler=Q4e;Ge.exports.RedirectHandler=S4e;Ge.exports.createRedirectInterceptor=_4e;Ge.exports.buildConnector=g4e;Ge.exports.errors=Pq;function sm(t){return(e,r,i)=>{if(typeof r=="function"&&(i=r,r=null),!e||typeof e!="string"&&typeof e!="object"&&!(e instanceof URL))throw new g2("invalid url");if(r!=null&&typeof r!="object")throw new g2("invalid opts");if(r&&r.path!=null){if(typeof r.path!="string")throw new g2("invalid opts.path");let a=r.path;r.path.startsWith("/")||(a=`/${a}`),e=new URL(ld.parseOrigin(e).origin+a)}else r||(r=typeof e=="object"?e:{}),e=ld.parseURL(e);let{agent:n,dispatcher:s=kq()}=r;if(n)throw new g2("unsupported opts.agent. Did you mean opts.client?");return t.call(s,{...r,origin:e.origin,path:e.search?`${e.pathname}${e.search}`:e.pathname,method:r.method||(r.body?"PUT":"GET")},i)}}Ge.exports.setGlobalDispatcher=w4e;Ge.exports.getGlobalDispatcher=kq;if(ld.nodeMajor>16||ld.nodeMajor===16&&ld.nodeMinor>=8){let t=null;Ge.exports.fetch=async function(a){t||(t=Ky().fetch);try{return await t(...arguments)}catch(o){throw typeof o=="object"&&Error.captureStackTrace(o,this),o}},Ge.exports.Headers=id().Headers,Ge.exports.Response=My().Response,Ge.exports.Request=$h().Request,Ge.exports.FormData=W0().FormData,Ge.exports.File=V0().File,Ge.exports.FileReader=RU().FileReader;let{setGlobalOrigin:e,getGlobalOrigin:r}=_u();Ge.exports.setGlobalOrigin=e,Ge.exports.getGlobalOrigin=r;let{CacheStorage:i}=GU(),{kConstruct:n}=t2();Ge.exports.caches=new i(n)}if(ld.nodeMajor>=16){let{deleteCookie:t,getCookies:e,getSetCookies:r,setCookie:i}=rq();Ge.exports.deleteCookie=t,Ge.exports.getCookies=e,Ge.exports.getSetCookies=r,Ge.exports.setCookie=i;let{parseMIMEType:n,serializeAMimeType:s}=Ws();Ge.exports.parseMIMEType=n,Ge.exports.serializeAMimeType=s}if(ld.nodeMajor>=18&&P3){let{WebSocket:t}=Tq();Ge.exports.WebSocket=t}Ge.exports.request=sm(dA.request);Ge.exports.stream=sm(dA.stream);Ge.exports.pipeline=sm(dA.pipeline);Ge.exports.connect=sm(dA.connect);Ge.exports.upgrade=sm(dA.upgrade);Ge.exports.MockClient=y4e;Ge.exports.MockPool=C4e;Ge.exports.MockAgent=E4e;Ge.exports.mockErrors=b4e});var am=A(qt=>{"use strict";var v4e=qt&&qt.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),N4e=qt&&qt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),I2=qt&&qt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&v4e(e,t,r);return N4e(e,t),e},Nr=qt&&qt.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(qt,"__esModule",{value:!0});qt.HttpClient=qt.isHttps=qt.HttpClientResponse=qt.HttpClientError=qt.getProxyUrl=qt.MediaTypes=qt.Headers=qt.HttpCodes=void 0;var k3=I2(require("http")),Lq=I2(require("https")),O3=I2(VP()),y2=I2(XP()),x4e=Oq(),ys;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(ys||(qt.HttpCodes=ys={}));var Oi;(function(t){t.Accept="accept",t.ContentType="content-type"})(Oi||(qt.Headers=Oi={}));var _o;(function(t){t.ApplicationJson="application/json"})(_o||(qt.MediaTypes=_o={}));function R4e(t){let e=O3.getProxyUrl(new URL(t));return e?e.href:""}qt.getProxyUrl=R4e;var T4e=[ys.MovedPermanently,ys.ResourceMoved,ys.SeeOther,ys.TemporaryRedirect,ys.PermanentRedirect],D4e=[ys.BadGateway,ys.ServiceUnavailable,ys.GatewayTimeout],P4e=["OPTIONS","GET","DELETE","HEAD"],k4e=10,O4e=5,C2=class t extends Error{constructor(e,r){super(e),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,t.prototype)}};qt.HttpClientError=C2;var b2=class{constructor(e){this.message=e}readBody(){return Nr(this,void 0,void 0,function*(){return new Promise(e=>Nr(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",i=>{r=Buffer.concat([r,i])}),this.message.on("end",()=>{e(r.toString())})}))})}readBodyBuffer(){return Nr(this,void 0,void 0,function*(){return new Promise(e=>Nr(this,void 0,void 0,function*(){let r=[];this.message.on("data",i=>{r.push(i)}),this.message.on("end",()=>{e(Buffer.concat(r))})}))})}};qt.HttpClientResponse=b2;function L4e(t){return new URL(t).protocol==="https:"}qt.isHttps=L4e;var L3=class{constructor(e,r,i){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=e,this.handlers=r||[],this.requestOptions=i,i&&(i.ignoreSslError!=null&&(this._ignoreSslError=i.ignoreSslError),this._socketTimeout=i.socketTimeout,i.allowRedirects!=null&&(this._allowRedirects=i.allowRedirects),i.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=i.allowRedirectDowngrade),i.maxRedirects!=null&&(this._maxRedirects=Math.max(i.maxRedirects,0)),i.keepAlive!=null&&(this._keepAlive=i.keepAlive),i.allowRetries!=null&&(this._allowRetries=i.allowRetries),i.maxRetries!=null&&(this._maxRetries=i.maxRetries))}options(e,r){return Nr(this,void 0,void 0,function*(){return this.request("OPTIONS",e,null,r||{})})}get(e,r){return Nr(this,void 0,void 0,function*(){return this.request("GET",e,null,r||{})})}del(e,r){return Nr(this,void 0,void 0,function*(){return this.request("DELETE",e,null,r||{})})}post(e,r,i){return Nr(this,void 0,void 0,function*(){return this.request("POST",e,r,i||{})})}patch(e,r,i){return Nr(this,void 0,void 0,function*(){return this.request("PATCH",e,r,i||{})})}put(e,r,i){return Nr(this,void 0,void 0,function*(){return this.request("PUT",e,r,i||{})})}head(e,r){return Nr(this,void 0,void 0,function*(){return this.request("HEAD",e,null,r||{})})}sendStream(e,r,i,n){return Nr(this,void 0,void 0,function*(){return this.request(e,r,i,n)})}getJson(e,r={}){return Nr(this,void 0,void 0,function*(){r[Oi.Accept]=this._getExistingOrDefaultHeader(r,Oi.Accept,_o.ApplicationJson);let i=yield this.get(e,r);return this._processResponse(i,this.requestOptions)})}postJson(e,r,i={}){return Nr(this,void 0,void 0,function*(){let n=JSON.stringify(r,null,2);i[Oi.Accept]=this._getExistingOrDefaultHeader(i,Oi.Accept,_o.ApplicationJson),i[Oi.ContentType]=this._getExistingOrDefaultHeader(i,Oi.ContentType,_o.ApplicationJson);let s=yield this.post(e,n,i);return this._processResponse(s,this.requestOptions)})}putJson(e,r,i={}){return Nr(this,void 0,void 0,function*(){let n=JSON.stringify(r,null,2);i[Oi.Accept]=this._getExistingOrDefaultHeader(i,Oi.Accept,_o.ApplicationJson),i[Oi.ContentType]=this._getExistingOrDefaultHeader(i,Oi.ContentType,_o.ApplicationJson);let s=yield this.put(e,n,i);return this._processResponse(s,this.requestOptions)})}patchJson(e,r,i={}){return Nr(this,void 0,void 0,function*(){let n=JSON.stringify(r,null,2);i[Oi.Accept]=this._getExistingOrDefaultHeader(i,Oi.Accept,_o.ApplicationJson),i[Oi.ContentType]=this._getExistingOrDefaultHeader(i,Oi.ContentType,_o.ApplicationJson);let s=yield this.patch(e,n,i);return this._processResponse(s,this.requestOptions)})}request(e,r,i,n){return Nr(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let s=new URL(r),a=this._prepareRequest(e,s,n),o=this._allowRetries&&P4e.includes(e)?this._maxRetries+1:1,l=0,c;do{if(c=yield this.requestRaw(a,i),c&&c.message&&c.message.statusCode===ys.Unauthorized){let u;for(let p of this.handlers)if(p.canHandleAuthentication(c)){u=p;break}return u?u.handleAuthentication(this,a,i):c}let d=this._maxRedirects;for(;c.message.statusCode&&T4e.includes(c.message.statusCode)&&this._allowRedirects&&d>0;){let u=c.message.headers.location;if(!u)break;let p=new URL(u);if(s.protocol==="https:"&&s.protocol!==p.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(yield c.readBody(),p.hostname!==s.hostname)for(let f in n)f.toLowerCase()==="authorization"&&delete n[f];a=this._prepareRequest(e,p,n),c=yield this.requestRaw(a,i),d--}if(!c.message.statusCode||!D4e.includes(c.message.statusCode))return c;l+=1,l{function s(a,o){a?n(a):o?i(o):n(new Error("Unknown error"))}this.requestRawWithCallback(e,r,s)})})}requestRawWithCallback(e,r,i){typeof r=="string"&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let n=!1;function s(l,c){n||(n=!0,i(l,c))}let a=e.httpModule.request(e.options,l=>{let c=new b2(l);s(void 0,c)}),o;a.on("socket",l=>{o=l}),a.setTimeout(this._socketTimeout||3*6e4,()=>{o&&o.end(),s(new Error(`Request timeout: ${e.options.path}`))}),a.on("error",function(l){s(l)}),r&&typeof r=="string"&&a.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){a.end()}),r.pipe(a)):a.end()}getAgent(e){let r=new URL(e);return this._getAgent(r)}getAgentDispatcher(e){let r=new URL(e),i=O3.getProxyUrl(r);if(i&&i.hostname)return this._getProxyAgentDispatcher(r,i)}_prepareRequest(e,r,i){let n={};n.parsedUrl=r;let s=n.parsedUrl.protocol==="https:";n.httpModule=s?Lq:k3;let a=s?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):a,n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||""),n.options.method=e,n.options.headers=this._mergeHeaders(i),this.userAgent!=null&&(n.options.headers["user-agent"]=this.userAgent),n.options.agent=this._getAgent(n.parsedUrl),this.handlers)for(let o of this.handlers)o.prepareRequest(n.options);return n}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},E2(this.requestOptions.headers),E2(e||{})):E2(e||{})}_getExistingOrDefaultHeader(e,r,i){let n;return this.requestOptions&&this.requestOptions.headers&&(n=E2(this.requestOptions.headers)[r]),e[r]||n||i}_getAgent(e){let r,i=O3.getProxyUrl(e),n=i&&i.hostname;if(this._keepAlive&&n&&(r=this._proxyAgent),n||(r=this._agent),r)return r;let s=e.protocol==="https:",a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||k3.globalAgent.maxSockets),i&&i.hostname){let o={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(i.username||i.password)&&{proxyAuth:`${i.username}:${i.password}`}),{host:i.hostname,port:i.port})},l,c=i.protocol==="https:";s?l=c?y2.httpsOverHttps:y2.httpsOverHttp:l=c?y2.httpOverHttps:y2.httpOverHttp,r=l(o),this._proxyAgent=r}if(!r){let o={keepAlive:this._keepAlive,maxSockets:a};r=s?new Lq.Agent(o):new k3.Agent(o),this._agent=r}return s&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_getProxyAgentDispatcher(e,r){let i;if(this._keepAlive&&(i=this._proxyAgentDispatcher),i)return i;let n=e.protocol==="https:";return i=new x4e.ProxyAgent(Object.assign({uri:r.href,pipelining:this._keepAlive?1:0},(r.username||r.password)&&{token:`Basic ${Buffer.from(`${r.username}:${r.password}`).toString("base64")}`})),this._proxyAgentDispatcher=i,n&&this._ignoreSslError&&(i.options=Object.assign(i.options.requestTls||{},{rejectUnauthorized:!1})),i}_performExponentialBackoff(e){return Nr(this,void 0,void 0,function*(){e=Math.min(k4e,e);let r=O4e*Math.pow(2,e);return new Promise(i=>setTimeout(()=>i(),r))})}_processResponse(e,r){return Nr(this,void 0,void 0,function*(){return new Promise((i,n)=>Nr(this,void 0,void 0,function*(){let s=e.message.statusCode||0,a={statusCode:s,result:null,headers:{}};s===ys.NotFound&&i(a);function o(d,u){if(typeof u=="string"){let p=new Date(u);if(!isNaN(p.valueOf()))return p}return u}let l,c;try{c=yield e.readBody(),c&&c.length>0&&(r&&r.deserializeDates?l=JSON.parse(c,o):l=JSON.parse(c),a.result=l),a.headers=e.message.headers}catch{}if(s>299){let d;l&&l.message?d=l.message:c&&c.length>0?d=c:d=`Failed request: (${s})`;let u=new C2(d,s);u.result=a.result,n(u)}else i(a)}))})}};qt.HttpClient=L3;var E2=t=>Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{})});var H3=A(_a=>{"use strict";var q3=_a&&_a.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(_a,"__esModule",{value:!0});_a.PersonalAccessTokenCredentialHandler=_a.BearerCredentialHandler=_a.BasicCredentialHandler=void 0;var F3=class{constructor(e,r){this.username=e,this.password=r}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return!1}handleAuthentication(){return q3(this,void 0,void 0,function*(){throw new Error("not implemented")})}};_a.BasicCredentialHandler=F3;var M3=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization=`Bearer ${this.token}`}canHandleAuthentication(){return!1}handleAuthentication(){return q3(this,void 0,void 0,function*(){throw new Error("not implemented")})}};_a.BearerCredentialHandler=M3;var U3=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return!1}handleAuthentication(){return q3(this,void 0,void 0,function*(){throw new Error("not implemented")})}};_a.PersonalAccessTokenCredentialHandler=U3});var Uq=A(uA=>{"use strict";var Fq=uA&&uA.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(uA,"__esModule",{value:!0});uA.OidcClient=void 0;var F4e=am(),M4e=H3(),Mq=Gr(),G3=class t{static createHttpClient(e=!0,r=10){let i={allowRetries:e,maxRetries:r};return new F4e.HttpClient("actions/oidc-client",[new M4e.BearerCredentialHandler(t.getRequestToken())],i)}static getRequestToken(){let e=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!e)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");return e}static getIDTokenUrl(){let e=process.env.ACTIONS_ID_TOKEN_REQUEST_URL;if(!e)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return e}static getCall(e){var r;return Fq(this,void 0,void 0,function*(){let s=(r=(yield t.createHttpClient().getJson(e).catch(a=>{throw new Error(`Failed to get ID Token.
+`.trim())}};VG.exports=wN});var rj=f((vtt,tj)=>{"use strict";var{kProxy:eme,kClose:tme,kDestroy:rme,kInterceptors:nme}=Ht(),{URL:KG}=require("url"),XG=Hh(),ime=XA(),sme=Rh(),{InvalidArgumentError:Wh,RequestAbortedError:ome}=vt(),ZG=xh(),zh=Symbol("proxy agent"),QE=Symbol("proxy client"),Yh=Symbol("proxy headers"),QN=Symbol("request tls settings"),ame=Symbol("proxy tls settings"),ej=Symbol("connect endpoint function");function cme(t){return t==="https:"?443:80}function lme(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new Wh("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}function Ame(t,e){return new ime(t,e)}var _N=class extends sme{constructor(e){if(super(e),this[eme]=lme(e),this[zh]=new XG(e),this[nme]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new Wh("Proxy opts.uri is mandatory");let{clientFactory:r=Ame}=e;if(typeof r!="function")throw new Wh("Proxy opts.clientFactory must be a function.");this[QN]=e.requestTls,this[ame]=e.proxyTls,this[Yh]=e.headers||{};let n=new KG(e.uri),{origin:i,port:s,host:o,username:a,password:c}=n;if(e.auth&&e.token)throw new Wh("opts.auth cannot be used in combination with opts.token");e.auth?this[Yh]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[Yh]["proxy-authorization"]=e.token:a&&c&&(this[Yh]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(a)}:${decodeURIComponent(c)}`).toString("base64")}`);let l=ZG({...e.proxyTls});this[ej]=ZG({...e.requestTls}),this[QE]=r(n,{connect:l}),this[zh]=new XG({...e,connect:async(A,u)=>{let d=A.host;A.port||(d+=`:${cme(A.protocol)}`);try{let{socket:h,statusCode:g}=await this[QE].connect({origin:i,port:s,path:d,signal:A.signal,headers:{...this[Yh],host:o}});if(g!==200&&(h.on("error",()=>{}).destroy(),u(new ome(`Proxy response (${g}) !== 200 when HTTP Tunneling`))),A.protocol!=="https:"){u(null,h);return}let E;this[QN]?E=this[QN].servername:E=A.servername,this[ej]({...A,servername:E,httpSocket:h},u)}catch(h){u(h)}}})}dispatch(e,r){let{host:n}=new KG(e.origin),i=ume(e.headers);return dme(i),this[zh].dispatch({...e,headers:{...i,host:n}},r)}async[tme](){await this[zh].close(),await this[QE].close()}async[rme](){await this[zh].destroy(),await this[QE].destroy()}};function ume(t){if(Array.isArray(t)){let e={};for(let r=0;rr.toLowerCase()==="proxy-authorization"))throw new Wh("Proxy-Authorization should be sent in ProxyAgent constructor")}tj.exports=_N});var aj=f((Ttt,oj)=>{var yl=require("assert"),{kRetryHandlerDefaultRetry:nj}=Ht(),{RequestRetryError:_E}=vt(),{isDisturbed:ij,parseHeaders:fme,parseRangeHeader:sj}=lt();function hme(t){let e=Date.now();return new Date(t).getTime()-e}var SN=class t{constructor(e,r){let{retryOptions:n,...i}=e,{retry:s,maxRetries:o,maxTimeout:a,minTimeout:c,timeoutFactor:l,methods:A,errorCodes:u,retryAfter:d,statusCodes:h}=n??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts=i,this.abort=null,this.aborted=!1,this.retryOpts={retry:s??t[nj],retryAfter:d??!0,maxTimeout:a??30*1e3,timeout:c??500,timeoutFactor:l??2,maxRetries:o??5,methods:A??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:h??[500,502,503,504,429],errorCodes:u??["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,r,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,r,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[nj](e,{state:r,opts:n},i){let{statusCode:s,code:o,headers:a}=e,{method:c,retryOptions:l}=n,{maxRetries:A,timeout:u,maxTimeout:d,timeoutFactor:h,statusCodes:g,errorCodes:E,methods:C}=l,{counter:I,currentTimeout:R}=r;if(R=R!=null&&R>0?R:u,o&&o!=="UND_ERR_REQ_RETRY"&&o!=="UND_ERR_SOCKET"&&!E.includes(o)){i(e);return}if(Array.isArray(C)&&!C.includes(c)){i(e);return}if(s!=null&&Array.isArray(g)&&!g.includes(s)){i(e);return}if(I>A){i(e);return}let P=a!=null&&a["retry-after"];P&&(P=Number(P),P=isNaN(P)?hme(P):P*1e3);let M=P>0?Math.min(P,d):Math.min(R*h**I,d);r.currentTimeout=M,setTimeout(()=>i(null),M)}onHeaders(e,r,n,i){let s=fme(r);if(this.retryCount+=1,e>=300)return this.abort(new _E("Request failed",e,{headers:s,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,e!==206)return!0;let a=sj(s["content-range"]);if(!a)return this.abort(new _E("Content-Range mismatch",e,{headers:s,count:this.retryCount})),!1;if(this.etag!=null&&this.etag!==s.etag)return this.abort(new _E("ETag mismatch",e,{headers:s,count:this.retryCount})),!1;let{start:c,size:l,end:A=l}=a;return yl(this.start===c,"content-range mismatch"),yl(this.end==null||this.end===A,"content-range mismatch"),this.resume=n,!0}if(this.end==null){if(e===206){let a=sj(s["content-range"]);if(a==null)return this.handler.onHeaders(e,r,n,i);let{start:c,size:l,end:A=l}=a;yl(c!=null&&Number.isFinite(c)&&this.start!==c,"content-range mismatch"),yl(Number.isFinite(c)),yl(A!=null&&Number.isFinite(A)&&this.end!==A,"invalid content-length"),this.start=c,this.end=A}if(this.end==null){let a=s["content-length"];this.end=a!=null?Number(a):null}return yl(Number.isFinite(this.start)),yl(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=n,this.etag=s.etag!=null?s.etag:null,this.handler.onHeaders(e,r,n,i)}let o=new _E("Request failed",e,{headers:s,count:this.retryCount});return this.abort(o),!1}onData(e){return this.start+=e.length,this.handler.onData(e)}onComplete(e){return this.retryCount=0,this.handler.onComplete(e)}onError(e){if(this.aborted||ij(this.opts.body))return this.handler.onError(e);this.retryOpts.retry(e,{state:{counter:this.retryCount++,currentTimeout:this.retryAfter},opts:{retryOptions:this.retryOpts,...this.opts}},r.bind(this));function r(n){if(n!=null||this.aborted||ij(this.opts.body))return this.handler.onError(n);this.start!==0&&(this.opts={...this.opts,headers:{...this.opts.headers,range:`bytes=${this.start}-${this.end??""}`}});try{this.dispatch(this.opts,this)}catch(i){this.handler.onError(i)}}}};oj.exports=SN});var au=f((Ptt,uj)=>{"use strict";var cj=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:pme}=vt(),gme=Hh();Aj()===void 0&&lj(new gme);function lj(t){if(!t||typeof t.dispatch!="function")throw new pme("Argument agent must implement Agent");Object.defineProperty(globalThis,cj,{value:t,writable:!0,enumerable:!1,configurable:!1})}function Aj(){return globalThis[cj]}uj.exports={setGlobalDispatcher:lj,getGlobalDispatcher:Aj}});var fj=f((ktt,dj)=>{"use strict";dj.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 El=f((Ott,yj)=>{"use strict";var{kHeadersList:ai,kConstruct:mme}=Ht(),{kGuard:eo}=Ho(),{kEnumerableProperty:Zs}=lt(),{makeIterator:cu,isValidHeaderName:Jh,isValidHeaderValue:pj}=$i(),yme=require("util"),{webidl:Ve}=Fn(),Eme=require("assert"),oi=Symbol("headers map"),ln=Symbol("headers map sorted");function hj(t){return t===10||t===13||t===9||t===32}function gj(t){let e=0,r=t.length;for(;r>e&&hj(t.charCodeAt(r-1));)--r;for(;r>e&&hj(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}function mj(t,e){if(Array.isArray(e))for(let r=0;r>","record"]})}function NN(t,e,r){if(r=gj(r),Jh(e)){if(!pj(r))throw Ve.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw Ve.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(t[eo]==="immutable")throw new TypeError("immutable");return t[eo],t[ai].append(e,r)}var SE=class t{cookies=null;constructor(e){e instanceof t?(this[oi]=new Map(e[oi]),this[ln]=e[ln],this.cookies=e.cookies===null?null:[...e.cookies]):(this[oi]=new Map(e),this[ln]=null)}contains(e){return e=e.toLowerCase(),this[oi].has(e)}clear(){this[oi].clear(),this[ln]=null,this.cookies=null}append(e,r){this[ln]=null;let n=e.toLowerCase(),i=this[oi].get(n);if(i){let s=n==="cookie"?"; ":", ";this[oi].set(n,{name:i.name,value:`${i.value}${s}${r}`})}else this[oi].set(n,{name:e,value:r});n==="set-cookie"&&(this.cookies??=[],this.cookies.push(r))}set(e,r){this[ln]=null;let n=e.toLowerCase();n==="set-cookie"&&(this.cookies=[r]),this[oi].set(n,{name:e,value:r})}delete(e){this[ln]=null,e=e.toLowerCase(),e==="set-cookie"&&(this.cookies=null),this[oi].delete(e)}get(e){let r=this[oi].get(e.toLowerCase());return r===void 0?null:r.value}*[Symbol.iterator](){for(let[e,{value:r}]of this[oi])yield[e,r]}get entries(){let e={};if(this[oi].size)for(let{name:r,value:n}of this[oi].values())e[r]=n;return e}},lu=class t{constructor(e=void 0){e!==mme&&(this[ai]=new SE,this[eo]="none",e!==void 0&&(e=Ve.converters.HeadersInit(e),mj(this,e)))}append(e,r){return Ve.brandCheck(this,t),Ve.argumentLengthCheck(arguments,2,{header:"Headers.append"}),e=Ve.converters.ByteString(e),r=Ve.converters.ByteString(r),NN(this,e,r)}delete(e){if(Ve.brandCheck(this,t),Ve.argumentLengthCheck(arguments,1,{header:"Headers.delete"}),e=Ve.converters.ByteString(e),!Jh(e))throw Ve.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"});if(this[eo]==="immutable")throw new TypeError("immutable");this[eo],this[ai].contains(e)&&this[ai].delete(e)}get(e){if(Ve.brandCheck(this,t),Ve.argumentLengthCheck(arguments,1,{header:"Headers.get"}),e=Ve.converters.ByteString(e),!Jh(e))throw Ve.errors.invalidArgument({prefix:"Headers.get",value:e,type:"header name"});return this[ai].get(e)}has(e){if(Ve.brandCheck(this,t),Ve.argumentLengthCheck(arguments,1,{header:"Headers.has"}),e=Ve.converters.ByteString(e),!Jh(e))throw Ve.errors.invalidArgument({prefix:"Headers.has",value:e,type:"header name"});return this[ai].contains(e)}set(e,r){if(Ve.brandCheck(this,t),Ve.argumentLengthCheck(arguments,2,{header:"Headers.set"}),e=Ve.converters.ByteString(e),r=Ve.converters.ByteString(r),r=gj(r),Jh(e)){if(!pj(r))throw Ve.errors.invalidArgument({prefix:"Headers.set",value:r,type:"header value"})}else throw Ve.errors.invalidArgument({prefix:"Headers.set",value:e,type:"header name"});if(this[eo]==="immutable")throw new TypeError("immutable");this[eo],this[ai].set(e,r)}getSetCookie(){Ve.brandCheck(this,t);let e=this[ai].cookies;return e?[...e]:[]}get[ln](){if(this[ai][ln])return this[ai][ln];let e=[],r=[...this[ai]].sort((i,s)=>i[0]e,"Headers","key")}return cu(()=>[...this[ln].values()],"Headers","key")}values(){if(Ve.brandCheck(this,t),this[eo]==="immutable"){let e=this[ln];return cu(()=>e,"Headers","value")}return cu(()=>[...this[ln].values()],"Headers","value")}entries(){if(Ve.brandCheck(this,t),this[eo]==="immutable"){let e=this[ln];return cu(()=>e,"Headers","key+value")}return cu(()=>[...this[ln].values()],"Headers","key+value")}forEach(e,r=globalThis){if(Ve.brandCheck(this,t),Ve.argumentLengthCheck(arguments,1,{header:"Headers.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");for(let[n,i]of this)e.apply(r,[i,n,this])}[Symbol.for("nodejs.util.inspect.custom")](){return Ve.brandCheck(this,t),this[ai]}};lu.prototype[Symbol.iterator]=lu.prototype.entries;Object.defineProperties(lu.prototype,{append:Zs,delete:Zs,get:Zs,has:Zs,set:Zs,getSetCookie:Zs,keys:Zs,values:Zs,entries:Zs,forEach:Zs,[Symbol.iterator]:{enumerable:!1},[Symbol.toStringTag]:{value:"Headers",configurable:!0},[yme.inspect.custom]:{enumerable:!1}});Ve.converters.HeadersInit=function(t){if(Ve.util.Type(t)==="Object")return t[Symbol.iterator]?Ve.converters["sequence>"](t):Ve.converters["record"](t);throw Ve.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};yj.exports={fill:mj,Headers:lu,HeadersList:SE}});var vE=f((Ltt,_j)=>{"use strict";var{Headers:Cme,HeadersList:Ej,fill:Ime}=El(),{extractBody:Cj,cloneBody:Bme,mixinBody:bme}=_h(),vN=lt(),{kEnumerableProperty:Ti}=vN,{isValidReasonPhrase:wme,isCancelled:Qme,isAborted:_me,isBlobLike:Sme,serializeJavascriptValueToJSONString:Nme,isErrorLike:Rme,isomorphicEncode:xme}=$i(),{redirectStatusSet:vme,nullBodyStatus:Tme,DOMException:Ij}=Da(),{kState:er,kHeaders:jr,kGuard:Au,kRealm:vi}=Ho(),{webidl:Ye}=Fn(),{FormData:Pme}=Uy(),{getGlobalOrigin:Dme}=FA(),{URLSerializer:Bj}=Qs(),{kHeadersList:RN,kConstruct:kme}=Ht(),TN=require("assert"),{types:xN}=require("util"),wj=globalThis.ReadableStream||require("stream/web").ReadableStream,Ome=new TextEncoder("utf-8"),uu=class t{static error(){let e={settingsObject:{}},r=new t;return r[er]=RE(),r[vi]=e,r[jr][RN]=r[er].headersList,r[jr][Au]="immutable",r[jr][vi]=e,r}static json(e,r={}){Ye.argumentLengthCheck(arguments,1,{header:"Response.json"}),r!==null&&(r=Ye.converters.ResponseInit(r));let n=Ome.encode(Nme(e)),i=Cj(n),s={settingsObject:{}},o=new t;return o[vi]=s,o[jr][Au]="response",o[jr][vi]=s,bj(o,r,{body:i[0],type:"application/json"}),o}static redirect(e,r=302){let n={settingsObject:{}};Ye.argumentLengthCheck(arguments,1,{header:"Response.redirect"}),e=Ye.converters.USVString(e),r=Ye.converters["unsigned short"](r);let i;try{i=new URL(e,Dme())}catch(a){throw Object.assign(new TypeError("Failed to parse URL from "+e),{cause:a})}if(!vme.has(r))throw new RangeError("Invalid status code "+r);let s=new t;s[vi]=n,s[jr][Au]="immutable",s[jr][vi]=n,s[er].status=r;let o=xme(Bj(i));return s[er].headersList.append("location",o),s}constructor(e=null,r={}){e!==null&&(e=Ye.converters.BodyInit(e)),r=Ye.converters.ResponseInit(r),this[vi]={settingsObject:{}},this[er]=xE({}),this[jr]=new Cme(kme),this[jr][Au]="response",this[jr][RN]=this[er].headersList,this[jr][vi]=this[vi];let n=null;if(e!=null){let[i,s]=Cj(e);n={body:i,type:s}}bj(this,r,n)}get type(){return Ye.brandCheck(this,t),this[er].type}get url(){Ye.brandCheck(this,t);let e=this[er].urlList,r=e[e.length-1]??null;return r===null?"":Bj(r,!0)}get redirected(){return Ye.brandCheck(this,t),this[er].urlList.length>1}get status(){return Ye.brandCheck(this,t),this[er].status}get ok(){return Ye.brandCheck(this,t),this[er].status>=200&&this[er].status<=299}get statusText(){return Ye.brandCheck(this,t),this[er].statusText}get headers(){return Ye.brandCheck(this,t),this[jr]}get body(){return Ye.brandCheck(this,t),this[er].body?this[er].body.stream:null}get bodyUsed(){return Ye.brandCheck(this,t),!!this[er].body&&vN.isDisturbed(this[er].body.stream)}clone(){if(Ye.brandCheck(this,t),this.bodyUsed||this.body&&this.body.locked)throw Ye.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let e=PN(this[er]),r=new t;return r[er]=e,r[vi]=this[vi],r[jr][RN]=e.headersList,r[jr][Au]=this[jr][Au],r[jr][vi]=this[jr][vi],r}};bme(uu);Object.defineProperties(uu.prototype,{type:Ti,url:Ti,status:Ti,ok:Ti,redirected:Ti,statusText:Ti,headers:Ti,clone:Ti,body:Ti,bodyUsed:Ti,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(uu,{json:Ti,redirect:Ti,error:Ti});function PN(t){if(t.internalResponse)return Qj(PN(t.internalResponse),t.type);let e=xE({...t,body:null});return t.body!=null&&(e.body=Bme(t.body)),e}function xE(t){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...t,headersList:t.headersList?new Ej(t.headersList):new Ej,urlList:t.urlList?[...t.urlList]:[]}}function RE(t){let e=Rme(t);return xE({type:"error",status:0,error:e?t:new Error(t&&String(t)),aborted:t&&t.name==="AbortError"})}function NE(t,e){return e={internalResponse:t,...e},new Proxy(t,{get(r,n){return n in e?e[n]:r[n]},set(r,n,i){return TN(!(n in e)),r[n]=i,!0}})}function Qj(t,e){if(e==="basic")return NE(t,{type:"basic",headersList:t.headersList});if(e==="cors")return NE(t,{type:"cors",headersList:t.headersList});if(e==="opaque")return NE(t,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});if(e==="opaqueredirect")return NE(t,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});TN(!1)}function Lme(t,e=null){return TN(Qme(t)),_me(t)?RE(Object.assign(new Ij("The operation was aborted.","AbortError"),{cause:e})):RE(Object.assign(new Ij("Request was cancelled."),{cause:e}))}function bj(t,e,r){if(e.status!==null&&(e.status<200||e.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in e&&e.statusText!=null&&!wme(String(e.statusText)))throw new TypeError("Invalid statusText");if("status"in e&&e.status!=null&&(t[er].status=e.status),"statusText"in e&&e.statusText!=null&&(t[er].statusText=e.statusText),"headers"in e&&e.headers!=null&&Ime(t[jr],e.headers),r){if(Tme.includes(t.status))throw Ye.errors.exception({header:"Response constructor",message:"Invalid response status code "+t.status});t[er].body=r.body,r.type!=null&&!t[er].headersList.contains("Content-Type")&&t[er].headersList.append("content-type",r.type)}}Ye.converters.ReadableStream=Ye.interfaceConverter(wj);Ye.converters.FormData=Ye.interfaceConverter(Pme);Ye.converters.URLSearchParams=Ye.interfaceConverter(URLSearchParams);Ye.converters.XMLHttpRequestBodyInit=function(t){return typeof t=="string"?Ye.converters.USVString(t):Sme(t)?Ye.converters.Blob(t,{strict:!1}):xN.isArrayBuffer(t)||xN.isTypedArray(t)||xN.isDataView(t)?Ye.converters.BufferSource(t):vN.isFormDataLike(t)?Ye.converters.FormData(t,{strict:!1}):t instanceof URLSearchParams?Ye.converters.URLSearchParams(t):Ye.converters.DOMString(t)};Ye.converters.BodyInit=function(t){return t instanceof wj?Ye.converters.ReadableStream(t):t?.[Symbol.asyncIterator]?t:Ye.converters.XMLHttpRequestBodyInit(t)};Ye.converters.ResponseInit=Ye.dictionaryConverter([{key:"status",converter:Ye.converters["unsigned short"],defaultValue:200},{key:"statusText",converter:Ye.converters.ByteString,defaultValue:""},{key:"headers",converter:Ye.converters.HeadersInit}]);_j.exports={makeNetworkError:RE,makeResponse:xE,makeAppropriateNetworkError:Lme,filterResponse:Qj,Response:uu,cloneResponse:PN}});var Kh=f((Mtt,Tj)=>{"use strict";var{extractBody:Mme,mixinBody:Fme,cloneBody:Ume}=_h(),{Headers:Sj,fill:qme,HeadersList:kE}=El(),{FinalizationRegistry:Hme}=GS()(),$h=lt(),{isValidHTTPToken:Gme,sameOrigin:Nj,normalizeMethod:jme,makePolicyContainer:zme,normalizeMethodRecord:Yme}=$i(),{forbiddenMethodsSet:Wme,corsSafeListedMethodsSet:Jme,referrerPolicy:Vme,requestRedirect:$me,requestMode:Kme,requestCredentials:Xme,requestCache:Zme,requestDuplex:eye}=Da(),{kEnumerableProperty:Sr}=$h,{kHeaders:Bn,kSignal:Vh,kState:zt,kGuard:TE,kRealm:Pi}=Ho(),{webidl:Me}=Fn(),{getGlobalOrigin:tye}=FA(),{URLSerializer:rye}=Qs(),{kHeadersList:PE,kConstruct:DE}=Ht(),nye=require("assert"),{getMaxListeners:Rj,setMaxListeners:xj,getEventListeners:iye,defaultMaxListeners:vj}=require("events"),DN=globalThis.TransformStream,sye=Symbol("abortController"),oye=new Hme(({signal:t,abort:e})=>{t.removeEventListener("abort",e)}),Cl=class t{constructor(e,r={}){if(e===DE)return;Me.argumentLengthCheck(arguments,1,{header:"Request constructor"}),e=Me.converters.RequestInfo(e),r=Me.converters.RequestInit(r),this[Pi]={settingsObject:{baseUrl:tye(),get origin(){return this.baseUrl?.origin},policyContainer:zme()}};let n=null,i=null,s=this[Pi].settingsObject.baseUrl,o=null;if(typeof e=="string"){let C;try{C=new URL(e,s)}catch(I){throw new TypeError("Failed to parse URL from "+e,{cause:I})}if(C.username||C.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+e);n=OE({urlList:[C]}),i="cors"}else nye(e instanceof t),n=e[zt],o=e[Vh];let a=this[Pi].settingsObject.origin,c="client";if(n.window?.constructor?.name==="EnvironmentSettingsObject"&&Nj(n.window,a)&&(c=n.window),r.window!=null)throw new TypeError(`'window' option '${c}' must be null`);"window"in r&&(c="no-window"),n=OE({method:n.method,headersList:n.headersList,unsafeRequest:n.unsafeRequest,client:this[Pi].settingsObject,window:c,priority:n.priority,origin:n.origin,referrer:n.referrer,referrerPolicy:n.referrerPolicy,mode:n.mode,credentials:n.credentials,cache:n.cache,redirect:n.redirect,integrity:n.integrity,keepalive:n.keepalive,reloadNavigation:n.reloadNavigation,historyNavigation:n.historyNavigation,urlList:[...n.urlList]});let l=Object.keys(r).length!==0;if(l&&(n.mode==="navigate"&&(n.mode="same-origin"),n.reloadNavigation=!1,n.historyNavigation=!1,n.origin="client",n.referrer="client",n.referrerPolicy="",n.url=n.urlList[n.urlList.length-1],n.urlList=[n.url]),r.referrer!==void 0){let C=r.referrer;if(C==="")n.referrer="no-referrer";else{let I;try{I=new URL(C,s)}catch(R){throw new TypeError(`Referrer "${C}" is not a valid URL.`,{cause:R})}I.protocol==="about:"&&I.hostname==="client"||a&&!Nj(I,this[Pi].settingsObject.baseUrl)?n.referrer="client":n.referrer=I}}r.referrerPolicy!==void 0&&(n.referrerPolicy=r.referrerPolicy);let A;if(r.mode!==void 0?A=r.mode:A=i,A==="navigate")throw Me.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(A!=null&&(n.mode=A),r.credentials!==void 0&&(n.credentials=r.credentials),r.cache!==void 0&&(n.cache=r.cache),n.cache==="only-if-cached"&&n.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(r.redirect!==void 0&&(n.redirect=r.redirect),r.integrity!=null&&(n.integrity=String(r.integrity)),r.keepalive!==void 0&&(n.keepalive=!!r.keepalive),r.method!==void 0){let C=r.method;if(!Gme(C))throw new TypeError(`'${C}' is not a valid HTTP method.`);if(Wme.has(C.toUpperCase()))throw new TypeError(`'${C}' HTTP method is unsupported.`);C=Yme[C]??jme(C),n.method=C}r.signal!==void 0&&(o=r.signal),this[zt]=n;let u=new AbortController;if(this[Vh]=u.signal,this[Vh][Pi]=this[Pi],o!=null){if(!o||typeof o.aborted!="boolean"||typeof o.addEventListener!="function")throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(o.aborted)u.abort(o.reason);else{this[sye]=u;let C=new WeakRef(u),I=function(){let R=C.deref();R!==void 0&&R.abort(this.reason)};try{(typeof Rj=="function"&&Rj(o)===vj||iye(o,"abort").length>=vj)&&xj(100,o)}catch{}$h.addAbortListener(o,I),oye.register(u,{signal:o,abort:I})}}if(this[Bn]=new Sj(DE),this[Bn][PE]=n.headersList,this[Bn][TE]="request",this[Bn][Pi]=this[Pi],A==="no-cors"){if(!Jme.has(n.method))throw new TypeError(`'${n.method} is unsupported in no-cors mode.`);this[Bn][TE]="request-no-cors"}if(l){let C=this[Bn][PE],I=r.headers!==void 0?r.headers:new kE(C);if(C.clear(),I instanceof kE){for(let[R,P]of I)C.append(R,P);C.cookies=I.cookies}else qme(this[Bn],I)}let d=e instanceof t?e[zt].body:null;if((r.body!=null||d!=null)&&(n.method==="GET"||n.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let h=null;if(r.body!=null){let[C,I]=Mme(r.body,n.keepalive);h=C,I&&!this[Bn][PE].contains("content-type")&&this[Bn].append("content-type",I)}let g=h??d;if(g!=null&&g.source==null){if(h!=null&&r.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(n.mode!=="same-origin"&&n.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');n.useCORSPreflightFlag=!0}let E=g;if(h==null&&d!=null){if($h.isDisturbed(d.stream)||d.stream.locked)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");DN||(DN=require("stream/web").TransformStream);let C=new DN;d.stream.pipeThrough(C),E={source:d.source,length:d.length,stream:C.readable}}this[zt].body=E}get method(){return Me.brandCheck(this,t),this[zt].method}get url(){return Me.brandCheck(this,t),rye(this[zt].url)}get headers(){return Me.brandCheck(this,t),this[Bn]}get destination(){return Me.brandCheck(this,t),this[zt].destination}get referrer(){return Me.brandCheck(this,t),this[zt].referrer==="no-referrer"?"":this[zt].referrer==="client"?"about:client":this[zt].referrer.toString()}get referrerPolicy(){return Me.brandCheck(this,t),this[zt].referrerPolicy}get mode(){return Me.brandCheck(this,t),this[zt].mode}get credentials(){return this[zt].credentials}get cache(){return Me.brandCheck(this,t),this[zt].cache}get redirect(){return Me.brandCheck(this,t),this[zt].redirect}get integrity(){return Me.brandCheck(this,t),this[zt].integrity}get keepalive(){return Me.brandCheck(this,t),this[zt].keepalive}get isReloadNavigation(){return Me.brandCheck(this,t),this[zt].reloadNavigation}get isHistoryNavigation(){return Me.brandCheck(this,t),this[zt].historyNavigation}get signal(){return Me.brandCheck(this,t),this[Vh]}get body(){return Me.brandCheck(this,t),this[zt].body?this[zt].body.stream:null}get bodyUsed(){return Me.brandCheck(this,t),!!this[zt].body&&$h.isDisturbed(this[zt].body.stream)}get duplex(){return Me.brandCheck(this,t),"half"}clone(){if(Me.brandCheck(this,t),this.bodyUsed||this.body?.locked)throw new TypeError("unusable");let e=aye(this[zt]),r=new t(DE);r[zt]=e,r[Pi]=this[Pi],r[Bn]=new Sj(DE),r[Bn][PE]=e.headersList,r[Bn][TE]=this[Bn][TE],r[Bn][Pi]=this[Bn][Pi];let n=new AbortController;return this.signal.aborted?n.abort(this.signal.reason):$h.addAbortListener(this.signal,()=>{n.abort(this.signal.reason)}),r[Vh]=n.signal,r}};Fme(Cl);function OE(t){let e={method:"GET",localURLsOnly:!1,unsafeRequest:!1,body:null,client:null,reservedClient:null,replacesClientId:"",window:"client",keepalive:!1,serviceWorkers:"all",initiator:"",destination:"",priority:null,origin:"client",policyContainer:"client",referrer:"client",referrerPolicy:"",mode:"no-cors",useCORSPreflightFlag:!1,credentials:"same-origin",useCredentials:!1,cache:"default",redirect:"follow",integrity:"",cryptoGraphicsNonceMetadata:"",parserMetadata:"",reloadNavigation:!1,historyNavigation:!1,userActivation:!1,taintedOrigin:!1,redirectCount:0,responseTainting:"basic",preventNoCacheCacheControlHeaderModification:!1,done:!1,timingAllowFailed:!1,...t,headersList:t.headersList?new kE(t.headersList):new kE};return e.url=e.urlList[0],e}function aye(t){let e=OE({...t,body:null});return t.body!=null&&(e.body=Ume(t.body)),e}Object.defineProperties(Cl.prototype,{method:Sr,url:Sr,headers:Sr,redirect:Sr,clone:Sr,signal:Sr,duplex:Sr,destination:Sr,body:Sr,bodyUsed:Sr,isHistoryNavigation:Sr,isReloadNavigation:Sr,keepalive:Sr,integrity:Sr,cache:Sr,credentials:Sr,attribute:Sr,referrerPolicy:Sr,referrer:Sr,mode:Sr,[Symbol.toStringTag]:{value:"Request",configurable:!0}});Me.converters.Request=Me.interfaceConverter(Cl);Me.converters.RequestInfo=function(t){return typeof t=="string"?Me.converters.USVString(t):t instanceof Cl?Me.converters.Request(t):Me.converters.USVString(t)};Me.converters.AbortSignal=Me.interfaceConverter(AbortSignal);Me.converters.RequestInit=Me.dictionaryConverter([{key:"method",converter:Me.converters.ByteString},{key:"headers",converter:Me.converters.HeadersInit},{key:"body",converter:Me.nullableConverter(Me.converters.BodyInit)},{key:"referrer",converter:Me.converters.USVString},{key:"referrerPolicy",converter:Me.converters.DOMString,allowedValues:Vme},{key:"mode",converter:Me.converters.DOMString,allowedValues:Kme},{key:"credentials",converter:Me.converters.DOMString,allowedValues:Xme},{key:"cache",converter:Me.converters.DOMString,allowedValues:Zme},{key:"redirect",converter:Me.converters.DOMString,allowedValues:$me},{key:"integrity",converter:Me.converters.DOMString},{key:"keepalive",converter:Me.converters.boolean},{key:"signal",converter:Me.nullableConverter(t=>Me.converters.AbortSignal(t,{strict:!1}))},{key:"window",converter:Me.converters.any},{key:"duplex",converter:Me.converters.DOMString,allowedValues:eye}]);Tj.exports={Request:Cl,makeRequest:OE}});var GE=f((Ftt,Yj)=>{"use strict";var{Response:cye,makeNetworkError:Tt,makeAppropriateNetworkError:LE,filterResponse:kN,makeResponse:ME}=vE(),{Headers:Pj}=El(),{Request:lye,makeRequest:Aye}=Kh(),Xh=require("zlib"),{bytesMatch:uye,makePolicyContainer:dye,clonePolicyContainer:fye,requestBadPort:hye,TAOCheck:pye,appendRequestOriginHeader:gye,responseLocationURL:mye,requestCurrentURL:to,setRequestReferrerPolicyOnRedirect:yye,tryUpgradeRequestToAPotentiallyTrustworthyURL:Eye,createOpaqueTimingInfo:jN,appendFetchMetadata:Cye,corsCheck:Iye,crossOriginResourcePolicyCheck:Bye,determineRequestsReferrer:bye,coarsenedSharedCurrentTime:zN,createDeferredPromise:wye,isBlobLike:Qye,sameOrigin:qN,isCancelled:fu,isAborted:Dj,isErrorLike:_ye,fullyReadBody:Mj,readableStreamClose:Sye,isomorphicEncode:HN,urlIsLocal:Nye,urlIsHttpHttpsScheme:YN,urlHasHttpsScheme:Rye}=$i(),{kState:GN,kHeaders:ON,kGuard:xye,kRealm:kj}=Ho(),hu=require("assert"),{safelyExtractBody:FE}=_h(),{redirectStatusSet:Fj,nullBodyStatus:Uj,safeMethodsSet:vye,requestBodyHeader:Tye,subresourceSet:Pye,DOMException:UE}=Da(),{kHeadersList:du}=Ht(),Dye=require("events"),{Readable:kye,pipeline:Oye}=require("stream"),{addAbortListener:Lye,isErrored:Mye,isReadable:qE,nodeMajor:Oj,nodeMinor:Fye}=lt(),{dataURLProcessor:Uye,serializeAMimeType:qye}=Qs(),{TransformStream:Hye}=require("stream/web"),{getGlobalDispatcher:Gye}=au(),{webidl:jye}=Fn(),{STATUS_CODES:zye}=require("http"),Yye=["GET","HEAD"],LN,MN=globalThis.ReadableStream,HE=class extends Dye{constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state="ongoing",this.setMaxListeners(21)}terminate(e){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(e),this.emit("terminated",e))}abort(e){this.state==="ongoing"&&(this.state="aborted",e||(e=new UE("The operation was aborted.","AbortError")),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit("terminated",e))}};function Wye(t,e={}){jye.argumentLengthCheck(arguments,1,{header:"globalThis.fetch"});let r=wye(),n;try{n=new lye(t,e)}catch(d){return r.reject(d),r.promise}let i=n[GN];if(n.signal.aborted)return FN(r,i,null,n.signal.reason),r.promise;i.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(i.serviceWorkers="none");let o=null,a=null,c=!1,l=null;return Lye(n.signal,()=>{c=!0,hu(l!=null),l.abort(n.signal.reason),FN(r,i,o,n.signal.reason)}),l=Hj({request:i,processResponseEndOfBody:d=>qj(d,"fetch"),processResponse:d=>{if(c)return Promise.resolve();if(d.aborted)return FN(r,i,o,l.serializedAbortReason),Promise.resolve();if(d.type==="error")return r.reject(Object.assign(new TypeError("fetch failed"),{cause:d.error})),Promise.resolve();o=new cye,o[GN]=d,o[kj]=a,o[ON][du]=d.headersList,o[ON][xye]="immutable",o[ON][kj]=a,r.resolve(o)},dispatcher:e.dispatcher??Gye()}),r.promise}function qj(t,e="other"){if(t.type==="error"&&t.aborted||!t.urlList?.length)return;let r=t.urlList[0],n=t.timingInfo,i=t.cacheState;YN(r)&&n!==null&&(t.timingAllowPassed||(n=jN({startTime:n.startTime}),i=""),n.endTime=zN(),t.timingInfo=n,Jye(n,r,e,globalThis,i))}function Jye(t,e,r,n,i){(Oj>18||Oj===18&&Fye>=2)&&performance.markResourceTiming(t,e.href,r,n,i)}function FN(t,e,r,n){if(n||(n=new UE("The operation was aborted.","AbortError")),t.reject(n),e.body!=null&&qE(e.body?.stream)&&e.body.stream.cancel(n).catch(s=>{if(s.code!=="ERR_INVALID_STATE")throw s}),r==null)return;let i=r[GN];i.body!=null&&qE(i.body?.stream)&&i.body.stream.cancel(n).catch(s=>{if(s.code!=="ERR_INVALID_STATE")throw s})}function Hj({request:t,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseEndOfBody:i,processResponseConsumeBody:s,useParallelQueue:o=!1,dispatcher:a}){let c=null,l=!1;t.client!=null&&(c=t.client.globalObject,l=t.client.crossOriginIsolatedCapability);let A=zN(l),u=jN({startTime:A}),d={controller:new HE(a),request:t,timingInfo:u,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseConsumeBody:s,processResponseEndOfBody:i,taskDestination:c,crossOriginIsolatedCapability:l};return hu(!t.body||t.body.stream),t.window==="client"&&(t.window=t.client?.globalObject?.constructor?.name==="Window"?t.client:"no-window"),t.origin==="client"&&(t.origin=t.client?.origin),t.policyContainer==="client"&&(t.client!=null?t.policyContainer=fye(t.client.policyContainer):t.policyContainer=dye()),t.headersList.contains("accept")||t.headersList.append("accept","*/*"),t.headersList.contains("accept-language")||t.headersList.append("accept-language","*"),t.priority,Pye.has(t.destination),Gj(d).catch(h=>{d.controller.terminate(h)}),d.controller}async function Gj(t,e=!1){let r=t.request,n=null;if(r.localURLsOnly&&!Nye(to(r))&&(n=Tt("local URLs only")),Eye(r),hye(r)==="blocked"&&(n=Tt("bad port")),r.referrerPolicy===""&&(r.referrerPolicy=r.policyContainer.referrerPolicy),r.referrer!=="no-referrer"&&(r.referrer=bye(r)),n===null&&(n=await(async()=>{let s=to(r);return qN(s,r.url)&&r.responseTainting==="basic"||s.protocol==="data:"||r.mode==="navigate"||r.mode==="websocket"?(r.responseTainting="basic",await Lj(t)):r.mode==="same-origin"?Tt('request mode cannot be "same-origin"'):r.mode==="no-cors"?r.redirect!=="follow"?Tt('redirect mode cannot be "follow" for "no-cors" request'):(r.responseTainting="opaque",await Lj(t)):YN(to(r))?(r.responseTainting="cors",await jj(t)):Tt("URL scheme must be a HTTP(S) scheme")})()),e)return n;n.status!==0&&!n.internalResponse&&(r.responseTainting,r.responseTainting==="basic"?n=kN(n,"basic"):r.responseTainting==="cors"?n=kN(n,"cors"):r.responseTainting==="opaque"?n=kN(n,"opaque"):hu(!1));let i=n.status===0?n:n.internalResponse;if(i.urlList.length===0&&i.urlList.push(...r.urlList),r.timingAllowFailed||(n.timingAllowPassed=!0),n.type==="opaque"&&i.status===206&&i.rangeRequested&&!r.headers.contains("range")&&(n=i=Tt()),n.status!==0&&(r.method==="HEAD"||r.method==="CONNECT"||Uj.includes(i.status))&&(i.body=null,t.controller.dump=!0),r.integrity){let s=a=>UN(t,Tt(a));if(r.responseTainting==="opaque"||n.body==null){s(n.error);return}let o=a=>{if(!uye(a,r.integrity)){s("integrity mismatch");return}n.body=FE(a)[0],UN(t,n)};await Mj(n.body,o,s)}else UN(t,n)}function Lj(t){if(fu(t)&&t.request.redirectCount===0)return Promise.resolve(LE(t));let{request:e}=t,{protocol:r}=to(e);switch(r){case"about:":return Promise.resolve(Tt("about scheme is not supported"));case"blob:":{LN||(LN=require("buffer").resolveObjectURL);let n=to(e);if(n.search.length!==0)return Promise.resolve(Tt("NetworkError when attempting to fetch resource."));let i=LN(n.toString());if(e.method!=="GET"||!Qye(i))return Promise.resolve(Tt("invalid method"));let s=FE(i),o=s[0],a=HN(`${o.length}`),c=s[1]??"",l=ME({statusText:"OK",headersList:[["content-length",{name:"Content-Length",value:a}],["content-type",{name:"Content-Type",value:c}]]});return l.body=o,Promise.resolve(l)}case"data:":{let n=to(e),i=Uye(n);if(i==="failure")return Promise.resolve(Tt("failed to fetch the data URL"));let s=qye(i.mimeType);return Promise.resolve(ME({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:s}]],body:FE(i.body)[0]}))}case"file:":return Promise.resolve(Tt("not implemented... yet..."));case"http:":case"https:":return jj(t).catch(n=>Tt(n));default:return Promise.resolve(Tt("unknown scheme"))}}function Vye(t,e){t.request.done=!0,t.processResponseDone!=null&&queueMicrotask(()=>t.processResponseDone(e))}function UN(t,e){e.type==="error"&&(e.urlList=[t.request.urlList[0]],e.timingInfo=jN({startTime:t.timingInfo.startTime}));let r=()=>{t.request.done=!0,t.processResponseEndOfBody!=null&&queueMicrotask(()=>t.processResponseEndOfBody(e))};if(t.processResponse!=null&&queueMicrotask(()=>t.processResponse(e)),e.body==null)r();else{let n=(s,o)=>{o.enqueue(s)},i=new Hye({start(){},transform:n,flush:r},{size(){return 1}},{size(){return 1}});e.body={stream:e.body.stream.pipeThrough(i)}}if(t.processResponseConsumeBody!=null){let n=s=>t.processResponseConsumeBody(e,s),i=s=>t.processResponseConsumeBody(e,s);if(e.body==null)queueMicrotask(()=>n(null));else return Mj(e.body,n,i);return Promise.resolve()}}async function jj(t){let e=t.request,r=null,n=null,i=t.timingInfo;if(e.serviceWorkers,r===null){if(e.redirect==="follow"&&(e.serviceWorkers="none"),n=r=await zj(t),e.responseTainting==="cors"&&Iye(e,r)==="failure")return Tt("cors failure");pye(e,r)==="failure"&&(e.timingAllowFailed=!0)}return(e.responseTainting==="opaque"||r.type==="opaque")&&Bye(e.origin,e.client,e.destination,n)==="blocked"?Tt("blocked"):(Fj.has(n.status)&&(e.redirect!=="manual"&&t.controller.connection.destroy(),e.redirect==="error"?r=Tt("unexpected redirect"):e.redirect==="manual"?r=n:e.redirect==="follow"?r=await $ye(t,r):hu(!1)),r.timingInfo=i,r)}function $ye(t,e){let r=t.request,n=e.internalResponse?e.internalResponse:e,i;try{if(i=mye(n,to(r).hash),i==null)return e}catch(o){return Promise.resolve(Tt(o))}if(!YN(i))return Promise.resolve(Tt("URL scheme must be a HTTP(S) scheme"));if(r.redirectCount===20)return Promise.resolve(Tt("redirect count exceeded"));if(r.redirectCount+=1,r.mode==="cors"&&(i.username||i.password)&&!qN(r,i))return Promise.resolve(Tt('cross origin not allowed for request mode "cors"'));if(r.responseTainting==="cors"&&(i.username||i.password))return Promise.resolve(Tt('URL cannot contain credentials for request mode "cors"'));if(n.status!==303&&r.body!=null&&r.body.source==null)return Promise.resolve(Tt());if([301,302].includes(n.status)&&r.method==="POST"||n.status===303&&!Yye.includes(r.method)){r.method="GET",r.body=null;for(let o of Tye)r.headersList.delete(o)}qN(to(r),i)||(r.headersList.delete("authorization"),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie"),r.headersList.delete("host")),r.body!=null&&(hu(r.body.source!=null),r.body=FE(r.body.source)[0]);let s=t.timingInfo;return s.redirectEndTime=s.postRedirectStartTime=zN(t.crossOriginIsolatedCapability),s.redirectStartTime===0&&(s.redirectStartTime=s.startTime),r.urlList.push(i),yye(r,n),Gj(t,!0)}async function zj(t,e=!1,r=!1){let n=t.request,i=null,s=null,o=null,a=null,c=!1;n.window==="no-window"&&n.redirect==="error"?(i=t,s=n):(s=Aye(n),i={...t},i.request=s);let l=n.credentials==="include"||n.credentials==="same-origin"&&n.responseTainting==="basic",A=s.body?s.body.length:null,u=null;if(s.body==null&&["POST","PUT"].includes(s.method)&&(u="0"),A!=null&&(u=HN(`${A}`)),u!=null&&s.headersList.append("content-length",u),A!=null&&s.keepalive,s.referrer instanceof URL&&s.headersList.append("referer",HN(s.referrer.href)),gye(s),Cye(s),s.headersList.contains("user-agent")||s.headersList.append("user-agent",typeof esbuildDetection>"u"?"undici":"node"),s.cache==="default"&&(s.headersList.contains("if-modified-since")||s.headersList.contains("if-none-match")||s.headersList.contains("if-unmodified-since")||s.headersList.contains("if-match")||s.headersList.contains("if-range"))&&(s.cache="no-store"),s.cache==="no-cache"&&!s.preventNoCacheCacheControlHeaderModification&&!s.headersList.contains("cache-control")&&s.headersList.append("cache-control","max-age=0"),(s.cache==="no-store"||s.cache==="reload")&&(s.headersList.contains("pragma")||s.headersList.append("pragma","no-cache"),s.headersList.contains("cache-control")||s.headersList.append("cache-control","no-cache")),s.headersList.contains("range")&&s.headersList.append("accept-encoding","identity"),s.headersList.contains("accept-encoding")||(Rye(to(s))?s.headersList.append("accept-encoding","br, gzip, deflate"):s.headersList.append("accept-encoding","gzip, deflate")),s.headersList.delete("host"),a==null&&(s.cache="no-store"),s.mode!=="no-store"&&s.mode,o==null){if(s.mode==="only-if-cached")return Tt("only if cached");let d=await Kye(i,l,r);!vye.has(s.method)&&d.status>=200&&d.status<=399,c&&d.status,o==null&&(o=d)}if(o.urlList=[...s.urlList],s.headersList.contains("range")&&(o.rangeRequested=!0),o.requestIncludesCredentials=l,o.status===407)return n.window==="no-window"?Tt():fu(t)?LE(t):Tt("proxy authentication required");if(o.status===421&&!r&&(n.body==null||n.body.source!=null)){if(fu(t))return LE(t);t.controller.connection.destroy(),o=await zj(t,e,!0)}return o}async function Kye(t,e=!1,r=!1){hu(!t.controller.connection||t.controller.connection.destroyed),t.controller.connection={abort:null,destroyed:!1,destroy(g){this.destroyed||(this.destroyed=!0,this.abort?.(g??new UE("The operation was aborted.","AbortError")))}};let n=t.request,i=null,s=t.timingInfo;null==null&&(n.cache="no-store");let a=r?"yes":"no";n.mode;let c=null;if(n.body==null&&t.processRequestEndOfBody)queueMicrotask(()=>t.processRequestEndOfBody());else if(n.body!=null){let g=async function*(I){fu(t)||(yield I,t.processRequestBodyChunkLength?.(I.byteLength))},E=()=>{fu(t)||t.processRequestEndOfBody&&t.processRequestEndOfBody()},C=I=>{fu(t)||(I.name==="AbortError"?t.controller.abort():t.controller.terminate(I))};c=(async function*(){try{for await(let I of n.body.stream)yield*g(I);E()}catch(I){C(I)}})()}try{let{body:g,status:E,statusText:C,headersList:I,socket:R}=await h({body:c});if(R)i=ME({status:E,statusText:C,headersList:I,socket:R});else{let P=g[Symbol.asyncIterator]();t.controller.next=()=>P.next(),i=ME({status:E,statusText:C,headersList:I})}}catch(g){return g.name==="AbortError"?(t.controller.connection.destroy(),LE(t,g)):Tt(g)}let l=()=>{t.controller.resume()},A=g=>{t.controller.abort(g)};MN||(MN=require("stream/web").ReadableStream);let u=new MN({async start(g){t.controller.controller=g},async pull(g){await l(g)},async cancel(g){await A(g)}},{highWaterMark:0,size(){return 1}});i.body={stream:u},t.controller.on("terminated",d),t.controller.resume=async()=>{for(;;){let g,E;try{let{done:C,value:I}=await t.controller.next();if(Dj(t))break;g=C?void 0:I}catch(C){t.controller.ended&&!s.encodedBodySize?g=void 0:(g=C,E=!0)}if(g===void 0){Sye(t.controller.controller),Vye(t,i);return}if(s.decodedBodySize+=g?.byteLength??0,E){t.controller.terminate(g);return}if(t.controller.controller.enqueue(new Uint8Array(g)),Mye(u)){t.controller.terminate();return}if(!t.controller.controller.desiredSize)return}};function d(g){Dj(t)?(i.aborted=!0,qE(u)&&t.controller.controller.error(t.controller.serializedAbortReason)):qE(u)&&t.controller.controller.error(new TypeError("terminated",{cause:_ye(g)?g:void 0})),t.controller.connection.destroy()}return i;async function h({body:g}){let E=to(n),C=t.controller.dispatcher;return new Promise((I,R)=>C.dispatch({path:E.pathname+E.search,origin:E.origin,method:n.method,body:t.controller.dispatcher.isMockActive?n.body&&(n.body.source||n.body.stream):g,headers:n.headersList.entries,maxRedirections:0,upgrade:n.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(P){let{connection:M}=t.controller;M.destroyed?P(new UE("The operation was aborted.","AbortError")):(t.controller.on("terminated",P),this.abort=M.abort=P)},onHeaders(P,M,ee,se){if(P<200)return;let U=[],te="",L=new Pj;if(Array.isArray(M))for(let X=0;Xqe.trim()):Ae.toLowerCase()==="location"&&(te=we),L[du].append(Ae,we)}else{let X=Object.keys(M);for(let Ae of X){let we=M[Ae];Ae.toLowerCase()==="content-encoding"?U=we.toLowerCase().split(",").map(qe=>qe.trim()).reverse():Ae.toLowerCase()==="location"&&(te=we),L[du].append(Ae,we)}}this.body=new kye({read:ee});let $=[],K=n.redirect==="follow"&&te&&Fj.has(P);if(n.method!=="HEAD"&&n.method!=="CONNECT"&&!Uj.includes(P)&&!K)for(let X of U)if(X==="x-gzip"||X==="gzip")$.push(Xh.createGunzip({flush:Xh.constants.Z_SYNC_FLUSH,finishFlush:Xh.constants.Z_SYNC_FLUSH}));else if(X==="deflate")$.push(Xh.createInflate());else if(X==="br")$.push(Xh.createBrotliDecompress());else{$.length=0;break}return I({status:P,statusText:se,headersList:L[du],body:$.length?Oye(this.body,...$,()=>{}):this.body.on("error",()=>{})}),!0},onData(P){if(t.controller.dump)return;let M=P;return s.encodedBodySize+=M.byteLength,this.body.push(M)},onComplete(){this.abort&&t.controller.off("terminated",this.abort),t.controller.ended=!0,this.body.push(null)},onError(P){this.abort&&t.controller.off("terminated",this.abort),this.body?.destroy(P),t.controller.terminate(P),R(P)},onUpgrade(P,M,ee){if(P!==101)return;let se=new Pj;for(let U=0;U{"use strict";Wj.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var Vj=f((qtt,Jj)=>{"use strict";var{webidl:Di}=Fn(),jE=Symbol("ProgressEvent state"),JN=class t extends Event{constructor(e,r={}){e=Di.converters.DOMString(e),r=Di.converters.ProgressEventInit(r??{}),super(e,r),this[jE]={lengthComputable:r.lengthComputable,loaded:r.loaded,total:r.total}}get lengthComputable(){return Di.brandCheck(this,t),this[jE].lengthComputable}get loaded(){return Di.brandCheck(this,t),this[jE].loaded}get total(){return Di.brandCheck(this,t),this[jE].total}};Di.converters.ProgressEventInit=Di.dictionaryConverter([{key:"lengthComputable",converter:Di.converters.boolean,defaultValue:!1},{key:"loaded",converter:Di.converters["unsigned long long"],defaultValue:0},{key:"total",converter:Di.converters["unsigned long long"],defaultValue:0},{key:"bubbles",converter:Di.converters.boolean,defaultValue:!1},{key:"cancelable",converter:Di.converters.boolean,defaultValue:!1},{key:"composed",converter:Di.converters.boolean,defaultValue:!1}]);Jj.exports={ProgressEvent:JN}});var Kj=f((Htt,$j)=>{"use strict";function Xye(t){if(!t)return"failure";switch(t.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}$j.exports={getEncoding:Xye}});var sz=f((Gtt,iz)=>{"use strict";var{kState:pu,kError:VN,kResult:Xj,kAborted:Zh,kLastProgressEventFired:$N}=WN(),{ProgressEvent:Zye}=Vj(),{getEncoding:Zj}=Kj(),{DOMException:eEe}=Da(),{serializeAMimeType:tEe,parseMIMEType:ez}=Qs(),{types:rEe}=require("util"),{StringDecoder:tz}=require("string_decoder"),{btoa:rz}=require("buffer"),nEe={enumerable:!0,writable:!1,configurable:!1};function iEe(t,e,r,n){if(t[pu]==="loading")throw new eEe("Invalid state","InvalidStateError");t[pu]="loading",t[Xj]=null,t[VN]=null;let s=e.stream().getReader(),o=[],a=s.read(),c=!0;(async()=>{for(;!t[Zh];)try{let{done:l,value:A}=await a;if(c&&!t[Zh]&&queueMicrotask(()=>{Ha("loadstart",t)}),c=!1,!l&&rEe.isUint8Array(A))o.push(A),(t[$N]===void 0||Date.now()-t[$N]>=50)&&!t[Zh]&&(t[$N]=Date.now(),queueMicrotask(()=>{Ha("progress",t)})),a=s.read();else if(l){queueMicrotask(()=>{t[pu]="done";try{let u=sEe(o,r,e.type,n);if(t[Zh])return;t[Xj]=u,Ha("load",t)}catch(u){t[VN]=u,Ha("error",t)}t[pu]!=="loading"&&Ha("loadend",t)});break}}catch(l){if(t[Zh])return;queueMicrotask(()=>{t[pu]="done",t[VN]=l,Ha("error",t),t[pu]!=="loading"&&Ha("loadend",t)});break}})()}function Ha(t,e){let r=new Zye(t,{bubbles:!1,cancelable:!1});e.dispatchEvent(r)}function sEe(t,e,r,n){switch(e){case"DataURL":{let i="data:",s=ez(r||"application/octet-stream");s!=="failure"&&(i+=tEe(s)),i+=";base64,";let o=new tz("latin1");for(let a of t)i+=rz(o.write(a));return i+=rz(o.end()),i}case"Text":{let i="failure";if(n&&(i=Zj(n)),i==="failure"&&r){let s=ez(r);s!=="failure"&&(i=Zj(s.parameters.get("charset")))}return i==="failure"&&(i="UTF-8"),oEe(t,i)}case"ArrayBuffer":return nz(t).buffer;case"BinaryString":{let i="",s=new tz("latin1");for(let o of t)i+=s.write(o);return i+=s.end(),i}}}function oEe(t,e){let r=nz(t),n=aEe(r),i=0;n!==null&&(e=n,i=n==="UTF-8"?3:2);let s=r.slice(i);return new TextDecoder(e).decode(s)}function aEe(t){let[e,r,n]=t;return e===239&&r===187&&n===191?"UTF-8":e===254&&r===255?"UTF-16BE":e===255&&r===254?"UTF-16LE":null}function nz(t){let e=t.reduce((n,i)=>n+i.byteLength,0),r=0;return t.reduce((n,i)=>(n.set(i,r),r+=i.byteLength,n),new Uint8Array(e))}iz.exports={staticPropertyDescriptors:nEe,readOperation:iEe,fireAProgressEvent:Ha}});var lz=f((jtt,cz)=>{"use strict";var{staticPropertyDescriptors:gu,readOperation:zE,fireAProgressEvent:oz}=sz(),{kState:Il,kError:az,kResult:YE,kEvents:mt,kAborted:cEe}=WN(),{webidl:Nt}=Fn(),{kEnumerableProperty:ci}=lt(),Rs=class t extends EventTarget{constructor(){super(),this[Il]="empty",this[YE]=null,this[az]=null,this[mt]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(e){Nt.brandCheck(this,t),Nt.argumentLengthCheck(arguments,1,{header:"FileReader.readAsArrayBuffer"}),e=Nt.converters.Blob(e,{strict:!1}),zE(this,e,"ArrayBuffer")}readAsBinaryString(e){Nt.brandCheck(this,t),Nt.argumentLengthCheck(arguments,1,{header:"FileReader.readAsBinaryString"}),e=Nt.converters.Blob(e,{strict:!1}),zE(this,e,"BinaryString")}readAsText(e,r=void 0){Nt.brandCheck(this,t),Nt.argumentLengthCheck(arguments,1,{header:"FileReader.readAsText"}),e=Nt.converters.Blob(e,{strict:!1}),r!==void 0&&(r=Nt.converters.DOMString(r)),zE(this,e,"Text",r)}readAsDataURL(e){Nt.brandCheck(this,t),Nt.argumentLengthCheck(arguments,1,{header:"FileReader.readAsDataURL"}),e=Nt.converters.Blob(e,{strict:!1}),zE(this,e,"DataURL")}abort(){if(this[Il]==="empty"||this[Il]==="done"){this[YE]=null;return}this[Il]==="loading"&&(this[Il]="done",this[YE]=null),this[cEe]=!0,oz("abort",this),this[Il]!=="loading"&&oz("loadend",this)}get readyState(){switch(Nt.brandCheck(this,t),this[Il]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return Nt.brandCheck(this,t),this[YE]}get error(){return Nt.brandCheck(this,t),this[az]}get onloadend(){return Nt.brandCheck(this,t),this[mt].loadend}set onloadend(e){Nt.brandCheck(this,t),this[mt].loadend&&this.removeEventListener("loadend",this[mt].loadend),typeof e=="function"?(this[mt].loadend=e,this.addEventListener("loadend",e)):this[mt].loadend=null}get onerror(){return Nt.brandCheck(this,t),this[mt].error}set onerror(e){Nt.brandCheck(this,t),this[mt].error&&this.removeEventListener("error",this[mt].error),typeof e=="function"?(this[mt].error=e,this.addEventListener("error",e)):this[mt].error=null}get onloadstart(){return Nt.brandCheck(this,t),this[mt].loadstart}set onloadstart(e){Nt.brandCheck(this,t),this[mt].loadstart&&this.removeEventListener("loadstart",this[mt].loadstart),typeof e=="function"?(this[mt].loadstart=e,this.addEventListener("loadstart",e)):this[mt].loadstart=null}get onprogress(){return Nt.brandCheck(this,t),this[mt].progress}set onprogress(e){Nt.brandCheck(this,t),this[mt].progress&&this.removeEventListener("progress",this[mt].progress),typeof e=="function"?(this[mt].progress=e,this.addEventListener("progress",e)):this[mt].progress=null}get onload(){return Nt.brandCheck(this,t),this[mt].load}set onload(e){Nt.brandCheck(this,t),this[mt].load&&this.removeEventListener("load",this[mt].load),typeof e=="function"?(this[mt].load=e,this.addEventListener("load",e)):this[mt].load=null}get onabort(){return Nt.brandCheck(this,t),this[mt].abort}set onabort(e){Nt.brandCheck(this,t),this[mt].abort&&this.removeEventListener("abort",this[mt].abort),typeof e=="function"?(this[mt].abort=e,this.addEventListener("abort",e)):this[mt].abort=null}};Rs.EMPTY=Rs.prototype.EMPTY=0;Rs.LOADING=Rs.prototype.LOADING=1;Rs.DONE=Rs.prototype.DONE=2;Object.defineProperties(Rs.prototype,{EMPTY:gu,LOADING:gu,DONE:gu,readAsArrayBuffer:ci,readAsBinaryString:ci,readAsText:ci,readAsDataURL:ci,abort:ci,readyState:ci,result:ci,error:ci,onloadstart:ci,onprogress:ci,onload:ci,onabort:ci,onerror:ci,onloadend:ci,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Rs,{EMPTY:gu,LOADING:gu,DONE:gu});cz.exports={FileReader:Rs}});var WE=f((ztt,Az)=>{"use strict";Az.exports={kConstruct:Ht().kConstruct}});var fz=f((Ytt,dz)=>{"use strict";var lEe=require("assert"),{URLSerializer:uz}=Qs(),{isValidHeaderName:AEe}=$i();function uEe(t,e,r=!1){let n=uz(t,r),i=uz(e,r);return n===i}function dEe(t){lEe(t!==null);let e=[];for(let r of t.split(",")){if(r=r.trim(),r.length){if(!AEe(r))continue}else continue;e.push(r)}return e}dz.exports={urlEquals:uEe,fieldValues:dEe}});var Ez=f((Wtt,yz)=>{"use strict";var{kConstruct:fEe}=WE(),{urlEquals:hEe,fieldValues:KN}=fz(),{kEnumerableProperty:Bl,isDisturbed:pEe}=lt(),{kHeadersList:hz}=Ht(),{webidl:Ne}=Fn(),{Response:gz,cloneResponse:gEe}=vE(),{Request:ro}=Kh(),{kState:jn,kHeaders:JE,kGuard:pz,kRealm:mEe}=Ho(),{fetching:yEe}=GE(),{urlIsHttpHttpsScheme:VE,createDeferredPromise:mu,readAllBytes:EEe}=$i(),XN=require("assert"),{getGlobalDispatcher:CEe}=au(),$E=class t{#e;constructor(){arguments[0]!==fEe&&Ne.illegalConstructor(),this.#e=arguments[1]}async match(e,r={}){Ne.brandCheck(this,t),Ne.argumentLengthCheck(arguments,1,{header:"Cache.match"}),e=Ne.converters.RequestInfo(e),r=Ne.converters.CacheQueryOptions(r);let n=await this.matchAll(e,r);if(n.length!==0)return n[0]}async matchAll(e=void 0,r={}){Ne.brandCheck(this,t),e!==void 0&&(e=Ne.converters.RequestInfo(e)),r=Ne.converters.CacheQueryOptions(r);let n=null;if(e!==void 0)if(e instanceof ro){if(n=e[jn],n.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(n=new ro(e)[jn]);let i=[];if(e===void 0)for(let o of this.#e)i.push(o[1]);else{let o=this.#n(n,r);for(let a of o)i.push(a[1])}let s=[];for(let o of i){let a=new gz(o.body?.source??null),c=a[jn].body;a[jn]=o,a[jn].body=c,a[JE][hz]=o.headersList,a[JE][pz]="immutable",s.push(a)}return Object.freeze(s)}async add(e){Ne.brandCheck(this,t),Ne.argumentLengthCheck(arguments,1,{header:"Cache.add"}),e=Ne.converters.RequestInfo(e);let r=[e];return await this.addAll(r)}async addAll(e){Ne.brandCheck(this,t),Ne.argumentLengthCheck(arguments,1,{header:"Cache.addAll"}),e=Ne.converters["sequence"](e);let r=[],n=[];for(let u of e){if(typeof u=="string")continue;let d=u[jn];if(!VE(d.url)||d.method!=="GET")throw Ne.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme when method is not GET."})}let i=[];for(let u of e){let d=new ro(u)[jn];if(!VE(d.url))throw Ne.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme."});d.initiator="fetch",d.destination="subresource",n.push(d);let h=mu();i.push(yEe({request:d,dispatcher:CEe(),processResponse(g){if(g.type==="error"||g.status===206||g.status<200||g.status>299)h.reject(Ne.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(g.headersList.contains("vary")){let E=KN(g.headersList.get("vary"));for(let C of E)if(C==="*"){h.reject(Ne.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let I of i)I.abort();return}}},processResponseEndOfBody(g){if(g.aborted){h.reject(new DOMException("aborted","AbortError"));return}h.resolve(g)}})),r.push(h.promise)}let o=await Promise.all(r),a=[],c=0;for(let u of o){let d={type:"put",request:n[c],response:u};a.push(d),c++}let l=mu(),A=null;try{this.#r(a)}catch(u){A=u}return queueMicrotask(()=>{A===null?l.resolve(void 0):l.reject(A)}),l.promise}async put(e,r){Ne.brandCheck(this,t),Ne.argumentLengthCheck(arguments,2,{header:"Cache.put"}),e=Ne.converters.RequestInfo(e),r=Ne.converters.Response(r);let n=null;if(e instanceof ro?n=e[jn]:n=new ro(e)[jn],!VE(n.url)||n.method!=="GET")throw Ne.errors.exception({header:"Cache.put",message:"Expected an http/s scheme when method is not GET"});let i=r[jn];if(i.status===206)throw Ne.errors.exception({header:"Cache.put",message:"Got 206 status"});if(i.headersList.contains("vary")){let d=KN(i.headersList.get("vary"));for(let h of d)if(h==="*")throw Ne.errors.exception({header:"Cache.put",message:"Got * vary field value"})}if(i.body&&(pEe(i.body.stream)||i.body.stream.locked))throw Ne.errors.exception({header:"Cache.put",message:"Response body is locked or disturbed"});let s=gEe(i),o=mu();if(i.body!=null){let h=i.body.stream.getReader();EEe(h).then(o.resolve,o.reject)}else o.resolve(void 0);let a=[],c={type:"put",request:n,response:s};a.push(c);let l=await o.promise;s.body!=null&&(s.body.source=l);let A=mu(),u=null;try{this.#r(a)}catch(d){u=d}return queueMicrotask(()=>{u===null?A.resolve():A.reject(u)}),A.promise}async delete(e,r={}){Ne.brandCheck(this,t),Ne.argumentLengthCheck(arguments,1,{header:"Cache.delete"}),e=Ne.converters.RequestInfo(e),r=Ne.converters.CacheQueryOptions(r);let n=null;if(e instanceof ro){if(n=e[jn],n.method!=="GET"&&!r.ignoreMethod)return!1}else XN(typeof e=="string"),n=new ro(e)[jn];let i=[],s={type:"delete",request:n,options:r};i.push(s);let o=mu(),a=null,c;try{c=this.#r(i)}catch(l){a=l}return queueMicrotask(()=>{a===null?o.resolve(!!c?.length):o.reject(a)}),o.promise}async keys(e=void 0,r={}){Ne.brandCheck(this,t),e!==void 0&&(e=Ne.converters.RequestInfo(e)),r=Ne.converters.CacheQueryOptions(r);let n=null;if(e!==void 0)if(e instanceof ro){if(n=e[jn],n.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(n=new ro(e)[jn]);let i=mu(),s=[];if(e===void 0)for(let o of this.#e)s.push(o[0]);else{let o=this.#n(n,r);for(let a of o)s.push(a[0])}return queueMicrotask(()=>{let o=[];for(let a of s){let c=new ro("https://a");c[jn]=a,c[JE][hz]=a.headersList,c[JE][pz]="immutable",c[mEe]=a.client,o.push(c)}i.resolve(Object.freeze(o))}),i.promise}#r(e){let r=this.#e,n=[...r],i=[],s=[];try{for(let o of e){if(o.type!=="delete"&&o.type!=="put")throw Ne.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(o.type==="delete"&&o.response!=null)throw Ne.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#n(o.request,o.options,i).length)throw new DOMException("???","InvalidStateError");let a;if(o.type==="delete"){if(a=this.#n(o.request,o.options),a.length===0)return[];for(let c of a){let l=r.indexOf(c);XN(l!==-1),r.splice(l,1)}}else if(o.type==="put"){if(o.response==null)throw Ne.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let c=o.request;if(!VE(c.url))throw Ne.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(c.method!=="GET")throw Ne.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(o.options!=null)throw Ne.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});a=this.#n(o.request);for(let l of a){let A=r.indexOf(l);XN(A!==-1),r.splice(A,1)}r.push([o.request,o.response]),i.push([o.request,o.response])}s.push([o.request,o.response])}return s}catch(o){throw this.#e.length=0,this.#e=n,o}}#n(e,r,n){let i=[],s=n??this.#e;for(let o of s){let[a,c]=o;this.#t(e,a,c,r)&&i.push(o)}return i}#t(e,r,n=null,i){let s=new URL(e.url),o=new URL(r.url);if(i?.ignoreSearch&&(o.search="",s.search=""),!hEe(s,o,!0))return!1;if(n==null||i?.ignoreVary||!n.headersList.contains("vary"))return!0;let a=KN(n.headersList.get("vary"));for(let c of a){if(c==="*")return!1;let l=r.headersList.get(c),A=e.headersList.get(c);if(l!==A)return!1}return!0}};Object.defineProperties($E.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:Bl,matchAll:Bl,add:Bl,addAll:Bl,put:Bl,delete:Bl,keys:Bl});var mz=[{key:"ignoreSearch",converter:Ne.converters.boolean,defaultValue:!1},{key:"ignoreMethod",converter:Ne.converters.boolean,defaultValue:!1},{key:"ignoreVary",converter:Ne.converters.boolean,defaultValue:!1}];Ne.converters.CacheQueryOptions=Ne.dictionaryConverter(mz);Ne.converters.MultiCacheQueryOptions=Ne.dictionaryConverter([...mz,{key:"cacheName",converter:Ne.converters.DOMString}]);Ne.converters.Response=Ne.interfaceConverter(gz);Ne.converters["sequence"]=Ne.sequenceConverter(Ne.converters.RequestInfo);yz.exports={Cache:$E}});var Iz=f((Jtt,Cz)=>{"use strict";var{kConstruct:ep}=WE(),{Cache:KE}=Ez(),{webidl:zn}=Fn(),{kEnumerableProperty:tp}=lt(),XE=class t{#e=new Map;constructor(){arguments[0]!==ep&&zn.illegalConstructor()}async match(e,r={}){if(zn.brandCheck(this,t),zn.argumentLengthCheck(arguments,1,{header:"CacheStorage.match"}),e=zn.converters.RequestInfo(e),r=zn.converters.MultiCacheQueryOptions(r),r.cacheName!=null){if(this.#e.has(r.cacheName)){let n=this.#e.get(r.cacheName);return await new KE(ep,n).match(e,r)}}else for(let n of this.#e.values()){let s=await new KE(ep,n).match(e,r);if(s!==void 0)return s}}async has(e){return zn.brandCheck(this,t),zn.argumentLengthCheck(arguments,1,{header:"CacheStorage.has"}),e=zn.converters.DOMString(e),this.#e.has(e)}async open(e){if(zn.brandCheck(this,t),zn.argumentLengthCheck(arguments,1,{header:"CacheStorage.open"}),e=zn.converters.DOMString(e),this.#e.has(e)){let n=this.#e.get(e);return new KE(ep,n)}let r=[];return this.#e.set(e,r),new KE(ep,r)}async delete(e){return zn.brandCheck(this,t),zn.argumentLengthCheck(arguments,1,{header:"CacheStorage.delete"}),e=zn.converters.DOMString(e),this.#e.delete(e)}async keys(){return zn.brandCheck(this,t),[...this.#e.keys()]}};Object.defineProperties(XE.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:tp,has:tp,open:tp,delete:tp,keys:tp});Cz.exports={CacheStorage:XE}});var bz=f((Vtt,Bz)=>{"use strict";Bz.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var ZN=f(($tt,Nz)=>{"use strict";function IEe(t){if(t.length===0)return!1;for(let e of t){let r=e.charCodeAt(0);if(r>=0||r<=8||r>=10||r<=31||r===127)return!1}}function wz(t){for(let e of t){let r=e.charCodeAt(0);if(r<=32||r>127||e==="("||e===")"||e===">"||e==="<"||e==="@"||e===","||e===";"||e===":"||e==="\\"||e==='"'||e==="/"||e==="["||e==="]"||e==="?"||e==="="||e==="{"||e==="}")throw new Error("Invalid cookie name")}}function Qz(t){for(let e of t){let r=e.charCodeAt(0);if(r<33||r===34||r===44||r===59||r===92||r>126)throw new Error("Invalid header value")}}function _z(t){for(let e of t)if(e.charCodeAt(0)<33||e===";")throw new Error("Invalid cookie path")}function BEe(t){if(t.startsWith("-")||t.endsWith(".")||t.endsWith("-"))throw new Error("Invalid cookie domain")}function Sz(t){typeof t=="number"&&(t=new Date(t));let e=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n=e[t.getUTCDay()],i=t.getUTCDate().toString().padStart(2,"0"),s=r[t.getUTCMonth()],o=t.getUTCFullYear(),a=t.getUTCHours().toString().padStart(2,"0"),c=t.getUTCMinutes().toString().padStart(2,"0"),l=t.getUTCSeconds().toString().padStart(2,"0");return`${n}, ${i} ${s} ${o} ${a}:${c}:${l} GMT`}function bEe(t){if(t<0)throw new Error("Invalid cookie max-age")}function wEe(t){if(t.name.length===0)return null;wz(t.name),Qz(t.value);let e=[`${t.name}=${t.value}`];t.name.startsWith("__Secure-")&&(t.secure=!0),t.name.startsWith("__Host-")&&(t.secure=!0,t.domain=null,t.path="/"),t.secure&&e.push("Secure"),t.httpOnly&&e.push("HttpOnly"),typeof t.maxAge=="number"&&(bEe(t.maxAge),e.push(`Max-Age=${t.maxAge}`)),t.domain&&(BEe(t.domain),e.push(`Domain=${t.domain}`)),t.path&&(_z(t.path),e.push(`Path=${t.path}`)),t.expires&&t.expires.toString()!=="Invalid Date"&&e.push(`Expires=${Sz(t.expires)}`),t.sameSite&&e.push(`SameSite=${t.sameSite}`);for(let r of t.unparsed){if(!r.includes("="))throw new Error("Invalid unparsed");let[n,...i]=r.split("=");e.push(`${n.trim()}=${i.join("=")}`)}return e.join("; ")}Nz.exports={isCTLExcludingHtab:IEe,validateCookieName:wz,validateCookiePath:_z,validateCookieValue:Qz,toIMFDate:Sz,stringify:wEe}});var xz=f((Ktt,Rz)=>{"use strict";var{maxNameValuePairSize:QEe,maxAttributeValueSize:_Ee}=bz(),{isCTLExcludingHtab:SEe}=ZN(),{collectASequenceOfCodePointsFast:ZE}=Qs(),NEe=require("assert");function REe(t){if(SEe(t))return null;let e="",r="",n="",i="";if(t.includes(";")){let s={position:0};e=ZE(";",t,s),r=t.slice(s.position)}else e=t;if(!e.includes("="))i=e;else{let s={position:0};n=ZE("=",e,s),i=e.slice(s.position+1)}return n=n.trim(),i=i.trim(),n.length+i.length>QEe?null:{name:n,value:i,...yu(r)}}function yu(t,e={}){if(t.length===0)return e;NEe(t[0]===";"),t=t.slice(1);let r="";t.includes(";")?(r=ZE(";",t,{position:0}),t=t.slice(r.length)):(r=t,t="");let n="",i="";if(r.includes("=")){let o={position:0};n=ZE("=",r,o),i=r.slice(o.position+1)}else n=r;if(n=n.trim(),i=i.trim(),i.length>_Ee)return yu(t,e);let s=n.toLowerCase();if(s==="expires"){let o=new Date(i);e.expires=o}else if(s==="max-age"){let o=i.charCodeAt(0);if((o<48||o>57)&&i[0]!=="-"||!/^\d+$/.test(i))return yu(t,e);let a=Number(i);e.maxAge=a}else if(s==="domain"){let o=i;o[0]==="."&&(o=o.slice(1)),o=o.toLowerCase(),e.domain=o}else if(s==="path"){let o="";i.length===0||i[0]!=="/"?o="/":o=i,e.path=o}else if(s==="secure")e.secure=!0;else if(s==="httponly")e.httpOnly=!0;else if(s==="samesite"){let o="Default",a=i.toLowerCase();a.includes("none")&&(o="None"),a.includes("strict")&&(o="Strict"),a.includes("lax")&&(o="Lax"),e.sameSite=o}else e.unparsed??=[],e.unparsed.push(`${n}=${i}`);return yu(t,e)}Rz.exports={parseSetCookie:REe,parseUnparsedAttributes:yu}});var Dz=f((Xtt,Pz)=>{"use strict";var{parseSetCookie:xEe}=xz(),{stringify:vz}=ZN(),{webidl:et}=Fn(),{Headers:eC}=El();function vEe(t){et.argumentLengthCheck(arguments,1,{header:"getCookies"}),et.brandCheck(t,eC,{strict:!1});let e=t.get("cookie"),r={};if(!e)return r;for(let n of e.split(";")){let[i,...s]=n.split("=");r[i.trim()]=s.join("=")}return r}function TEe(t,e,r){et.argumentLengthCheck(arguments,2,{header:"deleteCookie"}),et.brandCheck(t,eC,{strict:!1}),e=et.converters.DOMString(e),r=et.converters.DeleteCookieAttributes(r),Tz(t,{name:e,value:"",expires:new Date(0),...r})}function PEe(t){et.argumentLengthCheck(arguments,1,{header:"getSetCookies"}),et.brandCheck(t,eC,{strict:!1});let e=t.getSetCookie();return e?e.map(r=>xEe(r)):[]}function Tz(t,e){et.argumentLengthCheck(arguments,2,{header:"setCookie"}),et.brandCheck(t,eC,{strict:!1}),e=et.converters.Cookie(e),vz(e)&&t.append("Set-Cookie",vz(e))}et.converters.DeleteCookieAttributes=et.dictionaryConverter([{converter:et.nullableConverter(et.converters.DOMString),key:"path",defaultValue:null},{converter:et.nullableConverter(et.converters.DOMString),key:"domain",defaultValue:null}]);et.converters.Cookie=et.dictionaryConverter([{converter:et.converters.DOMString,key:"name"},{converter:et.converters.DOMString,key:"value"},{converter:et.nullableConverter(t=>typeof t=="number"?et.converters["unsigned long long"](t):new Date(t)),key:"expires",defaultValue:null},{converter:et.nullableConverter(et.converters["long long"]),key:"maxAge",defaultValue:null},{converter:et.nullableConverter(et.converters.DOMString),key:"domain",defaultValue:null},{converter:et.nullableConverter(et.converters.DOMString),key:"path",defaultValue:null},{converter:et.nullableConverter(et.converters.boolean),key:"secure",defaultValue:null},{converter:et.nullableConverter(et.converters.boolean),key:"httpOnly",defaultValue:null},{converter:et.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:et.sequenceConverter(et.converters.DOMString),key:"unparsed",defaultValue:[]}]);Pz.exports={getCookies:vEe,deleteCookie:TEe,getSetCookies:PEe,setCookie:Tz}});var Eu=f((Ztt,kz)=>{"use strict";var DEe="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kEe={enumerable:!0,writable:!1,configurable:!1},OEe={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},LEe={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},MEe=2**16-1,FEe={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},UEe=Buffer.allocUnsafe(0);kz.exports={uid:DEe,staticPropertyDescriptors:kEe,states:OEe,opcodes:LEe,maxUnsigned16Bit:MEe,parserStates:FEe,emptyBuffer:UEe}});var rp=f((ert,Oz)=>{"use strict";Oz.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var tR=f((trt,Lz)=>{"use strict";var{webidl:Re}=Fn(),{kEnumerableProperty:li}=lt(),{MessagePort:qEe}=require("worker_threads"),tC=class t extends Event{#e;constructor(e,r={}){Re.argumentLengthCheck(arguments,1,{header:"MessageEvent constructor"}),e=Re.converters.DOMString(e),r=Re.converters.MessageEventInit(r),super(e,r),this.#e=r}get data(){return Re.brandCheck(this,t),this.#e.data}get origin(){return Re.brandCheck(this,t),this.#e.origin}get lastEventId(){return Re.brandCheck(this,t),this.#e.lastEventId}get source(){return Re.brandCheck(this,t),this.#e.source}get ports(){return Re.brandCheck(this,t),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(e,r=!1,n=!1,i=null,s="",o="",a=null,c=[]){return Re.brandCheck(this,t),Re.argumentLengthCheck(arguments,1,{header:"MessageEvent.initMessageEvent"}),new t(e,{bubbles:r,cancelable:n,data:i,origin:s,lastEventId:o,source:a,ports:c})}},rC=class t extends Event{#e;constructor(e,r={}){Re.argumentLengthCheck(arguments,1,{header:"CloseEvent constructor"}),e=Re.converters.DOMString(e),r=Re.converters.CloseEventInit(r),super(e,r),this.#e=r}get wasClean(){return Re.brandCheck(this,t),this.#e.wasClean}get code(){return Re.brandCheck(this,t),this.#e.code}get reason(){return Re.brandCheck(this,t),this.#e.reason}},nC=class t extends Event{#e;constructor(e,r){Re.argumentLengthCheck(arguments,1,{header:"ErrorEvent constructor"}),super(e,r),e=Re.converters.DOMString(e),r=Re.converters.ErrorEventInit(r??{}),this.#e=r}get message(){return Re.brandCheck(this,t),this.#e.message}get filename(){return Re.brandCheck(this,t),this.#e.filename}get lineno(){return Re.brandCheck(this,t),this.#e.lineno}get colno(){return Re.brandCheck(this,t),this.#e.colno}get error(){return Re.brandCheck(this,t),this.#e.error}};Object.defineProperties(tC.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:li,origin:li,lastEventId:li,source:li,ports:li,initMessageEvent:li});Object.defineProperties(rC.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:li,code:li,wasClean:li});Object.defineProperties(nC.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:li,filename:li,lineno:li,colno:li,error:li});Re.converters.MessagePort=Re.interfaceConverter(qEe);Re.converters["sequence"]=Re.sequenceConverter(Re.converters.MessagePort);var eR=[{key:"bubbles",converter:Re.converters.boolean,defaultValue:!1},{key:"cancelable",converter:Re.converters.boolean,defaultValue:!1},{key:"composed",converter:Re.converters.boolean,defaultValue:!1}];Re.converters.MessageEventInit=Re.dictionaryConverter([...eR,{key:"data",converter:Re.converters.any,defaultValue:null},{key:"origin",converter:Re.converters.USVString,defaultValue:""},{key:"lastEventId",converter:Re.converters.DOMString,defaultValue:""},{key:"source",converter:Re.nullableConverter(Re.converters.MessagePort),defaultValue:null},{key:"ports",converter:Re.converters["sequence"],get defaultValue(){return[]}}]);Re.converters.CloseEventInit=Re.dictionaryConverter([...eR,{key:"wasClean",converter:Re.converters.boolean,defaultValue:!1},{key:"code",converter:Re.converters["unsigned short"],defaultValue:0},{key:"reason",converter:Re.converters.USVString,defaultValue:""}]);Re.converters.ErrorEventInit=Re.dictionaryConverter([...eR,{key:"message",converter:Re.converters.DOMString,defaultValue:""},{key:"filename",converter:Re.converters.USVString,defaultValue:""},{key:"lineno",converter:Re.converters["unsigned long"],defaultValue:0},{key:"colno",converter:Re.converters["unsigned long"],defaultValue:0},{key:"error",converter:Re.converters.any}]);Lz.exports={MessageEvent:tC,CloseEvent:rC,ErrorEvent:nC}});var oC=f((rrt,Uz)=>{"use strict";var{kReadyState:iC,kController:HEe,kResponse:GEe,kBinaryType:jEe,kWebSocketURL:zEe}=rp(),{states:sC,opcodes:Mz}=Eu(),{MessageEvent:YEe,ErrorEvent:WEe}=tR();function JEe(t){return t[iC]===sC.OPEN}function VEe(t){return t[iC]===sC.CLOSING}function $Ee(t){return t[iC]===sC.CLOSED}function rR(t,e,r=Event,n){let i=new r(t,n);e.dispatchEvent(i)}function KEe(t,e,r){if(t[iC]!==sC.OPEN)return;let n;if(e===Mz.TEXT)try{n=new TextDecoder("utf-8",{fatal:!0}).decode(r)}catch{Fz(t,"Received invalid UTF-8 in text frame.");return}else e===Mz.BINARY&&(t[jEe]==="blob"?n=new Blob([r]):n=new Uint8Array(r).buffer);rR("message",t,YEe,{origin:t[zEe].origin,data:n})}function XEe(t){if(t.length===0)return!1;for(let e of t){let r=e.charCodeAt(0);if(r<33||r>126||e==="("||e===")"||e==="<"||e===">"||e==="@"||e===","||e===";"||e===":"||e==="\\"||e==='"'||e==="/"||e==="["||e==="]"||e==="?"||e==="="||e==="{"||e==="}"||r===32||r===9)return!1}return!0}function ZEe(t){return t>=1e3&&t<1015?t!==1004&&t!==1005&&t!==1006:t>=3e3&&t<=4999}function Fz(t,e){let{[HEe]:r,[GEe]:n}=t;r.abort(),n?.socket&&!n.socket.destroyed&&n.socket.destroy(),e&&rR("error",t,WEe,{error:new Error(e)})}Uz.exports={isEstablished:JEe,isClosing:VEe,isClosed:$Ee,fireEvent:rR,isValidSubprotocol:XEe,isValidStatusCode:ZEe,failWebsocketConnection:Fz,websocketMessageReceived:KEe}});var Yz=f((nrt,zz)=>{"use strict";var iR=require("diagnostics_channel"),{uid:eCe,states:Hz}=Eu(),{kReadyState:Gz,kSentClose:qz,kByteParser:jz,kReceivedClose:tCe}=rp(),{fireEvent:rCe,failWebsocketConnection:bl}=oC(),{CloseEvent:nCe}=tR(),{makeRequest:iCe}=Kh(),{fetching:sCe}=GE(),{Headers:oCe}=El(),{getGlobalDispatcher:aCe}=au(),{kHeadersList:cCe}=Ht(),Ko={};Ko.open=iR.channel("undici:websocket:open");Ko.close=iR.channel("undici:websocket:close");Ko.socketError=iR.channel("undici:websocket:socket_error");var nR;try{nR=require("crypto")}catch{}function lCe(t,e,r,n,i){let s=t;s.protocol=t.protocol==="ws:"?"http:":"https:";let o=iCe({urlList:[s],serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(i.headers){let A=new oCe(i.headers)[cCe];o.headersList=A}let a=nR.randomBytes(16).toString("base64");o.headersList.append("sec-websocket-key",a),o.headersList.append("sec-websocket-version","13");for(let A of e)o.headersList.append("sec-websocket-protocol",A);let c="";return sCe({request:o,useParallelQueue:!0,dispatcher:i.dispatcher??aCe(),processResponse(A){if(A.type==="error"||A.status!==101){bl(r,"Received network error or non-101 status code.");return}if(e.length!==0&&!A.headersList.get("Sec-WebSocket-Protocol")){bl(r,"Server did not respond with sent protocols.");return}if(A.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){bl(r,'Server did not set Upgrade header to "websocket".');return}if(A.headersList.get("Connection")?.toLowerCase()!=="upgrade"){bl(r,'Server did not set Connection header to "upgrade".');return}let u=A.headersList.get("Sec-WebSocket-Accept"),d=nR.createHash("sha1").update(a+eCe).digest("base64");if(u!==d){bl(r,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let h=A.headersList.get("Sec-WebSocket-Extensions");if(h!==null&&h!==c){bl(r,"Received different permessage-deflate than the one set.");return}let g=A.headersList.get("Sec-WebSocket-Protocol");if(g!==null&&g!==o.headersList.get("Sec-WebSocket-Protocol")){bl(r,"Protocol was not set in the opening handshake.");return}A.socket.on("data",ACe),A.socket.on("close",uCe),A.socket.on("error",dCe),Ko.open.hasSubscribers&&Ko.open.publish({address:A.socket.address(),protocol:g,extensions:h}),n(A)}})}function ACe(t){this.ws[jz].write(t)||this.pause()}function uCe(){let{ws:t}=this,e=t[qz]&&t[tCe],r=1005,n="",i=t[jz].closingInfo;i?(r=i.code??1005,n=i.reason):t[qz]||(r=1006),t[Gz]=Hz.CLOSED,rCe("close",t,nCe,{wasClean:e,code:r,reason:n}),Ko.close.hasSubscribers&&Ko.close.publish({websocket:t,code:r,reason:n})}function dCe(t){let{ws:e}=this;e[Gz]=Hz.CLOSING,Ko.socketError.hasSubscribers&&Ko.socketError.publish(t),this.destroy()}zz.exports={establishWebSocketConnection:lCe}});var oR=f((irt,Jz)=>{"use strict";var{maxUnsigned16Bit:fCe}=Eu(),Wz;try{Wz=require("crypto")}catch{}var sR=class{constructor(e){this.frameData=e,this.maskKey=Wz.randomBytes(4)}createFrame(e){let r=this.frameData?.byteLength??0,n=r,i=6;r>fCe?(i+=8,n=127):r>125&&(i+=2,n=126);let s=Buffer.allocUnsafe(r+i);s[0]=s[1]=0,s[0]|=128,s[0]=(s[0]&240)+e;s[i-4]=this.maskKey[0],s[i-3]=this.maskKey[1],s[i-2]=this.maskKey[2],s[i-1]=this.maskKey[3],s[1]=n,n===126?s.writeUInt16BE(r,2):n===127&&(s[2]=s[3]=0,s.writeUIntBE(r,4,6)),s[1]|=128;for(let o=0;o{"use strict";var{Writable:hCe}=require("stream"),eY=require("diagnostics_channel"),{parserStates:Zi,opcodes:es,states:pCe,emptyBuffer:gCe}=Eu(),{kReadyState:mCe,kSentClose:Vz,kResponse:$z,kReceivedClose:Kz}=rp(),{isValidStatusCode:Xz,failWebsocketConnection:np,websocketMessageReceived:yCe}=oC(),{WebsocketFrameSend:Zz}=oR(),Cu={};Cu.ping=eY.channel("undici:websocket:ping");Cu.pong=eY.channel("undici:websocket:pong");var aR=class extends hCe{#e=[];#r=0;#n=Zi.INFO;#t={};#o=[];constructor(e){super(),this.ws=e}_write(e,r,n){this.#e.push(e),this.#r+=e.length,this.run(n)}run(e){for(;;){if(this.#n===Zi.INFO){if(this.#r<2)return e();let r=this.consume(2);if(this.#t.fin=(r[0]&128)!==0,this.#t.opcode=r[0]&15,this.#t.originalOpcode??=this.#t.opcode,this.#t.fragmented=!this.#t.fin&&this.#t.opcode!==es.CONTINUATION,this.#t.fragmented&&this.#t.opcode!==es.BINARY&&this.#t.opcode!==es.TEXT){np(this.ws,"Invalid frame type was fragmented.");return}let n=r[1]&127;if(n<=125?(this.#t.payloadLength=n,this.#n=Zi.READ_DATA):n===126?this.#n=Zi.PAYLOADLENGTH_16:n===127&&(this.#n=Zi.PAYLOADLENGTH_64),this.#t.fragmented&&n>125){np(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#t.opcode===es.PING||this.#t.opcode===es.PONG||this.#t.opcode===es.CLOSE)&&n>125){np(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#t.opcode===es.CLOSE){if(n===1){np(this.ws,"Received close frame with a 1-byte body.");return}let i=this.consume(n);if(this.#t.closeInfo=this.parseCloseBody(!1,i),!this.ws[Vz]){let s=Buffer.allocUnsafe(2);s.writeUInt16BE(this.#t.closeInfo.code,0);let o=new Zz(s);this.ws[$z].socket.write(o.createFrame(es.CLOSE),a=>{a||(this.ws[Vz]=!0)})}this.ws[mCe]=pCe.CLOSING,this.ws[Kz]=!0,this.end();return}else if(this.#t.opcode===es.PING){let i=this.consume(n);if(!this.ws[Kz]){let s=new Zz(i);this.ws[$z].socket.write(s.createFrame(es.PONG)),Cu.ping.hasSubscribers&&Cu.ping.publish({payload:i})}if(this.#n=Zi.INFO,this.#r>0)continue;e();return}else if(this.#t.opcode===es.PONG){let i=this.consume(n);if(Cu.pong.hasSubscribers&&Cu.pong.publish({payload:i}),this.#r>0)continue;e();return}}else if(this.#n===Zi.PAYLOADLENGTH_16){if(this.#r<2)return e();let r=this.consume(2);this.#t.payloadLength=r.readUInt16BE(0),this.#n=Zi.READ_DATA}else if(this.#n===Zi.PAYLOADLENGTH_64){if(this.#r<8)return e();let r=this.consume(8),n=r.readUInt32BE(0);if(n>2**31-1){np(this.ws,"Received payload length > 2^31 bytes.");return}let i=r.readUInt32BE(4);this.#t.payloadLength=(n<<8)+i,this.#n=Zi.READ_DATA}else if(this.#n===Zi.READ_DATA){if(this.#r=this.#t.payloadLength){let r=this.consume(this.#t.payloadLength);if(this.#o.push(r),!this.#t.fragmented||this.#t.fin&&this.#t.opcode===es.CONTINUATION){let n=Buffer.concat(this.#o);yCe(this.ws,this.#t.originalOpcode,n),this.#t={},this.#o.length=0}this.#n=Zi.INFO}}if(!(this.#r>0)){e();break}}}consume(e){if(e>this.#r)return null;if(e===0)return gCe;if(this.#e[0].length===e)return this.#r-=this.#e[0].length,this.#e.shift();let r=Buffer.allocUnsafe(e),n=0;for(;n!==e;){let i=this.#e[0],{length:s}=i;if(s+n===e){r.set(this.#e.shift(),n);break}else if(s+n>e){r.set(i.subarray(0,e-n),n),this.#e[0]=i.subarray(e-n);break}else r.set(this.#e.shift(),n),n+=i.length}return this.#r-=e,r}parseCloseBody(e,r){let n;if(r.length>=2&&(n=r.readUInt16BE(0)),e)return Xz(n)?{code:n}:null;let i=r.subarray(2);if(i[0]===239&&i[1]===187&&i[2]===191&&(i=i.subarray(3)),n!==void 0&&!Xz(n))return null;try{i=new TextDecoder("utf-8",{fatal:!0}).decode(i)}catch{return null}return{code:n,reason:i}}get closingInfo(){return this.#t.closeInfo}};tY.exports={ByteParser:aR}});var AY=f((ort,lY)=>{"use strict";var{webidl:Fe}=Fn(),{DOMException:Ga}=Da(),{URLSerializer:ECe}=Qs(),{getGlobalOrigin:CCe}=FA(),{staticPropertyDescriptors:ja,states:Iu,opcodes:ip,emptyBuffer:ICe}=Eu(),{kWebSocketURL:nY,kReadyState:Xo,kController:BCe,kBinaryType:aC,kResponse:cC,kSentClose:bCe,kByteParser:wCe}=rp(),{isEstablished:iY,isClosing:sY,isValidSubprotocol:QCe,failWebsocketConnection:_Ce,fireEvent:SCe}=oC(),{establishWebSocketConnection:NCe}=Yz(),{WebsocketFrameSend:sp}=oR(),{ByteParser:RCe}=rY(),{kEnumerableProperty:ts,isBlobLike:aY}=lt(),{getGlobalDispatcher:xCe}=au(),{types:cY}=require("util"),oY=!1,ki=class t extends EventTarget{#e={open:null,error:null,close:null,message:null};#r=0;#n="";#t="";constructor(e,r=[]){super(),Fe.argumentLengthCheck(arguments,1,{header:"WebSocket constructor"}),oY||(oY=!0,process.emitWarning("WebSockets are experimental, expect them to change at any time.",{code:"UNDICI-WS"}));let n=Fe.converters["DOMString or sequence or WebSocketInit"](r);e=Fe.converters.USVString(e),r=n.protocols;let i=CCe(),s;try{s=new URL(e,i)}catch(o){throw new Ga(o,"SyntaxError")}if(s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),s.protocol!=="ws:"&&s.protocol!=="wss:")throw new Ga(`Expected a ws: or wss: protocol, got ${s.protocol}`,"SyntaxError");if(s.hash||s.href.endsWith("#"))throw new Ga("Got fragment","SyntaxError");if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(o=>o.toLowerCase())).size)throw new Ga("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(o=>QCe(o)))throw new Ga("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[nY]=new URL(s.href),this[BCe]=NCe(s,r,this,o=>this.#o(o),n),this[Xo]=t.CONNECTING,this[aC]="blob"}close(e=void 0,r=void 0){if(Fe.brandCheck(this,t),e!==void 0&&(e=Fe.converters["unsigned short"](e,{clamp:!0})),r!==void 0&&(r=Fe.converters.USVString(r)),e!==void 0&&e!==1e3&&(e<3e3||e>4999))throw new Ga("invalid code","InvalidAccessError");let n=0;if(r!==void 0&&(n=Buffer.byteLength(r),n>123))throw new Ga(`Reason must be less than 123 bytes; received ${n}`,"SyntaxError");if(!(this[Xo]===t.CLOSING||this[Xo]===t.CLOSED))if(!iY(this))_Ce(this,"Connection was closed before it was established."),this[Xo]=t.CLOSING;else if(sY(this))this[Xo]=t.CLOSING;else{let i=new sp;e!==void 0&&r===void 0?(i.frameData=Buffer.allocUnsafe(2),i.frameData.writeUInt16BE(e,0)):e!==void 0&&r!==void 0?(i.frameData=Buffer.allocUnsafe(2+n),i.frameData.writeUInt16BE(e,0),i.frameData.write(r,2,"utf-8")):i.frameData=ICe,this[cC].socket.write(i.createFrame(ip.CLOSE),o=>{o||(this[bCe]=!0)}),this[Xo]=Iu.CLOSING}}send(e){if(Fe.brandCheck(this,t),Fe.argumentLengthCheck(arguments,1,{header:"WebSocket.send"}),e=Fe.converters.WebSocketSendData(e),this[Xo]===t.CONNECTING)throw new Ga("Sent before connected.","InvalidStateError");if(!iY(this)||sY(this))return;let r=this[cC].socket;if(typeof e=="string"){let n=Buffer.from(e),s=new sp(n).createFrame(ip.TEXT);this.#r+=n.byteLength,r.write(s,()=>{this.#r-=n.byteLength})}else if(cY.isArrayBuffer(e)){let n=Buffer.from(e),s=new sp(n).createFrame(ip.BINARY);this.#r+=n.byteLength,r.write(s,()=>{this.#r-=n.byteLength})}else if(ArrayBuffer.isView(e)){let n=Buffer.from(e,e.byteOffset,e.byteLength),s=new sp(n).createFrame(ip.BINARY);this.#r+=n.byteLength,r.write(s,()=>{this.#r-=n.byteLength})}else if(aY(e)){let n=new sp;e.arrayBuffer().then(i=>{let s=Buffer.from(i);n.frameData=s;let o=n.createFrame(ip.BINARY);this.#r+=s.byteLength,r.write(o,()=>{this.#r-=s.byteLength})})}}get readyState(){return Fe.brandCheck(this,t),this[Xo]}get bufferedAmount(){return Fe.brandCheck(this,t),this.#r}get url(){return Fe.brandCheck(this,t),ECe(this[nY])}get extensions(){return Fe.brandCheck(this,t),this.#t}get protocol(){return Fe.brandCheck(this,t),this.#n}get onopen(){return Fe.brandCheck(this,t),this.#e.open}set onopen(e){Fe.brandCheck(this,t),this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onerror(){return Fe.brandCheck(this,t),this.#e.error}set onerror(e){Fe.brandCheck(this,t),this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}get onclose(){return Fe.brandCheck(this,t),this.#e.close}set onclose(e){Fe.brandCheck(this,t),this.#e.close&&this.removeEventListener("close",this.#e.close),typeof e=="function"?(this.#e.close=e,this.addEventListener("close",e)):this.#e.close=null}get onmessage(){return Fe.brandCheck(this,t),this.#e.message}set onmessage(e){Fe.brandCheck(this,t),this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get binaryType(){return Fe.brandCheck(this,t),this[aC]}set binaryType(e){Fe.brandCheck(this,t),e!=="blob"&&e!=="arraybuffer"?this[aC]="blob":this[aC]=e}#o(e){this[cC]=e;let r=new RCe(this);r.on("drain",function(){this.ws[cC].socket.resume()}),e.socket.ws=this,this[wCe]=r,this[Xo]=Iu.OPEN;let n=e.headersList.get("sec-websocket-extensions");n!==null&&(this.#t=n);let i=e.headersList.get("sec-websocket-protocol");i!==null&&(this.#n=i),SCe("open",this)}};ki.CONNECTING=ki.prototype.CONNECTING=Iu.CONNECTING;ki.OPEN=ki.prototype.OPEN=Iu.OPEN;ki.CLOSING=ki.prototype.CLOSING=Iu.CLOSING;ki.CLOSED=ki.prototype.CLOSED=Iu.CLOSED;Object.defineProperties(ki.prototype,{CONNECTING:ja,OPEN:ja,CLOSING:ja,CLOSED:ja,url:ts,readyState:ts,bufferedAmount:ts,onopen:ts,onerror:ts,onclose:ts,close:ts,onmessage:ts,binaryType:ts,send:ts,extensions:ts,protocol:ts,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(ki,{CONNECTING:ja,OPEN:ja,CLOSING:ja,CLOSED:ja});Fe.converters["sequence"]=Fe.sequenceConverter(Fe.converters.DOMString);Fe.converters["DOMString or sequence"]=function(t){return Fe.util.Type(t)==="Object"&&Symbol.iterator in t?Fe.converters["sequence"](t):Fe.converters.DOMString(t)};Fe.converters.WebSocketInit=Fe.dictionaryConverter([{key:"protocols",converter:Fe.converters["DOMString or sequence"],get defaultValue(){return[]}},{key:"dispatcher",converter:t=>t,get defaultValue(){return xCe()}},{key:"headers",converter:Fe.nullableConverter(Fe.converters.HeadersInit)}]);Fe.converters["DOMString or sequence or WebSocketInit"]=function(t){return Fe.util.Type(t)==="Object"&&!(Symbol.iterator in t)?Fe.converters.WebSocketInit(t):{protocols:Fe.converters["DOMString or sequence"](t)}};Fe.converters.WebSocketSendData=function(t){if(Fe.util.Type(t)==="Object"){if(aY(t))return Fe.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||cY.isAnyArrayBuffer(t))return Fe.converters.BufferSource(t)}return Fe.converters.USVString(t)};lY.exports={WebSocket:ki}});var lR=f((art,He)=>{"use strict";var vCe=Mh(),uY=Gy(),dY=vt(),TCe=XA(),PCe=bH(),DCe=Hh(),wl=lt(),{InvalidArgumentError:lC}=dY,Bu=hG(),kCe=xh(),OCe=mN(),LCe=$G(),MCe=CN(),FCe=sN(),UCe=rj(),qCe=aj(),{getGlobalDispatcher:fY,setGlobalDispatcher:HCe}=au(),GCe=fj(),jCe=gS(),zCe=Wy(),cR;try{require("crypto"),cR=!0}catch{cR=!1}Object.assign(uY.prototype,Bu);He.exports.Dispatcher=uY;He.exports.Client=vCe;He.exports.Pool=TCe;He.exports.BalancedPool=PCe;He.exports.Agent=DCe;He.exports.ProxyAgent=UCe;He.exports.RetryHandler=qCe;He.exports.DecoratorHandler=GCe;He.exports.RedirectHandler=jCe;He.exports.createRedirectInterceptor=zCe;He.exports.buildConnector=kCe;He.exports.errors=dY;function op(t){return(e,r,n)=>{if(typeof r=="function"&&(n=r,r=null),!e||typeof e!="string"&&typeof e!="object"&&!(e instanceof URL))throw new lC("invalid url");if(r!=null&&typeof r!="object")throw new lC("invalid opts");if(r&&r.path!=null){if(typeof r.path!="string")throw new lC("invalid opts.path");let o=r.path;r.path.startsWith("/")||(o=`/${o}`),e=new URL(wl.parseOrigin(e).origin+o)}else r||(r=typeof e=="object"?e:{}),e=wl.parseURL(e);let{agent:i,dispatcher:s=fY()}=r;if(i)throw new lC("unsupported opts.agent. Did you mean opts.client?");return t.call(s,{...r,origin:e.origin,path:e.search?`${e.pathname}${e.search}`:e.pathname,method:r.method||(r.body?"PUT":"GET")},n)}}He.exports.setGlobalDispatcher=HCe;He.exports.getGlobalDispatcher=fY;if(wl.nodeMajor>16||wl.nodeMajor===16&&wl.nodeMinor>=8){let t=null;He.exports.fetch=async function(o){t||(t=GE().fetch);try{return await t(...arguments)}catch(a){throw typeof a=="object"&&Error.captureStackTrace(a,this),a}},He.exports.Headers=El().Headers,He.exports.Response=vE().Response,He.exports.Request=Kh().Request,He.exports.FormData=Uy().FormData,He.exports.File=My().File,He.exports.FileReader=lz().FileReader;let{setGlobalOrigin:e,getGlobalOrigin:r}=FA();He.exports.setGlobalOrigin=e,He.exports.getGlobalOrigin=r;let{CacheStorage:n}=Iz(),{kConstruct:i}=WE();He.exports.caches=new n(i)}if(wl.nodeMajor>=16){let{deleteCookie:t,getCookies:e,getSetCookies:r,setCookie:n}=Dz();He.exports.deleteCookie=t,He.exports.getCookies=e,He.exports.getSetCookies=r,He.exports.setCookie=n;let{parseMIMEType:i,serializeAMimeType:s}=Qs();He.exports.parseMIMEType=i,He.exports.serializeAMimeType=s}if(wl.nodeMajor>=18&&cR){let{WebSocket:t}=AY();He.exports.WebSocket=t}He.exports.request=op(Bu.request);He.exports.stream=op(Bu.stream);He.exports.pipeline=op(Bu.pipeline);He.exports.connect=op(Bu.connect);He.exports.upgrade=op(Bu.upgrade);He.exports.MockClient=OCe;He.exports.MockPool=MCe;He.exports.MockAgent=LCe;He.exports.mockErrors=FCe});var ap=f(Mt=>{"use strict";var YCe=Mt&&Mt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),WCe=Mt&&Mt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hC=Mt&&Mt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&YCe(e,t,r);return WCe(e,t),e},br=Mt&&Mt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.HttpClient=Mt.isHttps=Mt.HttpClientResponse=Mt.HttpClientError=Mt.getProxyUrl=Mt.MediaTypes=Mt.Headers=Mt.HttpCodes=void 0;var AR=hC(require("http")),hY=hC(require("https")),uR=hC(wU()),AC=hC(xU()),JCe=lR(),rs;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(rs||(Mt.HttpCodes=rs={}));var bn;(function(t){t.Accept="accept",t.ContentType="content-type"})(bn||(Mt.Headers=bn={}));var Zo;(function(t){t.ApplicationJson="application/json"})(Zo||(Mt.MediaTypes=Zo={}));function VCe(t){let e=uR.getProxyUrl(new URL(t));return e?e.href:""}Mt.getProxyUrl=VCe;var $Ce=[rs.MovedPermanently,rs.ResourceMoved,rs.SeeOther,rs.TemporaryRedirect,rs.PermanentRedirect],KCe=[rs.BadGateway,rs.ServiceUnavailable,rs.GatewayTimeout],XCe=["OPTIONS","GET","DELETE","HEAD"],ZCe=10,eIe=5,dC=class t extends Error{constructor(e,r){super(e),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,t.prototype)}};Mt.HttpClientError=dC;var fC=class{constructor(e){this.message=e}readBody(){return br(this,void 0,void 0,function*(){return new Promise(e=>br(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n])}),this.message.on("end",()=>{e(r.toString())})}))})}readBodyBuffer(){return br(this,void 0,void 0,function*(){return new Promise(e=>br(this,void 0,void 0,function*(){let r=[];this.message.on("data",n=>{r.push(n)}),this.message.on("end",()=>{e(Buffer.concat(r))})}))})}};Mt.HttpClientResponse=fC;function tIe(t){return new URL(t).protocol==="https:"}Mt.isHttps=tIe;var dR=class{constructor(e,r,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=e,this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,r){return br(this,void 0,void 0,function*(){return this.request("OPTIONS",e,null,r||{})})}get(e,r){return br(this,void 0,void 0,function*(){return this.request("GET",e,null,r||{})})}del(e,r){return br(this,void 0,void 0,function*(){return this.request("DELETE",e,null,r||{})})}post(e,r,n){return br(this,void 0,void 0,function*(){return this.request("POST",e,r,n||{})})}patch(e,r,n){return br(this,void 0,void 0,function*(){return this.request("PATCH",e,r,n||{})})}put(e,r,n){return br(this,void 0,void 0,function*(){return this.request("PUT",e,r,n||{})})}head(e,r){return br(this,void 0,void 0,function*(){return this.request("HEAD",e,null,r||{})})}sendStream(e,r,n,i){return br(this,void 0,void 0,function*(){return this.request(e,r,n,i)})}getJson(e,r={}){return br(this,void 0,void 0,function*(){r[bn.Accept]=this._getExistingOrDefaultHeader(r,bn.Accept,Zo.ApplicationJson);let n=yield this.get(e,r);return this._processResponse(n,this.requestOptions)})}postJson(e,r,n={}){return br(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[bn.Accept]=this._getExistingOrDefaultHeader(n,bn.Accept,Zo.ApplicationJson),n[bn.ContentType]=this._getExistingOrDefaultHeader(n,bn.ContentType,Zo.ApplicationJson);let s=yield this.post(e,i,n);return this._processResponse(s,this.requestOptions)})}putJson(e,r,n={}){return br(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[bn.Accept]=this._getExistingOrDefaultHeader(n,bn.Accept,Zo.ApplicationJson),n[bn.ContentType]=this._getExistingOrDefaultHeader(n,bn.ContentType,Zo.ApplicationJson);let s=yield this.put(e,i,n);return this._processResponse(s,this.requestOptions)})}patchJson(e,r,n={}){return br(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[bn.Accept]=this._getExistingOrDefaultHeader(n,bn.Accept,Zo.ApplicationJson),n[bn.ContentType]=this._getExistingOrDefaultHeader(n,bn.ContentType,Zo.ApplicationJson);let s=yield this.patch(e,i,n);return this._processResponse(s,this.requestOptions)})}request(e,r,n,i){return br(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let s=new URL(r),o=this._prepareRequest(e,s,i),a=this._allowRetries&&XCe.includes(e)?this._maxRetries+1:1,c=0,l;do{if(l=yield this.requestRaw(o,n),l&&l.message&&l.message.statusCode===rs.Unauthorized){let u;for(let d of this.handlers)if(d.canHandleAuthentication(l)){u=d;break}return u?u.handleAuthentication(this,o,n):l}let A=this._maxRedirects;for(;l.message.statusCode&&$Ce.includes(l.message.statusCode)&&this._allowRedirects&&A>0;){let u=l.message.headers.location;if(!u)break;let d=new URL(u);if(s.protocol==="https:"&&s.protocol!==d.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(yield l.readBody(),d.hostname!==s.hostname)for(let h in i)h.toLowerCase()==="authorization"&&delete i[h];o=this._prepareRequest(e,d,i),l=yield this.requestRaw(o,n),A--}if(!l.message.statusCode||!KCe.includes(l.message.statusCode))return l;c+=1,c{function s(o,a){o?i(o):a?n(a):i(new Error("Unknown error"))}this.requestRawWithCallback(e,r,s)})})}requestRawWithCallback(e,r,n){typeof r=="string"&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let i=!1;function s(c,l){i||(i=!0,n(c,l))}let o=e.httpModule.request(e.options,c=>{let l=new fC(c);s(void 0,l)}),a;o.on("socket",c=>{a=c}),o.setTimeout(this._socketTimeout||3*6e4,()=>{a&&a.end(),s(new Error(`Request timeout: ${e.options.path}`))}),o.on("error",function(c){s(c)}),r&&typeof r=="string"&&o.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){o.end()}),r.pipe(o)):o.end()}getAgent(e){let r=new URL(e);return this._getAgent(r)}getAgentDispatcher(e){let r=new URL(e),n=uR.getProxyUrl(r);if(n&&n.hostname)return this._getProxyAgentDispatcher(r,n)}_prepareRequest(e,r,n){let i={};i.parsedUrl=r;let s=i.parsedUrl.protocol==="https:";i.httpModule=s?hY:AR;let o=s?443:80;if(i.options={},i.options.host=i.parsedUrl.hostname,i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):o,i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||""),i.options.method=e,i.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(i.options.headers["user-agent"]=this.userAgent),i.options.agent=this._getAgent(i.parsedUrl),this.handlers)for(let a of this.handlers)a.prepareRequest(i.options);return i}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},uC(this.requestOptions.headers),uC(e||{})):uC(e||{})}_getExistingOrDefaultHeader(e,r,n){let i;return this.requestOptions&&this.requestOptions.headers&&(i=uC(this.requestOptions.headers)[r]),e[r]||i||n}_getAgent(e){let r,n=uR.getProxyUrl(e),i=n&&n.hostname;if(this._keepAlive&&i&&(r=this._proxyAgent),i||(r=this._agent),r)return r;let s=e.protocol==="https:",o=100;if(this.requestOptions&&(o=this.requestOptions.maxSockets||AR.globalAgent.maxSockets),n&&n.hostname){let a={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},c,l=n.protocol==="https:";s?c=l?AC.httpsOverHttps:AC.httpsOverHttp:c=l?AC.httpOverHttps:AC.httpOverHttp,r=c(a),this._proxyAgent=r}if(!r){let a={keepAlive:this._keepAlive,maxSockets:o};r=s?new hY.Agent(a):new AR.Agent(a),this._agent=r}return s&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_getProxyAgentDispatcher(e,r){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let i=e.protocol==="https:";return n=new JCe.ProxyAgent(Object.assign({uri:r.href,pipelining:this._keepAlive?1:0},(r.username||r.password)&&{token:`Basic ${Buffer.from(`${r.username}:${r.password}`).toString("base64")}`})),this._proxyAgentDispatcher=n,i&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_performExponentialBackoff(e){return br(this,void 0,void 0,function*(){e=Math.min(ZCe,e);let r=eIe*Math.pow(2,e);return new Promise(n=>setTimeout(()=>n(),r))})}_processResponse(e,r){return br(this,void 0,void 0,function*(){return new Promise((n,i)=>br(this,void 0,void 0,function*(){let s=e.message.statusCode||0,o={statusCode:s,result:null,headers:{}};s===rs.NotFound&&n(o);function a(A,u){if(typeof u=="string"){let d=new Date(u);if(!isNaN(d.valueOf()))return d}return u}let c,l;try{l=yield e.readBody(),l&&l.length>0&&(r&&r.deserializeDates?c=JSON.parse(l,a):c=JSON.parse(l),o.result=c),o.headers=e.message.headers}catch{}if(s>299){let A;c&&c.message?A=c.message:l&&l.length>0?A=l:A=`Failed request: (${s})`;let u=new dC(A,s);u.result=o.result,i(u)}else n(o)}))})}};Mt.HttpClient=dR;var uC=t=>Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{})});var mR=f(no=>{"use strict";var gR=no&&no.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(no,"__esModule",{value:!0});no.PersonalAccessTokenCredentialHandler=no.BearerCredentialHandler=no.BasicCredentialHandler=void 0;var fR=class{constructor(e,r){this.username=e,this.password=r}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return!1}handleAuthentication(){return gR(this,void 0,void 0,function*(){throw new Error("not implemented")})}};no.BasicCredentialHandler=fR;var hR=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization=`Bearer ${this.token}`}canHandleAuthentication(){return!1}handleAuthentication(){return gR(this,void 0,void 0,function*(){throw new Error("not implemented")})}};no.BearerCredentialHandler=hR;var pR=class{constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return!1}handleAuthentication(){return gR(this,void 0,void 0,function*(){throw new Error("not implemented")})}};no.PersonalAccessTokenCredentialHandler=pR});var mY=f(bu=>{"use strict";var pY=bu&&bu.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(bu,"__esModule",{value:!0});bu.OidcClient=void 0;var rIe=ap(),nIe=mR(),gY=Lr(),yR=class t{static createHttpClient(e=!0,r=10){let n={allowRetries:e,maxRetries:r};return new rIe.HttpClient("actions/oidc-client",[new nIe.BearerCredentialHandler(t.getRequestToken())],n)}static getRequestToken(){let e=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!e)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");return e}static getIDTokenUrl(){let e=process.env.ACTIONS_ID_TOKEN_REQUEST_URL;if(!e)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return e}static getCall(e){var r;return pY(this,void 0,void 0,function*(){let s=(r=(yield t.createHttpClient().getJson(e).catch(o=>{throw new Error(`Failed to get ID Token.
- Error Code : ${a.statusCode}
+ Error Code : ${o.statusCode}
- Error Message: ${a.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(e){return Fq(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let n=encodeURIComponent(e);r=`${r}&audience=${n}`}(0,Mq.debug)(`ID token url is ${r}`);let i=yield t.getCall(r);return(0,Mq.setSecret)(i),i}catch(r){throw new Error(`Error message: ${r.message}`)}})}};uA.OidcClient=G3});var Y3=A(wn=>{"use strict";var j3=wn&&wn.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(wn,"__esModule",{value:!0});wn.summary=wn.markdownSummary=wn.SUMMARY_DOCS_URL=wn.SUMMARY_ENV_VAR=void 0;var U4e=require("os"),z3=require("fs"),{access:q4e,appendFile:H4e,writeFile:G4e}=z3.promises;wn.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";wn.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var V3=class{constructor(){this._buffer=""}filePath(){return j3(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[wn.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${wn.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield q4e(e,z3.constants.R_OK|z3.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,r,i={}){let n=Object.entries(i).map(([s,a])=>` ${s}="${a}"`).join("");return r?`<${e}${n}>${r}${e}>`:`<${e}${n}>`}write(e){return j3(this,void 0,void 0,function*(){let r=!!e?.overwrite,i=yield this.filePath();return yield(r?G4e:H4e)(i,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return j3(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,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(U4e.EOL)}addCodeBlock(e,r){let i=Object.assign({},r&&{lang:r}),n=this.wrap("pre",this.wrap("code",e),i);return this.addRaw(n).addEOL()}addList(e,r=!1){let i=r?"ol":"ul",n=e.map(a=>this.wrap("li",a)).join(""),s=this.wrap(i,n);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(n=>{let s=n.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:o,data:l,colspan:c,rowspan:d}=a,u=o?"th":"td",p=Object.assign(Object.assign({},c&&{colspan:c}),d&&{rowspan:d});return this.wrap(u,l,p)}).join("");return this.wrap("tr",s)}).join(""),i=this.wrap("table",r);return this.addRaw(i).addEOL()}addDetails(e,r){let i=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(i).addEOL()}addImage(e,r,i){let{width:n,height:s}=i||{},a=Object.assign(Object.assign({},n&&{width:n}),s&&{height:s}),o=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(o).addEOL()}addHeading(e,r){let i=`h${r}`,n=["h1","h2","h3","h4","h5","h6"].includes(i)?i:"h1",s=this.wrap(n,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,r){let i=Object.assign({},r&&{cite:r}),n=this.wrap("blockquote",e,i);return this.addRaw(n).addEOL()}addLink(e,r){let i=this.wrap("a",e,{href:r});return this.addRaw(i).addEOL()}},qq=new V3;wn.markdownSummary=qq;wn.summary=qq});var Hq=A(Qn=>{"use strict";var j4e=Qn&&Qn.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),z4e=Qn&&Qn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),V4e=Qn&&Qn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&j4e(e,t,r);return z4e(e,t),e};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.toPlatformPath=Qn.toWin32Path=Qn.toPosixPath=void 0;var Y4e=V4e(require("path"));function W4e(t){return t.replace(/[\\]/g,"/")}Qn.toPosixPath=W4e;function J4e(t){return t.replace(/[/]/g,"\\")}Qn.toWin32Path=J4e;function $4e(t){return t.replace(/[/\\]/g,Y4e.sep)}Qn.toPlatformPath=$4e});var J3=A(ge=>{"use strict";var K4e=ge&&ge.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),X4e=ge&&ge.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),jq=ge&&ge.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&K4e(e,t,r);return X4e(e,t),e},W3=ge&&ge.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})},Sn;Object.defineProperty(ge,"__esModule",{value:!0});ge.getCmdPath=ge.tryGetExecutablePath=ge.isRooted=ge.isDirectory=ge.exists=ge.READONLY=ge.UV_FS_O_EXLOCK=ge.IS_WINDOWS=ge.unlink=ge.symlink=ge.stat=ge.rmdir=ge.rm=ge.rename=ge.readlink=ge.readdir=ge.open=ge.mkdir=ge.lstat=ge.copyFile=ge.chmod=void 0;var zq=jq(require("fs")),B2=jq(require("path"));Sn=zq.promises,ge.chmod=Sn.chmod,ge.copyFile=Sn.copyFile,ge.lstat=Sn.lstat,ge.mkdir=Sn.mkdir,ge.open=Sn.open,ge.readdir=Sn.readdir,ge.readlink=Sn.readlink,ge.rename=Sn.rename,ge.rm=Sn.rm,ge.rmdir=Sn.rmdir,ge.stat=Sn.stat,ge.symlink=Sn.symlink,ge.unlink=Sn.unlink;ge.IS_WINDOWS=process.platform==="win32";ge.UV_FS_O_EXLOCK=268435456;ge.READONLY=zq.constants.O_RDONLY;function Z4e(t){return W3(this,void 0,void 0,function*(){try{yield ge.stat(t)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}ge.exists=Z4e;function e6e(t,e=!1){return W3(this,void 0,void 0,function*(){return(e?yield ge.stat(t):yield ge.lstat(t)).isDirectory()})}ge.isDirectory=e6e;function t6e(t){if(t=i6e(t),!t)throw new Error('isRooted() parameter "p" cannot be empty');return ge.IS_WINDOWS?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}ge.isRooted=t6e;function r6e(t,e){return W3(this,void 0,void 0,function*(){let r;try{r=yield ge.stat(t)}catch(n){n.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${n}`)}if(r&&r.isFile()){if(ge.IS_WINDOWS){let n=B2.extname(t).toUpperCase();if(e.some(s=>s.toUpperCase()===n))return t}else if(Gq(r))return t}let i=t;for(let n of e){t=i+n,r=void 0;try{r=yield ge.stat(t)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${s}`)}if(r&&r.isFile()){if(ge.IS_WINDOWS){try{let s=B2.dirname(t),a=B2.basename(t).toUpperCase();for(let o of yield ge.readdir(s))if(a===o.toUpperCase()){t=B2.join(s,o);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${s}`)}return t}else if(Gq(r))return t}}return""})}ge.tryGetExecutablePath=r6e;function i6e(t){return t=t||"",ge.IS_WINDOWS?(t=t.replace(/\//g,"\\"),t.replace(/\\\\+/g,"\\")):t.replace(/\/\/+/g,"/")}function Gq(t){return(t.mode&1)>0||(t.mode&8)>0&&t.gid===process.getgid()||(t.mode&64)>0&&t.uid===process.getuid()}function n6e(){var t;return(t=process.env.COMSPEC)!==null&&t!==void 0?t:"cmd.exe"}ge.getCmdPath=n6e});var K3=A(yr=>{"use strict";var s6e=yr&&yr.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),a6e=yr&&yr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Vq=yr&&yr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&s6e(e,t,r);return a6e(e,t),e},Il=yr&&yr.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(yr,"__esModule",{value:!0});yr.findInPath=yr.which=yr.mkdirP=yr.rmRF=yr.mv=yr.cp=void 0;var o6e=require("assert"),va=Vq(require("path")),It=Vq(J3());function l6e(t,e,r={}){return Il(this,void 0,void 0,function*(){let{force:i,recursive:n,copySourceDirectory:s}=d6e(r),a=(yield It.exists(e))?yield It.stat(e):null;if(a&&a.isFile()&&!i)return;let o=a&&a.isDirectory()&&s?va.join(e,va.basename(t)):e;if(!(yield It.exists(t)))throw new Error(`no such file or directory: ${t}`);if((yield It.stat(t)).isDirectory())if(n)yield $q(t,o,0,i);else throw new Error(`Failed to copy. ${t} is a directory, but tried to copy without recursive flag.`);else{if(va.relative(t,o)==="")throw new Error(`'${o}' and '${t}' are the same file`);yield Kq(t,o,i)}})}yr.cp=l6e;function c6e(t,e,r={}){return Il(this,void 0,void 0,function*(){if(yield It.exists(e)){let i=!0;if((yield It.isDirectory(e))&&(e=va.join(e,va.basename(t)),i=yield It.exists(e)),i)if(r.force==null||r.force)yield Yq(e);else throw new Error("Destination already exists")}yield $3(va.dirname(e)),yield It.rename(t,e)})}yr.mv=c6e;function Yq(t){return Il(this,void 0,void 0,function*(){if(It.IS_WINDOWS&&/[*"<>|]/.test(t))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield It.rm(t,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}})}yr.rmRF=Yq;function $3(t){return Il(this,void 0,void 0,function*(){o6e.ok(t,"a path argument must be provided"),yield It.mkdir(t,{recursive:!0})})}yr.mkdirP=$3;function Wq(t,e){return Il(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");if(e){let i=yield Wq(t,!1);if(!i)throw It.IS_WINDOWS?new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return i}let r=yield Jq(t);return r&&r.length>0?r[0]:""})}yr.which=Wq;function Jq(t){return Il(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");let e=[];if(It.IS_WINDOWS&&process.env.PATHEXT)for(let n of process.env.PATHEXT.split(va.delimiter))n&&e.push(n);if(It.isRooted(t)){let n=yield It.tryGetExecutablePath(t,e);return n?[n]:[]}if(t.includes(va.sep))return[];let r=[];if(process.env.PATH)for(let n of process.env.PATH.split(va.delimiter))n&&r.push(n);let i=[];for(let n of r){let s=yield It.tryGetExecutablePath(va.join(n,t),e);s&&i.push(s)}return i})}yr.findInPath=Jq;function d6e(t){let e=t.force==null?!0:t.force,r=!!t.recursive,i=t.copySourceDirectory==null?!0:!!t.copySourceDirectory;return{force:e,recursive:r,copySourceDirectory:i}}function $q(t,e,r,i){return Il(this,void 0,void 0,function*(){if(r>=255)return;r++,yield $3(e);let n=yield It.readdir(t);for(let s of n){let a=`${t}/${s}`,o=`${e}/${s}`;(yield It.lstat(a)).isDirectory()?yield $q(a,o,r,i):yield Kq(a,o,i)}yield It.chmod(e,(yield It.stat(t)).mode)})}function Kq(t,e,r){return Il(this,void 0,void 0,function*(){if((yield It.lstat(t)).isSymbolicLink()){try{yield It.lstat(e),yield It.unlink(e)}catch(n){n.code==="EPERM"&&(yield It.chmod(e,"0666"),yield It.unlink(e))}let i=yield It.readlink(t);yield It.symlink(i,e,It.IS_WINDOWS?"junction":null)}else(!(yield It.exists(e))||r)&&(yield It.copyFile(t,e))})}});var tH=A(_n=>{"use strict";var u6e=_n&&_n.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),A6e=_n&&_n.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),AA=_n&&_n.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&u6e(e,t,r);return A6e(e,t),e},Xq=_n&&_n.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(_n,"__esModule",{value:!0});_n.argStringToArray=_n.ToolRunner=void 0;var w2=AA(require("os")),eH=AA(require("events")),p6e=AA(require("child_process")),f6e=AA(require("path")),h6e=AA(K3()),Zq=AA(J3()),m6e=require("timers"),Q2=process.platform==="win32",X3=class extends eH.EventEmitter{constructor(e,r,i){if(super(),!e)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=r||[],this.options=i||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,r){let i=this._getSpawnFileName(),n=this._getSpawnArgs(e),s=r?"":"[command]";if(Q2)if(this._isCmdFile()){s+=i;for(let a of n)s+=` ${a}`}else if(e.windowsVerbatimArguments){s+=`"${i}"`;for(let a of n)s+=` ${a}`}else{s+=this._windowsQuoteCmdArg(i);for(let a of n)s+=` ${this._windowsQuoteCmdArg(a)}`}else{s+=i;for(let a of n)s+=` ${a}`}return s}_processLineBuffer(e,r,i){try{let n=r+e.toString(),s=n.indexOf(w2.EOL);for(;s>-1;){let a=n.substring(0,s);i(a),n=n.substring(s+w2.EOL.length),s=n.indexOf(w2.EOL)}return n}catch(n){return this._debug(`error processing line. Failed with error ${n}`),""}}_getSpawnFileName(){return Q2&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(Q2&&this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let i of this.args)r+=" ",r+=e.windowsVerbatimArguments?i:this._windowsQuoteCmdArg(i);return r+='"',[r]}return this.args}_endsWith(e,r){return e.endsWith(r)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';let r=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],i=!1;for(let a of e)if(r.some(o=>o===a)){i=!0;break}if(!i)return e;let n='"',s=!0;for(let a=e.length;a>0;a--)n+=e[a-1],s&&e[a-1]==="\\"?n+="\\":e[a-1]==='"'?(s=!0,n+='"'):s=!1;return n+='"',n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes(" ")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let r='"',i=!0;for(let n=e.length;n>0;n--)r+=e[n-1],i&&e[n-1]==="\\"?r+="\\":e[n-1]==='"'?(i=!0,r+="\\"):i=!1;return r+='"',r.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};let r={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return r.outStream=e.outStream||process.stdout,r.errStream=e.errStream||process.stderr,r}_getSpawnOptions(e,r){e=e||{};let i={};return i.cwd=e.cwd,i.env=e.env,i.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(i.argv0=`"${r}"`),i}exec(){return Xq(this,void 0,void 0,function*(){return!Zq.isRooted(this.toolPath)&&(this.toolPath.includes("/")||Q2&&this.toolPath.includes("\\"))&&(this.toolPath=f6e.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield h6e.which(this.toolPath,!0),new Promise((e,r)=>Xq(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let c of this.args)this._debug(` ${c}`);let i=this._cloneExecOptions(this.options);!i.silent&&i.outStream&&i.outStream.write(this._getCommandString(i)+w2.EOL);let n=new Z3(i,this.toolPath);if(n.on("debug",c=>{this._debug(c)}),this.options.cwd&&!(yield Zq.exists(this.options.cwd)))return r(new Error(`The cwd: ${this.options.cwd} does not exist!`));let s=this._getSpawnFileName(),a=p6e.spawn(s,this._getSpawnArgs(i),this._getSpawnOptions(this.options,s)),o="";a.stdout&&a.stdout.on("data",c=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(c),!i.silent&&i.outStream&&i.outStream.write(c),o=this._processLineBuffer(c,o,d=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(d)})});let l="";if(a.stderr&&a.stderr.on("data",c=>{n.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(c),!i.silent&&i.errStream&&i.outStream&&(i.failOnStdErr?i.errStream:i.outStream).write(c),l=this._processLineBuffer(c,l,d=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(d)})}),a.on("error",c=>{n.processError=c.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()}),a.on("exit",c=>{n.processExitCode=c,n.processExited=!0,this._debug(`Exit code ${c} received from tool '${this.toolPath}'`),n.CheckComplete()}),a.on("close",c=>{n.processExitCode=c,n.processExited=!0,n.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),n.CheckComplete()}),n.on("done",(c,d)=>{o.length>0&&this.emit("stdline",o),l.length>0&&this.emit("errline",l),a.removeAllListeners(),c?r(c):e(d)}),this.options.input){if(!a.stdin)throw new Error("child process missing stdin");a.stdin.end(this.options.input)}}))})}};_n.ToolRunner=X3;function g6e(t){let e=[],r=!1,i=!1,n="";function s(a){i&&a!=='"'&&(n+="\\"),n+=a,i=!1}for(let a=0;a0&&(e.push(n),n="");continue}s(o)}return n.length>0&&e.push(n.trim()),e}_n.argStringToArray=g6e;var Z3=class t extends eH.EventEmitter{constructor(e,r){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!r)throw new Error("toolPath must not be empty");this.options=e,this.toolPath=r,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=m6e.setTimeout(t.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let r=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(r)}e._setResult()}}}});var e9=A(vn=>{"use strict";var y6e=vn&&vn.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),E6e=vn&&vn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),C6e=vn&&vn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&y6e(e,t,r);return E6e(e,t),e},nH=vn&&vn.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(vn,"__esModule",{value:!0});vn.getExecOutput=vn.exec=void 0;var rH=require("string_decoder"),iH=C6e(tH());function sH(t,e,r){return nH(this,void 0,void 0,function*(){let i=iH.argStringToArray(t);if(i.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let n=i[0];return e=i.slice(1).concat(e||[]),new iH.ToolRunner(n,e,r).exec()})}vn.exec=sH;function b6e(t,e,r){var i,n;return nH(this,void 0,void 0,function*(){let s="",a="",o=new rH.StringDecoder("utf8"),l=new rH.StringDecoder("utf8"),c=(i=r?.listeners)===null||i===void 0?void 0:i.stdout,d=(n=r?.listeners)===null||n===void 0?void 0:n.stderr,u=E=>{a+=l.write(E),d&&d(E)},p=E=>{s+=o.write(E),c&&c(E)},f=Object.assign(Object.assign({},r?.listeners),{stdout:p,stderr:u}),h=yield sH(t,e,Object.assign(Object.assign({},r),{listeners:f}));return s+=o.end(),a+=l.end(),{exitCode:h,stdout:s,stderr:a}})}vn.getExecOutput=b6e});var oH=A(At=>{"use strict";var I6e=At&&At.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),B6e=At&&At.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),w6e=At&&At.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&I6e(e,t,r);return B6e(e,t),e},_2=At&&At.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})},Q6e=At&&At.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(At,"__esModule",{value:!0});At.getDetails=At.isLinux=At.isMacOS=At.isWindows=At.arch=At.platform=void 0;var aH=Q6e(require("os")),S2=w6e(e9()),S6e=()=>_2(void 0,void 0,void 0,function*(){let{stdout:t}=yield S2.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:e}=yield S2.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:e.trim(),version:t.trim()}}),_6e=()=>_2(void 0,void 0,void 0,function*(){var t,e,r,i;let{stdout:n}=yield S2.getExecOutput("sw_vers",void 0,{silent:!0}),s=(e=(t=n.match(/ProductVersion:\s*(.+)/))===null||t===void 0?void 0:t[1])!==null&&e!==void 0?e:"";return{name:(i=(r=n.match(/ProductName:\s*(.+)/))===null||r===void 0?void 0:r[1])!==null&&i!==void 0?i:"",version:s}}),v6e=()=>_2(void 0,void 0,void 0,function*(){let{stdout:t}=yield S2.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[e,r]=t.trim().split(`
-`);return{name:e,version:r}});At.platform=aH.default.platform();At.arch=aH.default.arch();At.isWindows=At.platform==="win32";At.isMacOS=At.platform==="darwin";At.isLinux=At.platform==="linux";function N6e(){return _2(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield At.isWindows?S6e():At.isMacOS?_6e():v6e()),{platform:At.platform,arch:At.arch,isWindows:At.isWindows,isMacOS:At.isMacOS,isLinux:At.isLinux})})}At.getDetails=N6e});var Gr=A(fe=>{"use strict";var x6e=fe&&fe.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),R6e=fe&&fe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),r9=fe&&fe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&x6e(e,t,r);return R6e(e,t),e},lH=fe&&fe.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(fe,"__esModule",{value:!0});fe.platform=fe.toPlatformPath=fe.toWin32Path=fe.toPosixPath=fe.markdownSummary=fe.summary=fe.getIDToken=fe.getState=fe.saveState=fe.group=fe.endGroup=fe.startGroup=fe.info=fe.notice=fe.warning=fe.error=fe.debug=fe.isDebug=fe.setFailed=fe.setCommandEcho=fe.setOutput=fe.getBooleanInput=fe.getMultilineInput=fe.getInput=fe.addPath=fe.setSecret=fe.exportVariable=fe.ExitCode=void 0;var Es=qP(),cd=jP(),pA=N0(),cH=r9(require("os")),T6e=r9(require("path")),D6e=Uq(),t9;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(t9||(fe.ExitCode=t9={}));function P6e(t,e){let r=(0,pA.toCommandValue)(e);if(process.env[t]=r,process.env.GITHUB_ENV||"")return(0,cd.issueFileCommand)("ENV",(0,cd.prepareKeyValueMessage)(t,e));(0,Es.issueCommand)("set-env",{name:t},r)}fe.exportVariable=P6e;function k6e(t){(0,Es.issueCommand)("add-mask",{},t)}fe.setSecret=k6e;function O6e(t){process.env.GITHUB_PATH||""?(0,cd.issueFileCommand)("PATH",t):(0,Es.issueCommand)("add-path",{},t),process.env.PATH=`${t}${T6e.delimiter}${process.env.PATH}`}fe.addPath=O6e;function i9(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}fe.getInput=i9;function L6e(t,e){let r=i9(t,e).split(`
-`).filter(i=>i!=="");return e&&e.trimWhitespace===!1?r:r.map(i=>i.trim())}fe.getMultilineInput=L6e;function F6e(t,e){let r=["true","True","TRUE"],i=["false","False","FALSE"],n=i9(t,e);if(r.includes(n))return!0;if(i.includes(n))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
-Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}fe.getBooleanInput=F6e;function M6e(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,cd.issueFileCommand)("OUTPUT",(0,cd.prepareKeyValueMessage)(t,e));process.stdout.write(cH.EOL),(0,Es.issueCommand)("set-output",{name:t},(0,pA.toCommandValue)(e))}fe.setOutput=M6e;function U6e(t){(0,Es.issue)("echo",t?"on":"off")}fe.setCommandEcho=U6e;function q6e(t){process.exitCode=t9.Failure,dH(t)}fe.setFailed=q6e;function H6e(){return process.env.RUNNER_DEBUG==="1"}fe.isDebug=H6e;function G6e(t){(0,Es.issueCommand)("debug",{},t)}fe.debug=G6e;function dH(t,e={}){(0,Es.issueCommand)("error",(0,pA.toCommandProperties)(e),t instanceof Error?t.toString():t)}fe.error=dH;function j6e(t,e={}){(0,Es.issueCommand)("warning",(0,pA.toCommandProperties)(e),t instanceof Error?t.toString():t)}fe.warning=j6e;function z6e(t,e={}){(0,Es.issueCommand)("notice",(0,pA.toCommandProperties)(e),t instanceof Error?t.toString():t)}fe.notice=z6e;function V6e(t){process.stdout.write(t+cH.EOL)}fe.info=V6e;function uH(t){(0,Es.issue)("group",t)}fe.startGroup=uH;function AH(){(0,Es.issue)("endgroup")}fe.endGroup=AH;function Y6e(t,e){return lH(this,void 0,void 0,function*(){uH(t);let r;try{r=yield e()}finally{AH()}return r})}fe.group=Y6e;function W6e(t,e){if(process.env.GITHUB_STATE||"")return(0,cd.issueFileCommand)("STATE",(0,cd.prepareKeyValueMessage)(t,e));(0,Es.issueCommand)("save-state",{name:t},(0,pA.toCommandValue)(e))}fe.saveState=W6e;function J6e(t){return process.env[`STATE_${t}`]||""}fe.getState=J6e;function $6e(t){return lH(this,void 0,void 0,function*(){return yield D6e.OidcClient.getIDToken(t)})}fe.getIDToken=$6e;var K6e=Y3();Object.defineProperty(fe,"summary",{enumerable:!0,get:function(){return K6e.summary}});var X6e=Y3();Object.defineProperty(fe,"markdownSummary",{enumerable:!0,get:function(){return X6e.markdownSummary}});var n9=Hq();Object.defineProperty(fe,"toPosixPath",{enumerable:!0,get:function(){return n9.toPosixPath}});Object.defineProperty(fe,"toWin32Path",{enumerable:!0,get:function(){return n9.toWin32Path}});Object.defineProperty(fe,"toPlatformPath",{enumerable:!0,get:function(){return n9.toPlatformPath}});fe.platform=r9(oH())});var dd=A(Xr=>{"use strict";var Z6e=Xr&&Xr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.getUploadChunkTimeout=Xr.getConcurrency=Xr.getGitHubWorkspaceDir=Xr.isGhes=Xr.getResultsServiceUrl=Xr.getRuntimeToken=Xr.getUploadChunkSize=void 0;var ebe=Z6e(require("os")),pH=Gr();function tbe(){return 8*1024*1024}Xr.getUploadChunkSize=tbe;function rbe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}Xr.getRuntimeToken=rbe;function ibe(){let t=process.env.ACTIONS_RESULTS_URL;if(!t)throw new Error("Unable to get the ACTIONS_RESULTS_URL env variable");return new URL(t).origin}Xr.getResultsServiceUrl=ibe;function nbe(){let e=new URL(process.env.GITHUB_SERVER_URL||"https://github.com").hostname.trimEnd().toUpperCase(),r=e==="GITHUB.COM",i=e.endsWith(".GHE.COM"),n=e.endsWith(".LOCALHOST");return!r&&!i&&!n}Xr.isGhes=nbe;function sbe(){let t=process.env.GITHUB_WORKSPACE;if(!t)throw new Error("Unable to get the GITHUB_WORKSPACE env variable");return t}Xr.getGitHubWorkspaceDir=sbe;function abe(){let t=ebe.default.cpus().length,e=32;if(t>4){let i=16*t;e=i>300?300:i}let r=process.env.ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY;if(r){let i=parseInt(r);if(isNaN(i)||i<1)throw new Error("Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable");return i{"use strict";Object.defineProperty(fA,"__esModule",{value:!0});fA.isJsonObject=fA.typeofJsonValue=void 0;function lbe(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}fA.typeofJsonValue=lbe;function cbe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}fA.isJsonObject=cbe});var x2=A(hA=>{"use strict";Object.defineProperty(hA,"__esModule",{value:!0});hA.base64encode=hA.base64decode=void 0;var vo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),N2=[];for(let t=0;t>4,a=s,n=2;break;case 2:r[i++]=(a&15)<<4|(s&60)>>2,a=s,n=3;break;case 3:r[i++]=(a&3)<<6|s,n=0;break}}if(n==1)throw Error("invalid base64 string.");return r.subarray(0,i)}hA.base64decode=dbe;function ube(t){let e="",r=0,i,n=0;for(let s=0;s>2],n=(i&3)<<4,r=1;break;case 1:e+=vo[n|i>>4],n=(i&15)<<2,r=2;break;case 2:e+=vo[n|i>>6],e+=vo[i&63],r=0;break}return r&&(e+=vo[n],e+="=",r==1&&(e+="=")),e}hA.base64encode=ube});var fH=A(R2=>{"use strict";Object.defineProperty(R2,"__esModule",{value:!0});R2.utf8read=void 0;var s9=t=>String.fromCharCode.apply(String,t);function Abe(t){if(t.length<1)return"";let e=0,r=[],i=[],n=0,s,a=t.length;for(;e191&&s<224?i[n++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,i[n++]=55296+(s>>10),i[n++]=56320+(s&1023)):i[n++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,n>8191&&(r.push(s9(i)),n=0);return r.length?(n&&r.push(s9(i.slice(0,n))),r.join("")):s9(i.slice(0,n))}R2.utf8read=Abe});var om=A(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.WireType=Na.mergeBinaryOptions=Na.UnknownFieldHandler=void 0;var pbe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,i,n,s,a)=>{(e(i)?i[t.symbol]:i[t.symbol]=[]).push({no:n,wireType:s,data:a})},t.onWrite=(r,i,n)=>{for(let{no:s,wireType:a,data:o}of t.list(i))n.tag(s,a).raw(o)},t.list=(r,i)=>{if(e(r)){let n=r[t.symbol];return i?n.filter(s=>s.no==i):n}return[]},t.last=(r,i)=>t.list(r,i).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(pbe=Na.UnknownFieldHandler||(Na.UnknownFieldHandler={}));function fbe(t,e){return Object.assign(Object.assign({},t),e)}Na.mergeBinaryOptions=fbe;var hbe;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(hbe=Na.WireType||(Na.WireType={}))});var D2=A(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.varint32read=Nn.varint32write=Nn.int64toString=Nn.int64fromString=Nn.varint64write=Nn.varint64read=void 0;function mbe(){let t=0,e=0;for(let i=0;i<28;i+=7){let n=this.buf[this.pos++];if(t|=(n&127)<>4,(r&128)==0)return this.assertBounds(),[t,e];for(let i=3;i<=31;i+=7){let n=this.buf[this.pos++];if(e|=(n&127)<>>s,o=!(!(a>>>7)&&e==0),l=(o?a|128:a)&255;if(r.push(l),!o)return}let i=t>>>28&15|(e&7)<<4,n=e>>3!=0;if(r.push((n?i|128:i)&255),!!n){for(let s=3;s<31;s=s+7){let a=e>>>s,o=!!(a>>>7),l=(o?a|128:a)&255;if(r.push(l),!o)return}r.push(e>>>31&1)}}Nn.varint64write=gbe;var T2=65536*65536;function ybe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,i=0,n=0;function s(a,o){let l=Number(t.slice(a,o));n*=r,i=i*r+l,i>=T2&&(n=n+(i/T2|0),i=i%T2)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,i,n]}Nn.int64fromString=ybe;function Ebe(t,e){if(e>>>0<=2097151)return""+(T2*e+(t>>>0));let r=t&16777215,i=(t>>>24|e<<8)>>>0&16777215,n=e>>16&65535,s=r+i*6777216+n*6710656,a=i+n*8147497,o=n*2,l=1e7;s>=l&&(a+=Math.floor(s/l),s%=l),a>=l&&(o+=Math.floor(a/l),a%=l);function c(d,u){let p=d?String(d):"";return u?"0000000".slice(p.length)+p:p}return c(o,0)+c(a,o)+c(s,1)}Nn.int64toString=Ebe;function Cbe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}Nn.varint32write=Cbe;function bbe(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}Nn.varint32read=bbe});var wl=A(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.PbLong=Bl.PbULong=Bl.detectBi=void 0;var lm=D2(),kt;function hH(){let t=new DataView(new ArrayBuffer(8));kt=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}Bl.detectBi=hH;hH();function mH(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var gH=/^-?[0-9]+$/,k2=4294967296,P2=2147483648,O2=class{constructor(e,r){this.lo=e|0,this.hi=r|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let e=this.hi*k2+(this.lo>>>0);if(!Number.isSafeInteger(e))throw new Error("cannot convert to safe number");return e}},cm=class t extends O2{static from(e){if(kt)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=kt.C(e);case"number":if(e===0)return this.ZERO;e=kt.C(e);case"bigint":if(!e)return this.ZERO;if(ekt.UMAX)throw new Error("ulong too large");return kt.V.setBigUint64(0,e,!0),new t(kt.V.getInt32(0,!0),kt.V.getInt32(4,!0))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=e.trim(),!gH.test(e))throw new Error("string is no integer");let[r,i,n]=lm.int64fromString(e);if(r)throw new Error("signed value for ulong");return new t(i,n);case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");if(e<0)throw new Error("signed value for ulong");return new t(e,e/k2)}throw new Error("unknown value "+typeof e)}toString(){return kt?this.toBigInt().toString():lm.int64toString(this.lo,this.hi)}toBigInt(){return mH(kt),kt.V.setInt32(0,this.lo,!0),kt.V.setInt32(4,this.hi,!0),kt.V.getBigUint64(0,!0)}};Bl.PbULong=cm;cm.ZERO=new cm(0,0);var dm=class t extends O2{static from(e){if(kt)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=kt.C(e);case"number":if(e===0)return this.ZERO;e=kt.C(e);case"bigint":if(!e)return this.ZERO;if(ekt.MAX)throw new Error("signed long too large");return kt.V.setBigInt64(0,e,!0),new t(kt.V.getInt32(0,!0),kt.V.getInt32(4,!0))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=e.trim(),!gH.test(e))throw new Error("string is no integer");let[r,i,n]=lm.int64fromString(e);if(r){if(n>P2||n==P2&&i!=0)throw new Error("signed long too small")}else if(n>=P2)throw new Error("signed long too large");let s=new t(i,n);return r?s.negate():s;case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");return e>0?new t(e,e/k2):new t(-e,-e/k2).negate()}throw new Error("unknown value "+typeof e)}isNegative(){return(this.hi&P2)!==0}negate(){let e=~this.hi,r=this.lo;return r?r=~r+1:e+=1,new t(r,e)}toString(){if(kt)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return"-"+lm.int64toString(e.lo,e.hi)}return lm.int64toString(this.lo,this.hi)}toBigInt(){return mH(kt),kt.V.setInt32(0,this.lo,!0),kt.V.setInt32(4,this.hi,!0),kt.V.getBigInt64(0,!0)}};Bl.PbLong=dm;dm.ZERO=new dm(0,0)});var a9=A(gA=>{"use strict";Object.defineProperty(gA,"__esModule",{value:!0});gA.BinaryReader=gA.binaryReadOptions=void 0;var mA=om(),um=wl(),yH=D2(),EH={readUnknownField:!0,readerFactory:t=>new L2(t)};function Ibe(t){return t?Object.assign(Object.assign({},EH),t):EH}gA.binaryReadOptions=Ibe;var L2=class{constructor(e,r){this.varint64=yH.varint64read,this.uint32=yH.varint32read,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=r??new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}tag(){let e=this.uint32(),r=e>>>3,i=e&7;if(r<=0||i<0||i>5)throw new Error("illegal tag: field no "+r+" wire type "+i);return[r,i]}skip(e){let r=this.pos;switch(e){case mA.WireType.Varint:for(;this.buf[this.pos++]&128;);break;case mA.WireType.Bit64:this.pos+=4;case mA.WireType.Bit32:this.pos+=4;break;case mA.WireType.LengthDelimited:let i=this.uint32();this.pos+=i;break;case mA.WireType.StartGroup:let n;for(;(n=this.tag()[1])!==mA.WireType.EndGroup;)this.skip(n);break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return new um.PbLong(...this.varint64())}uint64(){return new um.PbULong(...this.varint64())}sint64(){let[e,r]=this.varint64(),i=-(e&1);return e=(e>>>1|(r&1)<<31)^i,r=r>>>1^i,new um.PbLong(e,r)}bool(){let[e,r]=this.varint64();return e!==0||r!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return new um.PbULong(this.sfixed32(),this.sfixed32())}sfixed64(){return new um.PbLong(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),r=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(r,r+e)}string(){return this.textDecoder.decode(this.bytes())}};gA.BinaryReader=L2});var yA=A(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.assertFloat32=Cs.assertUInt32=Cs.assertInt32=Cs.assertNever=Cs.assert=void 0;function Bbe(t,e){if(!t)throw new Error(e)}Cs.assert=Bbe;function wbe(t,e){throw new Error(e??"Unexpected object: "+t)}Cs.assertNever=wbe;var Qbe=34028234663852886e22,Sbe=-34028234663852886e22,_be=4294967295,vbe=2147483647,Nbe=-2147483648;function xbe(t){if(typeof t!="number")throw new Error("invalid int 32: "+typeof t);if(!Number.isInteger(t)||t>vbe||t_be||t<0)throw new Error("invalid uint 32: "+t)}Cs.assertUInt32=Rbe;function Tbe(t){if(typeof t!="number")throw new Error("invalid float 32: "+typeof t);if(Number.isFinite(t)&&(t>Qbe||t{"use strict";Object.defineProperty(CA,"__esModule",{value:!0});CA.BinaryWriter=CA.binaryWriteOptions=void 0;var Am=wl(),pm=D2(),EA=yA(),CH={writeUnknownFields:!0,writerFactory:()=>new F2};function Dbe(t){return t?Object.assign(Object.assign({},CH),t):CH}CA.binaryWriteOptions=Dbe;var F2=class{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let n=0;n>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(EA.assertUInt32(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return EA.assertInt32(e),pm.varint32write(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let r=this.textEncoder.encode(e);return this.uint32(r.byteLength),this.raw(r)}float(e){EA.assertFloat32(e);let r=new Uint8Array(4);return new DataView(r.buffer).setFloat32(0,e,!0),this.raw(r)}double(e){let r=new Uint8Array(8);return new DataView(r.buffer).setFloat64(0,e,!0),this.raw(r)}fixed32(e){EA.assertUInt32(e);let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,e,!0),this.raw(r)}sfixed32(e){EA.assertInt32(e);let r=new Uint8Array(4);return new DataView(r.buffer).setInt32(0,e,!0),this.raw(r)}sint32(e){return EA.assertInt32(e),e=(e<<1^e>>31)>>>0,pm.varint32write(e,this.buf),this}sfixed64(e){let r=new Uint8Array(8),i=new DataView(r.buffer),n=Am.PbLong.from(e);return i.setInt32(0,n.lo,!0),i.setInt32(4,n.hi,!0),this.raw(r)}fixed64(e){let r=new Uint8Array(8),i=new DataView(r.buffer),n=Am.PbULong.from(e);return i.setInt32(0,n.lo,!0),i.setInt32(4,n.hi,!0),this.raw(r)}int64(e){let r=Am.PbLong.from(e);return pm.varint64write(r.lo,r.hi,this.buf),this}sint64(e){let r=Am.PbLong.from(e),i=r.hi>>31,n=r.lo<<1^i,s=(r.hi<<1|r.lo>>>31)^i;return pm.varint64write(n,s,this.buf),this}uint64(e){let r=Am.PbULong.from(e);return pm.varint64write(r.lo,r.hi,this.buf),this}};CA.BinaryWriter=F2});var l9=A(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.mergeJsonOptions=Ql.jsonWriteOptions=Ql.jsonReadOptions=void 0;var bH={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},IH={ignoreUnknownFields:!1};function Pbe(t){return t?Object.assign(Object.assign({},IH),t):IH}Ql.jsonReadOptions=Pbe;function kbe(t){return t?Object.assign(Object.assign({},bH),t):bH}Ql.jsonWriteOptions=kbe;function Obe(t,e){var r,i;let n=Object.assign(Object.assign({},t),e);return n.typeRegistry=[...(r=t?.typeRegistry)!==null&&r!==void 0?r:[],...(i=e?.typeRegistry)!==null&&i!==void 0?i:[]],n}Ql.mergeJsonOptions=Obe});var fm=A(M2=>{"use strict";Object.defineProperty(M2,"__esModule",{value:!0});M2.MESSAGE_TYPE=void 0;M2.MESSAGE_TYPE=Symbol.for("protobuf-ts/message-type")});var c9=A(U2=>{"use strict";Object.defineProperty(U2,"__esModule",{value:!0});U2.lowerCamelCase=void 0;function Lbe(t){let e=!1,r=[];for(let i=0;i{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.readMessageOption=jr.readFieldOption=jr.readFieldOptions=jr.normalizeFieldInfo=jr.RepeatType=jr.LongType=jr.ScalarType=void 0;var BH=c9(),Fbe;(function(t){t[t.DOUBLE=1]="DOUBLE",t[t.FLOAT=2]="FLOAT",t[t.INT64=3]="INT64",t[t.UINT64=4]="UINT64",t[t.INT32=5]="INT32",t[t.FIXED64=6]="FIXED64",t[t.FIXED32=7]="FIXED32",t[t.BOOL=8]="BOOL",t[t.STRING=9]="STRING",t[t.BYTES=12]="BYTES",t[t.UINT32=13]="UINT32",t[t.SFIXED32=15]="SFIXED32",t[t.SFIXED64=16]="SFIXED64",t[t.SINT32=17]="SINT32",t[t.SINT64=18]="SINT64"})(Fbe=jr.ScalarType||(jr.ScalarType={}));var Mbe;(function(t){t[t.BIGINT=0]="BIGINT",t[t.STRING=1]="STRING",t[t.NUMBER=2]="NUMBER"})(Mbe=jr.LongType||(jr.LongType={}));var wH;(function(t){t[t.NO=0]="NO",t[t.PACKED=1]="PACKED",t[t.UNPACKED=2]="UNPACKED"})(wH=jr.RepeatType||(jr.RepeatType={}));function Ube(t){var e,r,i,n;return t.localName=(e=t.localName)!==null&&e!==void 0?e:BH.lowerCamelCase(t.name),t.jsonName=(r=t.jsonName)!==null&&r!==void 0?r:BH.lowerCamelCase(t.name),t.repeat=(i=t.repeat)!==null&&i!==void 0?i:wH.NO,t.opt=(n=t.opt)!==null&&n!==void 0?n:t.repeat||t.oneof?!1:t.kind=="message",t}jr.normalizeFieldInfo=Ube;function qbe(t,e,r,i){var n;let s=(n=t.fields.find((a,o)=>a.localName==e||o==e))===null||n===void 0?void 0:n.options;return s&&s[r]?i.fromJson(s[r]):void 0}jr.readFieldOptions=qbe;function Hbe(t,e,r,i){var n;let s=(n=t.fields.find((o,l)=>o.localName==e||l==e))===null||n===void 0?void 0:n.options;if(!s)return;let a=s[r];return a===void 0?a:i?i.fromJson(a):a}jr.readFieldOption=Hbe;function Gbe(t,e,r){let n=t.options[e];return n===void 0?n:r?r.fromJson(n):n}jr.readMessageOption=Gbe});var d9=A(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.getSelectedOneofValue=xn.clearOneofValue=xn.setUnknownOneofValue=xn.setOneofValue=xn.getOneofValue=xn.isOneofGroup=void 0;function jbe(t){if(typeof t!="object"||t===null||!t.hasOwnProperty("oneofKind"))return!1;switch(typeof t.oneofKind){case"string":return t[t.oneofKind]===void 0?!1:Object.keys(t).length==2;case"undefined":return Object.keys(t).length==1;default:return!1}}xn.isOneofGroup=jbe;function zbe(t,e){return t[e]}xn.getOneofValue=zbe;function Vbe(t,e,r){t.oneofKind!==void 0&&delete t[t.oneofKind],t.oneofKind=e,r!==void 0&&(t[e]=r)}xn.setOneofValue=Vbe;function Ybe(t,e,r){t.oneofKind!==void 0&&delete t[t.oneofKind],t.oneofKind=e,r!==void 0&&e!==void 0&&(t[e]=r)}xn.setUnknownOneofValue=Ybe;function Wbe(t){t.oneofKind!==void 0&&delete t[t.oneofKind],t.oneofKind=void 0}xn.clearOneofValue=Wbe;function Jbe(t){if(t.oneofKind!==void 0)return t[t.oneofKind]}xn.getSelectedOneofValue=Jbe});var A9=A(q2=>{"use strict";Object.defineProperty(q2,"__esModule",{value:!0});q2.ReflectionTypeCheck=void 0;var Er=Zs(),$be=d9(),u9=class{constructor(e){var r;this.fields=(r=e.fields)!==null&&r!==void 0?r:[]}prepare(){if(this.data)return;let e=[],r=[],i=[];for(let n of this.fields)if(n.oneof)i.includes(n.oneof)||(i.push(n.oneof),e.push(n.oneof),r.push(n.oneof));else switch(r.push(n.localName),n.kind){case"scalar":case"enum":(!n.opt||n.repeat)&&e.push(n.localName);break;case"message":n.repeat&&e.push(n.localName);break;case"map":e.push(n.localName);break}this.data={req:e,known:r,oneofs:Object.values(i)}}is(e,r,i=!1){if(r<0)return!0;if(e==null||typeof e!="object")return!1;this.prepare();let n=Object.keys(e),s=this.data;if(n.length!n.includes(a))||!i&&n.some(a=>!s.known.includes(a)))return!1;if(r<1)return!0;for(let a of s.oneofs){let o=e[a];if(!$be.isOneofGroup(o))return!1;if(o.oneofKind===void 0)continue;let l=this.fields.find(c=>c.localName===o.oneofKind);if(!l||!this.field(o[o.oneofKind],l,i,r))return!1}for(let a of this.fields)if(a.oneof===void 0&&!this.field(e[a.localName],a,i,r))return!1;return!0}field(e,r,i,n){let s=r.repeat;switch(r.kind){case"scalar":return e===void 0?r.opt:s?this.scalars(e,r.T,n,r.L):this.scalar(e,r.T,r.L);case"enum":return e===void 0?r.opt:s?this.scalars(e,Er.ScalarType.INT32,n):this.scalar(e,Er.ScalarType.INT32);case"message":return e===void 0?!0:s?this.messages(e,r.T(),i,n):this.message(e,r.T(),i,n);case"map":if(typeof e!="object"||e===null)return!1;if(n<2)return!0;if(!this.mapKeys(e,r.K,n))return!1;switch(r.V.kind){case"scalar":return this.scalars(Object.values(e),r.V.T,n,r.V.L);case"enum":return this.scalars(Object.values(e),Er.ScalarType.INT32,n);case"message":return this.messages(Object.values(e),r.V.T(),i,n)}break}return!0}message(e,r,i,n){return i?r.isAssignable(e,n):r.is(e,n)}messages(e,r,i,n){if(!Array.isArray(e))return!1;if(n<2)return!0;if(i){for(let s=0;sparseInt(s)),r,i);case Er.ScalarType.BOOL:return this.scalars(n.slice(0,i).map(s=>s=="true"?!0:s=="false"?!1:s),r,i);default:return this.scalars(n,r,i,Er.LongType.STRING)}}};q2.ReflectionTypeCheck=u9});var G2=A(H2=>{"use strict";Object.defineProperty(H2,"__esModule",{value:!0});H2.reflectionLongConvert=void 0;var QH=Zs();function Kbe(t,e){switch(e){case QH.LongType.BIGINT:return t.toBigInt();case QH.LongType.NUMBER:return t.toNumber();default:return t.toString()}}H2.reflectionLongConvert=Kbe});var f9=A(V2=>{"use strict";Object.defineProperty(V2,"__esModule",{value:!0});V2.ReflectionJsonReader=void 0;var SH=v2(),Xbe=x2(),zr=Zs(),j2=wl(),ud=yA(),z2=G2(),p9=class{constructor(e){this.info=e}prepare(){var e;if(this.fMap===void 0){this.fMap={};let r=(e=this.info.fields)!==null&&e!==void 0?e:[];for(let i of r)this.fMap[i.name]=i,this.fMap[i.jsonName]=i,this.fMap[i.localName]=i}}assert(e,r,i){if(!e){let n=SH.typeofJsonValue(i);throw(n=="number"||n=="boolean")&&(n=i.toString()),new Error(`Cannot parse JSON ${n} for ${this.info.typeName}#${r}`)}}read(e,r,i){this.prepare();let n=[];for(let[s,a]of Object.entries(e)){let o=this.fMap[s];if(!o){if(!i.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${s}`);continue}let l=o.localName,c;if(o.oneof){if(a===null&&(o.kind!=="enum"||o.T()[0]!=="google.protobuf.NullValue"))continue;if(n.includes(o.oneof))throw new Error(`Multiple members of the oneof group "${o.oneof}" of ${this.info.typeName} are present in JSON.`);n.push(o.oneof),c=r[o.oneof]={oneofKind:l}}else c=r;if(o.kind=="map"){if(a===null)continue;this.assert(SH.isJsonObject(a),o.name,a);let d=c[l];for(let[u,p]of Object.entries(a)){this.assert(p!==null,o.name+" map value",null);let f;switch(o.V.kind){case"message":f=o.V.T().internalJsonRead(p,i);break;case"enum":if(f=this.enum(o.V.T(),p,o.name,i.ignoreUnknownFields),f===!1)continue;break;case"scalar":f=this.scalar(p,o.V.T,o.V.L,o.name);break}this.assert(f!==void 0,o.name+" map value",p);let h=u;o.K==zr.ScalarType.BOOL&&(h=h=="true"?!0:h=="false"?!1:h),h=this.scalar(h,o.K,zr.LongType.STRING,o.name).toString(),d[h]=f}}else if(o.repeat){if(a===null)continue;this.assert(Array.isArray(a),o.name,a);let d=c[l];for(let u of a){this.assert(u!==null,o.name,null);let p;switch(o.kind){case"message":p=o.T().internalJsonRead(u,i);break;case"enum":if(p=this.enum(o.T(),u,o.name,i.ignoreUnknownFields),p===!1)continue;break;case"scalar":p=this.scalar(u,o.T,o.L,o.name);break}this.assert(p!==void 0,o.name,a),d.push(p)}}else switch(o.kind){case"message":if(a===null&&o.T().typeName!="google.protobuf.Value"){this.assert(o.oneof===void 0,o.name+" (oneof member)",null);continue}c[l]=o.T().internalJsonRead(a,i,c[l]);break;case"enum":if(a===null)continue;let d=this.enum(o.T(),a,o.name,i.ignoreUnknownFields);if(d===!1)continue;c[l]=d;break;case"scalar":if(a===null)continue;c[l]=this.scalar(a,o.T,o.L,o.name);break}}}enum(e,r,i,n){if(e[0]=="google.protobuf.NullValue"&&ud.assert(r===null||r==="NULL_VALUE",`Unable to parse field ${this.info.typeName}#${i}, enum ${e[0]} only accepts null.`),r===null)return 0;switch(typeof r){case"number":return ud.assert(Number.isInteger(r),`Unable to parse field ${this.info.typeName}#${i}, enum can only be integral number, got ${r}.`),r;case"string":let s=r;e[2]&&r.substring(0,e[2].length)===e[2]&&(s=r.substring(e[2].length));let a=e[1][s];return typeof a>"u"&&n?!1:(ud.assert(typeof a=="number",`Unable to parse field ${this.info.typeName}#${i}, enum ${e[0]} has no value for "${r}".`),a)}ud.assert(!1,`Unable to parse field ${this.info.typeName}#${i}, cannot parse enum value from ${typeof r}".`)}scalar(e,r,i,n){let s;try{switch(r){case zr.ScalarType.DOUBLE:case zr.ScalarType.FLOAT:if(e===null)return 0;if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""){s="empty string";break}if(typeof e=="string"&&e.trim().length!==e.length){s="extra whitespace";break}if(typeof e!="string"&&typeof e!="number")break;let a=Number(e);if(Number.isNaN(a)){s="not a number";break}if(!Number.isFinite(a)){s="too large or small";break}return r==zr.ScalarType.FLOAT&&ud.assertFloat32(a),a;case zr.ScalarType.INT32:case zr.ScalarType.FIXED32:case zr.ScalarType.SFIXED32:case zr.ScalarType.SINT32:case zr.ScalarType.UINT32:if(e===null)return 0;let o;if(typeof e=="number"?o=e:e===""?s="empty string":typeof e=="string"&&(e.trim().length!==e.length?s="extra whitespace":o=Number(e)),o===void 0)break;return r==zr.ScalarType.UINT32?ud.assertUInt32(o):ud.assertInt32(o),o;case zr.ScalarType.INT64:case zr.ScalarType.SFIXED64:case zr.ScalarType.SINT64:if(e===null)return z2.reflectionLongConvert(j2.PbLong.ZERO,i);if(typeof e!="number"&&typeof e!="string")break;return z2.reflectionLongConvert(j2.PbLong.from(e),i);case zr.ScalarType.FIXED64:case zr.ScalarType.UINT64:if(e===null)return z2.reflectionLongConvert(j2.PbULong.ZERO,i);if(typeof e!="number"&&typeof e!="string")break;return z2.reflectionLongConvert(j2.PbULong.from(e),i);case zr.ScalarType.BOOL:if(e===null)return!1;if(typeof e!="boolean")break;return e;case zr.ScalarType.STRING:if(e===null)return"";if(typeof e!="string"){s="extra whitespace";break}try{encodeURIComponent(e)}catch(l){l="invalid UTF8";break}return e;case zr.ScalarType.BYTES:if(e===null||e==="")return new Uint8Array(0);if(typeof e!="string")break;return Xbe.base64decode(e)}}catch(a){s=a.message}this.assert(!1,n+(s?" - "+s:""),e)}};V2.ReflectionJsonReader=p9});var m9=A(Y2=>{"use strict";Object.defineProperty(Y2,"__esModule",{value:!0});Y2.ReflectionJsonWriter=void 0;var Zbe=x2(),_H=wl(),an=Zs(),nr=yA(),h9=class{constructor(e){var r;this.fields=(r=e.fields)!==null&&r!==void 0?r:[]}write(e,r){let i={},n=e;for(let s of this.fields){if(!s.oneof){let c=this.field(s,n[s.localName],r);c!==void 0&&(i[r.useProtoFieldName?s.name:s.jsonName]=c);continue}let a=n[s.oneof];if(a.oneofKind!==s.localName)continue;let o=s.kind=="scalar"||s.kind=="enum"?Object.assign(Object.assign({},r),{emitDefaultValues:!0}):r,l=this.field(s,a[s.localName],o);nr.assert(l!==void 0),i[r.useProtoFieldName?s.name:s.jsonName]=l}return i}field(e,r,i){let n;if(e.kind=="map"){nr.assert(typeof r=="object"&&r!==null);let s={};switch(e.V.kind){case"scalar":for(let[l,c]of Object.entries(r)){let d=this.scalar(e.V.T,c,e.name,!1,!0);nr.assert(d!==void 0),s[l.toString()]=d}break;case"message":let a=e.V.T();for(let[l,c]of Object.entries(r)){let d=this.message(a,c,e.name,i);nr.assert(d!==void 0),s[l.toString()]=d}break;case"enum":let o=e.V.T();for(let[l,c]of Object.entries(r)){nr.assert(c===void 0||typeof c=="number");let d=this.enum(o,c,e.name,!1,!0,i.enumAsInteger);nr.assert(d!==void 0),s[l.toString()]=d}break}(i.emitDefaultValues||Object.keys(s).length>0)&&(n=s)}else if(e.repeat){nr.assert(Array.isArray(r));let s=[];switch(e.kind){case"scalar":for(let l=0;l0||i.emitDefaultValues)&&(n=s)}else switch(e.kind){case"scalar":n=this.scalar(e.T,r,e.name,e.opt,i.emitDefaultValues);break;case"enum":n=this.enum(e.T(),r,e.name,e.opt,i.emitDefaultValues,i.enumAsInteger);break;case"message":n=this.message(e.T(),r,e.name,i);break}return n}enum(e,r,i,n,s,a){if(e[0]=="google.protobuf.NullValue")return!s&&!n?void 0:null;if(r===void 0){nr.assert(n);return}if(!(r===0&&!s&&!n))return nr.assert(typeof r=="number"),nr.assert(Number.isInteger(r)),a||!e[1].hasOwnProperty(r)?r:e[2]?e[2]+e[1][r]:e[1][r]}message(e,r,i,n){return r===void 0?n.emitDefaultValues?null:void 0:e.internalJsonWrite(r,n)}scalar(e,r,i,n,s){if(r===void 0){nr.assert(n);return}let a=s||n;switch(e){case an.ScalarType.INT32:case an.ScalarType.SFIXED32:case an.ScalarType.SINT32:return r===0?a?0:void 0:(nr.assertInt32(r),r);case an.ScalarType.FIXED32:case an.ScalarType.UINT32:return r===0?a?0:void 0:(nr.assertUInt32(r),r);case an.ScalarType.FLOAT:nr.assertFloat32(r);case an.ScalarType.DOUBLE:return r===0?a?0:void 0:(nr.assert(typeof r=="number"),Number.isNaN(r)?"NaN":r===Number.POSITIVE_INFINITY?"Infinity":r===Number.NEGATIVE_INFINITY?"-Infinity":r);case an.ScalarType.STRING:return r===""?a?"":void 0:(nr.assert(typeof r=="string"),r);case an.ScalarType.BOOL:return r===!1?a?!1:void 0:(nr.assert(typeof r=="boolean"),r);case an.ScalarType.UINT64:case an.ScalarType.FIXED64:nr.assert(typeof r=="number"||typeof r=="string"||typeof r=="bigint");let o=_H.PbULong.from(r);return o.isZero()&&!a?void 0:o.toString();case an.ScalarType.INT64:case an.ScalarType.SFIXED64:case an.ScalarType.SINT64:nr.assert(typeof r=="number"||typeof r=="string"||typeof r=="bigint");let l=_H.PbLong.from(r);return l.isZero()&&!a?void 0:l.toString();case an.ScalarType.BYTES:return nr.assert(r instanceof Uint8Array),r.byteLength?Zbe.base64encode(r):a?"":void 0}}};Y2.ReflectionJsonWriter=h9});var J2=A(W2=>{"use strict";Object.defineProperty(W2,"__esModule",{value:!0});W2.reflectionScalarDefault=void 0;var ea=Zs(),vH=G2(),NH=wl();function eIe(t,e=ea.LongType.STRING){switch(t){case ea.ScalarType.BOOL:return!1;case ea.ScalarType.UINT64:case ea.ScalarType.FIXED64:return vH.reflectionLongConvert(NH.PbULong.ZERO,e);case ea.ScalarType.INT64:case ea.ScalarType.SFIXED64:case ea.ScalarType.SINT64:return vH.reflectionLongConvert(NH.PbLong.ZERO,e);case ea.ScalarType.DOUBLE:case ea.ScalarType.FLOAT:return 0;case ea.ScalarType.BYTES:return new Uint8Array(0);case ea.ScalarType.STRING:return"";default:return 0}}W2.reflectionScalarDefault=eIe});var y9=A($2=>{"use strict";Object.defineProperty($2,"__esModule",{value:!0});$2.ReflectionBinaryReader=void 0;var xH=om(),xr=Zs(),hm=G2(),RH=J2(),g9=class{constructor(e){this.info=e}prepare(){var e;if(!this.fieldNoToField){let r=(e=this.info.fields)!==null&&e!==void 0?e:[];this.fieldNoToField=new Map(r.map(i=>[i.no,i]))}}read(e,r,i,n){this.prepare();let s=n===void 0?e.len:e.pos+n;for(;e.pos{"use strict";Object.defineProperty(K2,"__esModule",{value:!0});K2.ReflectionBinaryWriter=void 0;var Xn=om(),Ht=Zs(),bA=yA(),mm=wl(),E9=class{constructor(e){this.info=e}prepare(){if(!this.fields){let e=this.info.fields?this.info.fields.concat():[];this.fields=e.sort((r,i)=>r.no-i.no)}}write(e,r,i){this.prepare();for(let s of this.fields){let a,o,l=s.repeat,c=s.localName;if(s.oneof){let d=e[s.oneof];if(d.oneofKind!==c)continue;a=d[c],o=!0}else a=e[c],o=!1;switch(s.kind){case"scalar":case"enum":let d=s.kind=="enum"?Ht.ScalarType.INT32:s.T;if(l)if(bA.assert(Array.isArray(a)),l==Ht.RepeatType.PACKED)this.packed(r,d,s.no,a);else for(let u of a)this.scalar(r,d,s.no,u,!0);else a===void 0?bA.assert(s.opt):this.scalar(r,d,s.no,a,o||s.opt);break;case"message":if(l){bA.assert(Array.isArray(a));for(let u of a)this.message(r,i,s.T(),s.no,u)}else this.message(r,i,s.T(),s.no,a);break;case"map":bA.assert(typeof a=="object"&&a!==null);for(let[u,p]of Object.entries(a))this.mapEntry(r,i,s,u,p);break}}let n=i.writeUnknownFields;n!==!1&&(n===!0?Xn.UnknownFieldHandler.onWrite:n)(this.info.typeName,e,r)}mapEntry(e,r,i,n,s){e.tag(i.no,Xn.WireType.LengthDelimited),e.fork();let a=n;switch(i.K){case Ht.ScalarType.INT32:case Ht.ScalarType.FIXED32:case Ht.ScalarType.UINT32:case Ht.ScalarType.SFIXED32:case Ht.ScalarType.SINT32:a=Number.parseInt(n);break;case Ht.ScalarType.BOOL:bA.assert(n=="true"||n=="false"),a=n=="true";break}switch(this.scalar(e,i.K,1,a,!0),i.V.kind){case"scalar":this.scalar(e,i.V.T,2,s,!0);break;case"enum":this.scalar(e,Ht.ScalarType.INT32,2,s,!0);break;case"message":this.message(e,r,i.V.T(),2,s);break}e.join()}message(e,r,i,n,s){s!==void 0&&(i.internalBinaryWrite(s,e.tag(n,Xn.WireType.LengthDelimited).fork(),r),e.join())}scalar(e,r,i,n,s){let[a,o,l]=this.scalarInfo(r,n);(!l||s)&&(e.tag(i,a),e[o](n))}packed(e,r,i,n){if(!n.length)return;bA.assert(r!==Ht.ScalarType.BYTES&&r!==Ht.ScalarType.STRING),e.tag(i,Xn.WireType.LengthDelimited),e.fork();let[,s]=this.scalarInfo(r);for(let a=0;a{"use strict";Object.defineProperty(X2,"__esModule",{value:!0});X2.reflectionCreate=void 0;var tIe=J2(),rIe=fm();function iIe(t){let e=t.messagePrototype?Object.create(t.messagePrototype):Object.defineProperty({},rIe.MESSAGE_TYPE,{value:t});for(let r of t.fields){let i=r.localName;if(!r.opt)if(r.oneof)e[r.oneof]={oneofKind:void 0};else if(r.repeat)e[i]=[];else switch(r.kind){case"scalar":e[i]=tIe.reflectionScalarDefault(r.T,r.L);break;case"enum":e[i]=0;break;case"map":e[i]={};break}}return e}X2.reflectionCreate=iIe});var I9=A(Z2=>{"use strict";Object.defineProperty(Z2,"__esModule",{value:!0});Z2.reflectionMergePartial=void 0;function nIe(t,e,r){let i,n=r,s;for(let a of t.fields){let o=a.localName;if(a.oneof){let l=n[a.oneof];if(l?.oneofKind==null)continue;if(i=l[o],s=e[a.oneof],s.oneofKind=l.oneofKind,i==null){delete s[o];continue}}else if(i=n[o],s=e,i==null)continue;switch(a.repeat&&(s[o].length=i.length),a.kind){case"scalar":case"enum":if(a.repeat)for(let c=0;c{"use strict";Object.defineProperty(tE,"__esModule",{value:!0});tE.reflectionEquals=void 0;var B9=Zs();function sIe(t,e,r){if(e===r)return!0;if(!e||!r)return!1;for(let i of t.fields){let n=i.localName,s=i.oneof?e[i.oneof][n]:e[n],a=i.oneof?r[i.oneof][n]:r[n];switch(i.kind){case"enum":case"scalar":let o=i.kind=="enum"?B9.ScalarType.INT32:i.T;if(!(i.repeat?TH(o,s,a):PH(o,s,a)))return!1;break;case"map":if(!(i.V.kind=="message"?DH(i.V.T(),eE(s),eE(a)):TH(i.V.kind=="enum"?B9.ScalarType.INT32:i.V.T,eE(s),eE(a))))return!1;break;case"message":let l=i.T();if(!(i.repeat?DH(l,s,a):l.equals(s,a)))return!1;break}}return!0}tE.reflectionEquals=sIe;var eE=Object.values;function PH(t,e,r){if(e===r)return!0;if(t!==B9.ScalarType.BYTES)return!1;let i=e,n=r;if(i.length!==n.length)return!1;for(let s=0;s{"use strict";Object.defineProperty(rE,"__esModule",{value:!0});rE.MessageType=void 0;var aIe=fm(),oIe=Zs(),lIe=A9(),cIe=f9(),dIe=m9(),uIe=y9(),AIe=C9(),pIe=b9(),Q9=I9(),fIe=v2(),kH=l9(),hIe=w9(),mIe=o9(),gIe=a9(),OH=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})),yIe=OH[aIe.MESSAGE_TYPE]={},S9=class{constructor(e,r,i){this.defaultCheckDepth=16,this.typeName=e,this.fields=r.map(oIe.normalizeFieldInfo),this.options=i??{},yIe.value=this,this.messagePrototype=Object.create(null,OH),this.refTypeCheck=new lIe.ReflectionTypeCheck(this),this.refJsonReader=new cIe.ReflectionJsonReader(this),this.refJsonWriter=new dIe.ReflectionJsonWriter(this),this.refBinReader=new uIe.ReflectionBinaryReader(this),this.refBinWriter=new AIe.ReflectionBinaryWriter(this)}create(e){let r=pIe.reflectionCreate(this);return e!==void 0&&Q9.reflectionMergePartial(this,r,e),r}clone(e){let r=this.create();return Q9.reflectionMergePartial(this,r,e),r}equals(e,r){return hIe.reflectionEquals(this,e,r)}is(e,r=this.defaultCheckDepth){return this.refTypeCheck.is(e,r,!1)}isAssignable(e,r=this.defaultCheckDepth){return this.refTypeCheck.is(e,r,!0)}mergePartial(e,r){Q9.reflectionMergePartial(this,e,r)}fromBinary(e,r){let i=gIe.binaryReadOptions(r);return this.internalBinaryRead(i.readerFactory(e),e.byteLength,i)}fromJson(e,r){return this.internalJsonRead(e,kH.jsonReadOptions(r))}fromJsonString(e,r){let i=JSON.parse(e);return this.fromJson(i,r)}toJson(e,r){return this.internalJsonWrite(e,kH.jsonWriteOptions(r))}toJsonString(e,r){var i;let n=this.toJson(e,r);return JSON.stringify(n,null,(i=r?.prettySpaces)!==null&&i!==void 0?i:0)}toBinary(e,r){let i=mIe.binaryWriteOptions(r);return this.internalBinaryWrite(e,i.writerFactory(),i).finish()}internalJsonRead(e,r,i){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let n=i??this.create();return this.refJsonReader.read(e,n,r),n}throw new Error(`Unable to parse message ${this.typeName} from JSON ${fIe.typeofJsonValue(e)}.`)}internalJsonWrite(e,r){return this.refJsonWriter.write(e,r)}internalBinaryWrite(e,r,i){return this.refBinWriter.write(e,r,i),r}internalBinaryRead(e,r,i,n){let s=n??this.create();return this.refBinReader.read(e,s,i,r),s}};rE.MessageType=S9});var FH=A(iE=>{"use strict";Object.defineProperty(iE,"__esModule",{value:!0});iE.containsMessageType=void 0;var EIe=fm();function CIe(t){return t[EIe.MESSAGE_TYPE]!=null}iE.containsMessageType=CIe});var UH=A(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.listEnumNumbers=xa.listEnumNames=xa.listEnumValues=xa.isEnumObject=void 0;function MH(t){if(typeof t!="object"||t===null||!t.hasOwnProperty(0))return!1;for(let e of Object.keys(t)){let r=parseInt(e);if(Number.isNaN(r)){let i=t[e];if(i===void 0||typeof i!="number"||t[i]===void 0)return!1}else{let i=t[r];if(i===void 0||t[i]!==r)return!1}}return!0}xa.isEnumObject=MH;function _9(t){if(!MH(t))throw new Error("not a typescript enum object");let e=[];for(let[r,i]of Object.entries(t))typeof i=="number"&&e.push({name:r,number:i});return e}xa.listEnumValues=_9;function bIe(t){return _9(t).map(e=>e.name)}xa.listEnumNames=bIe;function IIe(t){return _9(t).map(e=>e.number).filter((e,r,i)=>i.indexOf(e)==r)}xa.listEnumNumbers=IIe});var Jt=A(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});var qH=v2();Object.defineProperty(Se,"typeofJsonValue",{enumerable:!0,get:function(){return qH.typeofJsonValue}});Object.defineProperty(Se,"isJsonObject",{enumerable:!0,get:function(){return qH.isJsonObject}});var HH=x2();Object.defineProperty(Se,"base64decode",{enumerable:!0,get:function(){return HH.base64decode}});Object.defineProperty(Se,"base64encode",{enumerable:!0,get:function(){return HH.base64encode}});var BIe=fH();Object.defineProperty(Se,"utf8read",{enumerable:!0,get:function(){return BIe.utf8read}});var v9=om();Object.defineProperty(Se,"WireType",{enumerable:!0,get:function(){return v9.WireType}});Object.defineProperty(Se,"mergeBinaryOptions",{enumerable:!0,get:function(){return v9.mergeBinaryOptions}});Object.defineProperty(Se,"UnknownFieldHandler",{enumerable:!0,get:function(){return v9.UnknownFieldHandler}});var GH=a9();Object.defineProperty(Se,"BinaryReader",{enumerable:!0,get:function(){return GH.BinaryReader}});Object.defineProperty(Se,"binaryReadOptions",{enumerable:!0,get:function(){return GH.binaryReadOptions}});var jH=o9();Object.defineProperty(Se,"BinaryWriter",{enumerable:!0,get:function(){return jH.BinaryWriter}});Object.defineProperty(Se,"binaryWriteOptions",{enumerable:!0,get:function(){return jH.binaryWriteOptions}});var zH=wl();Object.defineProperty(Se,"PbLong",{enumerable:!0,get:function(){return zH.PbLong}});Object.defineProperty(Se,"PbULong",{enumerable:!0,get:function(){return zH.PbULong}});var N9=l9();Object.defineProperty(Se,"jsonReadOptions",{enumerable:!0,get:function(){return N9.jsonReadOptions}});Object.defineProperty(Se,"jsonWriteOptions",{enumerable:!0,get:function(){return N9.jsonWriteOptions}});Object.defineProperty(Se,"mergeJsonOptions",{enumerable:!0,get:function(){return N9.mergeJsonOptions}});var wIe=fm();Object.defineProperty(Se,"MESSAGE_TYPE",{enumerable:!0,get:function(){return wIe.MESSAGE_TYPE}});var QIe=LH();Object.defineProperty(Se,"MessageType",{enumerable:!0,get:function(){return QIe.MessageType}});var Ad=Zs();Object.defineProperty(Se,"ScalarType",{enumerable:!0,get:function(){return Ad.ScalarType}});Object.defineProperty(Se,"LongType",{enumerable:!0,get:function(){return Ad.LongType}});Object.defineProperty(Se,"RepeatType",{enumerable:!0,get:function(){return Ad.RepeatType}});Object.defineProperty(Se,"normalizeFieldInfo",{enumerable:!0,get:function(){return Ad.normalizeFieldInfo}});Object.defineProperty(Se,"readFieldOptions",{enumerable:!0,get:function(){return Ad.readFieldOptions}});Object.defineProperty(Se,"readFieldOption",{enumerable:!0,get:function(){return Ad.readFieldOption}});Object.defineProperty(Se,"readMessageOption",{enumerable:!0,get:function(){return Ad.readMessageOption}});var SIe=A9();Object.defineProperty(Se,"ReflectionTypeCheck",{enumerable:!0,get:function(){return SIe.ReflectionTypeCheck}});var _Ie=b9();Object.defineProperty(Se,"reflectionCreate",{enumerable:!0,get:function(){return _Ie.reflectionCreate}});var vIe=J2();Object.defineProperty(Se,"reflectionScalarDefault",{enumerable:!0,get:function(){return vIe.reflectionScalarDefault}});var NIe=I9();Object.defineProperty(Se,"reflectionMergePartial",{enumerable:!0,get:function(){return NIe.reflectionMergePartial}});var xIe=w9();Object.defineProperty(Se,"reflectionEquals",{enumerable:!0,get:function(){return xIe.reflectionEquals}});var RIe=y9();Object.defineProperty(Se,"ReflectionBinaryReader",{enumerable:!0,get:function(){return RIe.ReflectionBinaryReader}});var TIe=C9();Object.defineProperty(Se,"ReflectionBinaryWriter",{enumerable:!0,get:function(){return TIe.ReflectionBinaryWriter}});var DIe=f9();Object.defineProperty(Se,"ReflectionJsonReader",{enumerable:!0,get:function(){return DIe.ReflectionJsonReader}});var PIe=m9();Object.defineProperty(Se,"ReflectionJsonWriter",{enumerable:!0,get:function(){return PIe.ReflectionJsonWriter}});var kIe=FH();Object.defineProperty(Se,"containsMessageType",{enumerable:!0,get:function(){return kIe.containsMessageType}});var gm=d9();Object.defineProperty(Se,"isOneofGroup",{enumerable:!0,get:function(){return gm.isOneofGroup}});Object.defineProperty(Se,"setOneofValue",{enumerable:!0,get:function(){return gm.setOneofValue}});Object.defineProperty(Se,"getOneofValue",{enumerable:!0,get:function(){return gm.getOneofValue}});Object.defineProperty(Se,"clearOneofValue",{enumerable:!0,get:function(){return gm.clearOneofValue}});Object.defineProperty(Se,"getSelectedOneofValue",{enumerable:!0,get:function(){return gm.getSelectedOneofValue}});var nE=UH();Object.defineProperty(Se,"listEnumValues",{enumerable:!0,get:function(){return nE.listEnumValues}});Object.defineProperty(Se,"listEnumNames",{enumerable:!0,get:function(){return nE.listEnumNames}});Object.defineProperty(Se,"listEnumNumbers",{enumerable:!0,get:function(){return nE.listEnumNumbers}});Object.defineProperty(Se,"isEnumObject",{enumerable:!0,get:function(){return nE.isEnumObject}});var OIe=c9();Object.defineProperty(Se,"lowerCamelCase",{enumerable:!0,get:function(){return OIe.lowerCamelCase}});var ym=yA();Object.defineProperty(Se,"assert",{enumerable:!0,get:function(){return ym.assert}});Object.defineProperty(Se,"assertNever",{enumerable:!0,get:function(){return ym.assertNever}});Object.defineProperty(Se,"assertInt32",{enumerable:!0,get:function(){return ym.assertInt32}});Object.defineProperty(Se,"assertUInt32",{enumerable:!0,get:function(){return ym.assertUInt32}});Object.defineProperty(Se,"assertFloat32",{enumerable:!0,get:function(){return ym.assertFloat32}})});var R9=A(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});sE.Timestamp=void 0;var VH=Jt(),YH=Jt(),LIe=Jt(),FIe=Jt(),MIe=Jt(),Em=Jt(),UIe=Jt(),x9=class extends UIe.MessageType{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){let e=this.create(),r=Date.now();return e.seconds=Em.PbLong.from(Math.floor(r/1e3)).toString(),e.nanos=r%1e3*1e6,e}toDate(e){return new Date(Em.PbLong.from(e.seconds).toNumber()*1e3+Math.ceil(e.nanos/1e6))}fromDate(e){let r=this.create(),i=e.getTime();return r.seconds=Em.PbLong.from(Math.floor(i/1e3)).toString(),r.nanos=i%1e3*1e6,r}internalJsonWrite(e,r){let i=Em.PbLong.from(e.seconds).toNumber()*1e3;if(iDate.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(e.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let n="Z";if(e.nanos>0){let s=(e.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?n="."+s.substring(0,3)+"Z":s.substring(6)==="000"?n="."+s.substring(0,6)+"Z":n="."+s+"Z"}return new Date(i).toISOString().replace(".000Z",n)}internalJsonRead(e,r,i){if(typeof e!="string")throw new Error("Unable to parse Timestamp from JSON "+(0,MIe.typeofJsonValue)(e)+".");let n=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!n)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let s=Date.parse(n[1]+"-"+n[2]+"-"+n[3]+"T"+n[4]+":"+n[5]+":"+n[6]+(n[8]?n[8]:"Z"));if(Number.isNaN(s))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(sDate.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return i||(i=this.create()),i.seconds=Em.PbLong.from(s/1e3).toString(),i.nanos=0,n[7]&&(i.nanos=parseInt("1"+n[7]+"0".repeat(9-n[7].length))-1e9),i}create(e){let r={seconds:"0",nanos:0};return globalThis.Object.defineProperty(r,FIe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,LIe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,i,n){let s=n??this.create(),a=e.pos+r;for(;e.pos{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.BytesValue=kr.StringValue=kr.BoolValue=kr.UInt32Value=kr.Int32Value=kr.UInt64Value=kr.Int64Value=kr.FloatValue=kr.DoubleValue=void 0;var aE=Jt(),WH=Jt(),No=Jt(),Zr=Jt(),xo=Jt(),Ro=Jt(),To=Jt(),T9=class extends To.MessageType{constructor(){super("google.protobuf.DoubleValue",[{no:1,name:"value",kind:"scalar",T:1}])}internalJsonWrite(e,r){return this.refJsonWriter.scalar(2,e.value,"value",!1,!0)}internalJsonRead(e,r,i){return i||(i=this.create()),i.value=this.refJsonReader.scalar(e,1,void 0,"value"),i}create(e){let r={value:0};return globalThis.Object.defineProperty(r,Ro.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,xo.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,i,n){let s=n??this.create(),a=e.pos+r;for(;e.pos{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.readServiceOption=Ra.readMethodOption=Ra.readMethodOptions=Ra.normalizeMethodInfo=void 0;var qIe=Jt();function HIe(t,e){var r,i,n;let s=t;return s.service=e,s.localName=(r=s.localName)!==null&&r!==void 0?r:qIe.lowerCamelCase(s.name),s.serverStreaming=!!s.serverStreaming,s.clientStreaming=!!s.clientStreaming,s.options=(i=s.options)!==null&&i!==void 0?i:{},s.idempotency=(n=s.idempotency)!==null&&n!==void 0?n:void 0,s}Ra.normalizeMethodInfo=HIe;function GIe(t,e,r,i){var n;let s=(n=t.methods.find((a,o)=>a.localName===e||o===e))===null||n===void 0?void 0:n.options;return s&&s[r]?i.fromJson(s[r]):void 0}Ra.readMethodOptions=GIe;function jIe(t,e,r,i){var n;let s=(n=t.methods.find((o,l)=>o.localName===e||l===e))===null||n===void 0?void 0:n.options;if(!s)return;let a=s[r];return a===void 0?a:i?i.fromJson(a):a}Ra.readMethodOption=jIe;function zIe(t,e,r){let i=t.options;if(!i)return;let n=i[e];return n===void 0?n:r?r.fromJson(n):n}Ra.readServiceOption=zIe});var JH=A(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.ServiceType=void 0;var VIe=q9(),H9=class{constructor(e,r,i){this.typeName=e,this.methods=r.map(n=>VIe.normalizeMethodInfo(n,this)),this.options=i??{}}};lE.ServiceType=H9});var j9=A(cE=>{"use strict";Object.defineProperty(cE,"__esModule",{value:!0});cE.RpcError=void 0;var G9=class extends Error{constructor(e,r="UNKNOWN",i){super(e),this.name="RpcError",Object.setPrototypeOf(this,new.target.prototype),this.code=r,this.meta=i??{}}toString(){let e=[this.name+": "+this.message];this.code&&(e.push(""),e.push("Code: "+this.code)),this.serviceName&&this.methodName&&e.push("Method: "+this.serviceName+"/"+this.methodName);let r=Object.entries(this.meta);if(r.length){e.push(""),e.push("Meta:");for(let[i,n]of r)e.push(` ${i}: ${n}`)}return e.join(`
-`)}};cE.RpcError=G9});var z9=A(uE=>{"use strict";Object.defineProperty(uE,"__esModule",{value:!0});uE.mergeRpcOptions=void 0;var $H=Jt();function YIe(t,e){if(!e)return t;let r={};dE(t,r),dE(e,r);for(let i of Object.keys(e)){let n=e[i];switch(i){case"jsonOptions":r.jsonOptions=$H.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=$H.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},dE(t.meta,r.meta),dE(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(n):n.concat();break}}return r}uE.mergeRpcOptions=YIe;function dE(t,e){if(!t)return;let r=e;for(let[i,n]of Object.entries(t))n instanceof Date?r[i]=new Date(n.getTime()):Array.isArray(n)?r[i]=n.concat():r[i]=n}});var Y9=A(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.Deferred=pd.DeferredState=void 0;var Ta;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(Ta=pd.DeferredState||(pd.DeferredState={}));var V9=class{constructor(e=!0){this._state=Ta.PENDING,this._promise=new Promise((r,i)=>{this._resolve=r,this._reject=i}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==Ta.PENDING)throw new Error(`cannot resolve ${Ta[this.state].toLowerCase()}`);this._resolve(e),this._state=Ta.RESOLVED}reject(e){if(this.state!==Ta.PENDING)throw new Error(`cannot reject ${Ta[this.state].toLowerCase()}`);this._reject(e),this._state=Ta.REJECTED}resolvePending(e){this._state===Ta.PENDING&&this.resolve(e)}rejectPending(e){this._state===Ta.PENDING&&this.reject(e)}};pd.Deferred=V9});var J9=A(AE=>{"use strict";Object.defineProperty(AE,"__esModule",{value:!0});AE.RpcOutputStreamController=void 0;var KH=Y9(),fd=Jt(),W9=class{constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let i=r.indexOf(e);i>=0&&r.splice(i,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,i){fd.assert((e?1:0)+(r?1:0)+(i?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),i&&this.notifyComplete()}notifyMessage(e){fd.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){fd.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){fd.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;fd.assert(e,"bad state"),fd.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new KH.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let i=r.p;fd.assert(i.state==KH.DeferredState.PENDING,"iterator contract broken"),"value"in e?i.resolve(e):i.reject(e),delete r.p}else r.q.push(e)}};AE.RpcOutputStreamController=W9});var K9=A(IA=>{"use strict";var WIe=IA&&IA.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(IA,"__esModule",{value:!0});IA.UnaryCall=void 0;var $9=class{constructor(e,r,i,n,s,a,o){this.method=e,this.requestHeaders=r,this.request=i,this.headers=n,this.response=s,this.status=a,this.trailers=o}then(e,r){return this.promiseFinished().then(i=>e?Promise.resolve(e(i)):i,i=>r?Promise.resolve(r(i)):Promise.reject(i))}promiseFinished(){return WIe(this,void 0,void 0,function*(){let[e,r,i,n]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:i,trailers:n}})}};IA.UnaryCall=$9});var Z9=A(BA=>{"use strict";var JIe=BA&&BA.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(BA,"__esModule",{value:!0});BA.ServerStreamingCall=void 0;var X9=class{constructor(e,r,i,n,s,a,o){this.method=e,this.requestHeaders=r,this.request=i,this.headers=n,this.responses=s,this.status=a,this.trailers=o}then(e,r){return this.promiseFinished().then(i=>e?Promise.resolve(e(i)):i,i=>r?Promise.resolve(r(i)):Promise.reject(i))}promiseFinished(){return JIe(this,void 0,void 0,function*(){let[e,r,i]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,status:r,trailers:i}})}};BA.ServerStreamingCall=X9});var t5=A(wA=>{"use strict";var $Ie=wA&&wA.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(wA,"__esModule",{value:!0});wA.ClientStreamingCall=void 0;var e5=class{constructor(e,r,i,n,s,a,o){this.method=e,this.requestHeaders=r,this.requests=i,this.headers=n,this.response=s,this.status=a,this.trailers=o}then(e,r){return this.promiseFinished().then(i=>e?Promise.resolve(e(i)):i,i=>r?Promise.resolve(r(i)):Promise.reject(i))}promiseFinished(){return $Ie(this,void 0,void 0,function*(){let[e,r,i,n]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,response:r,status:i,trailers:n}})}};wA.ClientStreamingCall=e5});var i5=A(QA=>{"use strict";var KIe=QA&&QA.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(QA,"__esModule",{value:!0});QA.DuplexStreamingCall=void 0;var r5=class{constructor(e,r,i,n,s,a,o){this.method=e,this.requestHeaders=r,this.requests=i,this.headers=n,this.responses=s,this.status=a,this.trailers=o}then(e,r){return this.promiseFinished().then(i=>e?Promise.resolve(e(i)):i,i=>r?Promise.resolve(r(i)):Promise.reject(i))}promiseFinished(){return KIe(this,void 0,void 0,function*(){let[e,r,i]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,status:r,trailers:i}})}};QA.DuplexStreamingCall=r5});var ZH=A(vA=>{"use strict";var XIe=vA&&vA.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(vA,"__esModule",{value:!0});vA.TestTransport=void 0;var bs=j9(),pE=Jt(),XH=J9(),ZIe=z9(),eBe=K9(),tBe=Z9(),rBe=t5(),iBe=i5(),_A=class t{constructor(e){this.suppressUncaughtRejections=!0,this.headerDelay=10,this.responseDelay=50,this.betweenResponseDelay=10,this.afterResponseDelay=10,this.data=e??{}}get sentMessages(){return this.lastInput instanceof SA?this.lastInput.sent:typeof this.lastInput=="object"?[this.lastInput.single]:[]}get sendComplete(){return this.lastInput instanceof SA?this.lastInput.completed:typeof this.lastInput=="object"}promiseHeaders(){var e;let r=(e=this.data.headers)!==null&&e!==void 0?e:t.defaultHeaders;return r instanceof bs.RpcError?Promise.reject(r):Promise.resolve(r)}promiseSingleResponse(e){if(this.data.response instanceof bs.RpcError)return Promise.reject(this.data.response);let r;return Array.isArray(this.data.response)?(pE.assert(this.data.response.length>0),r=this.data.response[0]):this.data.response!==void 0?r=this.data.response:r=e.O.create(),pE.assert(e.O.is(r)),Promise.resolve(r)}streamResponses(e,r,i){return XIe(this,void 0,void 0,function*(){let n=[];if(this.data.response===void 0)n.push(e.O.create());else if(Array.isArray(this.data.response))for(let s of this.data.response)pE.assert(e.O.is(s)),n.push(s);else this.data.response instanceof bs.RpcError||(pE.assert(e.O.is(this.data.response)),n.push(this.data.response));try{yield ei(this.responseDelay,i)(void 0)}catch(s){r.notifyError(s);return}if(this.data.response instanceof bs.RpcError){r.notifyError(this.data.response);return}for(let s of n){r.notifyMessage(s);try{yield ei(this.betweenResponseDelay,i)(void 0)}catch(a){r.notifyError(a);return}}if(this.data.status instanceof bs.RpcError){r.notifyError(this.data.status);return}if(this.data.trailers instanceof bs.RpcError){r.notifyError(this.data.trailers);return}r.notifyComplete()})}promiseStatus(){var e;let r=(e=this.data.status)!==null&&e!==void 0?e:t.defaultStatus;return r instanceof bs.RpcError?Promise.reject(r):Promise.resolve(r)}promiseTrailers(){var e;let r=(e=this.data.trailers)!==null&&e!==void 0?e:t.defaultTrailers;return r instanceof bs.RpcError?Promise.reject(r):Promise.resolve(r)}maybeSuppressUncaught(...e){if(this.suppressUncaughtRejections)for(let r of e)r.catch(()=>{})}mergeOptions(e){return ZIe.mergeRpcOptions({},e)}unary(e,r,i){var n;let s=(n=i.meta)!==null&&n!==void 0?n:{},a=this.promiseHeaders().then(ei(this.headerDelay,i.abort)),o=a.catch(d=>{}).then(ei(this.responseDelay,i.abort)).then(d=>this.promiseSingleResponse(e)),l=o.catch(d=>{}).then(ei(this.afterResponseDelay,i.abort)).then(d=>this.promiseStatus()),c=o.catch(d=>{}).then(ei(this.afterResponseDelay,i.abort)).then(d=>this.promiseTrailers());return this.maybeSuppressUncaught(l,c),this.lastInput={single:r},new eBe.UnaryCall(e,s,r,a,o,l,c)}serverStreaming(e,r,i){var n;let s=(n=i.meta)!==null&&n!==void 0?n:{},a=this.promiseHeaders().then(ei(this.headerDelay,i.abort)),o=new XH.RpcOutputStreamController,l=a.then(ei(this.responseDelay,i.abort)).catch(()=>{}).then(()=>this.streamResponses(e,o,i.abort)).then(ei(this.afterResponseDelay,i.abort)),c=l.then(()=>this.promiseStatus()),d=l.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(c,d),this.lastInput={single:r},new tBe.ServerStreamingCall(e,s,r,a,o,c,d)}clientStreaming(e,r){var i;let n=(i=r.meta)!==null&&i!==void 0?i:{},s=this.promiseHeaders().then(ei(this.headerDelay,r.abort)),a=s.catch(c=>{}).then(ei(this.responseDelay,r.abort)).then(c=>this.promiseSingleResponse(e)),o=a.catch(c=>{}).then(ei(this.afterResponseDelay,r.abort)).then(c=>this.promiseStatus()),l=a.catch(c=>{}).then(ei(this.afterResponseDelay,r.abort)).then(c=>this.promiseTrailers());return this.maybeSuppressUncaught(o,l),this.lastInput=new SA(this.data,r.abort),new rBe.ClientStreamingCall(e,n,this.lastInput,s,a,o,l)}duplex(e,r){var i;let n=(i=r.meta)!==null&&i!==void 0?i:{},s=this.promiseHeaders().then(ei(this.headerDelay,r.abort)),a=new XH.RpcOutputStreamController,o=s.then(ei(this.responseDelay,r.abort)).catch(()=>{}).then(()=>this.streamResponses(e,a,r.abort)).then(ei(this.afterResponseDelay,r.abort)),l=o.then(()=>this.promiseStatus()),c=o.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(l,c),this.lastInput=new SA(this.data,r.abort),new iBe.DuplexStreamingCall(e,n,this.lastInput,s,a,l,c)}};vA.TestTransport=_A;_A.defaultHeaders={responseHeader:"test"};_A.defaultStatus={code:"OK",detail:"all good"};_A.defaultTrailers={responseTrailer:"test"};function ei(t,e){return r=>new Promise((i,n)=>{if(e?.aborted)n(new bs.RpcError("user cancel","CANCELLED"));else{let s=setTimeout(()=>i(r),t);e&&e.addEventListener("abort",a=>{clearTimeout(s),n(new bs.RpcError("user cancel","CANCELLED"))})}})}var SA=class{constructor(e,r){this._completed=!1,this._sent=[],this.data=e,this.abort=r}get sent(){return this._sent}get completed(){return this._completed}send(e){if(this.data.inputMessage instanceof bs.RpcError)return Promise.reject(this.data.inputMessage);let r=this.data.inputMessage===void 0?10:this.data.inputMessage;return Promise.resolve(void 0).then(()=>{this._sent.push(e)}).then(ei(r,this.abort))}complete(){if(this.data.inputComplete instanceof bs.RpcError)return Promise.reject(this.data.inputComplete);let e=this.data.inputComplete===void 0?10:this.data.inputComplete;return Promise.resolve(void 0).then(()=>{this._completed=!0}).then(ei(e,this.abort))}}});var eG=A(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.stackDuplexStreamingInterceptors=Is.stackClientStreamingInterceptors=Is.stackServerStreamingInterceptors=Is.stackUnaryInterceptors=Is.stackIntercept=void 0;var nBe=Jt();function Cm(t,e,r,i,n){var s,a,o,l;if(t=="unary"){let c=(d,u,p)=>e.unary(d,u,p);for(let d of((s=i.interceptors)!==null&&s!==void 0?s:[]).filter(u=>u.interceptUnary).reverse()){let u=c;c=(p,f,h)=>d.interceptUnary(u,p,f,h)}return c(r,n,i)}if(t=="serverStreaming"){let c=(d,u,p)=>e.serverStreaming(d,u,p);for(let d of((a=i.interceptors)!==null&&a!==void 0?a:[]).filter(u=>u.interceptServerStreaming).reverse()){let u=c;c=(p,f,h)=>d.interceptServerStreaming(u,p,f,h)}return c(r,n,i)}if(t=="clientStreaming"){let c=(d,u)=>e.clientStreaming(d,u);for(let d of((o=i.interceptors)!==null&&o!==void 0?o:[]).filter(u=>u.interceptClientStreaming).reverse()){let u=c;c=(p,f)=>d.interceptClientStreaming(u,p,f)}return c(r,i)}if(t=="duplex"){let c=(d,u)=>e.duplex(d,u);for(let d of((l=i.interceptors)!==null&&l!==void 0?l:[]).filter(u=>u.interceptDuplex).reverse()){let u=c;c=(p,f)=>d.interceptDuplex(u,p,f)}return c(r,i)}nBe.assertNever(t)}Is.stackIntercept=Cm;function sBe(t,e,r,i){return Cm("unary",t,e,i,r)}Is.stackUnaryInterceptors=sBe;function aBe(t,e,r,i){return Cm("serverStreaming",t,e,i,r)}Is.stackServerStreamingInterceptors=aBe;function oBe(t,e,r){return Cm("clientStreaming",t,e,r)}Is.stackClientStreamingInterceptors=oBe;function lBe(t,e,r){return Cm("duplex",t,e,r)}Is.stackDuplexStreamingInterceptors=lBe});var tG=A(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.ServerCallContextController=void 0;var n5=class{constructor(e,r,i,n,s={code:"OK",detail:""}){this._cancelled=!1,this._listeners=[],this.method=e,this.headers=r,this.deadline=i,this.trailers={},this._sendRH=n,this.status=s}notifyCancelled(){if(!this._cancelled){this._cancelled=!0;for(let e of this._listeners)e()}}sendResponseHeaders(e){this._sendRH(e)}get cancelled(){return this._cancelled}onCancel(e){let r=this._listeners;return r.push(e),()=>{let i=r.indexOf(e);i>=0&&r.splice(i,1)}}};fE.ServerCallContextController=n5});var iG=A(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});var cBe=JH();Object.defineProperty(Cr,"ServiceType",{enumerable:!0,get:function(){return cBe.ServiceType}});var s5=q9();Object.defineProperty(Cr,"readMethodOptions",{enumerable:!0,get:function(){return s5.readMethodOptions}});Object.defineProperty(Cr,"readMethodOption",{enumerable:!0,get:function(){return s5.readMethodOption}});Object.defineProperty(Cr,"readServiceOption",{enumerable:!0,get:function(){return s5.readServiceOption}});var dBe=j9();Object.defineProperty(Cr,"RpcError",{enumerable:!0,get:function(){return dBe.RpcError}});var uBe=z9();Object.defineProperty(Cr,"mergeRpcOptions",{enumerable:!0,get:function(){return uBe.mergeRpcOptions}});var ABe=J9();Object.defineProperty(Cr,"RpcOutputStreamController",{enumerable:!0,get:function(){return ABe.RpcOutputStreamController}});var pBe=ZH();Object.defineProperty(Cr,"TestTransport",{enumerable:!0,get:function(){return pBe.TestTransport}});var rG=Y9();Object.defineProperty(Cr,"Deferred",{enumerable:!0,get:function(){return rG.Deferred}});Object.defineProperty(Cr,"DeferredState",{enumerable:!0,get:function(){return rG.DeferredState}});var fBe=i5();Object.defineProperty(Cr,"DuplexStreamingCall",{enumerable:!0,get:function(){return fBe.DuplexStreamingCall}});var hBe=t5();Object.defineProperty(Cr,"ClientStreamingCall",{enumerable:!0,get:function(){return hBe.ClientStreamingCall}});var mBe=Z9();Object.defineProperty(Cr,"ServerStreamingCall",{enumerable:!0,get:function(){return mBe.ServerStreamingCall}});var gBe=K9();Object.defineProperty(Cr,"UnaryCall",{enumerable:!0,get:function(){return gBe.UnaryCall}});var bm=eG();Object.defineProperty(Cr,"stackIntercept",{enumerable:!0,get:function(){return bm.stackIntercept}});Object.defineProperty(Cr,"stackDuplexStreamingInterceptors",{enumerable:!0,get:function(){return bm.stackDuplexStreamingInterceptors}});Object.defineProperty(Cr,"stackClientStreamingInterceptors",{enumerable:!0,get:function(){return bm.stackClientStreamingInterceptors}});Object.defineProperty(Cr,"stackServerStreamingInterceptors",{enumerable:!0,get:function(){return bm.stackServerStreamingInterceptors}});Object.defineProperty(Cr,"stackUnaryInterceptors",{enumerable:!0,get:function(){return bm.stackUnaryInterceptors}});var yBe=tG();Object.defineProperty(Cr,"ServerCallContextController",{enumerable:!0,get:function(){return yBe.ServerCallContextController}})});var I5=A(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.ArtifactService=Te.DeleteArtifactResponse=Te.DeleteArtifactRequest=Te.GetSignedArtifactURLResponse=Te.GetSignedArtifactURLRequest=Te.ListArtifactsResponse_MonolithArtifact=Te.ListArtifactsResponse=Te.ListArtifactsRequest=Te.FinalizeArtifactResponse=Te.FinalizeArtifactRequest=Te.CreateArtifactResponse=Te.CreateArtifactRequest=Te.FinalizeMigratedArtifactResponse=Te.FinalizeMigratedArtifactRequest=Te.MigrateArtifactResponse=Te.MigrateArtifactRequest=void 0;var EBe=iG(),Ue=Jt(),Bt=Jt(),on=Jt(),ln=Jt(),cn=Jt(),a5=oE(),Do=oE(),Po=R9(),o5=class extends cn.MessageType{constructor(){super("github.actions.results.api.v1.MigrateArtifactRequest",[{no:1,name:"workflow_run_backend_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"expires_at",kind:"message",T:()=>Po.Timestamp}])}create(e){let r={workflowRunBackendId:"",name:""};return globalThis.Object.defineProperty(r,ln.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,on.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,i,n){let s=n??this.create(),a=e.pos+r;for(;e.posPo.Timestamp},{no:5,name:"version",kind:"scalar",T:5}])}create(e){let r={workflowRunBackendId:"",workflowJobRunBackendId:"",name:"",version:0};return globalThis.Object.defineProperty(r,ln.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,on.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,i,n){let s=n??this.create(),a=e.pos+r;for(;e.posDo.StringValue}])}create(e){let r={workflowRunBackendId:"",workflowJobRunBackendId:"",name:"",size:"0"};return globalThis.Object.defineProperty(r,ln.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,on.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,i,n){let s=n??this.create(),a=e.pos+r;for(;e.posDo.StringValue},{no:4,name:"id_filter",kind:"message",T:()=>a5.Int64Value}])}create(e){let r={workflowRunBackendId:"",workflowJobRunBackendId:""};return globalThis.Object.defineProperty(r,ln.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,on.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,i,n){let s=n??this.create(),a=e.pos+r;for(;e.posTe.ListArtifactsResponse_MonolithArtifact}])}create(e){let r={artifacts:[]};return globalThis.Object.defineProperty(r,ln.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,on.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,i,n){let s=n??this.create(),a=e.pos+r;for(;e.posPo.Timestamp},{no:7,name:"digest",kind:"message",T:()=>Do.StringValue}])}create(e){let r={workflowRunBackendId:"",workflowJobRunBackendId:"",databaseId:"0",name:"",size:"0"};return globalThis.Object.defineProperty(r,ln.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,on.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,i,n){let s=n??this.create(),a=e.pos+r;for(;e.pos{"use strict";Object.defineProperty(NA,"__esModule",{value:!0});NA.ArtifactServiceClientProtobuf=NA.ArtifactServiceClientJSON=void 0;var Or=I5(),B5=class{constructor(e){this.rpc=e,this.CreateArtifact.bind(this),this.FinalizeArtifact.bind(this),this.ListArtifacts.bind(this),this.GetSignedArtifactURL.bind(this),this.DeleteArtifact.bind(this)}CreateArtifact(e){let r=Or.CreateArtifactRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","CreateArtifact","application/json",r).then(n=>Or.CreateArtifactResponse.fromJson(n,{ignoreUnknownFields:!0}))}FinalizeArtifact(e){let r=Or.FinalizeArtifactRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","FinalizeArtifact","application/json",r).then(n=>Or.FinalizeArtifactResponse.fromJson(n,{ignoreUnknownFields:!0}))}ListArtifacts(e){let r=Or.ListArtifactsRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","ListArtifacts","application/json",r).then(n=>Or.ListArtifactsResponse.fromJson(n,{ignoreUnknownFields:!0}))}GetSignedArtifactURL(e){let r=Or.GetSignedArtifactURLRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","GetSignedArtifactURL","application/json",r).then(n=>Or.GetSignedArtifactURLResponse.fromJson(n,{ignoreUnknownFields:!0}))}DeleteArtifact(e){let r=Or.DeleteArtifactRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","DeleteArtifact","application/json",r).then(n=>Or.DeleteArtifactResponse.fromJson(n,{ignoreUnknownFields:!0}))}};NA.ArtifactServiceClientJSON=B5;var w5=class{constructor(e){this.rpc=e,this.CreateArtifact.bind(this),this.FinalizeArtifact.bind(this),this.ListArtifacts.bind(this),this.GetSignedArtifactURL.bind(this),this.DeleteArtifact.bind(this)}CreateArtifact(e){let r=Or.CreateArtifactRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","CreateArtifact","application/protobuf",r).then(n=>Or.CreateArtifactResponse.fromBinary(n))}FinalizeArtifact(e){let r=Or.FinalizeArtifactRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","FinalizeArtifact","application/protobuf",r).then(n=>Or.FinalizeArtifactResponse.fromBinary(n))}ListArtifacts(e){let r=Or.ListArtifactsRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","ListArtifacts","application/protobuf",r).then(n=>Or.ListArtifactsResponse.fromBinary(n))}GetSignedArtifactURL(e){let r=Or.GetSignedArtifactURLRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","GetSignedArtifactURL","application/protobuf",r).then(n=>Or.GetSignedArtifactURLResponse.fromBinary(n))}DeleteArtifact(e){let r=Or.DeleteArtifactRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","DeleteArtifact","application/protobuf",r).then(n=>Or.DeleteArtifactResponse.fromBinary(n))}};NA.ArtifactServiceClientProtobuf=w5});var Sl=A(Da=>{"use strict";var CBe=Da&&Da.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),hE=Da&&Da.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&CBe(e,t,r)};Object.defineProperty(Da,"__esModule",{value:!0});hE(R9(),Da);hE(oE(),Da);hE(I5(),Da);hE(nG(),Da)});var sG=A(Pa=>{"use strict";var bBe=Pa&&Pa.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),IBe=Pa&&Pa.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),BBe=Pa&&Pa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&bBe(e,t,r);return IBe(e,t),e};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.getExpiration=void 0;var wBe=Sl(),QBe=BBe(Gr());function SBe(t){if(!t)return;let e=_Be();e&&e{"use strict";Object.defineProperty(xA,"__esModule",{value:!0});xA.validateFilePath=xA.validateArtifactName=void 0;var vBe=Gr(),Q5=new Map([['"',' Double quote "'],[":"," Colon :"],["<"," Less than <"],[">"," Greater than >"],["|"," Vertical bar |"],["*"," Asterisk *"],["?"," Question mark ?"],["\r"," Carriage return \\r"],[`
-`," Line feed \\n"]]),aG=new Map([...Q5,["\\"," Backslash \\"],["/"," Forward slash /"]]);function NBe(t){if(!t)throw new Error("Provided artifact name input during validation is empty");for(let[e,r]of aG)if(t.includes(e))throw new Error(`The artifact name is not valid: ${t}. Contains the following character: ${r}
+ Error Message: ${o.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(e){return pY(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);r=`${r}&audience=${i}`}(0,gY.debug)(`ID token url is ${r}`);let n=yield t.getCall(r);return(0,gY.setSecret)(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};bu.OidcClient=yR});var BR=f(Ai=>{"use strict";var ER=Ai&&Ai.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.summary=Ai.markdownSummary=Ai.SUMMARY_DOCS_URL=Ai.SUMMARY_ENV_VAR=void 0;var iIe=require("os"),CR=require("fs"),{access:sIe,appendFile:oIe,writeFile:aIe}=CR.promises;Ai.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Ai.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 ER(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Ai.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${Ai.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield sIe(e,CR.constants.R_OK|CR.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,r,n={}){let i=Object.entries(n).map(([s,o])=>` ${s}="${o}"`).join("");return r?`<${e}${i}>${r}${e}>`:`<${e}${i}>`}write(e){return ER(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?aIe:oIe)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return ER(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,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(iIe.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(i).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",i=e.map(o=>this.wrap("li",o)).join(""),s=this.wrap(n,i);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(i=>{let s=i.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:a,data:c,colspan:l,rowspan:A}=o,u=a?"th":"td",d=Object.assign(Object.assign({},l&&{colspan:l}),A&&{rowspan:A});return this.wrap(u,c,d)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:i,height:s}=n||{},o=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),a=this.wrap("img",null,Object.assign({src:e,alt:r},o));return this.addRaw(a).addEOL()}addHeading(e,r){let n=`h${r}`,i=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"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,r){let n=Object.assign({},r&&{cite:r}),i=this.wrap("blockquote",e,n);return this.addRaw(i).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},yY=new IR;Ai.markdownSummary=yY;Ai.summary=yY});var EY=f(ui=>{"use strict";var cIe=ui&&ui.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lIe=ui&&ui.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),AIe=ui&&ui.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&cIe(e,t,r);return lIe(e,t),e};Object.defineProperty(ui,"__esModule",{value:!0});ui.toPlatformPath=ui.toWin32Path=ui.toPosixPath=void 0;var uIe=AIe(require("path"));function dIe(t){return t.replace(/[\\]/g,"/")}ui.toPosixPath=dIe;function fIe(t){return t.replace(/[/]/g,"\\")}ui.toWin32Path=fIe;function hIe(t){return t.replace(/[/\\]/g,uIe.sep)}ui.toPlatformPath=hIe});var wR=f(me=>{"use strict";var pIe=me&&me.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),gIe=me&&me.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),IY=me&&me.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&pIe(e,t,r);return gIe(e,t),e},bR=me&&me.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},di;Object.defineProperty(me,"__esModule",{value:!0});me.getCmdPath=me.tryGetExecutablePath=me.isRooted=me.isDirectory=me.exists=me.READONLY=me.UV_FS_O_EXLOCK=me.IS_WINDOWS=me.unlink=me.symlink=me.stat=me.rmdir=me.rm=me.rename=me.readlink=me.readdir=me.open=me.mkdir=me.lstat=me.copyFile=me.chmod=void 0;var BY=IY(require("fs")),pC=IY(require("path"));di=BY.promises,me.chmod=di.chmod,me.copyFile=di.copyFile,me.lstat=di.lstat,me.mkdir=di.mkdir,me.open=di.open,me.readdir=di.readdir,me.readlink=di.readlink,me.rename=di.rename,me.rm=di.rm,me.rmdir=di.rmdir,me.stat=di.stat,me.symlink=di.symlink,me.unlink=di.unlink;me.IS_WINDOWS=process.platform==="win32";me.UV_FS_O_EXLOCK=268435456;me.READONLY=BY.constants.O_RDONLY;function mIe(t){return bR(this,void 0,void 0,function*(){try{yield me.stat(t)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}me.exists=mIe;function yIe(t,e=!1){return bR(this,void 0,void 0,function*(){return(e?yield me.stat(t):yield me.lstat(t)).isDirectory()})}me.isDirectory=yIe;function EIe(t){if(t=IIe(t),!t)throw new Error('isRooted() parameter "p" cannot be empty');return me.IS_WINDOWS?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}me.isRooted=EIe;function CIe(t,e){return bR(this,void 0,void 0,function*(){let r;try{r=yield me.stat(t)}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${i}`)}if(r&&r.isFile()){if(me.IS_WINDOWS){let i=pC.extname(t).toUpperCase();if(e.some(s=>s.toUpperCase()===i))return t}else if(CY(r))return t}let n=t;for(let i of e){t=n+i,r=void 0;try{r=yield me.stat(t)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${s}`)}if(r&&r.isFile()){if(me.IS_WINDOWS){try{let s=pC.dirname(t),o=pC.basename(t).toUpperCase();for(let a of yield me.readdir(s))if(o===a.toUpperCase()){t=pC.join(s,a);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${s}`)}return t}else if(CY(r))return t}}return""})}me.tryGetExecutablePath=CIe;function IIe(t){return t=t||"",me.IS_WINDOWS?(t=t.replace(/\//g,"\\"),t.replace(/\\\\+/g,"\\")):t.replace(/\/\/+/g,"/")}function CY(t){return(t.mode&1)>0||(t.mode&8)>0&&t.gid===process.getgid()||(t.mode&64)>0&&t.uid===process.getuid()}function BIe(){var t;return(t=process.env.COMSPEC)!==null&&t!==void 0?t:"cmd.exe"}me.getCmdPath=BIe});var _R=f(pr=>{"use strict";var bIe=pr&&pr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wIe=pr&&pr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bY=pr&&pr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&bIe(e,t,r);return wIe(e,t),e},za=pr&&pr.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(pr,"__esModule",{value:!0});pr.findInPath=pr.which=pr.mkdirP=pr.rmRF=pr.mv=pr.cp=void 0;var QIe=require("assert"),io=bY(require("path")),Ct=bY(wR());function _Ie(t,e,r={}){return za(this,void 0,void 0,function*(){let{force:n,recursive:i,copySourceDirectory:s}=NIe(r),o=(yield Ct.exists(e))?yield Ct.stat(e):null;if(o&&o.isFile()&&!n)return;let a=o&&o.isDirectory()&&s?io.join(e,io.basename(t)):e;if(!(yield Ct.exists(t)))throw new Error(`no such file or directory: ${t}`);if((yield Ct.stat(t)).isDirectory())if(i)yield SY(t,a,0,n);else throw new Error(`Failed to copy. ${t} is a directory, but tried to copy without recursive flag.`);else{if(io.relative(t,a)==="")throw new Error(`'${a}' and '${t}' are the same file`);yield NY(t,a,n)}})}pr.cp=_Ie;function SIe(t,e,r={}){return za(this,void 0,void 0,function*(){if(yield Ct.exists(e)){let n=!0;if((yield Ct.isDirectory(e))&&(e=io.join(e,io.basename(t)),n=yield Ct.exists(e)),n)if(r.force==null||r.force)yield wY(e);else throw new Error("Destination already exists")}yield QR(io.dirname(e)),yield Ct.rename(t,e)})}pr.mv=SIe;function wY(t){return za(this,void 0,void 0,function*(){if(Ct.IS_WINDOWS&&/[*"<>|]/.test(t))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield Ct.rm(t,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}})}pr.rmRF=wY;function QR(t){return za(this,void 0,void 0,function*(){QIe.ok(t,"a path argument must be provided"),yield Ct.mkdir(t,{recursive:!0})})}pr.mkdirP=QR;function QY(t,e){return za(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");if(e){let n=yield QY(t,!1);if(!n)throw Ct.IS_WINDOWS?new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return n}let r=yield _Y(t);return r&&r.length>0?r[0]:""})}pr.which=QY;function _Y(t){return za(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");let e=[];if(Ct.IS_WINDOWS&&process.env.PATHEXT)for(let i of process.env.PATHEXT.split(io.delimiter))i&&e.push(i);if(Ct.isRooted(t)){let i=yield Ct.tryGetExecutablePath(t,e);return i?[i]:[]}if(t.includes(io.sep))return[];let r=[];if(process.env.PATH)for(let i of process.env.PATH.split(io.delimiter))i&&r.push(i);let n=[];for(let i of r){let s=yield Ct.tryGetExecutablePath(io.join(i,t),e);s&&n.push(s)}return n})}pr.findInPath=_Y;function NIe(t){let e=t.force==null?!0:t.force,r=!!t.recursive,n=t.copySourceDirectory==null?!0:!!t.copySourceDirectory;return{force:e,recursive:r,copySourceDirectory:n}}function SY(t,e,r,n){return za(this,void 0,void 0,function*(){if(r>=255)return;r++,yield QR(e);let i=yield Ct.readdir(t);for(let s of i){let o=`${t}/${s}`,a=`${e}/${s}`;(yield Ct.lstat(o)).isDirectory()?yield SY(o,a,r,n):yield NY(o,a,n)}yield Ct.chmod(e,(yield Ct.stat(t)).mode)})}function NY(t,e,r){return za(this,void 0,void 0,function*(){if((yield Ct.lstat(t)).isSymbolicLink()){try{yield Ct.lstat(e),yield Ct.unlink(e)}catch(i){i.code==="EPERM"&&(yield Ct.chmod(e,"0666"),yield Ct.unlink(e))}let n=yield Ct.readlink(t);yield Ct.symlink(n,e,Ct.IS_WINDOWS?"junction":null)}else(!(yield Ct.exists(e))||r)&&(yield Ct.copyFile(t,e))})}});var TY=f(fi=>{"use strict";var RIe=fi&&fi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xIe=fi&&fi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wu=fi&&fi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&RIe(e,t,r);return xIe(e,t),e},RY=fi&&fi.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(fi,"__esModule",{value:!0});fi.argStringToArray=fi.ToolRunner=void 0;var gC=wu(require("os")),vY=wu(require("events")),vIe=wu(require("child_process")),TIe=wu(require("path")),PIe=wu(_R()),xY=wu(wR()),DIe=require("timers"),mC=process.platform==="win32",SR=class extends vY.EventEmitter{constructor(e,r,n){if(super(),!e)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=r||[],this.options=n||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,r){let n=this._getSpawnFileName(),i=this._getSpawnArgs(e),s=r?"":"[command]";if(mC)if(this._isCmdFile()){s+=n;for(let o of i)s+=` ${o}`}else if(e.windowsVerbatimArguments){s+=`"${n}"`;for(let o of i)s+=` ${o}`}else{s+=this._windowsQuoteCmdArg(n);for(let o of i)s+=` ${this._windowsQuoteCmdArg(o)}`}else{s+=n;for(let o of i)s+=` ${o}`}return s}_processLineBuffer(e,r,n){try{let i=r+e.toString(),s=i.indexOf(gC.EOL);for(;s>-1;){let o=i.substring(0,s);n(o),i=i.substring(s+gC.EOL.length),s=i.indexOf(gC.EOL)}return i}catch(i){return this._debug(`error processing line. Failed with error ${i}`),""}}_getSpawnFileName(){return mC&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(mC&&this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let n of this.args)r+=" ",r+=e.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n);return r+='"',[r]}return this.args}_endsWith(e,r){return e.endsWith(r)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';let r=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],n=!1;for(let o of e)if(r.some(a=>a===o)){n=!0;break}if(!n)return e;let i='"',s=!0;for(let o=e.length;o>0;o--)i+=e[o-1],s&&e[o-1]==="\\"?i+="\\":e[o-1]==='"'?(s=!0,i+='"'):s=!1;return i+='"',i.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes(" ")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let r='"',n=!0;for(let i=e.length;i>0;i--)r+=e[i-1],n&&e[i-1]==="\\"?r+="\\":e[i-1]==='"'?(n=!0,r+="\\"):n=!1;return r+='"',r.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};let r={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return r.outStream=e.outStream||process.stdout,r.errStream=e.errStream||process.stderr,r}_getSpawnOptions(e,r){e=e||{};let n={};return n.cwd=e.cwd,n.env=e.env,n.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(n.argv0=`"${r}"`),n}exec(){return RY(this,void 0,void 0,function*(){return!xY.isRooted(this.toolPath)&&(this.toolPath.includes("/")||mC&&this.toolPath.includes("\\"))&&(this.toolPath=TIe.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield PIe.which(this.toolPath,!0),new Promise((e,r)=>RY(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let l of this.args)this._debug(` ${l}`);let n=this._cloneExecOptions(this.options);!n.silent&&n.outStream&&n.outStream.write(this._getCommandString(n)+gC.EOL);let i=new NR(n,this.toolPath);if(i.on("debug",l=>{this._debug(l)}),this.options.cwd&&!(yield xY.exists(this.options.cwd)))return r(new Error(`The cwd: ${this.options.cwd} does not exist!`));let s=this._getSpawnFileName(),o=vIe.spawn(s,this._getSpawnArgs(n),this._getSpawnOptions(this.options,s)),a="";o.stdout&&o.stdout.on("data",l=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(l),!n.silent&&n.outStream&&n.outStream.write(l),a=this._processLineBuffer(l,a,A=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(A)})});let c="";if(o.stderr&&o.stderr.on("data",l=>{i.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(l),!n.silent&&n.errStream&&n.outStream&&(n.failOnStdErr?n.errStream:n.outStream).write(l),c=this._processLineBuffer(l,c,A=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(A)})}),o.on("error",l=>{i.processError=l.message,i.processExited=!0,i.processClosed=!0,i.CheckComplete()}),o.on("exit",l=>{i.processExitCode=l,i.processExited=!0,this._debug(`Exit code ${l} received from tool '${this.toolPath}'`),i.CheckComplete()}),o.on("close",l=>{i.processExitCode=l,i.processExited=!0,i.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),i.CheckComplete()}),i.on("done",(l,A)=>{a.length>0&&this.emit("stdline",a),c.length>0&&this.emit("errline",c),o.removeAllListeners(),l?r(l):e(A)}),this.options.input){if(!o.stdin)throw new Error("child process missing stdin");o.stdin.end(this.options.input)}}))})}};fi.ToolRunner=SR;function kIe(t){let e=[],r=!1,n=!1,i="";function s(o){n&&o!=='"'&&(i+="\\"),i+=o,n=!1}for(let o=0;o0&&(e.push(i),i="");continue}s(a)}return i.length>0&&e.push(i.trim()),e}fi.argStringToArray=kIe;var NR=class t extends vY.EventEmitter{constructor(e,r){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!r)throw new Error("toolPath must not be empty");this.options=e,this.toolPath=r,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=DIe.setTimeout(t.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let r=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(r)}e._setResult()}}}});var RR=f(hi=>{"use strict";var OIe=hi&&hi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),LIe=hi&&hi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),MIe=hi&&hi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&OIe(e,t,r);return LIe(e,t),e},kY=hi&&hi.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(hi,"__esModule",{value:!0});hi.getExecOutput=hi.exec=void 0;var PY=require("string_decoder"),DY=MIe(TY());function OY(t,e,r){return kY(this,void 0,void 0,function*(){let n=DY.argStringToArray(t);if(n.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let i=n[0];return e=n.slice(1).concat(e||[]),new DY.ToolRunner(i,e,r).exec()})}hi.exec=OY;function FIe(t,e,r){var n,i;return kY(this,void 0,void 0,function*(){let s="",o="",a=new PY.StringDecoder("utf8"),c=new PY.StringDecoder("utf8"),l=(n=r?.listeners)===null||n===void 0?void 0:n.stdout,A=(i=r?.listeners)===null||i===void 0?void 0:i.stderr,u=E=>{o+=c.write(E),A&&A(E)},d=E=>{s+=a.write(E),l&&l(E)},h=Object.assign(Object.assign({},r?.listeners),{stdout:d,stderr:u}),g=yield OY(t,e,Object.assign(Object.assign({},r),{listeners:h}));return s+=a.end(),o+=c.end(),{exitCode:g,stdout:s,stderr:o}})}hi.getExecOutput=FIe});var MY=f(At=>{"use strict";var UIe=At&&At.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qIe=At&&At.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),HIe=At&&At.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&UIe(e,t,r);return qIe(e,t),e},EC=At&&At.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},GIe=At&&At.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(At,"__esModule",{value:!0});At.getDetails=At.isLinux=At.isMacOS=At.isWindows=At.arch=At.platform=void 0;var LY=GIe(require("os")),yC=HIe(RR()),jIe=()=>EC(void 0,void 0,void 0,function*(){let{stdout:t}=yield yC.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:e}=yield yC.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:e.trim(),version:t.trim()}}),zIe=()=>EC(void 0,void 0,void 0,function*(){var t,e,r,n;let{stdout:i}=yield yC.getExecOutput("sw_vers",void 0,{silent:!0}),s=(e=(t=i.match(/ProductVersion:\s*(.+)/))===null||t===void 0?void 0:t[1])!==null&&e!==void 0?e:"";return{name:(n=(r=i.match(/ProductName:\s*(.+)/))===null||r===void 0?void 0:r[1])!==null&&n!==void 0?n:"",version:s}}),YIe=()=>EC(void 0,void 0,void 0,function*(){let{stdout:t}=yield yC.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[e,r]=t.trim().split(`
+`);return{name:e,version:r}});At.platform=LY.default.platform();At.arch=LY.default.arch();At.isWindows=At.platform==="win32";At.isMacOS=At.platform==="darwin";At.isLinux=At.platform==="linux";function WIe(){return EC(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield At.isWindows?jIe():At.isMacOS?zIe():YIe()),{platform:At.platform,arch:At.arch,isWindows:At.isWindows,isMacOS:At.isMacOS,isLinux:At.isLinux})})}At.getDetails=WIe});var Lr=f(he=>{"use strict";var JIe=he&&he.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),VIe=he&&he.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vR=he&&he.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&JIe(e,t,r);return VIe(e,t),e},FY=he&&he.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(he,"__esModule",{value:!0});he.platform=he.toPlatformPath=he.toWin32Path=he.toPosixPath=he.markdownSummary=he.summary=he.getIDToken=he.getState=he.saveState=he.group=he.endGroup=he.startGroup=he.info=he.notice=he.warning=he.error=he.debug=he.isDebug=he.setFailed=he.setCommandEcho=he.setOutput=he.getBooleanInput=he.getMultilineInput=he.getInput=he.addPath=he.setSecret=he.exportVariable=he.ExitCode=void 0;var ns=EU(),Ql=BU(),Qu=Iy(),UY=vR(require("os")),$Ie=vR(require("path")),KIe=mY(),xR;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(xR||(he.ExitCode=xR={}));function XIe(t,e){let r=(0,Qu.toCommandValue)(e);if(process.env[t]=r,process.env.GITHUB_ENV||"")return(0,Ql.issueFileCommand)("ENV",(0,Ql.prepareKeyValueMessage)(t,e));(0,ns.issueCommand)("set-env",{name:t},r)}he.exportVariable=XIe;function ZIe(t){(0,ns.issueCommand)("add-mask",{},t)}he.setSecret=ZIe;function eBe(t){process.env.GITHUB_PATH||""?(0,Ql.issueFileCommand)("PATH",t):(0,ns.issueCommand)("add-path",{},t),process.env.PATH=`${t}${$Ie.delimiter}${process.env.PATH}`}he.addPath=eBe;function TR(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}he.getInput=TR;function tBe(t,e){let r=TR(t,e).split(`
+`).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}he.getMultilineInput=tBe;function rBe(t,e){let r=["true","True","TRUE"],n=["false","False","FALSE"],i=TR(t,e);if(r.includes(i))return!0;if(n.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
+Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}he.getBooleanInput=rBe;function nBe(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,Ql.issueFileCommand)("OUTPUT",(0,Ql.prepareKeyValueMessage)(t,e));process.stdout.write(UY.EOL),(0,ns.issueCommand)("set-output",{name:t},(0,Qu.toCommandValue)(e))}he.setOutput=nBe;function iBe(t){(0,ns.issue)("echo",t?"on":"off")}he.setCommandEcho=iBe;function sBe(t){process.exitCode=xR.Failure,qY(t)}he.setFailed=sBe;function oBe(){return process.env.RUNNER_DEBUG==="1"}he.isDebug=oBe;function aBe(t){(0,ns.issueCommand)("debug",{},t)}he.debug=aBe;function qY(t,e={}){(0,ns.issueCommand)("error",(0,Qu.toCommandProperties)(e),t instanceof Error?t.toString():t)}he.error=qY;function cBe(t,e={}){(0,ns.issueCommand)("warning",(0,Qu.toCommandProperties)(e),t instanceof Error?t.toString():t)}he.warning=cBe;function lBe(t,e={}){(0,ns.issueCommand)("notice",(0,Qu.toCommandProperties)(e),t instanceof Error?t.toString():t)}he.notice=lBe;function ABe(t){process.stdout.write(t+UY.EOL)}he.info=ABe;function HY(t){(0,ns.issue)("group",t)}he.startGroup=HY;function GY(){(0,ns.issue)("endgroup")}he.endGroup=GY;function uBe(t,e){return FY(this,void 0,void 0,function*(){HY(t);let r;try{r=yield e()}finally{GY()}return r})}he.group=uBe;function dBe(t,e){if(process.env.GITHUB_STATE||"")return(0,Ql.issueFileCommand)("STATE",(0,Ql.prepareKeyValueMessage)(t,e));(0,ns.issueCommand)("save-state",{name:t},(0,Qu.toCommandValue)(e))}he.saveState=dBe;function fBe(t){return process.env[`STATE_${t}`]||""}he.getState=fBe;function hBe(t){return FY(this,void 0,void 0,function*(){return yield KIe.OidcClient.getIDToken(t)})}he.getIDToken=hBe;var pBe=BR();Object.defineProperty(he,"summary",{enumerable:!0,get:function(){return pBe.summary}});var gBe=BR();Object.defineProperty(he,"markdownSummary",{enumerable:!0,get:function(){return gBe.markdownSummary}});var PR=EY();Object.defineProperty(he,"toPosixPath",{enumerable:!0,get:function(){return PR.toPosixPath}});Object.defineProperty(he,"toWin32Path",{enumerable:!0,get:function(){return PR.toWin32Path}});Object.defineProperty(he,"toPlatformPath",{enumerable:!0,get:function(){return PR.toPlatformPath}});he.platform=vR(MY())});var Ya=f(is=>{"use strict";var mBe=is&&is.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(is,"__esModule",{value:!0});is.getUploadChunkSize=EBe;is.getRuntimeToken=CBe;is.getResultsServiceUrl=IBe;is.isGhes=BBe;is.getGitHubWorkspaceDir=bBe;is.getConcurrency=wBe;is.getUploadChunkTimeout=QBe;is.getMaxArtifactListCount=_Be;var yBe=mBe(require("os")),jY=Lr();function EBe(){return 8*1024*1024}function CBe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}function IBe(){let t=process.env.ACTIONS_RESULTS_URL;if(!t)throw new Error("Unable to get the ACTIONS_RESULTS_URL env variable");return new URL(t).origin}function BBe(){let e=new URL(process.env.GITHUB_SERVER_URL||"https://github.com").hostname.trimEnd().toUpperCase(),r=e==="GITHUB.COM",n=e.endsWith(".GHE.COM"),i=e.endsWith(".LOCALHOST");return!r&&!n&&!i}function bBe(){let t=process.env.GITHUB_WORKSPACE;if(!t)throw new Error("Unable to get the GITHUB_WORKSPACE env variable");return t}function wBe(){let t=yBe.default.cpus().length,e=32;if(t>4){let n=16*t;e=n>300?300:n}let r=process.env.ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY;if(r){let n=parseInt(r);if(isNaN(n)||n<1)throw new Error("Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable");return n{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.isJsonObject=_u.typeofJsonValue=void 0;function SBe(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}_u.typeofJsonValue=SBe;function NBe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}_u.isJsonObject=NBe});var BC=f(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.base64encode=Su.base64decode=void 0;var ea="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),IC=[];for(let t=0;t>4,o=s,i=2;break;case 2:r[n++]=(o&15)<<4|(s&60)>>2,o=s,i=3;break;case 3:r[n++]=(o&3)<<6|s,i=0;break}}if(i==1)throw Error("invalid base64 string.");return r.subarray(0,n)}Su.base64decode=RBe;function xBe(t){let e="",r=0,n,i=0;for(let s=0;s>2],i=(n&3)<<4,r=1;break;case 1:e+=ea[i|n>>4],i=(n&15)<<2,r=2;break;case 2:e+=ea[i|n>>6],e+=ea[n&63],r=0;break}return r&&(e+=ea[i],e+="=",r==1&&(e+="=")),e}Su.base64encode=xBe});var zY=f(bC=>{"use strict";Object.defineProperty(bC,"__esModule",{value:!0});bC.utf8read=void 0;var DR=t=>String.fromCharCode.apply(String,t);function vBe(t){if(t.length<1)return"";let e=0,r=[],n=[],i=0,s,o=t.length;for(;e191&&s<224?n[i++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[i++]=55296+(s>>10),n[i++]=56320+(s&1023)):n[i++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(r.push(DR(n)),i=0);return r.length?(i&&r.push(DR(n.slice(0,i))),r.join("")):DR(n.slice(0,i))}bC.utf8read=vBe});var cp=f(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.WireType=so.mergeBinaryOptions=so.UnknownFieldHandler=void 0;var TBe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,i,s,o)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:i,wireType:s,data:o})},t.onWrite=(r,n,i)=>{for(let{no:s,wireType:o,data:a}of t.list(n))i.tag(s,o).raw(a)},t.list=(r,n)=>{if(e(r)){let i=r[t.symbol];return n?i.filter(s=>s.no==n):i}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(TBe=so.UnknownFieldHandler||(so.UnknownFieldHandler={}));function PBe(t,e){return Object.assign(Object.assign({},t),e)}so.mergeBinaryOptions=PBe;var DBe;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(DBe=so.WireType||(so.WireType={}))});var QC=f(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.varint32read=pi.varint32write=pi.int64toString=pi.int64fromString=pi.varint64write=pi.varint64read=void 0;function kBe(){let t=0,e=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>>s,a=!(!(o>>>7)&&e==0),c=(a?o|128:o)&255;if(r.push(c),!a)return}let n=t>>>28&15|(e&7)<<4,i=e>>3!=0;if(r.push((i?n|128:n)&255),!!i){for(let s=3;s<31;s=s+7){let o=e>>>s,a=!!(o>>>7),c=(a?o|128:o)&255;if(r.push(c),!a)return}r.push(e>>>31&1)}}pi.varint64write=OBe;var wC=65536*65536;function LBe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,i=0;function s(o,a){let c=Number(t.slice(o,a));i*=r,n=n*r+c,n>=wC&&(i=i+(n/wC|0),n=n%wC)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,i]}pi.int64fromString=LBe;function MBe(t,e){if(e>>>0<=2097151)return""+(wC*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,s=r+n*6777216+i*6710656,o=n+i*8147497,a=i*2,c=1e7;s>=c&&(o+=Math.floor(s/c),s%=c),o>=c&&(a+=Math.floor(o/c),o%=c);function l(A,u){let d=A?String(A):"";return u?"0000000".slice(d.length)+d:d}return l(a,0)+l(o,a)+l(s,1)}pi.int64toString=MBe;function FBe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}pi.varint32write=FBe;function UBe(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}pi.varint32read=UBe});var Ja=f(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.PbLong=Wa.PbULong=Wa.detectBi=void 0;var lp=QC(),Pt;function YY(){let t=new DataView(new ArrayBuffer(8));Pt=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}Wa.detectBi=YY;YY();function WY(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var JY=/^-?[0-9]+$/,SC=4294967296,_C=2147483648,NC=class{constructor(e,r){this.lo=e|0,this.hi=r|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let e=this.hi*SC+(this.lo>>>0);if(!Number.isSafeInteger(e))throw new Error("cannot convert to safe number");return e}},Ap=class t extends NC{static from(e){if(Pt)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=Pt.C(e);case"number":if(e===0)return this.ZERO;e=Pt.C(e);case"bigint":if(!e)return this.ZERO;if(ePt.UMAX)throw new Error("ulong too large");return Pt.V.setBigUint64(0,e,!0),new t(Pt.V.getInt32(0,!0),Pt.V.getInt32(4,!0))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=e.trim(),!JY.test(e))throw new Error("string is no integer");let[r,n,i]=lp.int64fromString(e);if(r)throw new Error("signed value for ulong");return new t(n,i);case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");if(e<0)throw new Error("signed value for ulong");return new t(e,e/SC)}throw new Error("unknown value "+typeof e)}toString(){return Pt?this.toBigInt().toString():lp.int64toString(this.lo,this.hi)}toBigInt(){return WY(Pt),Pt.V.setInt32(0,this.lo,!0),Pt.V.setInt32(4,this.hi,!0),Pt.V.getBigUint64(0,!0)}};Wa.PbULong=Ap;Ap.ZERO=new Ap(0,0);var up=class t extends NC{static from(e){if(Pt)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=Pt.C(e);case"number":if(e===0)return this.ZERO;e=Pt.C(e);case"bigint":if(!e)return this.ZERO;if(ePt.MAX)throw new Error("signed long too large");return Pt.V.setBigInt64(0,e,!0),new t(Pt.V.getInt32(0,!0),Pt.V.getInt32(4,!0))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=e.trim(),!JY.test(e))throw new Error("string is no integer");let[r,n,i]=lp.int64fromString(e);if(r){if(i>_C||i==_C&&n!=0)throw new Error("signed long too small")}else if(i>=_C)throw new Error("signed long too large");let s=new t(n,i);return r?s.negate():s;case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");return e>0?new t(e,e/SC):new t(-e,-e/SC).negate()}throw new Error("unknown value "+typeof e)}isNegative(){return(this.hi&_C)!==0}negate(){let e=~this.hi,r=this.lo;return r?r=~r+1:e+=1,new t(r,e)}toString(){if(Pt)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return"-"+lp.int64toString(e.lo,e.hi)}return lp.int64toString(this.lo,this.hi)}toBigInt(){return WY(Pt),Pt.V.setInt32(0,this.lo,!0),Pt.V.setInt32(4,this.hi,!0),Pt.V.getBigInt64(0,!0)}};Wa.PbLong=up;up.ZERO=new up(0,0)});var kR=f(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.BinaryReader=Ru.binaryReadOptions=void 0;var Nu=cp(),dp=Ja(),VY=QC(),$Y={readUnknownField:!0,readerFactory:t=>new RC(t)};function qBe(t){return t?Object.assign(Object.assign({},$Y),t):$Y}Ru.binaryReadOptions=qBe;var RC=class{constructor(e,r){this.varint64=VY.varint64read,this.uint32=VY.varint32read,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=r??new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}tag(){let e=this.uint32(),r=e>>>3,n=e&7;if(r<=0||n<0||n>5)throw new Error("illegal tag: field no "+r+" wire type "+n);return[r,n]}skip(e){let r=this.pos;switch(e){case Nu.WireType.Varint:for(;this.buf[this.pos++]&128;);break;case Nu.WireType.Bit64:this.pos+=4;case Nu.WireType.Bit32:this.pos+=4;break;case Nu.WireType.LengthDelimited:let n=this.uint32();this.pos+=n;break;case Nu.WireType.StartGroup:let i;for(;(i=this.tag()[1])!==Nu.WireType.EndGroup;)this.skip(i);break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return new dp.PbLong(...this.varint64())}uint64(){return new dp.PbULong(...this.varint64())}sint64(){let[e,r]=this.varint64(),n=-(e&1);return e=(e>>>1|(r&1)<<31)^n,r=r>>>1^n,new dp.PbLong(e,r)}bool(){let[e,r]=this.varint64();return e!==0||r!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return new dp.PbULong(this.sfixed32(),this.sfixed32())}sfixed64(){return new dp.PbLong(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),r=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(r,r+e)}string(){return this.textDecoder.decode(this.bytes())}};Ru.BinaryReader=RC});var xu=f(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.assertFloat32=ss.assertUInt32=ss.assertInt32=ss.assertNever=ss.assert=void 0;function HBe(t,e){if(!t)throw new Error(e)}ss.assert=HBe;function GBe(t,e){throw new Error(e??"Unexpected object: "+t)}ss.assertNever=GBe;var jBe=34028234663852886e22,zBe=-34028234663852886e22,YBe=4294967295,WBe=2147483647,JBe=-2147483648;function VBe(t){if(typeof t!="number")throw new Error("invalid int 32: "+typeof t);if(!Number.isInteger(t)||t>WBe||tYBe||t<0)throw new Error("invalid uint 32: "+t)}ss.assertUInt32=$Be;function KBe(t){if(typeof t!="number")throw new Error("invalid float 32: "+typeof t);if(Number.isFinite(t)&&(t>jBe||t{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.BinaryWriter=Tu.binaryWriteOptions=void 0;var fp=Ja(),hp=QC(),vu=xu(),KY={writeUnknownFields:!0,writerFactory:()=>new xC};function XBe(t){return t?Object.assign(Object.assign({},KY),t):KY}Tu.binaryWriteOptions=XBe;var xC=class{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let i=0;i>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(vu.assertUInt32(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return vu.assertInt32(e),hp.varint32write(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let r=this.textEncoder.encode(e);return this.uint32(r.byteLength),this.raw(r)}float(e){vu.assertFloat32(e);let r=new Uint8Array(4);return new DataView(r.buffer).setFloat32(0,e,!0),this.raw(r)}double(e){let r=new Uint8Array(8);return new DataView(r.buffer).setFloat64(0,e,!0),this.raw(r)}fixed32(e){vu.assertUInt32(e);let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,e,!0),this.raw(r)}sfixed32(e){vu.assertInt32(e);let r=new Uint8Array(4);return new DataView(r.buffer).setInt32(0,e,!0),this.raw(r)}sint32(e){return vu.assertInt32(e),e=(e<<1^e>>31)>>>0,hp.varint32write(e,this.buf),this}sfixed64(e){let r=new Uint8Array(8),n=new DataView(r.buffer),i=fp.PbLong.from(e);return n.setInt32(0,i.lo,!0),n.setInt32(4,i.hi,!0),this.raw(r)}fixed64(e){let r=new Uint8Array(8),n=new DataView(r.buffer),i=fp.PbULong.from(e);return n.setInt32(0,i.lo,!0),n.setInt32(4,i.hi,!0),this.raw(r)}int64(e){let r=fp.PbLong.from(e);return hp.varint64write(r.lo,r.hi,this.buf),this}sint64(e){let r=fp.PbLong.from(e),n=r.hi>>31,i=r.lo<<1^n,s=(r.hi<<1|r.lo>>>31)^n;return hp.varint64write(i,s,this.buf),this}uint64(e){let r=fp.PbULong.from(e);return hp.varint64write(r.lo,r.hi,this.buf),this}};Tu.BinaryWriter=xC});var LR=f(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.mergeJsonOptions=Va.jsonWriteOptions=Va.jsonReadOptions=void 0;var XY={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},ZY={ignoreUnknownFields:!1};function ZBe(t){return t?Object.assign(Object.assign({},ZY),t):ZY}Va.jsonReadOptions=ZBe;function ebe(t){return t?Object.assign(Object.assign({},XY),t):XY}Va.jsonWriteOptions=ebe;function tbe(t,e){var r,n;let i=Object.assign(Object.assign({},t),e);return i.typeRegistry=[...(r=t?.typeRegistry)!==null&&r!==void 0?r:[],...(n=e?.typeRegistry)!==null&&n!==void 0?n:[]],i}Va.mergeJsonOptions=tbe});var pp=f(vC=>{"use strict";Object.defineProperty(vC,"__esModule",{value:!0});vC.MESSAGE_TYPE=void 0;vC.MESSAGE_TYPE=Symbol.for("protobuf-ts/message-type")});var MR=f(TC=>{"use strict";Object.defineProperty(TC,"__esModule",{value:!0});TC.lowerCamelCase=void 0;function rbe(t){let e=!1,r=[];for(let n=0;n{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.readMessageOption=Mr.readFieldOption=Mr.readFieldOptions=Mr.normalizeFieldInfo=Mr.RepeatType=Mr.LongType=Mr.ScalarType=void 0;var eW=MR(),nbe;(function(t){t[t.DOUBLE=1]="DOUBLE",t[t.FLOAT=2]="FLOAT",t[t.INT64=3]="INT64",t[t.UINT64=4]="UINT64",t[t.INT32=5]="INT32",t[t.FIXED64=6]="FIXED64",t[t.FIXED32=7]="FIXED32",t[t.BOOL=8]="BOOL",t[t.STRING=9]="STRING",t[t.BYTES=12]="BYTES",t[t.UINT32=13]="UINT32",t[t.SFIXED32=15]="SFIXED32",t[t.SFIXED64=16]="SFIXED64",t[t.SINT32=17]="SINT32",t[t.SINT64=18]="SINT64"})(nbe=Mr.ScalarType||(Mr.ScalarType={}));var ibe;(function(t){t[t.BIGINT=0]="BIGINT",t[t.STRING=1]="STRING",t[t.NUMBER=2]="NUMBER"})(ibe=Mr.LongType||(Mr.LongType={}));var tW;(function(t){t[t.NO=0]="NO",t[t.PACKED=1]="PACKED",t[t.UNPACKED=2]="UNPACKED"})(tW=Mr.RepeatType||(Mr.RepeatType={}));function sbe(t){var e,r,n,i;return t.localName=(e=t.localName)!==null&&e!==void 0?e:eW.lowerCamelCase(t.name),t.jsonName=(r=t.jsonName)!==null&&r!==void 0?r:eW.lowerCamelCase(t.name),t.repeat=(n=t.repeat)!==null&&n!==void 0?n:tW.NO,t.opt=(i=t.opt)!==null&&i!==void 0?i:t.repeat||t.oneof?!1:t.kind=="message",t}Mr.normalizeFieldInfo=sbe;function obe(t,e,r,n){var i;let s=(i=t.fields.find((o,a)=>o.localName==e||a==e))===null||i===void 0?void 0:i.options;return s&&s[r]?n.fromJson(s[r]):void 0}Mr.readFieldOptions=obe;function abe(t,e,r,n){var i;let s=(i=t.fields.find((a,c)=>a.localName==e||c==e))===null||i===void 0?void 0:i.options;if(!s)return;let o=s[r];return o===void 0?o:n?n.fromJson(o):o}Mr.readFieldOption=abe;function cbe(t,e,r){let i=t.options[e];return i===void 0?i:r?r.fromJson(i):i}Mr.readMessageOption=cbe});var FR=f(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.getSelectedOneofValue=gi.clearOneofValue=gi.setUnknownOneofValue=gi.setOneofValue=gi.getOneofValue=gi.isOneofGroup=void 0;function lbe(t){if(typeof t!="object"||t===null||!t.hasOwnProperty("oneofKind"))return!1;switch(typeof t.oneofKind){case"string":return t[t.oneofKind]===void 0?!1:Object.keys(t).length==2;case"undefined":return Object.keys(t).length==1;default:return!1}}gi.isOneofGroup=lbe;function Abe(t,e){return t[e]}gi.getOneofValue=Abe;function ube(t,e,r){t.oneofKind!==void 0&&delete t[t.oneofKind],t.oneofKind=e,r!==void 0&&(t[e]=r)}gi.setOneofValue=ube;function dbe(t,e,r){t.oneofKind!==void 0&&delete t[t.oneofKind],t.oneofKind=e,r!==void 0&&e!==void 0&&(t[e]=r)}gi.setUnknownOneofValue=dbe;function fbe(t){t.oneofKind!==void 0&&delete t[t.oneofKind],t.oneofKind=void 0}gi.clearOneofValue=fbe;function hbe(t){if(t.oneofKind!==void 0)return t[t.oneofKind]}gi.getSelectedOneofValue=hbe});var qR=f(PC=>{"use strict";Object.defineProperty(PC,"__esModule",{value:!0});PC.ReflectionTypeCheck=void 0;var gr=xs(),pbe=FR(),UR=class{constructor(e){var r;this.fields=(r=e.fields)!==null&&r!==void 0?r:[]}prepare(){if(this.data)return;let e=[],r=[],n=[];for(let i of this.fields)if(i.oneof)n.includes(i.oneof)||(n.push(i.oneof),e.push(i.oneof),r.push(i.oneof));else switch(r.push(i.localName),i.kind){case"scalar":case"enum":(!i.opt||i.repeat)&&e.push(i.localName);break;case"message":i.repeat&&e.push(i.localName);break;case"map":e.push(i.localName);break}this.data={req:e,known:r,oneofs:Object.values(n)}}is(e,r,n=!1){if(r<0)return!0;if(e==null||typeof e!="object")return!1;this.prepare();let i=Object.keys(e),s=this.data;if(i.length!i.includes(o))||!n&&i.some(o=>!s.known.includes(o)))return!1;if(r<1)return!0;for(let o of s.oneofs){let a=e[o];if(!pbe.isOneofGroup(a))return!1;if(a.oneofKind===void 0)continue;let c=this.fields.find(l=>l.localName===a.oneofKind);if(!c||!this.field(a[a.oneofKind],c,n,r))return!1}for(let o of this.fields)if(o.oneof===void 0&&!this.field(e[o.localName],o,n,r))return!1;return!0}field(e,r,n,i){let s=r.repeat;switch(r.kind){case"scalar":return e===void 0?r.opt:s?this.scalars(e,r.T,i,r.L):this.scalar(e,r.T,r.L);case"enum":return e===void 0?r.opt:s?this.scalars(e,gr.ScalarType.INT32,i):this.scalar(e,gr.ScalarType.INT32);case"message":return e===void 0?!0:s?this.messages(e,r.T(),n,i):this.message(e,r.T(),n,i);case"map":if(typeof e!="object"||e===null)return!1;if(i<2)return!0;if(!this.mapKeys(e,r.K,i))return!1;switch(r.V.kind){case"scalar":return this.scalars(Object.values(e),r.V.T,i,r.V.L);case"enum":return this.scalars(Object.values(e),gr.ScalarType.INT32,i);case"message":return this.messages(Object.values(e),r.V.T(),n,i)}break}return!0}message(e,r,n,i){return n?r.isAssignable(e,i):r.is(e,i)}messages(e,r,n,i){if(!Array.isArray(e))return!1;if(i<2)return!0;if(n){for(let s=0;sparseInt(s)),r,n);case gr.ScalarType.BOOL:return this.scalars(i.slice(0,n).map(s=>s=="true"?!0:s=="false"?!1:s),r,n);default:return this.scalars(i,r,n,gr.LongType.STRING)}}};PC.ReflectionTypeCheck=UR});var kC=f(DC=>{"use strict";Object.defineProperty(DC,"__esModule",{value:!0});DC.reflectionLongConvert=void 0;var rW=xs();function gbe(t,e){switch(e){case rW.LongType.BIGINT:return t.toBigInt();case rW.LongType.NUMBER:return t.toNumber();default:return t.toString()}}DC.reflectionLongConvert=gbe});var GR=f(MC=>{"use strict";Object.defineProperty(MC,"__esModule",{value:!0});MC.ReflectionJsonReader=void 0;var nW=CC(),mbe=BC(),Fr=xs(),OC=Ja(),_l=xu(),LC=kC(),HR=class{constructor(e){this.info=e}prepare(){var e;if(this.fMap===void 0){this.fMap={};let r=(e=this.info.fields)!==null&&e!==void 0?e:[];for(let n of r)this.fMap[n.name]=n,this.fMap[n.jsonName]=n,this.fMap[n.localName]=n}}assert(e,r,n){if(!e){let i=nW.typeofJsonValue(n);throw(i=="number"||i=="boolean")&&(i=n.toString()),new Error(`Cannot parse JSON ${i} for ${this.info.typeName}#${r}`)}}read(e,r,n){this.prepare();let i=[];for(let[s,o]of Object.entries(e)){let a=this.fMap[s];if(!a){if(!n.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${s}`);continue}let c=a.localName,l;if(a.oneof){if(o===null&&(a.kind!=="enum"||a.T()[0]!=="google.protobuf.NullValue"))continue;if(i.includes(a.oneof))throw new Error(`Multiple members of the oneof group "${a.oneof}" of ${this.info.typeName} are present in JSON.`);i.push(a.oneof),l=r[a.oneof]={oneofKind:c}}else l=r;if(a.kind=="map"){if(o===null)continue;this.assert(nW.isJsonObject(o),a.name,o);let A=l[c];for(let[u,d]of Object.entries(o)){this.assert(d!==null,a.name+" map value",null);let h;switch(a.V.kind){case"message":h=a.V.T().internalJsonRead(d,n);break;case"enum":if(h=this.enum(a.V.T(),d,a.name,n.ignoreUnknownFields),h===!1)continue;break;case"scalar":h=this.scalar(d,a.V.T,a.V.L,a.name);break}this.assert(h!==void 0,a.name+" map value",d);let g=u;a.K==Fr.ScalarType.BOOL&&(g=g=="true"?!0:g=="false"?!1:g),g=this.scalar(g,a.K,Fr.LongType.STRING,a.name).toString(),A[g]=h}}else if(a.repeat){if(o===null)continue;this.assert(Array.isArray(o),a.name,o);let A=l[c];for(let u of o){this.assert(u!==null,a.name,null);let d;switch(a.kind){case"message":d=a.T().internalJsonRead(u,n);break;case"enum":if(d=this.enum(a.T(),u,a.name,n.ignoreUnknownFields),d===!1)continue;break;case"scalar":d=this.scalar(u,a.T,a.L,a.name);break}this.assert(d!==void 0,a.name,o),A.push(d)}}else switch(a.kind){case"message":if(o===null&&a.T().typeName!="google.protobuf.Value"){this.assert(a.oneof===void 0,a.name+" (oneof member)",null);continue}l[c]=a.T().internalJsonRead(o,n,l[c]);break;case"enum":if(o===null)continue;let A=this.enum(a.T(),o,a.name,n.ignoreUnknownFields);if(A===!1)continue;l[c]=A;break;case"scalar":if(o===null)continue;l[c]=this.scalar(o,a.T,a.L,a.name);break}}}enum(e,r,n,i){if(e[0]=="google.protobuf.NullValue"&&_l.assert(r===null||r==="NULL_VALUE",`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`),r===null)return 0;switch(typeof r){case"number":return _l.assert(Number.isInteger(r),`Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${r}.`),r;case"string":let s=r;e[2]&&r.substring(0,e[2].length)===e[2]&&(s=r.substring(e[2].length));let o=e[1][s];return typeof o>"u"&&i?!1:(_l.assert(typeof o=="number",`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${r}".`),o)}_l.assert(!1,`Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof r}".`)}scalar(e,r,n,i){let s;try{switch(r){case Fr.ScalarType.DOUBLE:case Fr.ScalarType.FLOAT:if(e===null)return 0;if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""){s="empty string";break}if(typeof e=="string"&&e.trim().length!==e.length){s="extra whitespace";break}if(typeof e!="string"&&typeof e!="number")break;let o=Number(e);if(Number.isNaN(o)){s="not a number";break}if(!Number.isFinite(o)){s="too large or small";break}return r==Fr.ScalarType.FLOAT&&_l.assertFloat32(o),o;case Fr.ScalarType.INT32:case Fr.ScalarType.FIXED32:case Fr.ScalarType.SFIXED32:case Fr.ScalarType.SINT32:case Fr.ScalarType.UINT32:if(e===null)return 0;let a;if(typeof e=="number"?a=e:e===""?s="empty string":typeof e=="string"&&(e.trim().length!==e.length?s="extra whitespace":a=Number(e)),a===void 0)break;return r==Fr.ScalarType.UINT32?_l.assertUInt32(a):_l.assertInt32(a),a;case Fr.ScalarType.INT64:case Fr.ScalarType.SFIXED64:case Fr.ScalarType.SINT64:if(e===null)return LC.reflectionLongConvert(OC.PbLong.ZERO,n);if(typeof e!="number"&&typeof e!="string")break;return LC.reflectionLongConvert(OC.PbLong.from(e),n);case Fr.ScalarType.FIXED64:case Fr.ScalarType.UINT64:if(e===null)return LC.reflectionLongConvert(OC.PbULong.ZERO,n);if(typeof e!="number"&&typeof e!="string")break;return LC.reflectionLongConvert(OC.PbULong.from(e),n);case Fr.ScalarType.BOOL:if(e===null)return!1;if(typeof e!="boolean")break;return e;case Fr.ScalarType.STRING:if(e===null)return"";if(typeof e!="string"){s="extra whitespace";break}try{encodeURIComponent(e)}catch(c){c="invalid UTF8";break}return e;case Fr.ScalarType.BYTES:if(e===null||e==="")return new Uint8Array(0);if(typeof e!="string")break;return mbe.base64decode(e)}}catch(o){s=o.message}this.assert(!1,i+(s?" - "+s:""),e)}};MC.ReflectionJsonReader=HR});var zR=f(FC=>{"use strict";Object.defineProperty(FC,"__esModule",{value:!0});FC.ReflectionJsonWriter=void 0;var ybe=BC(),iW=Ja(),Yn=xs(),tr=xu(),jR=class{constructor(e){var r;this.fields=(r=e.fields)!==null&&r!==void 0?r:[]}write(e,r){let n={},i=e;for(let s of this.fields){if(!s.oneof){let l=this.field(s,i[s.localName],r);l!==void 0&&(n[r.useProtoFieldName?s.name:s.jsonName]=l);continue}let o=i[s.oneof];if(o.oneofKind!==s.localName)continue;let a=s.kind=="scalar"||s.kind=="enum"?Object.assign(Object.assign({},r),{emitDefaultValues:!0}):r,c=this.field(s,o[s.localName],a);tr.assert(c!==void 0),n[r.useProtoFieldName?s.name:s.jsonName]=c}return n}field(e,r,n){let i;if(e.kind=="map"){tr.assert(typeof r=="object"&&r!==null);let s={};switch(e.V.kind){case"scalar":for(let[c,l]of Object.entries(r)){let A=this.scalar(e.V.T,l,e.name,!1,!0);tr.assert(A!==void 0),s[c.toString()]=A}break;case"message":let o=e.V.T();for(let[c,l]of Object.entries(r)){let A=this.message(o,l,e.name,n);tr.assert(A!==void 0),s[c.toString()]=A}break;case"enum":let a=e.V.T();for(let[c,l]of Object.entries(r)){tr.assert(l===void 0||typeof l=="number");let A=this.enum(a,l,e.name,!1,!0,n.enumAsInteger);tr.assert(A!==void 0),s[c.toString()]=A}break}(n.emitDefaultValues||Object.keys(s).length>0)&&(i=s)}else if(e.repeat){tr.assert(Array.isArray(r));let s=[];switch(e.kind){case"scalar":for(let c=0;c0||n.emitDefaultValues)&&(i=s)}else switch(e.kind){case"scalar":i=this.scalar(e.T,r,e.name,e.opt,n.emitDefaultValues);break;case"enum":i=this.enum(e.T(),r,e.name,e.opt,n.emitDefaultValues,n.enumAsInteger);break;case"message":i=this.message(e.T(),r,e.name,n);break}return i}enum(e,r,n,i,s,o){if(e[0]=="google.protobuf.NullValue")return!s&&!i?void 0:null;if(r===void 0){tr.assert(i);return}if(!(r===0&&!s&&!i))return tr.assert(typeof r=="number"),tr.assert(Number.isInteger(r)),o||!e[1].hasOwnProperty(r)?r:e[2]?e[2]+e[1][r]:e[1][r]}message(e,r,n,i){return r===void 0?i.emitDefaultValues?null:void 0:e.internalJsonWrite(r,i)}scalar(e,r,n,i,s){if(r===void 0){tr.assert(i);return}let o=s||i;switch(e){case Yn.ScalarType.INT32:case Yn.ScalarType.SFIXED32:case Yn.ScalarType.SINT32:return r===0?o?0:void 0:(tr.assertInt32(r),r);case Yn.ScalarType.FIXED32:case Yn.ScalarType.UINT32:return r===0?o?0:void 0:(tr.assertUInt32(r),r);case Yn.ScalarType.FLOAT:tr.assertFloat32(r);case Yn.ScalarType.DOUBLE:return r===0?o?0:void 0:(tr.assert(typeof r=="number"),Number.isNaN(r)?"NaN":r===Number.POSITIVE_INFINITY?"Infinity":r===Number.NEGATIVE_INFINITY?"-Infinity":r);case Yn.ScalarType.STRING:return r===""?o?"":void 0:(tr.assert(typeof r=="string"),r);case Yn.ScalarType.BOOL:return r===!1?o?!1:void 0:(tr.assert(typeof r=="boolean"),r);case Yn.ScalarType.UINT64:case Yn.ScalarType.FIXED64:tr.assert(typeof r=="number"||typeof r=="string"||typeof r=="bigint");let a=iW.PbULong.from(r);return a.isZero()&&!o?void 0:a.toString();case Yn.ScalarType.INT64:case Yn.ScalarType.SFIXED64:case Yn.ScalarType.SINT64:tr.assert(typeof r=="number"||typeof r=="string"||typeof r=="bigint");let c=iW.PbLong.from(r);return c.isZero()&&!o?void 0:c.toString();case Yn.ScalarType.BYTES:return tr.assert(r instanceof Uint8Array),r.byteLength?ybe.base64encode(r):o?"":void 0}}};FC.ReflectionJsonWriter=jR});var qC=f(UC=>{"use strict";Object.defineProperty(UC,"__esModule",{value:!0});UC.reflectionScalarDefault=void 0;var vs=xs(),sW=kC(),oW=Ja();function Ebe(t,e=vs.LongType.STRING){switch(t){case vs.ScalarType.BOOL:return!1;case vs.ScalarType.UINT64:case vs.ScalarType.FIXED64:return sW.reflectionLongConvert(oW.PbULong.ZERO,e);case vs.ScalarType.INT64:case vs.ScalarType.SFIXED64:case vs.ScalarType.SINT64:return sW.reflectionLongConvert(oW.PbLong.ZERO,e);case vs.ScalarType.DOUBLE:case vs.ScalarType.FLOAT:return 0;case vs.ScalarType.BYTES:return new Uint8Array(0);case vs.ScalarType.STRING:return"";default:return 0}}UC.reflectionScalarDefault=Ebe});var WR=f(HC=>{"use strict";Object.defineProperty(HC,"__esModule",{value:!0});HC.ReflectionBinaryReader=void 0;var aW=cp(),wr=xs(),gp=kC(),cW=qC(),YR=class{constructor(e){this.info=e}prepare(){var e;if(!this.fieldNoToField){let r=(e=this.info.fields)!==null&&e!==void 0?e:[];this.fieldNoToField=new Map(r.map(n=>[n.no,n]))}}read(e,r,n,i){this.prepare();let s=i===void 0?e.len:e.pos+i;for(;e.pos{"use strict";Object.defineProperty(GC,"__esModule",{value:!0});GC.ReflectionBinaryWriter=void 0;var Oi=cp(),Ft=xs(),Pu=xu(),mp=Ja(),JR=class{constructor(e){this.info=e}prepare(){if(!this.fields){let e=this.info.fields?this.info.fields.concat():[];this.fields=e.sort((r,n)=>r.no-n.no)}}write(e,r,n){this.prepare();for(let s of this.fields){let o,a,c=s.repeat,l=s.localName;if(s.oneof){let A=e[s.oneof];if(A.oneofKind!==l)continue;o=A[l],a=!0}else o=e[l],a=!1;switch(s.kind){case"scalar":case"enum":let A=s.kind=="enum"?Ft.ScalarType.INT32:s.T;if(c)if(Pu.assert(Array.isArray(o)),c==Ft.RepeatType.PACKED)this.packed(r,A,s.no,o);else for(let u of o)this.scalar(r,A,s.no,u,!0);else o===void 0?Pu.assert(s.opt):this.scalar(r,A,s.no,o,a||s.opt);break;case"message":if(c){Pu.assert(Array.isArray(o));for(let u of o)this.message(r,n,s.T(),s.no,u)}else this.message(r,n,s.T(),s.no,o);break;case"map":Pu.assert(typeof o=="object"&&o!==null);for(let[u,d]of Object.entries(o))this.mapEntry(r,n,s,u,d);break}}let i=n.writeUnknownFields;i!==!1&&(i===!0?Oi.UnknownFieldHandler.onWrite:i)(this.info.typeName,e,r)}mapEntry(e,r,n,i,s){e.tag(n.no,Oi.WireType.LengthDelimited),e.fork();let o=i;switch(n.K){case Ft.ScalarType.INT32:case Ft.ScalarType.FIXED32:case Ft.ScalarType.UINT32:case Ft.ScalarType.SFIXED32:case Ft.ScalarType.SINT32:o=Number.parseInt(i);break;case Ft.ScalarType.BOOL:Pu.assert(i=="true"||i=="false"),o=i=="true";break}switch(this.scalar(e,n.K,1,o,!0),n.V.kind){case"scalar":this.scalar(e,n.V.T,2,s,!0);break;case"enum":this.scalar(e,Ft.ScalarType.INT32,2,s,!0);break;case"message":this.message(e,r,n.V.T(),2,s);break}e.join()}message(e,r,n,i,s){s!==void 0&&(n.internalBinaryWrite(s,e.tag(i,Oi.WireType.LengthDelimited).fork(),r),e.join())}scalar(e,r,n,i,s){let[o,a,c]=this.scalarInfo(r,i);(!c||s)&&(e.tag(n,o),e[a](i))}packed(e,r,n,i){if(!i.length)return;Pu.assert(r!==Ft.ScalarType.BYTES&&r!==Ft.ScalarType.STRING),e.tag(n,Oi.WireType.LengthDelimited),e.fork();let[,s]=this.scalarInfo(r);for(let o=0;o{"use strict";Object.defineProperty(jC,"__esModule",{value:!0});jC.reflectionCreate=void 0;var Cbe=qC(),Ibe=pp();function Bbe(t){let e=t.messagePrototype?Object.create(t.messagePrototype):Object.defineProperty({},Ibe.MESSAGE_TYPE,{value:t});for(let r of t.fields){let n=r.localName;if(!r.opt)if(r.oneof)e[r.oneof]={oneofKind:void 0};else if(r.repeat)e[n]=[];else switch(r.kind){case"scalar":e[n]=Cbe.reflectionScalarDefault(r.T,r.L);break;case"enum":e[n]=0;break;case"map":e[n]={};break}}return e}jC.reflectionCreate=Bbe});var KR=f(zC=>{"use strict";Object.defineProperty(zC,"__esModule",{value:!0});zC.reflectionMergePartial=void 0;function bbe(t,e,r){let n,i=r,s;for(let o of t.fields){let a=o.localName;if(o.oneof){let c=i[o.oneof];if(c?.oneofKind==null)continue;if(n=c[a],s=e[o.oneof],s.oneofKind=c.oneofKind,n==null){delete s[a];continue}}else if(n=i[a],s=e,n==null)continue;switch(o.repeat&&(s[a].length=n.length),o.kind){case"scalar":case"enum":if(o.repeat)for(let l=0;l{"use strict";Object.defineProperty(WC,"__esModule",{value:!0});WC.reflectionEquals=void 0;var XR=xs();function wbe(t,e,r){if(e===r)return!0;if(!e||!r)return!1;for(let n of t.fields){let i=n.localName,s=n.oneof?e[n.oneof][i]:e[i],o=n.oneof?r[n.oneof][i]:r[i];switch(n.kind){case"enum":case"scalar":let a=n.kind=="enum"?XR.ScalarType.INT32:n.T;if(!(n.repeat?lW(a,s,o):uW(a,s,o)))return!1;break;case"map":if(!(n.V.kind=="message"?AW(n.V.T(),YC(s),YC(o)):lW(n.V.kind=="enum"?XR.ScalarType.INT32:n.V.T,YC(s),YC(o))))return!1;break;case"message":let c=n.T();if(!(n.repeat?AW(c,s,o):c.equals(s,o)))return!1;break}}return!0}WC.reflectionEquals=wbe;var YC=Object.values;function uW(t,e,r){if(e===r)return!0;if(t!==XR.ScalarType.BYTES)return!1;let n=e,i=r;if(n.length!==i.length)return!1;for(let s=0;s{"use strict";Object.defineProperty(JC,"__esModule",{value:!0});JC.MessageType=void 0;var Qbe=pp(),_be=xs(),Sbe=qR(),Nbe=GR(),Rbe=zR(),xbe=WR(),vbe=VR(),Tbe=$R(),ex=KR(),Pbe=CC(),dW=LR(),Dbe=ZR(),kbe=OR(),Obe=kR(),fW=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})),Lbe=fW[Qbe.MESSAGE_TYPE]={},tx=class{constructor(e,r,n){this.defaultCheckDepth=16,this.typeName=e,this.fields=r.map(_be.normalizeFieldInfo),this.options=n??{},Lbe.value=this,this.messagePrototype=Object.create(null,fW),this.refTypeCheck=new Sbe.ReflectionTypeCheck(this),this.refJsonReader=new Nbe.ReflectionJsonReader(this),this.refJsonWriter=new Rbe.ReflectionJsonWriter(this),this.refBinReader=new xbe.ReflectionBinaryReader(this),this.refBinWriter=new vbe.ReflectionBinaryWriter(this)}create(e){let r=Tbe.reflectionCreate(this);return e!==void 0&&ex.reflectionMergePartial(this,r,e),r}clone(e){let r=this.create();return ex.reflectionMergePartial(this,r,e),r}equals(e,r){return Dbe.reflectionEquals(this,e,r)}is(e,r=this.defaultCheckDepth){return this.refTypeCheck.is(e,r,!1)}isAssignable(e,r=this.defaultCheckDepth){return this.refTypeCheck.is(e,r,!0)}mergePartial(e,r){ex.reflectionMergePartial(this,e,r)}fromBinary(e,r){let n=Obe.binaryReadOptions(r);return this.internalBinaryRead(n.readerFactory(e),e.byteLength,n)}fromJson(e,r){return this.internalJsonRead(e,dW.jsonReadOptions(r))}fromJsonString(e,r){let n=JSON.parse(e);return this.fromJson(n,r)}toJson(e,r){return this.internalJsonWrite(e,dW.jsonWriteOptions(r))}toJsonString(e,r){var n;let i=this.toJson(e,r);return JSON.stringify(i,null,(n=r?.prettySpaces)!==null&&n!==void 0?n:0)}toBinary(e,r){let n=kbe.binaryWriteOptions(r);return this.internalBinaryWrite(e,n.writerFactory(),n).finish()}internalJsonRead(e,r,n){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let i=n??this.create();return this.refJsonReader.read(e,i,r),i}throw new Error(`Unable to parse message ${this.typeName} from JSON ${Pbe.typeofJsonValue(e)}.`)}internalJsonWrite(e,r){return this.refJsonWriter.write(e,r)}internalBinaryWrite(e,r,n){return this.refBinWriter.write(e,r,n),r}internalBinaryRead(e,r,n,i){let s=i??this.create();return this.refBinReader.read(e,s,n,r),s}};JC.MessageType=tx});var pW=f(VC=>{"use strict";Object.defineProperty(VC,"__esModule",{value:!0});VC.containsMessageType=void 0;var Mbe=pp();function Fbe(t){return t[Mbe.MESSAGE_TYPE]!=null}VC.containsMessageType=Fbe});var mW=f(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.listEnumNumbers=oo.listEnumNames=oo.listEnumValues=oo.isEnumObject=void 0;function gW(t){if(typeof t!="object"||t===null||!t.hasOwnProperty(0))return!1;for(let e of Object.keys(t)){let r=parseInt(e);if(Number.isNaN(r)){let n=t[e];if(n===void 0||typeof n!="number"||t[n]===void 0)return!1}else{let n=t[r];if(n===void 0||t[n]!==r)return!1}}return!0}oo.isEnumObject=gW;function rx(t){if(!gW(t))throw new Error("not a typescript enum object");let e=[];for(let[r,n]of Object.entries(t))typeof n=="number"&&e.push({name:r,number:n});return e}oo.listEnumValues=rx;function Ube(t){return rx(t).map(e=>e.name)}oo.listEnumNames=Ube;function qbe(t){return rx(t).map(e=>e.number).filter((e,r,n)=>n.indexOf(e)==r)}oo.listEnumNumbers=qbe});var Yt=f(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});var yW=CC();Object.defineProperty(_e,"typeofJsonValue",{enumerable:!0,get:function(){return yW.typeofJsonValue}});Object.defineProperty(_e,"isJsonObject",{enumerable:!0,get:function(){return yW.isJsonObject}});var EW=BC();Object.defineProperty(_e,"base64decode",{enumerable:!0,get:function(){return EW.base64decode}});Object.defineProperty(_e,"base64encode",{enumerable:!0,get:function(){return EW.base64encode}});var Hbe=zY();Object.defineProperty(_e,"utf8read",{enumerable:!0,get:function(){return Hbe.utf8read}});var nx=cp();Object.defineProperty(_e,"WireType",{enumerable:!0,get:function(){return nx.WireType}});Object.defineProperty(_e,"mergeBinaryOptions",{enumerable:!0,get:function(){return nx.mergeBinaryOptions}});Object.defineProperty(_e,"UnknownFieldHandler",{enumerable:!0,get:function(){return nx.UnknownFieldHandler}});var CW=kR();Object.defineProperty(_e,"BinaryReader",{enumerable:!0,get:function(){return CW.BinaryReader}});Object.defineProperty(_e,"binaryReadOptions",{enumerable:!0,get:function(){return CW.binaryReadOptions}});var IW=OR();Object.defineProperty(_e,"BinaryWriter",{enumerable:!0,get:function(){return IW.BinaryWriter}});Object.defineProperty(_e,"binaryWriteOptions",{enumerable:!0,get:function(){return IW.binaryWriteOptions}});var BW=Ja();Object.defineProperty(_e,"PbLong",{enumerable:!0,get:function(){return BW.PbLong}});Object.defineProperty(_e,"PbULong",{enumerable:!0,get:function(){return BW.PbULong}});var ix=LR();Object.defineProperty(_e,"jsonReadOptions",{enumerable:!0,get:function(){return ix.jsonReadOptions}});Object.defineProperty(_e,"jsonWriteOptions",{enumerable:!0,get:function(){return ix.jsonWriteOptions}});Object.defineProperty(_e,"mergeJsonOptions",{enumerable:!0,get:function(){return ix.mergeJsonOptions}});var Gbe=pp();Object.defineProperty(_e,"MESSAGE_TYPE",{enumerable:!0,get:function(){return Gbe.MESSAGE_TYPE}});var jbe=hW();Object.defineProperty(_e,"MessageType",{enumerable:!0,get:function(){return jbe.MessageType}});var Sl=xs();Object.defineProperty(_e,"ScalarType",{enumerable:!0,get:function(){return Sl.ScalarType}});Object.defineProperty(_e,"LongType",{enumerable:!0,get:function(){return Sl.LongType}});Object.defineProperty(_e,"RepeatType",{enumerable:!0,get:function(){return Sl.RepeatType}});Object.defineProperty(_e,"normalizeFieldInfo",{enumerable:!0,get:function(){return Sl.normalizeFieldInfo}});Object.defineProperty(_e,"readFieldOptions",{enumerable:!0,get:function(){return Sl.readFieldOptions}});Object.defineProperty(_e,"readFieldOption",{enumerable:!0,get:function(){return Sl.readFieldOption}});Object.defineProperty(_e,"readMessageOption",{enumerable:!0,get:function(){return Sl.readMessageOption}});var zbe=qR();Object.defineProperty(_e,"ReflectionTypeCheck",{enumerable:!0,get:function(){return zbe.ReflectionTypeCheck}});var Ybe=$R();Object.defineProperty(_e,"reflectionCreate",{enumerable:!0,get:function(){return Ybe.reflectionCreate}});var Wbe=qC();Object.defineProperty(_e,"reflectionScalarDefault",{enumerable:!0,get:function(){return Wbe.reflectionScalarDefault}});var Jbe=KR();Object.defineProperty(_e,"reflectionMergePartial",{enumerable:!0,get:function(){return Jbe.reflectionMergePartial}});var Vbe=ZR();Object.defineProperty(_e,"reflectionEquals",{enumerable:!0,get:function(){return Vbe.reflectionEquals}});var $be=WR();Object.defineProperty(_e,"ReflectionBinaryReader",{enumerable:!0,get:function(){return $be.ReflectionBinaryReader}});var Kbe=VR();Object.defineProperty(_e,"ReflectionBinaryWriter",{enumerable:!0,get:function(){return Kbe.ReflectionBinaryWriter}});var Xbe=GR();Object.defineProperty(_e,"ReflectionJsonReader",{enumerable:!0,get:function(){return Xbe.ReflectionJsonReader}});var Zbe=zR();Object.defineProperty(_e,"ReflectionJsonWriter",{enumerable:!0,get:function(){return Zbe.ReflectionJsonWriter}});var e0e=pW();Object.defineProperty(_e,"containsMessageType",{enumerable:!0,get:function(){return e0e.containsMessageType}});var yp=FR();Object.defineProperty(_e,"isOneofGroup",{enumerable:!0,get:function(){return yp.isOneofGroup}});Object.defineProperty(_e,"setOneofValue",{enumerable:!0,get:function(){return yp.setOneofValue}});Object.defineProperty(_e,"getOneofValue",{enumerable:!0,get:function(){return yp.getOneofValue}});Object.defineProperty(_e,"clearOneofValue",{enumerable:!0,get:function(){return yp.clearOneofValue}});Object.defineProperty(_e,"getSelectedOneofValue",{enumerable:!0,get:function(){return yp.getSelectedOneofValue}});var $C=mW();Object.defineProperty(_e,"listEnumValues",{enumerable:!0,get:function(){return $C.listEnumValues}});Object.defineProperty(_e,"listEnumNames",{enumerable:!0,get:function(){return $C.listEnumNames}});Object.defineProperty(_e,"listEnumNumbers",{enumerable:!0,get:function(){return $C.listEnumNumbers}});Object.defineProperty(_e,"isEnumObject",{enumerable:!0,get:function(){return $C.isEnumObject}});var t0e=MR();Object.defineProperty(_e,"lowerCamelCase",{enumerable:!0,get:function(){return t0e.lowerCamelCase}});var Ep=xu();Object.defineProperty(_e,"assert",{enumerable:!0,get:function(){return Ep.assert}});Object.defineProperty(_e,"assertNever",{enumerable:!0,get:function(){return Ep.assertNever}});Object.defineProperty(_e,"assertInt32",{enumerable:!0,get:function(){return Ep.assertInt32}});Object.defineProperty(_e,"assertUInt32",{enumerable:!0,get:function(){return Ep.assertUInt32}});Object.defineProperty(_e,"assertFloat32",{enumerable:!0,get:function(){return Ep.assertFloat32}})});var ox=f(KC=>{"use strict";Object.defineProperty(KC,"__esModule",{value:!0});KC.Timestamp=void 0;var bW=Yt(),wW=Yt(),r0e=Yt(),n0e=Yt(),i0e=Yt(),Cp=Yt(),s0e=Yt(),sx=class extends s0e.MessageType{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){let e=this.create(),r=Date.now();return e.seconds=Cp.PbLong.from(Math.floor(r/1e3)).toString(),e.nanos=r%1e3*1e6,e}toDate(e){return new Date(Cp.PbLong.from(e.seconds).toNumber()*1e3+Math.ceil(e.nanos/1e6))}fromDate(e){let r=this.create(),n=e.getTime();return r.seconds=Cp.PbLong.from(Math.floor(n/1e3)).toString(),r.nanos=n%1e3*1e6,r}internalJsonWrite(e,r){let n=Cp.PbLong.from(e.seconds).toNumber()*1e3;if(nDate.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(e.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let i="Z";if(e.nanos>0){let s=(e.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?i="."+s.substring(0,3)+"Z":s.substring(6)==="000"?i="."+s.substring(0,6)+"Z":i="."+s+"Z"}return new Date(n).toISOString().replace(".000Z",i)}internalJsonRead(e,r,n){if(typeof e!="string")throw new Error("Unable to parse Timestamp from JSON "+(0,i0e.typeofJsonValue)(e)+".");let i=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!i)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let s=Date.parse(i[1]+"-"+i[2]+"-"+i[3]+"T"+i[4]+":"+i[5]+":"+i[6]+(i[8]?i[8]:"Z"));if(Number.isNaN(s))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(sDate.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return n||(n=this.create()),n.seconds=Cp.PbLong.from(s/1e3).toString(),n.nanos=0,i[7]&&(n.nanos=parseInt("1"+i[7]+"0".repeat(9-i[7].length))-1e9),n}create(e){let r={seconds:"0",nanos:0};return globalThis.Object.defineProperty(r,n0e.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,r0e.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),o=e.pos+r;for(;e.pos{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.BytesValue=Nr.StringValue=Nr.BoolValue=Nr.UInt32Value=Nr.Int32Value=Nr.UInt64Value=Nr.Int64Value=Nr.FloatValue=Nr.DoubleValue=void 0;var XC=Yt(),QW=Yt(),ta=Yt(),zr=Yt(),ra=Yt(),na=Yt(),ia=Yt(),ax=class extends ia.MessageType{constructor(){super("google.protobuf.DoubleValue",[{no:1,name:"value",kind:"scalar",T:1}])}internalJsonWrite(e,r){return this.refJsonWriter.scalar(2,e.value,"value",!1,!0)}internalJsonRead(e,r,n){return n||(n=this.create()),n.value=this.refJsonReader.scalar(e,1,void 0,"value"),n}create(e){let r={value:0};return globalThis.Object.defineProperty(r,na.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,ra.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),o=e.pos+r;for(;e.pos{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.readServiceOption=ao.readMethodOption=ao.readMethodOptions=ao.normalizeMethodInfo=void 0;var o0e=Yt();function a0e(t,e){var r,n,i;let s=t;return s.service=e,s.localName=(r=s.localName)!==null&&r!==void 0?r:o0e.lowerCamelCase(s.name),s.serverStreaming=!!s.serverStreaming,s.clientStreaming=!!s.clientStreaming,s.options=(n=s.options)!==null&&n!==void 0?n:{},s.idempotency=(i=s.idempotency)!==null&&i!==void 0?i:void 0,s}ao.normalizeMethodInfo=a0e;function c0e(t,e,r,n){var i;let s=(i=t.methods.find((o,a)=>o.localName===e||a===e))===null||i===void 0?void 0:i.options;return s&&s[r]?n.fromJson(s[r]):void 0}ao.readMethodOptions=c0e;function l0e(t,e,r,n){var i;let s=(i=t.methods.find((a,c)=>a.localName===e||c===e))===null||i===void 0?void 0:i.options;if(!s)return;let o=s[r];return o===void 0?o:n?n.fromJson(o):o}ao.readMethodOption=l0e;function A0e(t,e,r){let n=t.options;if(!n)return;let i=n[e];return i===void 0?i:r?r.fromJson(i):i}ao.readServiceOption=A0e});var _W=f(eI=>{"use strict";Object.defineProperty(eI,"__esModule",{value:!0});eI.ServiceType=void 0;var u0e=gx(),mx=class{constructor(e,r,n){this.typeName=e,this.methods=r.map(i=>u0e.normalizeMethodInfo(i,this)),this.options=n??{}}};eI.ServiceType=mx});var Ex=f(tI=>{"use strict";Object.defineProperty(tI,"__esModule",{value:!0});tI.RpcError=void 0;var yx=class extends Error{constructor(e,r="UNKNOWN",n){super(e),this.name="RpcError",Object.setPrototypeOf(this,new.target.prototype),this.code=r,this.meta=n??{}}toString(){let e=[this.name+": "+this.message];this.code&&(e.push(""),e.push("Code: "+this.code)),this.serviceName&&this.methodName&&e.push("Method: "+this.serviceName+"/"+this.methodName);let r=Object.entries(this.meta);if(r.length){e.push(""),e.push("Meta:");for(let[n,i]of r)e.push(` ${n}: ${i}`)}return e.join(`
+`)}};tI.RpcError=yx});var Cx=f(nI=>{"use strict";Object.defineProperty(nI,"__esModule",{value:!0});nI.mergeRpcOptions=void 0;var SW=Yt();function d0e(t,e){if(!e)return t;let r={};rI(t,r),rI(e,r);for(let n of Object.keys(e)){let i=e[n];switch(n){case"jsonOptions":r.jsonOptions=SW.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=SW.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},rI(t.meta,r.meta),rI(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(i):i.concat();break}}return r}nI.mergeRpcOptions=d0e;function rI(t,e){if(!t)return;let r=e;for(let[n,i]of Object.entries(t))i instanceof Date?r[n]=new Date(i.getTime()):Array.isArray(i)?r[n]=i.concat():r[n]=i}});var Bx=f(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.Deferred=Nl.DeferredState=void 0;var co;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(co=Nl.DeferredState||(Nl.DeferredState={}));var Ix=class{constructor(e=!0){this._state=co.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==co.PENDING)throw new Error(`cannot resolve ${co[this.state].toLowerCase()}`);this._resolve(e),this._state=co.RESOLVED}reject(e){if(this.state!==co.PENDING)throw new Error(`cannot reject ${co[this.state].toLowerCase()}`);this._reject(e),this._state=co.REJECTED}resolvePending(e){this._state===co.PENDING&&this.resolve(e)}rejectPending(e){this._state===co.PENDING&&this.reject(e)}};Nl.Deferred=Ix});var wx=f(iI=>{"use strict";Object.defineProperty(iI,"__esModule",{value:!0});iI.RpcOutputStreamController=void 0;var NW=Bx(),Rl=Yt(),bx=class{constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){Rl.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){Rl.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){Rl.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){Rl.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;Rl.assert(e,"bad state"),Rl.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new NW.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;Rl.assert(n.state==NW.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};iI.RpcOutputStreamController=bx});var _x=f(Du=>{"use strict";var f0e=Du&&Du.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Du,"__esModule",{value:!0});Du.UnaryCall=void 0;var Qx=class{constructor(e,r,n,i,s,o,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=i,this.response=s,this.status=o,this.trailers=a}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return f0e(this,void 0,void 0,function*(){let[e,r,n,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:i}})}};Du.UnaryCall=Qx});var Nx=f(ku=>{"use strict";var h0e=ku&&ku.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(ku,"__esModule",{value:!0});ku.ServerStreamingCall=void 0;var Sx=class{constructor(e,r,n,i,s,o,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=i,this.responses=s,this.status=o,this.trailers=a}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return h0e(this,void 0,void 0,function*(){let[e,r,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,status:r,trailers:n}})}};ku.ServerStreamingCall=Sx});var xx=f(Ou=>{"use strict";var p0e=Ou&&Ou.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.ClientStreamingCall=void 0;var Rx=class{constructor(e,r,n,i,s,o,a){this.method=e,this.requestHeaders=r,this.requests=n,this.headers=i,this.response=s,this.status=o,this.trailers=a}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return p0e(this,void 0,void 0,function*(){let[e,r,n,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,response:r,status:n,trailers:i}})}};Ou.ClientStreamingCall=Rx});var Tx=f(Lu=>{"use strict";var g0e=Lu&&Lu.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Lu,"__esModule",{value:!0});Lu.DuplexStreamingCall=void 0;var vx=class{constructor(e,r,n,i,s,o,a){this.method=e,this.requestHeaders=r,this.requests=n,this.headers=i,this.responses=s,this.status=o,this.trailers=a}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return g0e(this,void 0,void 0,function*(){let[e,r,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,status:r,trailers:n}})}};Lu.DuplexStreamingCall=vx});var xW=f(Uu=>{"use strict";var m0e=Uu&&Uu.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Uu,"__esModule",{value:!0});Uu.TestTransport=void 0;var os=Ex(),sI=Yt(),RW=wx(),y0e=Cx(),E0e=_x(),C0e=Nx(),I0e=xx(),B0e=Tx(),Fu=class t{constructor(e){this.suppressUncaughtRejections=!0,this.headerDelay=10,this.responseDelay=50,this.betweenResponseDelay=10,this.afterResponseDelay=10,this.data=e??{}}get sentMessages(){return this.lastInput instanceof Mu?this.lastInput.sent:typeof this.lastInput=="object"?[this.lastInput.single]:[]}get sendComplete(){return this.lastInput instanceof Mu?this.lastInput.completed:typeof this.lastInput=="object"}promiseHeaders(){var e;let r=(e=this.data.headers)!==null&&e!==void 0?e:t.defaultHeaders;return r instanceof os.RpcError?Promise.reject(r):Promise.resolve(r)}promiseSingleResponse(e){if(this.data.response instanceof os.RpcError)return Promise.reject(this.data.response);let r;return Array.isArray(this.data.response)?(sI.assert(this.data.response.length>0),r=this.data.response[0]):this.data.response!==void 0?r=this.data.response:r=e.O.create(),sI.assert(e.O.is(r)),Promise.resolve(r)}streamResponses(e,r,n){return m0e(this,void 0,void 0,function*(){let i=[];if(this.data.response===void 0)i.push(e.O.create());else if(Array.isArray(this.data.response))for(let s of this.data.response)sI.assert(e.O.is(s)),i.push(s);else this.data.response instanceof os.RpcError||(sI.assert(e.O.is(this.data.response)),i.push(this.data.response));try{yield Yr(this.responseDelay,n)(void 0)}catch(s){r.notifyError(s);return}if(this.data.response instanceof os.RpcError){r.notifyError(this.data.response);return}for(let s of i){r.notifyMessage(s);try{yield Yr(this.betweenResponseDelay,n)(void 0)}catch(o){r.notifyError(o);return}}if(this.data.status instanceof os.RpcError){r.notifyError(this.data.status);return}if(this.data.trailers instanceof os.RpcError){r.notifyError(this.data.trailers);return}r.notifyComplete()})}promiseStatus(){var e;let r=(e=this.data.status)!==null&&e!==void 0?e:t.defaultStatus;return r instanceof os.RpcError?Promise.reject(r):Promise.resolve(r)}promiseTrailers(){var e;let r=(e=this.data.trailers)!==null&&e!==void 0?e:t.defaultTrailers;return r instanceof os.RpcError?Promise.reject(r):Promise.resolve(r)}maybeSuppressUncaught(...e){if(this.suppressUncaughtRejections)for(let r of e)r.catch(()=>{})}mergeOptions(e){return y0e.mergeRpcOptions({},e)}unary(e,r,n){var i;let s=(i=n.meta)!==null&&i!==void 0?i:{},o=this.promiseHeaders().then(Yr(this.headerDelay,n.abort)),a=o.catch(A=>{}).then(Yr(this.responseDelay,n.abort)).then(A=>this.promiseSingleResponse(e)),c=a.catch(A=>{}).then(Yr(this.afterResponseDelay,n.abort)).then(A=>this.promiseStatus()),l=a.catch(A=>{}).then(Yr(this.afterResponseDelay,n.abort)).then(A=>this.promiseTrailers());return this.maybeSuppressUncaught(c,l),this.lastInput={single:r},new E0e.UnaryCall(e,s,r,o,a,c,l)}serverStreaming(e,r,n){var i;let s=(i=n.meta)!==null&&i!==void 0?i:{},o=this.promiseHeaders().then(Yr(this.headerDelay,n.abort)),a=new RW.RpcOutputStreamController,c=o.then(Yr(this.responseDelay,n.abort)).catch(()=>{}).then(()=>this.streamResponses(e,a,n.abort)).then(Yr(this.afterResponseDelay,n.abort)),l=c.then(()=>this.promiseStatus()),A=c.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(l,A),this.lastInput={single:r},new C0e.ServerStreamingCall(e,s,r,o,a,l,A)}clientStreaming(e,r){var n;let i=(n=r.meta)!==null&&n!==void 0?n:{},s=this.promiseHeaders().then(Yr(this.headerDelay,r.abort)),o=s.catch(l=>{}).then(Yr(this.responseDelay,r.abort)).then(l=>this.promiseSingleResponse(e)),a=o.catch(l=>{}).then(Yr(this.afterResponseDelay,r.abort)).then(l=>this.promiseStatus()),c=o.catch(l=>{}).then(Yr(this.afterResponseDelay,r.abort)).then(l=>this.promiseTrailers());return this.maybeSuppressUncaught(a,c),this.lastInput=new Mu(this.data,r.abort),new I0e.ClientStreamingCall(e,i,this.lastInput,s,o,a,c)}duplex(e,r){var n;let i=(n=r.meta)!==null&&n!==void 0?n:{},s=this.promiseHeaders().then(Yr(this.headerDelay,r.abort)),o=new RW.RpcOutputStreamController,a=s.then(Yr(this.responseDelay,r.abort)).catch(()=>{}).then(()=>this.streamResponses(e,o,r.abort)).then(Yr(this.afterResponseDelay,r.abort)),c=a.then(()=>this.promiseStatus()),l=a.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(c,l),this.lastInput=new Mu(this.data,r.abort),new B0e.DuplexStreamingCall(e,i,this.lastInput,s,o,c,l)}};Uu.TestTransport=Fu;Fu.defaultHeaders={responseHeader:"test"};Fu.defaultStatus={code:"OK",detail:"all good"};Fu.defaultTrailers={responseTrailer:"test"};function Yr(t,e){return r=>new Promise((n,i)=>{if(e?.aborted)i(new os.RpcError("user cancel","CANCELLED"));else{let s=setTimeout(()=>n(r),t);e&&e.addEventListener("abort",o=>{clearTimeout(s),i(new os.RpcError("user cancel","CANCELLED"))})}})}var Mu=class{constructor(e,r){this._completed=!1,this._sent=[],this.data=e,this.abort=r}get sent(){return this._sent}get completed(){return this._completed}send(e){if(this.data.inputMessage instanceof os.RpcError)return Promise.reject(this.data.inputMessage);let r=this.data.inputMessage===void 0?10:this.data.inputMessage;return Promise.resolve(void 0).then(()=>{this._sent.push(e)}).then(Yr(r,this.abort))}complete(){if(this.data.inputComplete instanceof os.RpcError)return Promise.reject(this.data.inputComplete);let e=this.data.inputComplete===void 0?10:this.data.inputComplete;return Promise.resolve(void 0).then(()=>{this._completed=!0}).then(Yr(e,this.abort))}}});var vW=f(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.stackDuplexStreamingInterceptors=as.stackClientStreamingInterceptors=as.stackServerStreamingInterceptors=as.stackUnaryInterceptors=as.stackIntercept=void 0;var b0e=Yt();function Ip(t,e,r,n,i){var s,o,a,c;if(t=="unary"){let l=(A,u,d)=>e.unary(A,u,d);for(let A of((s=n.interceptors)!==null&&s!==void 0?s:[]).filter(u=>u.interceptUnary).reverse()){let u=l;l=(d,h,g)=>A.interceptUnary(u,d,h,g)}return l(r,i,n)}if(t=="serverStreaming"){let l=(A,u,d)=>e.serverStreaming(A,u,d);for(let A of((o=n.interceptors)!==null&&o!==void 0?o:[]).filter(u=>u.interceptServerStreaming).reverse()){let u=l;l=(d,h,g)=>A.interceptServerStreaming(u,d,h,g)}return l(r,i,n)}if(t=="clientStreaming"){let l=(A,u)=>e.clientStreaming(A,u);for(let A of((a=n.interceptors)!==null&&a!==void 0?a:[]).filter(u=>u.interceptClientStreaming).reverse()){let u=l;l=(d,h)=>A.interceptClientStreaming(u,d,h)}return l(r,n)}if(t=="duplex"){let l=(A,u)=>e.duplex(A,u);for(let A of((c=n.interceptors)!==null&&c!==void 0?c:[]).filter(u=>u.interceptDuplex).reverse()){let u=l;l=(d,h)=>A.interceptDuplex(u,d,h)}return l(r,n)}b0e.assertNever(t)}as.stackIntercept=Ip;function w0e(t,e,r,n){return Ip("unary",t,e,n,r)}as.stackUnaryInterceptors=w0e;function Q0e(t,e,r,n){return Ip("serverStreaming",t,e,n,r)}as.stackServerStreamingInterceptors=Q0e;function _0e(t,e,r){return Ip("clientStreaming",t,e,r)}as.stackClientStreamingInterceptors=_0e;function S0e(t,e,r){return Ip("duplex",t,e,r)}as.stackDuplexStreamingInterceptors=S0e});var TW=f(oI=>{"use strict";Object.defineProperty(oI,"__esModule",{value:!0});oI.ServerCallContextController=void 0;var Px=class{constructor(e,r,n,i,s={code:"OK",detail:""}){this._cancelled=!1,this._listeners=[],this.method=e,this.headers=r,this.deadline=n,this.trailers={},this._sendRH=i,this.status=s}notifyCancelled(){if(!this._cancelled){this._cancelled=!0;for(let e of this._listeners)e()}}sendResponseHeaders(e){this._sendRH(e)}get cancelled(){return this._cancelled}onCancel(e){let r=this._listeners;return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}};oI.ServerCallContextController=Px});var DW=f(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});var N0e=_W();Object.defineProperty(mr,"ServiceType",{enumerable:!0,get:function(){return N0e.ServiceType}});var Dx=gx();Object.defineProperty(mr,"readMethodOptions",{enumerable:!0,get:function(){return Dx.readMethodOptions}});Object.defineProperty(mr,"readMethodOption",{enumerable:!0,get:function(){return Dx.readMethodOption}});Object.defineProperty(mr,"readServiceOption",{enumerable:!0,get:function(){return Dx.readServiceOption}});var R0e=Ex();Object.defineProperty(mr,"RpcError",{enumerable:!0,get:function(){return R0e.RpcError}});var x0e=Cx();Object.defineProperty(mr,"mergeRpcOptions",{enumerable:!0,get:function(){return x0e.mergeRpcOptions}});var v0e=wx();Object.defineProperty(mr,"RpcOutputStreamController",{enumerable:!0,get:function(){return v0e.RpcOutputStreamController}});var T0e=xW();Object.defineProperty(mr,"TestTransport",{enumerable:!0,get:function(){return T0e.TestTransport}});var PW=Bx();Object.defineProperty(mr,"Deferred",{enumerable:!0,get:function(){return PW.Deferred}});Object.defineProperty(mr,"DeferredState",{enumerable:!0,get:function(){return PW.DeferredState}});var P0e=Tx();Object.defineProperty(mr,"DuplexStreamingCall",{enumerable:!0,get:function(){return P0e.DuplexStreamingCall}});var D0e=xx();Object.defineProperty(mr,"ClientStreamingCall",{enumerable:!0,get:function(){return D0e.ClientStreamingCall}});var k0e=Nx();Object.defineProperty(mr,"ServerStreamingCall",{enumerable:!0,get:function(){return k0e.ServerStreamingCall}});var O0e=_x();Object.defineProperty(mr,"UnaryCall",{enumerable:!0,get:function(){return O0e.UnaryCall}});var Bp=vW();Object.defineProperty(mr,"stackIntercept",{enumerable:!0,get:function(){return Bp.stackIntercept}});Object.defineProperty(mr,"stackDuplexStreamingInterceptors",{enumerable:!0,get:function(){return Bp.stackDuplexStreamingInterceptors}});Object.defineProperty(mr,"stackClientStreamingInterceptors",{enumerable:!0,get:function(){return Bp.stackClientStreamingInterceptors}});Object.defineProperty(mr,"stackServerStreamingInterceptors",{enumerable:!0,get:function(){return Bp.stackServerStreamingInterceptors}});Object.defineProperty(mr,"stackUnaryInterceptors",{enumerable:!0,get:function(){return Bp.stackUnaryInterceptors}});var L0e=TW();Object.defineProperty(mr,"ServerCallContextController",{enumerable:!0,get:function(){return L0e.ServerCallContextController}})});var Kx=f(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.ArtifactService=Te.DeleteArtifactResponse=Te.DeleteArtifactRequest=Te.GetSignedArtifactURLResponse=Te.GetSignedArtifactURLRequest=Te.ListArtifactsResponse_MonolithArtifact=Te.ListArtifactsResponse=Te.ListArtifactsRequest=Te.FinalizeArtifactResponse=Te.FinalizeArtifactRequest=Te.CreateArtifactResponse=Te.CreateArtifactRequest=Te.FinalizeMigratedArtifactResponse=Te.FinalizeMigratedArtifactRequest=Te.MigrateArtifactResponse=Te.MigrateArtifactRequest=void 0;var M0e=DW(),Ue=Yt(),It=Yt(),Wn=Yt(),Jn=Yt(),Vn=Yt(),kx=ZC(),sa=ZC(),oa=ox(),Ox=class extends Vn.MessageType{constructor(){super("github.actions.results.api.v1.MigrateArtifactRequest",[{no:1,name:"workflow_run_backend_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"expires_at",kind:"message",T:()=>oa.Timestamp}])}create(e){let r={workflowRunBackendId:"",name:""};return globalThis.Object.defineProperty(r,Jn.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Wn.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),o=e.pos+r;for(;e.posoa.Timestamp},{no:5,name:"version",kind:"scalar",T:5}])}create(e){let r={workflowRunBackendId:"",workflowJobRunBackendId:"",name:"",version:0};return globalThis.Object.defineProperty(r,Jn.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Wn.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),o=e.pos+r;for(;e.possa.StringValue}])}create(e){let r={workflowRunBackendId:"",workflowJobRunBackendId:"",name:"",size:"0"};return globalThis.Object.defineProperty(r,Jn.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Wn.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),o=e.pos+r;for(;e.possa.StringValue},{no:4,name:"id_filter",kind:"message",T:()=>kx.Int64Value}])}create(e){let r={workflowRunBackendId:"",workflowJobRunBackendId:""};return globalThis.Object.defineProperty(r,Jn.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Wn.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),o=e.pos+r;for(;e.posTe.ListArtifactsResponse_MonolithArtifact}])}create(e){let r={artifacts:[]};return globalThis.Object.defineProperty(r,Jn.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Wn.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),o=e.pos+r;for(;e.posoa.Timestamp},{no:7,name:"digest",kind:"message",T:()=>sa.StringValue}])}create(e){let r={workflowRunBackendId:"",workflowJobRunBackendId:"",databaseId:"0",name:"",size:"0"};return globalThis.Object.defineProperty(r,Jn.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Wn.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),o=e.pos+r;for(;e.pos{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});qu.ArtifactServiceClientProtobuf=qu.ArtifactServiceClientJSON=void 0;var Rr=Kx(),Xx=class{constructor(e){this.rpc=e,this.CreateArtifact.bind(this),this.FinalizeArtifact.bind(this),this.ListArtifacts.bind(this),this.GetSignedArtifactURL.bind(this),this.DeleteArtifact.bind(this)}CreateArtifact(e){let r=Rr.CreateArtifactRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","CreateArtifact","application/json",r).then(i=>Rr.CreateArtifactResponse.fromJson(i,{ignoreUnknownFields:!0}))}FinalizeArtifact(e){let r=Rr.FinalizeArtifactRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","FinalizeArtifact","application/json",r).then(i=>Rr.FinalizeArtifactResponse.fromJson(i,{ignoreUnknownFields:!0}))}ListArtifacts(e){let r=Rr.ListArtifactsRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","ListArtifacts","application/json",r).then(i=>Rr.ListArtifactsResponse.fromJson(i,{ignoreUnknownFields:!0}))}GetSignedArtifactURL(e){let r=Rr.GetSignedArtifactURLRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","GetSignedArtifactURL","application/json",r).then(i=>Rr.GetSignedArtifactURLResponse.fromJson(i,{ignoreUnknownFields:!0}))}DeleteArtifact(e){let r=Rr.DeleteArtifactRequest.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.ArtifactService","DeleteArtifact","application/json",r).then(i=>Rr.DeleteArtifactResponse.fromJson(i,{ignoreUnknownFields:!0}))}};qu.ArtifactServiceClientJSON=Xx;var Zx=class{constructor(e){this.rpc=e,this.CreateArtifact.bind(this),this.FinalizeArtifact.bind(this),this.ListArtifacts.bind(this),this.GetSignedArtifactURL.bind(this),this.DeleteArtifact.bind(this)}CreateArtifact(e){let r=Rr.CreateArtifactRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","CreateArtifact","application/protobuf",r).then(i=>Rr.CreateArtifactResponse.fromBinary(i))}FinalizeArtifact(e){let r=Rr.FinalizeArtifactRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","FinalizeArtifact","application/protobuf",r).then(i=>Rr.FinalizeArtifactResponse.fromBinary(i))}ListArtifacts(e){let r=Rr.ListArtifactsRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","ListArtifacts","application/protobuf",r).then(i=>Rr.ListArtifactsResponse.fromBinary(i))}GetSignedArtifactURL(e){let r=Rr.GetSignedArtifactURLRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","GetSignedArtifactURL","application/protobuf",r).then(i=>Rr.GetSignedArtifactURLResponse.fromBinary(i))}DeleteArtifact(e){let r=Rr.DeleteArtifactRequest.toBinary(e);return this.rpc.request("github.actions.results.api.v1.ArtifactService","DeleteArtifact","application/protobuf",r).then(i=>Rr.DeleteArtifactResponse.fromBinary(i))}};qu.ArtifactServiceClientProtobuf=Zx});var $a=f(lo=>{"use strict";var F0e=lo&&lo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),aI=lo&&lo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&F0e(e,t,r)};Object.defineProperty(lo,"__esModule",{value:!0});aI(ox(),lo);aI(ZC(),lo);aI(Kx(),lo);aI(kW(),lo)});var OW=f(aa=>{"use strict";var U0e=aa&&aa.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),q0e=aa&&aa.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),H0e=aa&&aa.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i{"use strict";Object.defineProperty(cI,"__esModule",{value:!0});cI.validateArtifactName=J0e;cI.validateFilePath=V0e;var W0e=Lr(),ev=new Map([['"',' Double quote "'],[":"," Colon :"],["<"," Less than <"],[">"," Greater than >"],["|"," Vertical bar |"],["*"," Asterisk *"],["?"," Question mark ?"],["\r"," Carriage return \\r"],[`
+`," Line feed \\n"]]),LW=new Map([...ev,["\\"," Backslash \\"],["/"," Forward slash /"]]);function J0e(t){if(!t)throw new Error("Provided artifact name input during validation is empty");for(let[e,r]of LW)if(t.includes(e))throw new Error(`The artifact name is not valid: ${t}. Contains the following character: ${r}
-Invalid characters include: ${Array.from(aG.values()).toString()}
+Invalid characters include: ${Array.from(LW.values()).toString()}
-These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);(0,vBe.info)("Artifact name is valid!")}xA.validateArtifactName=NBe;function xBe(t){if(!t)throw new Error("Provided file path input during validation is empty");for(let[e,r]of Q5)if(t.includes(e))throw new Error(`The path for one of the files in artifact is not valid: ${t}. Contains the following character: ${r}
+These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);(0,W0e.info)("Artifact name is valid!")}function V0e(t){if(!t)throw new Error("Provided file path input during validation is empty");for(let[e,r]of ev)if(t.includes(e))throw new Error(`The path for one of the files in artifact is not valid: ${t}. Contains the following character: ${r}
-Invalid characters include: ${Array.from(Q5.values()).toString()}
+Invalid characters include: ${Array.from(ev.values()).toString()}
The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
- `)}xA.validateFilePath=xBe});var oG=A((iot,RBe)=>{RBe.exports={name:"@actions/artifact",version:"2.3.2",preview:!0,description:"Actions artifact lib",keywords:["github","actions","artifact"],homepage:"https://github.com/actions/toolkit/tree/main/packages/artifact",license:"MIT",main:"lib/artifact.js",types:"lib/artifact.d.ts",directories:{lib:"lib",test:"__tests__"},files:["lib","!.DS_Store"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/actions/toolkit.git",directory:"packages/artifact"},scripts:{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json",test:"cd ../../ && npm run test ./packages/artifact",bootstrap:"cd ../../ && npm run bootstrap","tsc-run":"tsc",tsc:"npm run bootstrap && npm run tsc-run","gen:docs":"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"},bugs:{url:"https://github.com/actions/toolkit/issues"},dependencies:{"@actions/core":"^1.10.0","@actions/github":"^5.1.1","@actions/http-client":"^2.1.0","@azure/storage-blob":"^12.15.0","@octokit/core":"^3.5.1","@octokit/plugin-request-log":"^1.0.4","@octokit/plugin-retry":"^3.0.9","@octokit/request-error":"^5.0.0","@protobuf-ts/plugin":"^2.2.3-alpha.1",archiver:"^7.0.1","jwt-decode":"^3.1.2","unzip-stream":"^0.3.1"},devDependencies:{"@types/archiver":"^5.3.2","@types/unzip-stream":"^0.3.4",typedoc:"^0.25.4","typedoc-plugin-markdown":"^3.17.1",typescript:"^5.2.2"}}});var RA=A(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.getUserAgentString=void 0;var TBe=oG();function DBe(){return`@actions/artifact-${TBe.version}`}mE.getUserAgentString=DBe});var ko=A(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.UsageError=Rn.NetworkError=Rn.GHESNotSupportedError=Rn.ArtifactNotFoundError=Rn.InvalidResponseError=Rn.FilesNotFoundError=void 0;var _5=class extends Error{constructor(e=[]){let r="No files were found to upload";e.length>0&&(r+=`: ${e.join(", ")}`),super(r),this.files=e,this.name="FilesNotFoundError"}};Rn.FilesNotFoundError=_5;var v5=class extends Error{constructor(e){super(e),this.name="InvalidResponseError"}};Rn.InvalidResponseError=v5;var N5=class extends Error{constructor(e="Artifact not found"){super(e),this.name="ArtifactNotFoundError"}};Rn.ArtifactNotFoundError=N5;var x5=class extends Error{constructor(e="@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES."){super(e),this.name="GHESNotSupportedError"}};Rn.GHESNotSupportedError=x5;var gE=class extends Error{constructor(e){let r=`Unable to make request: ${e}
-If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};Rn.NetworkError=gE;gE.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var yE=class extends Error{constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts. Usage is recalculated every 6-12 hours.
-More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Rn.UsageError=yE;yE.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var uG=A((aot,dG)=>{"use strict";function T5(t){this.message=t}T5.prototype=new Error,T5.prototype.name="InvalidCharacterError";var lG=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new T5("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,n=0,s=0,a="";i=e.charAt(s++);~i&&(r=n%4?64*r+i:i,n++%4)?a+=String.fromCharCode(255&r>>(-2*n&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return a};function PBe(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return(function(r){return decodeURIComponent(lG(r).replace(/(.)/g,(function(i,n){var s=n.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s})))})(e)}catch{return lG(e)}}function Im(t){this.message=t}function cG(t,e){if(typeof t!="string")throw new Im("Invalid token specified");var r=(e=e||{}).header===!0?0:1;try{return JSON.parse(PBe(t.split(".")[r]))}catch(i){throw new Im("Invalid token specified: "+i.message)}}Im.prototype=new Error,Im.prototype.name="InvalidTokenError";var R5=cG;R5.default=cG,R5.InvalidTokenError=Im,dG.exports=R5});var hd=A(Li=>{"use strict";var kBe=Li&&Li.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),OBe=Li&&Li.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),LBe=Li&&Li.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&kBe(e,t,r);return OBe(e,t),e},FBe=Li&&Li.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Li,"__esModule",{value:!0});Li.maskSecretUrls=Li.maskSigUrl=Li.getBackendIdsFromToken=void 0;var AG=LBe(Gr()),MBe=dd(),UBe=FBe(uG()),CE=Gr(),EE=new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims");function qBe(){let t=(0,MBe.getRuntimeToken)(),e=(0,UBe.default)(t);if(!e.scp)throw EE;let r=e.scp.split(" ");if(r.length===0)throw EE;for(let i of r){let n=i.split(":");if(n?.[0]!=="Actions.Results")continue;if(n.length!==3)throw EE;let s={workflowRunBackendId:n[1],workflowJobRunBackendId:n[2]};return AG.debug(`Workflow Run Backend ID: ${s.workflowRunBackendId}`),AG.debug(`Workflow Job Run Backend ID: ${s.workflowJobRunBackendId}`),s}throw EE}Li.getBackendIdsFromToken=qBe;function D5(t){if(t)try{let r=new URL(t).searchParams.get("sig");r&&((0,CE.setSecret)(r),(0,CE.setSecret)(encodeURIComponent(r)))}catch(e){(0,CE.debug)(`Failed to parse URL: ${t} ${e instanceof Error?e.message:String(e)}`)}}Li.maskSigUrl=D5;function HBe(t){if(typeof t!="object"||t===null){(0,CE.debug)("body is not an object or is null");return}"signed_upload_url"in t&&typeof t.signed_upload_url=="string"&&D5(t.signed_upload_url),"signed_url"in t&&typeof t.signed_url=="string"&&D5(t.signed_url)}Li.maskSecretUrls=HBe});var kA=A(PA=>{"use strict";var bE=PA&&PA.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(i.next(d))}catch(u){a(u)}}function l(d){try{c(i.throw(d))}catch(u){a(u)}}function c(d){d.done?s(d.value):n(d.value).then(o,l)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(PA,"__esModule",{value:!0});PA.internalArtifactTwirpClient=void 0;var TA=am(),GBe=H3(),DA=Gr(),jBe=Sl(),pG=dd(),zBe=RA(),Bm=ko(),VBe=hd(),P5=class{constructor(e,r,i,n){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let s=(0,pG.getRuntimeToken)();this.baseUrl=(0,pG.getResultsServiceUrl)(),r&&(this.maxAttempts=r),i&&(this.baseRetryIntervalMilliseconds=i),n&&(this.retryMultiplier=n),this.httpClient=new TA.HttpClient(e,[new GBe.BearerCredentialHandler(s)])}request(e,r,i,n){return bE(this,void 0,void 0,function*(){let s=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;(0,DA.debug)(`[Request] ${r} ${s}`);let a={"Content-Type":i};try{let{body:o}=yield this.retryableRequest(()=>bE(this,void 0,void 0,function*(){return this.httpClient.post(s,JSON.stringify(n),a)}));return o}catch(o){throw new Error(`Failed to ${r}: ${o.message}`)}})}retryableRequest(e){return bE(this,void 0,void 0,function*(){let r=0,i="",n="";for(;r=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[TA.HttpCodes.BadGateway,TA.HttpCodes.GatewayTimeout,TA.HttpCodes.InternalServerError,TA.HttpCodes.ServiceUnavailable,TA.HttpCodes.TooManyRequests].includes(e):!1}sleep(e){return bE(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw new Error("attempt should be a positive integer");if(e===0)return this.baseRetryIntervalMilliseconds;let r=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,e),i=r*this.retryMultiplier;return Math.trunc(Math.random()*(i-r)+r)}};function YBe(t){let e=new P5((0,zBe.getUserAgentString)(),t?.maxAttempts,t?.retryIntervalMs,t?.retryMultiplier);return new jBe.ArtifactServiceClientJSON(e)}PA.internalArtifactTwirpClient=YBe});var hG=A(Bs=>{"use strict";var WBe=Bs&&Bs.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),JBe=Bs&&Bs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$Be=Bs&&Bs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&WBe(e,t,r);return JBe(e,t),e};Object.defineProperty(Bs,"__esModule",{value:!0});Bs.getUploadZipSpecification=Bs.validateRootDirectory=void 0;var k5=$Be(require("fs")),KBe=Gr(),IE=require("path"),fG=S5();function XBe(t){if(!k5.existsSync(t))throw new Error(`The provided rootDirectory ${t} does not exist`);if(!k5.statSync(t).isDirectory())throw new Error(`The provided rootDirectory ${t} is not a valid directory`);(0,KBe.info)("Root directory input is valid!")}Bs.validateRootDirectory=XBe;function ZBe(t,e){let r=[];e=(0,IE.normalize)(e),e=(0,IE.resolve)(e);for(let i of t){let n=k5.lstatSync(i,{throwIfNoEntry:!1});if(!n)throw new Error(`File ${i} does not exist`);if(n.isDirectory()){let s=i.replace(e,"");(0,fG.validateFilePath)(s),r.push({sourcePath:null,destinationPath:s,stats:n})}else{if(i=(0,IE.normalize)(i),i=(0,IE.resolve)(i),!i.startsWith(e))throw new Error(`The rootDirectory: ${e} is not a parent directory of the file: ${i}`);let s=i.replace(e,"");(0,fG.validateFilePath)(s),r.push({sourcePath:i,destinationPath:s,stats:n})}}return r}Bs.getUploadZipSpecification=ZBe});var sr={};upe(sr,{__addDisposableResource:()=>UG,__assign:()=>BE,__asyncDelegator:()=>TG,__asyncGenerator:()=>RG,__asyncValues:()=>DG,__await:()=>OA,__awaiter:()=>QG,__classPrivateFieldGet:()=>LG,__classPrivateFieldIn:()=>MG,__classPrivateFieldSet:()=>FG,__createBinding:()=>QE,__decorate:()=>yG,__disposeResources:()=>qG,__esDecorate:()=>CG,__exportStar:()=>_G,__extends:()=>mG,__generator:()=>SG,__importDefault:()=>OG,__importStar:()=>kG,__makeTemplateObject:()=>PG,__metadata:()=>wG,__param:()=>EG,__propKey:()=>IG,__read:()=>F5,__rest:()=>gG,__rewriteRelativeImportExtension:()=>HG,__runInitializers:()=>bG,__setFunctionName:()=>BG,__spread:()=>vG,__spreadArray:()=>xG,__spreadArrays:()=>NG,__values:()=>wE,default:()=>r8e});function mG(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");O5(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function gG(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(t);n=0;o--)(a=t[o])&&(s=(n<3?a(s):n>3?a(e,r,s):a(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s}function EG(t,e){return function(r,i){e(r,i,t)}}function CG(t,e,r,i,n,s){function a(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}for(var o=i.kind,l=o==="getter"?"get":o==="setter"?"set":"value",c=!e&&t?i.static?t:t.prototype:null,d=e||(c?Object.getOwnPropertyDescriptor(c,i.name):{}),u,p=!1,f=r.length-1;f>=0;f--){var h={};for(var E in i)h[E]=E==="access"?{}:i[E];for(var E in i.access)h.access[E]=i.access[E];h.addInitializer=function(b){if(p)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(b||null))};var C=(0,r[f])(o==="accessor"?{get:d.get,set:d.set}:d[l],h);if(o==="accessor"){if(C===void 0)continue;if(C===null||typeof C!="object")throw new TypeError("Object expected");(u=a(C.get))&&(d.get=u),(u=a(C.set))&&(d.set=u),(u=a(C.init))&&n.unshift(u)}else(u=a(C))&&(o==="field"?n.unshift(u):d[l]=u)}c&&Object.defineProperty(c,i.name,d),p=!0}function bG(t,e,r){for(var i=arguments.length>2,n=0;n0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function F5(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),n,s=[],a;try{for(;(e===void 0||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s}function vG(){for(var t=[],e=0;e1||l(f,E)})},h&&(n[f]=h(n[f])))}function l(f,h){try{c(i[f](h))}catch(E){p(s[0][3],E)}}function c(f){f.value instanceof OA?Promise.resolve(f.value.v).then(d,u):p(s[0][2],f)}function d(f){l("next",f)}function u(f){l("throw",f)}function p(f,h){f(h),s.shift(),s.length&&l(s[0][0],s[0][1])}}function TG(t){var e,r;return e={},i("next"),i("throw",function(n){throw n}),i("return"),e[Symbol.iterator]=function(){return this},e;function i(n,s){e[n]=t[n]?function(a){return(r=!r)?{value:OA(t[n](a)),done:!1}:s?s(a):a}:s}}function DG(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof wE=="function"?wE(t):t[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(s){r[s]=t[s]&&function(a){return new Promise(function(o,l){a=t[s](a),n(o,l,a.done,a.value)})}}function n(s,a,o,l){Promise.resolve(l).then(function(c){s({value:c,done:o})},a)}}function PG(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function kG(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=L5(t),i=0;i{O5=function(t,e){return O5=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},O5(t,e)};BE=function(){return BE=Object.assign||function(e){for(var r,i=1,n=arguments.length;i{"use strict";Object.defineProperty(SE,"__esModule",{value:!0});SE.AbortError=void 0;var M5=class extends Error{constructor(e){super(e),this.name="AbortError"}};SE.AbortError=M5});var jG=A(U5=>{"use strict";Object.defineProperty(U5,"__esModule",{value:!0});U5.log=a8e;var GG=(ar(),dr(sr)),i8e=require("node:os"),n8e=GG.__importDefault(require("node:util")),s8e=GG.__importDefault(require("node:process"));function a8e(t,...e){s8e.default.stderr.write(`${n8e.default.format(t,...e)}${i8e.EOL}`)}});var $G=A(z5=>{"use strict";Object.defineProperty(z5,"__esModule",{value:!0});var o8e=jG(),zG=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,YG,q5=[],H5=[],_E=[];zG&&G5(zG);var WG=Object.assign(t=>JG(t),{enable:G5,enabled:j5,disable:l8e,log:o8e.log});function G5(t){YG=t,q5=[],H5=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?H5.push(r.substring(1)):q5.push(r);for(let r of _E)r.enabled=j5(r.namespace)}function j5(t){if(t.endsWith("*"))return!0;for(let e of H5)if(VG(t,e))return!1;for(let e of q5)if(VG(t,e))return!0;return!1}function VG(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let p=[],f="";for(let h of e)h==="*"&&f==="*"||(f=h,p.push(h));r=p.join("")}let i=0,n=0,s=r.length,a=t.length,o=-1,l=-1;for(;i=0){if(n=o+1,i=l+1,i===a)return!1;for(;t[i]!==r[n];)if(i++,i===a)return!1;l=i,i++,n++;continue}else return!1;let c=i===t.length,d=n===r.length,u=n===r.length-1&&r[n]==="*";return c&&(d||u)}function l8e(){let t=YG||"";return G5(""),t}function JG(t){let e=Object.assign(r,{enabled:j5(t),destroy:c8e,log:WG.log,namespace:t,extend:d8e});function r(...i){e.enabled&&(i.length>0&&(i[0]=`${t} ${i[0]}`),e.log(...i))}return _E.push(e),e}function c8e(){let t=_E.indexOf(this);return t>=0?(_E.splice(t,1),!0):!1}function d8e(t){let e=JG(`${this.namespace}:${t}`);return e.log=this.log,e}z5.default=WG});var Sm=A(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.TypeSpecRuntimeLogger=void 0;_l.createLoggerContext=ej;_l.setLogLevel=A8e;_l.getLogLevel=p8e;_l.createClientLogger=f8e;var u8e=(ar(),dr(sr)),Qm=u8e.__importDefault($G()),V5=["verbose","info","warning","error"],KG={verbose:400,info:300,warning:200,error:100};function XG(t,e){e.log=(...r)=>{t.log(...r)}}function ZG(t){return V5.includes(t)}function ej(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,i,n=(0,Qm.default)(t.namespace);n.log=(...d)=>{Qm.default.log(...d)};function s(d){if(d&&!ZG(d))throw new Error(`Unknown log level '${d}'. Acceptable values: ${V5.join(",")}`);i=d;let u=[];for(let p of e)a(p)&&u.push(p.namespace);Qm.default.enable(u.join(","))}r&&(ZG(r)?s(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${V5.join(", ")}.`));function a(d){return!!(i&&KG[d.level]<=KG[i])}function o(d,u){let p=Object.assign(d.extend(u),{level:u});if(XG(d,p),a(p)){let f=Qm.default.disable();Qm.default.enable(f+","+p.namespace)}return e.add(p),p}function l(){return i}function c(d){let u=n.extend(d);return XG(n,u),{error:o(u,"error"),warning:o(u,"warning"),info:o(u,"info"),verbose:o(u,"verbose")}}return{setLogLevel:s,getLogLevel:l,createClientLogger:c,logger:n}}var vE=ej({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"});_l.TypeSpecRuntimeLogger=vE.logger;function A8e(t){vE.setLogLevel(t)}function p8e(){return vE.getLogLevel()}function f8e(t){return vE.createClientLogger(t)}});var vl=A(W5=>{"use strict";Object.defineProperty(W5,"__esModule",{value:!0});W5.createHttpHeaders=m8e;function NE(t){return t.toLowerCase()}function*h8e(t){for(let e of t.values())yield[e.name,e.value]}var Y5=class{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(NE(e),{name:e,value:String(r).trim()})}get(e){return this._headersMap.get(NE(e))?.value}has(e){return this._headersMap.has(NE(e))}delete(e){this._headersMap.delete(NE(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let i of this._headersMap.values())r[i.name]=i.value;else for(let[i,n]of this._headersMap)r[i]=n.value;return r}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return h8e(this._headersMap)}};function m8e(t){return new Y5(t)}});var rj=A(tj=>{"use strict";Object.defineProperty(tj,"__esModule",{value:!0})});var nj=A(ij=>{"use strict";Object.defineProperty(ij,"__esModule",{value:!0})});var xE=A(J5=>{"use strict";Object.defineProperty(J5,"__esModule",{value:!0});J5.randomUUID=E8e;var g8e=require("node:crypto"),y8e=typeof globalThis?.crypto?.randomUUID=="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):g8e.randomUUID;function E8e(){return y8e()}});var X5=A(K5=>{"use strict";Object.defineProperty(K5,"__esModule",{value:!0});K5.createPipelineRequest=I8e;var C8e=vl(),b8e=xE(),$5=class{url;method;headers;timeout;withCredentials;body;multipartBody;formData;streamResponseStatusCodes;enableBrowserStreams;proxySettings;disableKeepAlive;abortSignal;requestId;allowInsecureConnection;onUploadProgress;onDownloadProgress;requestOverrides;authSchemes;constructor(e){this.url=e.url,this.body=e.body,this.headers=e.headers??(0,C8e.createHttpHeaders)(),this.method=e.method??"GET",this.timeout=e.timeout??0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=e.disableKeepAlive??!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=e.withCredentials??!1,this.abortSignal=e.abortSignal,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||(0,b8e.randomUUID)(),this.allowInsecureConnection=e.allowInsecureConnection??!1,this.enableBrowserStreams=e.enableBrowserStreams??!1,this.requestOverrides=e.requestOverrides,this.authSchemes=e.authSchemes}};function I8e(t){return new $5(t)}});var tQ=A(eQ=>{"use strict";Object.defineProperty(eQ,"__esModule",{value:!0});eQ.createEmptyPipeline=B8e;var sj=new Set(["Deserialize","Serialize","Retry","Sign"]),Z5=class t{_policies=[];_orderedPolicies;constructor(e){this._policies=e?.slice(0)??[],this._orderedPolicies=void 0}addPolicy(e,r={}){if(r.phase&&r.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(r.phase&&!sj.has(r.phase))throw new Error(`Invalid phase name: ${r.phase}`);if(r.afterPhase&&!sj.has(r.afterPhase))throw new Error(`Invalid afterPhase name: ${r.afterPhase}`);this._policies.push({policy:e,options:r}),this._orderedPolicies=void 0}removePolicy(e){let r=[];return this._policies=this._policies.filter(i=>e.name&&i.policy.name===e.name||e.phase&&i.options.phase===e.phase?(r.push(i.policy),!1):!0),this._orderedPolicies=void 0,r}sendRequest(e,r){return this.getOrderedPolicies().reduceRight((s,a)=>o=>a.sendRequest(o,s),s=>e.sendRequest(s))(r)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new t(this._policies)}static create(){return new t}orderPolicies(){let e=[],r=new Map;function i(h){return{name:h,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}let n=i("Serialize"),s=i("None"),a=i("Deserialize"),o=i("Retry"),l=i("Sign"),c=[n,s,a,o,l];function d(h){return h==="Retry"?o:h==="Serialize"?n:h==="Deserialize"?a:h==="Sign"?l:s}for(let h of this._policies){let E=h.policy,C=h.options,b=E.name;if(r.has(b))throw new Error("Duplicate policy names not allowed in pipeline");let N={policy:E,dependsOn:new Set,dependants:new Set};C.afterPhase&&(N.afterPhase=d(C.afterPhase),N.afterPhase.hasAfterPolicies=!0),r.set(b,N),d(C.phase).policies.add(N)}for(let h of this._policies){let{policy:E,options:C}=h,b=E.name,N=r.get(b);if(!N)throw new Error(`Missing node for policy ${b}`);if(C.afterPolicies)for(let D of C.afterPolicies){let O=r.get(D);O&&(N.dependsOn.add(O),O.dependants.add(N))}if(C.beforePolicies)for(let D of C.beforePolicies){let O=r.get(D);O&&(O.dependsOn.add(N),N.dependants.add(O))}}function u(h){h.hasRun=!0;for(let E of h.policies)if(!(E.afterPhase&&(!E.afterPhase.hasRun||E.afterPhase.policies.size))&&E.dependsOn.size===0){e.push(E.policy);for(let C of E.dependants)C.dependsOn.delete(E);r.delete(E.policy.name),h.policies.delete(E)}}function p(){for(let h of c){if(u(h),h.policies.size>0&&h!==s){s.hasRun||u(s);return}h.hasAfterPolicies&&u(s)}}let f=0;for(;r.size>0;){f++;let h=e.length;if(p(),e.length<=h&&f>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}};function B8e(){return Z5.create()}});var RE=A(rQ=>{"use strict";Object.defineProperty(rQ,"__esModule",{value:!0});rQ.isObject=w8e;function w8e(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}});var nQ=A(iQ=>{"use strict";Object.defineProperty(iQ,"__esModule",{value:!0});iQ.isError=S8e;var Q8e=RE();function S8e(t){if((0,Q8e.isObject)(t)){let e=typeof t.name=="string",r=typeof t.message=="string";return e&&r}return!1}});var aj=A(TE=>{"use strict";Object.defineProperty(TE,"__esModule",{value:!0});TE.custom=void 0;var _8e=require("node:util");TE.custom=_8e.inspect.custom});var _m=A(DE=>{"use strict";Object.defineProperty(DE,"__esModule",{value:!0});DE.Sanitizer=void 0;var v8e=RE(),sQ="REDACTED",N8e=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],x8e=["api-version"],aQ=class{allowedHeaderNames;allowedQueryParameters;constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:r=[]}={}){e=N8e.concat(e),r=x8e.concat(r),this.allowedHeaderNames=new Set(e.map(i=>i.toLowerCase())),this.allowedQueryParameters=new Set(r.map(i=>i.toLowerCase()))}sanitize(e){let r=new Set;return JSON.stringify(e,(i,n)=>{if(n instanceof Error)return{...n,name:n.name,message:n.message};if(i==="headers")return this.sanitizeHeaders(n);if(i==="url")return this.sanitizeUrl(n);if(i==="query")return this.sanitizeQuery(n);if(i==="body")return;if(i==="response")return;if(i==="operationSpec")return;if(Array.isArray(n)||(0,v8e.isObject)(n)){if(r.has(n))return"[Circular]";r.add(n)}return n},2)}sanitizeUrl(e){if(typeof e!="string"||e===null||e==="")return e;let r=new URL(e);if(!r.search)return e;for(let[i]of r.searchParams)this.allowedQueryParameters.has(i.toLowerCase())||r.searchParams.set(i,sQ);return r.toString()}sanitizeHeaders(e){let r={};for(let i of Object.keys(e))this.allowedHeaderNames.has(i.toLowerCase())?r[i]=e[i]:r[i]=sQ;return r}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let r={};for(let i of Object.keys(e))this.allowedQueryParameters.has(i.toLowerCase())?r[i]=e[i]:r[i]=sQ;return r}};DE.Sanitizer=aQ});var LA=A(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.RestError=void 0;vm.isRestError=k8e;var R8e=nQ(),T8e=aj(),D8e=_m(),P8e=new D8e.Sanitizer,PE=class t extends Error{static REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";static PARSE_ERROR="PARSE_ERROR";code;statusCode;request;response;details;constructor(e,r={}){super(e),this.name="RestError",this.code=r.code,this.statusCode=r.statusCode,Object.defineProperty(this,"request",{value:r.request,enumerable:!1}),Object.defineProperty(this,"response",{value:r.response,enumerable:!1});let i=this.request?.agent?{maxFreeSockets:this.request.agent.maxFreeSockets,maxSockets:this.request.agent.maxSockets}:void 0;Object.defineProperty(this,T8e.custom,{value:()=>`RestError: ${this.message}
- ${P8e.sanitize({...this,request:{...this.request,agent:i},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};vm.RestError=PE;function k8e(t){return t instanceof PE?!0:(0,R8e.isError)(t)&&t.name==="RestError"}});var md=A(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});kE.uint8ArrayToString=O8e;kE.stringToUint8Array=L8e;function O8e(t,e){return Buffer.from(t).toString(e)}function L8e(t,e){return Buffer.from(t,e)}});var Nm=A(OE=>{"use strict";Object.defineProperty(OE,"__esModule",{value:!0});OE.logger=void 0;var F8e=Sm();OE.logger=(0,F8e.createClientLogger)("ts-http-runtime")});var Aj=A(FE=>{"use strict";Object.defineProperty(FE,"__esModule",{value:!0});FE.getBodyLength=uj;FE.createNodeHttpClient=V8e;var dQ=(ar(),dr(sr)),oQ=dQ.__importDefault(require("node:http")),lQ=dQ.__importDefault(require("node:https")),oj=dQ.__importDefault(require("node:zlib")),M8e=require("node:stream"),lj=wm(),U8e=vl(),Rm=LA(),FA=Nm(),q8e=_m(),H8e={};function xm(t){return t&&typeof t.pipe=="function"}function cj(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function dj(t){return t&&typeof t.byteLength=="number"}var LE=class extends M8e.Transform{loadedBytes=0;progressCallback;_transform(e,r,i){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),i()}catch(n){i(n)}}constructor(e){super(),this.progressCallback=e}},cQ=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,i;if(e.abortSignal){if(e.abortSignal.aborted)throw new lj.AbortError("The operation was aborted. Request has already been canceled.");i=c=>{c.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",i)}let n;e.timeout>0&&(n=setTimeout(()=>{let c=new q8e.Sanitizer;FA.logger.info(`request to '${c.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let s=e.headers.get("Accept-Encoding"),a=s?.includes("gzip")||s?.includes("deflate"),o=typeof e.body=="function"?e.body():e.body;if(o&&!e.headers.has("Content-Length")){let c=uj(o);c!==null&&e.headers.set("Content-Length",c)}let l;try{if(o&&e.onUploadProgress){let h=e.onUploadProgress,E=new LE(h);E.on("error",C=>{FA.logger.error("Error in upload progress",C)}),xm(o)?o.pipe(E):E.end(o),o=E}let c=await this.makeRequest(e,r,o);n!==void 0&&clearTimeout(n);let d=G8e(c),p={status:c.statusCode??0,headers:d,request:e};if(e.method==="HEAD")return c.resume(),p;l=a?j8e(c,d):c;let f=e.onDownloadProgress;if(f){let h=new LE(f);h.on("error",E=>{FA.logger.error("Error in download progress",E)}),l.pipe(h),l=h}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(p.status)?p.readableStreamBody=l:p.bodyAsText=await z8e(l),p}finally{if(e.abortSignal&&i){let c=Promise.resolve();xm(o)&&(c=cj(o));let d=Promise.resolve();xm(l)&&(d=cj(l)),Promise.all([c,d]).then(()=>{i&&e.abortSignal?.removeEventListener("abort",i)}).catch(u=>{FA.logger.warning("Error when cleaning up abortListener on httpRequest",u)})}}}makeRequest(e,r,i){let n=new URL(e.url),s=n.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let o={agent:e.agent??this.getOrCreateAgent(e,s),hostname:n.hostname,path:`${n.pathname}${n.search}`,port:n.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((l,c)=>{let d=s?oQ.default.request(o,l):lQ.default.request(o,l);d.once("error",u=>{c(new Rm.RestError(u.message,{code:u.code??Rm.RestError.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let u=new lj.AbortError("The operation was aborted. Rejecting from abort signal callback while making request.");d.destroy(u),c(u)}),i&&xm(i)?i.pipe(d):i?typeof i=="string"||Buffer.isBuffer(i)?d.end(i):dj(i)?d.end(ArrayBuffer.isView(i)?Buffer.from(i.buffer):Buffer.from(i)):(FA.logger.error("Unrecognized body type",i),c(new Rm.RestError("Unrecognized body type"))):d.end()})}getOrCreateAgent(e,r){let i=e.disableKeepAlive;if(r)return i?oQ.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new oQ.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(i&&!e.tlsSettings)return lQ.default.globalAgent;let n=e.tlsSettings??H8e,s=this.cachedHttpsAgents.get(n);return s&&s.options.keepAlive===!i||(FA.logger.info("No cached TLS Agent exist, creating a new Agent"),s=new lQ.default.Agent({keepAlive:!i,...n}),this.cachedHttpsAgents.set(n,s)),s}}};function G8e(t){let e=(0,U8e.createHttpHeaders)();for(let r of Object.keys(t.headers)){let i=t.headers[r];Array.isArray(i)?i.length>0&&e.set(r,i[0]):i&&e.set(r,i)}return e}function j8e(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let i=oj.default.createGunzip();return t.pipe(i),i}else if(r==="deflate"){let i=oj.default.createInflate();return t.pipe(i),i}return t}function z8e(t){return new Promise((e,r)=>{let i=[];t.on("data",n=>{Buffer.isBuffer(n)?i.push(n):i.push(Buffer.from(n))}),t.on("end",()=>{e(Buffer.concat(i).toString("utf8"))}),t.on("error",n=>{n&&n?.name==="AbortError"?r(n):r(new Rm.RestError(`Error reading response as text: ${n.message}`,{code:Rm.RestError.PARSE_ERROR}))})})}function uj(t){return t?Buffer.isBuffer(t)?t.length:xm(t)?null:dj(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function V8e(){return new cQ}});var AQ=A(uQ=>{"use strict";Object.defineProperty(uQ,"__esModule",{value:!0});uQ.createDefaultHttpClient=W8e;var Y8e=Aj();function W8e(){return(0,Y8e.createNodeHttpClient)()}});var pQ=A(MA=>{"use strict";Object.defineProperty(MA,"__esModule",{value:!0});MA.logPolicyName=void 0;MA.logPolicy=K8e;var J8e=Nm(),$8e=_m();MA.logPolicyName="logPolicy";function K8e(t={}){let e=t.logger??J8e.logger.info,r=new $8e.Sanitizer({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:MA.logPolicyName,async sendRequest(i,n){if(!e.enabled)return n(i);e(`Request: ${r.sanitize(i)}`);let s=await n(i);return e(`Response status code: ${s.status}`),e(`Headers: ${r.sanitize(s.headers)}`),s}}}});var fQ=A(UA=>{"use strict";Object.defineProperty(UA,"__esModule",{value:!0});UA.redirectPolicyName=void 0;UA.redirectPolicy=X8e;UA.redirectPolicyName="redirectPolicy";var pj=["GET","HEAD"];function X8e(t={}){let{maxRetries:e=20}=t;return{name:UA.redirectPolicyName,async sendRequest(r,i){let n=await i(r);return fj(i,n,e)}}}async function fj(t,e,r,i=0){let{request:n,status:s,headers:a}=e,o=a.get("location");if(o&&(s===300||s===301&&pj.includes(n.method)||s===302&&pj.includes(n.method)||s===303&&n.method==="POST"||s===307)&&i{"use strict";Object.defineProperty(ME,"__esModule",{value:!0});ME.getHeaderName=Z8e;ME.setPlatformSpecificData=ewe;var hj=(ar(),dr(sr)),hQ=hj.__importDefault(require("node:os")),mQ=hj.__importDefault(require("node:process"));function Z8e(){return"User-Agent"}async function ewe(t){if(mQ.default&&mQ.default.versions){let e=mQ.default.versions;e.bun?t.set("Bun",e.bun):e.deno?t.set("Deno",e.deno):e.node&&t.set("Node",e.node)}t.set("OS",`(${hQ.default.arch()}-${hQ.default.type()}-${hQ.default.release()})`)}});var gd=A(qA=>{"use strict";Object.defineProperty(qA,"__esModule",{value:!0});qA.DEFAULT_RETRY_POLICY_COUNT=qA.SDK_VERSION=void 0;qA.SDK_VERSION="0.3.1";qA.DEFAULT_RETRY_POLICY_COUNT=3});var yj=A(UE=>{"use strict";Object.defineProperty(UE,"__esModule",{value:!0});UE.getUserAgentHeaderName=iwe;UE.getUserAgentValue=nwe;var gj=mj(),twe=gd();function rwe(t){let e=[];for(let[r,i]of t){let n=i?`${r}/${i}`:r;e.push(n)}return e.join(" ")}function iwe(){return(0,gj.getHeaderName)()}async function nwe(t){let e=new Map;e.set("ts-http-runtime",twe.SDK_VERSION),await(0,gj.setPlatformSpecificData)(e);let r=rwe(e);return t?`${t} ${r}`:r}});var gQ=A(HA=>{"use strict";Object.defineProperty(HA,"__esModule",{value:!0});HA.userAgentPolicyName=void 0;HA.userAgentPolicy=swe;var Cj=yj(),Ej=(0,Cj.getUserAgentHeaderName)();HA.userAgentPolicyName="userAgentPolicy";function swe(t={}){let e=(0,Cj.getUserAgentValue)(t.userAgentPrefix);return{name:HA.userAgentPolicyName,async sendRequest(r,i){return r.headers.has(Ej)||r.headers.set(Ej,await e),i(r)}}}});var yQ=A(GA=>{"use strict";Object.defineProperty(GA,"__esModule",{value:!0});GA.decompressResponsePolicyName=void 0;GA.decompressResponsePolicy=awe;GA.decompressResponsePolicyName="decompressResponsePolicy";function awe(){return{name:GA.decompressResponsePolicyName,async sendRequest(t,e){return t.method!=="HEAD"&&t.headers.set("Accept-Encoding","gzip,deflate"),e(t)}}}});var CQ=A(EQ=>{"use strict";Object.defineProperty(EQ,"__esModule",{value:!0});EQ.getRandomIntegerInclusive=owe;function owe(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}});var IQ=A(bQ=>{"use strict";Object.defineProperty(bQ,"__esModule",{value:!0});bQ.calculateRetryDelay=cwe;var lwe=CQ();function cwe(t,e){let r=e.retryDelayInMs*Math.pow(2,t),i=Math.min(e.maxRetryDelayInMs,r);return{retryAfterInMs:i/2+(0,lwe.getRandomIntegerInclusive)(0,i/2)}}});var BQ=A(qE=>{"use strict";Object.defineProperty(qE,"__esModule",{value:!0});qE.delay=Awe;qE.parseHeaderValueAsNumber=pwe;var dwe=wm(),uwe="The operation was aborted.";function Awe(t,e,r){return new Promise((i,n)=>{let s,a,o=()=>n(new dwe.AbortError(r?.abortErrorMsg?r?.abortErrorMsg:uwe)),l=()=>{r?.abortSignal&&a&&r.abortSignal.removeEventListener("abort",a)};if(a=()=>(s&&clearTimeout(s),l(),o()),r?.abortSignal&&r.abortSignal.aborted)return o();s=setTimeout(()=>{l(),i(e)},t),r?.abortSignal&&r.abortSignal.addEventListener("abort",a)})}function pwe(t,e){let r=t.headers.get(e);if(!r)return;let i=Number(r);if(!Number.isNaN(i))return i}});var GE=A(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:!0});HE.isThrottlingRetryResponse=mwe;HE.throttlingRetryStrategy=gwe;var fwe=BQ(),wQ="Retry-After",hwe=["retry-after-ms","x-ms-retry-after-ms",wQ];function bj(t){if(t&&[429,503].includes(t.status))try{for(let n of hwe){let s=(0,fwe.parseHeaderValueAsNumber)(t,n);if(s===0||s)return s*(n===wQ?1e3:1)}let e=t.headers.get(wQ);if(!e)return;let i=Date.parse(e)-Date.now();return Number.isFinite(i)?Math.max(0,i):void 0}catch{return}}function mwe(t){return Number.isFinite(bj(t))}function gwe(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=bj(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}});var jE=A(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.exponentialRetryStrategy=Iwe;Tm.isExponentialRetryResponse=Ij;Tm.isSystemError=Bj;var ywe=IQ(),Ewe=GE(),Cwe=1e3,bwe=1e3*64;function Iwe(t={}){let e=t.retryDelayInMs??Cwe,r=t.maxRetryDelayInMs??bwe;return{name:"exponentialRetryStrategy",retry({retryCount:i,response:n,responseError:s}){let a=Bj(s),o=a&&t.ignoreSystemErrors,l=Ij(n),c=l&&t.ignoreHttpStatusCodes;return n&&((0,Ewe.isThrottlingRetryResponse)(n)||!l)||c||o?{skipStrategy:!0}:s&&!a&&!l?{errorToThrow:s}:(0,ywe.calculateRetryDelay)(i,{retryDelayInMs:e,maxRetryDelayInMs:r})}}}function Ij(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}function Bj(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}});var jA=A(QQ=>{"use strict";Object.defineProperty(QQ,"__esModule",{value:!0});QQ.retryPolicy=vwe;var Bwe=BQ(),wwe=wm(),Qwe=Sm(),wj=gd(),Swe=(0,Qwe.createClientLogger)("ts-http-runtime retryPolicy"),_we="retryPolicy";function vwe(t,e={maxRetries:wj.DEFAULT_RETRY_POLICY_COUNT}){let r=e.logger||Swe;return{name:_we,async sendRequest(i,n){let s,a,o=-1;e:for(;;){o+=1,s=void 0,a=void 0;try{r.info(`Retry ${o}: Attempting to send request`,i.requestId),s=await n(i),r.info(`Retry ${o}: Received a response from request`,i.requestId)}catch(l){if(r.error(`Retry ${o}: Received an error from request`,i.requestId),a=l,!l||a.name!=="RestError")throw l;s=a.response}if(i.abortSignal?.aborted)throw r.error(`Retry ${o}: Request aborted.`),new wwe.AbortError;if(o>=(e.maxRetries??wj.DEFAULT_RETRY_POLICY_COUNT)){if(r.info(`Retry ${o}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),a)throw a;if(s)return s;throw new Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${o}: Processing ${t.length} retry strategies.`);t:for(let l of t){let c=l.logger||r;c.info(`Retry ${o}: Processing retry strategy ${l.name}.`);let d=l.retry({retryCount:o,response:s,responseError:a});if(d.skipStrategy){c.info(`Retry ${o}: Skipped.`);continue t}let{errorToThrow:u,retryAfterInMs:p,redirectTo:f}=d;if(u)throw c.error(`Retry ${o}: Retry strategy ${l.name} throws error:`,u),u;if(p||p===0){c.info(`Retry ${o}: Retry strategy ${l.name} retries after ${p}`),await(0,Bwe.delay)(p,void 0,{abortSignal:i.abortSignal});continue e}if(f){c.info(`Retry ${o}: Retry strategy ${l.name} redirects to ${f}`),i.url=f;continue e}}if(a)throw r.info("None of the retry strategies could work with the received error. Throwing it."),a;if(s)return r.info("None of the retry strategies could work with the received response. Returning it."),s}}}}});var SQ=A(zA=>{"use strict";Object.defineProperty(zA,"__esModule",{value:!0});zA.defaultRetryPolicyName=void 0;zA.defaultRetryPolicy=Dwe;var Nwe=jE(),xwe=GE(),Rwe=jA(),Twe=gd();zA.defaultRetryPolicyName="defaultRetryPolicy";function Dwe(t={}){return{name:zA.defaultRetryPolicyName,sendRequest:(0,Rwe.retryPolicy)([(0,xwe.throttlingRetryStrategy)(),(0,Nwe.exponentialRetryStrategy)(t)],{maxRetries:t.maxRetries??Twe.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}});var Dm=A(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.isReactNative=Vr.isNodeRuntime=Vr.isNodeLike=Vr.isBun=Vr.isDeno=Vr.isWebWorker=Vr.isBrowser=void 0;Vr.isBrowser=typeof window<"u"&&typeof window.document<"u";Vr.isWebWorker=typeof self=="object"&&typeof self?.importScripts=="function"&&(self.constructor?.name==="DedicatedWorkerGlobalScope"||self.constructor?.name==="ServiceWorkerGlobalScope"||self.constructor?.name==="SharedWorkerGlobalScope");Vr.isDeno=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u";Vr.isBun=typeof Bun<"u"&&typeof Bun.version<"u";Vr.isNodeLike=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!globalThis.process.versions?.node;Vr.isNodeRuntime=Vr.isNodeLike&&!Vr.isBun&&!Vr.isDeno;Vr.isReactNative=typeof navigator<"u"&&navigator?.product==="ReactNative"});var _Q=A(VA=>{"use strict";Object.defineProperty(VA,"__esModule",{value:!0});VA.formDataPolicyName=void 0;VA.formDataPolicy=Lwe;var Pwe=md(),kwe=Dm(),Qj=vl();VA.formDataPolicyName="formDataPolicy";function Owe(t){let e={};for(let[r,i]of t.entries())e[r]??=[],e[r].push(i);return e}function Lwe(){return{name:VA.formDataPolicyName,async sendRequest(t,e){if(kwe.isNodeLike&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=Owe(t.body),t.body=void 0),t.formData){let r=t.headers.get("Content-Type");r&&r.indexOf("application/x-www-form-urlencoded")!==-1?t.body=Fwe(t.formData):await Mwe(t.formData,t),t.formData=void 0}return e(t)}}}function Fwe(t){let e=new URLSearchParams;for(let[r,i]of Object.entries(t))if(Array.isArray(i))for(let n of i)e.append(r,n.toString());else e.append(r,i.toString());return e.toString()}async function Mwe(t,e){let r=e.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",r??"multipart/form-data");let i=[];for(let[n,s]of Object.entries(t))for(let a of Array.isArray(s)?s:[s])if(typeof a=="string")i.push({headers:(0,Qj.createHttpHeaders)({"Content-Disposition":`form-data; name="${n}"`}),body:(0,Pwe.stringToUint8Array)(a,"utf-8")});else{if(a==null||typeof a!="object")throw new Error(`Unexpected value for key ${n}: ${a}. Value should be serialized to string first.`);{let o=a.name||"blob",l=(0,Qj.createHttpHeaders)();l.set("Content-Disposition",`form-data; name="${n}"; filename="${o}"`),l.set("Content-Type",a.type||"application/octet-stream"),i.push({headers:l,body:a})}}e.multipartBody={parts:i}}});var _j=A((zot,Sj)=>{var YA=1e3,WA=YA*60,JA=WA*60,yd=JA*24,Uwe=yd*7,qwe=yd*365.25;Sj.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Hwe(t);if(r==="number"&&isFinite(t))return e.long?jwe(t):Gwe(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Hwe(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*qwe;case"weeks":case"week":case"w":return r*Uwe;case"days":case"day":case"d":return r*yd;case"hours":case"hour":case"hrs":case"hr":case"h":return r*JA;case"minutes":case"minute":case"mins":case"min":case"m":return r*WA;case"seconds":case"second":case"secs":case"sec":case"s":return r*YA;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Gwe(t){var e=Math.abs(t);return e>=yd?Math.round(t/yd)+"d":e>=JA?Math.round(t/JA)+"h":e>=WA?Math.round(t/WA)+"m":e>=YA?Math.round(t/YA)+"s":t+"ms"}function jwe(t){var e=Math.abs(t);return e>=yd?zE(t,e,yd,"day"):e>=JA?zE(t,e,JA,"hour"):e>=WA?zE(t,e,WA,"minute"):e>=YA?zE(t,e,YA,"second"):t+" ms"}function zE(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var vQ=A((Vot,vj)=>{function zwe(t){r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=n,r.enabled=o,r.humanize=_j(),r.destroy=c,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function e(d){let u=0;for(let p=0;p{if(ne==="%%")return"%";O++;let te=r.formatters[U];if(typeof te=="function"){let F=C[O];ne=te.call(b,F),C.splice(O,1),O--}return ne}),r.formatArgs.call(b,C),(b.log||r.log).apply(b,C)}return E.namespace=d,E.useColors=r.useColors(),E.color=r.selectColor(d),E.extend=i,E.destroy=r.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(f!==r.namespaces&&(f=r.namespaces,h=r.enabled(d)),h),set:C=>{p=C}}),typeof r.init=="function"&&r.init(E),E}function i(d,u){let p=r(this.namespace+(typeof u>"u"?":":u)+d);return p.log=this.log,p}function n(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let u=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of u)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function s(d,u){let p=0,f=0,h=-1,E=0;for(;p"-"+u)].join(",");return r.enable(""),d}function o(d){for(let u of r.skips)if(s(d,u))return!1;for(let u of r.names)if(s(d,u))return!0;return!1}function l(d){return d instanceof Error?d.stack||d.message:d}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}vj.exports=zwe});var Nj=A((Tn,VE)=>{Tn.formatArgs=Ywe;Tn.save=Wwe;Tn.load=Jwe;Tn.useColors=Vwe;Tn.storage=$we();Tn.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Tn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Vwe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Ywe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+VE.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(i=r))}),t.splice(i,0,e)}Tn.log=console.debug||console.log||(()=>{});function Wwe(t){try{t?Tn.storage.setItem("debug",t):Tn.storage.removeItem("debug")}catch{}}function Jwe(){let t;try{t=Tn.storage.getItem("debug")||Tn.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function $we(){try{return localStorage}catch{}}VE.exports=vQ()(Tn);var{formatters:Kwe}=VE.exports;Kwe.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Rj=A((Yot,xj)=>{"use strict";xj.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1||i{"use strict";var Xwe=require("os"),Tj=require("tty"),ws=Rj(),{env:ti}=process,Nl;ws("no-color")||ws("no-colors")||ws("color=false")||ws("color=never")?Nl=0:(ws("color")||ws("colors")||ws("color=true")||ws("color=always"))&&(Nl=1);"FORCE_COLOR"in ti&&(ti.FORCE_COLOR==="true"?Nl=1:ti.FORCE_COLOR==="false"?Nl=0:Nl=ti.FORCE_COLOR.length===0?1:Math.min(parseInt(ti.FORCE_COLOR,10),3));function NQ(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function xQ(t,e){if(Nl===0)return 0;if(ws("color=16m")||ws("color=full")||ws("color=truecolor"))return 3;if(ws("color=256"))return 2;if(t&&!e&&Nl===void 0)return 0;let r=Nl||0;if(ti.TERM==="dumb")return r;if(process.platform==="win32"){let i=Xwe.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in ti)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in ti)||ti.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in ti)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ti.TEAMCITY_VERSION)?1:0;if(ti.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ti){let i=parseInt((ti.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ti.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ti.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ti.TERM)||"COLORTERM"in ti?1:r}function Zwe(t){let e=xQ(t,t&&t.isTTY);return NQ(e)}Dj.exports={supportsColor:Zwe,stdout:NQ(xQ(!0,Tj.isatty(1))),stderr:NQ(xQ(!0,Tj.isatty(2)))}});var Oj=A((ri,WE)=>{var e3e=require("tty"),YE=require("util");ri.init=o3e;ri.log=n3e;ri.formatArgs=r3e;ri.save=s3e;ri.load=a3e;ri.useColors=t3e;ri.destroy=YE.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ri.colors=[6,2,3,4,5,1];try{let t=Pj();t&&(t.stderr||t).level>=2&&(ri.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ri.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,s)=>s.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),t[r]=i,t},{});function t3e(){return"colors"in ri.inspectOpts?!!ri.inspectOpts.colors:e3e.isatty(process.stderr.fd)}function r3e(t){let{namespace:e,useColors:r}=this;if(r){let i=this.color,n="\x1B[3"+(i<8?i:"8;5;"+i),s=` ${n};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
+ `)}});var MW=f((pnt,$0e)=>{$0e.exports={name:"@actions/artifact",version:"4.0.0",preview:!0,description:"Actions artifact lib",keywords:["github","actions","artifact"],homepage:"https://github.com/actions/toolkit/tree/main/packages/artifact",license:"MIT",main:"lib/artifact.js",types:"lib/artifact.d.ts",directories:{lib:"lib",test:"__tests__"},files:["lib","!.DS_Store"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/actions/toolkit.git",directory:"packages/artifact"},scripts:{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json",test:"cd ../../ && npm run test ./packages/artifact",bootstrap:"cd ../../ && npm run bootstrap","tsc-run":"tsc",tsc:"npm run bootstrap && npm run tsc-run","gen:docs":"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"},bugs:{url:"https://github.com/actions/toolkit/issues"},dependencies:{"@actions/core":"^1.10.0","@actions/github":"^6.0.1","@actions/http-client":"^2.1.0","@azure/core-http":"^3.0.5","@azure/storage-blob":"^12.15.0","@octokit/core":"^5.2.1","@octokit/plugin-request-log":"^1.0.4","@octokit/plugin-retry":"^3.0.9","@octokit/request":"^8.4.1","@octokit/request-error":"^5.1.1","@protobuf-ts/plugin":"^2.2.3-alpha.1",archiver:"^7.0.1","jwt-decode":"^3.1.2","unzip-stream":"^0.3.1"},devDependencies:{"@types/archiver":"^5.3.2","@types/unzip-stream":"^0.3.4",typedoc:"^0.28.13","typedoc-plugin-markdown":"^3.17.1",typescript:"^5.2.2"},overrides:{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}});var Hu=f(rv=>{"use strict";Object.defineProperty(rv,"__esModule",{value:!0});rv.getUserAgentString=X0e;var K0e=MW();function X0e(){return`@actions/artifact-${K0e.version}`}});var ca=f(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.UsageError=mi.NetworkError=mi.GHESNotSupportedError=mi.ArtifactNotFoundError=mi.InvalidResponseError=mi.FilesNotFoundError=void 0;var nv=class extends Error{constructor(e=[]){let r="No files were found to upload";e.length>0&&(r+=`: ${e.join(", ")}`),super(r),this.files=e,this.name="FilesNotFoundError"}};mi.FilesNotFoundError=nv;var iv=class extends Error{constructor(e){super(e),this.name="InvalidResponseError"}};mi.InvalidResponseError=iv;var sv=class extends Error{constructor(e="Artifact not found"){super(e),this.name="ArtifactNotFoundError"}};mi.ArtifactNotFoundError=sv;var ov=class extends Error{constructor(e="@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES."){super(e),this.name="GHESNotSupportedError"}};mi.GHESNotSupportedError=ov;var lI=class extends Error{constructor(e){let r=`Unable to make request: ${e}
+If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};mi.NetworkError=lI;lI.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var AI=class extends Error{constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts. Usage is recalculated every 6-12 hours.
+More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};mi.UsageError=AI;AI.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var HW=f((ynt,qW)=>{"use strict";function cv(t){this.message=t}cv.prototype=new Error,cv.prototype.name="InvalidCharacterError";var FW=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new cv("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,i=0,s=0,o="";n=e.charAt(s++);~n&&(r=i%4?64*r+n:n,i++%4)?o+=String.fromCharCode(255&r>>(-2*i&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return o};function Z0e(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return(function(r){return decodeURIComponent(FW(r).replace(/(.)/g,(function(n,i){var s=i.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s})))})(e)}catch{return FW(e)}}function bp(t){this.message=t}function UW(t,e){if(typeof t!="string")throw new bp("Invalid token specified");var r=(e=e||{}).header===!0?0:1;try{return JSON.parse(Z0e(t.split(".")[r]))}catch(n){throw new bp("Invalid token specified: "+n.message)}}bp.prototype=new Error,bp.prototype.name="InvalidTokenError";var av=UW;av.default=UW,av.InvalidTokenError=bp,qW.exports=av});var xl=f(Li=>{"use strict";var ewe=Li&&Li.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),twe=Li&&Li.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rwe=Li&&Li.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i{"use strict";var fI=Qp&&Qp.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(A){try{l(n.next(A))}catch(u){o(u)}}function c(A){try{l(n.throw(A))}catch(u){o(u)}}function l(A){A.done?s(A.value):i(A.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Qp,"__esModule",{value:!0});Qp.internalArtifactTwirpClient=dwe;var Gu=ap(),cwe=mR(),ju=Lr(),lwe=$a(),jW=Ya(),Awe=Hu(),wp=ca(),uwe=xl(),Av=class{constructor(e,r,n,i){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let s=(0,jW.getRuntimeToken)();this.baseUrl=(0,jW.getResultsServiceUrl)(),r&&(this.maxAttempts=r),n&&(this.baseRetryIntervalMilliseconds=n),i&&(this.retryMultiplier=i),this.httpClient=new Gu.HttpClient(e,[new cwe.BearerCredentialHandler(s)])}request(e,r,n,i){return fI(this,void 0,void 0,function*(){let s=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;(0,ju.debug)(`[Request] ${r} ${s}`);let o={"Content-Type":n};try{let{body:a}=yield this.retryableRequest(()=>fI(this,void 0,void 0,function*(){return this.httpClient.post(s,JSON.stringify(i),o)}));return a}catch(a){throw new Error(`Failed to ${r}: ${a.message}`)}})}retryableRequest(e){return fI(this,void 0,void 0,function*(){let r=0,n="",i="";for(;r=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[Gu.HttpCodes.BadGateway,Gu.HttpCodes.GatewayTimeout,Gu.HttpCodes.InternalServerError,Gu.HttpCodes.ServiceUnavailable,Gu.HttpCodes.TooManyRequests].includes(e):!1}sleep(e){return fI(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw new Error("attempt should be a positive integer");if(e===0)return this.baseRetryIntervalMilliseconds;let r=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,e),n=r*this.retryMultiplier;return Math.trunc(Math.random()*(n-r)+r)}};function dwe(t){let e=new Av((0,Awe.getUserAgentString)(),t?.maxAttempts,t?.retryIntervalMs,t?.retryMultiplier);return new lwe.ArtifactServiceClientJSON(e)}});var YW=f(Ao=>{"use strict";var fwe=Ao&&Ao.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hwe=Ao&&Ao.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pwe=Ao&&Ao.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;imJ,__assign:()=>pI,__asyncDelegator:()=>lJ,__asyncGenerator:()=>cJ,__asyncValues:()=>AJ,__await:()=>Yu,__awaiter:()=>rJ,__classPrivateFieldGet:()=>hJ,__classPrivateFieldIn:()=>gJ,__classPrivateFieldSet:()=>pJ,__createBinding:()=>mI,__decorate:()=>VW,__disposeResources:()=>yJ,__esDecorate:()=>KW,__exportStar:()=>iJ,__extends:()=>WW,__generator:()=>nJ,__importDefault:()=>fJ,__importStar:()=>dJ,__makeTemplateObject:()=>uJ,__metadata:()=>tJ,__param:()=>$W,__propKey:()=>ZW,__read:()=>hv,__rest:()=>JW,__rewriteRelativeImportExtension:()=>EJ,__runInitializers:()=>XW,__setFunctionName:()=>eJ,__spread:()=>sJ,__spreadArray:()=>aJ,__spreadArrays:()=>oJ,__values:()=>gI,default:()=>Iwe});function WW(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");dv(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function JW(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function $W(t,e){return function(r,n){e(r,n,t)}}function KW(t,e,r,n,i,s){function o(I){if(I!==void 0&&typeof I!="function")throw new TypeError("Function expected");return I}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!e&&t?n.static?t:t.prototype:null,A=e||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),u,d=!1,h=r.length-1;h>=0;h--){var g={};for(var E in n)g[E]=E==="access"?{}:n[E];for(var E in n.access)g.access[E]=n.access[E];g.addInitializer=function(I){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(I||null))};var C=(0,r[h])(a==="accessor"?{get:A.get,set:A.set}:A[c],g);if(a==="accessor"){if(C===void 0)continue;if(C===null||typeof C!="object")throw new TypeError("Object expected");(u=o(C.get))&&(A.get=u),(u=o(C.set))&&(A.set=u),(u=o(C.init))&&i.unshift(u)}else(u=o(C))&&(a==="field"?i.unshift(u):A[c]=u)}l&&Object.defineProperty(l,n.name,A),d=!0}function XW(t,e,r){for(var n=arguments.length>2,i=0;i0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function hv(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function sJ(){for(var t=[],e=0;e1||c(h,E)})},g&&(i[h]=g(i[h])))}function c(h,g){try{l(n[h](g))}catch(E){d(s[0][3],E)}}function l(h){h.value instanceof Yu?Promise.resolve(h.value.v).then(A,u):d(s[0][2],h)}function A(h){c("next",h)}function u(h){c("throw",h)}function d(h,g){h(g),s.shift(),s.length&&c(s[0][0],s[0][1])}}function lJ(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:Yu(t[i](o)),done:!1}:s?s(o):o}:s}}function AJ(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof gI=="function"?gI(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function uJ(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function dJ(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=fv(t),n=0;n{dv=function(t,e){return dv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},dv(t,e)};pI=function(){return pI=Object.assign||function(e){for(var r,n=1,i=arguments.length;n{"use strict";Object.defineProperty(yI,"__esModule",{value:!0});yI.AbortError=void 0;var pv=class extends Error{constructor(e){super(e),this.name="AbortError"}};yI.AbortError=pv});var IJ=f(gv=>{"use strict";Object.defineProperty(gv,"__esModule",{value:!0});gv.log=Qwe;var CJ=(nr(),ar(rr)),Bwe=require("node:os"),bwe=CJ.__importDefault(require("node:util")),wwe=CJ.__importDefault(require("node:process"));function Qwe(t,...e){wwe.default.stderr.write(`${bwe.default.format(t,...e)}${Bwe.EOL}`)}});var SJ=f(Iv=>{"use strict";Object.defineProperty(Iv,"__esModule",{value:!0});var _we=IJ(),BJ=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,wJ,mv=[],yv=[],EI=[];BJ&&Ev(BJ);var QJ=Object.assign(t=>_J(t),{enable:Ev,enabled:Cv,disable:Swe,log:_we.log});function Ev(t){wJ=t,mv=[],yv=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?yv.push(r.substring(1)):mv.push(r);for(let r of EI)r.enabled=Cv(r.namespace)}function Cv(t){if(t.endsWith("*"))return!0;for(let e of yv)if(bJ(t,e))return!1;for(let e of mv)if(bJ(t,e))return!0;return!1}function bJ(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let d=[],h="";for(let g of e)g==="*"&&h==="*"||(h=g,d.push(g));r=d.join("")}let n=0,i=0,s=r.length,o=t.length,a=-1,c=-1;for(;n=0){if(i=a+1,n=c+1,n===o)return!1;for(;t[n]!==r[i];)if(n++,n===o)return!1;c=n,n++,i++;continue}else return!1;let l=n===t.length,A=i===r.length,u=i===r.length-1&&r[i]==="*";return l&&(A||u)}function Swe(){let t=wJ||"";return Ev(""),t}function _J(t){let e=Object.assign(r,{enabled:Cv(t),destroy:Nwe,log:QJ.log,namespace:t,extend:Rwe});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return EI.push(e),e}function Nwe(){let t=EI.indexOf(this);return t>=0?(EI.splice(t,1),!0):!1}function Rwe(t){let e=_J(`${this.namespace}:${t}`);return e.log=this.log,e}Iv.default=QJ});var Np=f(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.TypeSpecRuntimeLogger=void 0;Ka.createLoggerContext=vJ;Ka.setLogLevel=vwe;Ka.getLogLevel=Twe;Ka.createClientLogger=Pwe;var xwe=(nr(),ar(rr)),Sp=xwe.__importDefault(SJ()),Bv=["verbose","info","warning","error"],NJ={verbose:400,info:300,warning:200,error:100};function RJ(t,e){e.log=(...r)=>{t.log(...r)}}function xJ(t){return Bv.includes(t)}function vJ(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,n,i=(0,Sp.default)(t.namespace);i.log=(...A)=>{Sp.default.log(...A)};function s(A){if(A&&!xJ(A))throw new Error(`Unknown log level '${A}'. Acceptable values: ${Bv.join(",")}`);n=A;let u=[];for(let d of e)o(d)&&u.push(d.namespace);Sp.default.enable(u.join(","))}r&&(xJ(r)?s(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${Bv.join(", ")}.`));function o(A){return!!(n&&NJ[A.level]<=NJ[n])}function a(A,u){let d=Object.assign(A.extend(u),{level:u});if(RJ(A,d),o(d)){let h=Sp.default.disable();Sp.default.enable(h+","+d.namespace)}return e.add(d),d}function c(){return n}function l(A){let u=i.extend(A);return RJ(i,u),{error:a(u,"error"),warning:a(u,"warning"),info:a(u,"info"),verbose:a(u,"verbose")}}return{setLogLevel:s,getLogLevel:c,createClientLogger:l,logger:i}}var CI=vJ({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"});Ka.TypeSpecRuntimeLogger=CI.logger;function vwe(t){CI.setLogLevel(t)}function Twe(){return CI.getLogLevel()}function Pwe(t){return CI.createClientLogger(t)}});var Xa=f(wv=>{"use strict";Object.defineProperty(wv,"__esModule",{value:!0});wv.createHttpHeaders=kwe;function II(t){return t.toLowerCase()}function*Dwe(t){for(let e of t.values())yield[e.name,e.value]}var bv=class{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(II(e),{name:e,value:String(r).trim()})}get(e){return this._headersMap.get(II(e))?.value}has(e){return this._headersMap.has(II(e))}delete(e){this._headersMap.delete(II(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let n of this._headersMap.values())r[n.name]=n.value;else for(let[n,i]of this._headersMap)r[n]=i.value;return r}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return Dwe(this._headersMap)}};function kwe(t){return new bv(t)}});var PJ=f(TJ=>{"use strict";Object.defineProperty(TJ,"__esModule",{value:!0})});var kJ=f(DJ=>{"use strict";Object.defineProperty(DJ,"__esModule",{value:!0})});var BI=f(Qv=>{"use strict";Object.defineProperty(Qv,"__esModule",{value:!0});Qv.randomUUID=Mwe;var Owe=require("node:crypto"),Lwe=typeof globalThis?.crypto?.randomUUID=="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):Owe.randomUUID;function Mwe(){return Lwe()}});var Nv=f(Sv=>{"use strict";Object.defineProperty(Sv,"__esModule",{value:!0});Sv.createPipelineRequest=qwe;var Fwe=Xa(),Uwe=BI(),_v=class{url;method;headers;timeout;withCredentials;body;multipartBody;formData;streamResponseStatusCodes;enableBrowserStreams;proxySettings;disableKeepAlive;abortSignal;requestId;allowInsecureConnection;onUploadProgress;onDownloadProgress;requestOverrides;authSchemes;constructor(e){this.url=e.url,this.body=e.body,this.headers=e.headers??(0,Fwe.createHttpHeaders)(),this.method=e.method??"GET",this.timeout=e.timeout??0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=e.disableKeepAlive??!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=e.withCredentials??!1,this.abortSignal=e.abortSignal,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||(0,Uwe.randomUUID)(),this.allowInsecureConnection=e.allowInsecureConnection??!1,this.enableBrowserStreams=e.enableBrowserStreams??!1,this.requestOverrides=e.requestOverrides,this.authSchemes=e.authSchemes}};function qwe(t){return new _v(t)}});var vv=f(xv=>{"use strict";Object.defineProperty(xv,"__esModule",{value:!0});xv.createEmptyPipeline=Hwe;var OJ=new Set(["Deserialize","Serialize","Retry","Sign"]),Rv=class t{_policies=[];_orderedPolicies;constructor(e){this._policies=e?.slice(0)??[],this._orderedPolicies=void 0}addPolicy(e,r={}){if(r.phase&&r.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(r.phase&&!OJ.has(r.phase))throw new Error(`Invalid phase name: ${r.phase}`);if(r.afterPhase&&!OJ.has(r.afterPhase))throw new Error(`Invalid afterPhase name: ${r.afterPhase}`);this._policies.push({policy:e,options:r}),this._orderedPolicies=void 0}removePolicy(e){let r=[];return this._policies=this._policies.filter(n=>e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase?(r.push(n.policy),!1):!0),this._orderedPolicies=void 0,r}sendRequest(e,r){return this.getOrderedPolicies().reduceRight((s,o)=>a=>o.sendRequest(a,s),s=>e.sendRequest(s))(r)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new t(this._policies)}static create(){return new t}orderPolicies(){let e=[],r=new Map;function n(g){return{name:g,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}let i=n("Serialize"),s=n("None"),o=n("Deserialize"),a=n("Retry"),c=n("Sign"),l=[i,s,o,a,c];function A(g){return g==="Retry"?a:g==="Serialize"?i:g==="Deserialize"?o:g==="Sign"?c:s}for(let g of this._policies){let E=g.policy,C=g.options,I=E.name;if(r.has(I))throw new Error("Duplicate policy names not allowed in pipeline");let R={policy:E,dependsOn:new Set,dependants:new Set};C.afterPhase&&(R.afterPhase=A(C.afterPhase),R.afterPhase.hasAfterPolicies=!0),r.set(I,R),A(C.phase).policies.add(R)}for(let g of this._policies){let{policy:E,options:C}=g,I=E.name,R=r.get(I);if(!R)throw new Error(`Missing node for policy ${I}`);if(C.afterPolicies)for(let P of C.afterPolicies){let M=r.get(P);M&&(R.dependsOn.add(M),M.dependants.add(R))}if(C.beforePolicies)for(let P of C.beforePolicies){let M=r.get(P);M&&(M.dependsOn.add(R),R.dependants.add(M))}}function u(g){g.hasRun=!0;for(let E of g.policies)if(!(E.afterPhase&&(!E.afterPhase.hasRun||E.afterPhase.policies.size))&&E.dependsOn.size===0){e.push(E.policy);for(let C of E.dependants)C.dependsOn.delete(E);r.delete(E.policy.name),g.policies.delete(E)}}function d(){for(let g of l){if(u(g),g.policies.size>0&&g!==s){s.hasRun||u(s);return}g.hasAfterPolicies&&u(s)}}let h=0;for(;r.size>0;){h++;let g=e.length;if(d(),e.length<=g&&h>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}};function Hwe(){return Rv.create()}});var bI=f(Tv=>{"use strict";Object.defineProperty(Tv,"__esModule",{value:!0});Tv.isObject=Gwe;function Gwe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}});var Dv=f(Pv=>{"use strict";Object.defineProperty(Pv,"__esModule",{value:!0});Pv.isError=zwe;var jwe=bI();function zwe(t){if((0,jwe.isObject)(t)){let e=typeof t.name=="string",r=typeof t.message=="string";return e&&r}return!1}});var LJ=f(wI=>{"use strict";Object.defineProperty(wI,"__esModule",{value:!0});wI.custom=void 0;var Ywe=require("node:util");wI.custom=Ywe.inspect.custom});var Rp=f(QI=>{"use strict";Object.defineProperty(QI,"__esModule",{value:!0});QI.Sanitizer=void 0;var Wwe=bI(),kv="REDACTED",Jwe=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],Vwe=["api-version"],Ov=class{allowedHeaderNames;allowedQueryParameters;constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:r=[]}={}){e=Jwe.concat(e),r=Vwe.concat(r),this.allowedHeaderNames=new Set(e.map(n=>n.toLowerCase())),this.allowedQueryParameters=new Set(r.map(n=>n.toLowerCase()))}sanitize(e){let r=new Set;return JSON.stringify(e,(n,i)=>{if(i instanceof Error)return{...i,name:i.name,message:i.message};if(n==="headers")return this.sanitizeHeaders(i);if(n==="url")return this.sanitizeUrl(i);if(n==="query")return this.sanitizeQuery(i);if(n==="body")return;if(n==="response")return;if(n==="operationSpec")return;if(Array.isArray(i)||(0,Wwe.isObject)(i)){if(r.has(i))return"[Circular]";r.add(i)}return i},2)}sanitizeUrl(e){if(typeof e!="string"||e===null||e==="")return e;let r=new URL(e);if(!r.search)return e;for(let[n]of r.searchParams)this.allowedQueryParameters.has(n.toLowerCase())||r.searchParams.set(n,kv);return r.toString()}sanitizeHeaders(e){let r={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?r[n]=e[n]:r[n]=kv;return r}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let r={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?r[n]=e[n]:r[n]=kv;return r}};QI.Sanitizer=Ov});var Wu=f(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});xp.RestError=void 0;xp.isRestError=eQe;var $we=Dv(),Kwe=LJ(),Xwe=Rp(),Zwe=new Xwe.Sanitizer,_I=class t extends Error{static REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";static PARSE_ERROR="PARSE_ERROR";code;statusCode;request;response;details;constructor(e,r={}){super(e),this.name="RestError",this.code=r.code,this.statusCode=r.statusCode,Object.defineProperty(this,"request",{value:r.request,enumerable:!1}),Object.defineProperty(this,"response",{value:r.response,enumerable:!1});let n=this.request?.agent?{maxFreeSockets:this.request.agent.maxFreeSockets,maxSockets:this.request.agent.maxSockets}:void 0;Object.defineProperty(this,Kwe.custom,{value:()=>`RestError: ${this.message}
+ ${Zwe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};xp.RestError=_I;function eQe(t){return t instanceof _I?!0:(0,$we.isError)(t)&&t.name==="RestError"}});var vl=f(SI=>{"use strict";Object.defineProperty(SI,"__esModule",{value:!0});SI.uint8ArrayToString=tQe;SI.stringToUint8Array=rQe;function tQe(t,e){return Buffer.from(t).toString(e)}function rQe(t,e){return Buffer.from(t,e)}});var vp=f(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});NI.logger=void 0;var nQe=Np();NI.logger=(0,nQe.createClientLogger)("ts-http-runtime")});var GJ=f(xI=>{"use strict";Object.defineProperty(xI,"__esModule",{value:!0});xI.getBodyLength=HJ;xI.createNodeHttpClient=uQe;var Uv=(nr(),ar(rr)),Lv=Uv.__importDefault(require("node:http")),Mv=Uv.__importDefault(require("node:https")),MJ=Uv.__importDefault(require("node:zlib")),iQe=require("node:stream"),FJ=_p(),sQe=Xa(),Pp=Wu(),Ju=vp(),oQe=Rp(),aQe={};function Tp(t){return t&&typeof t.pipe=="function"}function UJ(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function qJ(t){return t&&typeof t.byteLength=="number"}var RI=class extends iQe.Transform{loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(i){n(i)}}constructor(e){super(),this.progressCallback=e}},Fv=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new FJ.AbortError("The operation was aborted. Request has already been canceled.");n=l=>{l.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",n)}let i;e.timeout>0&&(i=setTimeout(()=>{let l=new oQe.Sanitizer;Ju.logger.info(`request to '${l.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let s=e.headers.get("Accept-Encoding"),o=s?.includes("gzip")||s?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let l=HJ(a);l!==null&&e.headers.set("Content-Length",l)}let c;try{if(a&&e.onUploadProgress){let g=e.onUploadProgress,E=new RI(g);E.on("error",C=>{Ju.logger.error("Error in upload progress",C)}),Tp(a)?a.pipe(E):E.end(a),a=E}let l=await this.makeRequest(e,r,a);i!==void 0&&clearTimeout(i);let A=cQe(l),d={status:l.statusCode??0,headers:A,request:e};if(e.method==="HEAD")return l.resume(),d;c=o?lQe(l,A):l;let h=e.onDownloadProgress;if(h){let g=new RI(h);g.on("error",E=>{Ju.logger.error("Error in download progress",E)}),c.pipe(g),c=g}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=c:d.bodyAsText=await AQe(c),d}finally{if(e.abortSignal&&n){let l=Promise.resolve();Tp(a)&&(l=UJ(a));let A=Promise.resolve();Tp(c)&&(A=UJ(c)),Promise.all([l,A]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(u=>{Ju.logger.warning("Error when cleaning up abortListener on httpRequest",u)})}}}makeRequest(e,r,n){let i=new URL(e.url),s=i.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,s),hostname:i.hostname,path:`${i.pathname}${i.search}`,port:i.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,l)=>{let A=s?Lv.default.request(a,c):Mv.default.request(a,c);A.once("error",u=>{l(new Pp.RestError(u.message,{code:u.code??Pp.RestError.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let u=new FJ.AbortError("The operation was aborted. Rejecting from abort signal callback while making request.");A.destroy(u),l(u)}),n&&Tp(n)?n.pipe(A):n?typeof n=="string"||Buffer.isBuffer(n)?A.end(n):qJ(n)?A.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Ju.logger.error("Unrecognized body type",n),l(new Pp.RestError("Unrecognized body type"))):A.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?Lv.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Lv.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return Mv.default.globalAgent;let i=e.tlsSettings??aQe,s=this.cachedHttpsAgents.get(i);return s&&s.options.keepAlive===!n||(Ju.logger.info("No cached TLS Agent exist, creating a new Agent"),s=new Mv.default.Agent({keepAlive:!n,...i}),this.cachedHttpsAgents.set(i,s)),s}}};function cQe(t){let e=(0,sQe.createHttpHeaders)();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}function lQe(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=MJ.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=MJ.default.createInflate();return t.pipe(n),n}return t}function AQe(t){return new Promise((e,r)=>{let n=[];t.on("data",i=>{Buffer.isBuffer(i)?n.push(i):n.push(Buffer.from(i))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",i=>{i&&i?.name==="AbortError"?r(i):r(new Pp.RestError(`Error reading response as text: ${i.message}`,{code:Pp.RestError.PARSE_ERROR}))})})}function HJ(t){return t?Buffer.isBuffer(t)?t.length:Tp(t)?null:qJ(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function uQe(){return new Fv}});var Hv=f(qv=>{"use strict";Object.defineProperty(qv,"__esModule",{value:!0});qv.createDefaultHttpClient=fQe;var dQe=GJ();function fQe(){return(0,dQe.createNodeHttpClient)()}});var Gv=f(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});Vu.logPolicyName=void 0;Vu.logPolicy=gQe;var hQe=vp(),pQe=Rp();Vu.logPolicyName="logPolicy";function gQe(t={}){let e=t.logger??hQe.logger.info,r=new pQe.Sanitizer({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:Vu.logPolicyName,async sendRequest(n,i){if(!e.enabled)return i(n);e(`Request: ${r.sanitize(n)}`);let s=await i(n);return e(`Response status code: ${s.status}`),e(`Headers: ${r.sanitize(s.headers)}`),s}}}});var jv=f($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.redirectPolicyName=void 0;$u.redirectPolicy=mQe;$u.redirectPolicyName="redirectPolicy";var jJ=["GET","HEAD"];function mQe(t={}){let{maxRetries:e=20}=t;return{name:$u.redirectPolicyName,async sendRequest(r,n){let i=await n(r);return zJ(n,i,e)}}}async function zJ(t,e,r,n=0){let{request:i,status:s,headers:o}=e,a=o.get("location");if(a&&(s===300||s===301&&jJ.includes(i.method)||s===302&&jJ.includes(i.method)||s===303&&i.method==="POST"||s===307)&&n{"use strict";Object.defineProperty(vI,"__esModule",{value:!0});vI.getHeaderName=yQe;vI.setPlatformSpecificData=EQe;var YJ=(nr(),ar(rr)),zv=YJ.__importDefault(require("node:os")),Yv=YJ.__importDefault(require("node:process"));function yQe(){return"User-Agent"}async function EQe(t){if(Yv.default&&Yv.default.versions){let e=Yv.default.versions;e.bun?t.set("Bun",e.bun):e.deno?t.set("Deno",e.deno):e.node&&t.set("Node",e.node)}t.set("OS",`(${zv.default.arch()}-${zv.default.type()}-${zv.default.release()})`)}});var Tl=f(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.DEFAULT_RETRY_POLICY_COUNT=Ku.SDK_VERSION=void 0;Ku.SDK_VERSION="0.3.1";Ku.DEFAULT_RETRY_POLICY_COUNT=3});var VJ=f(TI=>{"use strict";Object.defineProperty(TI,"__esModule",{value:!0});TI.getUserAgentHeaderName=BQe;TI.getUserAgentValue=bQe;var JJ=WJ(),CQe=Tl();function IQe(t){let e=[];for(let[r,n]of t){let i=n?`${r}/${n}`:r;e.push(i)}return e.join(" ")}function BQe(){return(0,JJ.getHeaderName)()}async function bQe(t){let e=new Map;e.set("ts-http-runtime",CQe.SDK_VERSION),await(0,JJ.setPlatformSpecificData)(e);let r=IQe(e);return t?`${t} ${r}`:r}});var Wv=f(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});Xu.userAgentPolicyName=void 0;Xu.userAgentPolicy=wQe;var KJ=VJ(),$J=(0,KJ.getUserAgentHeaderName)();Xu.userAgentPolicyName="userAgentPolicy";function wQe(t={}){let e=(0,KJ.getUserAgentValue)(t.userAgentPrefix);return{name:Xu.userAgentPolicyName,async sendRequest(r,n){return r.headers.has($J)||r.headers.set($J,await e),n(r)}}}});var Jv=f(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.decompressResponsePolicyName=void 0;Zu.decompressResponsePolicy=QQe;Zu.decompressResponsePolicyName="decompressResponsePolicy";function QQe(){return{name:Zu.decompressResponsePolicyName,async sendRequest(t,e){return t.method!=="HEAD"&&t.headers.set("Accept-Encoding","gzip,deflate"),e(t)}}}});var $v=f(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});Vv.getRandomIntegerInclusive=_Qe;function _Qe(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}});var Xv=f(Kv=>{"use strict";Object.defineProperty(Kv,"__esModule",{value:!0});Kv.calculateRetryDelay=NQe;var SQe=$v();function NQe(t,e){let r=e.retryDelayInMs*Math.pow(2,t),n=Math.min(e.maxRetryDelayInMs,r);return{retryAfterInMs:n/2+(0,SQe.getRandomIntegerInclusive)(0,n/2)}}});var Zv=f(PI=>{"use strict";Object.defineProperty(PI,"__esModule",{value:!0});PI.delay=vQe;PI.parseHeaderValueAsNumber=TQe;var RQe=_p(),xQe="The operation was aborted.";function vQe(t,e,r){return new Promise((n,i)=>{let s,o,a=()=>i(new RQe.AbortError(r?.abortErrorMsg?r?.abortErrorMsg:xQe)),c=()=>{r?.abortSignal&&o&&r.abortSignal.removeEventListener("abort",o)};if(o=()=>(s&&clearTimeout(s),c(),a()),r?.abortSignal&&r.abortSignal.aborted)return a();s=setTimeout(()=>{c(),n(e)},t),r?.abortSignal&&r.abortSignal.addEventListener("abort",o)})}function TQe(t,e){let r=t.headers.get(e);if(!r)return;let n=Number(r);if(!Number.isNaN(n))return n}});var kI=f(DI=>{"use strict";Object.defineProperty(DI,"__esModule",{value:!0});DI.isThrottlingRetryResponse=kQe;DI.throttlingRetryStrategy=OQe;var PQe=Zv(),eT="Retry-After",DQe=["retry-after-ms","x-ms-retry-after-ms",eT];function XJ(t){if(t&&[429,503].includes(t.status))try{for(let i of DQe){let s=(0,PQe.parseHeaderValueAsNumber)(t,i);if(s===0||s)return s*(i===eT?1e3:1)}let e=t.headers.get(eT);if(!e)return;let n=Date.parse(e)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch{return}}function kQe(t){return Number.isFinite(XJ(t))}function OQe(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=XJ(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}});var OI=f(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.exponentialRetryStrategy=qQe;Dp.isExponentialRetryResponse=ZJ;Dp.isSystemError=eV;var LQe=Xv(),MQe=kI(),FQe=1e3,UQe=1e3*64;function qQe(t={}){let e=t.retryDelayInMs??FQe,r=t.maxRetryDelayInMs??UQe;return{name:"exponentialRetryStrategy",retry({retryCount:n,response:i,responseError:s}){let o=eV(s),a=o&&t.ignoreSystemErrors,c=ZJ(i),l=c&&t.ignoreHttpStatusCodes;return i&&((0,MQe.isThrottlingRetryResponse)(i)||!c)||l||a?{skipStrategy:!0}:s&&!o&&!c?{errorToThrow:s}:(0,LQe.calculateRetryDelay)(n,{retryDelayInMs:e,maxRetryDelayInMs:r})}}}function ZJ(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}function eV(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}});var ed=f(tT=>{"use strict";Object.defineProperty(tT,"__esModule",{value:!0});tT.retryPolicy=WQe;var HQe=Zv(),GQe=_p(),jQe=Np(),tV=Tl(),zQe=(0,jQe.createClientLogger)("ts-http-runtime retryPolicy"),YQe="retryPolicy";function WQe(t,e={maxRetries:tV.DEFAULT_RETRY_POLICY_COUNT}){let r=e.logger||zQe;return{name:YQe,async sendRequest(n,i){let s,o,a=-1;e:for(;;){a+=1,s=void 0,o=void 0;try{r.info(`Retry ${a}: Attempting to send request`,n.requestId),s=await i(n),r.info(`Retry ${a}: Received a response from request`,n.requestId)}catch(c){if(r.error(`Retry ${a}: Received an error from request`,n.requestId),o=c,!c||o.name!=="RestError")throw c;s=o.response}if(n.abortSignal?.aborted)throw r.error(`Retry ${a}: Request aborted.`),new GQe.AbortError;if(a>=(e.maxRetries??tV.DEFAULT_RETRY_POLICY_COUNT)){if(r.info(`Retry ${a}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),o)throw o;if(s)return s;throw new Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${a}: Processing ${t.length} retry strategies.`);t:for(let c of t){let l=c.logger||r;l.info(`Retry ${a}: Processing retry strategy ${c.name}.`);let A=c.retry({retryCount:a,response:s,responseError:o});if(A.skipStrategy){l.info(`Retry ${a}: Skipped.`);continue t}let{errorToThrow:u,retryAfterInMs:d,redirectTo:h}=A;if(u)throw l.error(`Retry ${a}: Retry strategy ${c.name} throws error:`,u),u;if(d||d===0){l.info(`Retry ${a}: Retry strategy ${c.name} retries after ${d}`),await(0,HQe.delay)(d,void 0,{abortSignal:n.abortSignal});continue e}if(h){l.info(`Retry ${a}: Retry strategy ${c.name} redirects to ${h}`),n.url=h;continue e}}if(o)throw r.info("None of the retry strategies could work with the received error. Throwing it."),o;if(s)return r.info("None of the retry strategies could work with the received response. Returning it."),s}}}}});var rT=f(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.defaultRetryPolicyName=void 0;td.defaultRetryPolicy=XQe;var JQe=OI(),VQe=kI(),$Qe=ed(),KQe=Tl();td.defaultRetryPolicyName="defaultRetryPolicy";function XQe(t={}){return{name:td.defaultRetryPolicyName,sendRequest:(0,$Qe.retryPolicy)([(0,VQe.throttlingRetryStrategy)(),(0,JQe.exponentialRetryStrategy)(t)],{maxRetries:t.maxRetries??KQe.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}});var kp=f(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.isReactNative=Ur.isNodeRuntime=Ur.isNodeLike=Ur.isBun=Ur.isDeno=Ur.isWebWorker=Ur.isBrowser=void 0;Ur.isBrowser=typeof window<"u"&&typeof window.document<"u";Ur.isWebWorker=typeof self=="object"&&typeof self?.importScripts=="function"&&(self.constructor?.name==="DedicatedWorkerGlobalScope"||self.constructor?.name==="ServiceWorkerGlobalScope"||self.constructor?.name==="SharedWorkerGlobalScope");Ur.isDeno=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u";Ur.isBun=typeof Bun<"u"&&typeof Bun.version<"u";Ur.isNodeLike=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!globalThis.process.versions?.node;Ur.isNodeRuntime=Ur.isNodeLike&&!Ur.isBun&&!Ur.isDeno;Ur.isReactNative=typeof navigator<"u"&&navigator?.product==="ReactNative"});var nT=f(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.formDataPolicyName=void 0;rd.formDataPolicy=r_e;var ZQe=vl(),e_e=kp(),rV=Xa();rd.formDataPolicyName="formDataPolicy";function t_e(t){let e={};for(let[r,n]of t.entries())e[r]??=[],e[r].push(n);return e}function r_e(){return{name:rd.formDataPolicyName,async sendRequest(t,e){if(e_e.isNodeLike&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=t_e(t.body),t.body=void 0),t.formData){let r=t.headers.get("Content-Type");r&&r.indexOf("application/x-www-form-urlencoded")!==-1?t.body=n_e(t.formData):await i_e(t.formData,t),t.formData=void 0}return e(t)}}}function n_e(t){let e=new URLSearchParams;for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let i of n)e.append(r,i.toString());else e.append(r,n.toString());return e.toString()}async function i_e(t,e){let r=e.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",r??"multipart/form-data");let n=[];for(let[i,s]of Object.entries(t))for(let o of Array.isArray(s)?s:[s])if(typeof o=="string")n.push({headers:(0,rV.createHttpHeaders)({"Content-Disposition":`form-data; name="${i}"`}),body:(0,ZQe.stringToUint8Array)(o,"utf-8")});else{if(o==null||typeof o!="object")throw new Error(`Unexpected value for key ${i}: ${o}. Value should be serialized to string first.`);{let a=o.name||"blob",c=(0,rV.createHttpHeaders)();c.set("Content-Disposition",`form-data; name="${i}"; filename="${a}"`),c.set("Content-Type",o.type||"application/octet-stream"),n.push({headers:c,body:o})}}e.multipartBody={parts:n}}});var iV=f((nit,nV)=>{var nd=1e3,id=nd*60,sd=id*60,Pl=sd*24,s_e=Pl*7,o_e=Pl*365.25;nV.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return a_e(t);if(r==="number"&&isFinite(t))return e.long?l_e(t):c_e(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function a_e(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*o_e;case"weeks":case"week":case"w":return r*s_e;case"days":case"day":case"d":return r*Pl;case"hours":case"hour":case"hrs":case"hr":case"h":return r*sd;case"minutes":case"minute":case"mins":case"min":case"m":return r*id;case"seconds":case"second":case"secs":case"sec":case"s":return r*nd;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function c_e(t){var e=Math.abs(t);return e>=Pl?Math.round(t/Pl)+"d":e>=sd?Math.round(t/sd)+"h":e>=id?Math.round(t/id)+"m":e>=nd?Math.round(t/nd)+"s":t+"ms"}function l_e(t){var e=Math.abs(t);return e>=Pl?LI(t,e,Pl,"day"):e>=sd?LI(t,e,sd,"hour"):e>=id?LI(t,e,id,"minute"):e>=nd?LI(t,e,nd,"second"):t+" ms"}function LI(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var iT=f((iit,sV)=>{function A_e(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=iV(),r.destroy=l,Object.keys(t).forEach(A=>{r[A]=t[A]}),r.names=[],r.skips=[],r.formatters={};function e(A){let u=0;for(let d=0;d{if(se==="%%")return"%";M++;let te=r.formatters[U];if(typeof te=="function"){let L=C[M];se=te.call(I,L),C.splice(M,1),M--}return se}),r.formatArgs.call(I,C),(I.log||r.log).apply(I,C)}return E.namespace=A,E.useColors=r.useColors(),E.color=r.selectColor(A),E.extend=n,E.destroy=r.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(A)),g),set:C=>{d=C}}),typeof r.init=="function"&&r.init(E),E}function n(A,u){let d=r(this.namespace+(typeof u>"u"?":":u)+A);return d.log=this.log,d}function i(A){r.save(A),r.namespaces=A,r.names=[],r.skips=[];let u=(typeof A=="string"?A:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(A,u){let d=0,h=0,g=-1,E=0;for(;d"-"+u)].join(",");return r.enable(""),A}function a(A){for(let u of r.skips)if(s(A,u))return!1;for(let u of r.names)if(s(A,u))return!0;return!1}function c(A){return A instanceof Error?A.stack||A.message:A}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}sV.exports=A_e});var oV=f((yi,MI)=>{yi.formatArgs=d_e;yi.save=f_e;yi.load=h_e;yi.useColors=u_e;yi.storage=p_e();yi.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();yi.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u_e(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function d_e(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+MI.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}yi.log=console.debug||console.log||(()=>{});function f_e(t){try{t?yi.storage.setItem("debug",t):yi.storage.removeItem("debug")}catch{}}function h_e(){let t;try{t=yi.storage.getItem("debug")||yi.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function p_e(){try{return localStorage}catch{}}MI.exports=iT()(yi);var{formatters:g_e}=MI.exports;g_e.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var cV=f((sit,aV)=>{"use strict";aV.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var m_e=require("os"),lV=require("tty"),cs=cV(),{env:Wr}=process,Za;cs("no-color")||cs("no-colors")||cs("color=false")||cs("color=never")?Za=0:(cs("color")||cs("colors")||cs("color=true")||cs("color=always"))&&(Za=1);"FORCE_COLOR"in Wr&&(Wr.FORCE_COLOR==="true"?Za=1:Wr.FORCE_COLOR==="false"?Za=0:Za=Wr.FORCE_COLOR.length===0?1:Math.min(parseInt(Wr.FORCE_COLOR,10),3));function sT(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function oT(t,e){if(Za===0)return 0;if(cs("color=16m")||cs("color=full")||cs("color=truecolor"))return 3;if(cs("color=256"))return 2;if(t&&!e&&Za===void 0)return 0;let r=Za||0;if(Wr.TERM==="dumb")return r;if(process.platform==="win32"){let n=m_e.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Wr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Wr)||Wr.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Wr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Wr.TEAMCITY_VERSION)?1:0;if(Wr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Wr){let n=parseInt((Wr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Wr.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Wr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Wr.TERM)||"COLORTERM"in Wr?1:r}function y_e(t){let e=oT(t,t&&t.isTTY);return sT(e)}AV.exports={supportsColor:y_e,stdout:sT(oT(!0,lV.isatty(1))),stderr:sT(oT(!0,lV.isatty(2)))}});var fV=f((Jr,UI)=>{var E_e=require("tty"),FI=require("util");Jr.init=__e;Jr.log=b_e;Jr.formatArgs=I_e;Jr.save=w_e;Jr.load=Q_e;Jr.useColors=C_e;Jr.destroy=FI.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Jr.colors=[6,2,3,4,5,1];try{let t=uV();t&&(t.stderr||t).level>=2&&(Jr.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Jr.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function C_e(){return"colors"in Jr.inspectOpts?!!Jr.inspectOpts.colors:E_e.isatty(process.stderr.fd)}function I_e(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
`).join(`
-`+s),t.push(n+"m+"+WE.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=i3e()+e+" "+t[0]}function i3e(){return ri.inspectOpts.hideDate?"":new Date().toISOString()+" "}function n3e(...t){return process.stderr.write(YE.formatWithOptions(ri.inspectOpts,...t)+`
-`)}function s3e(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function a3e(){return process.env.DEBUG}function o3e(t){t.inspectOpts={};let e=Object.keys(ri.inspectOpts);for(let r=0;re.trim()).join(" ")};kj.O=function(t){return this.inspectOpts.colors=this.useColors,YE.inspect(t,this.inspectOpts)}});var JE=A((Jot,RQ)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?RQ.exports=Nj():RQ.exports=Oj()});var Mj=A(Dn=>{"use strict";var l3e=Dn&&Dn.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),c3e=Dn&&Dn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Lj=Dn&&Dn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&l3e(e,t,r);return c3e(e,t),e};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.req=Dn.json=Dn.toBuffer=void 0;var d3e=Lj(require("http")),u3e=Lj(require("https"));async function Fj(t){let e=0,r=[];for await(let i of t)e+=i.length,r.push(i);return Buffer.concat(r,e)}Dn.toBuffer=Fj;async function A3e(t){let r=(await Fj(t)).toString("utf8");try{return JSON.parse(r)}catch(i){let n=i;throw n.message+=` (input: ${r})`,n}}Dn.json=A3e;function p3e(t,e={}){let i=((typeof t=="string"?t:t.href).startsWith("https:")?u3e:d3e).request(t,e),n=new Promise((s,a)=>{i.once("response",s).once("error",a).end()});return i.then=n.then.bind(n),i}Dn.req=p3e});var DQ=A(Zn=>{"use strict";var qj=Zn&&Zn.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),f3e=Zn&&Zn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hj=Zn&&Zn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&qj(e,t,r);return f3e(e,t),e},h3e=Zn&&Zn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&qj(e,t,r)};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.Agent=void 0;var m3e=Hj(require("net")),Uj=Hj(require("http")),g3e=require("https");h3e(Mj(),Zn);var ka=Symbol("AgentBaseInternalState"),TQ=class extends Uj.Agent{constructor(e){super(e),this[ka]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
-`).some(i=>i.indexOf("(https.js:")!==-1||i.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new m3e.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let i=this.sockets[e],n=i.indexOf(r);n!==-1&&(i.splice(n,1),this.totalSocketCount--,i.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?g3e.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,i){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(n),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,n)).then(o=>{if(this.decrementSockets(s,a),o instanceof Uj.Agent)try{return o.addRequest(e,n)}catch(l){return i(l)}this[ka].currentSocket=o,super.createSocket(e,r,i)},o=>{this.decrementSockets(s,a),i(o)})}createConnection(){let e=this[ka].currentSocket;if(this[ka].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[ka].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[ka]&&(this[ka].defaultPort=e)}get protocol(){return this[ka].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[ka]&&(this[ka].protocol=e)}};Zn.Agent=TQ});var Gj=A($A=>{"use strict";var y3e=$A&&$A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($A,"__esModule",{value:!0});$A.parseProxyResponse=void 0;var E3e=y3e(JE()),$E=(0,E3e.default)("https-proxy-agent:parse-proxy-response");function C3e(t){return new Promise((e,r)=>{let i=0,n=[];function s(){let d=t.read();d?c(d):t.once("readable",s)}function a(){t.removeListener("end",o),t.removeListener("error",l),t.removeListener("readable",s)}function o(){a(),$E("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function l(d){a(),$E("onerror %o",d),r(d)}function c(d){n.push(d),i+=d.length;let u=Buffer.concat(n,i),p=u.indexOf(`\r
+`+s),t.push(i+"m+"+UI.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=B_e()+e+" "+t[0]}function B_e(){return Jr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function b_e(...t){return process.stderr.write(FI.formatWithOptions(Jr.inspectOpts,...t)+`
+`)}function w_e(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Q_e(){return process.env.DEBUG}function __e(t){t.inspectOpts={};let e=Object.keys(Jr.inspectOpts);for(let r=0;re.trim()).join(" ")};dV.O=function(t){return this.inspectOpts.colors=this.useColors,FI.inspect(t,this.inspectOpts)}});var qI=f((ait,aT)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?aT.exports=oV():aT.exports=fV()});var gV=f(Ei=>{"use strict";var S_e=Ei&&Ei.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),N_e=Ei&&Ei.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hV=Ei&&Ei.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&S_e(e,t,r);return N_e(e,t),e};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.req=Ei.json=Ei.toBuffer=void 0;var R_e=hV(require("http")),x_e=hV(require("https"));async function pV(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}Ei.toBuffer=pV;async function v_e(t){let r=(await pV(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}Ei.json=v_e;function T_e(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?x_e:R_e).request(t,e),i=new Promise((s,o)=>{n.once("response",s).once("error",o).end()});return n.then=i.then.bind(i),n}Ei.req=T_e});var lT=f(Mi=>{"use strict";var yV=Mi&&Mi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),P_e=Mi&&Mi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),EV=Mi&&Mi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&yV(e,t,r);return P_e(e,t),e},D_e=Mi&&Mi.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&yV(e,t,r)};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.Agent=void 0;var k_e=EV(require("net")),mV=EV(require("http")),O_e=require("https");D_e(gV(),Mi);var uo=Symbol("AgentBaseInternalState"),cT=class extends mV.Agent{constructor(e){super(e),this[uo]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
+`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new k_e.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?O_e.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),o=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(a=>{if(this.decrementSockets(s,o),a instanceof mV.Agent)try{return a.addRequest(e,i)}catch(c){return n(c)}this[uo].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(s,o),n(a)})}createConnection(){let e=this[uo].currentSocket;if(this[uo].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[uo].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[uo]&&(this[uo].defaultPort=e)}get protocol(){return this[uo].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[uo]&&(this[uo].protocol=e)}};Mi.Agent=cT});var CV=f(od=>{"use strict";var L_e=od&&od.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(od,"__esModule",{value:!0});od.parseProxyResponse=void 0;var M_e=L_e(qI()),HI=(0,M_e.default)("https-proxy-agent:parse-proxy-response");function F_e(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let A=t.read();A?l(A):t.once("readable",s)}function o(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",s)}function a(){o(),HI("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(A){o(),HI("onerror %o",A),r(A)}function l(A){i.push(A),n+=A.length;let u=Buffer.concat(i,n),d=u.indexOf(`\r
\r
-`);if(p===-1){$E("have not received end of HTTP headers yet..."),s();return}let f=u.slice(0,p).toString("ascii").split(`\r
-`),h=f.shift();if(!h)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let E=h.split(" "),C=+E[1],b=E.slice(2).join(" "),N={};for(let D of f){if(!D)continue;let O=D.indexOf(":");if(O===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${D}"`));let K=D.slice(0,O).toLowerCase(),ne=D.slice(O+1).trimStart(),U=N[K];typeof U=="string"?N[K]=[U,ne]:Array.isArray(U)?U.push(ne):N[K]=ne}$E("got proxy server response: %o %o",h,N),a(),e({connect:{statusCode:C,statusText:b,headers:N},buffered:u})}t.on("error",l),t.on("end",o),s()})}$A.parseProxyResponse=C3e});var Jj=A(Qs=>{"use strict";var b3e=Qs&&Qs.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),I3e=Qs&&Qs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Yj=Qs&&Qs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&b3e(e,t,r);return I3e(e,t),e},Wj=Qs&&Qs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.HttpsProxyAgent=void 0;var KE=Yj(require("net")),jj=Yj(require("tls")),B3e=Wj(require("assert")),w3e=Wj(JE()),Q3e=DQ(),S3e=require("url"),_3e=Gj(),Pm=(0,w3e.default)("https-proxy-agent"),zj=t=>t.servername===void 0&&t.host&&!KE.isIP(t.host)?{...t,servername:t.host}:t,XE=class extends Q3e.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new S3e.URL(e):e,this.proxyHeaders=r?.headers??{},Pm("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let i=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?Vj(r,"headers"):null,host:i,port:n}}async connect(e,r){let{proxy:i}=this;if(!r.host)throw new TypeError('No "host" provided');let n;i.protocol==="https:"?(Pm("Creating `tls.Socket`: %o",this.connectOpts),n=jj.connect(zj(this.connectOpts))):(Pm("Creating `net.Socket`: %o",this.connectOpts),n=KE.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=KE.isIPv6(r.host)?`[${r.host}]`:r.host,o=`CONNECT ${a}:${r.port} HTTP/1.1\r
-`;if(i.username||i.password){let p=`${decodeURIComponent(i.username)}:${decodeURIComponent(i.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}s.Host=`${a}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(s))o+=`${p}: ${s[p]}\r
-`;let l=(0,_3e.parseProxyResponse)(n);n.write(`${o}\r
-`);let{connect:c,buffered:d}=await l;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",v3e),r.secureEndpoint?(Pm("Upgrading socket connection to TLS"),jj.connect({...Vj(zj(r),"host","path","port"),socket:n})):n;n.destroy();let u=new KE.Socket({writable:!1});return u.readable=!0,e.once("socket",p=>{Pm("Replaying proxy buffer for failed request"),(0,B3e.default)(p.listenerCount("data")>0),p.push(d),p.push(null)}),u}};XE.protocols=["http","https"];Qs.HttpsProxyAgent=XE;function v3e(t){t.resume()}function Vj(t,...e){let r={},i;for(i in t)e.includes(i)||(r[i]=t[i]);return r}});var Xj=A(Ss=>{"use strict";var N3e=Ss&&Ss.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),x3e=Ss&&Ss.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kj=Ss&&Ss.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&N3e(e,t,r);return x3e(e,t),e},R3e=Ss&&Ss.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ss,"__esModule",{value:!0});Ss.HttpProxyAgent=void 0;var T3e=Kj(require("net")),D3e=Kj(require("tls")),P3e=R3e(JE()),k3e=require("events"),O3e=DQ(),$j=require("url"),KA=(0,P3e.default)("http-proxy-agent"),ZE=class extends O3e.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new $j.URL(e):e,this.proxyHeaders=r?.headers??{},KA("Creating new HttpProxyAgent instance: %o",this.proxy.href);let i=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?L3e(r,"headers"):null,host:i,port:n}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:i}=this,n=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",a=`${n}//${s}`,o=new $j.URL(e.path,a);r.port!==80&&(o.port=String(r.port)),e.path=String(o);let l=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(i.username||i.password){let c=`${decodeURIComponent(i.username)}:${decodeURIComponent(i.password)}`;l["Proxy-Authorization"]=`Basic ${Buffer.from(c).toString("base64")}`}l["Proxy-Connection"]||(l["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let c of Object.keys(l)){let d=l[c];d&&e.setHeader(c,d)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let i,n;KA("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(KA("Patching connection write() output buffer with updated header"),i=e.outputData[0].data,n=i.indexOf(`\r
+`);if(d===-1){HI("have not received end of HTTP headers yet..."),s();return}let h=u.slice(0,d).toString("ascii").split(`\r
+`),g=h.shift();if(!g)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let E=g.split(" "),C=+E[1],I=E.slice(2).join(" "),R={};for(let P of h){if(!P)continue;let M=P.indexOf(":");if(M===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${P}"`));let ee=P.slice(0,M).toLowerCase(),se=P.slice(M+1).trimStart(),U=R[ee];typeof U=="string"?R[ee]=[U,se]:Array.isArray(U)?U.push(se):R[ee]=se}HI("got proxy server response: %o %o",g,R),o(),e({connect:{statusCode:C,statusText:I,headers:R},buffered:u})}t.on("error",c),t.on("end",a),s()})}od.parseProxyResponse=F_e});var _V=f(ls=>{"use strict";var U_e=ls&&ls.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),q_e=ls&&ls.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wV=ls&&ls.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&U_e(e,t,r);return q_e(e,t),e},QV=ls&&ls.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ls,"__esModule",{value:!0});ls.HttpsProxyAgent=void 0;var GI=wV(require("net")),IV=wV(require("tls")),H_e=QV(require("assert")),G_e=QV(qI()),j_e=lT(),z_e=require("url"),Y_e=CV(),Op=(0,G_e.default)("https-proxy-agent"),BV=t=>t.servername===void 0&&t.host&&!GI.isIP(t.host)?{...t,servername:t.host}:t,jI=class extends j_e.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new z_e.URL(e):e,this.proxyHeaders=r?.headers??{},Op("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?bV(r,"headers"):null,host:n,port:i}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;n.protocol==="https:"?(Op("Creating `tls.Socket`: %o",this.connectOpts),i=IV.connect(BV(this.connectOpts))):(Op("Creating `net.Socket`: %o",this.connectOpts),i=GI.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=GI.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${r.port} HTTP/1.1\r
+`;if(n.username||n.password){let d=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}s.Host=`${o}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))a+=`${d}: ${s[d]}\r
+`;let c=(0,Y_e.parseProxyResponse)(i);i.write(`${a}\r
+`);let{connect:l,buffered:A}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),l.statusCode===200)return e.once("socket",W_e),r.secureEndpoint?(Op("Upgrading socket connection to TLS"),IV.connect({...bV(BV(r),"host","path","port"),socket:i})):i;i.destroy();let u=new GI.Socket({writable:!1});return u.readable=!0,e.once("socket",d=>{Op("Replaying proxy buffer for failed request"),(0,H_e.default)(d.listenerCount("data")>0),d.push(A),d.push(null)}),u}};jI.protocols=["http","https"];ls.HttpsProxyAgent=jI;function W_e(t){t.resume()}function bV(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var RV=f(As=>{"use strict";var J_e=As&&As.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),V_e=As&&As.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),NV=As&&As.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&J_e(e,t,r);return V_e(e,t),e},$_e=As&&As.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(As,"__esModule",{value:!0});As.HttpProxyAgent=void 0;var K_e=NV(require("net")),X_e=NV(require("tls")),Z_e=$_e(qI()),eSe=require("events"),tSe=lT(),SV=require("url"),ad=(0,Z_e.default)("http-proxy-agent"),zI=class extends tSe.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new SV.URL(e):e,this.proxyHeaders=r?.headers??{},ad("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?rSe(r,"headers"):null,host:n,port:i}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,i=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",o=`${i}//${s}`,a=new SV.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let l=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(l).toString("base64")}`}c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let l of Object.keys(c)){let A=c[l];A&&e.setHeader(l,A)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,i;ad("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(ad("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,i=n.indexOf(`\r
\r
-`)+4,e.outputData[0].data=e._header+i.substring(n),KA("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(KA("Creating `tls.Socket`: %o",this.connectOpts),s=D3e.connect(this.connectOpts)):(KA("Creating `net.Socket`: %o",this.connectOpts),s=T3e.connect(this.connectOpts)),await(0,k3e.once)(s,"connect"),s}};ZE.protocols=["http","https"];Ss.HttpProxyAgent=ZE;function L3e(t,...e){let r={},i;for(i in t)e.includes(i)||(r[i]=t[i]);return r}});var PQ=A(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.globalNoProxyList=_s.proxyPolicyName=void 0;_s.loadNoProxy=iz;_s.getDefaultProxySettings=Y3e;_s.proxyPolicy=J3e;var F3e=Jj(),M3e=Xj(),U3e=Nm(),q3e="HTTPS_PROXY",H3e="HTTP_PROXY",G3e="ALL_PROXY",j3e="NO_PROXY";_s.proxyPolicyName="proxyPolicy";_s.globalNoProxyList=[];var tz=!1,z3e=new Map;function eC(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}function rz(){if(!process)return;let t=eC(q3e),e=eC(G3e),r=eC(H3e);return t||e||r}function V3e(t,e,r){if(e.length===0)return!1;let i=new URL(t).hostname;if(r?.has(i))return r.get(i);let n=!1;for(let s of e)s[0]==="."?(i.endsWith(s)||i.length===s.length-1&&i===s.slice(1))&&(n=!0):i===s&&(n=!0);return r?.set(i,n),n}function iz(){let t=eC(j3e);return tz=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}function Y3e(t){if(!t&&(t=rz(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}function W3e(){let t=rz();return t?new URL(t):void 0}function Zj(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}function ez(t,e,r){if(t.agent)return;let n=new URL(t.url).protocol!=="https:";t.tlsSettings&&U3e.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();n?(e.httpProxyAgent||(e.httpProxyAgent=new M3e.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new F3e.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}function J3e(t,e){tz||_s.globalNoProxyList.push(...iz());let r=t?Zj(t):W3e(),i={};return{name:_s.proxyPolicyName,async sendRequest(n,s){return!n.proxySettings&&r&&!V3e(n.url,e?.customNoProxyList??_s.globalNoProxyList,e?.customNoProxyList?void 0:z3e)?ez(n,i,r):n.proxySettings&&ez(n,i,Zj(n.proxySettings)),s(n)}}}});var kQ=A(XA=>{"use strict";Object.defineProperty(XA,"__esModule",{value:!0});XA.agentPolicyName=void 0;XA.agentPolicy=$3e;XA.agentPolicyName="agentPolicy";function $3e(t){return{name:XA.agentPolicyName,sendRequest:async(e,r)=>(e.agent||(e.agent=t),r(e))}}});var OQ=A(ZA=>{"use strict";Object.defineProperty(ZA,"__esModule",{value:!0});ZA.tlsPolicyName=void 0;ZA.tlsPolicy=K3e;ZA.tlsPolicyName="tlsPolicy";function K3e(t){return{name:ZA.tlsPolicyName,sendRequest:async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e))}}});var km=A(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.isNodeReadableStream=nz;Ed.isWebReadableStream=sz;Ed.isBinaryBody=X3e;Ed.isReadableStream=az;Ed.isBlob=Z3e;function nz(t){return!!(t&&typeof t.pipe=="function")}function sz(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}function X3e(t){return t!==void 0&&(t instanceof Uint8Array||az(t)||typeof t=="function"||t instanceof Blob)}function az(t){return nz(t)||sz(t)}function Z3e(t){return typeof t.stream=="function"}});var cz=A(FQ=>{"use strict";Object.defineProperty(FQ,"__esModule",{value:!0});FQ.concat=i9e;var LQ=require("stream"),e9e=km();async function*oz(){let t=this.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)return;yield r}}finally{t.releaseLock()}}function t9e(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=oz.bind(t)),t.values||(t.values=oz.bind(t))}function lz(t){return t instanceof ReadableStream?(t9e(t),LQ.Readable.fromWeb(t)):t}function r9e(t){return t instanceof Uint8Array?LQ.Readable.from(Buffer.from(t)):(0,e9e.isBlob)(t)?lz(t.stream()):lz(t)}async function i9e(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(r9e);return LQ.Readable.from((async function*(){for(let r of e)for await(let i of r)yield i})())}}});var MQ=A(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.multipartPolicyName=void 0;tp.multipartPolicy=h9e;var ep=md(),n9e=km(),s9e=xE(),a9e=cz();function o9e(){return`----AzSDKFormBoundary${(0,s9e.randomUUID)()}`}function l9e(t){let e="";for(let[r,i]of t)e+=`${r}: ${i}\r
-`;return e}function c9e(t){return t instanceof Uint8Array?t.byteLength:(0,n9e.isBlob)(t)?t.size===-1?void 0:t.size:void 0}function d9e(t){let e=0;for(let r of t){let i=c9e(r);if(i===void 0)return;e+=i}return e}async function u9e(t,e,r){let i=[(0,ep.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(s=>[(0,ep.stringToUint8Array)(`\r
-`,"utf-8"),(0,ep.stringToUint8Array)(l9e(s.headers),"utf-8"),(0,ep.stringToUint8Array)(`\r
-`,"utf-8"),s.body,(0,ep.stringToUint8Array)(`\r
---${r}`,"utf-8")]),(0,ep.stringToUint8Array)(`--\r
+`)+4,e.outputData[0].data=e._header+n.substring(i),ad("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(ad("Creating `tls.Socket`: %o",this.connectOpts),s=X_e.connect(this.connectOpts)):(ad("Creating `net.Socket`: %o",this.connectOpts),s=K_e.connect(this.connectOpts)),await(0,eSe.once)(s,"connect"),s}};zI.protocols=["http","https"];As.HttpProxyAgent=zI;function rSe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var AT=f(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.globalNoProxyList=us.proxyPolicyName=void 0;us.loadNoProxy=DV;us.getDefaultProxySettings=dSe;us.proxyPolicy=hSe;var nSe=_V(),iSe=RV(),sSe=vp(),oSe="HTTPS_PROXY",aSe="HTTP_PROXY",cSe="ALL_PROXY",lSe="NO_PROXY";us.proxyPolicyName="proxyPolicy";us.globalNoProxyList=[];var TV=!1,ASe=new Map;function YI(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}function PV(){if(!process)return;let t=YI(oSe),e=YI(cSe),r=YI(aSe);return t||e||r}function uSe(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let i=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(i=!0):n===s&&(i=!0);return r?.set(n,i),i}function DV(){let t=YI(lSe);return TV=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}function dSe(t){if(!t&&(t=PV(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}function fSe(){let t=PV();return t?new URL(t):void 0}function xV(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}function vV(t,e,r){if(t.agent)return;let i=new URL(t.url).protocol!=="https:";t.tlsSettings&&sSe.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();i?(e.httpProxyAgent||(e.httpProxyAgent=new iSe.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new nSe.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}function hSe(t,e){TV||us.globalNoProxyList.push(...DV());let r=t?xV(t):fSe(),n={};return{name:us.proxyPolicyName,async sendRequest(i,s){return!i.proxySettings&&r&&!uSe(i.url,e?.customNoProxyList??us.globalNoProxyList,e?.customNoProxyList?void 0:ASe)?vV(i,n,r):i.proxySettings&&vV(i,n,xV(i.proxySettings)),s(i)}}}});var uT=f(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.agentPolicyName=void 0;cd.agentPolicy=pSe;cd.agentPolicyName="agentPolicy";function pSe(t){return{name:cd.agentPolicyName,sendRequest:async(e,r)=>(e.agent||(e.agent=t),r(e))}}});var dT=f(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.tlsPolicyName=void 0;ld.tlsPolicy=gSe;ld.tlsPolicyName="tlsPolicy";function gSe(t){return{name:ld.tlsPolicyName,sendRequest:async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e))}}});var Lp=f(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.isNodeReadableStream=kV;Dl.isWebReadableStream=OV;Dl.isBinaryBody=mSe;Dl.isReadableStream=LV;Dl.isBlob=ySe;function kV(t){return!!(t&&typeof t.pipe=="function")}function OV(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}function mSe(t){return t!==void 0&&(t instanceof Uint8Array||LV(t)||typeof t=="function"||t instanceof Blob)}function LV(t){return kV(t)||OV(t)}function ySe(t){return typeof t.stream=="function"}});var UV=f(hT=>{"use strict";Object.defineProperty(hT,"__esModule",{value:!0});hT.concat=BSe;var fT=require("stream"),ESe=Lp();async function*MV(){let t=this.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)return;yield r}}finally{t.releaseLock()}}function CSe(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=MV.bind(t)),t.values||(t.values=MV.bind(t))}function FV(t){return t instanceof ReadableStream?(CSe(t),fT.Readable.fromWeb(t)):t}function ISe(t){return t instanceof Uint8Array?fT.Readable.from(Buffer.from(t)):(0,ESe.isBlob)(t)?FV(t.stream()):FV(t)}async function BSe(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(ISe);return fT.Readable.from((async function*(){for(let r of e)for await(let n of r)yield n})())}}});var pT=f(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.multipartPolicyName=void 0;ud.multipartPolicy=DSe;var Ad=vl(),bSe=Lp(),wSe=BI(),QSe=UV();function _Se(){return`----AzSDKFormBoundary${(0,wSe.randomUUID)()}`}function SSe(t){let e="";for(let[r,n]of t)e+=`${r}: ${n}\r
+`;return e}function NSe(t){return t instanceof Uint8Array?t.byteLength:(0,bSe.isBlob)(t)?t.size===-1?void 0:t.size:void 0}function RSe(t){let e=0;for(let r of t){let n=NSe(r);if(n===void 0)return;e+=n}return e}async function xSe(t,e,r){let n=[(0,Ad.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(s=>[(0,Ad.stringToUint8Array)(`\r
+`,"utf-8"),(0,Ad.stringToUint8Array)(SSe(s.headers),"utf-8"),(0,Ad.stringToUint8Array)(`\r
+`,"utf-8"),s.body,(0,Ad.stringToUint8Array)(`\r
+--${r}`,"utf-8")]),(0,Ad.stringToUint8Array)(`--\r
\r
-`,"utf-8")],n=d9e(i);n&&t.headers.set("Content-Length",n),t.body=await(0,a9e.concat)(i)}tp.multipartPolicyName="multipartPolicy";var A9e=70,p9e=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function f9e(t){if(t.length>A9e)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!p9e.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function h9e(){return{name:tp.multipartPolicyName,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,i=t.headers.get("Content-Type")??"multipart/mixed",n=i.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!n)throw new Error(`Got multipart request body, but content-type header was not multipart: ${i}`);let[,s,a]=n;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?f9e(r):r=o9e(),t.headers.set("Content-Type",`${s}; boundary=${r}`),await u9e(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}});var Az=A(UQ=>{"use strict";Object.defineProperty(UQ,"__esModule",{value:!0});UQ.createPipelineFromOptions=S9e;var m9e=pQ(),g9e=tQ(),y9e=fQ(),E9e=gQ(),C9e=yQ(),b9e=SQ(),I9e=_Q(),dz=Dm(),B9e=PQ(),w9e=kQ(),Q9e=OQ(),uz=MQ();function S9e(t){let e=(0,g9e.createEmptyPipeline)();return dz.isNodeLike&&(t.agent&&e.addPolicy((0,w9e.agentPolicy)(t.agent)),t.tlsOptions&&e.addPolicy((0,Q9e.tlsPolicy)(t.tlsOptions)),e.addPolicy((0,B9e.proxyPolicy)(t.proxyOptions)),e.addPolicy((0,C9e.decompressResponsePolicy)())),e.addPolicy((0,I9e.formDataPolicy)(),{beforePolicies:[uz.multipartPolicyName]}),e.addPolicy((0,E9e.userAgentPolicy)(t.userAgentOptions)),e.addPolicy((0,uz.multipartPolicy)(),{afterPhase:"Deserialize"}),e.addPolicy((0,b9e.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),dz.isNodeLike&&e.addPolicy((0,y9e.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy((0,m9e.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),e}});var pz=A(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});rp.apiVersionPolicyName=void 0;rp.apiVersionPolicy=_9e;rp.apiVersionPolicyName="ApiVersionPolicy";function _9e(t){return{name:rp.apiVersionPolicyName,sendRequest:(e,r)=>{let i=new URL(e.url);return!i.searchParams.get("api-version")&&t.apiVersion&&(e.url=`${e.url}${Array.from(i.searchParams.keys()).length>0?"&":"?"}api-version=${t.apiVersion}`),r(e)}}}});var fz=A(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.isOAuth2TokenCredential=v9e;ip.isBearerTokenCredential=N9e;ip.isBasicCredential=x9e;ip.isApiKeyCredential=R9e;function v9e(t){return"getOAuth2Token"in t}function N9e(t){return"getBearerToken"in t}function x9e(t){return"username"in t&&"password"in t}function R9e(t){return"key"in t}});var Om=A(qQ=>{"use strict";Object.defineProperty(qQ,"__esModule",{value:!0});qQ.ensureSecureConnection=k9e;var T9e=Nm(),hz=!1;function D9e(t,e){if(e.allowInsecureConnection&&t.allowInsecureConnection){let r=new URL(t.url);if(r.hostname==="localhost"||r.hostname==="127.0.0.1")return!0}return!1}function P9e(){let t="Sending token over insecure transport. Assume any token issued is compromised.";T9e.logger.warning(t),typeof process?.emitWarning=="function"&&!hz&&(hz=!0,process.emitWarning(t))}function k9e(t,e){if(!t.url.toLowerCase().startsWith("https://"))if(D9e(t,e))P9e();else throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false.")}});var mz=A(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});np.apiKeyAuthenticationPolicyName=void 0;np.apiKeyAuthenticationPolicy=L9e;var O9e=Om();np.apiKeyAuthenticationPolicyName="apiKeyAuthenticationPolicy";function L9e(t){return{name:np.apiKeyAuthenticationPolicyName,async sendRequest(e,r){(0,O9e.ensureSecureConnection)(e,t);let i=(e.authSchemes??t.authSchemes)?.find(n=>n.kind==="apiKey");if(!i)return r(e);if(i.apiKeyLocation!=="header")throw new Error(`Unsupported API key location: ${i.apiKeyLocation}`);return e.headers.set(i.name,t.credential.key),r(e)}}}});var yz=A(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});sp.basicAuthenticationPolicyName=void 0;sp.basicAuthenticationPolicy=M9e;var gz=md(),F9e=Om();sp.basicAuthenticationPolicyName="bearerAuthenticationPolicy";function M9e(t){return{name:sp.basicAuthenticationPolicyName,async sendRequest(e,r){if((0,F9e.ensureSecureConnection)(e,t),!(e.authSchemes??t.authSchemes)?.find(o=>o.kind==="http"&&o.scheme==="basic"))return r(e);let{username:n,password:s}=t.credential,a=(0,gz.uint8ArrayToString)((0,gz.stringToUint8Array)(`${n}:${s}`,"utf-8"),"base64");return e.headers.set("Authorization",`Basic ${a}`),r(e)}}}});var Ez=A(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});ap.bearerAuthenticationPolicyName=void 0;ap.bearerAuthenticationPolicy=q9e;var U9e=Om();ap.bearerAuthenticationPolicyName="bearerAuthenticationPolicy";function q9e(t){return{name:ap.bearerAuthenticationPolicyName,async sendRequest(e,r){if((0,U9e.ensureSecureConnection)(e,t),!(e.authSchemes??t.authSchemes)?.find(s=>s.kind==="http"&&s.scheme==="bearer"))return r(e);let n=await t.credential.getBearerToken({abortSignal:e.abortSignal});return e.headers.set("Authorization",`Bearer ${n}`),r(e)}}}});var Cz=A(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});op.oauth2AuthenticationPolicyName=void 0;op.oauth2AuthenticationPolicy=G9e;var H9e=Om();op.oauth2AuthenticationPolicyName="oauth2AuthenticationPolicy";function G9e(t){return{name:op.oauth2AuthenticationPolicyName,async sendRequest(e,r){(0,H9e.ensureSecureConnection)(e,t);let i=(e.authSchemes??t.authSchemes)?.find(s=>s.kind==="oauth2");if(!i)return r(e);let n=await t.credential.getOAuth2Token(i.flows,{abortSignal:e.abortSignal});return e.headers.set("Authorization",`Bearer ${n}`),r(e)}}}});var GQ=A(rC=>{"use strict";Object.defineProperty(rC,"__esModule",{value:!0});rC.createDefaultPipeline=K9e;rC.getCachedDefaultHttpsClient=X9e;var j9e=AQ(),z9e=Az(),V9e=pz(),tC=fz(),Y9e=mz(),W9e=yz(),J9e=Ez(),$9e=Cz(),HQ;function K9e(t={}){let e=(0,z9e.createPipelineFromOptions)(t);e.addPolicy((0,V9e.apiVersionPolicy)(t));let{credential:r,authSchemes:i,allowInsecureConnection:n}=t;return r&&((0,tC.isApiKeyCredential)(r)?e.addPolicy((0,Y9e.apiKeyAuthenticationPolicy)({authSchemes:i,credential:r,allowInsecureConnection:n})):(0,tC.isBasicCredential)(r)?e.addPolicy((0,W9e.basicAuthenticationPolicy)({authSchemes:i,credential:r,allowInsecureConnection:n})):(0,tC.isBearerTokenCredential)(r)?e.addPolicy((0,J9e.bearerAuthenticationPolicy)({authSchemes:i,credential:r,allowInsecureConnection:n})):(0,tC.isOAuth2TokenCredential)(r)&&e.addPolicy((0,$9e.oauth2AuthenticationPolicy)({authSchemes:i,credential:r,allowInsecureConnection:n}))),e}function X9e(){return HQ||(HQ=(0,j9e.createDefaultHttpClient)()),HQ}});var Sz=A(iC=>{"use strict";Object.defineProperty(iC,"__esModule",{value:!0});iC.buildBodyPart=Qz;iC.buildMultipartBody=n5e;var Z9e=LA(),e5e=vl(),bz=md(),Bz=km();function wz(t,e){if(t.headers){let r=Object.keys(t.headers).find(i=>i.toLowerCase()===e.toLowerCase());if(r)return t.headers[r]}}function t5e(t){let e=wz(t,"content-type");if(e)return e;if(t.contentType===null)return;if(t.contentType)return t.contentType;let{body:r}=t;if(r!=null)return typeof r=="string"||typeof r=="number"||typeof r=="boolean"?"text/plain; charset=UTF-8":r instanceof Blob?r.type||"application/octet-stream":(0,Bz.isBinaryBody)(r)?"application/octet-stream":"application/json"}function Iz(t){return JSON.stringify(t)}function r5e(t){let e=wz(t,"content-disposition");if(e)return e;if(t.dispositionType===void 0&&t.name===void 0&&t.filename===void 0)return;let i=t.dispositionType??"form-data";t.name&&(i+=`; name=${Iz(t.name)}`);let n;if(t.filename)n=t.filename;else if(typeof File<"u"&&t.body instanceof File){let s=t.body.name;s!==""&&(n=s)}return n&&(i+=`; filename=${Iz(n)}`),i}function i5e(t,e){if(t===void 0)return new Uint8Array([]);if((0,Bz.isBinaryBody)(t))return t;if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return(0,bz.stringToUint8Array)(String(t),"utf-8");if(e&&/application\/(.+\+)?json(;.+)?/i.test(String(e)))return(0,bz.stringToUint8Array)(JSON.stringify(t),"utf-8");throw new Z9e.RestError(`Unsupported body/content-type combination: ${t}, ${e}`)}function Qz(t){let e=t5e(t),r=r5e(t),i=(0,e5e.createHttpHeaders)(t.headers??{});e&&i.set("content-type",e),r&&i.set("content-disposition",r);let n=i5e(t.body,e);return{headers:i,body:n}}function n5e(t){return{parts:t.map(Qz)}}});var _z=A(zQ=>{"use strict";Object.defineProperty(zQ,"__esModule",{value:!0});zQ.sendRequest=d5e;var jQ=LA(),s5e=vl(),a5e=X5(),o5e=GQ(),l5e=km(),c5e=Sz();async function d5e(t,e,r,i={},n){let s=n??(0,o5e.getCachedDefaultHttpsClient)(),a=p5e(t,e,i);try{let o=await r.sendRequest(s,a),l=o.headers.toJSON(),c=o.readableStreamBody??o.browserStreamBody,d=i.responseAsStream||c!==void 0?void 0:h5e(o),u=c??d;return i?.onResponse&&i.onResponse({...o,request:a,rawHeaders:l,parsedBody:d}),{request:a,headers:l,status:`${o.status}`,body:u}}catch(o){if((0,jQ.isRestError)(o)&&o.response&&i.onResponse){let{response:l}=o,c=l.headers.toJSON();i?.onResponse({...l,request:a,rawHeaders:c},o)}throw o}}function u5e(t={}){return t.contentType??t.headers?.["content-type"]??A5e(t.body)}function A5e(t){if(ArrayBuffer.isView(t))return"application/octet-stream";if(typeof t=="string")try{return JSON.parse(t),"application/json"}catch{return}return"application/json"}function p5e(t,e,r={}){let i=u5e(r),{body:n,multipartBody:s}=f5e(r.body,i),a=n!==void 0||s!==void 0,o=(0,s5e.createHttpHeaders)({...r.headers?r.headers:{},accept:r.accept??r.headers?.accept??"application/json",...a&&i&&{"content-type":i}});return(0,a5e.createPipelineRequest)({url:e,method:t,body:n,multipartBody:s,headers:o,allowInsecureConnection:r.allowInsecureConnection,abortSignal:r.abortSignal,onUploadProgress:r.onUploadProgress,onDownloadProgress:r.onDownloadProgress,timeout:r.timeout,enableBrowserStreams:!0,streamResponseStatusCodes:r.responseAsStream?new Set([Number.POSITIVE_INFINITY]):void 0})}function f5e(t,e=""){if(t===void 0)return{body:void 0};if(typeof FormData<"u"&&t instanceof FormData)return{body:t};if((0,l5e.isReadableStream)(t))return{body:t};if(ArrayBuffer.isView(t))return{body:t instanceof Uint8Array?t:JSON.stringify(t)};switch(e.split(";")[0]){case"application/json":return{body:JSON.stringify(t)};case"multipart/form-data":return Array.isArray(t)?{multipartBody:(0,c5e.buildMultipartBody)(t)}:{body:JSON.stringify(t)};case"text/plain":return{body:String(t)};default:return typeof t=="string"?{body:t}:{body:JSON.stringify(t)}}}function h5e(t){let r=(t.headers.get("content-type")??"").split(";")[0],i=t.bodyAsText??"";if(r==="text/plain")return String(i);try{return i?JSON.parse(i):void 0}catch(n){if(r==="application/json")throw m5e(t,n);return String(i)}}function m5e(t,e){let r=`Error "${e}" occurred while parsing the response body - ${t.bodyAsText}.`,i=e.code??jQ.RestError.PARSE_ERROR;return new jQ.RestError(r,{code:i,statusCode:t.status,request:t.request,response:t})}});var xz=A(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.buildRequestUrl=y5e;Lm.buildBaseUrl=vz;Lm.replaceAll=Nz;function g5e(t){let e=t.value;return e!==void 0&&e.toString!==void 0&&typeof e.toString=="function"}function y5e(t,e,r,i={}){if(e.startsWith("https://")||e.startsWith("http://"))return e;t=vz(t,i),e=C5e(e,r,i);let n=E5e(`${t}/${e}`,i);return new URL(n).toString().replace(/([^:]\/)\/+/g,"$1")}function VQ(t,e,r,i){let n;r==="pipeDelimited"?n="|":r==="spaceDelimited"?n="%20":n=",";let s;Array.isArray(i)?s=i:typeof i=="object"&&i.toString===Object.prototype.toString?s=Object.entries(i).flat():s=[i];let a=s.map(o=>{if(o==null)return"";if(!o.toString||typeof o.toString!="function")throw new Error(`Query parameters must be able to be represented as string, ${t} can't`);let l=o.toISOString!==void 0?o.toISOString():o.toString();return e?l:encodeURIComponent(l)}).join(n);return`${e?t:encodeURIComponent(t)}=${a}`}function E5e(t,e={}){if(!e.queryParameters)return t;let r=new URL(t),i=e.queryParameters,n=[];for(let s of Object.keys(i)){let a=i[s];if(a==null)continue;let o=g5e(a),l=o?a.value:a,c=o?a.explode??!1:!1,d=o&&a.style?a.style:"form";if(c)if(Array.isArray(l))for(let u of l)n.push(VQ(s,e.skipUrlEncoding??!1,d,u));else if(typeof l=="object")for(let[u,p]of Object.entries(l))n.push(VQ(u,e.skipUrlEncoding??!1,d,p));else throw new Error("explode can only be set to true for objects and arrays");else n.push(VQ(s,e.skipUrlEncoding??!1,d,l))}return r.search!==""&&(r.search+="&"),r.search+=n.join("&"),r.toString()}function vz(t,e){if(!e.pathParameters)return t;let r=e.pathParameters;for(let[i,n]of Object.entries(r)){if(n==null)throw new Error(`Path parameters ${i} must not be undefined or null`);if(!n.toString||typeof n.toString!="function")throw new Error(`Path parameters must be able to be represented as string, ${i} can't`);let s=n.toISOString!==void 0?n.toISOString():String(n);e.skipUrlEncoding||(s=encodeURIComponent(n)),t=Nz(t,`{${i}}`,s)??""}return t}function C5e(t,e,r={}){for(let i of e){let n=typeof i=="object"&&(i.allowReserved??!1),s=typeof i=="object"?i.value:i;!r.skipUrlEncoding&&!n&&(s=encodeURIComponent(s)),t=t.replace(/\{[\w-]+\}/,String(s))}return t}function Nz(t,e,r){return!t||!e?t:t.split(e).join(r||"")}});var Tz=A(WQ=>{"use strict";Object.defineProperty(WQ,"__esModule",{value:!0});WQ.getClient=B5e;var b5e=GQ(),YQ=_z(),I5e=xz(),Rz=Dm();function B5e(t,e={}){let r=e.pipeline??(0,b5e.createDefaultPipeline)(e);if(e.additionalPolicies?.length)for(let{policy:o,position:l}of e.additionalPolicies){let c=l==="perRetry"?"Sign":void 0;r.addPolicy(o,{afterPhase:c})}let{allowInsecureConnection:i,httpClient:n}=e,s=e.endpoint??t,a=(o,...l)=>{let c=d=>(0,I5e.buildRequestUrl)(s,o,l,{allowInsecureConnection:i,...d});return{get:(d={})=>xl("GET",c(d),r,d,i,n),post:(d={})=>xl("POST",c(d),r,d,i,n),put:(d={})=>xl("PUT",c(d),r,d,i,n),patch:(d={})=>xl("PATCH",c(d),r,d,i,n),delete:(d={})=>xl("DELETE",c(d),r,d,i,n),head:(d={})=>xl("HEAD",c(d),r,d,i,n),options:(d={})=>xl("OPTIONS",c(d),r,d,i,n),trace:(d={})=>xl("TRACE",c(d),r,d,i,n)}};return{path:a,pathUnchecked:a,pipeline:r}}function xl(t,e,r,i,n,s){return n=i.allowInsecureConnection??n,{then:function(a,o){return(0,YQ.sendRequest)(t,e,r,{...i,allowInsecureConnection:n},s).then(a,o)},async asBrowserStream(){if(Rz.isNodeLike)throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`.");return(0,YQ.sendRequest)(t,e,r,{...i,allowInsecureConnection:n,responseAsStream:!0},s)},async asNodeStream(){if(Rz.isNodeLike)return(0,YQ.sendRequest)(t,e,r,{...i,allowInsecureConnection:n,responseAsStream:!0},s);throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream.")}}}});var Dz=A(JQ=>{"use strict";Object.defineProperty(JQ,"__esModule",{value:!0});JQ.operationOptionsToRequestParameters=w5e;function w5e(t){return{allowInsecureConnection:t.requestOptions?.allowInsecureConnection,timeout:t.requestOptions?.timeout,skipUrlEncoding:t.requestOptions?.skipUrlEncoding,abortSignal:t.abortSignal,onUploadProgress:t.requestOptions?.onUploadProgress,onDownloadProgress:t.requestOptions?.onDownloadProgress,headers:{...t.requestOptions?.headers},onResponse:t.onResponse}}});var kz=A($Q=>{"use strict";Object.defineProperty($Q,"__esModule",{value:!0});$Q.createRestError=_5e;var Q5e=LA(),S5e=vl();function _5e(t,e){let r=typeof t=="string"?e:t,i=r.body?.error??r.body,n=typeof t=="string"?t:i?.message??`Unexpected status code: ${r.status}`;return new Q5e.RestError(n,{statusCode:Pz(r.status),code:i?.code,request:r.request,response:v5e(r)})}function v5e(t){return{headers:(0,S5e.createHttpHeaders)(t.headers),request:t.request,status:Pz(t.status)??-1}}function Pz(t){let e=Number.parseInt(t);return Number.isNaN(e)?void 0:e}});var lp=A(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.createRestError=it.operationOptionsToRequestParameters=it.getClient=it.createDefaultHttpClient=it.uint8ArrayToString=it.stringToUint8Array=it.isRestError=it.RestError=it.createEmptyPipeline=it.createPipelineRequest=it.createHttpHeaders=it.TypeSpecRuntimeLogger=it.setLogLevel=it.getLogLevel=it.createClientLogger=it.AbortError=void 0;var Oz=(ar(),dr(sr)),N5e=wm();Object.defineProperty(it,"AbortError",{enumerable:!0,get:function(){return N5e.AbortError}});var nC=Sm();Object.defineProperty(it,"createClientLogger",{enumerable:!0,get:function(){return nC.createClientLogger}});Object.defineProperty(it,"getLogLevel",{enumerable:!0,get:function(){return nC.getLogLevel}});Object.defineProperty(it,"setLogLevel",{enumerable:!0,get:function(){return nC.setLogLevel}});Object.defineProperty(it,"TypeSpecRuntimeLogger",{enumerable:!0,get:function(){return nC.TypeSpecRuntimeLogger}});var x5e=vl();Object.defineProperty(it,"createHttpHeaders",{enumerable:!0,get:function(){return x5e.createHttpHeaders}});Oz.__exportStar(rj(),it);Oz.__exportStar(nj(),it);var R5e=X5();Object.defineProperty(it,"createPipelineRequest",{enumerable:!0,get:function(){return R5e.createPipelineRequest}});var T5e=tQ();Object.defineProperty(it,"createEmptyPipeline",{enumerable:!0,get:function(){return T5e.createEmptyPipeline}});var Lz=LA();Object.defineProperty(it,"RestError",{enumerable:!0,get:function(){return Lz.RestError}});Object.defineProperty(it,"isRestError",{enumerable:!0,get:function(){return Lz.isRestError}});var Fz=md();Object.defineProperty(it,"stringToUint8Array",{enumerable:!0,get:function(){return Fz.stringToUint8Array}});Object.defineProperty(it,"uint8ArrayToString",{enumerable:!0,get:function(){return Fz.uint8ArrayToString}});var D5e=AQ();Object.defineProperty(it,"createDefaultHttpClient",{enumerable:!0,get:function(){return D5e.createDefaultHttpClient}});var P5e=Tz();Object.defineProperty(it,"getClient",{enumerable:!0,get:function(){return P5e.getClient}});var k5e=Dz();Object.defineProperty(it,"operationOptionsToRequestParameters",{enumerable:!0,get:function(){return k5e.operationOptionsToRequestParameters}});var O5e=kz();Object.defineProperty(it,"createRestError",{enumerable:!0,get:function(){return O5e.createRestError}})});var XQ=A(KQ=>{"use strict";Object.defineProperty(KQ,"__esModule",{value:!0});KQ.createEmptyPipeline=F5e;var L5e=lp();function F5e(){return(0,L5e.createEmptyPipeline)()}});var Mz=A(sC=>{"use strict";Object.defineProperty(sC,"__esModule",{value:!0});sC.createLoggerContext=void 0;var M5e=Sm();Object.defineProperty(sC,"createLoggerContext",{enumerable:!0,get:function(){return M5e.createLoggerContext}})});var bd=A(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.AzureLogger=void 0;Cd.setLogLevel=q5e;Cd.getLogLevel=H5e;Cd.createClientLogger=G5e;var U5e=Mz(),aC=(0,U5e.createLoggerContext)({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"});Cd.AzureLogger=aC.logger;function q5e(t){aC.setLogLevel(t)}function H5e(){return aC.getLogLevel()}function G5e(t){return aC.createClientLogger(t)}});var Fm=A(oC=>{"use strict";Object.defineProperty(oC,"__esModule",{value:!0});oC.logger=void 0;var j5e=bd();oC.logger=(0,j5e.createClientLogger)("core-rest-pipeline")});var Uz=A(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});Mm.exponentialRetryPolicyName=void 0;Mm.exponentialRetryPolicy=W5e;var z5e=jE(),V5e=jA(),Y5e=gd();Mm.exponentialRetryPolicyName="exponentialRetryPolicy";function W5e(t={}){return(0,V5e.retryPolicy)([(0,z5e.exponentialRetryStrategy)({...t,ignoreSystemErrors:!0})],{maxRetries:t.maxRetries??Y5e.DEFAULT_RETRY_POLICY_COUNT})}});var qz=A(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});cp.systemErrorRetryPolicyName=void 0;cp.systemErrorRetryPolicy=X5e;var J5e=jE(),$5e=jA(),K5e=gd();cp.systemErrorRetryPolicyName="systemErrorRetryPolicy";function X5e(t={}){return{name:cp.systemErrorRetryPolicyName,sendRequest:(0,$5e.retryPolicy)([(0,J5e.exponentialRetryStrategy)({...t,ignoreHttpStatusCodes:!0})],{maxRetries:t.maxRetries??K5e.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}});var Hz=A(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});dp.throttlingRetryPolicyName=void 0;dp.throttlingRetryPolicy=rQe;var Z5e=GE(),eQe=jA(),tQe=gd();dp.throttlingRetryPolicyName="throttlingRetryPolicy";function rQe(t={}){return{name:dp.throttlingRetryPolicyName,sendRequest:(0,eQe.retryPolicy)([(0,Z5e.throttlingRetryStrategy)()],{maxRetries:t.maxRetries??tQe.DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}});var Pn=A(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.userAgentPolicyName=be.userAgentPolicy=be.tlsPolicyName=be.tlsPolicy=be.redirectPolicyName=be.redirectPolicy=be.getDefaultProxySettings=be.proxyPolicyName=be.proxyPolicy=be.multipartPolicyName=be.multipartPolicy=be.logPolicyName=be.logPolicy=be.formDataPolicyName=be.formDataPolicy=be.throttlingRetryPolicyName=be.throttlingRetryPolicy=be.systemErrorRetryPolicyName=be.systemErrorRetryPolicy=be.retryPolicy=be.exponentialRetryPolicyName=be.exponentialRetryPolicy=be.defaultRetryPolicyName=be.defaultRetryPolicy=be.decompressResponsePolicyName=be.decompressResponsePolicy=be.agentPolicyName=be.agentPolicy=void 0;var Gz=kQ();Object.defineProperty(be,"agentPolicy",{enumerable:!0,get:function(){return Gz.agentPolicy}});Object.defineProperty(be,"agentPolicyName",{enumerable:!0,get:function(){return Gz.agentPolicyName}});var jz=yQ();Object.defineProperty(be,"decompressResponsePolicy",{enumerable:!0,get:function(){return jz.decompressResponsePolicy}});Object.defineProperty(be,"decompressResponsePolicyName",{enumerable:!0,get:function(){return jz.decompressResponsePolicyName}});var zz=SQ();Object.defineProperty(be,"defaultRetryPolicy",{enumerable:!0,get:function(){return zz.defaultRetryPolicy}});Object.defineProperty(be,"defaultRetryPolicyName",{enumerable:!0,get:function(){return zz.defaultRetryPolicyName}});var Vz=Uz();Object.defineProperty(be,"exponentialRetryPolicy",{enumerable:!0,get:function(){return Vz.exponentialRetryPolicy}});Object.defineProperty(be,"exponentialRetryPolicyName",{enumerable:!0,get:function(){return Vz.exponentialRetryPolicyName}});var iQe=jA();Object.defineProperty(be,"retryPolicy",{enumerable:!0,get:function(){return iQe.retryPolicy}});var Yz=qz();Object.defineProperty(be,"systemErrorRetryPolicy",{enumerable:!0,get:function(){return Yz.systemErrorRetryPolicy}});Object.defineProperty(be,"systemErrorRetryPolicyName",{enumerable:!0,get:function(){return Yz.systemErrorRetryPolicyName}});var Wz=Hz();Object.defineProperty(be,"throttlingRetryPolicy",{enumerable:!0,get:function(){return Wz.throttlingRetryPolicy}});Object.defineProperty(be,"throttlingRetryPolicyName",{enumerable:!0,get:function(){return Wz.throttlingRetryPolicyName}});var Jz=_Q();Object.defineProperty(be,"formDataPolicy",{enumerable:!0,get:function(){return Jz.formDataPolicy}});Object.defineProperty(be,"formDataPolicyName",{enumerable:!0,get:function(){return Jz.formDataPolicyName}});var $z=pQ();Object.defineProperty(be,"logPolicy",{enumerable:!0,get:function(){return $z.logPolicy}});Object.defineProperty(be,"logPolicyName",{enumerable:!0,get:function(){return $z.logPolicyName}});var Kz=MQ();Object.defineProperty(be,"multipartPolicy",{enumerable:!0,get:function(){return Kz.multipartPolicy}});Object.defineProperty(be,"multipartPolicyName",{enumerable:!0,get:function(){return Kz.multipartPolicyName}});var ZQ=PQ();Object.defineProperty(be,"proxyPolicy",{enumerable:!0,get:function(){return ZQ.proxyPolicy}});Object.defineProperty(be,"proxyPolicyName",{enumerable:!0,get:function(){return ZQ.proxyPolicyName}});Object.defineProperty(be,"getDefaultProxySettings",{enumerable:!0,get:function(){return ZQ.getDefaultProxySettings}});var Xz=fQ();Object.defineProperty(be,"redirectPolicy",{enumerable:!0,get:function(){return Xz.redirectPolicy}});Object.defineProperty(be,"redirectPolicyName",{enumerable:!0,get:function(){return Xz.redirectPolicyName}});var Zz=OQ();Object.defineProperty(be,"tlsPolicy",{enumerable:!0,get:function(){return Zz.tlsPolicy}});Object.defineProperty(be,"tlsPolicyName",{enumerable:!0,get:function(){return Zz.tlsPolicyName}});var eV=gQ();Object.defineProperty(be,"userAgentPolicy",{enumerable:!0,get:function(){return eV.userAgentPolicy}});Object.defineProperty(be,"userAgentPolicyName",{enumerable:!0,get:function(){return eV.userAgentPolicyName}})});var eS=A(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.logPolicyName=void 0;Um.logPolicy=sQe;var nQe=Fm(),tV=Pn();Um.logPolicyName=tV.logPolicyName;function sQe(t={}){return(0,tV.logPolicy)({logger:nQe.logger.info,...t})}});var tS=A(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.redirectPolicyName=void 0;qm.redirectPolicy=aQe;var rV=Pn();qm.redirectPolicyName=rV.redirectPolicyName;function aQe(t={}){return(0,rV.redirectPolicy)(t)}});var nV=A(lC=>{"use strict";Object.defineProperty(lC,"__esModule",{value:!0});lC.getHeaderName=oQe;lC.setPlatformSpecificData=lQe;var iV=(ar(),dr(sr)),rS=iV.__importDefault(require("node:os")),iS=iV.__importDefault(require("node:process"));function oQe(){return"User-Agent"}async function lQe(t){if(iS.default&&iS.default.versions){let e=iS.default.versions;e.bun?t.set("Bun",e.bun):e.deno?t.set("Deno",e.deno):e.node&&t.set("Node",e.node)}t.set("OS",`(${rS.default.arch()}-${rS.default.type()}-${rS.default.release()})`)}});var cC=A(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.DEFAULT_RETRY_POLICY_COUNT=up.SDK_VERSION=void 0;up.SDK_VERSION="1.22.1";up.DEFAULT_RETRY_POLICY_COUNT=3});var nS=A(dC=>{"use strict";Object.defineProperty(dC,"__esModule",{value:!0});dC.getUserAgentHeaderName=uQe;dC.getUserAgentValue=AQe;var sV=nV(),cQe=cC();function dQe(t){let e=[];for(let[r,i]of t){let n=i?`${r}/${i}`:r;e.push(n)}return e.join(" ")}function uQe(){return(0,sV.getHeaderName)()}async function AQe(t){let e=new Map;e.set("core-rest-pipeline",cQe.SDK_VERSION),await(0,sV.setPlatformSpecificData)(e);let r=dQe(e);return t?`${t} ${r}`:r}});var sS=A(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.userAgentPolicyName=void 0;Ap.userAgentPolicy=pQe;var oV=nS(),aV=(0,oV.getUserAgentHeaderName)();Ap.userAgentPolicyName="userAgentPolicy";function pQe(t={}){let e=(0,oV.getUserAgentValue)(t.userAgentPrefix);return{name:Ap.userAgentPolicyName,async sendRequest(r,i){return r.headers.has(aV)||r.headers.set(aV,await e),i(r)}}}});var cV=A(uC=>{"use strict";Object.defineProperty(uC,"__esModule",{value:!0});uC.computeSha256Hmac=fQe;uC.computeSha256Hash=hQe;var lV=require("node:crypto");async function fQe(t,e,r){let i=Buffer.from(t,"base64");return(0,lV.createHmac)("sha256",i).update(e).digest(r)}async function hQe(t,e){return(0,lV.createHash)("sha256").update(t).digest(e)}});var Hm=A(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.Sanitizer=nt.uint8ArrayToString=nt.stringToUint8Array=nt.isWebWorker=nt.isReactNative=nt.isDeno=nt.isNodeRuntime=nt.isNodeLike=nt.isBun=nt.isBrowser=nt.randomUUID=nt.computeSha256Hmac=nt.computeSha256Hash=nt.isError=nt.isObject=nt.getRandomIntegerInclusive=nt.calculateRetryDelay=void 0;var mQe=IQ();Object.defineProperty(nt,"calculateRetryDelay",{enumerable:!0,get:function(){return mQe.calculateRetryDelay}});var gQe=CQ();Object.defineProperty(nt,"getRandomIntegerInclusive",{enumerable:!0,get:function(){return gQe.getRandomIntegerInclusive}});var yQe=RE();Object.defineProperty(nt,"isObject",{enumerable:!0,get:function(){return yQe.isObject}});var EQe=nQ();Object.defineProperty(nt,"isError",{enumerable:!0,get:function(){return EQe.isError}});var dV=cV();Object.defineProperty(nt,"computeSha256Hash",{enumerable:!0,get:function(){return dV.computeSha256Hash}});Object.defineProperty(nt,"computeSha256Hmac",{enumerable:!0,get:function(){return dV.computeSha256Hmac}});var CQe=xE();Object.defineProperty(nt,"randomUUID",{enumerable:!0,get:function(){return CQe.randomUUID}});var Id=Dm();Object.defineProperty(nt,"isBrowser",{enumerable:!0,get:function(){return Id.isBrowser}});Object.defineProperty(nt,"isBun",{enumerable:!0,get:function(){return Id.isBun}});Object.defineProperty(nt,"isNodeLike",{enumerable:!0,get:function(){return Id.isNodeLike}});Object.defineProperty(nt,"isNodeRuntime",{enumerable:!0,get:function(){return Id.isNodeRuntime}});Object.defineProperty(nt,"isDeno",{enumerable:!0,get:function(){return Id.isDeno}});Object.defineProperty(nt,"isReactNative",{enumerable:!0,get:function(){return Id.isReactNative}});Object.defineProperty(nt,"isWebWorker",{enumerable:!0,get:function(){return Id.isWebWorker}});var uV=md();Object.defineProperty(nt,"stringToUint8Array",{enumerable:!0,get:function(){return uV.stringToUint8Array}});Object.defineProperty(nt,"uint8ArrayToString",{enumerable:!0,get:function(){return uV.uint8ArrayToString}});var bQe=_m();Object.defineProperty(nt,"Sanitizer",{enumerable:!0,get:function(){return bQe.Sanitizer}})});var AV=A(aS=>{"use strict";Object.defineProperty(aS,"__esModule",{value:!0});aS.cancelablePromiseRace=IQe;async function IQe(t,e){let r=new AbortController;function i(){r.abort()}e?.abortSignal?.addEventListener("abort",i);try{return await Promise.race(t.map(n=>n({abortSignal:r.signal})))}finally{r.abort(),e?.abortSignal?.removeEventListener("abort",i)}}});var pV=A(AC=>{"use strict";Object.defineProperty(AC,"__esModule",{value:!0});AC.AbortError=void 0;var oS=class extends Error{constructor(e){super(e),this.name="AbortError"}};AC.AbortError=oS});var Rl=A(pC=>{"use strict";Object.defineProperty(pC,"__esModule",{value:!0});pC.AbortError=void 0;var BQe=pV();Object.defineProperty(pC,"AbortError",{enumerable:!0,get:function(){return BQe.AbortError}})});var cS=A(lS=>{"use strict";Object.defineProperty(lS,"__esModule",{value:!0});lS.createAbortablePromise=QQe;var wQe=Rl();function QQe(t,e){let{cleanupBeforeAbort:r,abortSignal:i,abortErrorMsg:n}=e??{};return new Promise((s,a)=>{function o(){a(new wQe.AbortError(n??"The operation was aborted."))}function l(){i?.removeEventListener("abort",c)}function c(){r?.(),l(),o()}if(i?.aborted)return o();try{t(d=>{l(),s(d)},d=>{l(),a(d)})}catch(d){a(d)}i?.addEventListener("abort",c)})}});var fV=A(fC=>{"use strict";Object.defineProperty(fC,"__esModule",{value:!0});fC.delay=NQe;fC.calculateRetryDelay=xQe;var SQe=cS(),_Qe=Hm(),vQe="The delay was aborted.";function NQe(t,e){let r,{abortSignal:i,abortErrorMsg:n}=e??{};return(0,SQe.createAbortablePromise)(s=>{r=setTimeout(s,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:i,abortErrorMsg:n??vQe})}function xQe(t,e){let r=e.retryDelayInMs*Math.pow(2,t),i=Math.min(e.maxRetryDelayInMs,r);return{retryAfterInMs:i/2+(0,_Qe.getRandomIntegerInclusive)(0,i/2)}}});var hV=A(dS=>{"use strict";Object.defineProperty(dS,"__esModule",{value:!0});dS.getErrorMessage=TQe;var RQe=Hm();function TQe(t){if((0,RQe.isError)(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}});var gV=A(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});Gm.isDefined=uS;Gm.isObjectWithProperties=DQe;Gm.objectHasProperty=mV;function uS(t){return typeof t<"u"&&t!==null}function DQe(t,e){if(!uS(t)||typeof t!="object")return!1;for(let r of e)if(!mV(t,r))return!1;return!0}function mV(t,e){return uS(t)&&typeof t=="object"&&e in t}});var Ot=A(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.isWebWorker=je.isReactNative=je.isNodeRuntime=je.isNodeLike=je.isNode=je.isDeno=je.isBun=je.isBrowser=je.objectHasProperty=je.isObjectWithProperties=je.isDefined=je.getErrorMessage=je.delay=je.createAbortablePromise=je.cancelablePromiseRace=void 0;je.calculateRetryDelay=MQe;je.computeSha256Hash=UQe;je.computeSha256Hmac=qQe;je.getRandomIntegerInclusive=HQe;je.isError=GQe;je.isObject=jQe;je.randomUUID=zQe;je.uint8ArrayToString=VQe;je.stringToUint8Array=YQe;var PQe=(ar(),dr(sr)),Ci=PQe.__importStar(Hm()),kQe=AV();Object.defineProperty(je,"cancelablePromiseRace",{enumerable:!0,get:function(){return kQe.cancelablePromiseRace}});var OQe=cS();Object.defineProperty(je,"createAbortablePromise",{enumerable:!0,get:function(){return OQe.createAbortablePromise}});var LQe=fV();Object.defineProperty(je,"delay",{enumerable:!0,get:function(){return LQe.delay}});var FQe=hV();Object.defineProperty(je,"getErrorMessage",{enumerable:!0,get:function(){return FQe.getErrorMessage}});var AS=gV();Object.defineProperty(je,"isDefined",{enumerable:!0,get:function(){return AS.isDefined}});Object.defineProperty(je,"isObjectWithProperties",{enumerable:!0,get:function(){return AS.isObjectWithProperties}});Object.defineProperty(je,"objectHasProperty",{enumerable:!0,get:function(){return AS.objectHasProperty}});function MQe(t,e){return Ci.calculateRetryDelay(t,e)}function UQe(t,e){return Ci.computeSha256Hash(t,e)}function qQe(t,e,r){return Ci.computeSha256Hmac(t,e,r)}function HQe(t,e){return Ci.getRandomIntegerInclusive(t,e)}function GQe(t){return Ci.isError(t)}function jQe(t){return Ci.isObject(t)}function zQe(){return Ci.randomUUID()}je.isBrowser=Ci.isBrowser;je.isBun=Ci.isBun;je.isDeno=Ci.isDeno;je.isNode=Ci.isNodeLike;je.isNodeLike=Ci.isNodeLike;je.isNodeRuntime=Ci.isNodeRuntime;je.isReactNative=Ci.isReactNative;je.isWebWorker=Ci.isWebWorker;function VQe(t,e){return Ci.uint8ArrayToString(t,e)}function YQe(t,e){return Ci.stringToUint8Array(t,e)}});var pS=A(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.hasRawContent=EV;pp.getRawContent=$Qe;pp.createFileFromStream=KQe;pp.createFile=XQe;var WQe=Ot();function JQe(t){return!!(t&&typeof t.pipe=="function")}var yV={arrayBuffer:()=>{throw new Error("Not implemented")},bytes:()=>{throw new Error("Not implemented")},slice:()=>{throw new Error("Not implemented")},text:()=>{throw new Error("Not implemented")}},hC=Symbol("rawContent");function EV(t){return typeof t[hC]=="function"}function $Qe(t){return EV(t)?t[hC]():t}function KQe(t,e,r={}){return{...yV,type:r.type??"",lastModified:r.lastModified??new Date().getTime(),webkitRelativePath:r.webkitRelativePath??"",size:r.size??-1,name:e,stream:()=>{let i=t();if(JQe(i))throw new Error("Not supported: a Node stream was provided as input to createFileFromStream.");return i},[hC]:t}}function XQe(t,e,r={}){return WQe.isNodeLike?{...yV,type:r.type??"",lastModified:r.lastModified??new Date().getTime(),webkitRelativePath:r.webkitRelativePath??"",size:t.byteLength,name:e,arrayBuffer:async()=>t.buffer,stream:()=>new Blob([t]).stream(),[hC]:()=>t}:new File([t],e,r)}});var fS=A(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.multipartPolicyName=void 0;fp.multipartPolicy=ZQe;var bV=Pn(),CV=pS();fp.multipartPolicyName=bV.multipartPolicyName;function ZQe(){let t=(0,bV.multipartPolicy)();return{name:fp.multipartPolicyName,sendRequest:async(e,r)=>{if(e.multipartBody)for(let i of e.multipartBody.parts)(0,CV.hasRawContent)(i.body)&&(i.body=(0,CV.getRawContent)(i.body));return t.sendRequest(e,r)}}}});var hS=A(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});jm.decompressResponsePolicyName=void 0;jm.decompressResponsePolicy=eSe;var IV=Pn();jm.decompressResponsePolicyName=IV.decompressResponsePolicyName;function eSe(){return(0,IV.decompressResponsePolicy)()}});var mS=A(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.defaultRetryPolicyName=void 0;zm.defaultRetryPolicy=tSe;var BV=Pn();zm.defaultRetryPolicyName=BV.defaultRetryPolicyName;function tSe(t={}){return(0,BV.defaultRetryPolicy)(t)}});var gS=A(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.formDataPolicyName=void 0;Vm.formDataPolicy=rSe;var wV=Pn();Vm.formDataPolicyName=wV.formDataPolicyName;function rSe(){return(0,wV.formDataPolicy)()}});var ES=A(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.proxyPolicyName=void 0;hp.getDefaultProxySettings=iSe;hp.proxyPolicy=nSe;var yS=Pn();hp.proxyPolicyName=yS.proxyPolicyName;function iSe(t){return(0,yS.getDefaultProxySettings)(t)}function nSe(t,e){return(0,yS.proxyPolicy)(t,e)}});var CS=A(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.setClientRequestIdPolicyName=void 0;mp.setClientRequestIdPolicy=sSe;mp.setClientRequestIdPolicyName="setClientRequestIdPolicy";function sSe(t="x-ms-client-request-id"){return{name:mp.setClientRequestIdPolicyName,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}});var bS=A(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});Ym.agentPolicyName=void 0;Ym.agentPolicy=aSe;var QV=Pn();Ym.agentPolicyName=QV.agentPolicyName;function aSe(t){return(0,QV.agentPolicy)(t)}});var IS=A(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});Wm.tlsPolicyName=void 0;Wm.tlsPolicy=oSe;var SV=Pn();Wm.tlsPolicyName=SV.tlsPolicyName;function oSe(t){return(0,SV.tlsPolicy)(t)}});var BS=A(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.TracingContextImpl=Oo.knownContextKeys=void 0;Oo.createTracingContext=lSe;Oo.knownContextKeys={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function lSe(t={}){let e=new mC(t.parentContext);return t.span&&(e=e.setValue(Oo.knownContextKeys.span,t.span)),t.namespace&&(e=e.setValue(Oo.knownContextKeys.namespace,t.namespace)),e}var mC=class t{_contextMap;constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,r){let i=new t(this);return i._contextMap.set(e,r),i}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};Oo.TracingContextImpl=mC});var _V=A(gC=>{"use strict";Object.defineProperty(gC,"__esModule",{value:!0});gC.state=void 0;gC.state={instrumenterImplementation:void 0}});var wS=A(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.createDefaultTracingSpan=vV;gp.createDefaultInstrumenter=NV;gp.useInstrumenter=dSe;gp.getInstrumenter=uSe;var cSe=BS(),yC=_V();function vV(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}}}function NV(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(t,e)=>({span:vV(),tracingContext:(0,cSe.createTracingContext)({parentContext:e.tracingContext})}),withContext(t,e,...r){return e(...r)}}}function dSe(t){yC.state.instrumenterImplementation=t}function uSe(){return yC.state.instrumenterImplementation||(yC.state.instrumenterImplementation=NV()),yC.state.instrumenterImplementation}});var xV=A(SS=>{"use strict";Object.defineProperty(SS,"__esModule",{value:!0});SS.createTracingClient=ASe;var EC=wS(),QS=BS();function ASe(t){let{namespace:e,packageName:r,packageVersion:i}=t;function n(c,d,u){let p=(0,EC.getInstrumenter)().startSpan(c,{...u,packageName:r,packageVersion:i,tracingContext:d?.tracingOptions?.tracingContext}),f=p.tracingContext,h=p.span;f.getValue(QS.knownContextKeys.namespace)||(f=f.setValue(QS.knownContextKeys.namespace,e)),h.setAttribute("az.namespace",f.getValue(QS.knownContextKeys.namespace));let E=Object.assign({},d,{tracingOptions:{...d?.tracingOptions,tracingContext:f}});return{span:h,updatedOptions:E}}async function s(c,d,u,p){let{span:f,updatedOptions:h}=n(c,d,p);try{let E=await a(h.tracingOptions.tracingContext,()=>Promise.resolve(u(h,f)));return f.setStatus({status:"success"}),E}catch(E){throw f.setStatus({status:"error",error:E}),E}finally{f.end()}}function a(c,d,...u){return(0,EC.getInstrumenter)().withContext(c,d,...u)}function o(c){return(0,EC.getInstrumenter)().parseTraceparentHeader(c)}function l(c){return(0,EC.getInstrumenter)().createRequestHeaders(c)}return{startSpan:n,withSpan:s,withContext:a,parseTraceparentHeader:o,createRequestHeaders:l}}});var _S=A(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});yp.createTracingClient=yp.useInstrumenter=void 0;var pSe=wS();Object.defineProperty(yp,"useInstrumenter",{enumerable:!0,get:function(){return pSe.useInstrumenter}});var fSe=xV();Object.defineProperty(yp,"createTracingClient",{enumerable:!0,get:function(){return fSe.createTracingClient}})});var CC=A(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});Jm.RestError=void 0;Jm.isRestError=hSe;var RV=lp();Jm.RestError=RV.RestError;function hSe(t){return(0,RV.isRestError)(t)}});var vS=A(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.tracingPolicyName=void 0;Ep.tracingPolicy=bSe;var mSe=_S(),gSe=cC(),ySe=nS(),bC=Fm(),$m=Ot(),ESe=CC(),CSe=Hm();Ep.tracingPolicyName="tracingPolicy";function bSe(t={}){let e=(0,ySe.getUserAgentValue)(t.userAgentPrefix),r=new CSe.Sanitizer({additionalAllowedQueryParameters:t.additionalAllowedQueryParameters}),i=ISe();return{name:Ep.tracingPolicyName,async sendRequest(n,s){if(!i)return s(n);let a=await e,o={"http.url":r.sanitizeUrl(n.url),"http.method":n.method,"http.user_agent":a,requestId:n.requestId};a&&(o["http.user_agent"]=a);let{span:l,tracingContext:c}=BSe(i,n,o)??{};if(!l||!c)return s(n);try{let d=await i.withContext(c,s,n);return QSe(l,d),d}catch(d){throw wSe(l,d),d}}}}function ISe(){try{return(0,mSe.createTracingClient)({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:gSe.SDK_VERSION})}catch(t){bC.logger.warning(`Error when creating the TracingClient: ${(0,$m.getErrorMessage)(t)}`);return}}function BSe(t,e,r){try{let{span:i,updatedOptions:n}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:r});if(!i.isRecording()){i.end();return}let s=t.createRequestHeaders(n.tracingOptions.tracingContext);for(let[a,o]of Object.entries(s))e.headers.set(a,o);return{span:i,tracingContext:n.tracingOptions.tracingContext}}catch(i){bC.logger.warning(`Skipping creating a tracing span due to an error: ${(0,$m.getErrorMessage)(i)}`);return}}function wSe(t,e){try{t.setStatus({status:"error",error:(0,$m.isError)(e)?e:void 0}),(0,ESe.isRestError)(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(r){bC.logger.warning(`Skipping tracing span processing due to an error: ${(0,$m.getErrorMessage)(r)}`)}}function QSe(t,e){try{t.setAttribute("http.status_code",e.status);let r=e.headers.get("x-ms-request-id");r&&t.setAttribute("serviceRequestId",r),e.status>=400&&t.setStatus({status:"error"}),t.end()}catch(r){bC.logger.warning(`Skipping tracing span processing due to an error: ${(0,$m.getErrorMessage)(r)}`)}}});var xS=A(NS=>{"use strict";Object.defineProperty(NS,"__esModule",{value:!0});NS.wrapAbortSignalLike=SSe;function SSe(t){if(t instanceof AbortSignal)return{abortSignal:t};if(t.aborted)return{abortSignal:AbortSignal.abort(t.reason)};let e=new AbortController,r=!0;function i(){r&&(t.removeEventListener("abort",n),r=!1)}function n(){e.abort(t.reason),i()}return t.addEventListener("abort",n),{abortSignal:e.signal,cleanup:i}}});var TV=A(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});Cp.wrapAbortSignalLikePolicyName=void 0;Cp.wrapAbortSignalLikePolicy=vSe;var _Se=xS();Cp.wrapAbortSignalLikePolicyName="wrapAbortSignalLikePolicy";function vSe(){return{name:Cp.wrapAbortSignalLikePolicyName,sendRequest:async(t,e)=>{if(!t.abortSignal)return e(t);let{abortSignal:r,cleanup:i}=(0,_Se.wrapAbortSignalLike)(t.abortSignal);t.abortSignal=r;try{return await e(t)}finally{i?.()}}}}});var kV=A(RS=>{"use strict";Object.defineProperty(RS,"__esModule",{value:!0});RS.createPipelineFromOptions=HSe;var NSe=eS(),xSe=XQ(),RSe=tS(),TSe=sS(),DV=fS(),DSe=hS(),PSe=mS(),kSe=gS(),PV=Ot(),OSe=ES(),LSe=CS(),FSe=bS(),MSe=IS(),USe=vS(),qSe=TV();function HSe(t){let e=(0,xSe.createEmptyPipeline)();return PV.isNodeLike&&(t.agent&&e.addPolicy((0,FSe.agentPolicy)(t.agent)),t.tlsOptions&&e.addPolicy((0,MSe.tlsPolicy)(t.tlsOptions)),e.addPolicy((0,OSe.proxyPolicy)(t.proxyOptions)),e.addPolicy((0,DSe.decompressResponsePolicy)())),e.addPolicy((0,qSe.wrapAbortSignalLikePolicy)()),e.addPolicy((0,kSe.formDataPolicy)(),{beforePolicies:[DV.multipartPolicyName]}),e.addPolicy((0,TSe.userAgentPolicy)(t.userAgentOptions)),e.addPolicy((0,LSe.setClientRequestIdPolicy)(t.telemetryOptions?.clientRequestIdHeaderName)),e.addPolicy((0,DV.multipartPolicy)(),{afterPhase:"Deserialize"}),e.addPolicy((0,PSe.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),e.addPolicy((0,USe.tracingPolicy)({...t.userAgentOptions,...t.loggingOptions}),{afterPhase:"Retry"}),PV.isNodeLike&&e.addPolicy((0,RSe.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy((0,NSe.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),e}});var OV=A(TS=>{"use strict";Object.defineProperty(TS,"__esModule",{value:!0});TS.createDefaultHttpClient=zSe;var GSe=lp(),jSe=xS();function zSe(){let t=(0,GSe.createDefaultHttpClient)();return{async sendRequest(e){let{abortSignal:r,cleanup:i}=e.abortSignal?(0,jSe.wrapAbortSignalLike)(e.abortSignal):{};try{return e.abortSignal=r,await t.sendRequest(e)}finally{i?.()}}}}});var LV=A(DS=>{"use strict";Object.defineProperty(DS,"__esModule",{value:!0});DS.createHttpHeaders=YSe;var VSe=lp();function YSe(t){return(0,VSe.createHttpHeaders)(t)}});var FV=A(PS=>{"use strict";Object.defineProperty(PS,"__esModule",{value:!0});PS.createPipelineRequest=JSe;var WSe=lp();function JSe(t){return(0,WSe.createPipelineRequest)(t)}});var UV=A(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});Km.exponentialRetryPolicyName=void 0;Km.exponentialRetryPolicy=$Se;var MV=Pn();Km.exponentialRetryPolicyName=MV.exponentialRetryPolicyName;function $Se(t={}){return(0,MV.exponentialRetryPolicy)(t)}});var HV=A(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});Xm.systemErrorRetryPolicyName=void 0;Xm.systemErrorRetryPolicy=KSe;var qV=Pn();Xm.systemErrorRetryPolicyName=qV.systemErrorRetryPolicyName;function KSe(t={}){return(0,qV.systemErrorRetryPolicy)(t)}});var jV=A(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.throttlingRetryPolicyName=void 0;Zm.throttlingRetryPolicy=XSe;var GV=Pn();Zm.throttlingRetryPolicyName=GV.throttlingRetryPolicyName;function XSe(t={}){return(0,GV.throttlingRetryPolicy)(t)}});var zV=A(kS=>{"use strict";Object.defineProperty(kS,"__esModule",{value:!0});kS.retryPolicy=i_e;var ZSe=bd(),e_e=cC(),t_e=Pn(),r_e=(0,ZSe.createClientLogger)("core-rest-pipeline retryPolicy");function i_e(t,e={maxRetries:e_e.DEFAULT_RETRY_POLICY_COUNT}){return(0,t_e.retryPolicy)(t,{logger:r_e,...e})}});var OS=A(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});bp.DEFAULT_CYCLER_OPTIONS=void 0;bp.createTokenCycler=a_e;var n_e=Ot();bp.DEFAULT_CYCLER_OPTIONS={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function s_e(t,e,r){async function i(){if(Date.now()t.getToken(l,c),s.retryIntervalInMs,i?.expiresOnTimestamp??Date.now()).then(u=>(r=null,i=u,n=c.tenantId,i)).catch(u=>{throw r=null,i=null,n=void 0,u})),r}return async(l,c)=>{let d=!!c.claims,u=n!==c.tenantId;return d&&(i=null),u||d||a.mustRefresh?o(l,c):(a.shouldRefresh&&o(l,c),i)}}});var $V=A(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.bearerTokenAuthenticationPolicyName=void 0;Bd.bearerTokenAuthenticationPolicy=u_e;Bd.parseChallenges=JV;var o_e=OS(),l_e=Fm(),c_e=CC();Bd.bearerTokenAuthenticationPolicyName="bearerTokenAuthenticationPolicy";async function IC(t,e){try{return[await e(t),void 0]}catch(r){if((0,c_e.isRestError)(r)&&r.response)return[r.response,r];throw r}}async function d_e(t){let{scopes:e,getAccessToken:r,request:i}=t,n={abortSignal:i.abortSignal,tracingOptions:i.tracingOptions,enableCae:!0},s=await r(e,n);s&&t.request.headers.set("Authorization",`Bearer ${s.token}`)}function VV(t){return t.status===401&&t.headers.has("WWW-Authenticate")}async function YV(t,e){let{scopes:r}=t,i=await t.getAccessToken(r,{enableCae:!0,claims:e});return i?(t.request.headers.set("Authorization",`${i.tokenType??"Bearer"} ${i.token}`),!0):!1}function u_e(t){let{credential:e,scopes:r,challengeCallbacks:i}=t,n=t.logger||l_e.logger,s={authorizeRequest:i?.authorizeRequest?.bind(i)??d_e,authorizeRequestOnChallenge:i?.authorizeRequestOnChallenge?.bind(i)},a=e?(0,o_e.createTokenCycler)(e):()=>Promise.resolve(null);return{name:Bd.bearerTokenAuthenticationPolicyName,async sendRequest(o,l){if(!o.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await s.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:o,getAccessToken:a,logger:n});let c,d,u;if([c,d]=await IC(o,l),VV(c)){let p=WV(c.headers.get("WWW-Authenticate"));if(p){let f;try{f=atob(p)}catch{return n.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${p}`),c}u=await YV({scopes:Array.isArray(r)?r:[r],response:c,request:o,getAccessToken:a,logger:n},f),u&&([c,d]=await IC(o,l))}else if(s.authorizeRequestOnChallenge&&(u=await s.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:o,response:c,getAccessToken:a,logger:n}),u&&([c,d]=await IC(o,l)),VV(c)&&(p=WV(c.headers.get("WWW-Authenticate")),p))){let f;try{f=atob(p)}catch{return n.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${p}`),c}u=await YV({scopes:Array.isArray(r)?r:[r],response:c,request:o,getAccessToken:a,logger:n},f),u&&([c,d]=await IC(o,l))}}if(d)throw d;return c}}}function JV(t){let e=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,r=/(\w+)="([^"]*)"/g,i=[],n;for(;(n=e.exec(t))!==null;){let s=n[1],a=n[2],o={},l;for(;(l=r.exec(a))!==null;)o[l[1]]=l[2];i.push({scheme:s,params:o})}return i}function WV(t){return t?JV(t).find(r=>r.scheme==="Bearer"&&r.params.claims&&r.params.error==="insufficient_claims")?.params.claims:void 0}});var KV=A(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.ndJsonPolicyName=void 0;Ip.ndJsonPolicy=A_e;Ip.ndJsonPolicyName="ndJsonPolicy";function A_e(){return{name:Ip.ndJsonPolicyName,async sendRequest(t,e){if(typeof t.body=="string"&&t.body.startsWith("[")){let r=JSON.parse(t.body);Array.isArray(r)&&(t.body=r.map(i=>JSON.stringify(i)+`
-`).join(""))}return e(t)}}}});var ZV=A(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.auxiliaryAuthenticationHeaderPolicyName=void 0;wd.auxiliaryAuthenticationHeaderPolicy=m_e;var p_e=OS(),f_e=Fm();wd.auxiliaryAuthenticationHeaderPolicyName="auxiliaryAuthenticationHeaderPolicy";var XV="x-ms-authorization-auxiliary";async function h_e(t){let{scopes:e,getAccessToken:r,request:i}=t,n={abortSignal:i.abortSignal,tracingOptions:i.tracingOptions};return(await r(e,n))?.token??""}function m_e(t){let{credentials:e,scopes:r}=t,i=t.logger||f_e.logger,n=new WeakMap;return{name:wd.auxiliaryAuthenticationHeaderPolicyName,async sendRequest(s,a){if(!s.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return i.info(`${wd.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`),a(s);let o=[];for(let c of e){let d=n.get(c);d||(d=(0,p_e.createTokenCycler)(c),n.set(c,d)),o.push(h_e({scopes:Array.isArray(r)?r:[r],request:s,getAccessToken:d,logger:i}))}let l=(await Promise.all(o)).filter(c=>!!c);return l.length===0?(i.warning(`None of the auxiliary tokens are valid. ${XV} header will not be set.`),a(s)):(s.headers.set(XV,l.map(c=>`Bearer ${c}`).join(", ")),a(s))}}}});var Lr=A(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.createFileFromStream=ie.createFile=ie.agentPolicyName=ie.agentPolicy=ie.auxiliaryAuthenticationHeaderPolicyName=ie.auxiliaryAuthenticationHeaderPolicy=ie.ndJsonPolicyName=ie.ndJsonPolicy=ie.bearerTokenAuthenticationPolicyName=ie.bearerTokenAuthenticationPolicy=ie.formDataPolicyName=ie.formDataPolicy=ie.tlsPolicyName=ie.tlsPolicy=ie.userAgentPolicyName=ie.userAgentPolicy=ie.defaultRetryPolicy=ie.tracingPolicyName=ie.tracingPolicy=ie.retryPolicy=ie.throttlingRetryPolicyName=ie.throttlingRetryPolicy=ie.systemErrorRetryPolicyName=ie.systemErrorRetryPolicy=ie.redirectPolicyName=ie.redirectPolicy=ie.getDefaultProxySettings=ie.proxyPolicyName=ie.proxyPolicy=ie.multipartPolicyName=ie.multipartPolicy=ie.logPolicyName=ie.logPolicy=ie.setClientRequestIdPolicyName=ie.setClientRequestIdPolicy=ie.exponentialRetryPolicyName=ie.exponentialRetryPolicy=ie.decompressResponsePolicyName=ie.decompressResponsePolicy=ie.isRestError=ie.RestError=ie.createPipelineRequest=ie.createHttpHeaders=ie.createDefaultHttpClient=ie.createPipelineFromOptions=ie.createEmptyPipeline=void 0;var g_e=XQ();Object.defineProperty(ie,"createEmptyPipeline",{enumerable:!0,get:function(){return g_e.createEmptyPipeline}});var y_e=kV();Object.defineProperty(ie,"createPipelineFromOptions",{enumerable:!0,get:function(){return y_e.createPipelineFromOptions}});var E_e=OV();Object.defineProperty(ie,"createDefaultHttpClient",{enumerable:!0,get:function(){return E_e.createDefaultHttpClient}});var C_e=LV();Object.defineProperty(ie,"createHttpHeaders",{enumerable:!0,get:function(){return C_e.createHttpHeaders}});var b_e=FV();Object.defineProperty(ie,"createPipelineRequest",{enumerable:!0,get:function(){return b_e.createPipelineRequest}});var eY=CC();Object.defineProperty(ie,"RestError",{enumerable:!0,get:function(){return eY.RestError}});Object.defineProperty(ie,"isRestError",{enumerable:!0,get:function(){return eY.isRestError}});var tY=hS();Object.defineProperty(ie,"decompressResponsePolicy",{enumerable:!0,get:function(){return tY.decompressResponsePolicy}});Object.defineProperty(ie,"decompressResponsePolicyName",{enumerable:!0,get:function(){return tY.decompressResponsePolicyName}});var rY=UV();Object.defineProperty(ie,"exponentialRetryPolicy",{enumerable:!0,get:function(){return rY.exponentialRetryPolicy}});Object.defineProperty(ie,"exponentialRetryPolicyName",{enumerable:!0,get:function(){return rY.exponentialRetryPolicyName}});var iY=CS();Object.defineProperty(ie,"setClientRequestIdPolicy",{enumerable:!0,get:function(){return iY.setClientRequestIdPolicy}});Object.defineProperty(ie,"setClientRequestIdPolicyName",{enumerable:!0,get:function(){return iY.setClientRequestIdPolicyName}});var nY=eS();Object.defineProperty(ie,"logPolicy",{enumerable:!0,get:function(){return nY.logPolicy}});Object.defineProperty(ie,"logPolicyName",{enumerable:!0,get:function(){return nY.logPolicyName}});var sY=fS();Object.defineProperty(ie,"multipartPolicy",{enumerable:!0,get:function(){return sY.multipartPolicy}});Object.defineProperty(ie,"multipartPolicyName",{enumerable:!0,get:function(){return sY.multipartPolicyName}});var LS=ES();Object.defineProperty(ie,"proxyPolicy",{enumerable:!0,get:function(){return LS.proxyPolicy}});Object.defineProperty(ie,"proxyPolicyName",{enumerable:!0,get:function(){return LS.proxyPolicyName}});Object.defineProperty(ie,"getDefaultProxySettings",{enumerable:!0,get:function(){return LS.getDefaultProxySettings}});var aY=tS();Object.defineProperty(ie,"redirectPolicy",{enumerable:!0,get:function(){return aY.redirectPolicy}});Object.defineProperty(ie,"redirectPolicyName",{enumerable:!0,get:function(){return aY.redirectPolicyName}});var oY=HV();Object.defineProperty(ie,"systemErrorRetryPolicy",{enumerable:!0,get:function(){return oY.systemErrorRetryPolicy}});Object.defineProperty(ie,"systemErrorRetryPolicyName",{enumerable:!0,get:function(){return oY.systemErrorRetryPolicyName}});var lY=jV();Object.defineProperty(ie,"throttlingRetryPolicy",{enumerable:!0,get:function(){return lY.throttlingRetryPolicy}});Object.defineProperty(ie,"throttlingRetryPolicyName",{enumerable:!0,get:function(){return lY.throttlingRetryPolicyName}});var I_e=zV();Object.defineProperty(ie,"retryPolicy",{enumerable:!0,get:function(){return I_e.retryPolicy}});var cY=vS();Object.defineProperty(ie,"tracingPolicy",{enumerable:!0,get:function(){return cY.tracingPolicy}});Object.defineProperty(ie,"tracingPolicyName",{enumerable:!0,get:function(){return cY.tracingPolicyName}});var B_e=mS();Object.defineProperty(ie,"defaultRetryPolicy",{enumerable:!0,get:function(){return B_e.defaultRetryPolicy}});var dY=sS();Object.defineProperty(ie,"userAgentPolicy",{enumerable:!0,get:function(){return dY.userAgentPolicy}});Object.defineProperty(ie,"userAgentPolicyName",{enumerable:!0,get:function(){return dY.userAgentPolicyName}});var uY=IS();Object.defineProperty(ie,"tlsPolicy",{enumerable:!0,get:function(){return uY.tlsPolicy}});Object.defineProperty(ie,"tlsPolicyName",{enumerable:!0,get:function(){return uY.tlsPolicyName}});var AY=gS();Object.defineProperty(ie,"formDataPolicy",{enumerable:!0,get:function(){return AY.formDataPolicy}});Object.defineProperty(ie,"formDataPolicyName",{enumerable:!0,get:function(){return AY.formDataPolicyName}});var pY=$V();Object.defineProperty(ie,"bearerTokenAuthenticationPolicy",{enumerable:!0,get:function(){return pY.bearerTokenAuthenticationPolicy}});Object.defineProperty(ie,"bearerTokenAuthenticationPolicyName",{enumerable:!0,get:function(){return pY.bearerTokenAuthenticationPolicyName}});var fY=KV();Object.defineProperty(ie,"ndJsonPolicy",{enumerable:!0,get:function(){return fY.ndJsonPolicy}});Object.defineProperty(ie,"ndJsonPolicyName",{enumerable:!0,get:function(){return fY.ndJsonPolicyName}});var hY=ZV();Object.defineProperty(ie,"auxiliaryAuthenticationHeaderPolicy",{enumerable:!0,get:function(){return hY.auxiliaryAuthenticationHeaderPolicy}});Object.defineProperty(ie,"auxiliaryAuthenticationHeaderPolicyName",{enumerable:!0,get:function(){return hY.auxiliaryAuthenticationHeaderPolicyName}});var mY=bS();Object.defineProperty(ie,"agentPolicy",{enumerable:!0,get:function(){return mY.agentPolicy}});Object.defineProperty(ie,"agentPolicyName",{enumerable:!0,get:function(){return mY.agentPolicyName}});var gY=pS();Object.defineProperty(ie,"createFile",{enumerable:!0,get:function(){return gY.createFile}});Object.defineProperty(ie,"createFileFromStream",{enumerable:!0,get:function(){return gY.createFileFromStream}})});var yY=A(BC=>{"use strict";Object.defineProperty(BC,"__esModule",{value:!0});BC.AzureKeyCredential=void 0;var FS=class{_key;get key(){return this._key}constructor(e){if(!e)throw new Error("key must be a non-empty string");this._key=e}update(e){this._key=e}};BC.AzureKeyCredential=FS});var EY=A(MS=>{"use strict";Object.defineProperty(MS,"__esModule",{value:!0});MS.isKeyCredential=Q_e;var w_e=Ot();function Q_e(t){return(0,w_e.isObjectWithProperties)(t,["key"])&&typeof t.key=="string"}});var CY=A(e1=>{"use strict";Object.defineProperty(e1,"__esModule",{value:!0});e1.AzureNamedKeyCredential=void 0;e1.isNamedKeyCredential=__e;var S_e=Ot(),US=class{_key;_name;get key(){return this._key}get name(){return this._name}constructor(e,r){if(!e||!r)throw new TypeError("name and key must be non-empty strings");this._name=e,this._key=r}update(e,r){if(!e||!r)throw new TypeError("newName and newKey must be non-empty strings");this._name=e,this._key=r}};e1.AzureNamedKeyCredential=US;function __e(t){return(0,S_e.isObjectWithProperties)(t,["name","key"])&&typeof t.key=="string"&&typeof t.name=="string"}});var bY=A(t1=>{"use strict";Object.defineProperty(t1,"__esModule",{value:!0});t1.AzureSASCredential=void 0;t1.isSASCredential=N_e;var v_e=Ot(),qS=class{_signature;get signature(){return this._signature}constructor(e){if(!e)throw new Error("shared access signature must be a non-empty string");this._signature=e}update(e){if(!e)throw new Error("shared access signature must be a non-empty string");this._signature=e}};t1.AzureSASCredential=qS;function N_e(t){return(0,v_e.isObjectWithProperties)(t,["signature"])&&typeof t.signature=="string"}});var IY=A(r1=>{"use strict";Object.defineProperty(r1,"__esModule",{value:!0});r1.isBearerToken=x_e;r1.isPopToken=R_e;r1.isTokenCredential=T_e;function x_e(t){return!t.tokenType||t.tokenType==="Bearer"}function R_e(t){return t.tokenType==="pop"}function T_e(t){let e=t;return e&&typeof e.getToken=="function"&&(e.signRequest===void 0||e.getToken.length>0)}});var Bp=A(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.isTokenCredential=Fi.isSASCredential=Fi.AzureSASCredential=Fi.isNamedKeyCredential=Fi.AzureNamedKeyCredential=Fi.isKeyCredential=Fi.AzureKeyCredential=void 0;var D_e=yY();Object.defineProperty(Fi,"AzureKeyCredential",{enumerable:!0,get:function(){return D_e.AzureKeyCredential}});var P_e=EY();Object.defineProperty(Fi,"isKeyCredential",{enumerable:!0,get:function(){return P_e.isKeyCredential}});var BY=CY();Object.defineProperty(Fi,"AzureNamedKeyCredential",{enumerable:!0,get:function(){return BY.AzureNamedKeyCredential}});Object.defineProperty(Fi,"isNamedKeyCredential",{enumerable:!0,get:function(){return BY.isNamedKeyCredential}});var wY=bY();Object.defineProperty(Fi,"AzureSASCredential",{enumerable:!0,get:function(){return wY.AzureSASCredential}});Object.defineProperty(Fi,"isSASCredential",{enumerable:!0,get:function(){return wY.isSASCredential}});var k_e=IY();Object.defineProperty(Fi,"isTokenCredential",{enumerable:!0,get:function(){return k_e.isTokenCredential}})});var HS=A(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.disableKeepAlivePolicyName=void 0;Tl.createDisableKeepAlivePolicy=O_e;Tl.pipelineContainsDisableKeepAlivePolicy=L_e;Tl.disableKeepAlivePolicyName="DisableKeepAlivePolicy";function O_e(){return{name:Tl.disableKeepAlivePolicyName,async sendRequest(t,e){return t.disableKeepAlive=!0,e(t)}}}function L_e(t){return t.getOrderedPolicies().some(e=>e.name===Tl.disableKeepAlivePolicyName)}});var GS=A(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.encodeString=F_e;wp.encodeByteArray=M_e;wp.decodeString=U_e;wp.decodeStringToString=q_e;function F_e(t){return Buffer.from(t).toString("base64")}function M_e(t){return(t instanceof Buffer?t:Buffer.from(t.buffer)).toString("base64")}function U_e(t){return Buffer.from(t,"base64")}function q_e(t){return Buffer.from(t,"base64").toString()}});var i1=A(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});Qp.XML_CHARKEY=Qp.XML_ATTRKEY=void 0;Qp.XML_ATTRKEY="$";Qp.XML_CHARKEY="_"});var jS=A(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.isPrimitiveBody=QY;Sp.isDuration=G_e;Sp.isValidUuid=z_e;Sp.flattenResponse=Y_e;function QY(t,e){return e!=="Composite"&&e!=="Dictionary"&&(typeof t=="string"||typeof t=="number"||typeof t=="boolean"||e?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)!==null||t===void 0||t===null)}var H_e=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function G_e(t){return H_e.test(t)}var j_e=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function z_e(t){return j_e.test(t)}function V_e(t){let e={...t.headers,...t.body};return t.hasNullableType&&Object.getOwnPropertyNames(e).length===0?t.shouldWrapBody?{body:null}:null:t.shouldWrapBody?{...t.headers,body:t.body}:e}function Y_e(t,e){let r=t.parsedHeaders;if(t.request.method==="HEAD")return{...r,body:t.parsedBody};let i=e&&e.bodyMapper,n=!!i?.nullable,s=i?.type.name;if(s==="Stream")return{...r,blobBody:t.blobBody,readableStreamBody:t.readableStreamBody};let a=s==="Composite"&&i.type.modelProperties||{},o=Object.keys(a).some(l=>a[l].serializedName==="");if(s==="Sequence"||o){let l=t.parsedBody??[];for(let c of Object.keys(a))a[c].serializedName&&(l[c]=t.parsedBody?.[c]);if(r)for(let c of Object.keys(r))l[c]=r[c];return n&&!t.parsedBody&&!r&&Object.getOwnPropertyNames(a).length===0?null:l}return V_e({body:t.parsedBody,headers:r,hasNullableType:n,shouldWrapBody:QY(t.parsedBody,s)})}});var s1=A(n1=>{"use strict";Object.defineProperty(n1,"__esModule",{value:!0});n1.MapperTypeNames=void 0;n1.createSerializer=J_e;var W_e=(ar(),dr(sr)),QC=W_e.__importStar(GS()),ii=i1(),_Y=jS(),zS=class{modelMappers;isXML;constructor(e={},r=!1){this.modelMappers=e,this.isXML=r}validateConstraints(e,r,i){let n=(s,a)=>{throw new Error(`"${i}" with value "${r}" should satisfy the constraint "${s}": ${a}.`)};if(e.constraints&&r!==void 0&&r!==null){let{ExclusiveMaximum:s,ExclusiveMinimum:a,InclusiveMaximum:o,InclusiveMinimum:l,MaxItems:c,MaxLength:d,MinItems:u,MinLength:p,MultipleOf:f,Pattern:h,UniqueItems:E}=e.constraints;if(s!==void 0&&r>=s&&n("ExclusiveMaximum",s),a!==void 0&&r<=a&&n("ExclusiveMinimum",a),o!==void 0&&r>o&&n("InclusiveMaximum",o),l!==void 0&&rc&&n("MaxItems",c),d!==void 0&&r.length>d&&n("MaxLength",d),u!==void 0&&r.lengthN.indexOf(C)!==b)&&n("UniqueItems",E)}}serialize(e,r,i,n={xml:{}}){let s={xml:{rootName:n.xml.rootName??"",includeRoot:n.xml.includeRoot??!1,xmlCharKey:n.xml.xmlCharKey??ii.XML_CHARKEY}},a={},o=e.type.name;i||(i=e.serializedName),o.match(/^Sequence$/i)!==null&&(a=[]),e.isConstant&&(r=e.defaultValue);let{required:l,nullable:c}=e;if(l&&c&&r===void 0)throw new Error(`${i} cannot be undefined.`);if(l&&!c&&r==null)throw new Error(`${i} cannot be null or undefined.`);if(!l&&c===!1&&r===null)throw new Error(`${i} cannot be null.`);return r==null||o.match(/^any$/i)!==null?a=r:o.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null?a=tve(o,i,r):o.match(/^Enum$/i)!==null?a=rve(i,e.type.allowedValues,r):o.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null?a=sve(o,r,i):o.match(/^ByteArray$/i)!==null?a=ive(i,r):o.match(/^Base64Url$/i)!==null?a=nve(i,r):o.match(/^Sequence$/i)!==null?a=ave(this,e,r,i,!!this.isXML,s):o.match(/^Dictionary$/i)!==null?a=ove(this,e,r,i,!!this.isXML,s):o.match(/^Composite$/i)!==null&&(a=cve(this,e,r,i,!!this.isXML,s)),a}deserialize(e,r,i,n={xml:{}}){let s={xml:{rootName:n.xml.rootName??"",includeRoot:n.xml.includeRoot??!1,xmlCharKey:n.xml.xmlCharKey??ii.XML_CHARKEY},ignoreUnknownProperties:n.ignoreUnknownProperties??!1};if(r==null)return this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped&&(r=[]),e.defaultValue!==void 0&&(r=e.defaultValue),r;let a,o=e.type.name;if(i||(i=e.serializedName),o.match(/^Composite$/i)!==null)a=uve(this,e,r,i,s);else{if(this.isXML){let l=s.xml.xmlCharKey;r[ii.XML_ATTRKEY]!==void 0&&r[l]!==void 0&&(r=r[l])}o.match(/^Number$/i)!==null?(a=parseFloat(r),isNaN(a)&&(a=r)):o.match(/^Boolean$/i)!==null?r==="true"?a=!0:r==="false"?a=!1:a=r:o.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null?a=r:o.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null?a=new Date(r):o.match(/^UnixTime$/i)!==null?a=eve(r):o.match(/^ByteArray$/i)!==null?a=QC.decodeString(r):o.match(/^Base64Url$/i)!==null?a=X_e(r):o.match(/^Sequence$/i)!==null?a=pve(this,e,r,i,s):o.match(/^Dictionary$/i)!==null&&(a=Ave(this,e,r,i,s))}return e.isConstant&&(a=e.defaultValue),a}};function J_e(t={},e=!1){return new zS(t,e)}function $_e(t,e){let r=t.length;for(;r-1>=0&&t[r-1]===e;)--r;return t.substr(0,r)}function K_e(t){if(!t)return;if(!(t instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");let e=QC.encodeByteArray(t);return $_e(e,"=").replace(/\+/g,"-").replace(/\//g,"_")}function X_e(t){if(t){if(t&&typeof t.valueOf()!="string")throw new Error("Please provide an input of type string for converting to Uint8Array");return t=t.replace(/-/g,"+").replace(/_/g,"/"),QC.decodeString(t)}}function VS(t){let e=[],r="";if(t){let i=t.split(".");for(let n of i)n.charAt(n.length-1)==="\\"?r+=n.substr(0,n.length-1)+".":(r+=n,e.push(r),r="")}return e}function Z_e(t){if(t)return typeof t.valueOf()=="string"&&(t=new Date(t)),Math.floor(t.getTime()/1e3)}function eve(t){if(t)return new Date(t*1e3)}function tve(t,e,r){if(r!=null){if(t.match(/^Number$/i)!==null){if(typeof r!="number")throw new Error(`${e} with value ${r} must be of type number.`)}else if(t.match(/^String$/i)!==null){if(typeof r.valueOf()!="string")throw new Error(`${e} with value "${r}" must be of type string.`)}else if(t.match(/^Uuid$/i)!==null){if(!(typeof r.valueOf()=="string"&&(0,_Y.isValidUuid)(r)))throw new Error(`${e} with value "${r}" must be of type string and a valid uuid.`)}else if(t.match(/^Boolean$/i)!==null){if(typeof r!="boolean")throw new Error(`${e} with value ${r} must be of type boolean.`)}else if(t.match(/^Stream$/i)!==null){let i=typeof r;if(i!=="string"&&typeof r.pipe!="function"&&typeof r.tee!="function"&&!(r instanceof ArrayBuffer)&&!ArrayBuffer.isView(r)&&!((typeof Blob=="function"||typeof Blob=="object")&&r instanceof Blob)&&i!=="function")throw new Error(`${e} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}}return r}function rve(t,e,r){if(!e)throw new Error(`Please provide a set of allowedValues to validate ${t} as an Enum Type.`);if(!e.some(n=>typeof n.valueOf()=="string"?n.toLowerCase()===r.toLowerCase():n===r))throw new Error(`${r} is not a valid value for ${t}. The valid values are: ${JSON.stringify(e)}.`);return r}function ive(t,e){if(e!=null){if(!(e instanceof Uint8Array))throw new Error(`${t} must be of type Uint8Array.`);e=QC.encodeByteArray(e)}return e}function nve(t,e){if(e!=null){if(!(e instanceof Uint8Array))throw new Error(`${t} must be of type Uint8Array.`);e=K_e(e)}return e}function sve(t,e,r){if(e!=null){if(t.match(/^Date$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);e=e instanceof Date?e.toISOString().substring(0,10):new Date(e).toISOString().substring(0,10)}else if(t.match(/^DateTime$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);e=e instanceof Date?e.toISOString():new Date(e).toISOString()}else if(t.match(/^DateTimeRfc1123$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123 format.`);e=e instanceof Date?e.toUTCString():new Date(e).toUTCString()}else if(t.match(/^UnixTime$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);e=Z_e(e)}else if(t.match(/^TimeSpan$/i)!==null&&!(0,_Y.isDuration)(e))throw new Error(`${r} must be a string in ISO 8601 format. Instead was "${e}".`)}return e}function ave(t,e,r,i,n,s){if(!Array.isArray(r))throw new Error(`${i} must be of type Array.`);let a=e.type.element;if(!a||typeof a!="object")throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${i}.`);a.type.name==="Composite"&&a.type.className&&(a=t.modelMappers[a.type.className]??a);let o=[];for(let l=0;lp!==d)&&(a[d]=t.serialize(l,r[d],i+'["'+d+'"]',s))}return a}return r}function xY(t,e,r,i){if(!r||!t.xmlNamespace)return e;let s={[t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns"]:t.xmlNamespace};if(["Composite"].includes(t.type.name)){if(e[ii.XML_ATTRKEY])return e;{let o={...e};return o[ii.XML_ATTRKEY]=s,o}}let a={};return a[i.xml.xmlCharKey]=e,a[ii.XML_ATTRKEY]=s,a}function dve(t,e){return[ii.XML_ATTRKEY,e.xml.xmlCharKey].includes(t)}function uve(t,e,r,i,n){let s=n.xml.xmlCharKey??ii.XML_CHARKEY;wC(t,e)&&(e=RY(t,e,r,"serializedName"));let a=NY(t,e,i),o={},l=[];for(let d of Object.keys(a)){let u=a[d],p=VS(a[d].serializedName);l.push(p[0]);let{serializedName:f,xmlName:h,xmlElementName:E}=u,C=i;f!==""&&f!==void 0&&(C=i+"."+f);let b=u.headerCollectionPrefix;if(b){let N={};for(let D of Object.keys(r))D.startsWith(b)&&(N[D.substring(b.length)]=t.deserialize(u.type.value,r[D],C,n)),l.push(D);o[d]=N}else if(t.isXML)if(u.xmlIsAttribute&&r[ii.XML_ATTRKEY])o[d]=t.deserialize(u,r[ii.XML_ATTRKEY][h],C,n);else if(u.xmlIsMsText)r[s]!==void 0?o[d]=r[s]:typeof r=="string"&&(o[d]=r);else{let N=E||h||f;if(u.xmlIsWrapped){let O=r[h]?.[E]??[];o[d]=t.deserialize(u,O,C,n),l.push(h)}else{let D=r[N];o[d]=t.deserialize(u,D,C,n),l.push(N)}}else{let N,D=r,O=0;for(let U of p){if(!D)break;O++,D=D[U]}D===null&&O{for(let p in a)if(VS(a[p].serializedName)[0]===u)return!1;return!0};for(let u in r)d(u)&&(o[u]=t.deserialize(c,r[u],i+'["'+u+'"]',n))}else if(r&&!n.ignoreUnknownProperties)for(let d of Object.keys(r))o[d]===void 0&&!l.includes(d)&&!dve(d,n)&&(o[d]=r[d]);return o}function Ave(t,e,r,i,n){let s=e.type.value;if(!s||typeof s!="object")throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${i}`);if(r){let a={};for(let o of Object.keys(r))a[o]=t.deserialize(s,r[o],i,n);return a}return r}function pve(t,e,r,i,n){let s=e.type.element;if(!s||typeof s!="object")throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${i}`);if(r){Array.isArray(r)||(r=[r]),s.type.name==="Composite"&&s.type.className&&(s=t.modelMappers[s.type.className]??s);let a=[];for(let o=0;o{"use strict";Object.defineProperty(SC,"__esModule",{value:!0});SC.state=void 0;SC.state={operationRequestMap:new WeakMap}});var a1=A(_C=>{"use strict";Object.defineProperty(_C,"__esModule",{value:!0});_C.getOperationArgumentValueFromParameter=kY;_C.getOperationRequestInfo=LY;var DY=TY();function kY(t,e,r){let i=e.parameterPath,n=e.mapper,s;if(typeof i=="string"&&(i=[i]),Array.isArray(i)){if(i.length>0)if(n.isConstant)s=n.defaultValue;else{let a=PY(t,i);!a.propertyFound&&r&&(a=PY(r,i));let o=!1;a.propertyFound||(o=n.required||i[0]==="options"&&i.length===2),s=o?n.defaultValue:a.propertyValue}}else{n.required&&(s={});for(let a in i){let o=n.type.modelProperties[a],l=i[a],c=kY(t,{parameterPath:l,mapper:o},r);c!==void 0&&(s||(s={}),s[a]=c)}}return s}function PY(t,e){let r={propertyFound:!1},i=0;for(;i{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.deserializationPolicyName=void 0;_p.deserializationPolicy=Eve;var mve=i1(),vC=Lr(),FY=s1(),YS=a1(),gve=["application/json","text/json"],yve=["application/xml","application/atom+xml"];_p.deserializationPolicyName="deserializationPolicy";function Eve(t={}){let e=t.expectedContentTypes?.json??gve,r=t.expectedContentTypes?.xml??yve,i=t.parseXML,n=t.serializerOptions,s={xml:{rootName:n?.xml.rootName??"",includeRoot:n?.xml.includeRoot??!1,xmlCharKey:n?.xml.xmlCharKey??mve.XML_CHARKEY}};return{name:_p.deserializationPolicyName,async sendRequest(a,o){let l=await o(a);return Ive(e,r,l,s,i)}}}function Cve(t){let e,r=t.request,i=(0,YS.getOperationRequestInfo)(r),n=i?.operationSpec;return n&&(i?.operationResponseGetter?e=i?.operationResponseGetter(n,t):e=n.responses[t.status]),e}function bve(t){let e=t.request,i=(0,YS.getOperationRequestInfo)(e)?.shouldDeserialize,n;return i===void 0?n=!0:typeof i=="boolean"?n=i:n=i(t),n}async function Ive(t,e,r,i,n){let s=await Qve(t,e,r,i,n);if(!bve(s))return s;let o=(0,YS.getOperationRequestInfo)(s.request)?.operationSpec;if(!o||!o.responses)return s;let l=Cve(s),{error:c,shouldReturnResponse:d}=wve(s,o,l,i);if(c)throw c;if(d)return s;if(l){if(l.bodyMapper){let u=s.parsedBody;o.isXML&&l.bodyMapper.type.name===FY.MapperTypeNames.Sequence&&(u=typeof u=="object"?u[l.bodyMapper.xmlElementName]:[]);try{s.parsedBody=o.serializer.deserialize(l.bodyMapper,u,"operationRes.parsedBody",i)}catch(p){throw new vC.RestError(`Error ${p} occurred in deserializing the responseBody - ${s.bodyAsText}`,{statusCode:s.status,request:s.request,response:s})}}else o.httpMethod==="HEAD"&&(s.parsedBody=r.status>=200&&r.status<300);l.headersMapper&&(s.parsedHeaders=o.serializer.deserialize(l.headersMapper,s.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return s}function Bve(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}function wve(t,e,r,i){let n=200<=t.status&&t.status<300;if(Bve(e)?n:!!r)if(r){if(!r.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let a=r??e.responses.default,o=t.request.streamResponseStatusCodes?.has(t.status)?`Unexpected status code: ${t.status}`:t.bodyAsText,l=new vC.RestError(o,{statusCode:t.status,request:t.request,response:t});if(!a&&!(t.parsedBody?.error?.code&&t.parsedBody?.error?.message))throw l;let c=a?.bodyMapper,d=a?.headersMapper;try{if(t.parsedBody){let u=t.parsedBody,p;if(c){let h=u;if(e.isXML&&c.type.name===FY.MapperTypeNames.Sequence){h=[];let E=c.xmlElementName;typeof u=="object"&&E&&(h=u[E])}p=e.serializer.deserialize(c,h,"error.response.parsedBody",i)}let f=u.error||p||u;l.code=f.code,f.message&&(l.message=f.message),c&&(l.response.parsedBody=p)}t.headers&&d&&(l.response.parsedHeaders=e.serializer.deserialize(d,t.headers.toJSON(),"operationRes.parsedHeaders"))}catch(u){l.message=`Error "${u.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:!1}}async function Qve(t,e,r,i,n){if(!r.request.streamResponseStatusCodes?.has(r.status)&&r.bodyAsText){let s=r.bodyAsText,a=r.headers.get("Content-Type")||"",o=a?a.split(";").map(l=>l.toLowerCase()):[];try{if(o.length===0||o.some(l=>t.indexOf(l)!==-1))return r.parsedBody=JSON.parse(s),r;if(o.some(l=>e.indexOf(l)!==-1)){if(!n)throw new Error("Parsing XML not supported.");let l=await n(s,i.xml);return r.parsedBody=l,r}}catch(l){let c=`Error "${l}" occurred while parsing the response body - ${r.bodyAsText}.`,d=l.code||vC.RestError.PARSE_ERROR;throw new vC.RestError(c,{code:d,statusCode:r.status,request:r.request,response:r})}}return r}});var xC=A(NC=>{"use strict";Object.defineProperty(NC,"__esModule",{value:!0});NC.getStreamingResponseStatusCodes=_ve;NC.getPathStringFromParameter=vve;var Sve=s1();function _ve(t){let e=new Set;for(let r in t.responses){let i=t.responses[r];i.bodyMapper&&i.bodyMapper.type.name===Sve.MapperTypeNames.Stream&&e.add(Number(r))}return e}function vve(t){let{parameterPath:e,mapper:r}=t,i;return typeof e=="string"?i=e:Array.isArray(e)?i=e.join("."):i=r.serializedName,i}});var KS=A(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.serializationPolicyName=void 0;Dl.serializationPolicy=Nve;Dl.serializeHeaders=MY;Dl.serializeRequestBody=UY;var $S=i1(),RC=a1(),JS=s1(),o1=xC();Dl.serializationPolicyName="serializationPolicy";function Nve(t={}){let e=t.stringifyXML;return{name:Dl.serializationPolicyName,async sendRequest(r,i){let n=(0,RC.getOperationRequestInfo)(r),s=n?.operationSpec,a=n?.operationArguments;return s&&a&&(MY(r,a,s),UY(r,a,s,e)),i(r)}}}function MY(t,e,r){if(r.headerParameters)for(let n of r.headerParameters){let s=(0,RC.getOperationArgumentValueFromParameter)(e,n);if(s!=null||n.mapper.required){s=r.serializer.serialize(n.mapper,s,(0,o1.getPathStringFromParameter)(n));let a=n.mapper.headerCollectionPrefix;if(a)for(let o of Object.keys(s))t.headers.set(a+o,s[o]);else t.headers.set(n.mapper.serializedName||(0,o1.getPathStringFromParameter)(n),s)}}let i=e.options?.requestOptions?.customHeaders;if(i)for(let n of Object.keys(i))t.headers.set(n,i[n])}function UY(t,e,r,i=function(){throw new Error("XML serialization unsupported!")}){let n=e.options?.serializerOptions,s={xml:{rootName:n?.xml.rootName??"",includeRoot:n?.xml.includeRoot??!1,xmlCharKey:n?.xml.xmlCharKey??$S.XML_CHARKEY}},a=s.xml.xmlCharKey;if(r.requestBody&&r.requestBody.mapper){t.body=(0,RC.getOperationArgumentValueFromParameter)(e,r.requestBody);let o=r.requestBody.mapper,{required:l,serializedName:c,xmlName:d,xmlElementName:u,xmlNamespace:p,xmlNamespacePrefix:f,nullable:h}=o,E=o.type.name;try{if(t.body!==void 0&&t.body!==null||h&&t.body===null||l){let C=(0,o1.getPathStringFromParameter)(r.requestBody);t.body=r.serializer.serialize(o,t.body,C,s);let b=E===JS.MapperTypeNames.Stream;if(r.isXML){let N=f?`xmlns:${f}`:"xmlns",D=xve(p,N,E,t.body,s);E===JS.MapperTypeNames.Sequence?t.body=i(Rve(D,u||d||c,N,p),{rootName:d||c,xmlCharKey:a}):b||(t.body=i(D,{rootName:d||c,xmlCharKey:a}))}else{if(E===JS.MapperTypeNames.String&&(r.contentType?.match("text/plain")||r.mediaType==="text"))return;b||(t.body=JSON.stringify(t.body))}}}catch(C){throw new Error(`Error "${C.message}" occurred in serializing the payload - ${JSON.stringify(c,void 0," ")}.`)}}else if(r.formDataParameters&&r.formDataParameters.length>0){t.formData={};for(let o of r.formDataParameters){let l=(0,RC.getOperationArgumentValueFromParameter)(e,o);if(l!=null){let c=o.mapper.serializedName||(0,o1.getPathStringFromParameter)(o);t.formData[c]=r.serializer.serialize(o.mapper,l,(0,o1.getPathStringFromParameter)(o),s)}}}}function xve(t,e,r,i,n){if(t&&!["Composite","Sequence","Dictionary"].includes(r)){let s={};return s[n.xml.xmlCharKey]=i,s[$S.XML_ATTRKEY]={[e]:t},s}return i}function Rve(t,e,r,i){if(Array.isArray(t)||(t=[t]),!r||!i)return{[e]:t};let n={[e]:t};return n[$S.XML_ATTRKEY]={[r]:i},n}});var ZS=A(XS=>{"use strict";Object.defineProperty(XS,"__esModule",{value:!0});XS.createClientPipeline=Pve;var Tve=WS(),qY=Lr(),Dve=KS();function Pve(t={}){let e=(0,qY.createPipelineFromOptions)(t??{});return t.credentialOptions&&e.addPolicy((0,qY.bearerTokenAuthenticationPolicy)({credential:t.credentialOptions.credential,scopes:t.credentialOptions.credentialScopes})),e.addPolicy((0,Dve.serializationPolicy)(t.serializationOptions),{phase:"Serialize"}),e.addPolicy((0,Tve.deserializationPolicy)(t.deserializationOptions),{phase:"Deserialize"}),e}});var HY=A(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});t_.getCachedDefaultHttpClient=Ove;var kve=Lr(),e_;function Ove(){return e_||(e_=(0,kve.createDefaultHttpClient)()),e_}});var VY=A(TC=>{"use strict";Object.defineProperty(TC,"__esModule",{value:!0});TC.getRequestUrl=Fve;TC.appendQueryParams=zY;var jY=a1(),r_=xC(),Lve={CSV:",",SSV:" ",Multi:"Multi",TSV:" ",Pipes:"|"};function Fve(t,e,r,i){let n=Mve(e,r,i),s=!1,a=GY(t,n);if(e.path){let c=GY(e.path,n);e.path==="/{nextLink}"&&c.startsWith("/")&&(c=c.substring(1)),Uve(c)?(a=c,s=!0):a=qve(a,c)}let{queryParams:o,sequenceParams:l}=Hve(e,r,i);return a=zY(a,o,l,s),a}function GY(t,e){let r=t;for(let[i,n]of e)r=r.split(i).join(n);return r}function Mve(t,e,r){let i=new Map;if(t.urlParameters?.length)for(let n of t.urlParameters){let s=(0,jY.getOperationArgumentValueFromParameter)(e,n,r),a=(0,r_.getPathStringFromParameter)(n);s=t.serializer.serialize(n.mapper,s,a),n.skipEncoding||(s=encodeURIComponent(s)),i.set(`{${n.mapper.serializedName||a}}`,s)}return i}function Uve(t){return t.includes("://")}function qve(t,e){if(!e)return t;let r=new URL(t),i=r.pathname;i.endsWith("/")||(i=`${i}/`),e.startsWith("/")&&(e=e.substring(1));let n=e.indexOf("?");if(n!==-1){let s=e.substring(0,n),a=e.substring(n+1);i=i+s,a&&(r.search=r.search?`${r.search}&${a}`:a)}else i=i+e;return r.pathname=i,r.toString()}function Hve(t,e,r){let i=new Map,n=new Set;if(t.queryParameters?.length)for(let s of t.queryParameters){s.mapper.type.name==="Sequence"&&s.mapper.serializedName&&n.add(s.mapper.serializedName);let a=(0,jY.getOperationArgumentValueFromParameter)(e,s,r);if(a!=null||s.mapper.required){a=t.serializer.serialize(s.mapper,a,(0,r_.getPathStringFromParameter)(s));let o=s.collectionFormat?Lve[s.collectionFormat]:"";if(Array.isArray(a)&&(a=a.map(l=>l??"")),s.collectionFormat==="Multi"&&a.length===0)continue;Array.isArray(a)&&(s.collectionFormat==="SSV"||s.collectionFormat==="TSV")&&(a=a.join(o)),s.skipEncoding||(Array.isArray(a)?a=a.map(l=>encodeURIComponent(l)):a=encodeURIComponent(a)),Array.isArray(a)&&(s.collectionFormat==="CSV"||s.collectionFormat==="Pipes")&&(a=a.join(o)),i.set(s.mapper.serializedName||(0,r_.getPathStringFromParameter)(s),a)}}return{queryParams:i,sequenceParams:n}}function Gve(t){let e=new Map;if(!t||t[0]!=="?")return e;t=t.slice(1);let r=t.split("&");for(let i of r){let[n,s]=i.split("=",2),a=e.get(n);a?Array.isArray(a)?a.push(s):e.set(n,[a,s]):e.set(n,s)}return e}function zY(t,e,r,i=!1){if(e.size===0)return t;let n=new URL(t),s=Gve(n.search);for(let[o,l]of e){let c=s.get(o);if(Array.isArray(c))if(Array.isArray(l)){c.push(...l);let d=new Set(c);s.set(o,Array.from(d))}else c.push(l);else c?(Array.isArray(l)?l.unshift(c):r.has(o)&&s.set(o,[c,l]),i||s.set(o,l)):s.set(o,l)}let a=[];for(let[o,l]of s)if(typeof l=="string")a.push(`${o}=${l}`);else if(Array.isArray(l))for(let c of l)a.push(`${o}=${c}`);else a.push(`${o}=${l}`);return n.search=a.length?`?${a.join("&")}`:"",n.toString()}});var i_=A(DC=>{"use strict";Object.defineProperty(DC,"__esModule",{value:!0});DC.logger=void 0;var jve=bd();DC.logger=(0,jve.createClientLogger)("core-client")});var WY=A(PC=>{"use strict";Object.defineProperty(PC,"__esModule",{value:!0});PC.ServiceClient=void 0;var zve=Lr(),Vve=ZS(),YY=jS(),Yve=HY(),Wve=a1(),Jve=VY(),$ve=xC(),Kve=i_(),n_=class{_endpoint;_requestContentType;_allowInsecureConnection;_httpClient;pipeline;constructor(e={}){if(this._requestContentType=e.requestContentType,this._endpoint=e.endpoint??e.baseUri,e.baseUri&&Kve.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(0,Yve.getCachedDefaultHttpClient)(),this.pipeline=e.pipeline||Xve(e),e.additionalPolicies?.length)for(let{policy:r,position:i}of e.additionalPolicies){let n=i==="perRetry"?"Sign":void 0;this.pipeline.addPolicy(r,{afterPhase:n})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,r){let i=r.baseUrl||this._endpoint;if(!i)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");let n=(0,Jve.getRequestUrl)(i,r,e,this),s=(0,zve.createPipelineRequest)({url:n});s.method=r.httpMethod;let a=(0,Wve.getOperationRequestInfo)(s);a.operationSpec=r,a.operationArguments=e;let o=r.contentType||this._requestContentType;o&&r.requestBody&&s.headers.set("Content-Type",o);let l=e.options;if(l){let c=l.requestOptions;c&&(c.timeout&&(s.timeout=c.timeout),c.onUploadProgress&&(s.onUploadProgress=c.onUploadProgress),c.onDownloadProgress&&(s.onDownloadProgress=c.onDownloadProgress),c.shouldDeserialize!==void 0&&(a.shouldDeserialize=c.shouldDeserialize),c.allowInsecureConnection&&(s.allowInsecureConnection=!0)),l.abortSignal&&(s.abortSignal=l.abortSignal),l.tracingOptions&&(s.tracingOptions=l.tracingOptions)}this._allowInsecureConnection&&(s.allowInsecureConnection=!0),s.streamResponseStatusCodes===void 0&&(s.streamResponseStatusCodes=(0,$ve.getStreamingResponseStatusCodes)(r));try{let c=await this.sendRequest(s),d=(0,YY.flattenResponse)(c,r.responses[c.status]);return l?.onResponse&&l.onResponse(c,d),d}catch(c){if(typeof c=="object"&&c?.response){let d=c.response,u=(0,YY.flattenResponse)(d,r.responses[c.statusCode]||r.responses.default);c.details=u,l?.onResponse&&l.onResponse(d,u,c)}throw c}}};PC.ServiceClient=n_;function Xve(t){let e=Zve(t),r=t.credential&&e?{credentialScopes:e,credential:t.credential}:void 0;return(0,Vve.createClientPipeline)({...t,credentialOptions:r})}function Zve(t){if(t.credentialScopes)return t.credentialScopes;if(t.endpoint)return`${t.endpoint}/.default`;if(t.baseUri)return`${t.baseUri}/.default`;if(t.credential&&!t.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}});var $Y=A(kC=>{"use strict";Object.defineProperty(kC,"__esModule",{value:!0});kC.parseCAEChallenge=JY;kC.authorizeRequestOnClaimChallenge=r7e;var e7e=i_(),t7e=GS();function JY(t){return`, ${t.trim()}`.split(", Bearer ").filter(r=>r).map(r=>`${r.trim()}, `.split('", ').filter(s=>s).map(s=>(([a,o])=>({[a]:o}))(s.trim().split('="'))).reduce((s,a)=>({...s,...a}),{}))}async function r7e(t){let{scopes:e,response:r}=t,i=t.logger||e7e.logger,n=r.headers.get("WWW-Authenticate");if(!n)return i.info("The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow."),!1;let a=(JY(n)||[]).find(l=>l.claims);if(!a)return i.info('The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.'),!1;let o=await t.getAccessToken(a.scope?[a.scope]:e,{claims:(0,t7e.decodeStringToString)(a.claims)});return o?(t.request.headers.set("Authorization",`${o.tokenType??"Bearer"} ${o.token}`),!0):!1}});var XY=A(OC=>{"use strict";Object.defineProperty(OC,"__esModule",{value:!0});OC.authorizeRequestOnTenantChallenge=void 0;var KY={DefaultScope:"/.default",HeaderConstants:{AUTHORIZATION:"authorization"}};function i7e(t){return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(t)}var n7e=async t=>{let e=c7e(t.request),r=o7e(t.response);if(r){let i=l7e(r),n=a7e(t,i),s=s7e(i);if(!s)return!1;let a=await t.getAccessToken(n,{...e,tenantId:s});return a?(t.request.headers.set(KY.HeaderConstants.AUTHORIZATION,`${a.tokenType??"Bearer"} ${a.token}`),!0):!1}return!1};OC.authorizeRequestOnTenantChallenge=n7e;function s7e(t){let i=new URL(t.authorization_uri).pathname.split("/")[1];if(i&&i7e(i))return i}function a7e(t,e){if(!e.resource_id)return t.scopes;let r=new URL(e.resource_id);r.pathname=KY.DefaultScope;let i=r.toString();return i==="https://disk.azure.com/.default"&&(i="https://disk.azure.com//.default"),[i]}function o7e(t){let e=t.headers.get("WWW-Authenticate");if(t.status===401&&e)return e}function l7e(t){return`${t.slice(7).trim()} `.split(" ").filter(n=>n).map(n=>(([s,a])=>({[s]:a}))(n.trim().split("="))).reduce((n,s)=>({...n,...s}),{})}function c7e(t){return{abortSignal:t.abortSignal,requestOptions:{timeout:t.timeout},tracingOptions:t.tracingOptions}}});var Oa=A(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.authorizeRequestOnTenantChallenge=Gt.authorizeRequestOnClaimChallenge=Gt.serializationPolicyName=Gt.serializationPolicy=Gt.deserializationPolicyName=Gt.deserializationPolicy=Gt.XML_CHARKEY=Gt.XML_ATTRKEY=Gt.createClientPipeline=Gt.ServiceClient=Gt.MapperTypeNames=Gt.createSerializer=void 0;var ZY=s1();Object.defineProperty(Gt,"createSerializer",{enumerable:!0,get:function(){return ZY.createSerializer}});Object.defineProperty(Gt,"MapperTypeNames",{enumerable:!0,get:function(){return ZY.MapperTypeNames}});var d7e=WY();Object.defineProperty(Gt,"ServiceClient",{enumerable:!0,get:function(){return d7e.ServiceClient}});var u7e=ZS();Object.defineProperty(Gt,"createClientPipeline",{enumerable:!0,get:function(){return u7e.createClientPipeline}});var eW=i1();Object.defineProperty(Gt,"XML_ATTRKEY",{enumerable:!0,get:function(){return eW.XML_ATTRKEY}});Object.defineProperty(Gt,"XML_CHARKEY",{enumerable:!0,get:function(){return eW.XML_CHARKEY}});var tW=WS();Object.defineProperty(Gt,"deserializationPolicy",{enumerable:!0,get:function(){return tW.deserializationPolicy}});Object.defineProperty(Gt,"deserializationPolicyName",{enumerable:!0,get:function(){return tW.deserializationPolicyName}});var rW=KS();Object.defineProperty(Gt,"serializationPolicy",{enumerable:!0,get:function(){return rW.serializationPolicy}});Object.defineProperty(Gt,"serializationPolicyName",{enumerable:!0,get:function(){return rW.serializationPolicyName}});var A7e=$Y();Object.defineProperty(Gt,"authorizeRequestOnClaimChallenge",{enumerable:!0,get:function(){return A7e.authorizeRequestOnClaimChallenge}});var p7e=XY();Object.defineProperty(Gt,"authorizeRequestOnTenantChallenge",{enumerable:!0,get:function(){return p7e.authorizeRequestOnTenantChallenge}})});var c1=A(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});Qd.HttpHeaders=void 0;Qd.toPipelineRequest=sW;Qd.toWebResourceLike=aW;Qd.toHttpHeadersLike=oW;var iW=Lr(),nW=Symbol("Original PipelineRequest"),f7e=Symbol.for("@azure/core-client original request");function sW(t,e={}){let i=t[nW],n=(0,iW.createHttpHeaders)(t.headers.toJson({preserveCase:!0}));if(i)return i.headers=n,i;{let s=(0,iW.createPipelineRequest)({url:t.url,method:t.method,headers:n,withCredentials:t.withCredentials,timeout:t.timeout,requestId:t.requestId,abortSignal:t.abortSignal,body:t.body,formData:t.formData,disableKeepAlive:!!t.keepAlive,onDownloadProgress:t.onDownloadProgress,onUploadProgress:t.onUploadProgress,proxySettings:t.proxySettings,streamResponseStatusCodes:t.streamResponseStatusCodes,agent:t.agent,requestOverrides:t.requestOverrides});return e.originalRequest&&(s[f7e]=e.originalRequest),s}}function aW(t,e){let r=e?.originalRequest??t,i={url:t.url,method:t.method,headers:oW(t.headers),withCredentials:t.withCredentials,timeout:t.timeout,requestId:t.headers.get("x-ms-client-request-id")||t.requestId,abortSignal:t.abortSignal,body:t.body,formData:t.formData,keepAlive:!!t.disableKeepAlive,onDownloadProgress:t.onDownloadProgress,onUploadProgress:t.onUploadProgress,proxySettings:t.proxySettings,streamResponseStatusCodes:t.streamResponseStatusCodes,agent:t.agent,requestOverrides:t.requestOverrides,clone(){throw new Error("Cannot clone a non-proxied WebResourceLike")},prepare(){throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat")},validateRequestProperties(){}};return e?.createProxy?new Proxy(i,{get(n,s,a){return s===nW?t:s==="clone"?()=>aW(sW(i,{originalRequest:r}),{createProxy:!0,originalRequest:r}):Reflect.get(n,s,a)},set(n,s,a,o){return s==="keepAlive"&&(t.disableKeepAlive=!a),typeof s=="string"&&["url","method","withCredentials","timeout","requestId","abortSignal","body","formData","onDownloadProgress","onUploadProgress","proxySettings","streamResponseStatusCodes","agent","requestOverrides"].includes(s)&&(t[s]=a),Reflect.set(n,s,a,o)}}):i}function oW(t){return new LC(t.toJSON({preserveCase:!0}))}function l1(t){return t.toLowerCase()}var LC=class t{_headersMap;constructor(e){if(this._headersMap={},e)for(let r in e)this.set(r,e[r])}set(e,r){this._headersMap[l1(e)]={name:e,value:r.toString()}}get(e){let r=this._headersMap[l1(e)];return r?r.value:void 0}contains(e){return!!this._headersMap[l1(e)]}remove(e){let r=this.contains(e);return delete this._headersMap[l1(e)],r}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){let e=[];for(let r in this._headersMap)e.push(this._headersMap[r]);return e}headerNames(){let e=[],r=this.headersArray();for(let i=0;i{"use strict";Object.defineProperty(FC,"__esModule",{value:!0});FC.toCompatResponse=m7e;FC.toPipelineResponse=g7e;var h7e=Lr(),s_=c1(),lW=Symbol("Original FullOperationResponse");function m7e(t,e){let r=(0,s_.toWebResourceLike)(t.request),i=(0,s_.toHttpHeadersLike)(t.headers);return e?.createProxy?new Proxy(t,{get(n,s,a){return s==="headers"?i:s==="request"?r:s===lW?t:Reflect.get(n,s,a)},set(n,s,a,o){return s==="headers"?i=a:s==="request"&&(r=a),Reflect.set(n,s,a,o)}}):{...t,request:r,headers:i}}function g7e(t){let r=t[lW],i=(0,h7e.createHttpHeaders)(t.headers.toJson({preserveCase:!0}));return r?(r.headers=i,r):{...t,headers:i,request:(0,s_.toPipelineRequest)(t.request)}}});var dW=A(UC=>{"use strict";Object.defineProperty(UC,"__esModule",{value:!0});UC.ExtendedServiceClient=void 0;var cW=HS(),y7e=Lr(),E7e=Oa(),C7e=MC(),a_=class extends E7e.ServiceClient{constructor(e){super(e),e.keepAliveOptions?.enable===!1&&!(0,cW.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)&&this.pipeline.addPolicy((0,cW.createDisableKeepAlivePolicy)()),e.redirectOptions?.handleRedirects===!1&&this.pipeline.removePolicy({name:y7e.redirectPolicyName})}async sendOperationRequest(e,r){let i=e?.options?.onResponse,n;function s(o,l,c){n=o,i&&i(o,l,c)}e.options={...e.options,onResponse:s};let a=await super.sendOperationRequest(e,r);return n&&Object.defineProperty(a,"_response",{value:(0,C7e.toCompatResponse)(n)}),a}};UC.ExtendedServiceClient=a_});var fW=A(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.requestPolicyFactoryPolicyName=Pl.HttpPipelineLogLevel=void 0;Pl.createRequestPolicyFactoryPolicy=I7e;var uW=c1(),AW=MC(),pW;(function(t){t[t.ERROR=1]="ERROR",t[t.INFO=3]="INFO",t[t.OFF=0]="OFF",t[t.WARNING=2]="WARNING"})(pW||(Pl.HttpPipelineLogLevel=pW={}));var b7e={log(t,e){},shouldLog(t){return!1}};Pl.requestPolicyFactoryPolicyName="RequestPolicyFactoryPolicy";function I7e(t){let e=t.slice().reverse();return{name:Pl.requestPolicyFactoryPolicyName,async sendRequest(r,i){let n={async sendRequest(o){let l=await i((0,uW.toPipelineRequest)(o));return(0,AW.toCompatResponse)(l,{createProxy:!0})}};for(let o of e)n=o.create(n,b7e);let s=(0,uW.toWebResourceLike)(r,{createProxy:!0}),a=await n.sendRequest(s);return(0,AW.toPipelineResponse)(a)}}}});var hW=A(o_=>{"use strict";Object.defineProperty(o_,"__esModule",{value:!0});o_.convertHttpClient=Q7e;var B7e=MC(),w7e=c1();function Q7e(t){return{sendRequest:async e=>{let r=await t.sendRequest((0,w7e.toWebResourceLike)(e,{createProxy:!0}));return(0,B7e.toPipelineResponse)(r)}}}});var qC=A(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.toHttpHeadersLike=Mi.convertHttpClient=Mi.disableKeepAlivePolicyName=Mi.HttpPipelineLogLevel=Mi.createRequestPolicyFactoryPolicy=Mi.requestPolicyFactoryPolicyName=Mi.ExtendedServiceClient=void 0;var S7e=dW();Object.defineProperty(Mi,"ExtendedServiceClient",{enumerable:!0,get:function(){return S7e.ExtendedServiceClient}});var l_=fW();Object.defineProperty(Mi,"requestPolicyFactoryPolicyName",{enumerable:!0,get:function(){return l_.requestPolicyFactoryPolicyName}});Object.defineProperty(Mi,"createRequestPolicyFactoryPolicy",{enumerable:!0,get:function(){return l_.createRequestPolicyFactoryPolicy}});Object.defineProperty(Mi,"HttpPipelineLogLevel",{enumerable:!0,get:function(){return l_.HttpPipelineLogLevel}});var _7e=HS();Object.defineProperty(Mi,"disableKeepAlivePolicyName",{enumerable:!0,get:function(){return _7e.disableKeepAlivePolicyName}});var v7e=hW();Object.defineProperty(Mi,"convertHttpClient",{enumerable:!0,get:function(){return v7e.convertHttpClient}});var N7e=c1();Object.defineProperty(Mi,"toHttpHeadersLike",{enumerable:!0,get:function(){return N7e.toHttpHeadersLike}})});var gW=A((edt,mW)=>{(()=>{"use strict";var t={d:(g,m)=>{for(var y in m)t.o(m,y)&&!t.o(g,y)&&Object.defineProperty(g,y,{enumerable:!0,get:m[y]})},o:(g,m)=>Object.prototype.hasOwnProperty.call(g,m),r:g=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(g,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>$i,XMLParser:()=>Mc,XMLValidator:()=>x});let r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("^["+r+"]["+r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function n(g,m){let y=[],T=m.exec(g);for(;T;){let R=[];R.startIndex=m.lastIndex-T[0].length;let k=T.length;for(let H=0;H"&&g[k]!==" "&&g[k]!==" "&&g[k]!==`
-`&&g[k]!=="\r";k++)q+=g[k];if(q=q.trim(),q[q.length-1]==="/"&&(q=q.substring(0,q.length-1),k--),!s(q)){let me;return me=q.trim().length===0?"Invalid space after '<'.":"Tag '"+q+"' is an invalid name.",b("InvalidTag",me,D(g,k))}let ue=f(g,k);if(ue===!1)return b("InvalidAttr","Attributes for '"+q+"' have open quote.",D(g,k));let ce=ue.value;if(k=ue.index,ce[ce.length-1]==="/"){let me=k-ce.length;ce=ce.substring(0,ce.length-1);let Je=E(ce,m);if(Je!==!0)return b(Je.err.code,Je.err.msg,D(g,me+Je.err.line));T=!0}else if(Y){if(!ue.tagClosed)return b("InvalidTag","Closing tag '"+q+"' doesn't have proper closing.",D(g,k));if(ce.trim().length>0)return b("InvalidTag","Closing tag '"+q+"' can't have attributes or invalid starting.",D(g,H));if(y.length===0)return b("InvalidTag","Closing tag '"+q+"' has not been opened.",D(g,H));{let me=y.pop();if(q!==me.tagName){let Je=D(g,me.tagStartPos);return b("InvalidTag","Expected closing tag '"+me.tagName+"' (opened in line "+Je.line+", col "+Je.col+") instead of closing tag '"+q+"'.",D(g,H))}y.length==0&&(R=!0)}}else{let me=E(ce,m);if(me!==!0)return b(me.err.code,me.err.msg,D(g,k-ce.length+me.err.line));if(R===!0)return b("InvalidXml","Multiple possible root nodes found.",D(g,k));m.unpairedTags.indexOf(q)!==-1||y.push({tagName:q,tagStartPos:H}),T=!0}for(k++;k0)||b("InvalidXml","Invalid '"+JSON.stringify(y.map((k=>k.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):b("InvalidXml","Start tag expected.",1)}function l(g){return g===" "||g===" "||g===`
-`||g==="\r"}function c(g,m){let y=m;for(;m5&&T==="xml")return b("InvalidXml","XML declaration allowed only at the start of the document.",D(g,m));if(g[m]=="?"&&g[m+1]==">"){m++;break}}return m}function d(g,m){if(g.length>m+5&&g[m+1]==="-"&&g[m+2]==="-"){for(m+=3;m"){m+=2;break}}else if(g.length>m+8&&g[m+1]==="D"&&g[m+2]==="O"&&g[m+3]==="C"&&g[m+4]==="T"&&g[m+5]==="Y"&&g[m+6]==="P"&&g[m+7]==="E"){let y=1;for(m+=8;m"&&(y--,y===0))break}else if(g.length>m+9&&g[m+1]==="["&&g[m+2]==="C"&&g[m+3]==="D"&&g[m+4]==="A"&&g[m+5]==="T"&&g[m+6]==="A"&&g[m+7]==="["){for(m+=8;m"){m+=2;break}}return m}let u='"',p="'";function f(g,m){let y="",T="",R=!1;for(;m"&&T===""){R=!0;break}y+=g[m]}return T===""&&{value:y,index:m,tagClosed:R}}let h=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function E(g,m){let y=n(g,h),T={};for(let R=0;R!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(g,m,y){return g},captureMetaData:!1},ne;ne=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class U{constructor(m){this.tagname=m,this.child=[],this[":@"]={}}add(m,y){m==="__proto__"&&(m="#__proto__"),this.child.push({[m]:y})}addChild(m,y){m.tagname==="__proto__"&&(m.tagname="#__proto__"),m[":@"]&&Object.keys(m[":@"]).length>0?this.child.push({[m.tagname]:m.child,":@":m[":@"]}):this.child.push({[m.tagname]:m.child}),y!==void 0&&(this.child[this.child.length-1][ne]={startIndex:y})}static getMetaDataSymbol(){return ne}}class te{constructor(m){this.suppressValidationErr=!m}readDocType(m,y){let T={};if(m[y+3]!=="O"||m[y+4]!=="C"||m[y+5]!=="T"||m[y+6]!=="Y"||m[y+7]!=="P"||m[y+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{y+=9;let R=1,k=!1,H=!1,Y="";for(;y"){if(H?m[y-1]==="-"&&m[y-2]==="-"&&(H=!1,R--):R--,R===0)break}else m[y]==="["?k=!0:Y+=m[y];else{if(k&&$(m,"!ENTITY",y)){let q,ue;y+=7,[q,ue,y]=this.readEntityExp(m,y+1,this.suppressValidationErr),ue.indexOf("&")===-1&&(T[q]={regx:RegExp(`&${q};`,"g"),val:ue})}else if(k&&$(m,"!ELEMENT",y)){y+=8;let{index:q}=this.readElementExp(m,y+1);y=q}else if(k&&$(m,"!ATTLIST",y))y+=8;else if(k&&$(m,"!NOTATION",y)){y+=9;let{index:q}=this.readNotationExp(m,y+1,this.suppressValidationErr);y=q}else{if(!$(m,"!--",y))throw new Error("Invalid DOCTYPE");H=!0}R++,Y=""}if(R!==0)throw new Error("Unclosed DOCTYPE")}return{entities:T,i:y}}readEntityExp(m,y){y=F(m,y);let T="";for(;y{for(;m{for(let y of g)if(typeof y=="string"&&m===y||y instanceof RegExp&&y.test(m))return!0}:()=>!1}class Ve{constructor(m){this.options=m,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/([0-9]{1,7});/g,val:(y,T)=>String.fromCodePoint(Number.parseInt(T,10))},num_hex:{regex:/([0-9a-fA-F]{1,6});/g,val:(y,T)=>String.fromCodePoint(Number.parseInt(T,16))}},this.addExternalEntities=_t,this.parseXml=Ft,this.parseTextData=Ze,this.resolveNameSpace=tr,this.buildAttributesMap=Fn,this.isItStopNode=Pc,this.replaceEntitiesValue=Mt,this.readStopNodeData=Vs,this.saveTextToParentTag=fa,this.addChild=hi,this.ignoreAttributesFn=Le(this.options.ignoreAttributes)}}function _t(g){let m=Object.keys(g);for(let y=0;y0)){H||(g=this.replaceEntitiesValue(g));let Y=this.options.tagValueProcessor(m,g,y,R,k);return Y==null?g:typeof Y!=typeof g||Y!==g?Y:this.options.trimValues||g.trim()===g?il(g,this.options.parseTagValue,this.options.numberParseOptions):g}}function tr(g){if(this.options.removeNSPrefix){let m=g.split(":"),y=g.charAt(0)==="/"?"/":"";if(m[0]==="xmlns")return"";m.length===2&&(g=y+m[1])}return g}let pa=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Fn(g,m,y){if(this.options.ignoreAttributes!==!0&&typeof g=="string"){let T=n(g,pa),R=T.length,k={};for(let H=0;H