varFQe=Object.create;varkw=Object.defineProperty;varUQe=Object.getOwnPropertyDescriptor;varMQe=Object.getOwnPropertyNames;var$Qe=Object.getPrototypeOf,qQe=Object.prototype.hasOwnProperty;var_=(t,e)=>()=>(t&&(e=t(t=0)),e);varC=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hn=(t,e)=>{for(varrine)kw(t,r,{get:e[r],enumerable:!0})},T4=(t,e,r,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letsofMQe(e))!qQe.call(t,s)&&s!==r&&kw(t,s,{get:()=>e[s],enumerable:!(n=UQe(e,s))||n.enumerable});returnt};varb=(t,e,r)=>(r=t!=null?FQe($Qe(t)):{},T4(e||!t||!t.__esModule?kw(r,"default",{value:t,enumerable:!0}):r,t)),Xe=t=>T4(kw({},"__esModule",{value:!0}),t);varU4=C(JA=>{"use strict";varF_t=require("net"),jQe=require("tls"),pD=require("http"),L4=require("https"),WQe=require("events"),U_t=require("assert"),JQe=require("util");JA.httpOverHttp=KQe;JA.httpsOverHttp=XQe;JA.httpOverHttps=ZQe;JA.httpsOverHttps=e_e;functionKQe(t){vare=newbc(t);returne.request=pD.request,e}functionXQe(t){vare=newbc(t);returne.request=pD.request,e.createSocket=O4,e.defaultPort=443,e}functionZQe(t){vare=newbc(t);returne.request=L4.request,e}functione_e(t){vare=newbc(t);returne.request=L4.request,e.createSocket=O4,e.defaultPort=443,e}functionbc(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||pD.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(n,s,o,i){for(vara=F4(s,o,i),c=0,l=e.requests.length;c<l;++c){varu=e.requests[c];if(u.host===a.host&&u.port===a.port){e.requests.splice(c,1),u.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)})}JQe.inherits(bc,WQe.EventEmitter);bc.prototype.addRequest=function(e,r,n,s){varo=this,i=AD({request:e},o.options,F4(r,n,s));if(o.sockets.length>=this.maxSockets){o.requests.push(i);return}o.createSocket(i,function(a){a.on("free",c),a.on("close",l),a.on("agentRemove",l),e.onSocket(a);functionc(){o.emit("free",a,i)}functionl(u){o.removeSocket(a),a.removeListener("free",c),a.removeListener("close",l),a.removeListener("agentRemove",l)}})};bc.prototype.createSocket=function(e,r){varn=this,s={};n.sockets.push(s);varo=AD({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(o.localAddress=e.localAddress),o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+newBuffer(o.proxyAuth).toString("base64")),Ml("making CONNECT request");vari=n.request(o);i.useChunkedEncodingByDefault=!1,i.once("response",a),i.once("upgrade",c),i.once("connect",l),i.once("error",u),i.end();functiona(d){d.upgrade=!0}functionc(d,p,A){process.nextTick(function(){l(d,p,A)})}functionl(d,p,A){if(i.removeAllListeners(),p.removeAllListeners(),d.statusCode!==200){Ml("tunneling socket could not be established, statusCode=%d",d.statusCode),p.destroy();varf=newError("tunneling socket could not be established, statusCode="+d.statusCode);f.code="ECONNRESET",e.request.emit("error",f),n.removeSocket(s);return}if(A.length>0){Ml("got illegal response body from proxy"),p.destroy();varf=newError("got illegal response body from proxy");f.code="ECONNRESET",e.request.emit("error",f),n.removeSocket(s);return}returnMl("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=p,r(p)}functionu(d){i.removeAllListeners(),Ml(`tunneling socket could not be established, cause=%s
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}functioncm(t,e,r){letn=r.position;for(;n<e.length&&t(e[n]);)++n;returne.subarray(r.position,r.position=n)}functiongk(t,e,r,n){lets=0,o=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;o>0&&n(t[o]);)o--;returns===0&&o===t.length-1?t:t.subarray(s,o+1)}functioncx(t,e,r){if(t.length<e.length)return!1;for(letn=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}H8.exports={multipartFormDataParser:hke,validateBoundary:fke}});vardm=C((mvt,t9)=>{"use strict";varRg=et(),{ReadableStreamFrom:yke,isBlobLike:V8,isReadableStreamLike:Eke,readableStreamClose:Cke,createDeferredPromise:Ike,fullyReadBody:wke,extractMimeType:xke,utf8DecodeBytes:W8}=js(),{FormData:Y8}=Bg(),{kState:um}=$l(),{webidl:bke}=gn(),{Blob:Ske}=require("node:buffer"),yk=require("node:assert"),{isErrored:J8,isDisturbed:Bke}=require("node:stream"),{isArrayBuffer:Rke}=require("node:util/types"),{serializeAMimeType:Nke}=xs(),{multipartFormDataParser:Tke}=z8(),Ek;try{lett=require("node:crypto");Ek=e=>t.randomInt(0,e)}catch{Ek=t=>Math.floor(Math.random(t))}varlx=newTextEncoder;functionPke(){}varK8=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,X8;K8&&(X8=newFinalizationRegistry(t=>{lete=t.deref();e&&!e.locked&&!Bke(e)&&!J8(e)&&e.cancel("Response object has been garbage collected").catch(Pke)}));functionZ8(t,e=!1){letr=null;tinstanceofReadableStream?r=t:V8(t)?r=t.stream():r=newReadableStream({asyncpull(c){letl=typeofs=="string"?lx.encode(s):s;l.byteLength&&c.enqueue(l),queueMicrotask(()=>Cke(c))},start(){},type:"bytes"}),yk(Eke(r));letn=null,s=null,o=null,i=null;if(typeoft=="string")s=t,i="text/plain;charset=UTF-8";elseif(tinstanceofURLSearchParams)s=t.toString(),i="application/x-www-form-urlencoded;charset=UTF-8";elseif(Rke(t))s=newUint8Array(t.slice());elseif(ArrayBuffer.isView(t))s=newUint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));elseif(Rg.isFormDataLike(t)){letc=`----formdata-undici-0${`${Ek(1e11)}`.padStart(11,"0")}`,l=`--${c}\r
`);p.push(y),o+=y.byteLength,f&&(o=null),s=t,n=asyncfunction*(){for(letwofp)w.stream?yield*w.stream():yieldw},i=`multipart/form-data; boundary=${c}`}elseif(V8(t))s=t,o=t.size,t.type&&(i=t.type);elseif(typeoft[Symbol.asyncIterator]=="function"){if(e)thrownewTypeError("keepalive");if(Rg.isDisturbed(t)||t.locked)thrownewTypeError("Response body object should not be disturbed or locked");r=tinstanceofReadableStream?t:yke(t)}if((typeofs=="string"||Rg.isBuffer(s))&&(o=Buffer.byteLength(s)),n!=null){letc;r=newReadableStream({asyncstart(){c=n(t)[Symbol.asyncIterator]()},asyncpull(l){let{value:u,done:d}=awaitc.next();if(d)queueMicrotask(()=>{l.close(),l.byobRequest?.respond(0)});elseif(!J8(r)){letp=newUint8Array(u);p.byteLength&&l.enqueue(p)}returnl.desiredSize>0},asynccancel(l){awaitc.return()},type:"bytes"})}return[{stream:r,source:s,length:o},i]}functionQke(t,e=!1){returntinstanceofReadableStream&&(yk(!Rg.isDisturbed(t),"The body has already been consumed."),yk(!t.locked,"The stream is locked.")),Z8(t,e)}function_ke(t,e){let[r,n]=e.stream.tee();returne.stream=r,{stream:n,length:e.length,source:e.source}}functionvke(t){if(t.aborted)thrownewDOMException("The operation was aborted.","AbortError")}functionDke(t){return{blob(){returnlm(this,r=>{letn=j8(this);returnn===null?n="":n&&(n=Nke(n)),newSke([r],{type:n})},t)},arrayBuffer(){returnlm(this,r=>newUint8Array(r).buffer,t)},text(){returnlm(this,W8,t)},json(){returnlm(this,Lke,t)},formData(){returnlm(this,r=>{letn=j8(this);if(n!==null)switch(n.essence){case"multipart/form-data":{lets=Tke(r,n);if(s==="failure")thrownewTypeError("Failed to parse body as FormData.");leto=newY8;returno[um]=s,o}case"application/x-www-form-urlencoded":{lets=newURLSearchParams(r.toString()),o=newY8;for(let[i,a]ofs)o.append(i,a);returno}}thrownewTypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){returnlm(this,r=>newUint8Array(r),t)}}}functionkke(t){Object.assign(t.prototype,Dke(t))}asyncfunctionlm(t,e,r){if(bke.brandCheck(t,r),e9(t))thrownewTypeError("Body is unusable: Body has already been read");vke(t[um]);letn=Ike(),s=i=>n.reject(i),o=i=>{try{n.resolve(e(i))}catch(a){s(a)}};returnt[um].body==null?(o(Buffer.allocUnsafe(0)),n.promise):(awaitwke(t[um].body,o,s),n.promise)}functione9(t){lete=t[um].body;returne!=null&&(e.stream.locked||Rg.isDisturbed(e.stream))}functionLke(t){returnJSON.parse(W8(t))}functionj8(t){lete=t[um].headersList,r=xke(e);returnr==="failure"?null:r}t9.exports={extractBody:Z8,safelyExtractBody:Qke,cloneBody:_ke,mixinBody:kke,streamRegistry:X8,hasFinalizationRegistry:K8,bodyUnusable:e9}});varp9=C((fvt,d9)=>{"use strict";varSe=require("node:assert"),Ue=et(),{channels:r9}=XA(),Ck=tk(),{RequestContentLengthMismatchError:Dd,ResponseContentLengthMismatchError:Oke,RequestAbortedError:c9,HeadersTimeoutError:Fke,HeadersOverflowError:Uke,SocketError:fx,InformationalError:pm,BodyTimeoutError:Mke,HTTPParserError:$ke,ResponseExceededMaxSizeError:qke}=mt(),{kUrl:l9,kReset:bs,kClient:bk,kParser:Ar,kBlocking:Pg,kRunning:Bn,kPending:Gke,kSize:n9,kWriting:Gl,kQueue:xi,kNoRef:Ng,kKeepAliveDefaultTimeout:Hke,kHostHeader:zke,kPendingIdx:Vke,kRunningIdx:Po,kError:Qo,kPipelining:Ax,kSocket:Am,kKeepAliveTimeoutValue:hx,kMaxHeadersSize:Ik,kKeepAliveMaxTimeout:Yke,kKeepAliveTimeoutThreshold:jke,kHeadersTimeout:Wke,kBodyTimeout:Jke,kStrictContentLength:Sk,kMaxRequests:s9,kCounter:Kke,kMaxResponseSize:Xke,kOnError:Zke,kResume:ql,kHTTPContext:u9}=Yt(),da=XK(),eLe=Buffer.alloc(0),ux=Buffer[Symbol.species],dx=Ue.addListener,tLe=Ue.removeAllListeners,wk;asyncfunctionrLe(){lett=process.env.JEST_WORKER_ID?sk():void0,e;try{e=awaitWebAssembly.compile(t8())}catch{e=awaitWebAssembly.compile(t||sk())}returnawaitWebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,s)=>0,wasm_on_status:(r,n,s)=>{Se($r.ptr===r);leto=n-Aa+pa.byteOffset;return$r.onStatus(newux(pa.buffer,o,s))||0},wasm_on_message_begin:r=>(Se($r.ptr===r),$r.onMessageBegin()||0),wasm_on_header_field:(r,n,s)=>{Se($r.
`}return r9.sendHeaders.hasSubscribers&&r9.sendHeaders.publish({request:e,headers:y,socket:A}),!c||p===0?i9(f,null,t,e,A,u,y,d):Ue.isBuffer(c)?i9(f,c,t,e,A,u,y,d):Ue.isBlobLike(c)?typeof c.stream=="function"?a9(f,c.stream(),t,e,A,u,y,d):lLe(f,c,t,e,A,u,y,d):Ue.isStream(c)?cLe(f,c,t,e,A,u,y,d):Ue.isIterable(c)?a9(f,c,t,e,A,u,y,d):Se(!1),!0}function cLe(t,e,r,n,s,o,i,a){Se(o!==0||r[Bn]===0,"stream body cannot be pipelined");let c=!1,l=new gx({abort:t,socket:s,request:n,contentLength:o,client:r,expectsPayload:a,header:i}),u=function(f){if(!c)try{!l.write(f)&&this.pause&&this.pause()}catch(y){Ue.destroy(this,y)}},d=function(){c||e.resume&&e.resume()},p=function(){if(queueMicrotask(()=>{e.removeListener("error",A)}),!c){let f=new c9;queueMicrotask(()=>A(f))}},A=function(f){if(!c){if(c=!0,Se(s.destroyed||s[Gl]&&r[Bn]<=1),s.off("drain",d).off("error",A),e.removeListener("data",u).removeListener("end",A).removeListener("close",p),!f)try{l.end()}catch(y){f=y}l.destroy(f),f&&(f.code!=="UND_ERR_INFO"||f.message!=="reset")?Ue.destroy(e,f):Ue.destroy(e)}};e.on("data",u).on("end",A).on("error",A).on("close",p),e.resume&&e.resume(),s.on("drain",d).on("error",A),e.errorEmitted??e.errored?setImmediate(()=>A(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>A(null)),(e.closeEmitted??e.closed)&&setImmediate(p)}function i9(t,e,r,n,s,o,i,a){try{e?Ue.isBuffer(e)&&(Se(o===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${i}content-length:${o}\r
`,"latin1")),n.onRequestSent(),r[ql]()}catch(c){t(c)}}async function lLe(t,e,r,n,s,o,i,a){Se(o===e.size,"blob body must have content length");try{if(o!=null&&o!==e.size)throw new Dd;let c=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${i}content-length:${o}\r
`,"latin1"),s.write(c),s.uncork(),n.onBodySent(c),n.onRequestSent(),!a&&n.reset!==!1&&(s[bs]=!0),r[ql]()}catch(c){t(c)}}async function a9(t,e,r,n,s,o,i,a){Se(o!==0||r[Bn]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let p=c;c=null,p()}}let u=()=>new Promise((p,A)=>{Se(c===null),s[Qo]?A(s[Qo]):c=p});s.on("close",l).on("drain",l);let d=new gx({abort:t,socket:s,request:n,contentLength:o,client:r,expectsPayload:a,header:i});try{for await(let p of e){if(s[Qo])throw s[Qo];d.write(p)||await u()}d.end()}catch(p){d.destroy(p)}finally{s.off("close",l).off("drain",l)}}var gx=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:o,expectsPayload:i,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=o,this.bytesWritten=0,this.expectsPayload=i,this.header=a,this.abort=e,r[Gl]=!0}write(e){let{socket:r,request:n,contentLength:s,client:o,bytesWritten:i,expectsPayload:a,header:c}=this;if(r[Qo])throw r[Qo];if(r.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(s!==null&&i+l>s){if(o[Sk])throw new Dd;process.emitWarning(new Dd)}r.cork(),i===0&&(!a&&n.reset!==!1&&(r[bs]=!0),s===null?r.write(`${c}transfer-encoding:chunked\r
`,"latin1"),r!==null&&s!==r){if(n[Sk])throw new Dd;process.emitWarning(new Dd)}e[Ar].timeout&&e[Ar].timeoutType===mm&&e[Ar].timeout.refresh&&e[Ar].timeout.refresh(),n[ql]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Gl]=!1,e&&(Se(n[Bn]<=1,"pipeline should only contain this request"),s(e))}};d9.exports=sLe});var C9=C((hvt,E9)=>{"use strict";var _o=require("node:assert"),{pipeline:uLe}=require("node:stream"),it=et(),{RequestContentLengthMismatchError:Tk,RequestAbortedError:A9,SocketError:Qg,InformationalError:Pk}=mt(),{kUrl:yx,kReset:Cx,kClient:fm,kRunning:Ix,kPending:dLe,kQueue:Hl,kPendingIdx:Qk,kRunningIdx:bi,kError:Bi,kSocket:on,kStrictContentLength:pLe,kOnError:_k,kMaxConcurrentStreams:y9,kHTTP2Session:Si,kResume:zl,kSize:ALe,kHTTPContext:mLe}=Yt(),Pc=Symbol("open streams"),m9,f9=!1,Ex;try{Ex=require("node:http2")}catch{Ex={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:fLe,HTTP2_HEADER_METHOD:hLe,HTTP2_HEADER_PATH:gLe,HTTP2_HEADER_SCHEME:yLe,HTTP2_HEADER_CONTENT_LENGTH:ELe,HTTP2_HEADER_EXPECT:CLe,HTTP2_HEADER_STATUS:ILe}}=Ex;function wLe(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}async function xLe(t,e){t[on]=e,f9||(f9=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=Ex.connect(t[yx],{createConnection:()=>e,peerMaxConcurrentStreams:t[y9]});r[Pc]=0,r[fm]=t,r[on]=e,it.addListener(r,"error",SLe),it.addListener(r,"frameError",BLe),it.addListener(r,"end",RLe),it.addListener(r,"goaway",NLe),it.addListener(r,"close",function(){let{[fm]:s}=this,{[on]:o}=s,i=this[on][Bi]||this[Bi]||new Qg("closed",it.getSocketInfo(o));if(s[Si]=null,s.destroyed){_o(s[dLe]===0);let a=s[Hl].splice(s[bi]);for(let c=0;c<a.length;c++){let l=a[c];it.errorRequest(s,l,i)}}}),r.unref(),t[Si]=r,e[Si]=r,it.addListener(e,"error",function(s){_o(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Bi]=s,this[fm][_k](s)}),it.addListener(e,"end",function(){it.destroy(this,new Qg("other side closed",it.getSocketInfo(this)))}),it.addListener(e,"close",function(){let s=this[Bi]||new Qg("closed",it.getSocketInfo(this));t[on]=null,this[Si]!=null&&this[Si].destroy(s),t[Qk]=t[bi],_o(t[Ix]===0),t.emit("disconnect",t[yx],[t],s),t[zl]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return PLe(t,...s)},resume(){bLe(t)},destroy(s,o){n?queueMicrotask(o):e.destroy(s).on("close",o)},get destroyed(){return e.destroyed},busy(){return!1}}}function bLe(t){let e=t[on];e?.destroyed===!1&&(t[ALe]===0&&t[y9]===0?(e.unref(),t[Si].unref()):(e.ref(),t[Si].ref()))}function SLe(t){_o(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[on][Bi]=t,this[fm][_k](t)}function BLe(t,e,r){if(r===0){let n=new Pk(`HTTP/2:"frameError"received-type${t},code${e}`);this[on][Bi]=n,this[fm][_k](n)}}function RLe(){let t=new Qg("other side closed",it.getSocketInfo(this[on]));this.destroy(t),it.destroy(this[on],t)}function NLe(t){let e=this[Bi]||new Qg(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,it.getSocketInfo(this)),r=this[fm];if(r[on]=null,r[mLe]=null,this[Si]!=null&&(this[Si].destroy(e),this[Si]=null),it.destroy(this[on],e),r[bi]<r[Hl].length){let n=r[Hl][r[bi]];r[Hl][r[bi]++]=null,it.errorRequest(r,n,e),r[Qk]=r[bi]}_o(r[Ix]===0),r.emit("disconnect",r[yx],[r],e),r[zl]()}function TLe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function PLe(t,e){let r=t[Si],{method:n,path:s,host:o,upgrade:i,expectContinue:a,signal:c,headers:l}=e,{body:u}=e;if(i)return it.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let d={};for(let v=0;v<l.length;v+=2){let L=l[v+0],U=l[v+1];if(Array.isArray(U))for(let V=0;V<U.length;V++)d[L]?d[L]+=`,${U[V]}`:d[L]=U[V];else d[L]=U}let p,{hostname:A,port:f}=t[yx];d[fLe]=o||`${A}${f?`:${f}`:""}`,d[hLe]=n;let y=v=>{e.aborted||e.completed||(v=v||new A9,it.errorRequest(t,e,v),p!=null&&it.destroy(p,v),it.destroy(u,v),t[Hl][t[bi]++]=null,t[zl]())};try{e.onConnect(y)}catch(v){it.errorRequest(t,e,v)}if(e
`;if(n.username||n.password){let p=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}o.Host=`${i}:${r.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(o))a+=`${p}: ${o[p]}\r
`)+4,e.outputData[0].data=e._header+n.substring(s),Af("Output buffer: %o",e.outputData[0].data));let o;return this.proxy.protocol==="https:"?(Af("Creating `tls.Socket`: %o",this.connectOpts),o=s4e.connect(this.connectOpts)):(Af("Creating `net.Socket`: %o",this.connectOpts),o=n4e.connect(this.connectOpts)),await(0,i4e.once)(o,"connect"),o}};jS.protocols=["http","https"];zo.HttpProxyAgent=jS;function c4e(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var nae=C(cB=>{"use strict";Object.defineProperty(cB,"__esModule",{value:!0});cB.state=void 0;cB.state={instrumenterImplementation:void 0}});var Cae=C(AB=>{"use strict";Object.defineProperty(AB,"__esModule",{value:!0});AB.state=void 0;AB.state={operationRequestMap:new WeakMap}});var Xle=C(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var N6e=require("os"),T6e=require("util");function P6e(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Q6e=P6e(T6e);function _6e(t,...e){process.stderr.write(`${Q6e.default.format(t,...e)}${N6e.EOL}`)}var qle=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Hle,gG=[],yG=[],_R=[];qle&&EG(qle);var zle=Object.assign(t=>Vle(t),{enable:EG,enabled:CG,disable:v6e,log:_6e});function EG(t){Hle=t,gG=[],yG=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?yG.push(new RegExp(`^${n.substr(1)}$`)):gG.push(new RegExp(`^${n}$`));for(let n of _R)n.enabled=CG(n.namespace)}function CG(t){if(t.endsWith("*"))return!0;for(let e of yG)if(e.test(t))return!1;for(let e of gG)if(e.test(t))return!0;return!1}function v6e(){let t=Hle||"";return EG(""),t}function Vle(t){let e=Object.assign(r,{enabled:CG(t),destroy:D6e,log:zle.log,namespace:t,extend:k6e});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t}${n[0]}`),e.log(...n))}return _R.push(e),e}function D6e(){let t=_R.indexOf(this);return t>=0?(_R.splice(t,1),!0):!1}function k6e(t){let e=Vle(`${this.namespace}:${t}`);return e.log=this.log,e}var zE=zle,Yle=new Set,PR=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,vR,DR=zE("azure");DR.log=(...t)=>{zE.log(...t)};var IG=["verbose","info","warning","error"];PR&&(Kle(PR)?jle(PR):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${PR}';loggingisnotenabled.Acceptablevalues:${IG.join(", ")}.`));function jle(t){if(t&&!Kle(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${IG.join(",")}`);vR=t;let e=[];for(let r of Yle)Jle(r)&&e.push(r.namespace);zE.enable(e.join(","))}function L6e(){return vR}var Gle={verbose:400,info:300,warning:200,error:100};function O6e(t){let e=DR.extend(t);return Wle(DR,e),{error:QR(e,"error"),warning:QR(e,"warning"),info:QR(e,"info"),verbose:QR(e,"verbose")}}function Wle(t,e){e.log=(...r)=>{t.log(...r)}}function QR(t,e){let r=Object.assign(t.extend(e),{level:e});if(Wle(t,r),Jle(r)){let n=zE.disable();zE.enable(n+","+r.namespace)}return Yle.add(r),r}function Jle(t){return!!(vR&&Gle[t.level]<=Gle[vR])}function Kle(t){return IG.includes(t)}Qf.AzureLogger=DR;Qf.createClientLogger=O6e;Qf.getLogLevel=L6e;Qf.setLogLevel=jle});var bG=C(YE=>{"use strict";Object.defineProperty(YE,"__esModule",{value:!0});var _f=new WeakMap,kR=new WeakMap,VE=class t{constructor(){this.onabort=null,_f.set(this,[]),kR.set(this,!1)}get aborted(){if(!kR.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return kR.get(this)}static get none(){return new t}addEventListener(e,r){if(!_f.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");_f.get(this).push(r)}removeEventListener(e,r){if(!_f.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=_f.get(this),s=n.indexOf(r);s>-1&&n.splice(s,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function Zle(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=_f.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),kR.set(t,!0)}var wG=class extends Error{constructor(e){super(e),t
Polling status: ${cue.includes(u)?"Stopped":"Running"}`),u==="succeeded"){letd=i(l,r);if(d!==void0)return{response:awaite(d).catch(iue({state:r,stateProxy:n,isOperationError:a})),status:u}}return{response:l,status:u}}asyncfunctionpue(t){let{poll:e,state:r,stateProxy:n,options:s,getOperationStatus:o,getResourceLocation:i,getOperationLocation:a,isOperationError:c,withOperationLocation:l,getPollingInterval:u,processResult:d,getError:p,updateState:A,setDelay:f,isDone:y,setErrorAsResult:w}=t,{operationLocation:x}=r.config;if(x!==void0){let{response:I,status:T}=awaiteXe({poll:e,getOperationStatus:o,state:r,stateProxy:n,operationLocation:x,getResourceLocation:i,isOperationError:c,options:s});if(uue({status:T,response:I,state:r,stateProxy:n,isDone:y,processResult:d,getError:p,setErrorAsResult:w}),!cue.includes(T)){letv=u?.(I);v&&f(v);letL=a?.(I,r);if(L!==void0){letU=x!==L;r.config.operationLocation=L,l?.(L,U)}elsel?.(x,!1)}A?.(r,I)}}functionAue(t){let{azureAsyncOperation:e,operationLocation:r}=t;returnr??e}functionmue(t){returnt.headers.location}functionfue(t){returnt.headers["operation-location"]}functionhue(t){returnt.headers["azure-asyncoperation"]}functiontXe(t){let{location:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t;switch(r){case"PUT":returnn;case"DELETE":return;default:switch(s){case"azure-async-operation":return;case"original-uri":returnn;default:returne}}}functiongue(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t,o=fue(e),i=hue(e),a=Aue({operationLocation:o,azureAsyncOperation:i}),c=mue(e),l=r?.toLocaleUpperCase();returna!==void0?{mode:"OperationLocation",operationLocation:a,resourceLocation:tXe({requestMethod:l,location:c,requestPath:n,resourceLocationConfig:s})}:c!==void0?{mode:"ResourceLocation",operationLocation:c}:l==="PUT"&&n?{mode:"Body",operationLocation:n}:void0}functionyue(t){let{status:e,statusCode:r}=t;if(typeofe!="string"&&e!==void0)thrownewError(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){casevoid0:return_G(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:returnOp.verbose(`LRO: unrecognized operation status: ${e}`),e}}functionrXe(t){vare;let{status:r}=(e=t.body)!==null&&e!==void0?e:{};returnyue({status:r,statusCode:t.statusCode})}functionnXe(t){vare,r;let{properties:n,provisioningState:s}=(e=t.body)!==null&&e!==void0?e:{},o=(r=n?.provisioningState)!==null&&r!==void0?r:s;returnyue({status:o,statusCode:t.statusCode})}function_G(t){returnt===202?"running":t<300?"succeeded":"failed"}functionEue({rawResponse:t}){lete=t.headers["retry-after"];if(e!==void0){letr=parseInt(e);returnisNaN(r)?sXe(newDate(e)):r*1e3}}functionCue(t){lete=t.flatResponse.error;if(!e){Op.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Op.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}returne}functionsXe(t){lete=Math.floor(newDate().getTime()),r=t.getTime();if(e<r)returnr-e}functionIue(t){let{response:e,state:r,operationLocation:n}=t;functions(){vari;switch((i=r.config.metadata)===null||i===void0?void0:i.mode){casevoid0:return_G(e.rawResponse.statusCode);case"Body":returnvG(e,r);default:return"running"}}leto=s();returno==="running"&&n===void0?"succeeded":o}asyncfunctionoXe(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:s,setErrorAsResult:o}=t;returndue({init:async()=>{leti=awaits.sendInitialRequest(),a=gue({rawResponse:i.rawResponse,requestPath:s.requestPath,requestMethod:s.requestMethod,resourceLocationConfig:r});returnObject.assign({response:i,operat
`)}};T0.RpcError=hH});varyH=C(Q0=>{"use strict";Object.defineProperty(Q0,"__esModule",{value:!0});Q0.mergeRpcOptions=void0;varQde=Tr();functionI7e(t,e){if(!e)returnt;letr={};P0(t,r),P0(e,r);for(letnofObject.keys(e)){lets=e[n];switch(n){case"jsonOptions":r.jsonOptions=Qde.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=Qde.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},P0(t.meta,r.meta),P0(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}returnr}Q0.mergeRpcOptions=I7e;functionP0(t,e){if(!t)return;letr=e;for(let[n,s]ofObject.entries(t))sinstanceofDate?r[n]=newDate(s.getTime()):Array.isArray(s)?r[n]=s.concat():r[n]=s}});varCH=C(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});qp.Deferred=qp.DeferredState=void0;vartc;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(tc=qp.DeferredState||(qp.DeferredState={}));varEH=class{constructor(e=!0){this._state=tc.PENDING,this._promise=newPromise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}getstate(){returnthis._state}getpromise(){returnthis._promise}resolve(e){if(this.state!==tc.PENDING)thrownewError(`cannot resolve ${tc[this.state].toLowerCase()}`);this._resolve(e),this._state=tc.RESOLVED}reject(e){if(this.state!==tc.PENDING)thrownewError(`cannot reject ${tc[this.state].toLowerCase()}`);this._reject(e),this._state=tc.REJECTED}resolvePending(e){this._state===tc.PENDING&&this.resolve(e)}rejectPending(e){this._state===tc.PENDING&&this.reject(e)}};qp.Deferred=EH});varwH=C(_0=>{"use strict";Object.defineProperty(_0,"__esModule",{value:!0});_0.RpcOutputStreamController=void0;var_de=CH(),Gp=Tr(),IH=class{constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){returnthis.addLis(e,this._lis.nxt)}onMessage(e){returnthis.addLis(e,this._lis.msg)}onError(e){returnthis.addLis(e,this._lis.err)}onComplete(e){returnthis.addLis(e,this._lis.cmp)}addLis(e,r){returnr.push(e),()=>{letn=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(leteofObject.values(this._lis))e.splice(0,e.length)}getclosed(){returnthis._closed!==!1}notifyNext(e,r,n){Gp.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){Gp.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,void0,!1))}notifyError(e){Gp.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(void0,e,!1)),this.clearLis()}notifyComplete(){Gp.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(void0,void0,!0)),this.clearLis()}[Symbol.asyncIterator](){returnthis._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{lete=this._itState;Gp.assert(e,"bad state"),Gp.assert(!e.p,"iterator contract broken");letr=e.q.shift();returnr?"value"inr?Promise.resolve(r):Promise.reject(r):(e.p=new_de.Deferred,e.p.promise)}}}pushIt(e){letr=this._itState;if(r.p){letn=r.p;Gp.assert(n.state==_de.DeferredState.PENDING,"iterator contract broken"),"value"ine?n.resolve(e):n.reject(e),deleter.p}elser.q.push(e)}};_0.RpcOutputStreamController=IH});varbH=C(zf=>{"use strict";varw7e=zf&&zf.__awaiter||function(t,e,r,n){functions(o){returnoinstanceofr?o:newr(function(i){i(o)})}returnnew(r||(r=Promise))(function(o,i){functiona(u){try{l(n.next(u))}catch(d){i(d)}}functionc(u){try{l(n.throw(u))}catch(d){i(d)}}functionl(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(zf,"__esModule",{value:!0});zf.UnaryCall=void0;varxH=class{constructor(e,r,n,s,o,i,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=o,
`));return r(s)}});var Ehe,cl,Che=_(()=>{BN();Ehe={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},cl=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(UC(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Ehe)}})});var Ihe,Lat,whe=_(()=>{BN();Ihe={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},Lat=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(UC(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Ihe)}})});var xhe=_(()=>{BN();Che();whe()});var bhe,She,Oat,Fat,Bz,Rz=_(()=>{bhe=b(Bt()),She=b(Fn()),Oat=t=>e=>{throw e},Fat=(t,e)=>{},Bz=t=>(e,r)=>async n=>{if(!bhe.HttpRequest.isInstance(n.request))return e(n);let o=(0,She.getSmithyContext)(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:i={}},identity:a,signer:c}=o,l=await e({...n,request:await c.sign(n.request,a,i)}).catch((c.errorHandler||Oat)(i));return(c.successHandler||Fat)(l.response,i),l}});var Bhe,ll,Rhe=_(()=>{Rz();Bhe={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},ll=t=>({applyToStack:e=>{e.addRelativeTo(Bz(t),Bhe)}})});var Nhe=_(()=>{Rz();Rhe()});var qu,The=_(()=>{qu=t=>{if(typeof t=="function")return t;let e=Promise.resolve(t);return()=>e}});function Phe(t,e,r,n,s){return async function*(i,a,...c){let l=a,u=i.startingToken??l[r],d=!0,p;for(;d;){if(l[r]=u,s&&(l[s]=l[s]??i.pageSize),i.client instanceof t)p=await Uat(e,i.client,a,i.withCommand,...c);else throw new Error(`Invalidclient,expectedinstanceof${t.name}`);yield p;let A=u;u=Mat(p,n),d=!!(u&&(!i.stopOnSameToken||u!==A))}return void 0}}var Uat,Mat,Qhe=_(()=>{Uat=async(t,e,r,n=o=>o,...s)=>{let o=new t(r);return o=n(o)??o,await e.send(o,...s)};Mat=(t,e)=>{let r=t,n=e.split(".");for(let s of n){if(!r||typeof r!="object")return;r=r[s]}return r}});var Nz=C(_he=>{"use strict";var $at=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";_he.isArrayBuffer=$at});var fh=C(Pz=>{"use strict";var qat=Nz(),Tz=require("buffer"),Gat=(t,e=0,r=t.byteLength-e)=>{if(!qat.isArrayBuffer(t))throw new TypeError(`The"input"argumentmustbeArrayBuffer.Receivedtype${typeoft}(${t})`);return Tz.Buffer.from(t,e,r)},Hat=(t,e)=>{if(typeof t!="string")throw new TypeError(`The"input"argumentmustbeoftypestring.Receivedtype${typeoft}(${t})`);return e?Tz.Buffer.from(t,e):Tz.Buffer.from(t)};Pz.fromArrayBuffer=Gat;Pz.fromString=Hat});var vhe=C(RN=>{"use strict";Object.defineProperty(RN,"__esModule",{value:!0});RN.fromBase64=void 0;var zat=fh(),Vat=/^[A-Za-z0-9+/]*={0,2}$/,Yat=t=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Vat.exec(t))throw new TypeError("Invalid base64 string.");let e=(0,zat.fromString)(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};RN.fromBase64=Yat});var Wr=C(NN=>{"use strict";var Dhe=fh(),khe=t=>{let e=Dhe.fromString(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)},jat=t=>typeof t=="string"?khe(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),Wat=t=>{if(typeof t=="string")return t;if(typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Dhe.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("utf8")};NN.fromUtf8=khe;NN.toUint8Array=jat;NN.toUtf8=Wat});var Lhe=C(TN=>{"use strict";Object.defineProperty(TN,"__esModule",{valu
`)}d.push(null)}),d}});varjhe=C(Uz=>{"use strict";Object.defineProperty(Uz,"__esModule",{value:!0});Uz.headStream=Ict;asyncfunctionIct(t,e){letr=0,n=[],s=t.getReader(),o=!1;for(;!o;){let{done:c,value:l}=awaits.read();if(l&&(n.push(l),r+=l?.byteLength??0),r>=e)break;o=c}s.releaseLock();leti=newUint8Array(Math.min(e,r)),a=0;for(letcofn){if(c.byteLength>i.byteLength-a){i.set(c.subarray(0,i.byteLength-a),a);break}elsei.set(c,a);a+=c.length}returni}});varWhe=C(FN=>{"use strict";Object.defineProperty(FN,"__esModule",{value:!0});FN.headStream=void0;varwct=require("stream"),xct=jhe(),bct=dl(),Sct=(t,e)=>(0,bct.isReadableStream)(t)?(0,xct.headStream)(t,e):newPromise((r,n)=>{lets=newMz;s.limit=e,t.pipe(s),t.on("error",o=>{s.end(),n(o)}),s.on("error",n),s.on("finish",function(){leto=newUint8Array(Buffer.concat(this.buffers));r(o)})});FN.headStream=Sct;varMz=classextendswct.Writable{buffers=[];limit=1/0;bytesBuffered=0;_write(e,r,n){if(this.buffers.push(e),this.bytesBuffered+=e.byteLength??0,this.bytesBuffered>=this.limit){lets=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-s),this.emit("finish")}n()}}});varqz=C($z=>{"use strict";varJhe=t=>encodeURIComponent(t).replace(/[!'()*]/g,Bct),Bct=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,Rct=t=>t.split("/").map(Jhe).join("/");$z.escapeUri=Jhe;$z.escapeUriPath=Rct});varHz=C(Khe=>{"use strict";varGz=qz();functionNct(t){lete=[];for(letrofObject.keys(t).sort()){letn=t[r];if(r=Gz.escapeUri(r),Array.isArray(n))for(lets=0,o=n.length;s<o;s++)e.push(`${r}=${Gz.escapeUri(n[s])}`);else{lets=r;(n||typeofn=="string")&&(s+=`=${Gz.escapeUri(n)}`),e.push(s)}}returne.join("&")}Khe.buildQueryString=Nct});varic=C(MC=>{"use strict";varrge=Bt(),nge=Hz(),UN=require("node:https"),sge=require("node:stream"),zz=require("node:http2");function$N(t){lete=t&&typeoft=="object"&&"reason"int?t.reason:void0;if(e){if(einstanceofError){lets=newError("Request aborted");returns.name="AbortError",s.cause=e,s}letn=newError(String(e));returnn.name="AbortError",n}letr=newError("Request aborted");returnr.name="AbortError",r}varTct=["ECONNRESET","EPIPE","ETIMEDOUT"],oge=t=>{lete={};for(letrofObject.keys(t)){letn=t[r];e[r]=Array.isArray(n)?n.join(","):n}returne},hs={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},Xhe=1e3,Pct=(t,e,r=0)=>{if(!r)return-1;letn=s=>{leto=hs.setTimeout(()=>{t.destroy(),e(Object.assign(newError(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${r} ms.`),{name:"TimeoutError"}))},r-s),i=a=>{a?.connecting?a.on("connect",()=>{hs.clearTimeout(o)}):hs.clearTimeout(o)};t.socket?i(t.socket):t.on("socket",i)};returnr<2e3?(n(0),0):hs.setTimeout(n.bind(null,Xhe),Xhe)},Qct=(t,e,r=0,n,s)=>r?hs.setTimeout(()=>{leto=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${r} ms requestTimeout.`;if(n){leti=Object.assign(newError(o),{name:"TimeoutError",code:"ETIMEDOUT"});t.destroy(i),e(i)}elseo+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(o)},r):-1,_ct=3e3,vct=(t,{keepAlive:e,keepAliveMsecs:r},n=_ct)=>{if(e!==!0)return-1;lets=()=>{t.socket?t.socket.setKeepAlive(e,r||0):t.on("socket",o=>{o.setKeepAlive(e,r||0)})};returnn===0?(s(),0):hs.setTimeout(s,n)},Zhe=3e3,Dct=(t,e,r=0)=>{letn=s=>{leto=r-s,i=()=>{t.destroy(),e(Object.assign(newError(`@smithy/node-http-handler - the request socket timed out after ${r} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};t.socket?(t.socket.setTimeout(o,i),t.on("close",()=>t.socket?.removeListener("timeout",i))):t.setTimeout(o,i)};return0<r&&r<6e3?(n(0),0):hs.setTimeout(n.bind(null,r===0?0:Zhe),Zhe)},ege=6e3;asyncfunctionige(t,e,r=ege,n=!1){lets=e.headers??{},o=s.Expect||s.expect,i=-1,a=!0;!n&&o==="100-continue"&&(a=awaitPromise.race([newPromise(c=>{i=Number(hs.setTimeout(()=>c(!0),Math.max(ege,r)))}),ne
orincreasesocketAcquisitionWarningTimeout=(millis)intheNodeHttpHandlerconfig.`),Date.now()}return r}constructor(e){this.configProvider=new Promise((r,n)=>{typeof e=="function"?e().then(s=>{r(this.resolveDefaultConfig(s))}).catch(n):r(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let s=this.config,o=e.protocol==="https:";return!o&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((i,a)=>{let c,l=[],u=async z=>{await c,l.forEach(hs.clearTimeout),i(z)},d=async z=>{await c,l.forEach(hs.clearTimeout),a(z)};if(r?.aborted){let z=$N(r);d(z);return}let p=e.headers??{},A=(p.Expect??p.expect)==="100-continue",f=o?s.httpsAgent:s.httpAgent;A&&!this.externalAgent&&(f=new(o?UN.Agent:MN)({keepAlive:!1,maxSockets:1/0})),l.push(hs.setTimeout(()=>{this.socketWarningTimestamp=t.checkSocketUsage(f,this.socketWarningTimestamp,s.logger)},s.socketAcquisitionWarningTimeout??(s.requestTimeout??2e3)+(s.connectionTimeout??1e3)));let y=nge.buildQueryString(e.query||{}),w;if(e.username!=null||e.password!=null){let z=e.username??"",Ee=e.password??"";w=`${z}:${Ee}`}let x=e.path;y&&(x+=`?${y}`),e.fragment&&(x+=`#${e.fragment}`);let I=e.hostname??"";I[0]==="["&&I.endsWith("]")?I=e.hostname.slice(1,-1):I=e.hostname;let T={headers:e.headers,host:I,method:e.method,path:x,port:e.port,agent:f,auth:w},L=(o?UN.request:tge)(T,z=>{let Ee=new rge.HttpResponse({statusCode:z.statusCode||-1,reason:z.statusMessage,headers:oge(z.headers),body:z});u({response:Ee})});if(L.on("error",z=>{Tct.includes(z.code)?d(Object.assign(z,{name:"TimeoutError"})):d(z)}),r){let z=()=>{L.destroy();let Ee=$N(r);d(Ee)};if(typeof r.addEventListener=="function"){let Ee=r;Ee.addEventListener("abort",z,{once:!0}),L.once("close",()=>Ee.removeEventListener("abort",z))}else r.onabort=z}let U=n??s.requestTimeout;l.push(Pct(L,d,s.connectionTimeout)),l.push(Qct(L,d,U,s.throwOnRequestTimeout,s.logger??console)),l.push(Dct(L,d,s.socketTimeout));let V=T.agent;typeof V=="object"&&"keepAlive"in V&&l.push(vct(L,{keepAlive:V.keepAlive,keepAliveMsecs:V.keepAliveMsecs})),c=ige(L,e,U,this.externalAgent).catch(z=>(l.forEach(hs.clearTimeout),a(z)))})}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:r,connectionTimeout:n,socketTimeout:s,socketAcquisitionWarningTimeout:o,httpAgent:i,httpsAgent:a,throwOnRequestTimeout:c,logger:l}=e||{},u=!0,d=50;return{connectionTimeout:n,requestTimeout:r,socketTimeout:s,socketAcquisitionWarningTimeout:o,throwOnRequestTimeout:c,httpAgentProvider:async()=>{let{Agent:p,request:A}=await import("node:http");return tge=A,MN=p,i instanceof MN||typeof i?.destroy=="function"?(this.externalAgent=!0,i):new MN({keepAlive:u,maxSockets:d,...i})},httpsAgent:a instanceof UN.Agent||typeof a?.destroy=="function"?(this.externalAgent=!0,a):new UN.Agent({keepAlive:u,maxSockets:d,...a}),logger:l}}},Yz=class{sessions=[];constructor(e){this.sessions=e??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(e){this.sessions.push(e)}contains(e){return this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter(r=>r!==e)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(e){for(let r of this.sessions)r===e&&(r.destroyed||r.destroy())}},jz=class{constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}config;sessionCache=new Map;lease(e,r){let n=this.getUrlString(e),s=this.sessionCache.get(n);if(s){let c=s.poll();if(c&&!this.config.disableConcurrency)return c}let o=zz.connect(n);this.config.maxConcurrency&&o.settings({maxConcurrentStreams:this.config.maxConcurrency},c=>{if(c)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destin
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);returns.stream()};returnObject.assign(t,{transformToByteArray:r,transformToString:asyncs=>{leto=awaitr();if(s==="base64")return(0,Jct.toBase64)(o);if(s==="hex")return(0,Kct.toHex)(o);if(s===void0||s==="utf8"||s==="utf-8")return(0,Xct.toUtf8)(o);if(typeofTextDecoder=="function")returnnewTextDecoder(s).decode(o);thrownewError("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(e)thrownewError(Age);if(e=!0,mge(t))returnn(t);if((0,pge.isReadableStream)(t))returnt;thrownewError(`Cannot transform payload to web stream, got ${t}`)}})};HN.sdkStreamMixin=Zct;varmge=t=>typeofBlob=="function"&&tinstanceofBlob});vargge=C(zN=>{"use strict";Object.defineProperty(zN,"__esModule",{value:!0});zN.sdkStreamMixin=void0;varelt=ic(),tlt=fh(),tV=require("stream"),rlt=fge(),hge="The stream has already been transformed.",nlt=t=>{if(!(tinstanceoftV.Readable))try{return(0,rlt.sdkStreamMixin)(t)}catch{lets=t?.__proto__?.constructor?.name||t;thrownewError(`Unexpected stream implementation, expect Stream.Readable instance, got ${s}`)}lete=!1,r=async()=>{if(e)thrownewError(hge);returne=!0,await(0,elt.streamCollector)(t)};returnObject.assign(t,{transformToByteArray:r,transformToString:asyncn=>{lets=awaitr();returnn===void0||Buffer.isEncoding(n)?(0,tlt.fromArrayBuffer)(s.buffer,s.byteOffset,s.byteLength).toString(n):newTextDecoder(n).decode(s)},transformToWebStream:()=>{if(e)thrownewError(hge);if(t.readableFlowing!==null)thrownewError("The stream has been consumed by other callbacks.");if(typeoftV.Readable.toWeb!="function")thrownewError("Readable.toWeb() is not supported. Please ensure a polyfill is available.");returne=!0,tV.Readable.toWeb(t)}})};zN.sdkStreamMixin=nlt});varyge=C(rV=>{"use strict";Object.defineProperty(rV,"__esModule",{value:!0});rV.splitStream=slt;asyncfunctionslt(t){returntypeoft.stream=="function"&&(t=t.stream()),t.tee()}});varIge=C(nV=>{"use strict";Object.defineProperty(nV,"__esModule",{value:!0});nV.splitStream=ilt;varEge=require("stream"),olt=yge(),Cge=dl();asyncfunctionilt(t){if((0,Cge.isReadableStream)(t)||(0,Cge.isBlob)(t))return(0,olt.splitStream)(t);lete=newEge.PassThrough,r=newEge.PassThrough;returnt.pipe(e),t.pipe(r),[e,r]}});varZN=C(ht=>{"use strict";varwge=Jr(),xge=Wr(),VN=_z(),YN=Uhe(),jN=zhe(),WN=Yhe(),JN=Whe(),KN=gge(),XN=Ige(),bge=dl(),sV=classtextendsUint8Array{staticfromString(e,r="utf-8"){if(typeofe=="string")returnr==="base64"?t.mutate(wge.fromBase64(e)):t.mutate(xge.fromUtf8(e));thrownewError(`Unsupported conversion from ${typeofe} to Uint8ArrayBlobAdapter.`)}staticmutate(e){returnObject.setPrototypeOf(e,t.prototype),e}transformToString(e="utf-8"){returne==="base64"?wge.toBase64(this):xge.toUtf8(this)}};ht.isBlob=bge.isBlob;ht.isReadableStream=bge.isReadableStream;ht.Uint8ArrayBlobAdapter=sV;Object.prototype.hasOwnProperty.call(VN,"__proto__")&&!Object.prototype.hasOwnProperty.call(ht,"__proto__")&&Object.defineProperty(ht,"__proto__",{enumerable:!0,value:VN.__proto__});Object.keys(VN).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(ht,t)&&(ht[t]=VN[t])});Object.prototype.hasOwnProperty.call(YN,"__proto__")&&!Object.prototype.hasOwnProperty.call(ht,"__proto__")&&Object.defineProperty(ht,"__proto__",{enumerable:!0,value:YN.__proto__});Object.keys(YN).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(ht,t)&&(ht[t]=YN[t])});Object.prototype.hasOwnProperty.call(jN,"__proto__")&&!Object.prototype.hasOwnProperty.call(ht,"__proto__")&&Object.defineProperty(ht,"__proto__",{enumerable:!0,value:jN.__proto__});Object.keys(jN).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(ht,t)&&(ht[t]=jN[t])});Object.prototype.hasOwnProperty.call(WN,"__proto__")&&!Object.prototype.hasOwnProperty.call(ht,"__proto__")&&Object.defineProperty(ht,"__proto__",{enumerable:!0,value:WN.__proto__});Object.keys(WN).
`+p}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(p):r.logger?.warn?.(p)}typeof d.$responseBodyText<"u"&&d.$response&&(d.$response.body=d.$responseBodyText);try{if(Sge.HttpResponse.isInstance(s)){let{headers:A={}}=s,f=Object.entries(A);d.$metadata={httpStatusCode:s.statusCode,requestId:iV(/^x-[\w-]+-request-?id$/,f),extendedRequestId:iV(/^x-[\w-]+-id-2$/,f),cfId:iV(/^x-[\w-]+-cf-id$/,f)}}}catch{}}throw d}},iV=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1]});var Pge=C(Tge=>{"use strict";function alt(t){let e={};if(t=t.replace(/^\?/,""),t)for(let r of t.split("&")){let[n,s=null]=r.split("=");n=decodeURIComponent(n),s&&(s=decodeURIComponent(s)),n in e?Array.isArray(e[n])?e[n].push(s):e[n]=[e[n],s]:e[n]=s}return e}Tge.parseQueryString=alt});var ji=C(_ge=>{"use strict";var clt=Pge(),Qge=t=>{if(typeof t=="string")return Qge(new URL(t));let{hostname:e,pathname:r,port:n,protocol:s,search:o}=t,i;return o&&(i=clt.parseQueryString(o)),{hostname:e,port:n?parseInt(n):void 0,protocol:s,path:r,query:i}};_ge.parseUrl=Qge});var aV,cV,vge=_(()=>{aV=b(ji()),cV=t=>{if(typeof t=="object"){if("url"in t){let e=(0,aV.parseUrl)(t.url);if(t.headers){e.headers={};for(let[r,n]of Object.entries(t.headers))e.headers[r.toLowerCase()]=n.join(", ")}return e}return t}return(0,aV.parseUrl)(t)}});var Dge={};hn(Dge,{toEndpointV1:()=>cV});var lV=_(()=>{vge()});var kge,Lge,Oge=_(()=>{lV();kge=b(Fn());nT();Lge=t=>(e,r)=>async n=>{let{operationSchema:s}=(0,kge.getSmithyContext)(r),[,o,i,a,c,l]=s??[],u=r.endpointV2?async()=>cV(r.endpointV2):t.endpoint,d=await t.protocol.serializeRequest($C(o,i,a,c,l),n.input,{...t,...r,endpoint:u});return e({...n,request:d})}});function ml(t){return{applyToStack:e=>{e.add(Lge(t),Uge),e.add(Rge(t),Fge),t.protocol.setSerdeContext(t)}}}var Fge,Uge,Mge=_(()=>{Nge();Oge();Fge={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Uge={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var _r,Gu=_(()=>{_r=class{name;namespace;traits;static assign(e,r){return Object.assign(e,r)}static[Symbol.hasInstance](e){let r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}getName(){return this.namespace+"#"+this.name}}});var sT,llt,$ge=_(()=>{Gu();sT=class t extends _r{static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=t.symbol},llt=(t,e,r,n)=>_r.assign(new sT,{name:e,namespace:t,traits:r,valueSchema:n})});var oT,ult,qge=_(()=>{Gu();oT=class t extends _r{static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=t.symbol},ult=(t,e,r,n,s)=>_r.assign(new oT,{name:e,namespace:t,traits:r,keySchema:n,valueSchema:s})});var iT,dlt,Gge=_(()=>{Gu();iT=class t extends _r{static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=t.symbol},dlt=(t,e,r,n,s)=>_r.assign(new iT,{name:e,namespace:t,traits:r,input:n,output:s})});var yh,plt,uV=_(()=>{Gu();yh=class t extends _r{static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=t.symbol},plt=(t,e,r,n,s)=>_r.assign(new yh,{name:e,namespace:t,traits:r,memberNames:n,memberList:s})});var aT,Alt,Hge=_(()=>{Gu();uV();aT=class t extends yh{static symbol=Symbol.for("@smithy/err");ctor;symbol=t.symbol},Alt=(t,e,r,n,s,o)=>_r.assign(new aT,{name:e,namespace:t,traits:r,memberNames:n,memberList:s,ctor:null})});function cc(t){if(typeof t=="object")return t;if(t=t|0,cT[t])return cT[t];let e={},r=0;for(let n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(t>>r++&1)===1&&(e[n]=1);return cT[t]=e}var cT,dV=_(()=>{cT=[]});function GC(t,e){if(t instanceof me)return Object.assign(t,{memberName:e,_isMemberSchema:!0});let r=me;return new r(t,e)}var qC,lT,uT,me,pV,zge,Vge=_(()=>{oV();dV();qC={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},lT=[],uT={},me=class t{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=t.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,r){this.ref=e,this.memb
`),YC={warn:console.warn}});functionWC(t){lete=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),s=t.getUTCDate(),o=t.getUTCHours(),i=t.getUTCMinutes(),a=t.getUTCSeconds(),c=s<10?`0${s}`:`${s}`,l=o<10?`0${o}`:`${o}`,u=i<10?`0${i}`:`${i}`,d=a<10?`0${a}`:`${a}`;return`${vlt[n]}, ${c}${wV[r]}${e}${l}:${u}:${d} GMT`}varvlt,wV,Dlt,klt,Llt,xV,Olt,Flt,Ult,bV,SV,jC,Mlt,$lt,qlt,IV,Glt,Hlt,zlt,lc,Vlt,Ylt,Ih,eye=_(()=>{CV();vlt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wV=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Dlt=newRegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),klt=t=>{if(t==null)return;if(typeoft!="string")thrownewTypeError("RFC-3339 date-times must be expressed as strings");lete=Dlt.exec(t);if(!e)thrownewTypeError("Invalid RFC-3339 date-time value");let[r,n,s,o,i,a,c,l]=e,u=nA(Ih(n)),d=lc(s,"month",1,12),p=lc(o,"day",1,31);returnjC(u,d,p,{hours:i,minutes:a,seconds:c,fractionalMilliseconds:l})},Llt=newRegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),xV=t=>{if(t==null)return;if(typeoft!="string")thrownewTypeError("RFC-3339 date-times must be expressed as strings");lete=Llt.exec(t);if(!e)thrownewTypeError("Invalid RFC-3339 date-time value");let[r,n,s,o,i,a,c,l,u]=e,d=nA(Ih(n)),p=lc(s,"month",1,12),A=lc(o,"day",1,31),f=jC(d,p,A,{hours:i,minutes:a,seconds:c,fractionalMilliseconds:l});returnu.toUpperCase()!="Z"&&f.setTime(f.getTime()-Ylt(u)),f},Olt=newRegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Flt=newRegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ult=newRegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),bV=t=>{if(t==null)return;if(typeoft!="string")thrownewTypeError("RFC-7231 date-times must be expressed as strings");lete=Olt.exec(t);if(e){let[r,n,s,o,i,a,c,l]=e;returnjC(nA(Ih(o)),IV(s),lc(n,"day",1,31),{hours:i,minutes:a,seconds:c,fractionalMilliseconds:l})}if(e=Flt.exec(t),e){let[r,n,s,o,i,a,c,l]=e;returnqlt(jC(Mlt(o),IV(s),lc(n,"day",1,31),{hours:i,minutes:a,seconds:c,fractionalMilliseconds:l}))}if(e=Ult.exec(t),e){let[r,n,s,o,i,a,c,l]=e;returnjC(nA(Ih(l)),IV(n),lc(s.trimLeft(),"day",1,31),{hours:o,minutes:i,seconds:a,fractionalMilliseconds:c})}thrownewTypeError("Invalid RFC-7231 date-time value")},SV=t=>{if(t==null)return;lete;if(typeoft=="number")e=t;elseif(typeoft=="string")e=AT(t);elseif(typeoft=="object"&&t.tag===1)e=t.value;elsethrownewTypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(e)||e===1/0||e===-1/0)thrownewTypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");returnnewDate(Math.round(e*1e3))},jC=(t,e,r,n)=>{lets=e-1;returnHlt(t,s,r),newDate(Date.UTC(t,s,r,lc(n.hours,"hour",0,23),lc(n.minutes,"minute",0,59),lc(n.seconds,"seconds",0,60),Vlt(n.fractionalMilliseconds)))},Mlt=t=>{lete=newDate().getUTCFullYear(),r=Math.floor(e/100)*100+nA(Ih(t));returnr<e?r+100:r},$lt=50*365*24*60*60*1e3,qlt=t=>t.getTime()-newDate().getTime()>$lt?newDate(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())):t,IV=t=>{lete=wV.indexOf(t);if(e<0)thrownewTypeError(`Invalid month: ${t}`);returne+1},Glt=[31,28,31,30,31,30,31,31,30,31,30,31],Hlt=(t,e,r)=>{letn=Glt[e];if(e===1&&zlt(t)&&(n=29),r>n)thrownewTypeError(`Invalid day for ${wV[e]} in ${t}: ${r}`)},zlt=t=>t%4===0&&(t%100!==0||t%400===0),lc=(t,e,r,n)=>{lets=EV(Ih(t));if(s<r||s>n)thrownewTypeError(`${e} must be between ${r} and ${n}, inclusive`);returns},Vlt=t=>t==null?0:gV("0."+t)*1e3,Ylt=t=>{lete=t[0],r=1;if(e=="+")r=1;elseif(e=="-")r=-1;elsethrownewTypeError(`Offset direction, ${e
More information can be found at: https://a.co/c895JFp`))}});functionuA(t,e,r){returnt.$source||(t.$source={}),t.$source[e]=r,t}varPEe=_(()=>{});functionOut(t,e,r){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=r}varQEe=_(()=>{});functionFut(t,e,r){returnt.$source||(t.$source={}),t.$source[e]=r,t}var_Ee=_(()=>{});varai={};hn(ai,{emitWarningIfUnsupportedVersion:()=>yl,setCredentialFeature:()=>uA,setFeature:()=>Out,setTokenFeature:()=>Fut,state:()=>rY});varAn=_(()=>{TEe();PEe();QEe();_Ee()});varsY=C(Vu=>{"use strict";varUut=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Mut=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],$ut=["TimeoutError","RequestTimeout","RequestTimeoutException"],qut=[500,502,503,504],Gut=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Hut=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],vEe=t=>t?.$retryable!==void0,zut=t=>Uut.includes(t.name),DEe=t=>t.$metadata?.clockSkewCorrected,kEe=t=>{lete=newSet(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);returnt&&tinstanceofTypeError?e.has(t.message):!1},Vut=t=>t.$metadata?.httpStatusCode===429||Mut.includes(t.name)||t.$retryable?.throttling==!0,nY=(t,e=0)=>vEe(t)||DEe(t)||$ut.includes(t.name)||Gut.includes(t?.code||"")||Hut.includes(t?.code||"")||qut.includes(t.$metadata?.httpStatusCode||0)||kEe(t)||t.cause!==void0&&e<=10&&nY(t.cause,e+1),Yut=t=>{if(t.$metadata?.httpStatusCode!==void0){lete=t.$metadata.httpStatusCode;return500<=e&&e<=599&&!nY(t)}return!1};Vu.isBrowserNetworkError=kEe;Vu.isClockSkewCorrectedError=DEe;Vu.isClockSkewError=zut;Vu.isRetryableByTrait=vEe;Vu.isServerError=Yut;Vu.isThrottlingError=Vut;Vu.isTransientError=nY});varEl=C(Ir=>{"use strict";varjut=sY();Ir.RETRY_MODES=void0;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(Ir.RETRY_MODES||(Ir.RETRY_MODES={}));varoY=3,Wut=Ir.RETRY_MODES.STANDARD,BT=classt{staticsetTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;letr=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){returnDate.now()/1e3}asyncgetSendToken(){returnthis.acquireTokenBucket(1)}asyncacquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.availableTokens){letr=(e-this.availableTokens)/this.fillRate*1e3;awaitnewPromise(n=>t.setTimeoutFn(n,r))}this.availableTokens=this.availableTokens-e}}refillTokenBucket(){lete=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}letr=(e-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+r),this.lastTimestamp=e}updateClientSendingRate(e){letr;this.updateMeasuredRate();letn=e;if(n?.errorType==="THROTTLING"||jut.isThrottlingError(n?.error??e)){leti=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(i),this.enableTokenBucket()}elsethis.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());leto=Math.min(r,2*this.
`+a}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(a):n.logger?.warn?.(a)}typeof i.$responseBodyText<"u"&&i.$response&&(i.$response.body=i.$responseBodyText);try{if(ypt.HttpResponse.isInstance(o)){let{headers:c={}}=o,l=Object.entries(c);i.$metadata={httpStatusCode:o.statusCode,requestId:bY(/^x-[\w-]+-request-?id$/,l),extendedRequestId:bY(/^x-[\w-]+-id-2$/,l),cfId:bY(/^x-[\w-]+-cf-id$/,l)}}}catch{}}throw i}},bY=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],yCe=(t,e)=>(r,n)=>async s=>{let o=t,i=n.endpointV2?async()=>Ept.toEndpointV1(n.endpointV2):o.endpoint;if(!i)throw new Error("No valid endpoint provider available.");let a=await e(s.input,{...t,endpoint:i});return r({...s,request:a})},ECe={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},CCe={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Cpt(t,e,r){return{applyToStack:n=>{n.add(gCe(t,r),ECe),n.add(yCe(t,e),CCe)}}}Ph.deserializerMiddleware=gCe;Ph.deserializerMiddlewareOption=ECe;Ph.getSerdePlugin=Cpt;Ph.serializerMiddleware=yCe;Ph.serializerMiddlewareOption=CCe});var ci=C(Il=>{"use strict";var xCe=hCe(),wCe=ji(),Ipt=(Mn(),Xe(eI)),OT=Fn(),wpt=ICe(),xpt=async t=>{let e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Npt(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Rpt(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},bpt=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Spt=/(\d+\.){3}\d+/,Bpt=/\.\./,Rpt=t=>bpt.test(t)&&!Spt.test(t)&&!Bpt.test(t),Npt=t=>{let[e,r,n,,,s]=t.split(":"),o=e==="arn"&&t.split(":").length>=6,i=!!(o&&r&&n&&s);if(o&&!i)throw new Error(`InvalidARN:${t}wasaninvalidARN.`);return i},Tpt=(t,e,r,n=!1)=>{let s=async()=>{let o;return n?o=r.clientContextParams?.[t]??r[t]??r[e]:o=r[t]??r[e],typeof o=="function"?o():o};return t==="credentialScope"||e==="CredentialScope"?async()=>{let o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.credentialScope??o?.CredentialScope}:t==="accountId"||e==="AccountId"?async()=>{let o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.accountId??o?.AccountId}:t==="endpoint"||e==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;let o=await s();if(o&&typeof o=="object"){if("url"in o)return o.url.href;if("hostname"in o){let{protocol:i,hostname:a,port:c,path:l}=o;return`${i}//${a}${c?":"+c:""}${l}`}}return o}:s},SY=t=>{if(typeof t=="object"){if("url"in t){let e=wCe.parseUrl(t.url);if(t.headers){e.headers={};for(let[r,n]of Object.entries(t.headers))e.headers[r.toLowerCase()]=n.join(", ")}return e}return t}return wCe.parseUrl(t)},bCe=async(t,e,r,n)=>{if(!r.isCustomEndpoint){let i;r.serviceConfiguredEndpoint?i=await r.serviceConfiguredEndpoint():i=await xCe.getEndpointFromConfig(r.serviceId),i&&(r.endpoint=()=>Promise.resolve(SY(i)),r.isCustomEndpoint=!0)}let s=await SCe(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");let o=r.endpointProvider(s,n);if(r.isCustomEndpoint&&r.endpoint){let i=await r.endpoint();if(i?.headers){o.headers??={};for(let[a,c]of Object.entries(i.headers))o.headers[a]=Array.isArray(c)?c:[c]}}return o},SCe=async(t,e,r)=>{let n={},s=e?.getEndpointParameterInstructions?.()||{};for(let[o,i]of Object.entries(s))switch(i.type){case"staticContextParams":n[o]=i.value;break;case"contextParams":n[o]=t[i.name];break;case"clientContextParams":case"builtInParams":n[o]=await Tpt(i.name,o,r,i.type!=="builtInParams")();break;case"operationContextParams":n[o]=i.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}return Object.keys(s).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await xpt(n),n},BCe=({config:t,instru
${Ku.toHex(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let r=[];for(let o of e.split("/"))o?.length!==0&&o!=="."&&(o===".."?r.pop():r.push(o));let n=`${e?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&e?.endsWith("/")?"/":""}`;return HT.escapeUri(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){let r=bAt(e).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}},KY=class extends JT{headerFormatter=new jY;constructor({applyChecksum:e,credentials:r,region:n,service:s,sha256:o,uriEscapePath:i=!0}){super({applyChecksum:e,credentials:r,region:n,service:s,sha256:o,uriEscapePath:i})}async presign(e,r={}){let{signingDate:n=new Date,expiresIn:s=3600,unsignableHeaders:o,unhoistableHeaders:i,signableHeaders:a,hoistableHeaders:c,signingRegion:l,signingService:u}=r,d=await this.credentialProvider();this.validateResolvedCredentials(d);let p=l??await this.regionProvider(),{longDate:A,shortDate:f}=this.formatDate(n);if(s>_Ie)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let y=YT(f,p,u??this.service),w=kIe(JY(e),{unhoistableHeaders:i,hoistableHeaders:c});d.sessionToken&&(w.query[ej]=d.sessionToken),w.query[yIe]=zT,w.query[EIe]=`${d.accessKeyId}/${y}`,w.query[XY]=A,w.query[IIe]=s.toString(10);let x=YY(w,o,a);return w.query[CIe]=this.getCanonicalHeaderList(x),w.query[ZY]=await this.getSignature(A,y,this.getSigningKey(d,p,f,u),this.createCanonicalRequest(w,x,await jT(e,this.sha256))),w}async sign(e,r){return typeof e=="string"?this.signString(e,r):e.headers&&e.payload?this.signEvent(e,r):e.message?this.signMessage(e,r):this.signRequest(e,r)}async signEvent({headers:e,payload:r},{signingDate:n=new Date,priorSignature:s,signingRegion:o,signingService:i}){let a=o??await this.regionProvider(),{shortDate:c,longDate:l}=this.formatDate(n),u=YT(c,a,i??this.service),d=await jT({headers:{},body:r},this.sha256),p=new this.sha256;p.update(e);let A=Ku.toHex(await p.digest()),f=[TIe,l,u,s,A,d].join(`
For more information, please visit: `+omt);lets=t.originalExpiration??t.expiration;return{...t,...s?{originalExpiration:s}:{},expiration:n}},imt=(t,e={})=>{letr=e?.logger||console,n;returnasync()=>{lets;try{s=awaitt(),s.expiration&&s.expiration.getTime()<Date.now()&&(s=YIe(s,r))}catch(o){if(n)r.warn("Credential renew failed: ",o),s=YIe(n,r);elsethrowo}returnn=s,s}},twe="/latest/meta-data/iam/security-credentials/",amt="/latest/api/token",cj="AWS_EC2_METADATA_V1_DISABLED",jIe="ec2_metadata_v1_disabled",WIe="x-aws-ec2-metadata-token",cmt=(t={})=>imt(lmt(t),{logger:t.logger}),lmt=(t={})=>{lete=!1,{logger:r,profile:n}=t,{timeout:s,maxRetries:o}=Aj(t),i=async(a,c)=>{if(e||c.headers?.[WIe]==null){letd=!1,p=!1,A=awaitpj.loadConfig({environmentVariableSelector:f=>{lety=f[cj];if(p=!!y&&y!=="false",y===void0)thrownewpc.CredentialsProviderError(`${cj} not set in env, checking config file next.`,{logger:t.logger});returnp},configFileSelector:f=>{lety=f[jIe];returnd=!!y&&y!=="false",d},default:!1},{profile:n})();if(t.ec2MetadataV1Disabled||A){letf=[];throwt.ec2MetadataV1Disabled&&f.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),d&&f.push(`config file profile (${jIe})`),p&&f.push(`process environment variable (${cj})`),newdj(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${f.join(", ")}].`)}}letu=(awaitlj(async()=>{letd;try{d=awaitdmt(c)}catch(p){throwp.statusCode===401&&(e=!1),p}returnd},a)).trim();returnlj(async()=>{letd;try{d=awaitpmt(u,c,t)}catch(p){throwp.statusCode===401&&(e=!1),p}returnd},a)};returnasync()=>{leta=awaitewe();if(e)returnr?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),i(o,{...a,timeout:s});{letc;try{c=(awaitumt({...a,timeout:s})).toString()}catch(l){if(l?.statusCode===400)throwObject.assign(l,{message:"EC2 Metadata token request returned error"});return(l.message==="TimeoutError"||[403,404,405].includes(l.statusCode))&&(e=!0),r?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),i(o,{...a,timeout:s})}returni(o,{...a,headers:{[WIe]:c},timeout:s})}}},umt=asynct=>aI({...t,path:amt,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),dmt=asynct=>(awaitaI({...t,path:twe})).toString(),pmt=async(t,e,r)=>{letn=JSON.parse((awaitaI({...e,path:twe+t})).toString());if(!JIe(n))thrownewpc.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:r.logger});returnKIe(n)};zn.DEFAULT_MAX_RETRIES=ZIe;zn.DEFAULT_TIMEOUT=XIe;zn.ENV_CMDS_AUTH_TOKEN=uj;zn.ENV_CMDS_FULL_URI=KT;zn.ENV_CMDS_RELATIVE_URI=XT;zn.fromContainerMetadata=GAt;zn.fromInstanceMetadata=cmt;zn.getInstanceMetadataEndpoint=ewe;zn.httpRequest=aI;zn.providerConfigFromInit=Aj});varrwe=C(ZT=>{"use strict";Object.defineProperty(ZT,"__esModule",{value:!0});ZT.checkUrl=void0;varAmt=Hn(),mmt="169.254.170.2",fmt="169.254.170.23",hmt="[fd00:ec2::23]",gmt=(t,e)=>{if(t.protocol!=="https:"&&!(t.hostname===mmt||t.hostname===fmt||t.hostname===hmt)){if(t.hostname.includes("[")){if(t.hostname==="[::1]"||t.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(t.hostname==="localhost")return;letr=t.hostname.split("."),n=s=>{leto=parseInt(s,10);return0<=o&&o<=255};if(r[0]==="127"&&n(r[1])&&n(r[2])&&n(r[3])&&r.length===4)return}thrownewAmt.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:e})}};ZT.checkUrl=gmt});varnwe=C(eP=>{"use strict";Object.defineProperty(eP,"__esModule",{value:!0});eP.createGetRequest=Imt;eP.getCredentials=wmt;varmj=Hn(),ymt=Bt(),Emt=_e(),Cmt=ZN();functionImt(t){returnnewymt.HttpRequest({protocol:t.protocol,hostname:t.hostname,port:Number(t.port),path:t.pathname,query:Array.from(t.searchParams.entries()).reduce((e,[r,n])=>(e[r]=n,e),{}),fragment:t.hash})}asyncfunctionwmt(t,e){letn=await(0,Cmt.sdkStreamMixin)(t.body).transformToString();if(t.statusCode===200){lets=JSON.parse(n);if(typeofs.AccessKeyId!="string"||typeofs.SecretAccessKey!="string"||typeofs.Token!="string"||typeofs.Expiration!="string")thrownewmj.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:e});return{accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.Token,expiration:(0,Emt.parseRfc3339DateTime)(s.Expiration)}}if(t.statusCode>=400&&t.statusCode<500){lets={};try{s=JSON.parse(n)}catch{}throwObject.assign(newmj.CredentialsProviderError(`Server responded with status: ${t.statusCode}`,{logger:e}),{Code:s.Code,Message:s.Message})}thrownewmj.CredentialsProviderError(`Server responded with status: ${t.statusCode}`,{logger:e})}});varswe=C(tP=>{"use strict";Object.defineProperty(tP,"__esModule",{value:!0});tP.retryWrapper=void0;varxmt=(t,e,r)=>async()=>{for(letn=0;n<e;++n)try{returnawaitt()}catch{awaitnewPromise(o=>setTimeout(o,r))}returnawaitt()};tP.retryWrapper=xmt});varawe=C(rP=>{"use strict";Object.defineProperty(rP,"__esModule",{value:!0});rP.fromHttp=void0;varbmt=(KC(),Xe(JC)),Smt=(An(),Xe(ai)),Bmt=ic(),owe=Hn(),Rmt=bmt.__importDefault(require("node:fs/promises")),Nmt=rwe(),iwe=nwe(),Tmt=swe(),Pmt="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Qmt="http://169.254.170.2",_mt="AWS_CONTAINER_CREDENTIALS_FULL_URI",vmt="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Dmt="AWS_CONTAINER_AUTHORIZATION_TOKEN",kmt=(t={})=>{t.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");lete,r=t.awsContainerCredentialsRelativeUri??process.env[Pmt],n=t.awsContainerCredentialsFullUri??process.env[_mt],s=t.awsContainerAuthorizationToken??process.env[Dmt],o=t.awsContainerAuthorizationTokenFile??process.env[vmt],i=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?.warn?console.warn:t.logger.warn.bind(t.logger);if(r&&n&&(i("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),i("awsContainerCredentialsFullUri will take precedence.")),s&&o&&(i("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),i("awsContainerAuthorizationToken will take precedence.")),n)e=n;elseif(r)e=`${Qmt}${r}`;elsethrownewowe.CredentialsProviderError(`No HTTP credential provider host provided.
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:t.logger});leta=newURL(e);(0,Nmt.checkUrl)(a,t.logger);letc=Bmt.NodeHttpHandler.create({requestTimeout:t.timeout??1e3,connectionTimeout:t.timeout??1e3});return(0,Tmt.retryWrapper)(async()=>{letl=(0,iwe.createGetRequest)(a);s?l.headers.Authorization=s:o&&(l.headers.Authorization=(awaitRmt.default.readFile(o)).toString());try{letu=awaitc.handle(l);return(0,iwe.getCredentials)(u.response).then(d=>(0,Smt.setCredentialFeature)(d,"CREDENTIALS_HTTP","z"))}catch(u){thrownewowe.CredentialsProviderError(String(u),{logger:t.logger})}},t.maxRetries??3,t.timeout??1e3)};rP.fromHttp=kmt});varfj=C(nP=>{"use strict";Object.defineProperty(nP,"__esModule",{value:!0});nP.fromHttp=void0;varLmt=awe();Object.defineProperty(nP,"fromHttp",{enumerable:!0,get:function(){returnLmt.fromHttp}})});functionOmt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:t.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}functionFmt(t){return{schemeId:"smithy.api#noAuth"}}varlI,cwe,lwe,uwe,hj=_(()=>{Ur();lI=b(Fn()),cwe=async(t,e,r)=>({operation:(0,lI.getSmithyContext)(e).operation,region:await(0,lI.normalizeProvider)(t.region)()||(()=>{thrownewError("expected `region` to be configured for `aws.auth#sigv4`")})()});lwe=t=>{lete=[];returnt.operation==="CreateToken"?e.push(Fmt(t)):e.push(Omt(t)),e},uwe=t=>{lete=dc(t);returnObject.assign(e,{authSchemePreference:(0,lI.normalizeProvider)(t.authSchemePreference??[])})}});vardwe,pwe,gj=_(()=>{dwe=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),pwe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});vartd,uI=_(()=>{td={name:"@aws-sdk/nested-clients",version:"3.996.18",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=20.0.0"},sideEffects:!1,author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.26","@aws-sdk/middleware-host-header":"^3.972.8","@aws-sdk/middleware-logger":"^3.972.8","@aws-sdk/middleware-recursion-detection":"^3.972.9","@aws-sdk/middleware-user-agent":"^3.972.28","@aws-sdk/region-config-resolver":"^3.972.10","@aws-sdk/types":"^3.973.6","@aws-sdk/util-endpoints":"^3.996.5","@aws-sdk/util-user-agent-browser":"^3.972.8","@aws-sdk/util-user-agent-node":"^3.973.14","@smithy/config-resolver":"^4.4.13","@smithy/core":"^3.23.13","@smithy/fetch-http-handler":"^5.3.15","@smithy/hash-node":"^4.2.12","@smithy/invalid-dependency":"^4.2.12","@smithy/middleware-content-length":"^4.2.12","@smithy/middleware-endpoint":"^4.4.28","@smithy/middleware-retry":"^4.4.46","@smithy/middleware-serde":"^4.2.16","@smithy/middleware-stack":"^4.2.12","@smithy/node-config-provider":"^4.3.12","@smithy/node-http-handler":"^4.5.1","@smithy/protocol-http":"^5.3.12","@smithy/smithy-client":"^4.12.8","@smithy/types":"^4.13.1","@smithy/url-parser":"^4.2.12","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/ut
`||E==="\r"}function d(E,h){let g=h;for(;h<E.length;h++)if(E[h]=="?"||E[h]==""){let B=E.substr(g,h-g);if(h>5&&B==="xml")return T("InvalidXml","XMLdeclarationallowedonlyatthestartofthedocument.",U(E,h));if(E[h]=="?"&&E[h+1]==">"){h++;break}continue}return h}function p(E,h){if(E.length>h+5&&E[h+1]==="-"&&E[h+2]==="-"){for(h+=3;h<E.length;h++)if(E[h]==="-"&&E[h+1]==="-"&&E[h+2]===">"){h+=2;break}}else if(E.length>h+8&&E[h+1]==="D"&&E[h+2]==="O"&&E[h+3]==="C"&&E[h+4]==="T"&&E[h+5]==="Y"&&E[h+6]==="P"&&E[h+7]==="E"){let g=1;for(h+=8;h<E.length;h++)if(E[h]==="<")g++;else if(E[h]===">"&&(g--,g===0))break}else if(E.length>h+9&&E[h+1]==="["&&E[h+2]==="C"&&E[h+3]==="D"&&E[h+4]==="A"&&E[h+5]==="T"&&E[h+6]==="A"&&E[h+7]==="["){for(h+=8;h<E.length;h++)if(E[h]==="]"&&E[h+1]==="]"&&E[h+2]===">"){h+=2;break}}return h}let A='"',f="'";function y(E,h){let g="",B="",P=!1;for(;h<E.length;h++){if(E[h]===A||E[h]===f)B===""?B=E[h]:B!==E[h]||(B="");else if(E[h]===">"&&B===""){P=!0;break}g+=E[h]}return B===""&&{value:g,index:h,tagClosed:P}}let w=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function x(E,h){let g=s(E,w),B={};for(let P=0;P<g.length;P++){if(g[P][1].length===0)return T("InvalidAttr","Attribute '"+g[P][2]+"' has no space in starting.",V(g[P]));if(g[P][3]!==void 0&&g[P][4]===void 0)return T("InvalidAttr","Attribute '"+g[P][2]+"' is without value.",V(g[P]));if(g[P][3]===void 0&&!h.allowBooleanAttributes)return T("InvalidAttr","boolean attribute '"+g[P][2]+"' is not allowed.",V(g[P]));let N=g[P][2];if(!v(N))return T("InvalidAttr","Attribute '"+N+"' is an invalid name.",V(g[P]));if(Object.prototype.hasOwnProperty.call(B,N))return T("InvalidAttr","Attribute '"+N+"' is repeated.",V(g[P]));B[N]=1}return!0}function I(E,h){if(E[++h]===";")return-1;if(E[h]==="#")return(function(B,P){let N=/\d/;for(B[P]==="x"&&(P++,N=/[\da-fA-F]/);P<B.length;P++){if(B[P]===";")return P;if(!B[P].match(N))break}return-1})(E,++h);let g=0;for(;h<E.length;h++,g++)if(!(E[h].match(/\w/)&&g<20)){if(E[h]===";")break;return-1}return h}function T(E,h,g){return{err:{code:E,msg:h,line:g.line||g,col:g.col}}}function v(E){return o(E)}function L(E){return o(E)}function U(E,h){let g=E.substring(0,h).split(/\r?\n/);return{line:g.length,col:g[g.length-1].length+1}}function V(E){return E.startIndex+E[1].length}let z=E=>i.includes(E)?"__"+E:E,Ee={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(E,h){return h},attributeValueProcessor:function(E,h){return h},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(E,h,g){return E},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:z};function Ne(E,h){if(typeof E!="string")return;let g=E.toLowerCase();if(i.some(B=>g===B.toLowerCase()))throw new Error(`[SECURITY]Invalid${h}:"${E}"isareservedJavaScriptkeywordthatcouldcauseprototypepollution`);if(a.some(B=>g===B.toLowerCase()))throw new Error(`[SECURITY]Invalid${h}:"${E}"isareservedJavaScriptkeywordthatcouldcauseprototypepollution`)}function ee(E){return typeof E=="boolean"?{enabled:E,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof E=="object"&&E!==null?{enabled:E.enabled!==!1,maxEntitySize:Math.max(1,E.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,E.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,E.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,E.maxExpandedLength??1e5),maxEntityCount:Math.max(1,E.maxEntityCount??100),allowedTags:E.allowedTags??null,tagFilter:E.tagFilter??null}:ee(!0)}let qe=function(E){let h=Object.assign({},Ee,E),g=[{value:h.attributeNamePrefix,n
`);leth=newlt("!xml"),g=h,B="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;letP=newrn(this.options.processEntities);for(letN=0;N<E.length;N++)if(E[N]==="<")if(E[N+1]==="/"){letk=Td(E,">",N,"Closing Tag is not closed."),Q=E.substring(N+2,k).trim();if(this.options.removeNSPrefix){letF=Q.indexOf(":");F!==-1&&(Q=Q.substr(F+1))}Q=sD(this.options.transformTagName,Q,"",this.options).tagName,g&&(B=this.saveTextToParentTag(B,g,this.readonlyMatcher));letD=this.matcher.getCurrentTag();if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)thrownewError(`Unpaired tag can not be used as closing tag: </${Q}>`);D&&this.options.unpairedTags.indexOf(D)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,g=this.tagsNodeStack.pop(),B="",N=k}elseif(E[N+1]==="?"){letk=nD(E,N,!1,"?>");if(!k)thrownewError("Pi Tag is not closed.");if(B=this.saveTextToParentTag(B,g,this.readonlyMatcher),!(this.options.ignoreDeclaration&&k.tagName==="?xml"||this.options.ignorePiTags)){letQ=newlt(k.tagName);Q.add(this.options.textNodeName,""),k.tagName!==k.tagExp&&k.attrExpPresent&&(Q[":@"]=this.buildAttributesMap(k.tagExp,this.matcher,k.tagName)),this.addChild(g,Q,this.readonlyMatcher,N)}N=k.closeIndex+1}elseif(E.substr(N+1,3)==="!--"){letk=Td(E,"-->",N+4,"Comment is not closed.");if(this.options.commentPropName){letQ=E.substring(N+4,k-2);B=this.saveTextToParentTag(B,g,this.readonlyMatcher),g.add(this.options.commentPropName,[{[this.options.textNodeName]:Q}])}N=k}elseif(E.substr(N+1,2)==="!D"){letk=P.readDocType(E,N);this.docTypeEntities=k.entities,N=k.i}elseif(E.substr(N+1,2)==="!["){letk=Td(E,"]]>",N,"CDATA is not closed.")-2,Q=E.substring(N+9,k);B=this.saveTextToParentTag(B,g,this.readonlyMatcher);letD=this.parseTextData(Q,g.tagname,this.readonlyMatcher,!0,!1,!0,!0);D==null&&(D=""),this.options.cdataPropName?g.add(this.options.cdataPropName,[{[this.options.textNodeName]:Q}]):g.add(this.options.textNodeName,D),N=k+2}else{letk=nD(E,N,this.options.removeNSPrefix);if(!k){letws=E.substring(Math.max(0,N-50),Math.min(E.length,N+50));thrownewError(`readTagExp returned undefined at position ${N}. Context: "${ws}"`)}letQ=k.tagName,D=k.rawTagName,F=k.tagExp,G=k.attrExpPresent,ce=k.closeIndex;if({tagName:Q,tagExp:F}=sD(this.options.transformTagName,Q,F,this.options),this.options.strictReservedNames&&(Q===this.options.commentPropName||Q===this.options.cdataPropName||Q===this.options.textNodeName||Q===this.options.attributesGroupName))thrownewError(`Invalid tag name: ${Q}`);g&&B&&g.tagname!=="!xml"&&(B=this.saveTextToParentTag(B,g,this.readonlyMatcher,!1));letot=g;ot&&this.options.unpairedTags.indexOf(ot.tagname)!==-1&&(g=this.tagsNodeStack.pop(),this.matcher.pop());letKe=!1;F.length>0&&F.lastIndexOf("/")===F.length-1&&(Ke=!0,Q[Q.length-1]==="/"?(Q=Q.substr(0,Q.length-1),F=Q):F=F.substr(0,F.length-1),G=Q!==F);letrt,yt=null,aa={};rt=lQe(D),Q!==h.tagname&&this.matcher.push(Q,{},rt),Q!==F&&G&&(yt=this.buildAttributesMap(F,this.matcher,Q),yt&&(aa=cQe(yt,this.options))),Q!==h.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));letnn=N;if(this.isCurrentNodeStopNode){letws="";if(Ke)N=k.closeIndex;elseif(this.options.unpairedTags.indexOf(Q)!==-1)N=k.closeIndex;else{letcD=this.readStopNodeData(E,D,ce+1);if(!cD)thrownewError(`Unexpected end of ${D}`);N=cD.i,ws=cD.tagContent}letaD=newlt(Q);yt&&(aD[":@"]=yt),aD.add(this.options.textNodeName,ws),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(g,aD,this.readonlyMatcher,nn)}else{if(Ke){({tagName:Q,tagExp:F}=sD(this.options.transformTagName,Q,F,this.options));letws=newlt(Q);yt&&(ws[":@"]=yt),this.addChild(g,ws,this.readonlyMatcher,nn),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(this.options.unpairedTags.indexOf(Q)!==-1){letws=newlt(Q);yt&&(ws[":@"]=yt),this.addChild(g,ws,this.readonlyMatcher,nn),this.matcher.pop(),this.isCurrentNodeStopNode=!1,N=k.closeIndex;continue}{letws=newlt(Q);if(this.tagsNodeStack.length>this.options.maxNestedTags)thrownew
`);function Dft(t){return Vj.parse(t,!0)}});var CP=C(EP=>{"use strict";var kft=oxe(),Lft=/[&<>"]/g,Oft={"&":"&","<":"<",">":">",'"':"""};function Fft(t){return t.replace(Lft,e=>Oft[e])}var Uft=/[&"'<>\r\n\u0085\u2028]/g,Mft={"&":"&",'"':""","'":"'","<":"<",">":">","\r":"
","\n":"
","\x85":"…","\u2028":"
"};function $ft(t){return t.replace(Uft,e=>Mft[e])}var yP=class{value;constructor(e){this.value=e}toString(){return $ft(""+this.value)}},jj=class t{name;children;attributes={};static of(e,r,n){let s=new t(e);return r!==void 0&&s.addChildNode(new yP(r)),n!==void 0&&s.withName(n),s}constructor(e,r=[]){this.name=e,this.children=r}withName(e){return this.name=e,this}addAttribute(e,r){return this.attributes[e]=r,this}addChildNode(e){return this.children.push(e),this}removeAttribute(e){return delete this.attributes[e],this}n(e){return this.name=e,this}c(e){return this.children.push(e),this}a(e,r){return r!=null&&(this.attributes[e]=r),this}cc(e,r,n=r){if(e[r]!=null){let s=t.of(r,e[r]).withName(n);this.c(s)}}l(e,r,n,s){e[r]!=null&&s().map(i=>{i.withName(n),this.c(i)})}lc(e,r,n,s){if(e[r]!=null){let o=s(),i=new t(n);o.map(a=>{i.c(a)}),this.c(i)}}toString(){let e=!!this.children.length,r=`<${this.name}`,n=this.attributes;for(let s of Object.keys(n)){let o=n[s];o!=null&&(r+=`${s}="${Fft(""+o)}"`)}return r+=e?`>${this.children.map(s=>s.toString()).join("")}</${this.name}>`:"/>"}};EP.parseXML=kft.parseXML;EP.XmlNode=jj;EP.XmlText=yP});var ixe,axe,cxe,bA,IP=_(()=>{ixe=b(CP());Vs();ct();axe=b(_e()),cxe=b(Wr());id();Uj();bA=class extends Vn{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new iA(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,r,n){let s=me.of(e),o=s.getMemberSchemas();if(s.isStructSchema()&&s.isMemberSchema()&&!!Object.values(o).find(l=>!!l.getMemberTraits().eventPayload)){let l={},u=Object.keys(o)[0];return o[u].isBlobSchema()?l[u]=r:l[u]=this.read(o[u],r),l}let a=(this.serdeContext?.utf8Encoder??cxe.toUtf8)(r),c=this.parseXml(a);return this.readSchema(e,n?c[n]:c)}readSchema(e,r){let n=me.of(e);if(n.isUnitSchema())return;let s=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(r))return this.readSchema(n,[r]);if(r==null)return r;if(typeof r=="object"){let o=!!s.xmlFlattened;if(n.isListSchema()){let a=n.getValueSchema(),c=[],l=a.getMergedTraits().xmlName??"member",u=o?r:(r[0]??r)[l];if(u==null)return c;let d=Array.isArray(u)?u:[u];for(let p of d)c.push(this.readSchema(a,p));return c}let i={};if(n.isMapSchema()){let a=n.getKeySchema(),c=n.getValueSchema(),l;o?l=Array.isArray(r)?r:[r]:l=Array.isArray(r.entry)?r.entry:[r.entry];let u=a.getMergedTraits().xmlName??"key",d=c.getMergedTraits().xmlName??"value";for(let p of l){let A=p[u],f=p[d];i[A]=this.readSchema(c,f)}return i}if(n.isStructSchema()){let a=n.isUnionSchema(),c;a&&(c=new Fh(r,i));for(let[l,u]of n.structIterator()){let d=u.getMergedTraits(),p=d.httpPayload?d.xmlName??u.getName():u.getMemberTraits().xmlName??l;a&&c.mark(p),r[p]!=null&&(i[l]=this.readSchema(u,r[p]))}return a&&c.writeUnknown(),i}if(n.isDocumentSchema())return r;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(!0)}`)}return n.isListSchema()?[]:n.isMapSchema()||n.isStructSchema()?{}:this.stringDeserializer.read(n,r)}parseXml(e){if(e.length){let r;try{r=(0,ixe.parseXML)(e)}catch(i){throw i&&typeof i=="object"&&Object.defineProperty(i,"$responseBodyText",{value:e}),i}let n="#text",s=Object.keys(r)[0],o=r[s];return o[n]&&(o[s]=o[n],delete o[n]),(0,axe.getValueFromTextNode)(o)}return{}}}});var lxe,uxe,CI,Wj=_(()=>{Vs();ct();ys();lxe=b(_e()),uxe=b(Jr());id();CI=class extends Vn{settings;buffer;constructor(e){super(),this.settings=e}write(e,r,n=""){this.buffer===void 0&&(this.buffer="");let s=me.of(e);if(n&&!n.endsWith(".")&&(n+="."),s.isBlobSchema())(typeof r=="string"||r instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??uxe.toBase64)(r)));else if(s.isBooleanSchema()||
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:e});return t},Sgt=(t={})=>async({callerClientConfig:e}={})=>{t.logger?.debug("@aws-sdk/credential-provider-sso-fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoSession:i}=t,{ssoClient:a}=t,c=sQ.getProfileName({profile:t.profile??e?.profile});if(!r&&!n&&!s&&!o&&!i){let u=(await sQ.parseKnownFiles(t))[c];if(!u)throw new ta.CredentialsProviderError(`Profile ${c} was not found.`,{logger:t.logger});if(!zSe(u))throw new ta.CredentialsProviderError(`Profile ${c} is not configured with SSO credentials.`,{logger:t.logger});if(u?.sso_session){let x=(await sQ.loadSsoSessionData(t))[u.sso_session],I=` configurations in profile ${c} and sso-session ${u.sso_session}`;if(s&&s!==x.sso_region)throw new ta.CredentialsProviderError("ConflictingSSOregion"+I,{tryNextLink:!1,logger:t.logger});if(r&&r!==x.sso_start_url)throw new ta.CredentialsProviderError("ConflictingSSOstart_url"+I,{tryNextLink:!1,logger:t.logger});u.sso_region=x.sso_region,u.sso_start_url=x.sso_start_url}let{sso_start_url:d,sso_account_id:p,sso_region:A,sso_role_name:f,sso_session:y}=VSe(u,t.logger);return HSe({ssoStartUrl:d,ssoSession:y,ssoAccountId:p,ssoRegion:A,ssoRoleName:f,ssoClient:a,clientConfig:t.clientConfig,parentClientConfig:t.parentClientConfig,callerClientConfig:t.callerClientConfig,profile:c,filepath:t.filepath,configFilepath:t.configFilepath,ignoreCache:t.ignoreCache,logger:t.logger})}else{if(!r||!n||!s||!o)throw new ta.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:t.logger});return HSe({ssoStartUrl:r,ssoSession:i,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoClient:a,clientConfig:t.clientConfig,parentClientConfig:t.parentClientConfig,callerClientConfig:t.callerClientConfig,profile:c,filepath:t.filepath,configFilepath:t.configFilepath,ignoreCache:t.ignoreCache,logger:t.logger})}};oQ.fromSSO=Sgt;oQ.isSsoProfile=zSe;oQ.validateSsoProfile=VSe});function Bgt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:t.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}function Rgt(t){return{schemeId:"smithy.api#noAuth"}}var JI,YSe,jSe,WSe,PW=_(()=>{Ur();JI=b(Fn()),YSe=async(t,e,r)=>({operation:(0,JI.getSmithyContext)(e).operation,region:await(0,JI.normalizeProvider)(t.region)()||(()=>{throw new Error("expected`region`tobeconfiguredfor`aws.auth#sigv4`")})()});jSe=t=>{let e=[];return t.operation==="CreateOAuth2Token"?e.push(Rgt(t)):e.push(Bgt(t)),e},WSe=t=>{let e=dc(t);return Object.assign(e,{authSchemePreference:(0,JI.normalizeProvider)(t.authSchemePreference??[])})}});var JSe,KSe,QW=_(()=>{JSe=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"signin"}),KSe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var oBe,jn,XSe,NA,Vh,pd,ra,cQ,_W,ZSe,eBe,tBe,vW,DW,Yn,kW,iQ,aQ,rBe,nBe,sBe,Ngt,iBe,aBe=_(()=>{oBe="required",jn="argv",XSe="isSet",NA="booleanEquals",Vh="error",pd="endpoint",ra="tree",cQ="PartitionResult",_W="stringEquals",ZSe={[oBe]:!0,default:!1,type:"boolean"},eBe={[oBe]:!1,type:"string"},tBe={ref:"Endpoint"},vW={fn:NA,[jn]:[{ref:"UseFIPS"},!0]},DW={fn:NA,[jn]:[{ref:"UseDualStack"},!0]},Yn={},kW={fn:"getAttr",[jn]:[{ref:cQ},"name"]},iQ={fn:NA,[jn]:[{ref:"UseFIPS"},!1]},aQ={fn:NA,[jn]:[{ref:"UseDualStack"},!1]},rBe={fn:"getAttr",[jn]:[{ref:cQ},"supportsFIPS"]},nBe={fn:NA,[jn]:[!0,{fn:"getAttr",[jn]:[{ref:cQ},"supportsDualStack"]}]},sBe=[{ref:"Region"}],Ngt={version:"1.0",parameters:{UseDualStack:ZSe,UseFIPS:ZSe,Endpoint:eBe,Region:eBe},rules:[{conditions:[{fn:XSe,[jn]:[tBe]}],rules:[{conditions:[vW],error:"InvalidConfiguration:FIPSandcustomendpointarenotsupported",type:Vh},{rules:[{conditions:[DW],error:"In
`),iNe=!0)),new fw.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:t.logger,tryNextLink:!0});return t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),gJ.fromEnv(t)()},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoSession:i}=t;if(!r&&!n&&!s&&!o&&!i)throw new fw.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:t.logger});let{fromSSO:a}=await Promise.resolve().then(()=>b(TW()));return a(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=await Promise.resolve().then(()=>b(sNe()));return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=await Promise.resolve().then(()=>b(pJ()));return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=await Promise.resolve().then(()=>b(mJ()));return r(t)(e)},async()=>(t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await _Et(t))()),async()=>{throw new fw.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:t.logger})}],aNe),LEt=t=>t?.expiration!==void 0,aNe=t=>t?.expiration!==void 0&&t.expiration.getTime()-Date.now()<3e5;jQ.credentialsTreatedAsExpired=aNe;jQ.credentialsWillNeedRefresh=LEt;jQ.defaultProvider=kEt});var gNe=C(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});n_.ruleSet=void 0;var hNe="required",Qt="fn",_t="argv",Jn="ref",LA="url",OA="properties",FA="headers",cNe=!0,lNe="isSet",UA="booleanEquals",Jh="error",st="endpoint",sa="tree",oa="PartitionResult",uNe={[hNe]:!0,default:!1,type:"boolean"},dNe={[hNe]:!1,type:"string"},pNe={[Jn]:"Endpoint"},en={[Qt]:UA,[_t]:[{[Jn]:"UseFIPS"},!0]},tn={[Qt]:UA,[_t]:[{[Jn]:"UseDualStack"},!0]},Kh={},WQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:oa},"name"]},"aws"]},bn={[Qt]:UA,[_t]:[{[Jn]:"UseFIPS"},!1]},Sn={[Qt]:UA,[_t]:[{[Jn]:"UseDualStack"},!1]},vl={[LA]:"https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",[OA]:{},[FA]:{}},Id={[LA]:"https://ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",[OA]:{},[FA]:{}},Dl={[LA]:"https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",[OA]:{},[FA]:{}},wd={[LA]:"https://ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[OA]:{},[FA]:{}},JQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:oa},"name"]},"aws-us-gov"]},KQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:oa},"name"]},"aws-cn"]},XQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:oa},"name"]},"aws-iso"]},ZQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:oa},"name"]},"aws-iso-b"]},e_={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:oa},"name"]},"aws-iso-e"]},t_={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:oa},"name"]},"aws-iso-f"]},r_={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:oa},"name"]},"aws-eusc"]},ANe={[Qt]:"getAttr",[_t]:[{[Jn]:oa},"supportsFIPS"]},mNe={[Qt]:UA,[_t]:[!0,{[Qt]:"getAttr",[_t]:[{[Jn]:oa},"supportsDualStack"]}]},fNe=[{[Jn]:"Region"}],OEt={version:"1.0",parameters:{UseDualStack:uNe,UseFIPS:uNe,Endpoint:dNe,Region:dNe},rules:[{conditions:[{[Qt]:lNe,[_t]:[pNe]}],rules:[{conditions:[en],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Jh},{rules:[{conditions:[tn],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Jh},{endpoint:{[LA]:pNe,[OA]:Kh,[FA]:Kh},type:st}],type:sa}],type:sa},{rules:[{conditions:[{[Qt]:lNe,[_t]:fNe}],rules:[{conditions:[{[Qt]:"aws.partition",[_t]:fNe,assign:oa}],rules:[{conditions:[WQ,bn,Sn],endpoint:vl,type:st},{conditions:[WQ,bn,tn],endpoint:Id,type:st},{conditions:[WQ,en,Sn],endpoint:Dl,type:st},{conditions:[WQ,en,tn],endpoint:wd,type:st},{conditions:[JQ,bn,Sn],endpoint:vl,type:st},{conditions:[JQ,bn,tn],endpoint:Id,type:st},{conditions:[JQ,e
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}functiongy(t){WA("debug",{},t)}function_ee(t,e={}){WA("warning",P4(e),tinstanceofError?t.toString():t)}functionUc(t){process.stdout.write(t+Pee.EOL)}functionRHe(t){uD("group",t)}functionNHe(){uD("endgroup")}functionWO(t,e){returnBHe(this,void0,void0,function*(){RHe(t);letr;try{r=yielde()}finally{NHe()}returnr})}functionJO(t,e){if(process.env.GITHUB_STATE||"")returnD4("STATE",k4(t,e));WA("save-state",{name:t},Ul(e))}varDee=b(require("os"),1);functionuu(t){returnt==null?"":typeoft=="string"||tinstanceofString?t:JSON.stringify(t)}functionKO(t){returnObject.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}functionjm(t,e,r){letn=newXO(t,e,r);process.stdout.write(n.toString()+Dee.EOL)}functionZO(t,e=""){jm(t,{},e)}varvee="::",XO=class{constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){lete=vee+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";letr=!0;for(letninthis.properties)if(this.properties.hasOwnProperty(n)){lets=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${PHe(s)}`)}}returne+=`${vee}${THe(this.message)}`,e}};functionTHe(t){returnuu(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}functionPHe(t){returnuu(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}varkee=b(require("crypto"),1),Ub=b(require("fs"),1),Fb=b(require("os"),1);functionLee(t,e){letr=process.env[`GITHUB_${t}`];if(!r)thrownewError(`Unable to find environment variable for file command ${t}`);if(!Ub.existsSync(r))thrownewError(`Missing file at path: ${r}`);Ub.appendFileSync(r,`${uu(e)}${Fb.EOL}`,{encoding:"utf8"})}functionOee(t,e){letr=`ghadelimiter_${kee.randomUUID()}`,n=uu(e);if(t.includes(r))thrownewError(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))thrownewError(`Unexpected input: value should not contain the delimiter "${r}"`);return`${t}<<${r}${Fb.EOL}${n}${Fb.EOL}${r}`}varMee=b(require("os"),1);varUee=require("os"),wy=require("fs"),eF=function(t,e,r,n){functions(o){returnoinstanceofr?o:newr(function(i){i(o)})}returnnew(r||(r=Promise))(function(o,i){functiona(u){try{l(n.next(u))}catch(d){i(d)}}functionc(u){try{l(n.throw(u))}catch(d){i(d)}}functionl(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},{access:QHe,appendFile:_He,writeFile:vHe}=wy.promises,Fee="GITHUB_STEP_SUMMARY";vartF=class{constructor(){this._buffer=""}filePath(){returneF(this,void0,void0,function*(){if(this._filePath)returnthis._filePath;lete=process.env[Fee];if(!e)thrownewError(`Unable to find environment variable for $${Fee}. Check if your runtime environment supports job summaries.`);try{yieldQHe(e,wy.constants.R_OK|wy.constants.W_OK)}catch{thrownewError(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}returnthis._filePath=e,this._filePath})}wrap(e,r,n={}){lets=Object.entries(n).map(([o,i])=>`${o}="${i}"`).join("");returnr?`<${e}${s}>${r}</${e}>`:`<${e}${s}>`}write(e){returneF(this,void0,void0,function*(){letr=!!e?.overwrite,n=yieldthis.filePath();returnyield(r?vHe:_He)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){returneF(this,void0,void0,function*(){returnthis.emptyBuffer().write({overwrite:!0})})}stringify(){returnthis._buffer}isEmptyBuffer(){returnthis._buffer.length===0}emptyBuffer(){returnthis._buffer="",this}addRaw(e,r=!1){returnthis._buffer+=e,r?this.addEOL():this}addEOL(){returnthis.addRaw(Uee.EOL)}addCodeBlock(e,r){letn=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);returnthis.addRaw(s).addEOL()}addList(e,r=!1){letn=r?"ol":"ul",s=e.map(i=>this.wrap("li",i)).join(""),o=this.wrap(n,s);returnthis.addRaw(o).addEOL()}addTable(e){letr=e.map(s=>{leto=s.map(i=>{if(typeofi=="string")returnthis.wrap("td",i);let{header:a,data:c,colspan:l,
`).map(o=>o.trim());for(let o of s)!o||o.startsWith("#")||n.patterns.push(new $y(o));return n.searchPaths.push(...qF(n.patterns)),n})}static stat(e,r,n){return YF(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield tf.promises.stat(e.path)}catch(o){if(o.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Uo(`Brokensymlink'${e.path}'`);return}throw new Error(`Noinformationfoundforthepath'${e.path}'.Thismayindicateabrokensymboliclink.`)}throw o}else s=yield tf.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let o=yield tf.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(i=>i===o)){Uo(`Symlinkcycledetectedforpath'${e.path}'andrealpath'${o}'`);return}n.push(o)}return s})}};var vYe=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function Rne(t,e){return vYe(this,void 0,void 0,function*(){return yield sS.create(t,e)})}var CS=b(require("crypto"),1),sf=b(require("fs"),1),pp=b(require("path"),1),yoe=b(hoe(),1),Eoe=b(require("util"),1);var Jy;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Jy||(Jy={}));var as;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(as||(as={}));var oo;(function(t){t.GNU="gnu",t.BSD="bsd"})(oo||(oo={}));var yS=2,ES=5e3,AU=5e3,mU=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,goe=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,Ky="cache.tar",fU="manifest.txt",vUt=10*Math.pow(1024,3);var nf=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},PJe=function(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 __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(i){return new Promise(function(a,c){i=t[o](i),s(a,c,i.done,i.value)})}}function s(o,i,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},i)}},QJe="1.0";function Xy(){return nf(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=pp.join(n,"actions","temp")}let r=pp.join(e,CS.randomUUID());return yield tp(r),r})}function xa(t){return sf.statSync(t).size}function hU(t){return nf(this,void 0,void 0,function*(){var e,r,n,s,o;let i=[],a=(o=process.env.GITHUB_WORKSPACE)!==null&&o!==void 0?o:process.cwd(),c=yield Rne(t.join(`
`),{implicitDescendants:!1});try{for(var l=!0,u=PJe(c.globGenerator()),d;d=yield u.next(),e=d.done,!e;l=!0){s=d.value,l=!1;let A=pp.relative(a,s).replace(new RegExp(`\\${pp.sep}`,"g"),"/");j(`Matched:${A}`),A===""?i.push("."):i.push(`${A}`)}}catch(p){r={error:p}}finally{try{!l&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(r)throw r.error}}return i})}function Zy(t){return nf(this,void 0,void 0,function*(){return Eoe.promisify(sf.unlink)(t)})}function Coe(t){return nf(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),j(`Checking${e}${r.join(" ")}`);try{yield cu(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:s=>n+=s.toString(),stderr:s=>n+=s.toString()}})}catch(s){j(s.message)}return n=n.trim(),j(n),n})}function eE(){return nf(this,void 0,void 0,function*(){let t=yield Coe("zstd",["--quiet"]),e=yoe.clean(t);return j(`zstdversion:${e}`),t===""?as.Gzip:as.ZstdWithoutLong})}function yu(t){return t===as.Gzip?Jy.Gzip:Jy.Zstd}function Ioe(){return nf(this,void 0,void 0,function*(){return sf.existsSync(mU)?mU:(yield Coe("tar")).toLowerCase().includes("gnu tar")?Ts("tar"):""})}function gU(t,e){if(e===void 0)throw Error(`Expected${t}butvaluewasundefiend`);return e}function of(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(QJe),CS.createHash("sha256").update(n.join("|")).digest("hex")}function woe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}var Lf=b(require("fs"),1),Wue=require("url");var ba=class extends Error{constructor(e){super(e),this.name="AbortError"}};var xoe=require("node:os"),boe=b(require("node:util"),1),Soe=b(require("node:process"),1);function Boe(t,...e){Soe.default.stderr.write(`${boe.default.format(t,...e)}${xoe.EOL}`)}var Roe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Toe,yU=[],EU=[],wS=[];Roe&&CU(Roe);var Poe=Object.assign(t=>Qoe(t),{enable:CU,enabled:IU,disable:_Je,log:Boe});function CU(t){Toe=t,yU=[],EU=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?EU.push(r.substring(1)):yU.push(r);for(let r of wS)r.enabled=IU(r.namespace)}function IU(t){if(t.endsWith("*"))return!0;for(let e of EU)if(Noe(t,e))return!1;for(let e of yU)if(Noe(t,e))return!0;return!1}function Noe(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let p=[],A="";for(let f of e)f==="*"&&A==="*"||(A=f,p.push(f));r=p.join("")}let n=0,s=0,o=r.length,i=t.length,a=-1,c=-1;for(;n<i&&s<o;)if(r[s]==="*"){if(a=s,s++,s===o)return!0;for(;t[n]!==r[s];)if(n++,n===i)return!1;c=n,n++,s++;continue}else if(r[s]===t[n])s++,n++;else if(a>=0){if(s=a+1,n=c+1,n===i)return!1;for(;t[n]!==r[s];)if(n++,n===i)return!1;c=n,n++,s++;continue}else return!1;let l=n===t.length,u=s===r.length,d=s===r.length-1&&r[s]==="*";return l&&(u||d)}function _Je(){let t=Toe||"";return CU(""),t}function Qoe(t){let e=Object.assign(r,{enabled:IU(t),destroy:vJe,log:Poe.log,namespace:t,extend:DJe});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t}${n[0]}`),e.log(...n))}return wS.push(e),e}function vJe(){let t=wS.indexOf(this);return t>=0?(wS.splice(t,1),!0):!1}function DJe(t){let e=Qoe(`${this.namespace}:${t}`);return e.log=this.log,e}var af=Poe;var wU=["verbose","info","warning","error"],_oe={verbose:400,info:300,warning:200,error:100};function voe(t,e){e.log=(...r)=>{t.log(...r)}}function Doe(t){return wU.includes(t)}function xS(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,n,s=af(t.namespace);s.log=(...u)=>{af.log(...u)};function o(u){if(u&&!Doe(u))throw new Error(`Unknownloglevel'${u}'.Acceptablevalues:${wU.join(",")}`);n=u;let d=[];for(let p of e)i(p)&&d.push(p.namespace);af.enable(d.join(","))}r&&(Doe(r)?o(r):console.error(`${t.logLevelEnvVarName}settounknownloglevel'${r}';loggingisnotenabled.Acceptablevalues:${wU.join(", ")}.`));function i(u){return!!(n&&_oe[u.level]<=_oe[n])}function a(u,d){let p=Object.assign(u.extend(d),{level:d});if(voe(u,p),i(p)){let A=af.disable();af.enab
${UJe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};functionRS(t){returntinstanceofcs?!0:mp(t)&&t.name==="RestError"}function_s(t,e){returnBuffer.from(t,e)}varNS=b(require("node:http"),1),TS=b(require("node:https"),1),RU=b(require("node:zlib"),1),Moe=require("node:stream");varqo=tE("ts-http-runtime");varMJe={};functionrE(t){returnt&&typeoft.pipe=="function"}functionUoe(t){returnt.readable===!1?Promise.resolve():newPromise(e=>{letr=()=>{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$oe(t){returnt&&typeoft.byteLength=="number"}varPS=classextendsMoe.Transform{loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},NU=class{cachedHttpAgent;cachedHttpsAgents=newWeakMap;asyncsendRequest(e){letr=newAbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)thrownewba("The operation was aborted. Request has already been canceled.");n=l=>{l.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",n)}lets;e.timeout>0&&(s=setTimeout(()=>{letl=newOi;qo.info(`request to '${l.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));leto=e.headers.get("Accept-Encoding"),i=o?.includes("gzip")||o?.includes("deflate"),a=typeofe.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){letl=HJe(a);l!==null&&e.headers.set("Content-Length",l)}letc;try{if(a&&e.onUploadProgress){letf=e.onUploadProgress,y=newPS(f);y.on("error",w=>{qo.error("Error in upload progress",w)}),rE(a)?a.pipe(y):y.end(a),a=y}letl=awaitthis.makeRequest(e,r,a);s!==void0&&clearTimeout(s);letu=$Je(l),p={status:l.statusCode??0,headers:u,request:e};if(e.method==="HEAD")returnl.resume(),p;c=i?qJe(l,u):l;letA=e.onDownloadProgress;if(A){letf=newPS(A);f.on("error",y=>{qo.error("Error in download progress",y)}),c.pipe(f),c=f}returne.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(p.status)?p.readableStreamBody=c:p.bodyAsText=awaitGJe(c),p}finally{if(e.abortSignal&&n){letl=Promise.resolve();rE(a)&&(l=Uoe(a));letu=Promise.resolve();rE(c)&&(u=Uoe(c)),Promise.all([l,u]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(d=>{qo.warning("Error when cleaning up abortListener on httpRequest",d)})}}}makeRequest(e,r,n){lets=newURL(e.url),o=s.protocol!=="https:";if(o&&!e.allowInsecureConnection)thrownewError(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);leta={agent:e.agent??this.getOrCreateAgent(e,o),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};returnnewPromise((c,l)=>{letu=o?NS.default.request(a,c):TS.default.request(a,c);u.once("error",d=>{l(newcs(d.message,{code:d.code??cs.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{letd=newba("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(d),l(d)}),n&&rE(n)?n.pipe(u):n?typeofn=="string"||Buffer.isBuffer(n)?u.end(n):$oe(n)?u.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(qo.error("Unrecognized body type",n),l(newcs("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){letn=e.disableKeepAlive;if(r)returnn?NS.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=newNS.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)returnTS.default.globalAgent;lets=e.tlsSettings??MJe,o=this.cachedHttpsAgents.get(s);returno&&o.options.keepAlive===!n||(qo.info("No cached TLS Agent exist, creating a new Agent"),o=newTS.default.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,o)),o}}};function$Je(t){lete=io();for(letrofObject.keys(t.headers)){letn=t.headers[r];Array.isArray(n)?n.length>0&&e.set(
`;return e}function I4e(t){return t instanceof Uint8Array?t.byteLength:ZS(t)?t.size===-1?void 0:t.size:void 0}function w4e(t){let e=0;for(let r of t){let n=I4e(r);if(n===void 0)return;e+=n}return e}async function x4e(t,e,r){let n=[_s(`--${r}`,"utf-8"),...e.flatMap(o=>[_s(`\r
`,"utf-8")],s=w4e(n);s&&t.headers.set("Content-Length",s),t.body=await zie(n)}var oE="multipartPolicy",b4e=70,S4e=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function B4e(t){if(t.length>b4e)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!S4e.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}function tB(){return{name:oE,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,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Gotmultipartrequestbody,butcontent-typeheaderwasnotmultipart:${n}`);let[,o,i]=s;if(i&&r&&i!==r)throw new Error(`Multipartboundarywasspecifiedas${i}intheheader,butgot${r}intherequestbody`);return r??=i,r?B4e(r):r=E4e(),t.headers.set("Content-Type",`${o};boundary=${r}`),await x4e(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function rB(){return BS()}var Vie=xS({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),hqt=Vie.logger;function Ra(t){return Vie.createClientLogger(t)}var Na=Ra("core-rest-pipeline");function VU(t={}){return _S({logger:Na.info,...t})}var YU=vS;function jU(t={}){return DS(t)}var nB=b(require("node:os"),1),sB=b(require("node:process"),1);function Yie(){return"User-Agent"}async function jie(t){if(sB.default&&sB.default.versions){let e=`${nB.default.type()}${nB.default.release()};${nB.default.arch()}`,r=sB.default.versions;r.bun?t.set("Bun",`${r.bun}(${e})`):r.deno?t.set("Deno",`${r.deno}(${e})`):r.node&&t.set("Node",`${r.node}(${e})`)}}var oB="1.22.2";function D4e(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}function Wie(){return Yie()}async function iB(t){let e=new Map;e.set("core-rest-pipeline",oB),await jie(e);let r=D4e(e);return t?`${t}${r}`:r}var Jie=Wie(),Kie="userAgentPolicy";function WU(t={}){let e=iB(t.userAgentPrefix);return{name:Kie,async sendRequest(r,n){return r.headers.has(Jie)||r.headers.set(Jie,await e),n(r)}}}var uo=class extends Error{constructor(e){super(e),this.name="AbortError"}};function JU(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((o,i)=>{function a(){i(new uo(s??"The operation was aborted."))}function c(){n?.removeEventListener("abort",l)}function l(){r?.(),c(),a()}if(n?.aborted)return a();try{t(u=>{c(),o(u)},u=>{c(),i(u)})}catch(u){i(u)}n?.addEventListener("abort",l)})}var U4e="The delay was aborted.";function iE(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return JU(o=>{r=setTimeout(o,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:n,abortErrorMsg:s??U4e})}function Cu(t){if(mp(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`Unknownerror${e}`}}function Xie(t){return mp(t)}function mf(){return Ap()}var Ct=gp;var Zie=Symbol("rawContent");function XU(t){return typeof t[Zie]=="function"}function eae(t){return XU(t)?t[Zie]():t}var aB=oE;function ZU(){let t=tB();return{name:aB,sendRequest:async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)XU(n.body)&&(n.body=eae(n.body));return t.sendRequest(e,r)}}}var eM=kS;function tM(){return LS()}function rM(t={}){return US(t)}function nM(){return MS()}function Iu(t){return $U(t)}function sM(t,e){return JS(t,e)}var tae="setClientRequestIdPolicy";function oM(t="x-ms-client-request-id"){return{name:tae,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function iM(t){return KS(t)}function aM(t){return XS(t)}var ff={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function rae(t={}){let e=new cM(t.parentContext);return t.span&&(e=e.setValue(ff.span,t.span)),t.namespace&&(e=e.setValue(ff.namespace,t.namespace)),e}var cM=class t{_contextMap;constructor(e){this._contextMap=e instanceof t
`&&t[o]!=="\r";o++)c+=t[o];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),o--),!l8e(c)){letd;returnc.trim().length===0?d="Invalid space after '<'.":d="Tag '"+c+"' is an invalid name.",Br("InvalidTag",d,ls(t,o))}letl=s8e(t,o);if(l===!1)returnBr("InvalidAttr","Attributes for '"+c+"' have open quote.",ls(t,o));letu=l.value;if(o=l.index,u[u.length-1]==="/"){letd=o-u.length;u=u.substring(0,u.length-1);letp=Uae(u,e);if(p===!0)n=!0;elsereturnBr(p.err.code,p.err.msg,ls(t,d+p.err.line))}elseif(a)if(l.tagClosed){if(u.trim().length>0)returnBr("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",ls(t,i));if(r.length===0)returnBr("InvalidTag","Closing tag '"+c+"' has not been opened.",ls(t,i));{letd=r.pop();if(c!==d.tagName){letp=ls(t,d.tagStartPos);returnBr("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+c+"'.",ls(t,i))}r.length==0&&(s=!0)}}elsereturnBr("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",ls(t,o));else{letd=Uae(u,e);if(d!==!0)returnBr(d.err.code,d.err.msg,ls(t,o-u.length+d.err.line));if(s===!0)returnBr("InvalidXml","Multiple possible root nodes found.",ls(t,o));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:i}),n=!0}for(o++;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="!"){o++,o=Fae(t,o);continue}elseif(t[o+1]==="?"){if(o=Oae(t,++o),o.err)returno}elsebreak;elseif(t[o]==="&"){letd=a8e(t,o);if(d==-1)returnBr("InvalidChar","char '&' is not expected.",ls(t,o));o=d}elseif(s===!0&&!Lae(t[o]))returnBr("InvalidXml","Extra text at the end",ls(t,o));t[o]==="<"&&o--}}else{if(Lae(t[o]))continue;returnBr("InvalidChar","char '"+t[o]+"' is not expected.",ls(t,o))}if(n){if(r.length==1)returnBr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",ls(t,r[0].tagStartPos));if(r.length>0)returnBr("InvalidXml","Invalid '"+JSON.stringify(r.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}elsereturnBr("InvalidXml","Start tag expected.",1);return!0}functionLae(t){returnt===" "||t===" "||t===`
`||t==="\r"}functionOae(t,e){letr=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){letn=t.substr(r,e-r);if(e>5&&n==="xml")returnBr("InvalidXml","XML declaration allowed only at the start of the document.",ls(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}elsecontinue}returne}functionFae(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}elseif(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){letr=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;elseif(t[e]===">"&&(r--,r===0))break}elseif(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}returne}varr8e='"',n8e="'";functions8e(t,e){letr="",n="",s=!1;for(;e<t.length;e++){if(t[e]===r8e||t[e]===n8e)n===""?n=t[e]:n!==t[e]||(n="");elseif(t[e]===">"&&n===""){s=!0;break}r+=t[e]}returnn!==""?!1:{value:r,index:e,tagClosed:s}}varo8e=newRegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");functionUae(t,e){letr=yB(t,o8e),n={};for(lets=0;s<r.length;s++){if(r[s][1].length===0)returnBr("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",yE(r[s]));if(r[s][3]!==void0&&r[s][4]===void0)returnBr("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",yE(r[s]));if(r[s][3]===void0&&!e.allowBooleanAttributes)returnBr("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",yE(r[s]));leto=r[s][2];if(!c8e(o))returnBr("InvalidAttr","Attribute '"+o+"' is an invalid name.",yE(r[s]));if(!Object.prototype.hasOwnProperty.call(n,o))n[o]=1;elsereturnBr("InvalidAttr","Attribute '"+o+"' is repeated.",yE(r[s]))}return!0}functioni8e(t,e){letr=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")returne;if(!t[e].match(r))break}return-1}functiona8e(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")returne++,i8e(t,e);letr=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}returne}functionBr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}functionc8e(t){returnBM(t)}functionl8e(t){returnBM(t)}functionls(t,e){letr=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}functionyE(t){returnt.startIndex+t[1].length}varMae={amp:"&",AMP:"&",lt:"<",LT:"<",gt:">",GT:">",quot:'"',QUOT:'"',apos:"'",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",lsquor:"\u201A",rsquor:"\u2019",ldquor:"\u201E",bdquo:"\u201E",comma:",",period:".",colon:":",semi:";",excl:"!",quest:"?",num:"#",dollar:"$",percent:"%",amp:"&",ast:"*",commat:"@",lowbar:"_",verbar:"|",vert:"|",sol:"/",bsol:"\\",lbrace:"{",rbrace:"}",lbrack:"[",rbrack:"]",lpar:"(",rpar:")",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",COPY:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",REG:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",half:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",div:"\xF7",divide:"\xF7"},$ae={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntilde:"\xF1",Ograve:"\xD2",ograve:"\xF2",Oacute:"\xD3",oacute:"\xF3",Ocirc:"\xD4",ocirc:"\xF4",Otilde:"\xD5",otilde:"\xF5",Ouml:"\xD6",ouml:"\xF6",Oslash:"\xD8",oslash:"\xF8",Ugrave:"\xD9",ugrave:"\xF9",Uacute:"\xDA",uacute:"\xFA",Ucirc:"\xDB",ucirc:"\xFB",Uuml:"\xDC",uuml:"\xFC",Yacute:"\xDD",yacute:"\xFD",THORN:"\xDE",tho
`);let e=new Ls("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=this.options,o=new IE(s.processEntities),i=t.length;for(let a=0;a<i;a++)if(t[a]==="<"){let l=t.charCodeAt(a+1);if(l===47){let u=Cf(t,">",a,"Closing Tag is not closed."),d=t.substring(a+2,u).trim();if(s.removeNSPrefix){let A=d.indexOf(":");A!==-1&&(d=d.substr(A+1))}d=DM(s.transformTagName,d,"",s).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let p=this.matcher.getCurrentTag();if(d&&s.unpairedTagsSet.has(d))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${d}>`);p&&s.unpairedTagsSet.has(p)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",a=u}else if(l===63){let u=kM(t,a,!1,"?>");if(!u)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let d=this.buildAttributesMap(u.tagExp,this.matcher,u.tagName,!0);if(d){let p=d[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(p)||1),o.setXmlVersion(Number(p)||1)}if(!(s.ignoreDeclaration&&u.tagName==="?xml"||s.ignorePiTags)){let p=new Ls(u.tagName);p.add(s.textNodeName,""),u.tagName!==u.tagExp&&u.attrExpPresent&&s.ignoreAttributes!==!0&&(p[":@"]=d),this.addChild(r,p,this.readonlyMatcher,a)}a=u.closeIndex+1}else if(l===33&&t.charCodeAt(a+2)===45&&t.charCodeAt(a+3)===45){let u=Cf(t,"-->",a+4,"Comment is not closed.");if(s.commentPropName){let d=t.substring(a+4,u-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(s.commentPropName,[{[s.textNodeName]:d}])}a=u}else if(l===33&&t.charCodeAt(a+2)===68){let u=o.readDocType(t,a);this.entityDecoder.addInputEntities(u.entities),a=u.i}else if(l===33&&t.charCodeAt(a+2)===91){let u=Cf(t,"]]>",a,"CDATA is not closed.")-2,d=t.substring(a+9,u);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let p=this.parseTextData(d,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);p==null&&(p=""),s.cdataPropName?r.add(s.cdataPropName,[{[s.textNodeName]:d}]):r.add(s.textNodeName,p),a=u+2}else{let u=kM(t,a,s.removeNSPrefix);if(!u){let U=t.substring(Math.max(0,a-50),Math.min(i,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${U}"`)}let d=u.tagName,p=u.rawTagName,A=u.tagExp,f=u.attrExpPresent,y=u.closeIndex;if({tagName:d,tagExp:A}=DM(s.transformTagName,d,A,s),s.strictReservedNames&&(d===s.commentPropName||d===s.cdataPropName||d===s.textNodeName||d===s.attributesGroupName))throw new Error(`Invalid tag name: ${d}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let w=r;w&&s.unpairedTagsSet.has(w.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let x=!1;A.length>0&&A.lastIndexOf("/")===A.length-1&&(x=!0,d[d.length-1]==="/"?(d=d.substr(0,d.length-1),A=d):A=A.substr(0,A.length-1),f=d!==A);let I=null,T={},v;v=_8e(p),d!==e.tagname&&this.matcher.push(d,{},v),d!==A&&f&&(I=this.buildAttributesMap(A,this.matcher,d),I&&(T=Q8e(I,s))),d!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let L=a;if(this.isCurrentNodeStopNode){let U="";if(x)a=u.closeIndex;else if(s.unpairedTagsSet.has(d))a=u.closeIndex;else{let z=this.readStopNodeData(t,p,y+1);if(!z)throw new Error(`Unexpected end of ${p}`);a=z.i,U=z.tagContent}let V=new Ls(d);I&&(V[":@"]=I),V.add(s.textNodeName,U),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,V,this.readonlyMatcher,L)}else{if(x){({tagName:d,tagExp:A}=DM(s.transformTagName,d,A,s));let U=new Ls(d);I&&(U[":@"]=I),this.addChild(r,U,this.readonlyMatcher,L),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(s.unpairedTagsSet.has(d)){let U=new Ls(d);I&&(U[":@"]=I),this.addChild(r,U,this.readonlyMatcher,L),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=u.closeIndex;continue}else{let U=new Ls(d);if(this.tagsNodeStack.length>s.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),I&&(U[":@"]=I),this.addChild(r,U,this.readonlyMatcher,L),r=U}n="",a=y}}}else n+=t[a];return e.child};function F
${a}:${decodeURIComponent(o[a])}`}returnn}};varfr=classextendsBp{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){returnnewBE(e,r,this)}computeHMACSHA256(e){return(0,yce.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};varGr=Ra("storage-common");varVo;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Vo||(Vo={}));varBu={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Vo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void0},d9e=newuo("The operation was aborted."),RE=classextends_a{retryOptions;constructor(e,r,n=Bu){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Bu.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Bu.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Bu.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Bu.maxRetryDelayInMs):Bu.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Bu.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Bu.secondaryHost}}asyncsendRequest(e){returnthis.attemptSendRequest(e,!1,1)}asyncattemptSendRequest(e,r,n){lets=e.clone(),o=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;o||(s.url=_B(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=Su(s.url,Vc.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));leti;try{if(Gr.info(`RetryPolicy: =====> Try=${n}${o?"Primary":"Secondary"}`),i=awaitthis._nextPolicy.sendRequest(s),!this.shouldRetry(o,n,i))returni;r=r||!o&&i.status===404}catch(a){if(Gr.error(`RetryPolicy: Caught error, message: ${a.message}, code: ${a.code}`),!this.shouldRetry(o,n,i,a))throwa}returnawaitthis.delay(o,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)returnGr.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;leto=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(s){for(letiofo)if(s.name.toUpperCase().includes(i)||s.message.toUpperCase().includes(i)||s.code&&s.code.toString().toUpperCase()===i)returnGr.info(`RetryPolicy: Network error ${i} found, will retry.`),!0}if(n||s){leti=n?n.status:s?s.statusCode:0;if(!e&&i===404)returnGr.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(i===503||i===500)returnGr.info(`RetryPolicy: Will retry for status code ${i}.`),!0}if(n&&n?.status>=400){leti=n.headers.get(Qe.X_MS_CopySourceErrorCode);if(i!==void0)switch(i){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}returns?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(Gr.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}asyncdelay(e,r,n){lets=0;if(e)switch(this.retryOptions.retryPolicyType){caseVo.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;caseVo.FIXED:s=this.retryOptions.retryDelayInMs;break}elses=Math.random()*1e3;returnGr.info(`RetryPolicy: Delay for ${s}ms`),kB(s,n,d9e)}};varNE=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){returnnewRE(e,r,this.retryOptions)}};varp9e="storageBrowserPolicy";functionEce(){return{name:p9e,asyncsendRequest(t,e){returnCt||((t.method==="GET"||t.method==="HEAD")&&(t.url=Su(t.url,Vc.Parameters.FORCE_BROWSER_NO_CACHE,newDate().getTime().toString())),t.headers.delete(Qe.COOKIE),t.headers.delete(Qe.CONTENT_LENGTH)),e(t)}}}varA9e="StorageCorrectContentLengthPolicy";functionCce(){functiont(e){e.body&&(typeofe.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Qe.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:A9e,asyncsend
`}),a}function s(o){let i=vB(o.url)||"/",a="";a+=`/${t.accountName}${i}`;let c=DB(o.url),l={};if(c){let u=[];for(let d in c)if(Object.prototype.hasOwnProperty.call(c,d)){let p=d.toLowerCase();l[p]=c[d],u.push(p)}u.sort();for(let d of u)a+=`
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:newGi(t.version,o,n,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}functionw6e(t,e){if(t=kp(t),!t.identifier&&!(t.permissions&&t.expiresOn))thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Wa.parse(t.permissions.toString()).toString():s=Ja.parse(t.permissions.toString()).toString());leto=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Dp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?qi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:newGi(t.version,i,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:o}}functionx6e(t,e){if(t=kp(t),!t.identifier&&!(t.permissions&&t.expiresOn))thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Wa.parse(t.permissions.toString()).toString():s=Ja.parse(t.permissions.toString()).toString());leto=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Dp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?qi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:newGi(t.version,i,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void0,void0,void0,t.encryptionScope),stringToSign:o}}functionb6e(t,e){if(t=kp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Wa.parse(t.permissions.toString()).toString():s=Ja.parse(t.permissions.toString()).toString());leto=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Dp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?It(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?It(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?qi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:newGi(t.version,i,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:o}}functionS6e(t,e){if(t=kp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Wa.parse(t.permissions.toString()).toString():s=Ja.parse(t.permissions.toString()).toString());leto=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Dp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?It(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?It(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,t.ipRange?qi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:newGi(t.version,i,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:o}}functionB6e(t,e){if(t=kp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Wa.parse(t.permissions.toString()).toString():s=Ja.parse(t.permissions.toString()).toString());leto=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Dp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?It(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?It(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,t.ipRange?qi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:newGi(t.version,i,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:o}}functionR6e(t,e){if(t=kp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Wa.parse(t.permissions.toString()).toString():s=Ja.parse(t.permissions.toString()).toString());leto=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Dp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?It(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?It(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,void0,t.delegatedUserObjectId,t.ipRange?qi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:newGi(t.version,i,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:o}}functionDp(t,e,r){letn=[`/blob/${t}/${e}`];returnr&&n.push(`/${r}`),n.join("")}functionkp(t){lete=t.version?t.version:UB;if(t.snapshotTime&&e<"2018-11-09")throwRangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void0&&t.snapshotTime)throwRangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void0&&t.versionId)throwRangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throwRangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throwRangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throwRangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throwRangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throwRangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throwRangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");returnt.version=e,t}var$E=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;getleaseId(){returnthis._leaseId}geturl(){returnthis._url}constructor(e,r){letn=e.storageClientContext;this._url=e.url,e.name===void0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=mf()),this._leaseId=r}asyncacquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Fi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Fi||r.conditions?.tagConditions))thrownewRangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");returnde.withSpan("BlobLeaseClient-acquireLease",r,asyncn=>Ie(awaitthis._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}asyncchangeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Fi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Fi||r.conditions?.tagConditions))thrownewRangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");returnde.withSpan("BlobLeaseClient-changeLease",r,asyncn=>{lets=Ie(awaitthis._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));returnthis._leaseId=e,s})}asyncreleaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Fi||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Fi||e.conditions?.tagConditions))thrownewRangeError("The IfMatch,
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"}};Df.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Up=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. 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"}};Up.isUsageErrorMessage=t=>t?t.includes("insufficientusage"):!1;var KE=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var bXe=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},OG=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);kr(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function kue(t,e,r){return bXe(this,void 0,void 0,function*(){var n;let s=new tl(t),o=s.getBlockBlobClient(),i=new OG((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:i.onProgress()};try{i.startDisplayTimer(),j(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let c=yield o.uploadFile(e,a);if(c._response.status>=400)throw new HR(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw Di(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{i.stopDisplayTimer()}})}var Oue=b(require("buffer"),1),Ka=b(require("fs"),1),Fue=b(require("stream"),1),Uue=b(require("util"),1);var zR=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function VR(t){return t?t>=200&&t<300:!1}function SXe(t){return t?t>=500:!0}function BXe(t){return t?[mr.BadGateway,mr.ServiceUnavailable,mr.GatewayTimeout].includes(t):!1}function RXe(t){return zR(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function Lue(t,e,r){return zR(this,arguments,void 0,function*(n,s,o,i=yS,a=ES,c=void 0){let l="",u=1;for(;u<=i;){let d,p,A=!1;try{d=yield s()}catch(f){c&&(d=c(f)),A=!0,l=f.message}if(d&&(p=o(d),!SXe(p)))return d;if(p&&(A=BXe(p),l=`Cache service responded with ${p}`),j(`${n} - Attempt ${u} of ${i} failed with error: ${l}`),!A){j(`${n} - Error is not retryable`);break}yield RXe(a),u++}throw Error(`${n} failed: ${l}`)})}function XE(t,e){return zR(this,arguments,void 0,function*(r,n,s=yS,o=ES){return yield Lue(r,n,i=>i.statusCode,s,o,i=>{if(i instanceof Ea)return{statusCode:i.statusCode,result:null,headers:{},error:i}})})}function kf(t,e){return zR(this,arguments,void 0,function*(r,n,s=yS,o=ES){return yield Lue(r,n,i=>i.message.statusCode,s,o)})}var Ko=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function NXe(t,e){return Ko(this,void 0,void 0,function*(){yield Uue.promisify(Fue.pipeline)(t.message,e)})}var YR=class{constructor(e){this.contentLength=e,this.segmentIndex=0,this.
Other caches with similar key:`);for(let a of o?.artifactCaches||[])j(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function $G(t,e,r){return Ms(this,void 0,void 0,function*(){let n=new Wue.URL(t),s=Gue(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield $ue(t,e,s):s.concurrentBlobDownloads?yield Mue(t,e,s):yield jR(t,e):yield jR(t,e)})}function Kue(t,e,r){return Ms(this,void 0,void 0,function*(){let n=MG(),s=of(e,r?.compressionMethod,r?.enableCrossOsArchive),o={key:t,version:s,cacheSize:r?.cacheSize};return yield XE("reserveCache",()=>Ms(this,void 0,void 0,function*(){return n.postJson(eC("caches"),o)}))})}function jue(t,e){return`bytes ${t}-${e}/*`}function LXe(t,e,r,n,s){return Ms(this,void 0,void 0,function*(){j(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${jue(n,s)}`);let o={"Content-Type":"application/octet-stream","Content-Range":jue(n,s)},i=yield kf(`uploadChunk (start: ${n}, end: ${s})`,()=>Ms(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),o)}));if(!VR(i.message.statusCode))throw new Error(`Cache service responded with ${i.message.statusCode} during upload chunk.`)})}function OXe(t,e,r,n){return Ms(this,void 0,void 0,function*(){let s=xa(r),o=eC(`caches/${e.toString()}`),i=Lf.openSync(r,"r"),a=FG(n),c=gU("uploadConcurrency",a.uploadConcurrency),l=gU("uploadChunkSize",a.uploadChunkSize),u=[...new Array(c).keys()];j("Awaitingalluploads");let d=0;try{yield Promise.all(u.map(()=>Ms(this,void 0,void 0,function*(){for(;d<s;){let p=Math.min(s-d,l),A=d,f=d+p-1;d+=l,yield LXe(t,o,()=>Lf.createReadStream(r,{fd:i,start:A,end:f,autoClose:!1}).on("error",y=>{throw new Error(`Cache upload failed because file read failed with ${y.message}`)}),A,f)}})))}finally{Lf.closeSync(i)}})}function FXe(t,e,r){return Ms(this,void 0,void 0,function*(){let n={size:r};return yield XE("commitCache",()=>Ms(this,void 0,void 0,function*(){return t.postJson(eC(`caches/${e.toString()}`),n)}))})}function qG(t,e,r,n){return Ms(this,void 0,void 0,function*(){if(FG(n).useAzureSdk){if(!r)throw new Error("AzureStorageSDKcanonlybeusedwhenasignedURLisprovided.");yield kue(r,e,n)}else{let o=MG();j("Uploadcache"),yield OXe(o,t,e,n),j("Commitingcache");let i=xa(e);kr(`Cache Size: ~${Math.round(i/(1024*1024))} MB (${i} B)`);let a=yield FXe(o,t,i);if(!VR(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);kr("Cachesavedsuccessfully")}})}var zde=b(Fde(),1),Pr=b(Tr(),1),go=b(Tr(),1),Hp=b(Tr(),1),zp=b(Tr(),1),Vp=b(Tr(),1);var LH=b(Tr(),1),OH=b(Tr(),1),qde=b(Tr(),1),Gde=b(Tr(),1),Hde=b(Tr(),1);var vH=b(Tr(),1),DH=b(Tr(),1),Ude=b(Tr(),1),Mde=b(Tr(),1),$de=b(Tr(),1),kH=class extends $de.MessageType{constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,Mde.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Ude.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),i=e.pos+r;for(;e.pos<i;){let[a,c]=e.tag();switch(a){case 1:o.scope=e.string();break;case 2:o.permission=e.int64().toString();break;default:let l=n.readUnknownField;if(l==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);let u=e.skip(c);l!==!1&&(l===!0?DH.UnknownFieldHandler.onRead:l)(this.typeName,o,a,c,u)}}return o}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,vH.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,vH.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?DH.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},k0=new kH;var FH=class extends Hde.MessageType{constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:()=>k0}])}create(e){let r={repositoryId:"0",scope:[]
`));let n=yield ZH(r,"create");yield e2(n,t)})}var Zf=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},Vi=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Xf=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},U0=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Wde(t){if(!t||t.length===0)throw new Vi("PathValidationError:Atleastonedirectoryorfilepathisrequired")}function n2(t){if(t.length>512)throw new Vi(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Vi(`Key Validation Error: ${t} cannot contain commas.`)}function s2(){return ZE()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function Jde(t,e,r,n){return Zf(this,arguments,void 0,function*(s,o,i,a,c=!1){let l=ZE();return j(`Cache service version: ${l}`),Wde(s),l==="v2"?yield Z7e(s,o,i,a,c):yield X7e(s,o,i,a,c)})}function X7e(t,e,r,n){return Zf(this,arguments,void 0,function*(s,o,i,a,c=!1){i=i||[];let l=[o,...i];if(j("ResolvedKeys:"),j(JSON.stringify(l)),l.length>10)throw new Vi("KeyValidationError:Keysarelimitedtoamaximumof10.");for(let p of l)n2(p);let u=yield eE(),d="";try{let p=yield Jue(l,s,{compressionMethod:u,enableCrossOsArchive:c});if(!p?.archiveLocation)return;if(a?.lookupOnly)return kr("Lookuponly-skippingdownload"),p.cacheKey;d=hC.join(yield Xy(),yu(u)),j(`Archive Path: ${d}`),yield $G(p.archiveLocation,d,a),ip()&&(yield fC(d,u));let A=xa(d);return kr(`Cache Size: ~${Math.round(A/(1024*1024))} MB (${A} B)`),yield t2(d,u),kr("Cacherestoredsuccessfully"),p.cacheKey}catch(p){let A=p;if(A.name===Vi.name)throw p;A instanceof Ea&&typeof A.statusCode=="number"&&A.statusCode>=500?ky(`Failed to restore: ${p.message}`):Di(`Failed to restore: ${p.message}`)}finally{try{yield Zy(d)}catch(p){j(`Failed to delete archive: ${p}`)}}})}function Z7e(t,e,r,n){return Zf(this,arguments,void 0,function*(s,o,i,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),i=i||[];let l=[o,...i];if(j("ResolvedKeys:"),j(JSON.stringify(l)),l.length>10)throw new Vi("KeyValidationError:Keysarelimitedtoamaximumof10.");for(let d of l)n2(d);let u="";try{let d=XH(),p=yield eE(),A={key:o,restoreKeys:i,version:of(s,p,c)},f=yield d.GetCacheEntryDownloadURL(A);if(!f.ok){j(`Cache not found for version ${A.version} of keys: ${l.join(",")}`);return}if(A.key!==f.matchedKey?kr(`Cache hit for restore-key: ${f.matchedKey}`):kr(`Cache hit for: ${f.matchedKey}`),a?.lookupOnly)return kr("Lookuponly-skippingdownload"),f.matchedKey;u=hC.join(yield Xy(),yu(p)),j(`Archive path: ${u}`),j(`Starting download of archive to: ${u}`),yield $G(f.signedDownloadUrl,u,a);let w=xa(u);return kr(`Cache Size: ~${Math.round(w/(1024*1024))} MB (${w} B)`),ip()&&(yield fC(u,p)),yield t2(u,p),kr("Cacherestoredsuccessfully"),f.matchedKey}catch(d){let p=d;if(p.name===Vi.name)throw d;p instanceof Ea&&typeof p.statusCode=="number"&&p.statusCode>=500?ky(`Failed to restore: ${d.message}`):Di(`Failed to restore: ${d.message}`)}finally{try{u&&(yield Zy(u))}catch(d){j(`Failed to delete archive: ${d}`)}}})}function o2(t,e,r){return Zf(this,arguments,void 0,function*(n,s,o,i=!1){let a=ZE();return j(`Cache service version: ${a}`),Wde(n),n2(s),a==="v2"?yield tet(n,s,o,i):yield eet(n,s,o,i)})}function eet(t,e,r){return Zf(this,arguments,void 0,function*(n,s,o,i=!1){var a,c,l,u,d;let p=yield eE(),A=-1,f=yield hU(n);if(j("CachePaths:"),j(`${JSON.stringify(f)}`),f.length===0)throw new Error("PathValidationError:Path(s)specifiedintheactionforcachingdo(es)notexist,hencenocacheisbeingsaved.");let y=yield Xy(),w=hC.join(y,yu(p));j(`Archive Path: ${w}`)
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function Ptt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function bpe(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}var Spe=new Array(256),Bpe=new Array(256);for(Yp=0;Yp<256;Yp++)Spe[Yp]=npe(Yp)?1:0,Bpe[Yp]=npe(Yp);var Yp;function Qtt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Epe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Rpe(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=get(r),new Gs(e,r)}function ge(t,e){throw Rpe(t,e)}function G0(t,e){t.onWarning&&t.onWarning.call(null,Rpe(t,e))}var spe={YAML:function(e,r,n){var s,o,i;e.version!==null&&ge(e,"duplication of %YAML directive"),n.length!==1&&ge(e,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),s===null&&ge(e,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),i=parseInt(s[2],10),o!==1&&ge(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=i<2,i!==1&&i!==2&&G0(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var s,o;n.length!==2&&ge(e,"TAG directive accepts exactly two arguments"),s=n[0],o=n[1],wpe.test(s)||ge(e,"ill-formed tag handle (first argument) of the TAG directive"),Lu.call(e.tagMap,s)&&ge(e,'there is a previously declared suffix for "'+s+'" tag handle'),xpe.test(o)||ge(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ge(e,"tag prefix is malformed: "+o)}e.tagMap[s]=o}};function ku(t,e,r,n){var s,o,i,a;if(e<r){if(a=t.input.slice(e,r),n)for(s=0,o=a.length;s<o;s+=1)i=a.charCodeAt(s),i===9||32<=i&&i<=1114111||ge(t,"expected valid JSON character");else btt.test(a)&&ge(t,"the stream contains non-printable characters");t.result+=a}}function ope(t,e,r,n){var s,o,i,a;for(jr.isObject(r)||ge(t,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),i=0,a=s.length;i<a;i+=1)o=s[i],Lu.call(e,o)||(bpe(e,o,r[o]),n[o]=!0)}function nh(t,e,r,n,s,o,i,a,c){var l,u;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),l=0,u=s.length;l<u;l+=1)Array.isArray(s[l])&&ge(t,"nested arrays are not supported inside keys"),typeof s=="object"&&rpe(s[l])==="[object Object]"&&(s[l]="[object Object]");if(typeof s=="object"&&rpe(s)==="[object Object]"&&(s="[object Object]"),s=String(s),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,u=o.length;l<u;l+=1)ope(t,e,o[l],r);else ope(t,e,o,r);else!t.json&&!Lu.call(r,s)&&Lu.call(e,s)&&(t.line=i||t.line,t.lineStart=a||t.lineStart,t.position=c||t.position,ge(t,"duplicated mapping key")),bpe(e,s,o),delete r[s];return e}function g2(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ge(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Fr(t,e,r){for(var n=0,s=t.input.charCodeAt(t.position);s!==0;){for(;jp(s);)s===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),s=t.input.charCodeAt(++t.position);if(e&&s===35)do s=t.input.charCodeAt(++t.position);while(s!==10&&s!==13&&s!==0);if(nc(s))for(g2(t),s=t.input.charCodeAt(t.position),n++,t.lineIndent=0;s===32;)t.lineIndent++,s=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&G0(t,"deficient indentation"),n}function V0(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r
`,e-1))}function_tt(t,e,r){varn,s,o,i,a,c,l,u,d=t.kind,p=t.result,A;if(A=t.input.charCodeAt(t.position),Hs(A)||rh(A)||A===35||A===38||A===42||A===33||A===124||A===62||A===39||A===34||A===37||A===64||A===96||(A===63||A===45)&&(s=t.input.charCodeAt(t.position+1),Hs(s)||r&&rh(s)))return!1;for(t.kind="scalar",t.result="",o=i=t.position,a=!1;A!==0;){if(A===58){if(s=t.input.charCodeAt(t.position+1),Hs(s)||r&&rh(s))break}elseif(A===35){if(n=t.input.charCodeAt(t.position-1),Hs(n))break}else{if(t.position===t.lineStart&&V0(t)||r&&rh(A))break;if(nc(A))if(c=t.line,l=t.lineStart,u=t.lineIndent,Fr(t,!1,-1),t.lineIndent>=e){a=!0,A=t.input.charCodeAt(t.position);continue}else{t.position=i,t.line=c,t.lineStart=l,t.lineIndent=u;break}}a&&(ku(t,o,i,!1),y2(t,t.line-c),o=i=t.position,a=!1),jp(A)||(i=t.position+1),A=t.input.charCodeAt(++t.position)}returnku(t,o,i,!1),t.result?!0:(t.kind=d,t.result=p,!1)}functionvtt(t,e){varr,n,s;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=s=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ku(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,s=t.position;elsereturn!0;elsenc(r)?(ku(t,n,s,!0),y2(t,Fr(t,!1,e)),n=s=t.position):t.position===t.lineStart&&V0(t)?ge(t,"unexpected end of the document within a single quoted scalar"):(t.position++,s=t.position);ge(t,"unexpected end of the stream within a single quoted scalar")}functionDtt(t,e){varr,n,s,o,i,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)returnku(t,r,t.position,!0),t.position++,!0;if(a===92){if(ku(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),nc(a))Fr(t,!1,e);elseif(a<256&&Spe[a])t.result+=Bpe[a],t.position++;elseif((i=Ntt(a))>0){for(s=i,o=0;s>0;s--)a=t.input.charCodeAt(++t.position),(i=Rtt(a))>=0?o=(o<<4)+i:ge(t,"expected hexadecimal character");t.result+=Ptt(o),t.position++}elsege(t,"unknown escape sequence");r=n=t.position}elsenc(a)?(ku(t,r,n,!0),y2(t,Fr(t,!1,e)),r=n=t.position):t.position===t.lineStart&&V0(t)?ge(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}ge(t,"unexpected end of the stream within a double quoted scalar")}functionktt(t,e){varr=!0,n,s,o,i=t.tag,a,c=t.anchor,l,u,d,p,A,f=Object.create(null),y,w,x,I;if(I=t.input.charCodeAt(t.position),I===91)u=93,A=!1,a=[];elseif(I===123)u=125,A=!0,a={};elsereturn!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),I=t.input.charCodeAt(++t.position);I!==0;){if(Fr(t,!0,e),I=t.input.charCodeAt(t.position),I===u)returnt.position++,t.tag=i,t.anchor=c,t.kind=A?"mapping":"sequence",t.result=a,!0;r?I===44&&ge(t,"expected the node content, but found ','"):ge(t,"missed comma between flow collection entries"),w=y=x=null,d=p=!1,I===63&&(l=t.input.charCodeAt(t.position+1),Hs(l)&&(d=p=!0,t.position++,Fr(t,!0,e))),n=t.line,s=t.lineStart,o=t.position,sh(t,e,$0,!1,!0),w=t.tag,y=t.result,Fr(t,!0,e),I=t.input.charCodeAt(t.position),(p||t.line===n)&&I===58&&(d=!0,I=t.input.charCodeAt(++t.position),Fr(t,!0,e),sh(t,e,$0,!1,!0),x=t.result),A?nh(t,a,f,w,y,x,n,s,o):d?a.push(nh(t,null,f,w,y,x,n,s,o)):a.push(y),Fr(t,!0,e),I=t.input.charCodeAt(t.position),I===44?(r=!0,I=t.input.charCodeAt(++t.position)):r=!1}ge(t,"unexpected end of the stream within a flow collection")}functionLtt(t,e){varr,n,s=u2,o=!1,i=!1,a=e,c=0,l=!1,u,d;if(d=t.input.charCodeAt(t.position),d===124)n=!1;elseif(d===62)n=!0;elsereturn!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)u2===s?s=d===43?tpe:xtt:ge(t,"repeat of a chomping mode identifier");elseif((u=Ttt(d))>=0)u===0?ge(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):i?ge(t,"repeat of an indentation width identifier"):(a=e+u-1,i=!0);elsebreak;if(jp(d)){dod=t.input.charCodeAt(++t.position);while(jp(d));if(d===35)dod=t.input.charCodeAt(++t.position);while(!nc(d)&&d!==0)}for(;d!==0;){for(g2(t),t.lineIndent=0,d=t.input.charCodeAt(
`,o?1+c:c),o=!0,i=!0,c=0,r=t.position;!nc(d)&&d!==0;)d=t.input.charCodeAt(++t.position);ku(t,r,t.position,!1)}return!0}function ipe(t,e){var r,n=t.tag,s=t.anchor,o=[],i,a=!1,c;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),c=t.input.charCodeAt(t.position);c!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ge(t,"tab characters must not be used in indentation")),!(c!==45||(i=t.input.charCodeAt(t.position+1),!Hs(i))));){if(a=!0,t.position++,Fr(t,!0,-1)&&t.lineIndent<=e){o.push(null),c=t.input.charCodeAt(t.position);continue}if(r=t.line,sh(t,e,Ipe,!1,!0),o.push(t.result),Fr(t,!0,-1),c=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&c!==0)ge(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=n,t.anchor=s,t.kind="sequence",t.result=o,!0):!1}function Ott(t,e,r){var n,s,o,i,a,c,l=t.tag,u=t.anchor,d={},p=Object.create(null),A=null,f=null,y=null,w=!1,x=!1,I;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),I=t.input.charCodeAt(t.position);I!==0;){if(!w&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ge(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),o=t.line,(I===63||I===58)&&Hs(n))I===63?(w&&(nh(t,d,p,A,f,null,i,a,c),A=f=y=null),x=!0,w=!0,s=!0):w?(w=!1,s=!0):ge(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,I=n;else{if(i=t.line,a=t.lineStart,c=t.position,!sh(t,r,Cpe,!1,!0))break;if(t.line===o){for(I=t.input.charCodeAt(t.position);jp(I);)I=t.input.charCodeAt(++t.position);if(I===58)I=t.input.charCodeAt(++t.position),Hs(I)||ge(t,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(nh(t,d,p,A,f,null,i,a,c),A=f=y=null),x=!0,w=!1,s=!1,A=t.tag,f=t.result;else if(x)ge(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=l,t.anchor=u,!0}else if(x)ge(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=l,t.anchor=u,!0}if((t.line===o||t.lineIndent>e)&&(w&&(i=t.line,a=t.lineStart,c=t.position),sh(t,e,q0,!0,s)&&(w?f=t.result:y=t.result),w||(nh(t,d,p,A,f,y,i,a,c),A=f=y=null),Fr(t,!0,-1),I=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&I!==0)ge(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return w&&nh(t,d,p,A,f,null,i,a,c),x&&(t.tag=l,t.anchor=u,t.kind="mapping",t.result=d),x}function Ftt(t){var e,r=!1,n=!1,s,o,i;if(i=t.input.charCodeAt(t.position),i!==33)return!1;if(t.tag!==null&&ge(t,"duplication of a tag property"),i=t.input.charCodeAt(++t.position),i===60?(r=!0,i=t.input.charCodeAt(++t.position)):i===33?(n=!0,s="!!",i=t.input.charCodeAt(++t.position)):s="!",e=t.position,r){do i=t.input.charCodeAt(++t.position);while(i!==0&&i!==62);t.position<t.length?(o=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):ge(t,"unexpected end of the stream within a verbatim tag")}else{for(;i!==0&&!Hs(i);)i===33&&(n?ge(t,"tag suffix cannot contain exclamation marks"):(s=t.input.slice(e-1,t.position+1),wpe.test(s)||ge(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);o=t.input.slice(e,t.position),Btt.test(o)&&ge(t,"tag suffix cannot contain flow indicator characters")}o&&!xpe.test(o)&&ge(t,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{ge(t,"tag name is malformed: "+o)}return r?t.tag=o:Lu.call(t.tagMap,s)?t.tag=t.tagMap[s]+o:s==="!"?t.tag="!"+o:s==="!!"?t.tag="tag:yaml.org,2002:"+o:ge(t,'undeclared tag handle "'+s+'"'),!0}function Utt(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&ge(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Hs(r)&&!rh(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&ge(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Mtt(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;f
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));varr=newQtt(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,ge(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)$tt(r);returnr.documents}functionqtt(t,e,r){e!==null&&typeofe=="object"&&typeofr>"u"&&(r=e,e=null);varn=Npe(t,r);if(typeofe!="function")returnn;for(vars=0,o=n.length;s<o;s+=1)e(n[s])}functionGtt(t,e){varr=Npe(t,e);if(r.length!==0){if(r.length===1)returnr[0];thrownewGs("expected a single document in the stream, but found more")}}varHtt=qtt,ztt=Gtt,Tpe={loadAll:Htt,load:ztt},Ppe=Object.prototype.toString,Qpe=Object.prototype.hasOwnProperty,E2=65279,Vtt=9,EC=10,Ytt=13,jtt=32,Wtt=33,Jtt=34,p2=35,Ktt=37,Xtt=38,Ztt=39,ert=42,_pe=44,trt=45,H0=58,rrt=61,nrt=62,srt=63,ort=64,vpe=91,Dpe=93,irt=96,kpe=123,art=124,Lpe=125,kn={};kn[0]="\\0";kn[7]="\\a";kn[8]="\\b";kn[9]="\\t";kn[10]="\\n";kn[11]="\\v";kn[12]="\\f";kn[13]="\\r";kn[27]="\\e";kn[34]='\\"';kn[92]="\\\\";kn[133]="\\N";kn[160]="\\_";kn[8232]="\\L";kn[8233]="\\P";varcrt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],lrt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;functionurt(t,e){varr,n,s,o,i,a,c;if(e===null)return{};for(r={},n=Object.keys(e),s=0,o=n.length;s<o;s+=1)i=n[s],a=String(e[i]),i.slice(0,2)==="!!"&&(i="tag:yaml.org,2002:"+i.slice(2)),c=t.compiledTypeMap.fallback[i],c&&Qpe.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[i]=a;returnr}functiondrt(t){vare,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;elseif(t<=65535)r="u",n=4;elseif(t<=4294967295)r="U",n=8;elsethrownewGs("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+jr.repeat("0",n-e.length)+e}varprt=1,CC=2;functionArt(t){this.schema=t.schema||Epe,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=jr.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=urt(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?CC:prt,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeoft.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}functionape(t,e){for(varr=jr.repeat(" ",e),n=0,s=-1,o="",i,a=t.length;n<a;)s=t.indexOf(`
`+t.slice(i+1):c+=t.slice(s),c.slice(1)}functionCrt(t){for(vare="",r=0,n,s=0;s<t.length;r>=65536?s+=2:s++)r=gC(t,s),n=kn[r],!n&&IC(r)?(e+=t[s],r>=65536&&(e+=t[s+1])):e+=n||drt(r);returne}functionIrt(t,e,r){varn="",s=t.tag,o,i,a;for(o=0,i=r.length;o<i;o+=1)a=r[o],t.replacer&&(a=t.replacer.call(r,String(o),a)),(sl(t,e,a,!1,!1)||typeofa>"u"&&sl(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=s,t.dump="["+n+"]"}functionApe(t,e,r,n){vars="",o=t.tag,i,a,c;for(i=0,a=r.length;i<a;i+=1)c=r[i],t.replacer&&(c=t.replacer.call(r,String(i),c)),(sl(t,e+1,c,!0,!0,!1,!0)||typeofc>"u"&&sl(t,e+1,null,!0,!0,!1,!0))&&((!n||s!=="")&&(s+=A2(t,e)),t.dump&&EC===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=o,t.dump=s||"[]"}functionwrt(t,e,r){varn="",s=t.tag,o=Object.keys(r),i,a,c,l,u;for(i=0,a=o.length;i<a;i+=1)u="",n!==""&&(u+=", "),t.condenseFlow&&(u+='"'),c=o[i],l=r[c],t.replacer&&(l=t.replacer.call(r,c,l)),sl(t,e,c,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),sl(t,e,l,!1,!1)&&(u+=t.dump,n+=u));t.tag=s,t.dump="{"+n+"}"}functionxrt(t,e,r,n){vars="",o=t.tag,i=Object.keys(r),a,c,l,u,d,p;if(t.sortKeys===!0)i.sort();elseif(typeoft.sortKeys=="function")i.sort(t.sortKeys);elseif(t.sortKeys)thrownewGs("sortKeys must be a boolean or a function");for(a=0,c=i.length;a<c;a+=1)p="",(!n||s!=="")&&(p+=A2(t,e)),l=i[a],u=r[l],t.replacer&&(u=t.replacer.call(r,l,u)),sl(t,e+1,l,!0,!0,!0)&&(d=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,d&&(t.dump&&EC===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,d&&(p+=A2(t,e)),sl(t,e+1,u,!0,d)&&(t.dump&&EC===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,s+=p));t.tag=o,t.dump=s||"{}"}functionmpe(t,e,r){varn,s,o,i,a,c;for(s=r?t.explicitTypes:t.implicitTypes,o=0,i=s.length;o<i;o+=1)if(a=s[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeofe=="object"&&einstanceofa.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(c=t.styleMap[a.tag]||a.defaultStyle,Ppe.call(a.represent)==="[object Function]")n=a.represent(e,c);elseif(Qpe.call(a.represent,c))n=a.represent[c](e,c);elsethrownewGs("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');t.dump=n}return!0}return!1}functionsl(t,e,r,n,s,o,i){t.tag=null,t.dump=r,mpe(t,r,!1)||mpe(t,r,!0);vara=Ppe.call(t.dump),c=n,l;n&&(n=t.flowLevel<0||t.flowLevel>e);varu=a==="[object Object]"||a==="[object Array]",d,p;if(u&&(d=t.duplicates.indexOf(r),p=d!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(s=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(u&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),a==="[object Object]")n&&Object.keys(t.dump).length!==0?(xrt(t,e,t.dump,s),p&&(t.dump="&ref_"+d+t.dump)):(wrt(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));elseif(a==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!i&&e>0?Ape(t,e-1,t.dump,s):Ape(t,e,t.dump,s),p&&(t.dump="&ref_"+d+t.dump)):(Irt(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));elseif(a==="[object String]")t.tag!=="?"&&yrt(t,t.dump,e,o,c);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;thrownewGs("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(l=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",t.dump=l+" "+t.dump)}return!0}functionbrt(t,e){varr=[],n=[],s,o;for(f2(t,r,n),s=0,o=n.length;s<o;s+=1)e.duplicates.push(r[n[s]]);e.usedDuplicates=newArray(o)}functionf2(t,e,r){varn,s,o;if(t!==null&&typeoft=="object")if(s=e.indexOf(t),s!==-1)r.indexOf(s)===-1&&r.push(s);elseif(e.push(t),Array.isArray(t))for(s=0,o=t.length;s<o;s+=1)f2(t[s],e,r);elsefor(n=Object.keys(t),s=0,o=n.length;s<o;s+=1)f2(t[n[s]],e,r)}functionSrt(t,e){e=e||{};varr=newArt(e);r.noRefs||brt(t,r);varn=t;returnr.replacer&&(n=r.replacer.call({"":n},"",n)),sl(r,0,n,!0,!0)?r.dump+`
`:""}varBrt=Srt,Rrt={dump:Brt};functionC2(t,e){returnfunction(){thrownewError("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var$pe=Tpe.load,l5t=Tpe.loadAll,u5t=Rrt.dump;vard5t=C2("safeLoad","load"),p5t=C2("safeLoadAll","loadAll"),A5t=C2("safeDump","dump");varsi=b(require("fs"),1),zs=b(require("path"),1);varnhe=b(Pme(),1);varoN=classt{staticprotoRegexp=newRegExp("^[a-zA-Z0-9]+://");staticsupportedProtos={http:{},https:{},ssh:{},git:{}};staticparseURL(e){letr=e.match(t.protoRegexp);if(r&&r.length>0){letn=r[0].toLowerCase();if(n=n.slice(0,n.lastIndexOf("://")),!(nint.supportedProtos))thrownewError(`Invalid protocol: ${n}`);returnt.fromURL(newURL(e))}thrownewError("Unknown protocol")}staticfromURL(e){letr=newURL(e.toString());r.hash="";letn;return(e.username||e.password)&&(n={username:e.username,password:e.password,passwordSet:e.password!==""}),{scheme:e.protocol.slice(0,-1),user:n,host:`${e.hostname}${e.port?":"+e.port:""}`,path:e.pathname,fragment:t.splitGitFragment(e.hash),remote:r.toString()}}staticsplitGitFragment(e){if(e==="")return;let[r,n]=e.slice(1).split(":");return{ref:r,subdir:n}}staticparseRef(e){letr={},n;if(e.startsWith("./")||e.startsWith("../"))thrownewError("Invalid argument");if(e.startsWith("github.com/"))r.indistinguishableFromLocal=!0,n=t.fromURL(newURL("https://"+e));elseif(n=t.parseURL(e),["http","git"].includes(n.scheme)&&(r.unencryptedTCP=!0),["http","https"].includes(n.scheme)&&!n.path.endsWith(".git"))thrownewError("Invalid argument");r.remote=n.remote,r.indistinguishableFromLocal&&(r.remote=r.remote.split("://")[1]),n.fragment&&(r.commit=n.fragment.ref,r.subDir=n.fragment.subdir);lets=r.remote.split("/");returnr.shortName=s[s.length-1].replace(".git",""),r}};varW2=b(require("fs"),1),ofe=b(require("os"),1),PC=b(require("path"),1);varH2=b(require("fs"),1),Wme=b(require("os"),1),Jme=b(require("path"),1),Kme=b(jme(),1),cN=classt{static_tmpDir=H2.default.mkdtempSync(Jme.default.join(t.ensureDirExists(process.env.RUNNER_TEMP||Wme.default.tmpdir()),"docker-actions-toolkit-"));staticensureDirExists(e){returnH2.default.mkdirSync(e,{recursive:!0}),e}statictmpDir(){returnt._tmpDir}statictmpName(e){returnKme.tmpNameSync(e)}};varil=class{staticasyncexec(e,r,n){returnft(`Exec.exec: ${e}${r?.join(" ")}`),cu(e,r,n)}staticasyncgetExecOutput(e,r,n){returnft(`Exec.getExecOutput: ${e}${r?.join(" ")}`),rp(e,r,n)}};varj2=b(require("crypto"),1),sfe=b(require("fs"),1),TC=b(require("path"),1);varAt=classtextendsError{constructor(e,r,n,...s){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void0&&Error.captureStackTrace(this,t),this.code=e;for(letoofs)for(letiino){leta=o[i];this[i]=Buffer.isBuffer(a)?a.toString(n.encoding):a==null?a:JSON.parse(JSON.stringify(a))}}};varXme=function(t){returntypeoft=="object"&&t!==null&&!Array.isArray(t)};varlN=function(t){lete=[];for(letr=0,n=t.length;r<n;r++){lets=t[r];if(s==null||s===!1)e[r]={disabled:!0};elseif(typeofs=="string"||typeofs=="number")e[r]={name:`${s}`};elseif(Xme(s)){if(typeofs.name!="string")thrownewAt("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${r}`,"when column is an object literal"]);e[r]=s}elsethrownewAt("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(s)} at position ${r}`])}returne};varz2=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){letr=this.length+e.length;if(r>=this.size&&(this.resize(),r>=this.size))throwError("INVALID_BUFFER_STATE");letn=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{letr=this.length++;r===this.size&&this.resize();letn=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){letr=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){returnBuffer.from(this.buf.slice(0,this.l
`)}var Git=class extends Error{constructor(t,e,r){super(qit(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},Hit=["method","baseUrl","url","headers","request","query","mediaType","operationName"],zit=["query","method","url"],Gfe=/\/api\/v3\/?$/;function Vit(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let i in r)if(zit.includes(i))return Promise.reject(new Error(`[@octokit/graphql]"${i}"cannotbeusedasvariablename`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((i,a)=>Hit.includes(a)?(i[a]=n[a],i):(i.variables||(i.variables={}),i.variables[a]=n[a],i),{}),o=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Gfe.test(o)&&(s.url=o.replace(Gfe,"/api/graphql")),t(s).then(i=>{if(i.data.errors){let a={};for(let c of Object.keys(i.headers))a[c]=i.headers[c];throw new Git(s,a,i.data)}return i.data.data})}function oz(t,e){let r=t.defaults(e);return Object.assign((s,o)=>Vit(r,s,o),{defaults:oz.bind(null,r),endpoint:r.endpoint})}var nXt=oz(DC,{headers:{"user-agent":`octokit-graphql.js/${$it}${Uu()}`},method:"POST",url:"/graphql"});function Hfe(t){return oz(t,{method:"POST",url:"/graphql"})}var iz="(?:[a-zA-Z0-9_-]+)",zfe="\\.",Vfe=new RegExp(`^${iz}${zfe}${iz}${zfe}${iz}$`),Yit=Vfe.test.bind(Vfe);async function jit(t){let e=Yit(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}function Wit(t){return t.split(/\./).length===3?`bearer${t}`:`token${t}`}async function Jit(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=Wit(t),e(s)}var Yfe=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(jit.bind(null,e),{hook:Jit.bind(null,e)})};var az="7.0.6";var jfe=()=>{},Kit=console.warn.bind(console),Xit=console.error.bind(console);function Zit(t={}){return typeof t.debug!="function"&&(t.debug=jfe),typeof t.info!="function"&&(t.info=jfe),typeof t.warn!="function"&&(t.warn=Kit),typeof t.error!="function"&&(t.error=Xit),t}var Wfe=`octokit-core.js/${az}${Uu()}`,IN=class{static VERSION=az;static defaults(e){return class extends this{constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent}${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new wfe.Collection,n={baseUrl:DC.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent}${Wfe}`:Wfe,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=DC.defaults(n),this.graphql=Hfe(this.request).defaults(n),this.log=Zit(e.log),this.hook=r,e.authStrategy){let{authStrategy:o,...i}=e,a=o(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:i},e.auth));r.wrap("request",a.hook),this.auth=a}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let o=Yfe(e.auth);r.wrap("request",o.hook),this.auth=o}let s=this.constructor;for(let o=0;o<s.plugins.length;++o)Object.assign(this,s.plugins[o](this,e))}request;graphql;log;hook;auth};var cz="17.0.0";var eat={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /or
More info: ${c.url}`);letA=c.range&&c.range.length>0?c.range[0]?.start.line:void0,f=!1;for(letyofi)if(y.remote||y.path.endsWith(l)&&y.content===u){a.push({title:d,message:p,file:y.path,startLine:A}),f=!0;break}f||ft(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${l}: ${d}`)}returna}};functionshe(){return{registry:lu("registry"),username:lu("username"),password:lu("password"),scope:lu("scope"),ecr:lu("ecr"),logout:Qee("logout"),registryAuth:lu("registry-auth")}}functionohe(t){if(t.registryAuth&&(t.registry||t.username||t.password||t.scope||t.ecr))thrownewError("Cannot use registry-auth with other inputs");lete=[];if(t.registryAuth)e=$pe(t.registryAuth).map(r=>{iu(r.password);letn=r.registry||"docker.io";return{registry:n,username:r.username,password:r.password,scope:r.scope,ecr:r.ecr||"auto",configDir:xN(n,r.scope)}});else{letr=t.registry||"docker.io";e.push({registry:r,username:t.username,password:t.password,scope:t.scope,ecr:t.ecr||"auto",configDir:xN(r,t.scope)})}if(e.length==0)thrownewError("No registry to login");returne}functionxN(t,e){if(uat()||!e||e==="")return"";letr=mz.default.join(wN.configDir,"config",t==="docker.io"?"registry-1.docker.io":t);returne.startsWith("@")?r+=e:r=mz.default.join(r,e),r}functionuat(){returnprocess.env.DOCKER_LOGIN_SCOPE_DISABLED?Ou.parseBool(process.env.DOCKER_LOGIN_SCOPE_DISABLED):!1}varJPe=b(RTe(),1),KPe=b(_Pe(),1),y4=b(ic(),1);varLPe=b(require("net"),1),OPe=b(require("tls"),1),FPe=b(Ep(),1),UPe=require("events");varvPe=b(require("net"),1),DPe=b(require("http"),1),kPe=require("https"),Ic=Symbol("AgentBaseInternalState"),Xv=classextendsDPe.Agent{constructor(e){super(e),this[Ic]={}}isSecureEndpoint(e){if(e){if(typeofe.secureEndpoint=="boolean")returne.secureEndpoint;if(typeofe.protocol=="string")returne.protocol==="https:"}let{stack:r}=newError;returntypeofr!="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)returnnull;this.sockets[e]||(this.sockets[e]=[]);letr=newvPe.Socket({writable:!1});returnthis.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;letn=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&deletethis.sockets[e])}getName(e){returnthis.isSecureEndpoint(e)?kPe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){lets={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),i=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(a=>{if(this.decrementSockets(o,i),typeofa.addRequest=="function")try{returna.addRequest(e,s)}catch(c){returnn(c)}this[Ic].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(o,i),n(a)})}createConnection(){lete=this[Ic].currentSocket;if(this[Ic].currentSocket=void0,!e)thrownewError("No socket was returned in the `connect()` function");returne}getdefaultPort(){returnthis[Ic].defaultPort??(this.protocol==="https:"?443:80)}setdefaultPort(e){this[Ic]&&(this[Ic].defaultPort=e)}getprotocol(){returnthis[Ic].protocol??(this.isSecureEndpoint()?"https:":"http:")}setprotocol(e){this[Ic]&&(this[Ic].protocol=e)}};varh4=require("url"),fg=(0,FPe.default)("http-proxy-agent"),_w=classextendsXv{constructor(e,r){super(r),this.proxy=typeofe=="string"?newh4.URL(e):e,this.proxyHeaders=r?.headers??{},fg("Creating new HttpProxyAgent instance: %o",this.proxy.href);letn=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?C_t(r,"headers"):null,host:n,port:s}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,s=r.secureEndpoint?"https:":"http:",o=e.getHeader("host")||"localhost",i=`${s}//${o}`,a=newh4.URL(e.path,i);r.port!==80&&(a.port=String(r.port)),e.path=String(a);letc=typeofthis.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){letl=`${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(letlofObject.keys(c)){letu=c[l];u&&e.setHeader(l,u)}}asyncconnect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);letn,s;fg("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(fg("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)returnnull;this.sockets[e]||(this.sockets[e]=[]);letr=newMPe.Socket({writable:!1});returnthis.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;letn=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&deletethis.sockets[e])}getName(e){returnthis.isSecureEndpoint(e)?qPe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){lets={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),i=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(a=>{if(this.decrementSockets(o,i),typeofa.addRequest=="function")try{returna.addRequest(e,s)}catch(c){returnn(c)}this[wc].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(o,i),n(a)})}createConnection(){lete=this[wc].currentSocket;if(this[wc].currentSocket=void0,!e)thrownewError("No socket was returned in the `connect()` function");returne}getdefaultPort(){returnthis[wc].defaultPort??(this.protocol==="https:"?443:80)}setdefaultPort(e){this[wc]&&(this[wc].defaultPort=e)}getprotocol(){returnthis[wc].protocol??(this.isSecureEndpoint()?"https:":"http:")}setprotocol(e){this[wc]&&(this[wc].protocol=e)}};varWPe=require("url");varGPe=b(Ep(),1),eD=(0,GPe.default)("https-proxy-agent:parse-proxy-response");functionHPe(t){returnnewPromise((e,r)=>{letn=0,s=[];functiono(){letu=t.read();u?l(u):t.once("readable",o)}functioni(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",o)}functiona(){i(),eD("onend"),r(newError("Proxy connection ended before receiving CONNECT response"))}functionc(u){i(),eD("onerror %o",u),r(u)}functionl(u){s.push(u),n+=u.length;letd=Buffer.concat(s,n),p=d.indexOf(`\r
`);let{connect:l,buffered:u}=awaitc;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),l.statusCode===200)returne.once("socket",I_t),r.secureEndpoint?(vw("Upgrading socket connection to TLS"),g4.connect({...VPe(zPe(r),"host","path","port"),socket:s})):s;s.destroy();letd=newNd.Socket({writable:!1});returnd.readable=!0,e.once("socket",p=>{vw("Replaying proxy buffer for failed request"),(0,YPe.default)(p.listenerCount("data")>0),p.push(u),p.push(null)}),d}};Dw.protocols=["http","https"];functionI_t(t){t.resume()}functionVPe(t,...e){letr={},n;for(nint)e.includes(n)||(r[n]=t[n]);returnr}varE4=/^(([0-9]{12})\.(dkr\.ecr|dkr-ecr)\.(.+)\.(on\.aws|amazonaws\.(com(.cn)?|eu)))(\/([^:]+)(:.+)?)?$/,w_t=/public\.ecr\.aws|ecr-public\.aws\.com/,XPe=t=>E4.test(t)||tD(t),tD=t=>w_t.test(t),x_t=t=>{if(tD(t))returnprocess.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1";lete=t.match(E4);returne?e[4]:""},b_t=t=>{if(tD(t))return[];lete=t.match(E4);if(!e)return[];letr=[e[2]];returnprocess.env.AWS_ACCOUNT_IDS&&r.push(...process.env.AWS_ACCOUNT_IDS.split(",")),r.filter((n,s)=>r.indexOf(n)===s)},ZPe=async(t,e,r)=>{letn=x_t(t),s=b_t(t),o={};s.length>0&&(gy(`Requesting AWS ECR auth token for ${s.join(", ")}`),o.registryIds=s);leti,a=process.env.http_proxy||process.env.HTTP_PROXY||"";a&&(gy(`Using http proxy ${a}`),i=new_w(a));letc,l=process.env.https_proxy||process.env.HTTPS_PROXY||"";l&&(gy(`Using https proxy ${l}`),c=newDw(l));letu=e&&r?{accessKeyId:e,secretAccessKey:r}:void0;if(tD(t)){Uc(`AWS Public ECR detected with ${n} region`);letp=awaitnewKPe.ECRPUBLIC({customUserAgent:"docker-login-action",credentials:u,region:n,requestHandler:newy4.NodeHttpHandler({httpAgent:i,httpsAgent:c})}).getAuthorizationToken(o);if(!p.authorizationData||!p.authorizationData.authorizationToken)thrownewError("Could not retrieve an authorization token from AWS Public ECR");letf=Buffer.from(p.authorizationData.authorizationToken,"base64").toString("utf-8").split(":",2);returniu(f[0]),iu(f[1]),[{registry:"public.ecr.aws",username:f[0],password:f[1]}]}else{Uc(`AWS ECR detected with ${n} region`);letp=awaitnewJPe.ECR({customUserAgent:"docker-login-action",credentials:u,region:n,requestHandler:newy4.NodeHttpHandler({httpAgent:i,httpsAgent:c})}).getAuthorizationToken(o);if(!Array.isArray(p.authorizationData)||!p.authorizationData.length)thrownewError("Could not retrieve an authorization token from AWS ECR");letA=[];for(letfofp.authorizationData){letw=Buffer.from(f.authorizationToken||"","base64").toString("utf-8").split(":",2);iu(w[0]),iu(w[1]),A.push({registry:f.proxyEndpoint||"",username:w[0],password:w[1]})}returnA}};asyncfunctionC4(t){/true/i.test(t.ecr)||t.ecr=="auto"&&XPe(t.registry)?awaitR_t(t.registry,t.username,t.password,t.scope):awaitB_t(t.registry,t.username,t.password,t.scope)}asyncfunctioneQe(t,e){letr;e!==""&&(r=Object.assign({},process.env,{DOCKER_CONFIG:e}),Uc(`Alternative config dir: ${e}`)),awaitFu.getExecOutput(["logout",t],{ignoreReturnCode:!0,env:r}).then(n=>{n.stderr.length>0&&n.exitCode!=0&&_ee(n.stderr.trim())})}asyncfunctionB_t(t,e,r,n){if(!e&&!r)thrownewError("Username and password required");if(!e)thrownewError("Username required");if(!r)thrownewError("Password required");awaittQe(t,e,r,n)}asyncfunctionR_t(t,e,r,n){Uc("Retrieving registries data through AWS SDK...");lets=awaitZPe(t,e,r);for(letoofs)awaittQe(o.registry,o.username,o.password,n)}asyncfunctiontQe(t,e,r,n){lets,o=xN(t,n);o!==""?(s=Object.assign({},process.env,{DOCKER_CONFIG:o}),Uc(`Logging into ${t} (scope ${n})...`)):Uc(`Logging into ${t}...`),awaitFu.getExecOutput(["login","--password-stdin","--username",e,t],{ignoreReturnCode:!0,silent:!0,input:Buffer.from(r),env:s}).then(i=>{if(i.stderr.length>0&&i.exitCode!=0)thrownewError(i.stderr.trim());Uc("Login Succeeded!")})}varrQe=process.env.STATE_registries?JSON.parse(process.env.STATE_registries):[],nQe=/true/i.test(process.env.STATE_logout||"");functionsQe(t){JO("registries",JSON.stringify(t))}functionoQe(t){JO("logout",t)}asyncfunctioniQe(