varoRe=Object.create;vartP=Object.defineProperty;varaRe=Object.getOwnPropertyDescriptor;varcRe=Object.getOwnPropertyNames;varlRe=Object.getPrototypeOf,uRe=Object.prototype.hasOwnProperty;vardRe=(t,e)=>()=>(t&&(e=t(t=0)),e);varm=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),CY=(t,e)=>{for(varrine)tP(t,r,{get:e[r],enumerable:!0})},hRe=(t,e,r,s)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofcRe(e))!uRe.call(t,i)&&i!==r&&tP(t,i,{get:()=>e[i],enumerable:!(s=aRe(e,i))||s.enumerable});returnt};varM=(t,e,r)=>(r=t!=null?oRe(lRe(t)):{},hRe(e||!t||!t.__esModule?tP(r,"default",{value:t,enumerable:!0}):r,t));varA3=m(Yp=>{"use strict";varXbt=require("net"),qve=require("tls"),CP=require("http"),h3=require("https"),Gve=require("events"),Zbt=require("assert"),Hve=require("util");Yp.httpOverHttp=zve;Yp.httpsOverHttp=Vve;Yp.httpOverHttps=$ve;Yp.httpsOverHttps=jve;functionzve(t){vare=newxl(t);returne.request=CP.request,e}functionVve(t){vare=newxl(t);returne.request=CP.request,e.createSocket=f3,e.defaultPort=443,e}function$ve(t){vare=newxl(t);returne.request=h3.request,e}functionjve(t){vare=newxl(t);returne.request=h3.request,e.createSocket=f3,e.defaultPort=443,e}functionxl(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||CP.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(s,i,n,o){for(vara=p3(i,n,o),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(s);return}}s.destroy(),e.removeSocket(s)})}Hve.inherits(xl,Gve.EventEmitter);xl.prototype.addRequest=function(e,r,s,i){varn=this,o=IP({request:e},n.options,p3(r,s,i));if(n.sockets.length>=this.maxSockets){n.requests.push(o);return}n.createSocket(o,function(a){a.on("free",c),a.on("close",l),a.on("agentRemove",l),e.onSocket(a);functionc(){n.emit("free",a,o)}functionl(u){n.removeSocket(a),a.removeListener("free",c),a.removeListener("close",l),a.removeListener("agentRemove",l)}})};xl.prototype.createSocket=function(e,r){vars=this,i={};s.sockets.push(i);varn=IP({},s.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(n.localAddress=e.localAddress),n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+newBuffer(n.proxyAuth).toString("base64")),Zu("making CONNECT request");varo=s.request(n);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",l),o.once("error",u),o.end();functiona(d){d.upgrade=!0}functionc(d,h,f){process.nextTick(function(){l(d,h,f)})}functionl(d,h,f){if(o.removeAllListeners(),h.removeAllListeners(),d.statusCode!==200){Zu("tunneling socket could not be established, statusCode=%d",d.statusCode),h.destroy();varp=newError("tunneling socket could not be established, statusCode="+d.statusCode);p.code="ECONNRESET",e.request.emit("error",p),s.removeSocket(i);return}if(f.length>0){Zu("got illegal response body from proxy"),h.destroy();varp=newError("got illegal response body from proxy");p.code="ECONNRESET",e.request.emit("error",p),s.removeSocket(i);return}returnZu("tunneling connection has established"),s.sockets[s.sockets.indexOf(i)]=h,r(h)}functionu(d){o.removeAllListeners(),Zu(`tunneling socket could not be established, cause=%s
`);h.push(A),n+=A.byteLength,p&&(n=null),i=t,s=async function*(){for(let E of h)E.stream?yield*E.stream():yield E},o=`multipart/form-data;boundary=${c}`}else if(wW(t))i=t,n=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Xy.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:dPe(t)}if((typeof i=="string"||Xy.isBuffer(i))&&(n=Buffer.byteLength(i)),s!=null){let c;r=new ReadableStream({async start(){c=s(t)[Symbol.asyncIterator]()},async pull(l){let{value:u,done:d}=await c.next();if(d)queueMicrotask(()=>{l.close(),l.byobRequest?.respond(0)});else if(!NW(r)){let h=new Uint8Array(u);h.byteLength&&l.enqueue(h)}return l.desiredSize>0},async cancel(l){await c.return()},type:"bytes"})}return[{stream:r,source:i,length:n},o]}function BPe(t,e=!1){return t instanceof ReadableStream&&(xD(!Xy.isDisturbed(t),"The body has already been consumed."),xD(!t.locked,"The stream is locked.")),vW(t,e)}function SPe(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function xPe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function NPe(t){return{blob(){return cA(this,r=>{let s=SW(this);return s===null?s="":s&&(s=IPe(s)),new yPe([r],{type:s})},t)},arrayBuffer(){return cA(this,r=>new Uint8Array(r).buffer,t)},text(){return cA(this,xW,t)},json(){return cA(this,TPe,t)},formData(){return cA(this,r=>{let s=SW(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let i=bPe(r,s);if(i==="failure")throw new TypeError("Failed to parse body as FormData.");let n=new BW;return n[lA]=i,n}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(r.toString()),n=new BW;for(let[o,a]of i)n.append(o,a);return n}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return cA(this,r=>new Uint8Array(r),t)}}}function RPe(t){Object.assign(t.prototype,NPe(t))}async function cA(t,e,r){if(gPe.brandCheck(t,r),QW(t))throw new TypeError("Body is unusable: Body has already been read");xPe(t[lA]);let s=pPe(),i=o=>s.reject(o),n=o=>{try{s.resolve(e(o))}catch(a){i(a)}};return t[lA].body==null?(n(Buffer.allocUnsafe(0)),s.promise):(await APe(t[lA].body,n,i),s.promise)}function QW(t){let e=t[lA].body;return e!=null&&(e.stream.locked||Xy.isDisturbed(e.stream))}function TPe(t){return JSON.parse(xW(t))}function SW(t){let e=t[lA].headersList,r=mPe(e);return r==="failure"?null:r}_W.exports={extractBody:vW,safelyExtractBody:BPe,cloneBody:SPe,mixinBody:RPe,streamRegistry:TW,hasFinalizationRegistry:RW,bodyUnusable:QW}});var HW=m((Twt,GW)=>{"use strict";var ve=require("node:assert"),Fe=rt(),{channels:PW}=Kp(),RD=lD(),{RequestContentLengthMismatchError:Ph,ResponseContentLengthMismatchError:vPe,RequestAbortedError:FW,HeadersTimeoutError:QPe,HeadersOverflowError:_Pe,SocketError:Tw,InformationalError:dA,BodyTimeoutError:PPe,HTTPParserError:DPe,ResponseExceededMaxSizeError:OPe}=gt(),{kUrl:UW,kReset:Hi,kClient:_D,kParser:pr,kBlocking:tE,kRunning:Fs,kPending:kPe,kSize:DW,kWriting:rd,kQueue:la,kNoRef:Zy,kKeepAliveDefaultTimeout:MPe,kHostHeader:LPe,kPendingIdx:FPe,kRunningIdx:ho,kError:fo,kPipelining:Nw,kSocket:hA,kKeepAliveTimeoutValue:vw,kMaxHeadersSize:TD,kKeepAliveMaxTimeout:UPe,kKeepAliveTimeoutThreshold:qPe,kHeadersTimeout:GPe,kBodyTimeout:HPe,kStrictContentLength:PD,kMaxRequests:OW,kCounter:zPe,kMaxResponseSize:VPe,kOnError:$Pe,kResume:td,kHTTPContext:qW}=tr(),ja=T6(),jPe=Buffer.alloc(0),Bw=Buffer[Symbol.species],Sw=Fe.addListener,JPe=Fe.removeAllListeners,vD;async function YPe(){let t=process.env.JEST_WORKER_ID?hD():void 0,e;try{e=await WebAssembly.compile(_6())}catch{e=await WebAssembly.compile(t||hD())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,i)=>0,wasm_on_status:(r,s,i)=>{ve(Wr.ptr===r);let n=s-Ya+Ja.byteOffset;return Wr.onStatus(new Bw(Ja.buffer,n,i))||0},wasm_on_message_begin:r=>(ve(Wr.ptr===r),Wr.onMessageBegin()||0),wasm_on_header_field:(r,s,i)=>{ve(Wr.
`}return PW.sendHeaders.hasSubscribers&&PW.sendHeaders.publish({request:e,headers:A,socket:f}),!c||h===0?MW(p,null,t,e,f,u,A,d):Fe.isBuffer(c)?MW(p,c,t,e,f,u,A,d):Fe.isBlobLike(c)?typeof c.stream=="function"?LW(p,c.stream(),t,e,f,u,A,d):rDe(p,c,t,e,f,u,A,d):Fe.isStream(c)?tDe(p,c,t,e,f,u,A,d):Fe.isIterable(c)?LW(p,c,t,e,f,u,A,d):ve(!1),!0}function tDe(t,e,r,s,i,n,o,a){ve(n!==0||r[Fs]===0,"stream body cannot be pipelined");let c=!1,l=new Qw({abort:t,socket:i,request:s,contentLength:n,client:r,expectsPayload:a,header:o}),u=function(p){if(!c)try{!l.write(p)&&this.pause&&this.pause()}catch(A){Fe.destroy(this,A)}},d=function(){c||e.resume&&e.resume()},h=function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!c){let p=new FW;queueMicrotask(()=>f(p))}},f=function(p){if(!c){if(c=!0,ve(i.destroyed||i[rd]&&r[Fs]<=1),i.off("drain",d).off("error",f),e.removeListener("data",u).removeListener("end",f).removeListener("close",h),!p)try{l.end()}catch(A){p=A}l.destroy(p),p&&(p.code!=="UND_ERR_INFO"||p.message!=="reset")?Fe.destroy(e,p):Fe.destroy(e)}};e.on("data",u).on("end",f).on("error",f).on("close",h),e.resume&&e.resume(),i.on("drain",d).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(h)}function MW(t,e,r,s,i,n,o,a){try{e?Fe.isBuffer(e)&&(ve(n===e.byteLength,"buffer body must have content length"),i.cork(),i.write(`${o}content-length:${n}\r
`,"latin1")),s.onRequestSent(),r[td]()}catch(c){t(c)}}async function rDe(t,e,r,s,i,n,o,a){ve(n===e.size,"blob body must have content length");try{if(n!=null&&n!==e.size)throw new Ph;let c=Buffer.from(await e.arrayBuffer());i.cork(),i.write(`${o}content-length:${n}\r
`,"latin1"),i.write(c),i.uncork(),s.onBodySent(c),s.onRequestSent(),!a&&s.reset!==!1&&(i[Hi]=!0),r[td]()}catch(c){t(c)}}async function LW(t,e,r,s,i,n,o,a){ve(n!==0||r[Fs]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let h=c;c=null,h()}}let u=()=>new Promise((h,f)=>{ve(c===null),i[fo]?f(i[fo]):c=h});i.on("close",l).on("drain",l);let d=new Qw({abort:t,socket:i,request:s,contentLength:n,client:r,expectsPayload:a,header:o});try{for await(let h of e){if(i[fo])throw i[fo];d.write(h)||await u()}d.end()}catch(h){d.destroy(h)}finally{i.off("close",l).off("drain",l)}}var Qw=class{constructor({abort:e,socket:r,request:s,contentLength:i,client:n,expectsPayload:o,header:a}){this.socket=r,this.request=s,this.contentLength=i,this.client=n,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[rd]=!0}write(e){let{socket:r,request:s,contentLength:i,client:n,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[fo])throw r[fo];if(r.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(i!==null&&o+l>i){if(n[PD])throw new Ph;process.emitWarning(new Ph)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[Hi]=!0),i===null?r.write(`${c}transfer-encoding:chunked\r
`,"latin1"),r!==null&&i!==r){if(s[PD])throw new Ph;process.emitWarning(new Ph)}e[pr].timeout&&e[pr].timeoutType===fA&&e[pr].timeout.refresh&&e[pr].timeout.refresh(),s[td]()}}destroy(e){let{socket:r,client:s,abort:i}=this;r[rd]=!1,e&&(ve(s[Fs]<=1,"pipeline should only contain this request"),i(e))}};GW.exports=KPe});var KW=m((vwt,WW)=>{"use strict";var po=require("node:assert"),{pipeline:sDe}=require("node:stream"),at=rt(),{RequestContentLengthMismatchError:MD,RequestAbortedError:zW,SocketError:rE,InformationalError:LD}=gt(),{kUrl:_w,kReset:Dw,kClient:pA,kRunning:Ow,kPending:iDe,kQueue:sd,kPendingIdx:FD,kRunningIdx:ua,kError:ha,kSocket:as,kStrictContentLength:nDe,kOnError:UD,kMaxConcurrentStreams:YW,kHTTP2Session:da,kResume:id,kSize:oDe,kHTTPContext:aDe}=tr(),_l=Symbol("open streams"),VW,$W=!1,Pw;try{Pw=require("node:http2")}catch{Pw={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:cDe,HTTP2_HEADER_METHOD:lDe,HTTP2_HEADER_PATH:uDe,HTTP2_HEADER_SCHEME:dDe,HTTP2_HEADER_CONTENT_LENGTH:hDe,HTTP2_HEADER_EXPECT:fDe,HTTP2_HEADER_STATUS:pDe}}=Pw;function ADe(t){let e=[];for(let[r,s]of Object.entries(t))if(Array.isArray(s))for(let i of s)e.push(Buffer.from(r),Buffer.from(i));else e.push(Buffer.from(r),Buffer.from(s));return e}async function mDe(t,e){t[as]=e,$W||($W=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=Pw.connect(t[_w],{createConnection:()=>e,peerMaxConcurrentStreams:t[YW]});r[_l]=0,r[pA]=t,r[as]=e,at.addListener(r,"error",yDe),at.addListener(r,"frameError",EDe),at.addListener(r,"end",CDe),at.addListener(r,"goaway",IDe),at.addListener(r,"close",function(){let{[pA]:i}=this,{[as]:n}=i,o=this[as][ha]||this[ha]||new rE("closed",at.getSocketInfo(n));if(i[da]=null,i.destroyed){po(i[iDe]===0);let a=i[sd].splice(i[ua]);for(let c=0;c<a.length;c++){let l=a[c];at.errorRequest(i,l,o)}}}),r.unref(),t[da]=r,e[da]=r,at.addListener(e,"error",function(i){po(i.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[ha]=i,this[pA][UD](i)}),at.addListener(e,"end",function(){at.destroy(this,new rE("other side closed",at.getSocketInfo(this)))}),at.addListener(e,"close",function(){let i=this[ha]||new rE("closed",at.getSocketInfo(this));t[as]=null,this[da]!=null&&this[da].destroy(i),t[FD]=t[ua],po(t[Ow]===0),t.emit("disconnect",t[_w],[t],i),t[id]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...i){return wDe(t,...i)},resume(){gDe(t)},destroy(i,n){s?queueMicrotask(n):e.destroy(i).on("close",n)},get destroyed(){return e.destroyed},busy(){return!1}}}function gDe(t){let e=t[as];e?.destroyed===!1&&(t[oDe]===0&&t[YW]===0?(e.unref(),t[da].unref()):(e.ref(),t[da].ref()))}function yDe(t){po(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[as][ha]=t,this[pA][UD](t)}function EDe(t,e,r){if(r===0){let s=new LD(`HTTP/2:"frameError"received-type${t},code${e}`);this[as][ha]=s,this[pA][UD](s)}}function CDe(){let t=new rE("other side closed",at.getSocketInfo(this[as]));this.destroy(t),at.destroy(this[as],t)}function IDe(t){let e=this[ha]||new rE(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,at.getSocketInfo(this)),r=this[pA];if(r[as]=null,r[aDe]=null,this[da]!=null&&(this[da].destroy(e),this[da]=null),at.destroy(this[as],e),r[ua]<r[sd].length){let s=r[sd][r[ua]];r[sd][r[ua]++]=null,at.errorRequest(r,s,e),r[FD]=r[ua]}po(r[Ow]===0),r.emit("disconnect",r[_w],[r],e),r[id]()}function bDe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function wDe(t,e){let r=t[da],{method:s,path:i,host:n,upgrade:o,expectContinue:a,signal:c,headers:l}=e,{body:u}=e;if(o)return at.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let d={};for(let S=0;S<l.length;S+=2){let N=l[S+0],P=l[S+1];if(Array.isArray(P))for(let D=0;D<P.length;D++)d[N]?d[N]+=`,${P[D]}`:d[N]=P[D];else d[N]=P}let h,{hostname:f,port:p}=t[_w];d[cDe]=n||`${f}${p?`:${p}`:""}`,d[lDe]=s;let A=S=>{e.aborted||e.completed||(S=S||new zW,at.errorRequest(t,e,S),h!=null&&at.destroy(h,S),at.destroy(u,S),t[sd][t[ua]++]=null,t[id]())};try{e.onConnect(A)}catch(S){at.errorRequest(t,e,S)}if(e
`;if(s.username||s.password){let h=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;n["Proxy-Authorization"]=`Basic${Buffer.from(h).toString("base64")}`}n.Host=`${o}:${r.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let h of Object.keys(n))a+=`${h}:${n[h]}\r
`)+4,e.outputData[0].data=e._header+s.substring(i),dm("Output buffer: %o",e.outputData[0].data));let n;return this.proxy.protocol==="https:"?(dm("Creating `tls.Socket`: %o",this.connectOpts),n=xJe.connect(this.connectOpts)):(dm("Creating `net.Socket`: %o",this.connectOpts),n=SJe.connect(this.connectOpts)),await(0,RJe.once)(n,"connect"),n}};cx.protocols=["http","https"];Ro.HttpProxyAgent=cx;function vJe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var oae=m(bx=>{"use strict";Object.defineProperty(bx,"__esModule",{value:!0});bx.state=void 0;bx.state={instrumenterImplementation:void 0}});var wae=m(Nx=>{"use strict";Object.defineProperty(Nx,"__esModule",{value:!0});Nx.state=void 0;Nx.state={operationRequestMap:new WeakMap}});var tue=m(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var WWe=require("os"),KWe=require("util");function XWe(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var ZWe=XWe(KWe);function e9e(t,...e){process.stderr.write(`${ZWe.default.format(t,...e)}${WWe.EOL}`)}var Vle=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,jle,dG=[],hG=[],$N=[];Vle&&fG(Vle);var Jle=Object.assign(t=>Yle(t),{enable:fG,enabled:pG,disable:t9e,log:e9e});function fG(t){jle=t,dG=[],hG=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?hG.push(new RegExp(`^${s.substr(1)}$`)):dG.push(new RegExp(`^${s}$`));for(let s of $N)s.enabled=pG(s.namespace)}function pG(t){if(t.endsWith("*"))return!0;for(let e of hG)if(e.test(t))return!1;for(let e of dG)if(e.test(t))return!0;return!1}function t9e(){let t=jle||"";return fG(""),t}function Yle(t){let e=Object.assign(r,{enabled:pG(t),destroy:r9e,log:Jle.log,namespace:t,extend:s9e});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return $N.push(e),e}function r9e(){let t=$N.indexOf(this);return t>=0?($N.splice(t,1),!0):!1}function s9e(t){let e=Yle(`${this.namespace}:${t}`);return e.log=this.log,e}var aI=Jle,Wle=new Set,zN=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,jN,JN=aI("azure");JN.log=(...t)=>{aI.log(...t)};var AG=["verbose","info","warning","error"];zN&&(eue(zN)?Kle(zN):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${zN}';loggingisnotenabled.Acceptablevalues:${AG.join(", ")}.`));function Kle(t){if(t&&!eue(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${AG.join(",")}`);jN=t;let e=[];for(let r of Wle)Zle(r)&&e.push(r.namespace);aI.enable(e.join(","))}function i9e(){return jN}var $le={verbose:400,info:300,warning:200,error:100};function n9e(t){let e=JN.extend(t);return Xle(JN,e),{error:VN(e,"error"),warning:VN(e,"warning"),info:VN(e,"info"),verbose:VN(e,"verbose")}}function Xle(t,e){e.log=(...r)=>{t.log(...r)}}function VN(t,e){let r=Object.assign(t.extend(e),{level:e});if(Xle(t,r),Zle(r)){let s=aI.disable();aI.enable(s+","+r.namespace)}return Wle.add(r),r}function Zle(t){return!!(jN&&$le[t.level]<=$le[jN])}function eue(t){return AG.includes(t)}Tm.AzureLogger=JN;Tm.createClientLogger=n9e;Tm.getLogLevel=i9e;Tm.setLogLevel=Kle});var yG=m(lI=>{"use strict";Object.defineProperty(lI,"__esModule",{value:!0});var vm=new WeakMap,YN=new WeakMap,cI=class t{constructor(){this.onabort=null,vm.set(this,[]),YN.set(this,!1)}get aborted(){if(!YN.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return YN.get(this)}static get none(){return new t}addEventListener(e,r){if(!vm.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");vm.get(this).push(r)}removeEventListener(e,r){if(!vm.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=vm.get(this),i=s.indexOf(r);i>-1&&s.splice(i,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 rue(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=vm.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),YN.set(t,!0)}var mG=class extends Error{constructor(e){super(e),t
${vQ(l)}${l}`)}catch(l){if(l.code==="ENOENT")return;throw l}return QQ(t,c)}so.exports.find=Bht;async function Bht(t,e){let r=H0(t,e);try{return(await TQ(r)).reduce((i,n)=>n&&n.key===e?QQ(t,n):i,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}so.exports.delete=Sht;function Sht(t,e,r={}){if(!r.removeFully)return XIe(t,e,null,r);let s=H0(t,e);return KIe(s,{recursive:!0,force:!0})}so.exports.lsStream=ZIe;function ZIe(t){let e=Oj(t),r=new mht({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(RQ(),NQ)),i=await Pj(e);return await s(i,async n=>{let o=al.join(e,n),a=await Pj(o);await s(a,async c=>{let l=al.join(o,c),u=await Pj(l);await s(u,async d=>{let h=al.join(l,d);try{let p=(await TQ(h)).reduce((A,E)=>(A.set(E.key,E),A),new Map);for(let A of p.values()){let E=QQ(t,A);E&&r.write(E)}}catch(f){if(f.code==="ENOENT")return;throw f}},{concurrency:_j})},{concurrency:_j})},{concurrency:_j}),r.end(),r}).catch(s=>r.emit("error",s)),r}so.exports.ls=xht;async function xht(t){return(await ZIe(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}so.exports.bucketEntries=TQ;async function TQ(t,e){let r=await fht(t,"utf8");return Nht(r,e)}function Nht(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||vQ(s[1])!==s[0])return;let i;try{i=JSON.parse(s[1])}catch{}i&&e.push(i)}),e}so.exports.bucketDir=Oj;function Oj(t){return al.join(t,`index-v${Iht}`)}so.exports.bucketPath=H0;function H0(t,e){let r=e0e(e);return al.join.apply(al,[Oj(t)].concat(Cht(r)))}so.exports.hashKey=e0e;function e0e(t){return t0e(t,"sha256")}so.exports.hashEntry=vQ;function vQ(t){return t0e(t,"sha1")}function t0e(t,e){return dht.createHash(e).update(t).digest("hex")}function QQ(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?Eht(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}function Pj(t){return pht(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}});var V0=m(DQ=>{"use strict";Object.defineProperty(DQ,"__esModule",{value:!0});DQ.LRUCache=void 0;var Rht=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,s0e=new Set,kj=typeof process=="object"&&process?process:{},i0e=(t,e,r,s)=>{typeof kj.emitWarning=="function"?kj.emitWarning(t,e,r,s):console.error(`[${r}]${e}:${t}`)},PQ=globalThis.AbortController,r0e=globalThis.AbortSignal;if(typeof PQ>"u"){r0e=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(r,s){this._onabort.push(s)}},PQ=class{constructor(){e()}signal=new r0e;abort(r){if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(let s of this.signal._onabort)s(r);this.signal.onabort?.(r)}}};let t=kj.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,i0e("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var Tht=t=>!s0e.has(t),ch=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),n0e=t=>ch(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_Q:null:null,_Q=class extends Array{constructor(t){super(t),this.fill(0)}},vht=class z0{heap;length;static#e=!1;static create(e){let r=n0e(e);if(!r)return[];z0.#e=!0;let s=new z0(e,r);return z0.#e=!1,s}constructor(e,r){if(!z0.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Qht=class o0e{#e;#t;#s;#r;#i;#o;#u;#l;get perf(){return this.#l}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#p;#f;#d;#n;#y;#I;#g;#A;#x;#m;#B;#S;#E;#C;#b;#R;#c;#D;static unsafeExposeInternals(e){return{starts:e.#S,ttls:e.#E,autopurgeTimers:e.#C,sizes:e.#B,keyMap:e.#f,keyList:e.#d,valList:e.#n,next:e.#y,prev:e.#I,get head(){return e.#g},get tail(){return e.#A},free:e.#x,isBackgroundFetch:r=>e.#h(r),backgroundFetch:(r,s,i,n)=>e.#G(r,s,i,n),moveToTail:r=>e.#P(r),indexes:r=>e.#T(r),rindexes:r=>e.#v(r),isStale:r=>e.#w(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#p}get size(){return this.#a}get fetchMethod(){return this.#o}get memoMethod(){return this.#u}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:l,onInsert:u,disposeAfter:d,noDisposeOnSet:h,noUpdateTTL:f,maxSize:p=0,maxEntrySize:A=0,sizeCalculation:E,fetchMethod:y,memoMethod:C,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:P,ignoreFetchAbort:D,perf:k}=e;if(k!==void 0&&typeof k?.now!="function")throw new TypeError("perf option must have a now() method if s
globstarwhile`,v,ee,_,Pe,it),this.matchOne(v.slice(ee),_.slice(Pe),O))return this.debug("globstar found match!",ee,R,it),!0;if(it==="."||it===".."||!U.dot&&it.charAt(0)==="."){this.debug("dot detected!",v,ee,_,Pe);break}this.debug("globstar swallow a segment, and continue"),ee++}return!!(O&&(this.debug(`
>>>nomatch,partial?`,v,ee,_,Pe),ee===R))}let tt;if(typeof j=="string"?(tt=me===j,this.debug("string match",j,me,tt)):(tt=j.test(me),this.debug("pattern match",j,me,tt)),!tt)return!1}if(g===R&&B===L)return!0;if(g===R)return O;if(B===L)return g===R-1&&v[g]==="";throw new Error("wtf?")}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(v){(0,r.assertValidPattern)(v);let _=this.options;if(v==="**")return t.GLOBSTAR;if(v==="")return"";let O,U=null;(O=v.match(y))?U=_.dot?w:C:(O=v.match(a))?U=(_.nocase?_.dot?d:u:_.dot?l:c)(O[1]):(O=v.match(S))?U=(_.nocase?_.dot?P:N:_.dot?D:k)(O):(O=v.match(h))?U=_.dot?p:f:(O=v.match(A))&&(U=E);let Y=s.AST.fromGlob(v,this.options).toMMPattern();return U&&typeof Y=="object"&&Reflect.defineProperty(Y,"test",{value:U}),Y}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let v=this.set;if(!v.length)return this.regexp=!1,this.regexp;let _=this.options,O=_.noglobstar?$:_.dot?ae:Ke,U=new Set(_.nocase?["i"]:[]),Y=v.map(R=>{let L=R.map(me=>{if(me instanceof RegExp)for(let ee of me.flags.split(""))U.add(ee);return typeof me=="string"?qt(me):me===t.GLOBSTAR?t.GLOBSTAR:me._src});L.forEach((me,ee)=>{let Pe=L[ee+1],it=L[ee-1];me!==t.GLOBSTAR||it===t.GLOBSTAR||(it===void 0?Pe!==void 0&&Pe!==t.GLOBSTAR?L[ee+1]="(?:\\/|"+O+"\\/)?"+Pe:L[ee]=O:Pe===void 0?L[ee-1]=it+"(?:\\/|\\/"+O+")?":Pe!==t.GLOBSTAR&&(L[ee-1]=it+"(?:\\/|\\/"+O+"\\/)"+Pe,L[ee+1]=t.GLOBSTAR))});let j=L.filter(me=>me!==t.GLOBSTAR);if(this.partial&&j.length>=1){let me=[];for(let ee=1;ee<=j.length;ee++)me.push(j.slice(0,ee).join("/"));return"(?:"+me.join("|")+")"}return j.join("/")}).join("|"),[g,B]=v.length>1?["(?:",")"]:["",""];Y="^"+g+Y+B+"$",this.partial&&(Y="^(?:\\/|"+g+Y.slice(1,-1)+B+")$"),this.negate&&(Y="^(?!"+Y+").+$");try{this.regexp=new RegExp(Y,[...U].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(v){return this.preserveMultipleSlashes?v.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(v)?["",...v.split(/\/+/)]:v.split(/\/+/)}match(v,_=this.partial){if(this.debug("match",v,this.pattern),this.comment)return!1;if(this.empty)return v==="";if(v==="/"&&_)return!0;let O=this.options;this.isWindows&&(v=v.split("\\").join("/"));let U=this.slashSplit(v);this.debug(this.pattern,"split",U);let Y=this.set;this.debug(this.pattern,"set",Y);let g=U[U.length-1];if(!g)for(let B=U.length-2;!g&&B>=0;B--)g=U[B];for(let B=0;B<Y.length;B++){let R=Y[B],L=U;if(O.matchBase&&R.length===1&&(L=[g]),this.matchOne(L,R,_))return O.flipNegate?!0:!this.negate}return O.flipNegate?!1:this.negate}static defaults(v){return t.minimatch.defaults(v).Minimatch}};t.Minimatch=Jr;var En=T0e();Object.defineProperty(t,"AST",{enumerable:!0,get:function(){return En.AST}});var Bt=v0e();Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return Bt.escape}});var oo=Kj();Object.defineProperty(t,"unescape",{enumerable:!0,get:function(){return oo.unescape}}),t.minimatch.AST=s.AST,t.minimatch.Minimatch=Jr,t.minimatch.escape=i.escape,t.minimatch.unescape=n.unescape}),bft=ks(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;var e=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,r=new Set,s=typeof process=="object"&&process?process:{},i=(f,p,A,E)=>{typeof s.emitWarning=="function"?s.emitWarning(f,p,A,E):console.error(`[${A}]${p}:${f}`)},n=globalThis.AbortController,o=globalThis.AbortSignal;if(typeof n>"u"){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(A,E){this._onabort.push(E)}},n=class{constructor(){p()}signal=new o;abort(A){if(!this.signal.aborted){this.signal.reason=A,this.signal.aborted=!0;for(let E of this.signal._onabort)E(A);this.signal.onabort?.(A)}}};let f=s.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",p=()=>{f&&(f=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might
`;if(s.username||s.password){let h=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;n["Proxy-Authorization"]=`Basic${Buffer.from(h).toString("base64")}`}n.Host=`${o}:${r.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let h of Object.keys(n))a+=`${h}:${n[h]}\r
`);let{connect:l,buffered:u}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),l.statusCode===200){if(e.once("socket",Mpt),r.secureEndpoint){ib("Upgrading socket connection to TLS");let h=r.servername||r.host;return bbe.connect({...wbe(r,"host","path","port"),socket:i,servername:sb.isIP(h)?void 0:h})}return i}i.destroy();let d=new sb.Socket({writable:!1});return d.readable=!0,e.once("socket",h=>{ib("Replaying proxy buffer for failed request"),(0,_pt.default)(h.listenerCount("data")>0),h.push(u),h.push(null)}),d}};YQ.protocols=["http","https"];Wo.HttpsProxyAgent=YQ;function Mpt(t){t.resume()}function wbe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var vbe=m(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var Nbe=require("buffer"),Bp={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};qu.ERRORS=Bp;function Lpt(t){if(!Nbe.Buffer.isEncoding(t))throw new Error(Bp.INVALID_ENCODING)}qu.checkEncoding=Lpt;function Rbe(t){return typeof t=="number"&&isFinite(t)&&Gpt(t)}qu.isFiniteInteger=Rbe;function Tbe(t,e){if(typeof t=="number"){if(!Rbe(t)||t<0)throw new Error(e?Bp.INVALID_OFFSET:Bp.INVALID_LENGTH)}else throw new Error(e?Bp.INVALID_OFFSET_NON_NUMBER:Bp.INVALID_LENGTH_NON_NUMBER)}function Fpt(t){Tbe(t,!1)}qu.checkLengthValue=Fpt;function Upt(t){Tbe(t,!0)}qu.checkOffsetValue=Upt;function qpt(t,e){if(t<0||t>e.length)throw new Error(Bp.INVALID_TARGET_OFFSET)}qu.checkTargetOffset=qpt;function Gpt(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function Hpt(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof Nbe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}qu.bigIntAndBufferInt64Check=Hpt});var _be=m(m8=>{"use strict";Object.defineProperty(m8,"__esModule",{value:!0});var et=vbe(),Qbe=4096,zpt="utf8",A8=class t{constructor(e){if(this.length=0,this._encoding=zpt,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(et.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(et.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(et.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(et.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(Qbe);else{if(typeof e<"u")throw new Error(et.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(Qbe)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffe
`,lbt=/\u2014 (\S+) (\S+)\n/g;function ubt(t,e){let r=t.inclusionProof,s=W5.fromString(r.checkpoint.envelope),i=v1.fromString(s.note);if(!dbt(s,e))throw new _b.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return i}function dbt(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let i=e.find(n=>yxe.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint)&&n.baseURL.match(s.name));return i?yxe.crypto.verify(r,i.publicKey,s.signature):!1})}var W5=class t{note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(Y5))throw new _b.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(Y5),s=e.slice(0,r+1),n=e.slice(r+Y5.length).matchAll(lbt),o=Array.from(n,a=>{let[,c,l]=a,u=Buffer.from(l,"base64");if(u.length<5)throw new _b.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:c,keyHint:u.subarray(0,4),signature:u.subarray(4)}});if(o.length===0)throw new _b.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,o)}},v1=class t{origin;logSize;logHash;rest;constructor(e,r,s,i){this.origin=e,this.logSize=r,this.logHash=s,this.rest=i}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new _b.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],i=BigInt(r[1]),n=Buffer.from(r[2],"base64"),o=r.slice(3);return new t(s,i,n,o)}};Pb.LogCheckpoint=v1});var Cxe=m(eY=>{"use strict";Object.defineProperty(eY,"__esModule",{value:!0});eY.verifyMerkleInclusion=pbt;var Z5=Wn(),K5=li(),hbt=Buffer.from([0]),fbt=Buffer.from([1]);function pbt(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),i=BigInt(e.logSize);if(s<0n||s>=i)throw new K5.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${s}`});let{inner:n,border:o}=Abt(s,i);if(r.hashes.length!==n+o)throw new K5.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=r.hashes.slice(0,n),c=r.hashes.slice(n),l=Ibt(t.canonicalizedBody),u=gbt(mbt(l,a,s),c);if(!Z5.crypto.bufferEqual(u,e.logHash))throw new K5.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function Abt(t,e){let r=ybt(t,e),s=Ebt(t>>BigInt(r));return{inner:r,border:s}}function mbt(t,e,r){return e.reduce((s,i,n)=>r>>BigInt(n)&BigInt(1)?X5(i,s):X5(s,i),t)}function gbt(t,e){return e.reduce((r,s)=>X5(s,r),t)}function ybt(t,e){return Cbt(t^e-BigInt(1))}function Ebt(t){return t.toString(2).split("1").length-1}function Cbt(t){return t===0n?0:t.toString(2).length}function X5(t,e){return Z5.crypto.digest("sha256",fbt,t,e)}function Ibt(t){return Z5.crypto.digest("sha256",hbt,t)}});var bxe=m(tY=>{"use strict";Object.defineProperty(tY,"__esModule",{value:!0});tY.verifyTLogSET=Bbt;var Ixe=Wn(),bbt=li(),wbt=Ny();function Bbt(t,e){if(!(0,wbt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(i=>{let n=Sbt(t),o=Buffer.from(Ixe.json.canonicalize(n),"utf8"),a=t.inclusionPromise.signedEntryTimestamp;return Ixe.crypto.verify(o,i.publicKey,a)}))throw new bbt.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function Sbt(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:i}=t;return{body:i.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var Bxe=m(Q1=>{"use strict";Object.defineProperty(Q1,"__esModule",{value:!0});Q1.verifyTLogBody=vbt;Q1.verifyTLogInclusion=Qbt;var wxe=cJ(),iY=li(),rY=Axe(),sY=mxe(),xbt=gxe(),Nbt=Exe(),Rbt=Cxe(),Tbt=bxe();function vbt(t,e){let{kind:r,version:s}=t.kindVersion,i=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==i.kind||s!==i.apiVersion)throw new iY.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${s},received:${i.kind}/${i.apiVersion}`});switch(r){case"dsse":if(s==rY.DSSE_API_VERSION_V1)return(0,rY.verifyDSSETLogBody)(i,e);{let n=wxe.Entry.fromJSON(i);return(0,rY.verifyDSSETLogBodyV2)(n,e)}case"intoto":return(0,xbt.verifyIntotoTLogBody)(i,e);case"hashedrekord":if(s==sY.HASHEDREKORD_API_VERSION_V1)return(0,sY.verifyHashedRekordTLogBody)(i,e);{let n=wxe.Entry.fromJSON(i);return(0,sY.verifyHashedRekordTLogBodyV2)(n,e)}default:throw new iY.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}function Qbt(t,e){let r=!1;if(_bt(t)&&((0,Tbt.verifyTLogSET)(t,e),r=!0),Pbt(t)){let s=(0,Nbt.verifyCheckpoint)(t,e);(0,Rbt.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new iY.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}function _bt(t){return t.inclusionPromise!==void 0}function Pbt(t){return t.inclusionProof!==void 0}});var vxe=m(_1=>{"use strict";Object.defineProperty(_1,"__esModule",{value:!0});_1.Verifier=void 0;var Dbt=require("util"),Ry=li(),Sxe=lxe(),xxe=dxe(),Nxe=pxe(),Rxe=Bxe(),nY=class{trustMaterial;options;constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,timestampThreshold:r.timestampThreshold??r.tsaThreshold??1,tsaThreshold:0}}verify(e,r){let s=this.verifyTimestamps(e),i=this.verifySigningKey(e,s);return this.verifyTLogs(e),this.verifyS
`;return a.replace(/\n$/,"")}var SRe=BRe,xRe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],NRe=["scalar","sequence","mapping"];function RRe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function TRe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(xRe.indexOf(r)===-1)throw new Ui('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=RRe(e.styleAliases||null),NRe.indexOf(this.kind)===-1)throw new Ui('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Ms=TRe;function IY(t,e){var r=[];return t[e].forEach(function(s){var i=r.length;r.forEach(function(n,o){n.tag===s.tag&&n.kind===s.kind&&n.multi===s.multi&&(i=o)}),r[i]=s}),r}function vRe(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function s(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(s);return t}function nP(t){return this.extend(t)}nP.prototype.extend=function(e){var r=[],s=[];if(e instanceof Ms)s.push(e);else if(Array.isArray(e))s=s.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(s=s.concat(e.explicit));else throw new Ui("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(n){if(!(n instanceof Ms))throw new Ui("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new Ui("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new Ui("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),s.forEach(function(n){if(!(n instanceof Ms))throw new Ui("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(nP.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(s),i.compiledImplicit=IY(i,"implicit"),i.compiledExplicit=IY(i,"explicit"),i.compiledTypeMap=vRe(i.compiledImplicit,i.compiledExplicit),i};var QRe=nP,_Re=new Ms("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),PRe=new Ms("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),DRe=new Ms("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),ORe=new QRe({explicit:[_Re,PRe,DRe]});function kRe(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function MRe(){return null}function LRe(t){return t===null}var FRe=new Ms("tag:yaml.org,2002:null",{kind:"scalar",resolve:kRe,construct:MRe,predicate:LRe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function URe(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function qRe(t){return t==="true"||t==="True"||t==="TRUE"}function GRe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var HRe=new Ms("tag:yaml.org,2002:bool",{kind:"scalar",resolve:URe,construct:qRe,predicate:GRe,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}}
`: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 MTe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function VY(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}var $Y=new Array(256),jY=new Array(256);for(Nh=0;Nh<256;Nh++)$Y[Nh]=BY(Nh)?1:0,jY[Nh]=BY(Nh);var Nh;function LTe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||UY,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 JY(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=SRe(r),new Ui(e,r)}function we(t,e){throw JY(t,e)}function Vb(t,e){t.onWarning&&t.onWarning.call(null,JY(t,e))}var SY={YAML:function(e,r,s){var i,n,o;e.version!==null&&we(e,"duplication of %YAML directive"),s.length!==1&&we(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),i===null&&we(e,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),o=parseInt(i[2],10),n!==1&&we(e,"unacceptable YAML version of the document"),e.version=s[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&Vb(e,"unsupported YAML version of the document")},TAG:function(e,r,s){var i,n;s.length!==2&&we(e,"TAG directive accepts exactly two arguments"),i=s[0],n=s[1],HY.test(i)||we(e,"ill-formed tag handle (first argument) of the TAG directive"),Xu.call(e.tagMap,i)&&we(e,'there is a previously declared suffix for "'+i+'" tag handle'),zY.test(n)||we(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{we(e,"tag prefix is malformed: "+n)}e.tagMap[i]=n}};function Ku(t,e,r,s){var i,n,o,a;if(e<r){if(a=t.input.slice(e,r),s)for(i=0,n=a.length;i<n;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||we(t,"expected valid JSON character");else QTe.test(a)&&we(t,"the stream contains non-printable characters");t.result+=a}}function xY(t,e,r,s){var i,n,o,a;for(Yr.isObject(r)||we(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),o=0,a=i.length;o<a;o+=1)n=i[o],Xu.call(e,n)||(VY(e,n,r[n]),s[n]=!0)}function jp(t,e,r,s,i,n,o,a,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&we(t,"nested arrays are not supported inside keys"),typeof i=="object"&&wY(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&wY(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),s==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(l=0,u=n.length;l<u;l+=1)xY(t,e,n[l],r);else xY(t,e,n,r);else!t.json&&!Xu.call(r,i)&&Xu.call(e,i)&&(t.line=o||t.line,t.lineStart=a||t.lineStart,t.position=c||t.position,we(t,"duplicated mapping key")),VY(e,i,n),delete r[i];return e}function dP(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++):we(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Ur(t,e,r){for(var s=0,i=t.input.charCodeAt(t.position);i!==0;){for(;Rh(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Ha(i))for(dP(t),i=t.input.charCodeAt(t.position),s++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&s!==0&&t.lineIndent<r&&Vb(t,"deficient indentation"),s}function Jb(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===0||qi(r)))}functio
`,e-1))}function FTe(t,e,r){var s,i,n,o,a,c,l,u,d=t.kind,h=t.result,f;if(f=t.input.charCodeAt(t.position),qi(f)||$p(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=t.input.charCodeAt(t.position+1),qi(i)||r&&$p(i)))return!1;for(t.kind="scalar",t.result="",n=o=t.position,a=!1;f!==0;){if(f===58){if(i=t.input.charCodeAt(t.position+1),qi(i)||r&&$p(i))break}else if(f===35){if(s=t.input.charCodeAt(t.position-1),qi(s))break}else{if(t.position===t.lineStart&&Jb(t)||r&&$p(f))break;if(Ha(f))if(c=t.line,l=t.lineStart,u=t.lineIndent,Ur(t,!1,-1),t.lineIndent>=e){a=!0,f=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=c,t.lineStart=l,t.lineIndent=u;break}}a&&(Ku(t,n,o,!1),hP(t,t.line-c),n=o=t.position,a=!1),Rh(f)||(o=t.position+1),f=t.input.charCodeAt(++t.position)}return Ku(t,n,o,!1),t.result?!0:(t.kind=d,t.result=h,!1)}function UTe(t,e){var r,s,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,s=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Ku(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,i=t.position;else return!0;else Ha(r)?(Ku(t,s,i,!0),hP(t,Ur(t,!1,e)),s=i=t.position):t.position===t.lineStart&&Jb(t)?we(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);we(t,"unexpected end of the stream within a single quoted scalar")}function qTe(t,e){var r,s,i,n,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=s=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return Ku(t,r,t.position,!0),t.position++,!0;if(a===92){if(Ku(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),Ha(a))Ur(t,!1,e);else if(a<256&&$Y[a])t.result+=jY[a],t.position++;else if((o=OTe(a))>0){for(i=o,n=0;i>0;i--)a=t.input.charCodeAt(++t.position),(o=DTe(a))>=0?n=(n<<4)+o:we(t,"expected hexadecimal character");t.result+=MTe(n),t.position++}else we(t,"unknown escape sequence");r=s=t.position}else Ha(a)?(Ku(t,r,s,!0),hP(t,Ur(t,!1,e)),r=s=t.position):t.position===t.lineStart&&Jb(t)?we(t,"unexpected end of the document within a double quoted scalar"):(t.position++,s=t.position)}we(t,"unexpected end of the stream within a double quoted scalar")}function GTe(t,e){var r=!0,s,i,n,o=t.tag,a,c=t.anchor,l,u,d,h,f,p=Object.create(null),A,E,y,C;if(C=t.input.charCodeAt(t.position),C===91)u=93,f=!1,a=[];else if(C===123)u=125,f=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),C=t.input.charCodeAt(++t.position);C!==0;){if(Ur(t,!0,e),C=t.input.charCodeAt(t.position),C===u)return t.position++,t.tag=o,t.anchor=c,t.kind=f?"mapping":"sequence",t.result=a,!0;r?C===44&&we(t,"expected the node content, but found ','"):we(t,"missed comma between flow collection entries"),E=A=y=null,d=h=!1,C===63&&(l=t.input.charCodeAt(t.position+1),qi(l)&&(d=h=!0,t.position++,Ur(t,!0,e))),s=t.line,i=t.lineStart,n=t.position,Jp(t,e,Hb,!1,!0),E=t.tag,A=t.result,Ur(t,!0,e),C=t.input.charCodeAt(t.position),(h||t.line===s)&&C===58&&(d=!0,C=t.input.charCodeAt(++t.position),Ur(t,!0,e),Jp(t,e,Hb,!1,!0),y=t.result),f?jp(t,a,p,E,A,y,s,i,n):d?a.push(jp(t,null,p,E,A,y,s,i,n)):a.push(A),Ur(t,!0,e),C=t.input.charCodeAt(t.position),C===44?(r=!0,C=t.input.charCodeAt(++t.position)):r=!1}we(t,"unexpected end of the stream within a flow collection")}function HTe(t,e){var r,s,i=iP,n=!1,o=!1,a=e,c=0,l=!1,u,d;if(d=t.input.charCodeAt(t.position),d===124)s=!1;else if(d===62)s=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)iP===i?i=d===43?bY:vTe:we(t,"repeat of a chomping mode identifier");else if((u=kTe(d))>=0)u===0?we(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?we(t,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(Rh(d)){do d=t.input.charCodeAt(++t.position);while(Rh(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!Ha(d)&&d!==0)}for(;d!==0;){for(dP(t),t.lineIndent=0,d=t.input.charCodeAt(t.p
`,n?1+c:c),n=!0,o=!0,c=0,r=t.position;!Ha(d)&&d!==0;)d=t.input.charCodeAt(++t.position);Ku(t,r,t.position,!1)}return!0}function NY(t,e){var r,s=t.tag,i=t.anchor,n=[],o,a=!1,c;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),c=t.input.charCodeAt(t.position);c!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,we(t,"tab characters must not be used in indentation")),!(c!==45||(o=t.input.charCodeAt(t.position+1),!qi(o))));){if(a=!0,t.position++,Ur(t,!0,-1)&&t.lineIndent<=e){n.push(null),c=t.input.charCodeAt(t.position);continue}if(r=t.line,Jp(t,e,GY,!1,!0),n.push(t.result),Ur(t,!0,-1),c=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&c!==0)we(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=s,t.anchor=i,t.kind="sequence",t.result=n,!0):!1}function zTe(t,e,r){var s,i,n,o,a,c,l=t.tag,u=t.anchor,d={},h=Object.create(null),f=null,p=null,A=null,E=!1,y=!1,C;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),C=t.input.charCodeAt(t.position);C!==0;){if(!E&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,we(t,"tab characters must not be used in indentation")),s=t.input.charCodeAt(t.position+1),n=t.line,(C===63||C===58)&&qi(s))C===63?(E&&(jp(t,d,h,f,p,null,o,a,c),f=p=A=null),y=!0,E=!0,i=!0):E?(E=!1,i=!0):we(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,C=s;else{if(o=t.line,a=t.lineStart,c=t.position,!Jp(t,r,qY,!1,!0))break;if(t.line===n){for(C=t.input.charCodeAt(t.position);Rh(C);)C=t.input.charCodeAt(++t.position);if(C===58)C=t.input.charCodeAt(++t.position),qi(C)||we(t,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(jp(t,d,h,f,p,null,o,a,c),f=p=A=null),y=!0,E=!1,i=!1,f=t.tag,p=t.result;else if(y)we(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=l,t.anchor=u,!0}else if(y)we(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===n||t.lineIndent>e)&&(E&&(o=t.line,a=t.lineStart,c=t.position),Jp(t,e,zb,!0,i)&&(E?p=t.result:A=t.result),E||(jp(t,d,h,f,p,A,o,a,c),f=p=A=null),Ur(t,!0,-1),C=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&C!==0)we(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return E&&jp(t,d,h,f,p,null,o,a,c),y&&(t.tag=l,t.anchor=u,t.kind="mapping",t.result=d),y}function VTe(t){var e,r=!1,s=!1,i,n,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&we(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(s=!0,i="!!",o=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(n=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):we(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!qi(o);)o===33&&(s?we(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),HY.test(i)||we(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),PTe.test(n)&&we(t,"tag suffix cannot contain flow indicator characters")}n&&!zY.test(n)&&we(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{we(t,"tag name is malformed: "+n)}return r?t.tag=n:Xu.call(t.tagMap,i)?t.tag=t.tagMap[i]+n:i==="!"?t.tag="!"+n:i==="!!"?t.tag="tag:yaml.org,2002:"+n:we(t,'undeclared tag handle "'+i+'"'),!0}function $Te(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&we(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!qi(r)&&!$p(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&we(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function jTe(t){var e,r,s;if(s=t.input.charCodeAt(t.position),s!==42)return!1;for(s=
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new LTe(t,e),s=t.indexOf("\0");for(s!==-1&&(r.position=s,we(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;)JTe(r);return r.documents}function YTe(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var s=YY(t,r);if(typeof e!="function")return s;for(var i=0,n=s.length;i<n;i+=1)e(s[i])}function WTe(t,e){var r=YY(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Ui("expected a single document in the stream, but found more")}}var KTe=YTe,XTe=WTe,WY={loadAll:KTe,load:XTe},KY=Object.prototype.toString,XY=Object.prototype.hasOwnProperty,fP=65279,ZTe=9,Ly=10,eve=13,tve=32,rve=33,sve=34,oP=35,ive=37,nve=38,ove=39,ave=42,ZY=44,cve=45,$b=58,lve=61,uve=62,dve=63,hve=64,e3=91,t3=93,fve=96,r3=123,pve=124,s3=125,Ls={};Ls[0]="\\0";Ls[7]="\\a";Ls[8]="\\b";Ls[9]="\\t";Ls[10]="\\n";Ls[11]="\\v";Ls[12]="\\f";Ls[13]="\\r";Ls[27]="\\e";Ls[34]='\\"';Ls[92]="\\\\";Ls[133]="\\N";Ls[160]="\\_";Ls[8232]="\\L";Ls[8233]="\\P";var Ave=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mve=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function gve(t,e){var r,s,i,n,o,a,c;if(e===null)return{};for(r={},s=Object.keys(e),i=0,n=s.length;i<n;i+=1)o=s[i],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=t.compiledTypeMap.fallback[o],c&&XY.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[o]=a;return r}function yve(t){var e,r,s;if(e=t.toString(16).toUpperCase(),t<=255)r="x",s=2;else if(t<=65535)r="u",s=4;else if(t<=4294967295)r="U",s=8;else throw new Ui("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Yr.repeat("0",s-e.length)+e}var Eve=1,Fy=2;function Cve(t){this.schema=t.schema||UY,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Yr.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=gve(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==='"'?Fy:Eve,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.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}function RY(t,e){for(var r=Yr.repeat(" ",e),s=0,i=-1,n="",o,a=t.length;s<a;)i=t.indexOf(`
`+t.slice(o+1):c+=t.slice(i),c.slice(1)}function Nve(t){for(var e="",r=0,s,i=0;i<t.length;r>=65536?i+=2:i++)r=ky(t,i),s=Ls[r],!s&&Uy(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=s||yve(r);return e}function Rve(t,e,r){var s="",i=t.tag,n,o,a;for(n=0,o=r.length;n<o;n+=1)a=r[n],t.replacer&&(a=t.replacer.call(r,String(n),a)),(wl(t,e,a,!1,!1)||typeof a>"u"&&wl(t,e,null,!1,!1))&&(s!==""&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=i,t.dump="["+s+"]"}function DY(t,e,r,s){var i="",n=t.tag,o,a,c;for(o=0,a=r.length;o<a;o+=1)c=r[o],t.replacer&&(c=t.replacer.call(r,String(o),c)),(wl(t,e+1,c,!0,!0,!1,!0)||typeof c>"u"&&wl(t,e+1,null,!0,!0,!1,!0))&&((!s||i!=="")&&(i+=aP(t,e)),t.dump&&Ly===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=n,t.dump=i||"[]"}function Tve(t,e,r){var s="",i=t.tag,n=Object.keys(r),o,a,c,l,u;for(o=0,a=n.length;o<a;o+=1)u="",s!==""&&(u+=", "),t.condenseFlow&&(u+='"'),c=n[o],l=r[c],t.replacer&&(l=t.replacer.call(r,c,l)),wl(t,e,c,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),wl(t,e,l,!1,!1)&&(u+=t.dump,s+=u));t.tag=i,t.dump="{"+s+"}"}function vve(t,e,r,s){var i="",n=t.tag,o=Object.keys(r),a,c,l,u,d,h;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new Ui("sortKeys must be a boolean or a function");for(a=0,c=o.length;a<c;a+=1)h="",(!s||i!=="")&&(h+=aP(t,e)),l=o[a],u=r[l],t.replacer&&(u=t.replacer.call(r,l,u)),wl(t,e+1,l,!0,!0,!0)&&(d=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,d&&(t.dump&&Ly===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,d&&(h+=aP(t,e)),wl(t,e+1,u,!0,d)&&(t.dump&&Ly===t.dump.charCodeAt(0)?h+=":":h+=": ",h+=t.dump,i+=h));t.tag=n,t.dump=i||"{}"}function OY(t,e,r){var s,i,n,o,a,c;for(i=r?t.explicitTypes:t.implicitTypes,n=0,o=i.length;n<o;n+=1)if(a=i[n],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.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,KY.call(a.represent)==="[object Function]")s=a.represent(e,c);else if(XY.call(a.represent,c))s=a.represent[c](e,c);else throw new Ui("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');t.dump=s}return!0}return!1}function wl(t,e,r,s,i,n,o){t.tag=null,t.dump=r,OY(t,r,!1)||OY(t,r,!0);var a=KY.call(t.dump),c=s,l;s&&(s=t.flowLevel<0||t.flowLevel>e);var u=a==="[object Object]"||a==="[object Array]",d,h;if(u&&(d=t.duplicates.indexOf(r),h=d!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(i=!1),h&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(u&&h&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),a==="[object Object]")s&&Object.keys(t.dump).length!==0?(vve(t,e,t.dump,i),h&&(t.dump="&ref_"+d+t.dump)):(Tve(t,e,t.dump),h&&(t.dump="&ref_"+d+" "+t.dump));else if(a==="[object Array]")s&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?DY(t,e-1,t.dump,i):DY(t,e,t.dump,i),h&&(t.dump="&ref_"+d+t.dump)):(Rve(t,e,t.dump),h&&(t.dump="&ref_"+d+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&Sve(t,t.dump,e,n,c);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Ui("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}function Qve(t,e){var r=[],s=[],i,n;for(lP(t,r,s),i=0,n=s.length;i<n;i+=1)e.duplicates.push(r[s[i]]);e.usedDuplicates=new Array(n)}function lP(t,e,r){var s,i,n;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,n=t.length;i<n;i+=1)lP(t[i],e,r);else for(s=Object.keys(t),i=0,n=s.length;i<n;i+=1)lP(t[s[i]],e,r)}function _ve(t,e){e=e||{};var r=new Cve(e);r.noRefs||Qve(t,r);var s=t;return r.replacer&&(s=r.replacer.call({"":s},"",s)),wl(r,0,s,!0,!0)?r.dump+`
`:""}var Pve=_ve,Dve={dump:Pve};function pP(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var c3=WY.load,Gbt=WY.loadAll,Hbt=Dve.dump;var zbt=pP("safeLoad","load"),Vbt=pP("safeLoadAll","loadAll"),$bt=pP("safeDump","dump");var u3=M(require("os"),1);function Bl(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}function AP(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}function Sl(t,e,r){let s=new mP(t,e,r);process.stdout.write(s.toString()+u3.EOL)}function gP(t,e=""){Sl(t,{},e)}var l3="::",mP=class{constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){let e=l3+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let s in this.properties)if(this.properties.hasOwnProperty(s)){let i=this.properties[s];i&&(r?r=!1:e+=",",e+=`${s}=${Mve(i)}`)}}return e+=`${l3}${kve(this.message)}`,e}};function kve(t){return Bl(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function Mve(t){return Bl(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}var d3=M(require("crypto"),1),Wb=M(require("fs"),1),Yb=M(require("os"),1);function Kb(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unabletofindenvironmentvariableforfilecommand${t}`);if(!Wb.existsSync(r))throw new Error(`Missingfileatpath:${r}`);Wb.appendFileSync(r,`${Bl(e)}${Yb.EOL}`,{encoding:"utf8"})}function yP(t,e){let r=`ghadelimiter_${d3.randomUUID()}`,s=Bl(e);if(t.includes(r))throw new Error(`Unexpectedinput:nameshouldnotcontainthedelimiter"${r}"`);if(s.includes(r))throw new Error(`Unexpectedinput:valueshouldnotcontainthedelimiter"${r}"`);return`${t}<<${r}${Yb.EOL}${s}${Yb.EOL}${r}`}var aM=M(require("os"),1),nte=M(require("path"),1);var qE=M(require("http"),1),Vk=M(require("https"),1);function EP(t){let e=t.protocol==="https:";if(Lve(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Xb(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Xb(`http://${r}`)}else return}function Lve(t){if(!t.hostname)return!1;let e=t.hostname;if(Fve(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let s;t.port?s=Number(t.port):t.protocol==="http:"?s=80:t.protocol==="https:"&&(s=443);let i=[t.hostname.toUpperCase()];typeof s=="number"&&i.push(`${i[0]}:${s}`);for(let n of r.split(",").map(o=>o.trim().toUpperCase()).filter(o=>o))if(n==="*"||i.some(o=>o===n||o.endsWith(`.${n}`)||n.startsWith(".")&&o.endsWith(`${n}`)))return!0;return!1}function Fve(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}var Xb=class extends URL{constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var yd=M(bP(),1),Fee=M(jB(),1),Rr=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function a(u){try{l(s.next(u))}catch(d){o(d)}}function c(u){try{l(s.throw(u))}catch(d){o(d)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},ir;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden
Supportbooleaninputlist:\`true | True | TRUE | false | False | FALSE\``)}functionVE(t,e){if(process.env.GITHUB_OUTPUT||"")returnKb("OUTPUT",yP(t,e));process.stdout.write(aM.EOL),Sl("set-output",{name:t},Bl(e))}functionote(t){process.exitCode=oM.Failure,jA(t)}functionyo(){returnprocess.env.RUNNER_DEBUG==="1"}functionT(t){Sl("debug",{},t)}functionjA(t,e={}){Sl("error",AP(e),tinstanceofError?t.toString():t)}functionPt(t,e={}){Sl("warning",AP(e),tinstanceofError?t.toString():t)}functionq(t){process.stdout.write(t+aM.EOL)}functionEGe(t){gP("group",t)}functionCGe(){gP("endgroup")}functionYt(t,e){returnyGe(this,void0,void0,function*(){EGe(t);letr;try{r=yielde()}finally{CGe()}returnr})}functionYi(t,e){if(process.env.GITHUB_STATE||"")returnKb("STATE",yP(t,e));Sl("save-state",{name:t},Bl(e))}functionate(t){returnprocess.env[`STATE_${t}`]||""}vareT=M(require("fs"),1),ez=M(require("os"),1),tz=M(require("path"),1);varTM=M(require("crypto"),1),$s=M(require("fs"),1);varmVe=M(NM(),1);varfS=M(require("os"),1),Ea=M(require("path"),1);varIo=M(NM(),1),Kre=M(require("stream"),1),Xre=M(require("util"),1),vM=require("assert");varWre=function(t,e,r,s){functioni(n){returnninstanceofr?n:newr(function(o){o(n)})}returnnew(r||(r=Promise))(function(n,o){functiona(u){try{l(s.next(u))}catch(d){o(d)}}functionc(u){try{l(s.throw(u))}catch(d){o(d)}}functionl(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},dS=class{constructor(e,r,s){if(e<1)thrownewError("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(s),this.minSeconds>this.maxSeconds)thrownewError("min seconds should be less than or equal to max seconds")}execute(e,r){returnWre(this,void0,void0,function*(){lets=1;for(;s<this.maxAttempts;){try{returnyielde()}catch(n){if(r&&!r(n))thrown;q(n.message)}leti=this.getSleepAmount();q(`Waiting ${i} seconds before trying again`),yieldthis.sleep(i),s++}returnyielde()})}getSleepAmount(){returnMath.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){returnWre(this,void0,void0,function*(){returnnewPromise(r=>setTimeout(r,e*1e3))})}};varoc=function(t,e,r,s){functioni(n){returnninstanceofr?n:newr(function(o){o(n)})}returnnew(r||(r=Promise))(function(n,o){functiona(u){try{l(s.next(u))}catch(d){o(d)}}functionc(u){try{l(s.throw(u))}catch(d){o(d)}}functionl(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},hS=classextendsError{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}},Zre=process.platform==="win32",yxt=process.platform==="darwin",yVe="actions/tool-cache";functionbo(t,e,r,s){returnoc(this,void0,void0,function*(){e=e||Ea.join(nse(),TM.randomUUID()),yieldql(Ea.dirname(e)),T(`Downloading ${t}`),T(`Destination ${e}`);leti=3,n=RM("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=RM("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);returnyieldnewdS(i,n,o).execute(()=>oc(this,void0,void0,function*(){returnyieldEVe(t,e||"",r,s)}),c=>!(cinstanceofhS&&c.httpStatusCode&&c.httpStatusCode<500&&c.httpStatusCode!==408&&c.httpStatusCode!==429))})}functionEVe(t,e,r,s){returnoc(this,void0,void0,function*(){if($s.existsSync(e))thrownewError(`Destination file path ${e} already exists`);leti=newJi(yVe,[],{allowRetries:!1});r&&(T("set auth"),s===void0&&(s={}),s.authorization=r);letn=yieldi.get(t,s);if(n.message.statusCode!==200){letu=newhS(n.message.statusCode);throwT(`Failed to download from "${t}". Code(${n.message.statusCode}) Message(${n.message.statusMessage})`),u}leto=Xre.promisify(Kre.pipeline),c=RM("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>n.message)(),l=!1;try{returnyieldo(c,$s.createWriteStream(e)),T("download complete"),l=!0,e}finally{if(!l){T("download failed");try{yieldWB(e)}catch(u){T(`Failed to delete '${e}'. ${u.message}`)}}}})}functionese(t,e){returnoc(this,arguments,void0,function*(r,s,i="xz"){if(!r)thrownewError("param
`).map(n=>n.trim());for(let n of i)!n||n.startsWith("#")||s.patterns.push(new rC(n));return s.searchPaths.push(...DM(s.patterns)),s})}static stat(e,r,s){return FM(this,void 0,void 0,function*(){let i;if(r.followSymbolicLinks)try{i=yield em.promises.stat(e.path)}catch(n){if(n.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){T(`Brokensymlink'${e.path}'`);return}throw new Error(`Noinformationfoundforthepath'${e.path}'.Thismayindicateabrokensymboliclink.`)}throw n}else i=yield em.promises.lstat(e.path);if(i.isDirectory()&&r.followSymbolicLinks){let n=yield em.promises.realpath(e.path);for(;s.length>=e.level;)s.pop();if(s.some(o=>o===n)){T(`Symlinkcycledetectedforpath'${e.path}'andrealpath'${n}'`);return}s.push(n)}return i})}};var e$e=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function a(u){try{l(s.next(u))}catch(d){o(d)}}function c(u){try{l(s.throw(u))}catch(d){o(d)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})};function _se(t,e){return e$e(this,void 0,void 0,function*(){return yield yS.create(t,e)})}var DS=M(require("crypto"),1),sm=M(require("fs"),1),cf=M(require("path"),1),wne=M(Ine(),1),Bne=M(require("util"),1);var dC;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(dC||(dC={}));var yi;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(yi||(yi={}));var Pn;(function(t){t.GNU="gnu",t.BSD="bsd"})(Pn||(Pn={}));var _S=2,PS=5e3,nL=5e3,oL=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,bne=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,hC="cache.tar",aL="manifest.txt",RNt=10*Math.pow(1024,3);var rm=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function a(u){try{l(s.next(u))}catch(d){o(d)}}function c(u){try{l(s.throw(u))}catch(d){o(d)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},Kje=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={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(n){r[n]=t[n]&&function(o){return new Promise(function(a,c){o=t[n](o),i(a,c,o.done,o.value)})}}function i(n,o,a,c){Promise.resolve(c).then(function(l){n({value:l,done:a})},o)}},Xje="1.0";function fC(){return rm(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let s;t?s=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?s="/Users":s="/home",e=cf.join(s,"actions","temp")}let r=cf.join(e,DS.randomUUID());return yield ql(r),r})}function cc(t){return sm.statSync(t).size}function cL(t){return rm(this,void 0,void 0,function*(){var e,r,s,i,n;let o=[],a=(n=process.env.GITHUB_WORKSPACE)!==null&&n!==void 0?n:process.cwd(),c=yield _se(t.join(`
`),{implicitDescendants:!1});try{for(var l=!0,u=Kje(c.globGenerator()),d;d=yield u.next(),e=d.done,!e;l=!0){i=d.value,l=!1;let f=cf.relative(a,i).replace(new RegExp(`\\${cf.sep}`,"g"),"/");T(`Matched:${f}`),f===""?o.push("."):o.push(`${f}`)}}catch(h){r={error:h}}finally{try{!l&&!e&&(s=u.return)&&(yield s.call(u))}finally{if(r)throw r.error}}return o})}function pC(t){return rm(this,void 0,void 0,function*(){return Bne.promisify(sm.unlink)(t)})}function Sne(t){return rm(this,arguments,void 0,function*(e,r=[]){let s="";r.push("--version"),T(`Checking${e}${r.join(" ")}`);try{yield Qn(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i=>s+=i.toString(),stderr:i=>s+=i.toString()}})}catch(i){T(i.message)}return s=s.trim(),T(s),s})}function AC(){return rm(this,void 0,void 0,function*(){let t=yield Sne("zstd",["--quiet"]),e=wne.clean(t);return T(`zstdversion:${e}`),t===""?yi.Gzip:yi.ZstdWithoutLong})}function Sd(t){return t===yi.Gzip?dC.Gzip:dC.Zstd}function xne(){return rm(this,void 0,void 0,function*(){return sm.existsSync(oL)?oL:(yield Sne("tar")).toLowerCase().includes("gnu tar")?_s("tar"):""})}function lL(t,e){if(e===void 0)throw Error(`Expected${t}butvaluewasundefiend`);return e}function im(t,e,r=!1){let s=t.slice();return e&&s.push(e),process.platform==="win32"&&!r&&s.push("windows-only"),s.push(Xje),DS.createHash("sha256").update(s.join("|")).digest("hex")}function Nne(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}var Dm=M(require("fs"),1),Xue=require("url");var lc=class extends Error{constructor(e){super(e),this.name="AbortError"}};var Rne=require("node:os"),Tne=M(require("node:util"),1),vne=M(require("node:process"),1);function Qne(t,...e){vne.default.stderr.write(`${Tne.default.format(t,...e)}${Rne.EOL}`)}var _ne=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Dne,uL=[],dL=[],kS=[];_ne&&hL(_ne);var One=Object.assign(t=>kne(t),{enable:hL,enabled:fL,disable:Zje,log:Qne});function hL(t){Dne=t,uL=[],dL=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?dL.push(r.substring(1)):uL.push(r);for(let r of kS)r.enabled=fL(r.namespace)}function fL(t){if(t.endsWith("*"))return!0;for(let e of dL)if(Pne(t,e))return!1;for(let e of uL)if(Pne(t,e))return!0;return!1}function Pne(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let h=[],f="";for(let p of e)p==="*"&&f==="*"||(f=p,h.push(p));r=h.join("")}let s=0,i=0,n=r.length,o=t.length,a=-1,c=-1;for(;s<o&&i<n;)if(r[i]==="*"){if(a=i,i++,i===n)return!0;for(;t[s]!==r[i];)if(s++,s===o)return!1;c=s,s++,i++;continue}else if(r[i]===t[s])i++,s++;else if(a>=0){if(i=a+1,s=c+1,s===o)return!1;for(;t[s]!==r[i];)if(s++,s===o)return!1;c=s,s++,i++;continue}else return!1;let l=s===t.length,u=i===r.length,d=i===r.length-1&&r[i]==="*";return l&&(u||d)}function Zje(){let t=Dne||"";return hL(""),t}function kne(t){let e=Object.assign(r,{enabled:fL(t),destroy:e8e,log:One.log,namespace:t,extend:t8e});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return kS.push(e),e}function e8e(){let t=kS.indexOf(this);return t>=0?(kS.splice(t,1),!0):!1}function t8e(t){let e=kne(`${this.namespace}:${t}`);return e.log=this.log,e}var nm=One;var pL=["verbose","info","warning","error"],Mne={verbose:400,info:300,warning:200,error:100};function Lne(t,e){e.log=(...r)=>{t.log(...r)}}function Fne(t){return pL.includes(t)}function MS(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,s,i=nm(t.namespace);i.log=(...u)=>{nm.log(...u)};function n(u){if(u&&!Fne(u))throw new Error(`Unknownloglevel'${u}'.Acceptablevalues:${pL.join(",")}`);s=u;let d=[];for(let h of e)o(h)&&d.push(h.namespace);nm.enable(d.join(","))}r&&(Fne(r)?n(r):console.error(`${t.logLevelEnvVarName}settounknownloglevel'${r}';loggingisnotenabled.Acceptablevalues:${pL.join(", ")}.`));function o(u){return!!(s&&Mne[u.level]<=Mne[s])}function a(u,d){let h=Object.assign(u.extend(d),{level:d});if(Lne(u,h),o(h)){let f=nm.disable();nm.enab
${o8e.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function qS(t){return t instanceof Ei?!0:uf(t)&&t.name==="RestError"}function Wi(t,e){return Buffer.from(t,e)}var GS=M(require("node:http"),1),HS=M(require("node:https"),1),EL=M(require("node:zlib"),1),Vne=require("node:stream");var So=mC("ts-http-runtime");var a8e={};function gC(t){return t&&typeof t.pipe=="function"}function zne(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function $ne(t){return t&&typeof t.byteLength=="number"}var zS=class extends Vne.Transform{loadedBytes=0;progressCallback;_transform(e,r,s){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),s()}catch(i){s(i)}}constructor(e){super(),this.progressCallback=e}},CL=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new lc("The operation was aborted. Request has already been canceled.");s=l=>{l.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",s)}let i;e.timeout>0&&(i=setTimeout(()=>{let l=new ba;So.info(`requestto'${l.sanitizeUrl(e.url)}'timedout.canceling...`),r.abort()},e.timeout));let n=e.headers.get("Accept-Encoding"),o=n?.includes("gzip")||n?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let l=d8e(a);l!==null&&e.headers.set("Content-Length",l)}let c;try{if(a&&e.onUploadProgress){let p=e.onUploadProgress,A=new zS(p);A.on("error",E=>{So.error("Error in upload progress",E)}),gC(a)?a.pipe(A):A.end(a),a=A}let l=await this.makeRequest(e,r,a);i!==void 0&&clearTimeout(i);let u=c8e(l),h={status:l.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return l.resume(),h;c=o?l8e(l,u):l;let f=e.onDownloadProgress;if(f){let p=new zS(f);p.on("error",A=>{So.error("Error in download progress",A)}),c.pipe(p),c=p}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(h.status)?h.readableStreamBody=c:h.bodyAsText=await u8e(c),h}finally{if(e.abortSignal&&s){let l=Promise.resolve();gC(a)&&(l=zne(a));let u=Promise.resolve();gC(c)&&(u=zne(c)),Promise.all([l,u]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(d=>{So.warning("Error when cleaning up abortListener on httpRequest",d)})}}}makeRequest(e,r,s){let i=new URL(e.url),n=i.protocol!=="https:";if(n&&!e.allowInsecureConnection)throw new Error(`Cannotconnectto${e.url}whileallowInsecureConnectionisfalse.`);let a={agent:e.agent??this.getOrCreateAgent(e,n),hostname:i.hostname,path:`${i.pathname}${i.search}`,port:i.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,l)=>{let u=n?GS.default.request(a,c):HS.default.request(a,c);u.once("error",d=>{l(new Ei(d.message,{code:d.code??Ei.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let d=new lc("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(d),l(d)}),s&&gC(s)?s.pipe(u):s?typeof s=="string"||Buffer.isBuffer(s)?u.end(s):$ne(s)?u.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(So.error("Unrecognized body type",s),l(new Ei("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?GS.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new GS.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return HS.default.globalAgent;let i=e.tlsSettings??a8e,n=this.cachedHttpsAgents.get(i);return n&&n.options.keepAlive===!s||(So.info("No cached TLS Agent exist, creating a new Agent"),n=new HS.default.Agent({keepAlive:!s,...i}),this.cachedHttpsAgents.set(i,n)),n}}};function c8e(t){let e=Dn();for(let r of Object.keys(t.headers)){let s=t.headers[r];Array.isArray(s)?s.length>0&&e.set(
`;return e}function HJe(t){return t instanceof Uint8Array?t.byteLength:fx(t)?t.size===-1?void 0:t.size:void 0}function zJe(t){let e=0;for(let r of t){let s=HJe(r);if(s===void 0)return;e+=s}return e}async function VJe(t,e,r){let s=[Wi(`--${r}`,"utf-8"),...e.flatMap(n=>[Wi(`\r
`,"utf-8")],i=zJe(s);i&&t.headers.set("Content-Length",i),t.body=await Joe(s)}var IC="multipartPolicy",$Je=70,jJe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function JJe(t){if(t.length>$Je)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!jJe.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}function Ax(){return{name:IC,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,s=t.headers.get("Content-Type")??"multipart/mixed",i=s.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Gotmultipartrequestbody,butcontent-typeheaderwasnotmultipart:${s}`);let[,n,o]=i;if(o&&r&&o!==r)throw new Error(`Multipartboundarywasspecifiedas${o}intheheader,butgot${r}intherequestbody`);return r??=o,r?JJe(r):r=qJe(),t.headers.set("Content-Type",`${n};boundary=${r}`),await VJe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function mx(){return US()}var Yoe=MS({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),dQt=Yoe.logger;function hc(t){return Yoe.createClientLogger(t)}var fc=hc("core-rest-pipeline");function UL(t={}){return $S({logger:fc.info,...t})}var qL=jS;function GL(t={}){return JS(t)}var gx=M(require("node:os"),1),yx=M(require("node:process"),1);function Woe(){return"User-Agent"}async function Koe(t){if(yx.default&&yx.default.versions){let e=`${gx.default.type()}${gx.default.release()};${gx.default.arch()}`,r=yx.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 Ex="1.22.2";function r5e(t){let e=[];for(let[r,s]of t){let i=s?`${r}/${s}`:r;e.push(i)}return e.join(" ")}function Xoe(){return Woe()}async function Cx(t){let e=new Map;e.set("core-rest-pipeline",Ex),await Koe(e);let r=r5e(e);return t?`${t}${r}`:r}var Zoe=Xoe(),eae="userAgentPolicy";function HL(t={}){let e=Cx(t.userAgentPrefix);return{name:eae,async sendRequest(r,s){return r.headers.has(Zoe)||r.headers.set(Zoe,await e),s(r)}}}var Ln=class extends Error{constructor(e){super(e),this.name="AbortError"}};function zL(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:i}=e??{};return new Promise((n,o)=>{function a(){o(new Ln(i??"The operation was aborted."))}function c(){s?.removeEventListener("abort",l)}function l(){r?.(),c(),a()}if(s?.aborted)return a();try{t(u=>{c(),n(u)},u=>{c(),o(u)})}catch(u){o(u)}s?.addEventListener("abort",l)})}var a5e="The delay was aborted.";function bC(t,e){let r,{abortSignal:s,abortErrorMsg:i}=e??{};return zL(n=>{r=setTimeout(n,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:s,abortErrorMsg:i??a5e})}function Nd(t){if(uf(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 tae(t){return uf(t)}function hm(){return lf()}var bt=ff;var rae=Symbol("rawContent");function $L(t){return typeof t[rae]=="function"}function sae(t){return $L(t)?t[rae]():t}var Ix=IC;function jL(){let t=Ax();return{name:Ix,sendRequest:async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)$L(s.body)&&(s.body=sae(s.body));return t.sendRequest(e,r)}}}var JL=YS;function YL(){return WS()}function WL(t={}){return ZS(t)}function KL(){return ex()}function Rd(t){return OL(t)}function XL(t,e){return ux(t,e)}var iae="setClientRequestIdPolicy";function ZL(t="x-ms-client-request-id"){return{name:iae,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function eF(t){return dx(t)}function tF(t){return hx(t)}var fm={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function nae(t={}){let e=new rF(t.parentContext);return t.span&&(e=e.setValue(fm.span,t.span)),t.namespace&&(e=e.setValue(fm.namespace,t.namespace)),e}var rF=class t{_contextMap;constructor(e){this._contextMap=e instanceof t
`&&t[n]!=="\r";n++)c+=t[n];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),n--),!QYe(c)){let d;return c.trim().length===0?d="Invalid space after '<'.":d="Tag '"+c+"' is an invalid name.",Tr("InvalidTag",d,Ci(t,n))}let l=xYe(t,n);if(l===!1)return Tr("InvalidAttr","Attributes for '"+c+"' have open quote.",Ci(t,n));let u=l.value;if(n=l.index,u[u.length-1]==="/"){let d=n-u.length;u=u.substring(0,u.length-1);let h=Gae(u,e);if(h===!0)s=!0;else return Tr(h.err.code,h.err.msg,Ci(t,d+h.err.line))}else if(a)if(l.tagClosed){if(u.trim().length>0)return Tr("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",Ci(t,o));if(r.length===0)return Tr("InvalidTag","Closing tag '"+c+"' has not been opened.",Ci(t,o));{let d=r.pop();if(c!==d.tagName){let h=Ci(t,d.tagStartPos);return Tr("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+h.line+", col "+h.col+") instead of closing tag '"+c+"'.",Ci(t,o))}r.length==0&&(i=!0)}}else return Tr("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",Ci(t,n));else{let d=Gae(u,e);if(d!==!0)return Tr(d.err.code,d.err.msg,Ci(t,n-u.length+d.err.line));if(i===!0)return Tr("InvalidXml","Multiple possible root nodes found.",Ci(t,n));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:o}),s=!0}for(n++;n<t.length;n++)if(t[n]==="<")if(t[n+1]==="!"){n++,n=qae(t,n);continue}else if(t[n+1]==="?"){if(n=Uae(t,++n),n.err)return n}else break;else if(t[n]==="&"){let d=TYe(t,n);if(d==-1)return Tr("InvalidChar","char '&' is not expected.",Ci(t,n));n=d}else if(i===!0&&!Fae(t[n]))return Tr("InvalidXml","Extra text at the end",Ci(t,n));t[n]==="<"&&n--}}else{if(Fae(t[n]))continue;return Tr("InvalidChar","char '"+t[n]+"' is not expected.",Ci(t,n))}if(s){if(r.length==1)return Tr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Ci(t,r[0].tagStartPos));if(r.length>0)return Tr("InvalidXml","Invalid '"+JSON.stringify(r.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Tr("InvalidXml","Start tag expected.",1);return!0}function Fae(t){return t===" "||t===" "||t===`
`||t==="\r"}function Uae(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let s=t.substr(r,e-r);if(e>5&&s==="xml")return Tr("InvalidXml","XML declaration allowed only at the start of the document.",Ci(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function qae(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}}else if(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"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(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}}return e}var BYe='"',SYe="'";function xYe(t,e){let r="",s="",i=!1;for(;e<t.length;e++){if(t[e]===BYe||t[e]===SYe)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){i=!0;break}r+=t[e]}return s!==""?!1:{value:r,index:e,tagClosed:i}}var NYe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Gae(t,e){let r=_x(t,NYe),s={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return Tr("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",DC(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return Tr("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",DC(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return Tr("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",DC(r[i]));let n=r[i][2];if(!vYe(n))return Tr("InvalidAttr","Attribute '"+n+"' is an invalid name.",DC(r[i]));if(!Object.prototype.hasOwnProperty.call(s,n))s[n]=1;else return Tr("InvalidAttr","Attribute '"+n+"' is repeated.",DC(r[i]))}return!0}function RYe(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}function TYe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,RYe(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function Tr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function vYe(t){return CF(t)}function QYe(t){return CF(t)}function Ci(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function DC(t){return t.startIndex+t[1].length}var Hae={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"},zae={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 en("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=this.options,n=new MC(i.processEntities),o=t.length;for(let a=0;a<o;a++)if(t[a]==="<"){let l=t.charCodeAt(a+1);if(l===47){let u=ym(t,">",a,"Closing Tag is not closed."),d=t.substring(a+2,u).trim();if(i.removeNSPrefix){let f=d.indexOf(":");f!==-1&&(d=d.substr(f+1))}d=RF(i.transformTagName,d,"",i).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let h=this.matcher.getCurrentTag();if(d&&i.unpairedTagsSet.has(d))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${d}>`);h&&i.unpairedTagsSet.has(h)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),s="",a=u}else if(l===63){let u=TF(t,a,!1,"?>");if(!u)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let d=this.buildAttributesMap(u.tagExp,this.matcher,u.tagName,!0);if(d){let h=d[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(h)||1),n.setXmlVersion(Number(h)||1)}if(!(i.ignoreDeclaration&&u.tagName==="?xml"||i.ignorePiTags)){let h=new en(u.tagName);h.add(i.textNodeName,""),u.tagName!==u.tagExp&&u.attrExpPresent&&i.ignoreAttributes!==!0&&(h[":@"]=d),this.addChild(r,h,this.readonlyMatcher,a)}a=u.closeIndex+1}else if(l===33&&t.charCodeAt(a+2)===45&&t.charCodeAt(a+3)===45){let u=ym(t,"-->",a+4,"Comment is not closed.");if(i.commentPropName){let d=t.substring(a+4,u-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(i.commentPropName,[{[i.textNodeName]:d}])}a=u}else if(l===33&&t.charCodeAt(a+2)===68){let u=n.readDocType(t,a);this.entityDecoder.addInputEntities(u.entities),a=u.i}else if(l===33&&t.charCodeAt(a+2)===91){let u=ym(t,"]]>",a,"CDATA is not closed.")-2,d=t.substring(a+9,u);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let h=this.parseTextData(d,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);h==null&&(h=""),i.cdataPropName?r.add(i.cdataPropName,[{[i.textNodeName]:d}]):r.add(i.textNodeName,h),a=u+2}else{let u=TF(t,a,i.removeNSPrefix);if(!u){let P=t.substring(Math.max(0,a-50),Math.min(o,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${P}"`)}let d=u.tagName,h=u.rawTagName,f=u.tagExp,p=u.attrExpPresent,A=u.closeIndex;if({tagName:d,tagExp:f}=RF(i.transformTagName,d,f,i),i.strictReservedNames&&(d===i.commentPropName||d===i.cdataPropName||d===i.textNodeName||d===i.attributesGroupName))throw new Error(`Invalid tag name: ${d}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher,!1));let E=r;E&&i.unpairedTagsSet.has(E.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let y=!1;f.length>0&&f.lastIndexOf("/")===f.length-1&&(y=!0,d[d.length-1]==="/"?(d=d.substr(0,d.length-1),f=d):f=f.substr(0,f.length-1),p=d!==f);let C=null,w={},S;S=e3e(h),d!==e.tagname&&this.matcher.push(d,{},S),d!==f&&p&&(C=this.buildAttributesMap(f,this.matcher,d),C&&(w=ZYe(C,i))),d!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=a;if(this.isCurrentNodeStopNode){let P="";if(y)a=u.closeIndex;else if(i.unpairedTagsSet.has(d))a=u.closeIndex;else{let k=this.readStopNodeData(t,h,A+1);if(!k)throw new Error(`Unexpected end of ${h}`);a=k.i,P=k.tagContent}let D=new en(d);C&&(D[":@"]=C),D.add(i.textNodeName,P),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,D,this.readonlyMatcher,N)}else{if(y){({tagName:d,tagExp:f}=RF(i.transformTagName,d,f,i));let P=new en(d);C&&(P[":@"]=C),this.addChild(r,P,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(d)){let P=new en(d);C&&(P[":@"]=C),this.addChild(r,P,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=u.closeIndex;continue}else{let P=new en(d);if(this.tagsNodeStack.length>i.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),C&&(P[":@"]=C),this.addChild(r,P,this.readonlyMatcher,N),r=P}s="",a=A}}}elses+=t[a];returne.child};functiono
`}),s}getCanonicalizedResourceString(e){let r=jx(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let i=Jx(e.url),n={};if(i){let o=[];for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){let c=a.toLowerCase();n[c]=i[a],o.push(c)}o.sort();for(let a of o)s+=`
`}),a}function i(n){let o=jx(n.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=Jx(n.url),l={};if(c){let u=[];for(let d in c)if(Object.prototype.hasOwnProperty.call(c,d)){let h=d.toLowerCase();l[h]=c[d],u.push(h)}u.sort();for(let d of u)a+=`
`),n=e.computeHMACSHA256(i);return{sasQueryParameters:new Ra(t.version,n,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function zWe(t,e){if(t=Qf(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=Dc.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?wt(t.startsOn,!1):"",t.expiresOn?wt(t.expiresOn,!1):"",vf(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Na(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(n);return{sasQueryParameters:new Ra(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:n}}function VWe(t,e){if(t=Qf(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=Dc.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?wt(t.startsOn,!1):"",t.expiresOn?wt(t.expiresOn,!1):"",vf(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Na(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(n);return{sasQueryParameters:new Ra(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:n}}function $We(t,e){if(t=Qf(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=Dc.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?wt(t.startsOn,!1):"",t.expiresOn?wt(t.expiresOn,!1):"",vf(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?wt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?wt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Na(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(n);return{sasQueryParameters:new Ra(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:n}}function jWe(t,e){if(t=Qf(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=Dc.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?wt(t.startsOn,!1):"",t.expiresOn?wt(t.expiresOn,!1):"",vf(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?wt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?wt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Na(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(n);return{sasQueryParameters:new Ra(t.version,o,i,void 0,void 0,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:n}}function JWe(t,e){if(t=Qf(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=Dc.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?wt(t.startsOn,!1):"",t.expiresOn?wt(t.expiresOn,!1):"",vf(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?wt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?wt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Na(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(n);return{sasQueryParameters:new Ra(t.version,o,i,void 0,void 0,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:n}}function YWe(t,e){if(t=Qf(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=Dc.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?wt(t.startsOn,!1):"",t.expiresOn?wt(t.expiresOn,!1):"",vf(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?wt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?wt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Na(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(n);return{sasQueryParameters:new Ra(t.version,o,i,void 0,void 0,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:n}}function vf(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}function Qf(t){let e=t.version?t.version:Zx;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}var sI=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let s=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=s.container):(this._isContainer=!1,this._containerOrBlobOperation=s.blob),r||(r=hm()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==wa||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==wa||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return be.withSpan("BlobLeaseClient-acquireLease",r,async s=>xe(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:s.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==wa||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==wa||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return be.withSpan("BlobLeaseClient-changeLease",r,async s=>{let i=xe(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:s.tracingOptions}));return this._leaseId=e,i})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==wa||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==wa||e.conditions?.tagConditions))throw new RangeError("The IfMatch,
Ifyouareusingself-hostedrunners,pleasemakesureyourrunnerhasaccesstoallGitHubendpoints: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"}};_m.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Of=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.
Moreinfoonstoragelimits:https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Of.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var fI=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var $9e=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function a(u){try{l(s.next(u))}catch(d){o(d)}}function c(u){try{l(s.throw(u))}catch(d){o(d)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},QG=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),s=Date.now()-this.startTime,i=(e/(1024*1024)/(s/1e3)).toFixed(1);q(`Sent ${e} of ${this.contentLength} (${r}%), ${i} 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 Lue(t,e,r){return $9e(this,void 0,void 0,function*(){var s;let i=new su(t),n=i.getBlockBlobClient(),o=new QG((s=r?.archiveSizeBytes)!==null&&s!==void 0?s:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),T(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let c=yield n.uploadFile(e,a);if(c._response.status>=400)throw new iR(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw Pt(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}var Uue=M(require("buffer"),1),kc=M(require("fs"),1),que=M(require("stream"),1),Gue=M(require("util"),1);var nR=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function a(u){try{l(s.next(u))}catch(d){o(d)}}function c(u){try{l(s.throw(u))}catch(d){o(d)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})};function oR(t){return t?t>=200&&t<300:!1}function j9e(t){return t?t>=500:!0}function J9e(t){return t?[ir.BadGateway,ir.ServiceUnavailable,ir.GatewayTimeout].includes(t):!1}function Y9e(t){return nR(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function Fue(t,e,r){return nR(this,arguments,void 0,function*(s,i,n,o=_S,a=PS,c=void 0){let l="",u=1;for(;u<=o;){let d,h,f=!1;try{d=yield i()}catch(p){c&&(d=c(p)),f=!0,l=p.message}if(d&&(h=n(d),!j9e(h)))return d;if(h&&(f=J9e(h),l=`Cache service responded with ${h}`),T(`${s} - Attempt ${u} of ${o} failed with error: ${l}`),!f){T(`${s} - Error is not retryable`);break}yield Y9e(a),u++}throw Error(`${s} failed: ${l}`)})}function pI(t,e){return nR(this,arguments,void 0,function*(r,s,i=_S,n=PS){return yield Fue(r,s,o=>o.statusCode,i,n,o=>{if(o instanceof tc)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function Pm(t,e){return nR(this,arguments,void 0,function*(r,s,i=_S,n=PS){return yield Fue(r,s,o=>o.message.statusCode,i,n)})}var Do=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function a(u){try{l(s.next(u))}catch(d){o(d)}}function c(u){try{l(s.throw(u))}catch(d){o(d)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})};function W9e(t,e){return Do(this,void 0,void 0,function*(){yield Gue.promisify(que.pipeline)(t.message,e)})}var aR=class{constructor(e){this.contentLength=e,this.segmentIndex=0,this.s
Othercacheswithsimilarkey:`);for(let a of n?.artifactCaches||[])T(`CacheKey:${a?.cacheKey},CacheVersion:${a?.cacheVersion},CacheScope:${a?.scope},CacheCreated:${a?.creationTime}`)}}})}function OG(t,e,r){return nn(this,void 0,void 0,function*(){let s=new Xue.URL(t),i=$ue(r);s.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield zue(t,e,i):i.concurrentBlobDownloads?yield Hue(t,e,i):yield cR(t,e):yield cR(t,e)})}function ede(t,e,r){return nn(this,void 0,void 0,function*(){let s=DG(),i=im(e,r?.compressionMethod,r?.enableCrossOsArchive),n={key:t,version:i,cacheSize:r?.cacheSize};return yield pI("reserveCache",()=>nn(this,void 0,void 0,function*(){return s.postJson(mI("caches"),n)}))})}function Kue(t,e){return`bytes${t}-${e}/*`}function iKe(t,e,r,s,i){return nn(this,void 0,void 0,function*(){T(`Uploadingchunkofsize${i-s+1}bytesatoffset${s}withcontentrange:${Kue(s,i)}`);let n={"Content-Type":"application/octet-stream","Content-Range":Kue(s,i)},o=yield Pm(`uploadChunk(start:${s},end:${i})`,()=>nn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),n)}));if(!oR(o.message.statusCode))throw new Error(`Cacheservicerespondedwith${o.message.statusCode}duringuploadchunk.`)})}function nKe(t,e,r,s){return nn(this,void 0,void 0,function*(){let i=cc(r),n=mI(`caches/${e.toString()}`),o=Dm.openSync(r,"r"),a=_G(s),c=lL("uploadConcurrency",a.uploadConcurrency),l=lL("uploadChunkSize",a.uploadChunkSize),u=[...new Array(c).keys()];T("Awaiting all uploads");let d=0;try{yield Promise.all(u.map(()=>nn(this,void 0,void 0,function*(){for(;d<i;){let h=Math.min(i-d,l),f=d,p=d+h-1;d+=l,yield iKe(t,n,()=>Dm.createReadStream(r,{fd:o,start:f,end:p,autoClose:!1}).on("error",A=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${A.message}`)}),f,p)}})))}finally{Dm.closeSync(o)}})}function oKe(t,e,r){return nn(this,void 0,void 0,function*(){let s={size:r};return yield pI("commitCache",()=>nn(this,void 0,void 0,function*(){return t.postJson(mI(`caches/${e.toString()}`),s)}))})}function kG(t,e,r,s){return nn(this,void 0,void 0,function*(){if(_G(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Lue(r,e,s)}else{let n=DG();T("Upload cache"),yield nKe(n,t,e,s),T("Commiting cache");let o=cc(e);q(`CacheSize:~${Math.round(o/(1024*1024))}MB(${o}B)`);let a=yield oKe(n,t,o);if(!oR(a.statusCode))throw new Error(`Cacheservicerespondedwith${a.statusCode}duringcommitcache.`);q("Cache saved successfully")}})}var Jde=M(qde(),1),Pr=M(_r(),1),zn=M(_r(),1),Uf=M(_r(),1),qf=M(_r(),1),Gf=M(_r(),1);var vH=M(_r(),1),QH=M(_r(),1),Vde=M(_r(),1),$de=M(_r(),1),jde=M(_r(),1);var NH=M(_r(),1),RH=M(_r(),1),Gde=M(_r(),1),Hde=M(_r(),1),zde=M(_r(),1),TH=class extends zde.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,Hde.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Gde.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,i){let n=i??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:n.scope=e.string();break;case 2:n.permission=e.int64().toString();break;default:let l=s.readUnknownField;if(l==="throw")throw new globalThis.Error(`Unknownfield${a}(wiretype${c})for${this.typeName}`);let u=e.skip(c);l!==!1&&(l===!0?RH.UnknownFieldHandler.onRead:l)(this.typeName,n,a,c,u)}}return n}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,NH.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,NH.WireType.Varint).int64(e.permission);let i=s.writeUnknownFields;return i!==!1&&(i==!0?RH.UnknownFieldHandler.onWrite:i)(this.typeName,e,r),r}},YR=new TH;var _H=class extends jde.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:()=>YR}])}create(e){let r={repositoryId:"0",scope:[]};
`));let s=yield jH(r,"create");yield JH(s,t)})}var Km=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function a(u){try{l(s.next(u))}catch(d){o(d)}}function c(u){try{l(s.throw(u))}catch(d){o(d)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},Qa=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Wm=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},ZR=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Xde(t){if(!t||t.length===0)throw new Qa("Path Validation Error: At least one directory or file path is required")}function KH(t){if(t.length>512)throw new Qa(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new Qa(`KeyValidationError:${t}cannotcontaincommas.`)}function XH(){return AI()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function Zde(t,e,r,s){return Km(this,arguments,void 0,function*(i,n,o,a,c=!1){let l=AI();return T(`Cacheserviceversion:${l}`),Xde(i),l==="v2"?yield IZe(i,n,o,a,c):yield CZe(i,n,o,a,c)})}function CZe(t,e,r,s){return Km(this,arguments,void 0,function*(i,n,o,a,c=!1){o=o||[];let l=[n,...o];if(T("Resolved Keys:"),T(JSON.stringify(l)),l.length>10)throw new Qa("Key Validation Error: Keys are limited to a maximum of 10.");for(let h of l)KH(h);let u=yield AC(),d="";try{let h=yield Zue(l,i,{compressionMethod:u,enableCrossOsArchive:c});if(!h?.archiveLocation)return;if(a?.lookupOnly)return q("Lookup only - skipping download"),h.cacheKey;d=_I.join(yield fC(),Sd(u)),T(`ArchivePath:${d}`),yield OG(h.archiveLocation,d,a),yo()&&(yield QI(d,u));let f=cc(d);return q(`CacheSize:~${Math.round(f/(1024*1024))}MB(${f}B)`),yield YH(d,u),q("Cache restored successfully"),h.cacheKey}catch(h){let f=h;if(f.name===Qa.name)throw h;f instanceof tc&&typeof f.statusCode=="number"&&f.statusCode>=500?jA(`Failedtorestore:${h.message}`):Pt(`Failedtorestore:${h.message}`)}finally{try{yield pC(d)}catch(h){T(`Failedtodeletearchive:${h}`)}}})}function IZe(t,e,r,s){return Km(this,arguments,void 0,function*(i,n,o,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let l=[n,...o];if(T("Resolved Keys:"),T(JSON.stringify(l)),l.length>10)throw new Qa("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of l)KH(d);let u="";try{let d=$H(),h=yield AC(),f={key:n,restoreKeys:o,version:im(i,h,c)},p=yield d.GetCacheEntryDownloadURL(f);if(!p.ok){T(`Cachenotfoundforversion${f.version}ofkeys:${l.join(", ")}`);return}if(f.key!==p.matchedKey?q(`Cachehitforrestore-key:${p.matchedKey}`):q(`Cachehitfor:${p.matchedKey}`),a?.lookupOnly)return q("Lookup only - skipping download"),p.matchedKey;u=_I.join(yield fC(),Sd(h)),T(`Archivepath:${u}`),T(`Startingdownloadofarchiveto:${u}`),yield OG(p.signedDownloadUrl,u,a);let E=cc(u);return q(`CacheSize:~${Math.round(E/(1024*1024))}MB(${E}B)`),yo()&&(yield QI(u,h)),yield YH(u,h),q("Cache restored successfully"),p.matchedKey}catch(d){let h=d;if(h.name===Qa.name)throw d;h instanceof tc&&typeof h.statusCode=="number"&&h.statusCode>=500?jA(`Failedtorestore:${d.message}`):Pt(`Failedtorestore:${d.message}`)}finally{try{u&&(yield pC(u))}catch(d){T(`Failedtodeletearchive:${d}`)}}})}function ZH(t,e,r){return Km(this,arguments,void 0,function*(s,i,n,o=!1){let a=AI();return T(`Cacheserviceversion:${a}`),Xde(s),KH(i),a==="v2"?yield wZe(s,i,n,o):yield bZe(s,i,n,o)})}function bZe(t,e,r){return Km(this,arguments,void 0,function*(s,i,n,o=!1){var a,c,l,u,d;let h=yield AC(),f=-1,p=yield cL(s);if(T("Cache Paths:"),T(`${JSON.stringify(p)}`),p.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let A=yield fC(),E=_I.join(A,Sd(h));T(`ArchivePath:${E}`);try{yie
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let i of s){if(i.length==1&&!i[0].startsWith("type="))return e=="local";for(let[n,o]of i.map(a=>a.split("=").map(c=>c.trim())))if(n=="type"&&o==e)return!0}return!1}static hasAttestationType(e,r){let s=Jn(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let i of s)for(let[n,o]of i.map(a=>a.split("=").map(c=>c.trim())))if(n=="type"&&o==e)return!0;return!1}static resolveAttestationAttrs(e){let r=Jn(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let i of r)for(let n of i)try{let o=vt.parseBool(n);s.push(`disabled=${!o}`)}catch{s.push(n)}return s.join(",")}static hasGitAuthTokenSecret(e,r){for(let s of e){if(r&&s.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(s.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let s=e.indexOf("="),i=e.substring(0,s),n=e.substring(s+1);if(i.length==0||n.length==0)throw new Error(`${e}isnotavalidsecret`);return r&&rc(n),[i,n]}};var Kz=M(require("fs"),1),mAe=M(require("path"),1);var QT=class t{buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new yt,this.metadataFilename=`bake-metadata-${vt.generateRandomString()}.json`}getMetadataFilePath(){return mAe.default.join(Tt.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!Kz.default.existsSync(e))return;let r=Kz.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let s in e)"buildx.build.ref"in e[s]&&r.push(e[s]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let s=["bake"],i,n=[],o=[...e.files||[],e.source];if(o){for(let c of o.map(l=>l?l.trim():""))if(c.length!=0){if(!vt.isValidRef(c)){n.push(c);continue}if(i)throw new Error("Only one remote bake definition can be defined");i=c}}i&&s.push(i);for(let c of n)s.push("--file",c);if(e.overrides)for(let c of e.overrides)s.push("--set",c);if(e.allow)for(let c of e.allow)s.push("--allow",c);e.call&&s.push("--call",e.call),e.load&&s.push("--load"),e.noCache&&s.push("--no-cache"),e.provenance&&s.push("--provenance",e.provenance),e.push&&s.push("--push"),e.sbom&&s.push("--sbom",e.sbom);let a=await this.buildx.getCommand([...s,"--print",...e.targets||[]]);return await Ne.getExecOutput(a.command,a.args,r).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(`cannotparsebakedefinitions:${c.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(c.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let s in r.target){let i=r.target[s];i.attest&&Array.isArray(i.attest)&&(i.attest=i.attest.map(n=>t.parseAttestEntry(n))),i["cache-from"]&&Array.isArray(i["cache-from"])&&(i["cache-from"]=i["cache-from"].map(n=>t.parseCacheEntry(n))),i["cache-to"]&&Array.isArray(i["cache-to"])&&(i["cache-to"]=i["cache-to"].map(n=>t.parseCacheEntry(n))),i.output&&Array.isArray(i.output)&&(i.output=i.output.map(n=>t.parseExportEntry(n))),i.secret&&Array.isArray(i.secret)&&(i.secret=i.secret.map(n=>t.parseSecretEntry(n))),i.ssh&&Array.isArray(i.ssh)&&(i.ssh=i.ssh.map(n=>t.parseSSHEntry(n)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},s=Jn(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of s){let[n,o]=i.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());switch(n){case"type":r.type=o;break;case"disabled":r.disabled=vt.parseBool(o);break;default:r[n]=o}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=Jn(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(s.length===1&&!s[0].includes("="))return r.type="registry",r.ref=s[0],r;for(let i of s){let[n,o]=i.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());n==="type"?r.type=o:r[n]=o}ret
${l}`),await new Promise(u=>setTimeout(u,Math.pow(2,o)*100));else throw n}else throw new Error(`Cosignverifycommandfailedwith:${a.stderr.trim().split(/\r?\n/).filter(l=>l.length>0).pop()??"unknown error"}`)}throw n}async signProvenanceBlobs(e){let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let s=this.signingEndpoints(e.noTransparencyLog);q(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let i=t.getProvenanceBlobs(e);for(let n of Object.keys(i))await Yt(`Signing${n}`,async()=>{let o=i[n],a=wh.default.join(wh.default.dirname(n),`${e.name??"provenance"}.sigstore.json`),c=t.getProvenanceSubjects(o);if(c.length===0){Pt(`Nosubjectsfoundinprovenance${n},skipsigning.`);return}let l=await t.signPayload({data:o,type:Oxe},s),u=t.parseBundle(l);q("Provenance blob signed for:");for(let d of c){let[h,f]=Object.entries(d.digest)[0]||[];q(`-${d.name}(${h}:${f})`)}u.tlogID&&q(`AttestationsignatureuploadedtoRekortransparencylog:${Gp}?logIndex=${u.tlogID}`),q(`WritingSigstorebundleto:${a}`),yl.default.writeFileSync(a,JSON.stringify(u.payload,null,2),{encoding:"utf-8"}),r[n]={...u,bundlePath:a,subjects:c}})}catch(s){throw new Error(`SigningBuildKitprovenanceblobsfailed:${s.message}`)}return r}async verifySignedArtifacts(e,r){let s={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[i,n]of Object.entries(e)){let o=wh.default.dirname(i);await Yt(`Verifyingsignaturebundle${n.bundlePath}`,async()=>{for(let a of n.subjects){let c=wh.default.join(o,a.name);q(`Verifyingsignedartifact${c}`);let l=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp];(r.noTransparencyLog||!n.tlogID)&&l.push("--use-signed-timestamps","--insecure-ignore-tlog");let u=await Ne.getExecOutput("cosign",[...l,"--bundle",n.bundlePath,c],{ignoreReturnCode:!0});if(u.stderr.length>0&&u.exitCode!=0)throw new Error(u.stderr);s[c]={bundlePath:n.bundlePath,cosignArgs:l}}})}return s}async verifyArtifact(e,r,s){q("Verifying keyless verification bundle signature");let i=JSON.parse(yl.default.readFileSync(r,"utf-8")),n=(0,Db.bundleFromJSON)(i);q("Fetching Sigstore TUF trusted root metadata");let o=await Uxe.getTrustedRoot(),a=(0,Ty.toTrustMaterial)(o);try{q("Verifying artifact signature");let c=(0,Ty.toSignedEntity)(n,yl.default.readFileSync(e)),l=t.parseCertificate(n),u=n.verificationMaterial.tlogEntries,d=u.length>0?u[0].logIndex:void 0;if(s?.subjectAlternativeName&&s?.subjectAlternativeName instanceof RegExp){let p=l.subjectAltName?.replace(/^uri:/i,"");if(p){if(!p.match(s.subjectAlternativeName))throw new Error(`SigningcertificatesubjectAlternativeName"${p}"doesnotmatchexpectedpattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let f=new Ty.Verifier(a).verify(c,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return T(`Sigstore.verifyArtifactsigner:${JSON.stringify(f)}`),{payload:i,certificate:l.toString(),tlogID:d}}catch(c){throw new Error(`Failedtoverifyartifactsignature:${c}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),q(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:kxe,rekorURL:e?void 0:Mxe,tsaServerURL:Lxe}}static noTransparencyLog(e){return e??Rt.context.payload.repository?.private}static getProvenanceBlobs(e){let r=wh.default.join(e.localExportDir,"provenance.json");if(yl.default.existsSync(r))return{[r]:yl.default.readFileSync(r)};let s=yl.default.readdirSync(e.localExportDir,{withFileTypes:!0}),i=s.filter(n=>n.isDirectory());if(i.length>0&&i.length===s.length&&i.every(n=>yl.default.existsSync(wh.default.join(e.localExportDir,n.name,"provenance.json")))){let n={};for(let o of i){let a=wh.default.join(e.localExportDir,o.name,"