varkDe=Object.create;varrk=Object.defineProperty;varMDe=Object.getOwnPropertyDescriptor;varLDe=Object.getOwnPropertyNames;varFDe=Object.getPrototypeOf,UDe=Object.prototype.hasOwnProperty;varqDe=(t,e)=>()=>(t&&(e=t(t=0)),e);varA=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),PK=(t,e)=>{for(varrine)rk(t,r,{get:e[r],enumerable:!0})},GDe=(t,e,r,s)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofLDe(e))!UDe.call(t,i)&&i!==r&&rk(t,i,{get:()=>e[i],enumerable:!(s=MDe(e,i))||s.enumerable});returnt};varD=(t,e,r)=>(r=t!=null?kDe(FDe(t)):{},GDe(e||!t||!t.__esModule?rk(r,"default",{value:t,enumerable:!0}):r,t));varvX=A(XA=>{"use strict";varBkt=require("net"),gLe=require("tls"),Ik=require("http"),BX=require("https"),yLe=require("events"),xkt=require("assert"),ELe=require("util");XA.httpOverHttp=CLe;XA.httpsOverHttp=ILe;XA.httpOverHttps=bLe;XA.httpsOverHttps=wLe;functionCLe(t){vare=newZl(t);returne.request=Ik.request,e}functionILe(t){vare=newZl(t);returne.request=Ik.request,e.createSocket=xX,e.defaultPort=443,e}functionbLe(t){vare=newZl(t);returne.request=BX.request,e}functionwLe(t){vare=newZl(t);returne.request=BX.request,e.createSocket=xX,e.defaultPort=443,e}functionZl(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||Ik.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(s,i,n,o){for(vara=NX(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)})}ELe.inherits(Zl,yLe.EventEmitter);Zl.prototype.addRequest=function(e,r,s,i){varn=this,o=bk({request:e},n.options,NX(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)}})};Zl.prototype.createSocket=function(e,r){vars=this,i={};s.sockets.push(i);varn=bk({},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")),kh("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(h){h.upgrade=!0}functionc(h,d,f){process.nextTick(function(){l(h,d,f)})}functionl(h,d,f){if(o.removeAllListeners(),d.removeAllListeners(),h.statusCode!==200){kh("tunneling socket could not be established, statusCode=%d",h.statusCode),d.destroy();varp=newError("tunneling socket could not be established, statusCode="+h.statusCode);p.code="ECONNRESET",e.request.emit("error",p),s.removeSocket(i);return}if(f.length>0){kh("got illegal response body from proxy"),d.destroy();varp=newError("got illegal response body from proxy");p.code="ECONNRESET",e.request.emit("error",p),s.removeSocket(i);return}returnkh("tunneling connection has established"),s.sockets[s.sockets.indexOf(i)]=d,r(d)}functionu(h){o.removeAllListeners(),kh(`tunneling socket could not be established, cause=%s
`);d.push(m),n+=m.byteLength,p&&(n=null),i=t,s=async function*(){for(let E of d)E.stream?yield*E.stream():yield E},o=`multipart/form-data;boundary=${c}`}else if(D7(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(SC.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:qUe(t)}if((typeof i=="string"||SC.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:h}=await c.next();if(h)queueMicrotask(()=>{l.close(),l.byobRequest?.respond(0)});else if(!F7(r)){let d=new Uint8Array(u);d.byteLength&&l.enqueue(d)}return l.desiredSize>0},async cancel(l){await c.return()},type:"bytes"})}return[{stream:r,source:i,length:n},o]}function eqe(t,e=!1){return t instanceof ReadableStream&&(NM(!SC.isDisturbed(t),"The body has already been consumed."),NM(!t.locked,"The stream is locked.")),G7(t,e)}function tqe(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function rqe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function sqe(t){return{blob(){return hm(this,r=>{let s=M7(this);return s===null?s="":s&&(s=KUe(s)),new JUe([r],{type:s})},t)},arrayBuffer(){return hm(this,r=>new Uint8Array(r).buffer,t)},text(){return hm(this,L7,t)},json(){return hm(this,nqe,t)},formData(){return hm(this,r=>{let s=M7(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let i=XUe(r,s);if(i==="failure")throw new TypeError("Failed to parse body as FormData.");let n=new k7;return n[dm]=i,n}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(r.toString()),n=new k7;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 hm(this,r=>new Uint8Array(r),t)}}}function iqe(t){Object.assign(t.prototype,sqe(t))}async function hm(t,e,r){if(jUe.brandCheck(t,r),H7(t))throw new TypeError("Body is unusable: Body has already been read");rqe(t[dm]);let s=VUe(),i=o=>s.reject(o),n=o=>{try{s.resolve(e(o))}catch(a){i(a)}};return t[dm].body==null?(n(Buffer.allocUnsafe(0)),s.promise):(await zUe(t[dm].body,n,i),s.promise)}function H7(t){let e=t[dm].body;return e!=null&&(e.stream.locked||SC.isDisturbed(e.stream))}function nqe(t){return JSON.parse(L7(t))}function M7(t){let e=t[dm].headersList,r=$Ue(e);return r==="failure"?null:r}V7.exports={extractBody:G7,safelyExtractBody:eqe,cloneBody:tqe,mixinBody:iqe,streamRegistry:q7,hasFinalizationRegistry:U7,bodyUnusable:H7}});var oee=A((rMt,nee)=>{"use strict";var Re=require("node:assert"),Pe=st(),{channels:z7}=em(),RM=uM(),{RequestContentLengthMismatchError:Bf,ResponseContentLengthMismatchError:$7,RequestAbortedError:eee,HeadersTimeoutError:oqe,HeadersOverflowError:aqe,SocketError:pm,InformationalError:Am,BodyTimeoutError:cqe,HTTPParserError:lqe,ResponseExceededMaxSizeError:uqe}=gt(),{kUrl:tee,kReset:on,kClient:SB,kParser:Kt,kBlocking:NC,kRunning:Yr,kPending:ree,kSize:j7,kWriting:Lh,kQueue:Ra,kNoRef:BC,kKeepAliveDefaultTimeout:hqe,kHostHeader:dqe,kPendingIdx:fqe,kRunningIdx:_o,kError:bi,kPipelining:BB,kSocket:Nf,kKeepAliveTimeoutValue:NB,kMaxHeadersSize:TM,kKeepAliveMaxTimeout:pqe,kKeepAliveTimeoutThreshold:Aqe,kHeadersTimeout:mqe,kBodyTimeout:gqe,kStrictContentLength:PM,kMaxRequests:J7,kCounter:yqe,kMaxResponseSize:Eqe,kOnError:Y7,kResume:nu,kHTTPContext:see}=or(),Un=qZ(),W7=Buffer.alloc(0),IB=Buffer[Symbol.species],bB=Pe.addListener,Cqe=Pe.removeAllListeners,vf=Symbol("kIdleSocketValidation"),xf=Symbol("kIdleSocketValidationTimeout"),MM=Symbol("kSocketUsed"),_M;async function Iqe(){let t=process.env.JEST_WORKER_ID?fM():void 0,e;try{e=await WebAssembly.compile(VZ())}catch{e=await WebAssembly.compile(t||fM())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,i)=>0,wasm_on_status:(r,s,i)=>{Re(yr.ptr===r);let n=s-mc+Ac.byteOffset;return yr.onStatus(new IB(Ac.buffer,n,i))||0
`}return z7.sendHeaders.hasSubscribers&&z7.sendHeaders.publish({request:e,headers:m,socket:f}),!c||d===0?X7(p,null,t,e,f,u,m,h):Pe.isBuffer(c)?X7(p,c,t,e,f,u,m,h):Pe.isBlobLike(c)?typeof c.stream=="function"?Z7(p,c.stream(),t,e,f,u,m,h):Rqe(p,c,t,e,f,u,m,h):Pe.isStream(c)?vqe(p,c,t,e,f,u,m,h):Pe.isIterable(c)?Z7(p,c,t,e,f,u,m,h):Re(!1),!0}function vqe(t,e,r,s,i,n,o,a){Re(n!==0||r[Yr]===0,"stream body cannot be pipelined");let c=!1,l=new vB({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(m){Pe.destroy(this,m)}},h=function(){c||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!c){let p=new eee;queueMicrotask(()=>f(p))}},f=function(p){if(!c){if(c=!0,Re(i.destroyed||i[Lh]&&r[Yr]<=1),i.off("drain",h).off("error",f),e.removeListener("data",u).removeListener("end",f).removeListener("close",d),!p)try{l.end()}catch(m){p=m}l.destroy(p),p&&(p.code!=="UND_ERR_INFO"||p.message!=="reset")?Pe.destroy(e,p):Pe.destroy(e)}};e.on("data",u).on("end",f).on("error",f).on("close",d),e.resume&&e.resume(),i.on("drain",h).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(d)}function X7(t,e,r,s,i,n,o,a){try{e?Pe.isBuffer(e)&&(Re(n===e.byteLength,"buffer body must have content length"),i.cork(),i.write(`${o}content-length:${n}\r
`,"latin1"):(Re(n===null,"no body must not have content length"),i.write(`${o}\r
`,"latin1")),s.onRequestSent(),r[nu]()}catch(c){t(c)}}async function Rqe(t,e,r,s,i,n,o,a){Re(n===e.size,"blob body must have content length");try{if(n!=null&&n!==e.size)throw new Bf;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[on]=!0),r[nu]()}catch(c){t(c)}}async function Z7(t,e,r,s,i,n,o,a){Re(n!==0||r[Yr]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let d=c;c=null,d()}}let u=()=>new Promise((d,f)=>{Re(c===null),i[bi]?f(i[bi]):c=d});i.on("close",l).on("drain",l);let h=new vB({abort:t,socket:i,request:s,contentLength:n,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(i[bi])throw i[bi];h.write(d)||await u()}h.end()}catch(d){h.destroy(d)}finally{i.off("close",l).off("drain",l)}}var vB=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[Lh]=!0}write(e){let{socket:r,request:s,contentLength:i,client:n,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[bi])throw r[bi];if(r.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(i!==null&&o+l>i){if(n[PM])throw new Bf;process.emitWarning(new Bf)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[on]=!0),i===null?r.write(`${c}transfer-encoding:chunked\r
`,"latin1"),r!==null&&i!==r){if(s[PM])throw new Bf;process.emitWarning(new Bf)}e[Kt].timeout&&e[Kt].timeoutType===mm&&e[Kt].timeout.refresh&&e[Kt].timeout.refresh(),s[nu]()}}destroy(e){let{socket:r,client:s,abort:i}=this;r[Lh]=!1,e&&(Re(s[Yr]<=1,"pipeline should only contain this request"),i(e))}};nee.exports=wqe});var pee=A((sMt,fee)=>{"use strict";var Qo=require("node:assert"),{pipeline:Tqe}=require("node:stream"),ct=st(),{RequestContentLengthMismatchError:LM,RequestAbortedError:aee,SocketError:vC,InformationalError:FM}=gt(),{kUrl:RB,kReset:_B,kClient:gm,kRunning:QB,kPending:_qe,kQueue:Fh,kPendingIdx:UM,kRunningIdx:Ta,kError:Qa,kSocket:gs,kStrictContentLength:Qqe,kOnError:qM,kMaxConcurrentStreams:dee,kHTTP2Session:_a,kResume:Uh,kSize:Pqe,kHTTPContext:Oqe}=or(),ou=Symbol("open streams"),cee,lee=!1,TB;try{TB=require("node:http2")}catch{TB={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:Dqe,HTTP2_HEADER_METHOD:kqe,HTTP2_HEADER_PATH:Mqe,HTTP2_HEADER_SCHEME:Lqe,HTTP2_HEADER_CONTENT_LENGTH:Fqe,HTTP2_HEADER_EXPECT:Uqe,HTTP2_HEADER_STATUS:qqe}}=TB;function Gqe(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 Hqe(t,e){t[gs]=e,lee||(lee=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=TB.connect(t[RB],{createConnection:()=>e,peerMaxConcurrentStreams:t[dee]});r[ou]=0,r[gm]=t,r[gs]=e,ct.addListener(r,"error",zqe),ct.addListener(r,"frameError",$qe),ct.addListener(r,"end",jqe),ct.addListener(r,"goaway",Jqe),ct.addListener(r,"close",function(){let{[gm]:i}=this,{[gs]:n}=i,o=this[gs][Qa]||this[Qa]||new vC("closed",ct.getSocketInfo(n));if(i[_a]=null,i.destroyed){Qo(i[_qe]===0);let a=i[Fh].splice(i[Ta]);for(let c=0;c<a.length;c++){let l=a[c];ct.errorRequest(i,l,o)}}}),r.unref(),t[_a]=r,e[_a]=r,ct.addListener(e,"error",function(i){Qo(i.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Qa]=i,this[gm][qM](i)}),ct.addListener(e,"end",function(){ct.destroy(this,new vC("other side closed",ct.getSocketInfo(this)))}),ct.addListener(e,"close",function(){let i=this[Qa]||new vC("closed",ct.getSocketInfo(this));t[gs]=null,this[_a]!=null&&this[_a].destroy(i),t[UM]=t[Ta],Qo(t[QB]===0),t.emit("disconnect",t[RB],[t],i),t[Uh]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...i){return Wqe(t,...i)},resume(){Vqe(t)},destroy(i,n){s?queueMicrotask(n):e.destroy(i).on("close",n)},get destroyed(){return e.destroyed},busy(){return!1}}}function Vqe(t){let e=t[gs];e?.destroyed===!1&&(t[Pqe]===0&&t[dee]===0?(e.unref(),t[_a].unref()):(e.ref(),t[_a].ref()))}function zqe(t){Qo(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[gs][Qa]=t,this[gm][qM](t)}function $qe(t,e,r){if(r===0){let s=new FM(`HTTP/2:"frameError"received-type${t},code${e}`);this[gs][Qa]=s,this[gm][qM](s)}}function jqe(){let t=new vC("other side closed",ct.getSocketInfo(this[gs]));this.destroy(t),ct.destroy(this[gs],t)}function Jqe(t){let e=this[Qa]||new vC(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,ct.getSocketInfo(this)),r=this[gm];if(r[gs]=null,r[Oqe]=null,this[_a]!=null&&(this[_a].destroy(e),this[_a]=null),ct.destroy(this[gs],e),r[Ta]<r[Fh].length){let s=r[Fh][r[Ta]];r[Fh][r[Ta]++]=null,ct.errorRequest(r,s,e),r[UM]=r[Ta]}Qo(r[QB]===0),r.emit("disconnect",r[RB],[r],e),r[Uh]()}function Yqe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function Wqe(t,e){let r=t[_a],{method:s,path:i,host:n,upgrade:o,expectContinue:a,signal:c,headers:l}=e,{body:u}=e;if(o)return ct.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let h={};for(let B=0;B<l.length;B+=2){let N=l[B+0],O=l[B+1];if(Array.isArray(O))for(let P=0;P<O.length;P++)h[N]?h[N]+=`,${O[P]}`:h[N]=O[P];else h[N]=O}let d,{hostname:f,port:p}=t[RB];h[Dqe]=n||`${f}${p?`:${p}`:""}`,h[kqe]=s;let m=B=>{e.aborted||e.completed||(B=B||new aee,ct.errorRequest(t,e,B),d!=null&&ct.destroy(d,B),ct.destroy(u,B),t[Fh][t[Ta]++]=null,t[Uh]())};try{e.onConnect(m)}catch(B){ct.errorRequest
`;if(s.username||s.password){let d=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;n["Proxy-Authorization"]=`Basic${Buffer.from(d).toString("base64")}`}n.Host=`${o}:${r.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(n))a+=`${d}:${n[d]}\r
`)+4,e.outputData[0].data=e._header+s.substring(i),gg("Output buffer: %o",e.outputData[0].data));let n;return this.proxy.protocol==="https:"?(gg("Creating `tls.Socket`: %o",this.connectOpts),n=RZe.connect(this.connectOpts)):(gg("Creating `net.Socket`: %o",this.connectOpts),n=vZe.connect(this.connectOpts)),await(0,_Ze.once)(n,"connect"),n}};nv.protocols=["http","https"];jo.HttpProxyAgent=nv;function PZe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var qde=A(Ev=>{"use strict";Object.defineProperty(Ev,"__esModule",{value:!0});Ev.state=void 0;Ev.state={instrumenterImplementation:void 0}});var ife=A(Sv=>{"use strict";Object.defineProperty(Sv,"__esModule",{value:!0});Sv.state=void 0;Sv.state={operationRequestMap:new WeakMap}});var kAe=A(Dg=>{"use strict";Object.defineProperty(Dg,"__esModule",{value:!0});var tit=require("os"),rit=require("util");function sit(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var iit=sit(rit);function nit(t,...e){process.stderr.write(`${iit.default.format(t,...e)}${tit.EOL}`)}var xAe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,vAe,x8=[],N8=[],HR=[];xAe&&v8(xAe);var RAe=Object.assign(t=>TAe(t),{enable:v8,enabled:R8,disable:oit,log:nit});function v8(t){vAe=t,x8=[],N8=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?N8.push(new RegExp(`^${s.substr(1)}$`)):x8.push(new RegExp(`^${s}$`));for(let s of HR)s.enabled=R8(s.namespace)}function R8(t){if(t.endsWith("*"))return!0;for(let e of N8)if(e.test(t))return!1;for(let e of x8)if(e.test(t))return!0;return!1}function oit(){let t=vAe||"";return v8(""),t}function TAe(t){let e=Object.assign(r,{enabled:R8(t),destroy:ait,log:RAe.log,namespace:t,extend:cit});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return HR.push(e),e}function ait(){let t=HR.indexOf(this);return t>=0?(HR.splice(t,1),!0):!1}function cit(t){let e=TAe(`${this.namespace}:${t}`);return e.log=this.log,e}var U0=RAe,_Ae=new Set,qR=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,VR,zR=U0("azure");zR.log=(...t)=>{U0.log(...t)};var T8=["verbose","info","warning","error"];qR&&(DAe(qR)?QAe(qR):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${qR}';loggingisnotenabled.Acceptablevalues:${T8.join(", ")}.`));function QAe(t){if(t&&!DAe(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${T8.join(",")}`);VR=t;let e=[];for(let r of _Ae)OAe(r)&&e.push(r.namespace);U0.enable(e.join(","))}function lit(){return VR}var NAe={verbose:400,info:300,warning:200,error:100};function uit(t){let e=zR.extend(t);return PAe(zR,e),{error:GR(e,"error"),warning:GR(e,"warning"),info:GR(e,"info"),verbose:GR(e,"verbose")}}function PAe(t,e){e.log=(...r)=>{t.log(...r)}}function GR(t,e){let r=Object.assign(t.extend(e),{level:e});if(PAe(t,r),OAe(r)){let s=U0.disable();U0.enable(s+","+r.namespace)}return _Ae.add(r),r}function OAe(t){return!!(VR&&NAe[t.level]<=NAe[VR])}function DAe(t){return T8.includes(t)}Dg.AzureLogger=zR;Dg.createClientLogger=uit;Dg.getLogLevel=lit;Dg.setLogLevel=QAe});var P8=A(G0=>{"use strict";Object.defineProperty(G0,"__esModule",{value:!0});var kg=new WeakMap,$R=new WeakMap,q0=class t{constructor(){this.onabort=null,kg.set(this,[]),$R.set(this,!1)}get aborted(){if(!$R.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return $R.get(this)}static get none(){return new t}addEventListener(e,r){if(!kg.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");kg.get(this).push(r)}removeEventListener(e,r){if(!kg.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=kg.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 MAe(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=kg.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),$R.set(t,!0)}var _8=class extends Error{constructor(e){super(e),t
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Kht(){Object.keys(S_).forEach(function(t){delete S_[t]})}});var x_=A(hl=>{"use strict";hl.__esModule=!0;hl.HandlebarsEnvironment=e3;function CCe(t){return t&&t.__esModule?t:{default:t}}var Mp=Li(),Xht=fo(),Xz=CCe(Xht),Zht=Jz(),edt=mCe(),tdt=Wz(),B_=CCe(tdt),rdt=Kz(),sdt="4.7.9";hl.VERSION=sdt;var idt=8;hl.COMPILER_REVISION=idt;var ndt=7;hl.LAST_COMPATIBLE_COMPILER_REVISION=ndt;var odt={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};hl.REVISION_CHANGES=odt;var Zz="[object Object]";function e3(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Zht.registerDefaultHelpers(this),edt.registerDefaultDecorators(this)}e3.prototype={constructor:e3,logger:B_.default,log:B_.default.log,registerHelper:function(e,r){if(Mp.toString.call(e)===Zz){if(r)throw new Xz.default("Arg not supported with multiple helpers");Mp.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(Mp.toString.call(e)===Zz)Mp.extend(this.partials,e);else{if(typeof r>"u")throw new Xz.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(Mp.toString.call(e)===Zz){if(r)throw new Xz.default("Arg not supported with multiple decorators");Mp.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){rdt.resetLoggedProperties()}};var adt=B_.default.log;hl.log=adt;hl.createFrame=Mp.createFrame;hl.logger=B_.default});var bCe=A((N_,ICe)=>{"use strict";N_.__esModule=!0;function t3(t){this.string=t}t3.prototype.toString=t3.prototype.toHTML=function(){return""+this.string};N_.default=t3;ICe.exports=N_.default});var wCe=A(r3=>{"use strict";r3.__esModule=!0;r3.wrapHelper=cdt;function cdt(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var RCe=A(Nd=>{"use strict";Nd.__esModule=!0;Nd.checkRevision=pdt;Nd.template=Adt;Nd.wrapProgram=v_;Nd.resolvePartial=mdt;Nd.invokePartial=gdt;Nd.noop=NCe;function ldt(t){return t&&t.__esModule?t:{default:t}}function udt(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var hdt=Li(),ly=udt(hdt),ddt=fo(),Lu=ldt(ddt),Fu=x_(),SCe=Jz(),fdt=wCe(),BCe=Kz();function pdt(t){var e=t&&t[0]||1,r=Fu.COMPILER_REVISION;if(!(e>=Fu.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Fu.COMPILER_REVISION))if(e<Fu.LAST_COMPATIBLE_COMPILER_REVISION){var s=Fu.REVISION_CHANGES[r],i=Fu.REVISION_CHANGES[e];throw new Lu.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+i+").")}else throw new Lu.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function Adt(t,e){if(!e)throw new Lu.default("No environment passed to template");if(!t||!t.main)throw new Lu.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function s(o,a,c){c.hash&&(a=ly.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),o=e.VM.resolvePartial.call(this,o,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var l=e.VM.invokePartial.call(this,o,a,c);if(l==null&&e.compile&&(c.partials[c.name]=e.compile(o,t.compilerOptions,e),l=c.partials[c.name](a,c)),l!=null){if(c.indent){for(var u=l.split(`
`+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,o,a,c,l,u;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),d=0;d<h.length&&(a=this._input.match(this.rules[h[d]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,c=d,!this.options.flex)));d++);return o?(u=o[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],n=this.performAction.call(this,this.yy,this,h[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`.Unrecognizedtext.
${hP(l)}${l}`)}catch(l){if(l.code==="ENOENT")return;throw l}return dP(t,c)}bo.exports.find=Fwt;async function Fwt(t,e){let r=Dw(t,e);try{return(await uP(r)).reduce((i,n)=>n&&n.key===e?dP(t,n):i,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}bo.exports.delete=Uwt;function Uwt(t,e,r={}){if(!r.removeFully)return _ve(t,e,null,r);let s=Dw(t,e);return Tve(s,{recursive:!0,force:!0})}bo.exports.lsStream=Qve;function Qve(t){let e=Z6(t),r=new _wt({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(lP(),cP)),i=await K6(e);return await s(i,async n=>{let o=_l.join(e,n),a=await K6(o);await s(a,async c=>{let l=_l.join(o,c),u=await K6(l);await s(u,async h=>{let d=_l.join(l,h);try{let p=(await uP(d)).reduce((m,E)=>(m.set(E.key,E),m),new Map);for(let m of p.values()){let E=dP(t,m);E&&r.write(E)}}catch(f){if(f.code==="ENOENT")return;throw f}},{concurrency:W6})},{concurrency:W6})},{concurrency:W6}),r.end(),r}).catch(s=>r.emit("error",s)),r}bo.exports.ls=qwt;async function qwt(t){return(await Qve(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}bo.exports.bucketEntries=uP;async function uP(t,e){let r=await vwt(t,"utf8");return Gwt(r,e)}function Gwt(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||hP(s[1])!==s[0])return;let i;try{i=JSON.parse(s[1])}catch{}i&&e.push(i)}),e}bo.exports.bucketDir=Z6;function Z6(t){return _l.join(t,`index-v${kwt}`)}bo.exports.bucketPath=Dw;function Dw(t,e){let r=Pve(e);return _l.join.apply(_l,[Z6(t)].concat(Dwt(r)))}bo.exports.hashKey=Pve;function Pve(t){return Ove(t,"sha256")}bo.exports.hashEntry=hP;function hP(t){return Ove(t,"sha1")}function Ove(t,e){return xwt.createHash(e).update(t).digest("hex")}function dP(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?Owt(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}function K6(t){return Rwt(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}});var Mw=A(AP=>{"use strict";Object.defineProperty(AP,"__esModule",{value:!0});AP.LRUCache=void 0;var Hwt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,kve=new Set,eJ=typeof process=="object"&&process?process:{},Mve=(t,e,r,s)=>{typeof eJ.emitWarning=="function"?eJ.emitWarning(t,e,r,s):console.error(`[${r}]${e}:${t}`)},pP=globalThis.AbortController,Dve=globalThis.AbortSignal;if(typeof pP>"u"){Dve=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(r,s){this._onabort.push(s)}},pP=class{constructor(){e()}signal=new Dve;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=eJ.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,Mve("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 Vwt=t=>!kve.has(t),Jd=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Lve=t=>Jd(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?fP:null:null,fP=class extends Array{constructor(t){super(t),this.fill(0)}},zwt=class kw{heap;length;static#e=!1;static create(e){let r=Lve(e);if(!r)return[];kw.#e=!0;let s=new kw(e,r);return kw.#e=!1,s}constructor(e,r){if(!kw.#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]}},$wt=class Fve{#e;#t;#s;#r;#i;#n;#u;#l;get perf(){return this.#l}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#d;#p;#h;#o;#y;#I;#g;#A;#x;#m;#S;#B;#E;#C;#b;#v;#c;#O;static unsafeExposeInternals(e){return{starts:e.#B,ttls:e.#E,autopurgeTimers:e.#C,sizes:e.#S,keyMap:e.#p,keyList:e.#h,valList:e.#o,next:e.#y,prev:e.#I,get head(){return e.#g},get tail(){return e.#A},free:e.#x,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,s,i,n)=>e.#G(r,s,i,n),moveToTail:r=>e.#P(r),indexes:r=>e.#R(r),rindexes:r=>e.#T(r),isStale:r=>e.#w(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#d}get size(){return this.#a}get fetchMethod(){return this.#n}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:h,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:E,fetchMethod:y,memoMethod:C,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:B,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:O,ignoreFetchAbort:P,perf:M}=e;if(M!==void 0&&typeof M?.now!="function")throw new TypeError("perf option must have a now() method if s
globstarwhile`,R,ee,Q,ke,nt),this.matchOne(R.slice(ee),Q.slice(ke),k))return this.debug("globstar found match!",ee,v,nt),!0;if(nt==="."||nt===".."||!q.dot&&nt.charAt(0)==="."){this.debug("dot detected!",R,ee,Q,ke);break}this.debug("globstar swallow a segment, and continue"),ee++}return!!(k&&(this.debug(`
>>>nomatch,partial?`,R,ee,Q,ke),ee===v))}let rt;if(typeof j=="string"?(rt=me===j,this.debug("string match",j,me,rt)):(rt=j.test(me),this.debug("pattern match",j,me,rt)),!rt)return!1}if(g===v&&S===L)return!0;if(g===v)return k;if(S===L)return g===v-1&&R[g]==="";throw new Error("wtf?")}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(R){(0,r.assertValidPattern)(R);let Q=this.options;if(R==="**")return t.GLOBSTAR;if(R==="")return"";let k,q=null;(k=R.match(y))?q=Q.dot?w:C:(k=R.match(a))?q=(Q.nocase?Q.dot?h:u:Q.dot?l:c)(k[1]):(k=R.match(B))?q=(Q.nocase?Q.dot?O:N:Q.dot?P:M)(k):(k=R.match(d))?q=Q.dot?p:f:(k=R.match(m))&&(q=E);let Y=s.AST.fromGlob(R,this.options).toMMPattern();return q&&typeof Y=="object"&&Reflect.defineProperty(Y,"test",{value:q}),Y}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let R=this.set;if(!R.length)return this.regexp=!1,this.regexp;let Q=this.options,k=Q.noglobstar?$:Q.dot?re:Qe,q=new Set(Q.nocase?["i"]:[]),Y=R.map(v=>{let L=v.map(me=>{if(me instanceof RegExp)for(let ee of me.flags.split(""))q.add(ee);return typeof me=="string"?Ht(me):me===t.GLOBSTAR?t.GLOBSTAR:me._src});L.forEach((me,ee)=>{let ke=L[ee+1],nt=L[ee-1];me!==t.GLOBSTAR||nt===t.GLOBSTAR||(nt===void 0?ke!==void 0&&ke!==t.GLOBSTAR?L[ee+1]="(?:\\/|"+k+"\\/)?"+ke:L[ee]=k:ke===void 0?L[ee-1]=nt+"(?:\\/|\\/"+k+")?":ke!==t.GLOBSTAR&&(L[ee-1]=nt+"(?:\\/|\\/"+k+"\\/)"+ke,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,S]=R.length>1?["(?:",")"]:["",""];Y="^"+g+Y+S+"$",this.partial&&(Y="^(?:\\/|"+g+Y.slice(1,-1)+S+")$"),this.negate&&(Y="^(?!"+Y+").+$");try{this.regexp=new RegExp(Y,[...q].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(R){return this.preserveMultipleSlashes?R.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(R)?["",...R.split(/\/+/)]:R.split(/\/+/)}match(R,Q=this.partial){if(this.debug("match",R,this.pattern),this.comment)return!1;if(this.empty)return R==="";if(R==="/"&&Q)return!0;let k=this.options;this.isWindows&&(R=R.split("\\").join("/"));let q=this.slashSplit(R);this.debug(this.pattern,"split",q);let Y=this.set;this.debug(this.pattern,"set",Y);let g=q[q.length-1];if(!g)for(let S=q.length-2;!g&&S>=0;S--)g=q[S];for(let S=0;S<Y.length;S++){let v=Y[S],L=q;if(k.matchBase&&v.length===1&&(L=[g]),this.matchOne(L,v,Q))return k.flipNegate?!0:!this.negate}return k.flipNegate?!1:this.negate}static defaults(R){return t.minimatch.defaults(R).Minimatch}};t.Minimatch=is;var kn=cRe();Object.defineProperty(t,"AST",{enumerable:!0,get:function(){return kn.AST}});var Nt=lRe();Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return Nt.escape}});var xo=AJ();Object.defineProperty(t,"unescape",{enumerable:!0,get:function(){return xo.unescape}}),t.minimatch.AST=s.AST,t.minimatch.Minimatch=is,t.minimatch.escape=i.escape,t.minimatch.unescape=n.unescape}),MSt=Ws(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,m,E)=>{typeof s.emitWarning=="function"?s.emitWarning(f,p,m,E):console.error(`[${m}]${p}:${f}`)},n=globalThis.AbortController,o=globalThis.AbortSignal;if(typeof n>"u"){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(m,E){this._onabort.push(E)}},n=class{constructor(){p()}signal=new o;abort(m){if(!this.signal.aborted){this.signal.reason=m,this.signal.aborted=!0;for(let E of this.signal._onabort)E(m);this.signal.onabort?.(m)}}};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 d=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;n["Proxy-Authorization"]=`Basic${Buffer.from(d).toString("base64")}`}n.Host=`${o}:${r.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(n))a+=`${d}:${n[d]}\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",Ixt),r.secureEndpoint){Ww("Upgrading socket connection to TLS");let d=r.servername||r.host;return uTe.connect({...hTe(r,"host","path","port"),socket:i,servername:Yw.isIP(d)?void 0:d})}return i}i.destroy();let h=new Yw.Socket({writable:!1});return h.readable=!0,e.once("socket",d=>{Ww("Replaying proxy buffer for failed request"),(0,mxt.default)(d.listenerCount("data")>0),d.push(u),d.push(null)}),h}};PP.protocols=["http","https"];ga.HttpsProxyAgent=PP;function Ixt(t){t.resume()}function hTe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var yTe=A(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var ATe=require("buffer"),SA={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."};wh.ERRORS=SA;function bxt(t){if(!ATe.Buffer.isEncoding(t))throw new Error(SA.INVALID_ENCODING)}wh.checkEncoding=bxt;function mTe(t){return typeof t=="number"&&isFinite(t)&&xxt(t)}wh.isFiniteInteger=mTe;function gTe(t,e){if(typeof t=="number"){if(!mTe(t)||t<0)throw new Error(e?SA.INVALID_OFFSET:SA.INVALID_LENGTH)}else throw new Error(e?SA.INVALID_OFFSET_NON_NUMBER:SA.INVALID_LENGTH_NON_NUMBER)}function wxt(t){gTe(t,!1)}wh.checkLengthValue=wxt;function Sxt(t){gTe(t,!0)}wh.checkOffsetValue=Sxt;function Bxt(t,e){if(t<0||t>e.length)throw new Error(SA.INVALID_TARGET_OFFSET)}wh.checkTargetOffset=Bxt;function xxt(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function Nxt(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof ATe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}wh.bigIntAndBufferInt64Check=Nxt});var CTe=A(FJ=>{"use strict";Object.defineProperty(FJ,"__esModule",{value:!0});var tt=yTe(),ETe=4096,vxt="utf8",LJ=class t{constructor(e){if(this.length=0,this._encoding=vxt,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(tt.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(tt.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(tt.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(tt.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(ETe);else{if(typeof e<"u")throw new Error(tt.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(ETe)}}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
`,DDt=/\u2014 (\S+) (\S+)\n/g;function kDt(t,e){let r=t.inclusionProof,s=aK.fromString(r.checkpoint.envelope),i=_D.fromString(s.note);if(!MDt(s,e))throw new RS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return i}function MDt(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let i=e.find(n=>YPe.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint)&&n.baseURL.match(s.name));return i?YPe.crypto.verify(r,i.publicKey,s.signature):!1})}var aK=class t{note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(oK))throw new RS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(oK),s=e.slice(0,r+1),n=e.slice(r+oK.length).matchAll(DDt),o=Array.from(n,a=>{let[,c,l]=a,u=Buffer.from(l,"base64");if(u.length<5)throw new RS.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 RS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,o)}},_D=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 RS.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)}};TS.LogCheckpoint=_D});var KPe=A(hK=>{"use strict";Object.defineProperty(hK,"__esModule",{value:!0});hK.verifyMerkleInclusion=UDt;var uK=cc(),cK=Ei(),LDt=Buffer.from([0]),FDt=Buffer.from([1]);function UDt(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),i=BigInt(e.logSize);if(s<0n||s>=i)throw new cK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${s}`});let{inner:n,border:o}=qDt(s,i);if(r.hashes.length!==n+o)throw new cK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=r.hashes.slice(0,n),c=r.hashes.slice(n),l=jDt(t.canonicalizedBody),u=HDt(GDt(l,a,s),c);if(!uK.crypto.bufferEqual(u,e.logHash))throw new cK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function qDt(t,e){let r=VDt(t,e),s=zDt(t>>BigInt(r));return{inner:r,border:s}}function GDt(t,e,r){return e.reduce((s,i,n)=>r>>BigInt(n)&BigInt(1)?lK(i,s):lK(s,i),t)}function HDt(t,e){return e.reduce((r,s)=>lK(s,r),t)}function VDt(t,e){return $Dt(t^e-BigInt(1))}function zDt(t){return t.toString(2).split("1").length-1}function $Dt(t){return t===0n?0:t.toString(2).length}function lK(t,e){return uK.crypto.digest("sha256",FDt,t,e)}function jDt(t){return uK.crypto.digest("sha256",LDt,t)}});var ZPe=A(dK=>{"use strict";Object.defineProperty(dK,"__esModule",{value:!0});dK.verifyTLogSET=WDt;var XPe=cc(),JDt=Ei(),YDt=XE();function WDt(t,e){if(!(0,YDt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(i=>{let n=KDt(t),o=Buffer.from(XPe.json.canonicalize(n),"utf8"),a=t.inclusionPromise.signedEntryTimestamp;return XPe.crypto.verify(o,i.publicKey,a)}))throw new JDt.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function KDt(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 tOe=A(QD=>{"use strict";Object.defineProperty(QD,"__esModule",{value:!0});QD.verifyTLogBody=rkt;QD.verifyTLogInclusion=skt;var eOe=PY(),AK=Ei(),fK=$Pe(),pK=jPe(),XDt=JPe(),ZDt=WPe(),ekt=KPe(),tkt=ZPe();function rkt(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 AK.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${s},received:${i.kind}/${i.apiVersion}`});switch(r){case"dsse":if(s==fK.DSSE_API_VERSION_V1)return(0,fK.verifyDSSETLogBody)(i,e);{let n=eOe.Entry.fromJSON(i);return(0,fK.verifyDSSETLogBodyV2)(n,e)}case"intoto":return(0,XDt.verifyIntotoTLogBody)(i,e);case"hashedrekord":if(s==pK.HASHEDREKORD_API_VERSION_V1)return(0,pK.verifyHashedRekordTLogBody)(i,e);{let n=eOe.Entry.fromJSON(i);return(0,pK.verifyHashedRekordTLogBodyV2)(n,e)}default:throw new AK.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}function skt(t,e){let r=!1;if(ikt(t)&&((0,tkt.verifyTLogSET)(t,e),r=!0),nkt(t)){let s=(0,ZDt.verifyCheckpoint)(t,e);(0,ekt.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new AK.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}function ikt(t){return t.inclusionPromise!==void 0}function nkt(t){return t.inclusionProof!==void 0}});var oOe=A(PD=>{"use strict";Object.defineProperty(PD,"__esModule",{value:!0});PD.Verifier=void 0;var okt=require("util"),ZE=Ei(),rOe=qPe(),mK=GPe(),sOe=zPe(),iOe=tOe(),gK=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.verifySi
`;return a.replace(/\n$/,"")}var tke=eke,rke=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ske=["scalar","sequence","mapping"];function ike(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function nke(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(rke.indexOf(r)===-1)throw new rn('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=ike(e.styleAliases||null),ske.indexOf(this.kind)===-1)throw new rn('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Ks=nke;function OK(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 oke(){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 ok(t){return this.extend(t)}ok.prototype.extend=function(e){var r=[],s=[];if(e instanceof Ks)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 rn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(n){if(!(n instanceof Ks))throw new rn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new rn("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 rn("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 Ks))throw new rn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(ok.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(s),i.compiledImplicit=OK(i,"implicit"),i.compiledExplicit=OK(i,"explicit"),i.compiledTypeMap=oke(i.compiledImplicit,i.compiledExplicit),i};var ake=ok,cke=new Ks("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),lke=new Ks("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),uke=new Ks("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),hke=new ake({explicit:[cke,lke,uke]});function dke(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function fke(){return null}function pke(t){return t===null}var Ake=new Ks("tag:yaml.org,2002:null",{kind:"scalar",resolve:dke,construct:fke,predicate:pke,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function mke(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 gke(t){return t==="true"||t==="True"||t==="TRUE"}function yke(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var Eke=new Ks("tag:yaml.org,2002:bool",{kind:"scalar",resolve:mke,construct:gke,predicate:yke,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 fMe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function iX(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}var nX=new Array(256),oX=new Array(256);for(Ef=0;Ef<256;Ef++)nX[Ef]=MK(Ef)?1:0,oX[Ef]=MK(Ef);var Ef;function pMe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||ZK,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 aX(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=tke(r),new rn(e,r)}function Se(t,e){throw aX(t,e)}function GS(t,e){t.onWarning&&t.onWarning.call(null,aX(t,e))}var LK={YAML:function(e,r,s){var i,n,o;e.version!==null&&Se(e,"duplication of %YAML directive"),s.length!==1&&Se(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),i===null&&Se(e,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),o=parseInt(i[2],10),n!==1&&Se(e,"unacceptable YAML version of the document"),e.version=s[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&GS(e,"unsupported YAML version of the document")},TAG:function(e,r,s){var i,n;s.length!==2&&Se(e,"TAG directive accepts exactly two arguments"),i=s[0],n=s[1],rX.test(i)||Se(e,"ill-formed tag handle (first argument) of the TAG directive"),Dh.call(e.tagMap,i)&&Se(e,'there is a previously declared suffix for "'+i+'" tag handle'),sX.test(n)||Se(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{Se(e,"tag prefix is malformed: "+n)}e.tagMap[i]=n}};function Oh(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||Se(t,"expected valid JSON character");else aMe.test(a)&&Se(t,"the stream contains non-printable characters");t.result+=a}}function FK(t,e,r,s){var i,n,o,a;for(ns.isObject(r)||Se(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],Dh.call(e,n)||(iX(e,n,r[n]),s[n]=!0)}function WA(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])&&Se(t,"nested arrays are not supported inside keys"),typeof i=="object"&&kK(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&kK(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)FK(t,e,n[l],r);else FK(t,e,n,r);else!t.json&&!Dh.call(r,i)&&Dh.call(e,i)&&(t.line=o||t.line,t.lineStart=a||t.lineStart,t.position=c||t.position,Se(t,"duplicated mapping key")),iX(e,i,n),delete r[i];return e}function dk(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++):Se(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Jr(t,e,r){for(var s=0,i=t.input.charCodeAt(t.position);i!==0;){for(;Cf(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(hc(i))for(dk(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&&GS(t,"deficient indentation"),s}function zS(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||sn(r)))}functio
`,e-1))}function AMe(t,e,r){var s,i,n,o,a,c,l,u,h=t.kind,d=t.result,f;if(f=t.input.charCodeAt(t.position),sn(f)||YA(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),sn(i)||r&&YA(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),sn(i)||r&&YA(i))break}else if(f===35){if(s=t.input.charCodeAt(t.position-1),sn(s))break}else{if(t.position===t.lineStart&&zS(t)||r&&YA(f))break;if(hc(f))if(c=t.line,l=t.lineStart,u=t.lineIndent,Jr(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&&(Oh(t,n,o,!1),fk(t,t.line-c),n=o=t.position,a=!1),Cf(f)||(o=t.position+1),f=t.input.charCodeAt(++t.position)}return Oh(t,n,o,!1),t.result?!0:(t.kind=h,t.result=d,!1)}function mMe(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(Oh(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 hc(r)?(Oh(t,s,i,!0),fk(t,Jr(t,!1,e)),s=i=t.position):t.position===t.lineStart&&zS(t)?Se(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Se(t,"unexpected end of the stream within a single quoted scalar")}function gMe(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 Oh(t,r,t.position,!0),t.position++,!0;if(a===92){if(Oh(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),hc(a))Jr(t,!1,e);else if(a<256&&nX[a])t.result+=oX[a],t.position++;else if((o=hMe(a))>0){for(i=o,n=0;i>0;i--)a=t.input.charCodeAt(++t.position),(o=uMe(a))>=0?n=(n<<4)+o:Se(t,"expected hexadecimal character");t.result+=fMe(n),t.position++}else Se(t,"unknown escape sequence");r=s=t.position}else hc(a)?(Oh(t,r,s,!0),fk(t,Jr(t,!1,e)),r=s=t.position):t.position===t.lineStart&&zS(t)?Se(t,"unexpected end of the document within a double quoted scalar"):(t.position++,s=t.position)}Se(t,"unexpected end of the stream within a double quoted scalar")}function yMe(t,e){var r=!0,s,i,n,o=t.tag,a,c=t.anchor,l,u,h,d,f,p=Object.create(null),m,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(Jr(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&&Se(t,"expected the node content, but found ','"):Se(t,"missed comma between flow collection entries"),E=m=y=null,h=d=!1,C===63&&(l=t.input.charCodeAt(t.position+1),sn(l)&&(h=d=!0,t.position++,Jr(t,!0,e))),s=t.line,i=t.lineStart,n=t.position,KA(t,e,US,!1,!0),E=t.tag,m=t.result,Jr(t,!0,e),C=t.input.charCodeAt(t.position),(d||t.line===s)&&C===58&&(h=!0,C=t.input.charCodeAt(++t.position),Jr(t,!0,e),KA(t,e,US,!1,!0),y=t.result),f?WA(t,a,p,E,m,y,s,i,n):h?a.push(WA(t,null,p,E,m,y,s,i,n)):a.push(m),Jr(t,!0,e),C=t.input.charCodeAt(t.position),C===44?(r=!0,C=t.input.charCodeAt(++t.position)):r=!1}Se(t,"unexpected end of the stream within a flow collection")}function EMe(t,e){var r,s,i=nk,n=!1,o=!1,a=e,c=0,l=!1,u,h;if(h=t.input.charCodeAt(t.position),h===124)s=!1;else if(h===62)s=!0;else return!1;for(t.kind="scalar",t.result="";h!==0;)if(h=t.input.charCodeAt(++t.position),h===43||h===45)nk===i?i=h===43?DK:oMe:Se(t,"repeat of a chomping mode identifier");else if((u=dMe(h))>=0)u===0?Se(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Se(t,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(Cf(h)){do h=t.input.charCodeAt(++t.position);while(Cf(h));if(h===35)do h=t.input.charCodeAt(++t.position);while(!hc(h)&&h!==0)}for(;h!==0;){for(dk(t),t.lineIndent=0,h=t.input.charCodeAt(t.p
`,n?1+c:c),n=!0,o=!0,c=0,r=t.position;!hc(h)&&h!==0;)h=t.input.charCodeAt(++t.position);Oh(t,r,t.position,!1)}return!0}function UK(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,Se(t,"tab characters must not be used in indentation")),!(c!==45||(o=t.input.charCodeAt(t.position+1),!sn(o))));){if(a=!0,t.position++,Jr(t,!0,-1)&&t.lineIndent<=e){n.push(null),c=t.input.charCodeAt(t.position);continue}if(r=t.line,KA(t,e,tX,!1,!0),n.push(t.result),Jr(t,!0,-1),c=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&c!==0)Se(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 CMe(t,e,r){var s,i,n,o,a,c,l=t.tag,u=t.anchor,h={},d=Object.create(null),f=null,p=null,m=null,E=!1,y=!1,C;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),C=t.input.charCodeAt(t.position);C!==0;){if(!E&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Se(t,"tab characters must not be used in indentation")),s=t.input.charCodeAt(t.position+1),n=t.line,(C===63||C===58)&&sn(s))C===63?(E&&(WA(t,h,d,f,p,null,o,a,c),f=p=m=null),y=!0,E=!0,i=!0):E?(E=!1,i=!0):Se(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,!KA(t,r,eX,!1,!0))break;if(t.line===n){for(C=t.input.charCodeAt(t.position);Cf(C);)C=t.input.charCodeAt(++t.position);if(C===58)C=t.input.charCodeAt(++t.position),sn(C)||Se(t,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(WA(t,h,d,f,p,null,o,a,c),f=p=m=null),y=!0,E=!1,i=!1,f=t.tag,p=t.result;else if(y)Se(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=l,t.anchor=u,!0}else if(y)Se(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),KA(t,e,qS,!0,i)&&(E?p=t.result:m=t.result),E||(WA(t,h,d,f,p,m,o,a,c),f=p=m=null),Jr(t,!0,-1),C=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&C!==0)Se(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return E&&WA(t,h,d,f,p,null,o,a,c),y&&(t.tag=l,t.anchor=u,t.kind="mapping",t.result=h),y}function IMe(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&&Se(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)):Se(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!sn(o);)o===33&&(s?Se(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),rX.test(i)||Se(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),lMe.test(n)&&Se(t,"tag suffix cannot contain flow indicator characters")}n&&!sX.test(n)&&Se(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{Se(t,"tag name is malformed: "+n)}return r?t.tag=n:Dh.call(t.tagMap,i)?t.tag=t.tagMap[i]+n:i==="!"?t.tag="!"+n:i==="!!"?t.tag="tag:yaml.org,2002:"+n:Se(t,'undeclared tag handle "'+i+'"'),!0}function bMe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Se(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!sn(r)&&!YA(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Se(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function wMe(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 pMe(t,e),s=t.indexOf("\0");for(s!==-1&&(r.position=s,Se(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;)SMe(r);return r.documents}function BMe(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var s=cX(t,r);if(typeof e!="function")return s;for(var i=0,n=s.length;i<n;i+=1)e(s[i])}function xMe(t,e){var r=cX(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new rn("expected a single document in the stream, but found more")}}var NMe=BMe,vMe=xMe,lX={loadAll:NMe,load:vMe},uX=Object.prototype.toString,hX=Object.prototype.hasOwnProperty,pk=65279,RMe=9,lC=10,TMe=13,_Me=32,QMe=33,PMe=34,ak=35,OMe=37,DMe=38,kMe=39,MMe=42,dX=44,LMe=45,HS=58,FMe=61,UMe=62,qMe=63,GMe=64,fX=91,pX=93,HMe=96,AX=123,VMe=124,mX=125,Xs={};Xs[0]="\\0";Xs[7]="\\a";Xs[8]="\\b";Xs[9]="\\t";Xs[10]="\\n";Xs[11]="\\v";Xs[12]="\\f";Xs[13]="\\r";Xs[27]="\\e";Xs[34]='\\"';Xs[92]="\\\\";Xs[133]="\\N";Xs[160]="\\_";Xs[8232]="\\L";Xs[8233]="\\P";var zMe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],$Me=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function jMe(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&&hX.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[o]=a;return r}function JMe(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 rn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+ns.repeat("0",s-e.length)+e}var YMe=1,uC=2;function WMe(t){this.schema=t.schema||ZK,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ns.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=jMe(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==='"'?uC:YMe,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 qK(t,e){for(var r=ns.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 sLe(t){for(var e="",r=0,s,i=0;i<t.length;r>=65536?i+=2:i++)r=aC(t,i),s=Xs[r],!s&&hC(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=s||JMe(r);return e}function iLe(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 jK(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+=ck(t,e)),t.dump&&lC===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=n,t.dump=i||"[]"}function nLe(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 oLe(t,e,r,s){var i="",n=t.tag,o=Object.keys(r),a,c,l,u,h,d;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new rn("sortKeys must be a boolean or a function");for(a=0,c=o.length;a<c;a+=1)d="",(!s||i!=="")&&(d+=ck(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)&&(h=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,h&&(t.dump&&lC===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,h&&(d+=ck(t,e)),Wl(t,e+1,u,!0,h)&&(t.dump&&lC===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,i+=d));t.tag=n,t.dump=i||"{}"}function JK(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,uX.call(a.represent)==="[object Function]")s=a.represent(e,c);else if(hX.call(a.represent,c))s=a.represent[c](e,c);else throw new rn("!<"+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,JK(t,r,!1)||JK(t,r,!0);var a=uX.call(t.dump),c=s,l;s&&(s=t.flowLevel<0||t.flowLevel>e);var u=a==="[object Object]"||a==="[object Array]",h,d;if(u&&(h=t.duplicates.indexOf(r),d=h!==-1),(t.tag!==null&&t.tag!=="?"||d||t.indent!==2&&e>0)&&(i=!1),d&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(u&&d&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),a==="[object Object]")s&&Object.keys(t.dump).length!==0?(oLe(t,e,t.dump,i),d&&(t.dump="&ref_"+h+t.dump)):(nLe(t,e,t.dump),d&&(t.dump="&ref_"+h+" "+t.dump));else if(a==="[object Array]")s&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?jK(t,e-1,t.dump,i):jK(t,e,t.dump,i),d&&(t.dump="&ref_"+h+t.dump)):(iLe(t,e,t.dump),d&&(t.dump="&ref_"+h+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&tLe(t,t.dump,e,n,c);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new rn("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 aLe(t,e){var r=[],s=[],i,n;for(uk(t,r,s),i=0,n=s.length;i<n;i+=1)e.duplicates.push(r[s[i]]);e.usedDuplicates=new Array(n)}function uk(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)uk(t[i],e,r);else for(s=Object.keys(t),i=0,n=s.length;i<n;i+=1)uk(t[s[i]],e,r)}function cLe(t,e){e=e||{};var r=new WMe(e);r.noRefs||aLe(t,r);var s=t;return r.replacer&&(s=r.replacer.call({"":s},"",s)),Wl(r,0,s,!0,!0)?r.dump+`
`:""}var lLe=cLe,uLe={dump:lLe};function Ak(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 IX=lX.load,Akt=lX.loadAll,mkt=uLe.dump;var gkt=Ak("safeLoad","load"),ykt=Ak("safeLoadAll","loadAll"),Ekt=Ak("safeDump","dump");var wX=D(require("os"),1);function Kl(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}function mk(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 Xl(t,e,r){let s=new gk(t,e,r);process.stdout.write(s.toString()+wX.EOL)}function yk(t,e=""){Xl(t,{},e)}var bX="::",gk=class{constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){let e=bX+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}=${fLe(i)}`)}}return e+=`${bX}${dLe(this.message)}`,e}};function dLe(t){return Kl(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function fLe(t){return Kl(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}var SX=D(require("crypto"),1),jS=D(require("fs"),1),$S=D(require("os"),1);function JS(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unabletofindenvironmentvariableforfilecommand${t}`);if(!jS.existsSync(r))throw new Error(`Missingfileatpath:${r}`);jS.appendFileSync(r,`${Kl(e)}${$S.EOL}`,{encoding:"utf8"})}function Ek(t,e){let r=`ghadelimiter_${SX.randomUUID()}`,s=Kl(e);if(t.includes(r))throw new Error(`Unexpectedinput:nameshouldnotcontainthedelimiter"${r}"`);if(s.includes(r))throw new Error(`Unexpectedinput:valueshouldnotcontainthedelimiter"${r}"`);return`${t}<<${r}${$S.EOL}${s}${$S.EOL}${r}`}var aF=D(require("os"),1),woe=D(require("path"),1);var pI=D(require("http"),1),J2=D(require("https"),1);function Ck(t){let e=t.protocol==="https:";if(pLe(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 YS(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new YS(`http://${r}`)}else return}function pLe(t){if(!t.hostname)return!1;let e=t.hostname;if(ALe(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 ALe(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 YS=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 ed=D(dC(),1),roe=D(Jm(),1),Or=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(h){o(h)}}function c(u){try{l(s.throw(u))}catch(h){o(h)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},ko;(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\``)}functionCI(t,e){if(process.env.GITHUB_OUTPUT||"")returnJS("OUTPUT",Ek(t,e));process.stdout.write(aF.EOL),Xl("set-output",{name:t},Kl(e))}functionSoe(t){process.exitCode=oF.Failure,Km(t)}functionmu(){returnprocess.env.RUNNER_DEBUG==="1"}function_(t){Xl("debug",{},t)}functionKm(t,e={}){Xl("error",mk(e),tinstanceofError?t.toString():t)}functionOt(t,e={}){Xl("warning",mk(e),tinstanceofError?t.toString():t)}functionG(t){process.stdout.write(t+aF.EOL)}functionz$e(t){yk("group",t)}function$$e(){yk("endgroup")}functionZt(t,e){returnV$e(this,void0,void0,function*(){z$e(t);letr;try{r=yielde()}finally{$$e()}returnr})}functionhn(t,e){if(process.env.GITHUB_STATE||"")returnJS("STATE",Ek(t,e));Xl("save-state",{name:t},Kl(e))}functionBoe(t){returnprocess.env[`STATE_${t}`]||""}varKT=D(require("fs"),1),Az=D(require("os"),1),mz=D(require("path"),1);varNoe=D(require("os"),1);functionII(t){returnt==null?"":typeoft=="string"||tinstanceofString?t:JSON.stringify(t)}functionvoe(t,e,r){lets=newcF(t,e,r);process.stdout.write(s.toString()+Noe.EOL)}varxoe="::",cF=class{constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){lete=xoe+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";letr=!0;for(letsinthis.properties)if(this.properties.hasOwnProperty(s)){leti=this.properties[s];i&&(r?r=!1:e+=",",e+=`${s}=${J$e(i)}`)}}returne+=`${xoe}${j$e(this.message)}`,e}};functionj$e(t){returnII(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}functionJ$e(t){returnII(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}varQoe=D(require("os"),1);varToe=require("os"),bI=require("fs"),lF=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(h){o(h)}}functionc(u){try{l(s.throw(u))}catch(h){o(h)}}functionl(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},{access:Y$e,appendFile:W$e,writeFile:K$e}=bI.promises,Roe="GITHUB_STEP_SUMMARY";varuF=class{constructor(){this._buffer=""}filePath(){returnlF(this,void0,void0,function*(){if(this._filePath)returnthis._filePath;lete=process.env[Roe];if(!e)thrownewError(`Unable to find environment variable for $${Roe}. Check if your runtime environment supports job summaries.`);try{yieldY$e(e,bI.constants.R_OK|bI.constants.W_OK)}catch{thrownewError(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}returnthis._filePath=e,this._filePath})}wrap(e,r,s={}){leti=Object.entries(s).map(([n,o])=>`${n}="${o}"`).join("");returnr?`<${e}${i}>${r}</${e}>`:`<${e}${i}>`}write(e){returnlF(this,void0,void0,function*(){letr=!!e?.overwrite,s=yieldthis.filePath();returnyield(r?K$e:W$e)(s,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){returnlF(this,void0,void0,function*(){returnthis.emptyBuffer().write({overwrite:!0})})}stringify(){returnthis._buffer}isEmptyBuffer(){returnthis._buffer.length===0}emptyBuffer(){returnthis._buffer="",this}addRaw(e,r=!1){returnthis._buffer+=e,r?this.addEOL():this}addEOL(){returnthis.addRaw(Toe.EOL)}addCodeBlock(e,r){lets=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),s);returnthis.addRaw(i).addEOL()}addList(e,r=!1){lets=r?"ol":"ul",i=e.map(o=>this.wrap("li",o)).join(""),n=this.wrap(s,i);returnthis.addRaw(n).addEOL()}addTable(e){letr=e.map(i=>{letn=i.map(o=>{if(typeofo=="string")returnthis.wrap("td",o);let{header:a,data:c,colspan:l,rowspan:u}=o,h=a?"th":"td",d=Object.assign(Object.assign({},l&&{colspan:l}),u&&{rowspan:u});returnthis.wrap(h,c,d)}).join("");returnthis.wrap("tr",n)}).join(""),s=this.wrap("table",r);returnthis.addRaw(s).addEOL()}addDetails(e,r){lets=this.wrap("details",this.wrap("summary",e)+r);returnthis.addRaw(s).addEOL()}addImage(e,r,s){let{width:i,height:n}=s||{},o=Object.assign(Object.assign({}
${lXe.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function LN(t){return t instanceof _i?!0:sp(t)&&t.name==="RestError"}function dn(t,e){return Buffer.from(t,e)}var FN=D(require("node:http"),1),UN=D(require("node:https"),1),OU=D(require("node:zlib"),1),xhe=require("node:stream");var Vo=YI("ts-http-runtime");var uXe={};function WI(t){return t&&typeof t.pipe=="function"}function Bhe(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 Nhe(t){return t&&typeof t.byteLength=="number"}var qN=class extends xhe.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}},DU=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new Tc("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 Ga;Vo.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=pXe(a);l!==null&&e.headers.set("Content-Length",l)}let c;try{if(a&&e.onUploadProgress){let p=e.onUploadProgress,m=new qN(p);m.on("error",E=>{Vo.error("Error in upload progress",E)}),WI(a)?a.pipe(m):m.end(a),a=m}let l=await this.makeRequest(e,r,a);i!==void 0&&clearTimeout(i);let u=hXe(l),d={status:l.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return l.resume(),d;c=o?dXe(l,u):l;let f=e.onDownloadProgress;if(f){let p=new qN(f);p.on("error",m=>{Vo.error("Error in download progress",m)}),c.pipe(p),c=p}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=c:d.bodyAsText=await fXe(c),d}finally{if(e.abortSignal&&s){let l=Promise.resolve();WI(a)&&(l=Bhe(a));let u=Promise.resolve();WI(c)&&(u=Bhe(c)),Promise.all([l,u]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(h=>{Vo.warning("Error when cleaning up abortListener on httpRequest",h)})}}}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?FN.default.request(a,c):UN.default.request(a,c);u.once("error",h=>{l(new _i(h.message,{code:h.code??_i.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let h=new Tc("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(h),l(h)}),s&&WI(s)?s.pipe(u):s?typeof s=="string"||Buffer.isBuffer(s)?u.end(s):Nhe(s)?u.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(Vo.error("Unrecognized body type",s),l(new _i("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?FN.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new FN.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return UN.default.globalAgent;let i=e.tlsSettings??uXe,n=this.cachedHttpsAgents.get(i);return n&&n.options.keepAlive===!s||(Vo.info("No cached TLS Agent exist, creating a new Agent"),n=new UN.default.Agent({keepAlive:!s,...i}),this.cachedHttpsAgents.set(i,n)),n}}};function hXe(t){let e=Zn();for(let r of Object.keys(t.headers)){let s=t.headers[r];Array.isArray(s)?s.length>0&&e.set(
`;return e}function $Ze(t){return t instanceof Uint8Array?t.byteLength:uv(t)?t.size===-1?void 0:t.size:void 0}function jZe(t){let e=0;for(let r of t){let s=$Ze(r);if(s===void 0)return;e+=s}return e}async function JZe(t,e,r){let s=[dn(`--${r}`,"utf-8"),...e.flatMap(n=>[dn(`\r
`,"utf-8")],i=jZe(s);i&&t.headers.set("Content-Length",i),t.body=await Rde(s)}var e0="multipartPolicy",YZe=70,WZe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function KZe(t){if(t.length>YZe)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!WZe.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}function dv(){return{name:e0,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?KZe(r):r=VZe(),t.headers.set("Content-Type",`${n};boundary=${r}`),await JZe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function fv(){return MN()}var Tde=ON({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),X4t=Tde.logger;function Pc(t){return Tde.createClientLogger(t)}var Oc=Pc("core-rest-pipeline");function tq(t={}){return HN({logger:Oc.info,...t})}var rq=VN;function sq(t={}){return zN(t)}var pv=D(require("node:os"),1),Av=D(require("node:process"),1);function _de(){return"User-Agent"}async function Qde(t){if(Av.default&&Av.default.versions){let e=`${pv.default.type()}${pv.default.release()};${pv.default.arch()}`,r=Av.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 mv="1.22.2";function n7e(t){let e=[];for(let[r,s]of t){let i=s?`${r}/${s}`:r;e.push(i)}return e.join(" ")}function Pde(){return _de()}async function gv(t){let e=new Map;e.set("core-rest-pipeline",mv),await Qde(e);let r=n7e(e);return t?`${t}${r}`:r}var Ode=Pde(),Dde="userAgentPolicy";function iq(t={}){let e=gv(t.userAgentPrefix);return{name:Dde,async sendRequest(r,s){return r.headers.has(Ode)||r.headers.set(Ode,await e),s(r)}}}var so=class extends Error{constructor(e){super(e),this.name="AbortError"}};function nq(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:i}=e??{};return new Promise((n,o)=>{function a(){o(new so(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 u7e="The delay was aborted.";function t0(t,e){let r,{abortSignal:s,abortErrorMsg:i}=e??{};return nq(n=>{r=setTimeout(n,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:s,abortErrorMsg:i??u7e})}function hd(t){if(sp(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 kde(t){return sp(t)}function yg(){return rp()}var Bt=op;var Mde=Symbol("rawContent");function aq(t){return typeof t[Mde]=="function"}function Lde(t){return aq(t)?t[Mde]():t}var yv=e0;function cq(){let t=dv();return{name:yv,sendRequest:async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)aq(s.body)&&(s.body=Lde(s.body));return t.sendRequest(e,r)}}}var lq=$N;function uq(){return jN()}function hq(t={}){return WN(t)}function dq(){return KN()}function dd(t){return WU(t)}function fq(t,e){return av(t,e)}var Fde="setClientRequestIdPolicy";function pq(t="x-ms-client-request-id"){return{name:Fde,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function Aq(t){return cv(t)}function mq(t){return lv(t)}var Eg={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Ude(t={}){let e=new gq(t.parentContext);return t.span&&(e=e.setValue(Eg.span,t.span)),t.namespace&&(e=e.setValue(Eg.namespace,t.namespace)),e}var gq=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--),!ket(c)){let h;return c.trim().length===0?h="Invalid space after '<'.":h="Tag '"+c+"' is an invalid name.",kr("InvalidTag",h,Qi(t,n))}let l=_et(t,n);if(l===!1)return kr("InvalidAttr","Attributes for '"+c+"' have open quote.",Qi(t,n));let u=l.value;if(n=l.index,u[u.length-1]==="/"){let h=n-u.length;u=u.substring(0,u.length-1);let d=wfe(u,e);if(d===!0)s=!0;else return kr(d.err.code,d.err.msg,Qi(t,h+d.err.line))}else if(a)if(l.tagClosed){if(u.trim().length>0)return kr("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",Qi(t,o));if(r.length===0)return kr("InvalidTag","Closing tag '"+c+"' has not been opened.",Qi(t,o));{let h=r.pop();if(c!==h.tagName){let d=Qi(t,h.tagStartPos);return kr("InvalidTag","Expected closing tag '"+h.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+c+"'.",Qi(t,o))}r.length==0&&(i=!0)}}else return kr("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",Qi(t,n));else{let h=wfe(u,e);if(h!==!0)return kr(h.err.code,h.err.msg,Qi(t,n-u.length+h.err.line));if(i===!0)return kr("InvalidXml","Multiple possible root nodes found.",Qi(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=bfe(t,n);continue}else if(t[n+1]==="?"){if(n=Ife(t,++n),n.err)return n}else break;else if(t[n]==="&"){let h=Oet(t,n);if(h==-1)return kr("InvalidChar","char '&' is not expected.",Qi(t,n));n=h}else if(i===!0&&!Cfe(t[n]))return kr("InvalidXml","Extra text at the end",Qi(t,n));t[n]==="<"&&n--}}else{if(Cfe(t[n]))continue;return kr("InvalidChar","char '"+t[n]+"' is not expected.",Qi(t,n))}if(s){if(r.length==1)return kr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Qi(t,r[0].tagStartPos));if(r.length>0)return kr("InvalidXml","Invalid '"+JSON.stringify(r.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return kr("InvalidXml","Start tag expected.",1);return!0}function Cfe(t){return t===" "||t===" "||t===`
`||t==="\r"}function Ife(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 kr("InvalidXml","XML declaration allowed only at the start of the document.",Qi(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function bfe(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 Ret='"',Tet="'";function _et(t,e){let r="",s="",i=!1;for(;e<t.length;e++){if(t[e]===Ret||t[e]===Tet)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 Qet=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function wfe(t,e){let r=Rv(t,Qet),s={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return kr("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",f0(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return kr("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",f0(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return kr("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",f0(r[i]));let n=r[i][2];if(!Det(n))return kr("InvalidAttr","Attribute '"+n+"' is an invalid name.",f0(r[i]));if(!Object.prototype.hasOwnProperty.call(s,n))s[n]=1;else return kr("InvalidAttr","Attribute '"+n+"' is repeated.",f0(r[i]))}return!0}function Pet(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 Oet(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Pet(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 kr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Det(t){return Dq(t)}function ket(t){return Dq(t)}function Qi(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function f0(t){return t.startIndex+t[1].length}var Sfe={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"},Bfe={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 mn("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=this.options,n=new m0(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=Sg(t,">",a,"Closing Tag is not closed."),h=t.substring(a+2,u).trim();if(i.removeNSPrefix){let f=h.indexOf(":");f!==-1&&(h=h.substr(f+1))}h=Hq(i.transformTagName,h,"",i).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let d=this.matcher.getCurrentTag();if(h&&i.unpairedTagsSet.has(h))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${h}>`);d&&i.unpairedTagsSet.has(d)&&(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=Vq(t,a,!1,"?>");if(!u)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let h=this.buildAttributesMap(u.tagExp,this.matcher,u.tagName,!0);if(h){let d=h[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(d)||1),n.setXmlVersion(Number(d)||1)}if(!(i.ignoreDeclaration&&u.tagName==="?xml"||i.ignorePiTags)){let d=new mn(u.tagName);d.add(i.textNodeName,""),u.tagName!==u.tagExp&&u.attrExpPresent&&i.ignoreAttributes!==!0&&(d[":@"]=h),this.addChild(r,d,this.readonlyMatcher,a)}a=u.closeIndex+1}else if(l===33&&t.charCodeAt(a+2)===45&&t.charCodeAt(a+3)===45){let u=Sg(t,"-->",a+4,"Comment is not closed.");if(i.commentPropName){let h=t.substring(a+4,u-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(i.commentPropName,[{[i.textNodeName]:h}])}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=Sg(t,"]]>",a,"CDATA is not closed.")-2,h=t.substring(a+9,u);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let d=this.parseTextData(h,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);d==null&&(d=""),i.cdataPropName?r.add(i.cdataPropName,[{[i.textNodeName]:h}]):r.add(i.textNodeName,d),a=u+2}else{let u=Vq(t,a,i.removeNSPrefix);if(!u){let O=t.substring(Math.max(0,a-50),Math.min(o,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${O}"`)}let h=u.tagName,d=u.rawTagName,f=u.tagExp,p=u.attrExpPresent,m=u.closeIndex;if({tagName:h,tagExp:f}=Hq(i.transformTagName,h,f,i),i.strictReservedNames&&(h===i.commentPropName||h===i.cdataPropName||h===i.textNodeName||h===i.attributesGroupName))throw new Error(`Invalid tag name: ${h}`);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,h[h.length-1]==="/"?(h=h.substr(0,h.length-1),f=h):f=f.substr(0,f.length-1),p=h!==f);let C=null,w={},B;B=ntt(d),h!==e.tagname&&this.matcher.push(h,{},B),h!==f&&p&&(C=this.buildAttributesMap(f,this.matcher,h),C&&(w=itt(C,i))),h!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=a;if(this.isCurrentNodeStopNode){let O="";if(y)a=u.closeIndex;else if(i.unpairedTagsSet.has(h))a=u.closeIndex;else{let M=this.readStopNodeData(t,d,m+1);if(!M)throw new Error(`Unexpected end of ${d}`);a=M.i,O=M.tagContent}let P=new mn(h);C&&(P[":@"]=C),P.add(i.textNodeName,O),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,P,this.readonlyMatcher,N)}else{if(y){({tagName:h,tagExp:f}=Hq(i.transformTagName,h,f,i));let O=new mn(h);C&&(O[":@"]=C),this.addChild(r,O,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(h)){let O=new mn(h);C&&(O[":@"]=C),this.addChild(r,O,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=u.closeIndex;continue}else{let O=new mn(h);if(this.tagsNodeStack.length>i.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),C&&(O[":@"]=C),this.addChild(r,O,this.readonlyMatcher,N),r=O}s="",a=m}}}elses+=t[a];returne.child};functionh
`}),s}getCanonicalizedResourceString(e){let r=Vv(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let i=zv(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}:${decodeURIComponent(n[a])}`}return s}};var Cr=class extends Ap{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new I0(e,r,this)}computeHMACSHA256(e){return(0,rpe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var as=Pc("storage-common");var Jo;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Jo||(Jo={}));var gd={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Jo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Ltt=new so("The operation was aborted."),b0=class extends Lc{retryOptions;constructor(e,r,s=gd){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:gd.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):gd.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:gd.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:gd.maxRetryDelayInMs):gd.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:gd.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:gd.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,s){let i=e.clone(),n=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||s%2===1;n||(i.url=Hv(i.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(i.url=md(i.url,Bu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(as.info(`RetryPolicy:=====>Try=${s}${n?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(i),!this.shouldRetry(n,s,o))return o;r=r||!n&&o.status===404}catch(a){if(as.error(`RetryPolicy:Caughterror,message:${a.message},code:${a.code}`),!this.shouldRetry(n,s,o,a))throw a}return await this.delay(n,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,i){if(r>=this.retryOptions.maxTries)return as.info(`RetryPolicy:Attempt(s)${r}>=maxTries${this.retryOptions.maxTries},nofurthertry.`),!1;let n=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i){for(let o of n)if(i.name.toUpperCase().includes(o)||i.message.toUpperCase().includes(o)||i.code&&i.code.toString().toUpperCase()===o)return as.info(`RetryPolicy:Networkerror${o}found,willretry.`),!0}if(s||i){let o=s?s.status:i?i.statusCode:0;if(!e&&o===404)return as.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return as.info(`RetryPolicy:Willretryforstatuscode${o}.`),!0}if(s&&s?.status>=400){let o=s.headers.get(qe.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return i?.code==="PARSE_ERROR"&&i?.message.startsWith('Error "Error: Unclosed root tag')?(as.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,s){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case Jo.EXPONENTIAL:i=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Jo.FIXED:i=this.retryOptions.retryDelayInMs;break}else i=Math.random()*1e3;return as.info(`RetryPolicy:Delayfor${i}ms`),$v(i,s,Ltt)}};var w0=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new b0(e,r,this.retryOptions)}};var Ftt="storageBrowserPolicy";function spe(){return{name:Ftt,async sendRequest(t,e){return Bt||((t.method==="GET"||t.method==="HEAD")&&(t.url=md(t.url,Bu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(qe.COOKIE),t.headers.delete(qe.CONTENT_LENGTH)),e(t)}}}var Utt="StorageCorrectContentLengthPolicy";function ipe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(qe.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:Utt,async send
`}),a}function i(n){let o=Vv(n.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=zv(n.url),l={};if(c){let u=[];for(let h in c)if(Object.prototype.hasOwnProperty.call(c,h)){let d=h.toLowerCase();l[d]=c[h],u.push(d)}u.sort();for(let h of u)a+=`
`),n=e.computeHMACSHA256(i);return{sasQueryParameters:new Ja(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 Yst(t,e){if(t=Sp(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=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?xt(t.startsOn,!1):"",t.expiresOn?xt(t.expiresOn,!1):"",wp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ja(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 Ja(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 Wst(t,e){if(t=Sp(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=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?xt(t.startsOn,!1):"",t.expiresOn?xt(t.expiresOn,!1):"",wp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ja(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 Ja(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 Kst(t,e){if(t=Sp(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=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?xt(t.startsOn,!1):"",t.expiresOn?xt(t.expiresOn,!1):"",wp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?xt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?xt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?ja(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 Ja(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 Xst(t,e){if(t=Sp(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=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?xt(t.startsOn,!1):"",t.expiresOn?xt(t.expiresOn,!1):"",wp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?xt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?xt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ja(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 Ja(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 Zst(t,e){if(t=Sp(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=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?xt(t.startsOn,!1):"",t.expiresOn?xt(t.expiresOn,!1):"",wp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?xt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?xt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ja(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 Ja(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 eit(t,e){if(t=Sp(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=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?xt(t.startsOn,!1):"",t.expiresOn?xt(t.expiresOn,!1):"",wp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?xt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?xt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?ja(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 Ja(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 wp(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}function Sp(t){let e=t.version?t.version:Wv;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 k0=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=yg()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Ha||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Ha||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 we.withSpan("BlobLeaseClient-acquireLease",r,async s=>Ne(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!==Ha||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Ha||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 we.withSpan("BlobLeaseClient-changeLease",r,async s=>{let i=Ne(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!==Ha||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Ha||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"}};Lg.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var vp=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
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"}};vp.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var $0=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var Kit=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(h){o(h)}}function c(u){try{l(s.throw(u))}catch(h){o(h)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},$8=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);G(`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 Eme(t,e,r){return Kit(this,void 0,void 0,function*(){var s;let i=new Ou(t),n=i.getBlockBlobClient(),o=new $8((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(),_(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let c=yield n.uploadFile(e,a);if(c._response.status>=400)throw new tT(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw Ot(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}var Ime=D(require("buffer"),1),sl=D(require("fs"),1),bme=D(require("stream"),1),wme=D(require("util"),1);var rT=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(h){o(h)}}function c(u){try{l(s.throw(u))}catch(h){o(h)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})};function sT(t){return t?t>=200&&t<300:!1}function Xit(t){return t?t>=500:!0}function Zit(t){return t?[Er.BadGateway,Er.ServiceUnavailable,Er.GatewayTimeout].includes(t):!1}function ent(t){return rT(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function Cme(t,e,r){return rT(this,arguments,void 0,function*(s,i,n,o=vN,a=RN,c=void 0){let l="",u=1;for(;u<=o;){let h,d,f=!1;try{h=yield i()}catch(p){c&&(h=c(p)),f=!0,l=p.message}if(h&&(d=n(h),!Xit(d)))return h;if(d&&(f=Zit(d),l=`Cache service responded with ${d}`),_(`${s} - Attempt ${u} of ${o} failed with error: ${l}`),!f){_(`${s} - Error is not retryable`);break}yield ent(a),u++}throw Error(`${s} failed: ${l}`)})}function j0(t,e){return rT(this,arguments,void 0,function*(r,s,i=vN,n=RN){return yield Cme(r,s,o=>o.statusCode,i,n,o=>{if(o instanceof Rc)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function Fg(t,e){return rT(this,arguments,void 0,function*(r,s,i=vN,n=RN){return yield Cme(r,s,o=>o.message.statusCode,i,n)})}var Zo=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(h){o(h)}}function c(u){try{l(s.throw(u))}catch(h){o(h)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})};function tnt(t,e){return Zo(this,void 0,void 0,function*(){yield wme.promisify(bme.pipeline)(t.message,e)})}var iT=class{constructor(e){this.contentLength=e,this.segmentIndex=0,this.s
Othercacheswithsimilarkey:`);for(let a of n?.artifactCaches||[])_(`CacheKey:${a?.cacheKey},CacheVersion:${a?.cacheVersion},CacheScope:${a?.scope},CacheCreated:${a?.creationTime}`)}}})}function W8(t,e,r){return Cn(this,void 0,void 0,function*(){let s=new Pme.URL(t),i=Nme(r);s.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield Bme(t,e,i):i.concurrentBlobDownloads?yield Sme(t,e,i):yield nT(t,e):yield nT(t,e)})}function Dme(t,e,r){return Cn(this,void 0,void 0,function*(){let s=Y8(),i=lg(e,r?.compressionMethod,r?.enableCrossOsArchive),n={key:t,version:i,cacheSize:r?.cacheSize};return yield j0("reserveCache",()=>Cn(this,void 0,void 0,function*(){return s.postJson(Y0("caches"),n)}))})}function Qme(t,e){return`bytes${t}-${e}/*`}function lnt(t,e,r,s,i){return Cn(this,void 0,void 0,function*(){_(`Uploadingchunkofsize${i-s+1}bytesatoffset${s}withcontentrange:${Qme(s,i)}`);let n={"Content-Type":"application/octet-stream","Content-Range":Qme(s,i)},o=yield Fg(`uploadChunk(start:${s},end:${i})`,()=>Cn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),n)}));if(!sT(o.message.statusCode))throw new Error(`Cacheservicerespondedwith${o.message.statusCode}duringuploadchunk.`)})}function unt(t,e,r,s){return Cn(this,void 0,void 0,function*(){let i=vc(r),n=Y0(`caches/${e.toString()}`),o=Ug.openSync(r,"r"),a=j8(s),c=IU("uploadConcurrency",a.uploadConcurrency),l=IU("uploadChunkSize",a.uploadChunkSize),u=[...new Array(c).keys()];_("Awaiting all uploads");let h=0;try{yield Promise.all(u.map(()=>Cn(this,void 0,void 0,function*(){for(;h<i;){let d=Math.min(i-h,l),f=h,p=h+d-1;h+=l,yield lnt(t,n,()=>Ug.createReadStream(r,{fd:o,start:f,end:p,autoClose:!1}).on("error",m=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${m.message}`)}),f,p)}})))}finally{Ug.closeSync(o)}})}function hnt(t,e,r){return Cn(this,void 0,void 0,function*(){let s={size:r};return yield j0("commitCache",()=>Cn(this,void 0,void 0,function*(){return t.postJson(Y0(`caches/${e.toString()}`),s)}))})}function K8(t,e,r,s){return Cn(this,void 0,void 0,function*(){if(j8(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Eme(r,e,s)}else{let n=Y8();_("Upload cache"),yield unt(n,t,e,s),_("Commiting cache");let o=vc(e);G(`CacheSize:~${Math.round(o/(1024*1024))}MB(${o}B)`);let a=yield hnt(n,t,o);if(!sT(a.statusCode))throw new Error(`Cacheservicerespondedwith${a.statusCode}duringcommitcache.`);G("Cache saved successfully")}})}var Rge=D(bge(),1),Ur=D(Fr(),1),lo=D(Fr(),1),Pp=D(Fr(),1),Op=D(Fr(),1),Dp=D(Fr(),1);var zV=D(Fr(),1),$V=D(Fr(),1),xge=D(Fr(),1),Nge=D(Fr(),1),vge=D(Fr(),1);var GV=D(Fr(),1),HV=D(Fr(),1),wge=D(Fr(),1),Sge=D(Fr(),1),Bge=D(Fr(),1),VV=class extends Bge.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,Sge.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,wge.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?HV.UnknownFieldHandler.onRead:l)(this.typeName,n,a,c,u)}}return n}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,GV.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,GV.WireType.Varint).int64(e.permission);let i=s.writeUnknownFields;return i!==!1&&(i==!0?HV.UnknownFieldHandler.onWrite:i)(this.typeName,e,r),r}},$T=new VV;var jV=class extends vge.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:()=>$T}])}create(e){let r={repositoryId:"0",scope:[]};
`));let s=yield cz(r,"create");yield lz(s,t)})}var sy=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(h){o(h)}}function c(u){try{l(s.throw(u))}catch(h){o(h)}}function l(u){u.done?n(u.value):i(u.value).then(a,c)}l((s=s.apply(t,e||[])).next())})},Ka=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},ry=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},WT=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Pge(t){if(!t||t.length===0)throw new Ka("Path Validation Error: At least one directory or file path is required")}function dz(t){if(t.length>512)throw new Ka(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new Ka(`KeyValidationError:${t}cannotcontaincommas.`)}function fz(){return J0()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function Oge(t,e,r,s){return sy(this,arguments,void 0,function*(i,n,o,a,c=!1){let l=J0();return _(`Cacheserviceversion:${l}`),Pge(i),l==="v2"?yield xat(i,n,o,a,c):yield Bat(i,n,o,a,c)})}function Bat(t,e,r,s){return sy(this,arguments,void 0,function*(i,n,o,a,c=!1){o=o||[];let l=[n,...o];if(_("Resolved Keys:"),_(JSON.stringify(l)),l.length>10)throw new Ka("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of l)dz(d);let u=yield $I(),h="";try{let d=yield Ome(l,i,{compressionMethod:u,enableCrossOsArchive:c});if(!d?.archiveLocation)return;if(a?.lookupOnly)return G("Lookup only - skipping download"),d.cacheKey;h=hb.join(yield VI(),cd(u)),_(`ArchivePath:${h}`),yield W8(d.archiveLocation,h,a),mu()&&(yield ub(h,u));let f=vc(h);return G(`CacheSize:~${Math.round(f/(1024*1024))}MB(${f}B)`),yield uz(h,u),G("Cache restored successfully"),d.cacheKey}catch(d){let f=d;if(f.name===Ka.name)throw d;f instanceof Rc&&typeof f.statusCode=="number"&&f.statusCode>=500?Km(`Failedtorestore:${d.message}`):Ot(`Failedtorestore:${d.message}`)}finally{try{yield zI(h)}catch(d){_(`Failedtodeletearchive:${d}`)}}})}function xat(t,e,r,s){return sy(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(_("Resolved Keys:"),_(JSON.stringify(l)),l.length>10)throw new Ka("Key Validation Error: Keys are limited to a maximum of 10.");for(let h of l)dz(h);let u="";try{let h=az(),d=yield $I(),f={key:n,restoreKeys:o,version:lg(i,d,c)},p=yield h.GetCacheEntryDownloadURL(f);if(!p.ok){_(`Cachenotfoundforversion${f.version}ofkeys:${l.join(", ")}`);return}if(f.key!==p.matchedKey?G(`Cachehitforrestore-key:${p.matchedKey}`):G(`Cachehitfor:${p.matchedKey}`),a?.lookupOnly)return G("Lookup only - skipping download"),p.matchedKey;u=hb.join(yield VI(),cd(d)),_(`Archivepath:${u}`),_(`Startingdownloadofarchiveto:${u}`),yield W8(p.signedDownloadUrl,u,a);let E=vc(u);return G(`CacheSize:~${Math.round(E/(1024*1024))}MB(${E}B)`),mu()&&(yield ub(u,d)),yield uz(u,d),G("Cache restored successfully"),p.matchedKey}catch(h){let d=h;if(d.name===Ka.name)throw h;d instanceof Rc&&typeof d.statusCode=="number"&&d.statusCode>=500?Km(`Failedtorestore:${h.message}`):Ot(`Failedtorestore:${h.message}`)}finally{try{u&&(yield zI(u))}catch(h){_(`Failedtodeletearchive:${h}`)}}})}function pz(t,e,r){return sy(this,arguments,void 0,function*(s,i,n,o=!1){let a=J0();return _(`Cacheserviceversion:${a}`),Pge(s),dz(i),a==="v2"?yield vat(s,i,n,o):yield Nat(s,i,n,o)})}function Nat(t,e,r){return sy(this,arguments,void 0,function*(s,i,n,o=!1){var a,c,l,u,h;let d=yield $I(),f=-1,p=yield CU(s);if(_("Cache Paths:"),_(`${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 m=yield VI(),E=hb.join(m,cd(d));_(`ArchivePath:${E}`);try{yie
`,o).length:h,l?(a===null?0:a.length)+c.length:0,l?c.length+h:0);return d<f},parse:function(s,i,n,o){let{bom:a,comment_no_infix:c,encoding:l,from_line:u,ltrim:h,max_record_size:d,raw:f,relax_quotes:p,rtrim:m,skip_empty_lines:E,to:y,to_line:C}=this.options,{comment:w,escape:B,quote:N,record_delimiter:O}=this.options,{bomSkipped:P,previousBuf:M,rawBuffer:V,escapeIsQuote:Z}=this.state,F;if(M===void 0)if(s===void 0){o();return}else F=s;else M!==void 0&&s===void 0?F=M:F=Buffer.concat([M,s]);if(P===!1)if(a===!1)this.state.bomSkipped=!0;else if(F.length<3){if(i===!1){this.state.previousBuf=F;return}}else{for(let $ in yy)if(yy[$].compare(F,0,yy[$].length)===0){let re=yy[$].length;this.state.bufBytesStart+=re,F=F.slice(re);let Qe=M3({...this.original_options,encoding:$});for(let be in Qe)this.options[be]=Qe[be];({comment:w,escape:B,quote:N}=this.options);break}this.state.bomSkipped=!0}let U=F.length,H;for(H=0;H<U&&!this.__needMoreData(H,U,i);H++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),C!==-1&&this.info.lines>C){this.state.stop=!0,o();return}this.state.quoting===!1&&O.length===0&&this.__autoDiscoverRecordDelimiter(F,H)&&(O=this.options.record_delimiter);let $=F[H];if(f===!0&&V.append($),($===Xft||$===Zft)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(B!==null&&this.state.quoting===!0&&this.__isEscape(F,H,$)&&H+B.length<U)if(Z){if(this.__isQuote(F,H+B.length)){this.state.escaping=!0,H+=B.length-1;continue}}else{this.state.escaping=!0,H+=B.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(F,H))if(this.state.quoting===!0){let be=F[H+N.length],ce=m&&this.__isCharTrimable(F,H+N.length),at=w!==null&&this.__compareBytes(w,F,H+N.length,be),Ze=this.__isDelimiter(F,H+N.length,be),Et=O.length===0?this.__autoDiscoverRecordDelimiter(F,H+N.length):this.__isRecordDelimiter(be,F,H+N.length);if(B!==null&&this.__isEscape(F,H,$)&&this.__isQuote(F,H+B.length))H+=B.length-1;else if(!be||Ze||Et||at||ce){this.state.quoting=!1,this.state.wasQuoting=!0,H+=N.length-1;continue}else if(p===!1){let De=this.__error(new mt("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got"${String.fromCharCode(be)}"`,`atline${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(De!==void 0)return De}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(N),H+=N.length-1}else if(this.state.field.length!==0){if(p===!1){let be=this.__infoField(),ce=Object.keys(yy).map(Ze=>yy[Ze].equals(this.state.field.toString())?Ze:!1).filter(Boolean)[0],at=this.__error(new mt("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`aquoteisfoundonfield${JSON.stringify(be.column)}atline${be.lines},valueis${JSON.stringify(this.state.field.toString(l))}`,ce?`(${ce}bom)`:void 0],this.options,be,{field:this.state.field}));if(at!==void 0)return at}}else{this.state.quoting=!0,H+=N.length-1;continue}if(this.state.quoting===!1){let be=this.__isRecordDelimiter($,F,H);if(be!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=u){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),H+=be-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,H+=be-1;continue}this.info.bytes=this.state.bufBytesStart+H;let Ze=this.__onField();if(Ze!==void 0)return Ze;this.info.bytes=this.state.bufBytesStart+H+be;let Et=this.__onRecord(n);if(Et!==void 0)return Et;if(y!==-1&&this.info.records>=y){this.state.stop=!0,o();return}}this.state.commenting=!1,H+=be-1;continue}if(this.state.commenting)continue;if(w!==null&&(c===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(w,F,H,$)!==0){this.state.commenting=!0;continue}let ce=this.__isDelimiter(F,H,$);if(ce!==0){this.inf
`),{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=Ao(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=Ao(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let i of r)for(let n of i)try{let o=bt.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&&bc(n),[i,n]}};var h5=D(require("fs"),1),$0e=D(require("path"),1);var fQ=class t{buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new yt,this.metadataFilename=`bake-metadata-${bt.generateRandomString()}.json`}getMetadataFilePath(){return $0e.default.join(It.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!h5.default.existsSync(e))return;let r=h5.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(!bt.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.vars)for(let c of e.vars)s.push("--var",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 ve.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=Ao(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=bt.parseBool(o);break;default:r[n]=o}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=Ao(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(i=>i.trim()).filter(i=>i.length>0);return s}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var AOe=require("crypto"),zl=D(require("fs"),1),Af=D(require("path"),1);var _S=D(Ub(),1),$l=D(iQe(),1),mOe=D(gW(),1),eC=D(cOe(),1);var yK=D(Ub(),1);var uOe=D(Xa(),1);var lOe="application/vnd.oci.empty.v1+json";var Rh=class{binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await ve.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(_(`Cosign.isAvailablecmderr:${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(_(`Cosign.isAvailableerror:${r}`),!1));return _(`Cosign.isAvailable:${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await ve.getExecOutput(this.binPath,["version","--json"],{ignoreReturnCode:!0,silent:!0}).then(e=>{if(e.stderr.length>0&&e.exitCode!=0)throw new Error(e.stderr.trim());return JSON.parse(e.stdout.trim()).gitVersion}),this._version)}async printVersion(){await ve.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let s=r??await this.version();if(!s)return _("Cosign.versionSatisfies false: undefined version"),!1;let i=uOe.satisfies(s,e)||/^[0-9a-f]{7}$/.exec(s)!==null;return _(`Cosign.versionSatisfies${s}statisfies${e}:${i}`),i}static parseCommandOutput(e){let r,s,i,n;for(let o of e.split(/\r?\n/)){let a=o.trim();if(!a.startsWith("{")||!a.endsWith("}"))continue;let c;try{c=JSON.parse(a)}catch{continue}if(c&&Array.isArray(c.errors)&&c.errors.length>0&&(n=c.errors),!r&&c&&Array.isArray(c.manifests)&&c.manifests.length>0){let l=c.manifests[0];l?.artifactType===yK.BUNDLE_V03_MEDIA_TYPE&&typeof l.digest=="string"?r=l.digest:l?.artifactType===lOe&&typeof l.digest=="string"&&(s=l.digest)}if(!i&&c&&c.mediaType===yK.BUNDLE_V03_MEDIA_TYPE&&(i=c),i&&(r||s)){n=void 0;break}}return{bundle:i,signatureManifestDigest:r||s,errors:n}}};var EK=D(require("fs"),1);var OD=class t{buildx;constructor(e){this.buildx=e?.buildx||new yt}async getCommand(e){return await this.buildx.getCommand(["imagetools",...e])}async getInspectCommand(e){return await this.getCommand(["inspect",...e])}async getCreateCommand(e){return await this.getCommand(["create",...e])}async inspectImage(e){return await this.inspect(e,"{{json .Image}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"config"),r;throw new Error("Unexpected output format")})}async inspectManifest(e){return await this.inspect(e,"{{json .Manifest}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"manifests"),r;throw new Error("Unexpected output format")})}async attestationDescriptors(e){let r=await this.inspectManifest(e);if(typeof r!="object"||r===null||!("manifests"in r)||!Array.isArray(r.manifests))throw new Error(`Nodescriptorfoundfor${e.name}`);let s=r.manifests.filter(o=>o.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return s;let i=e.platform,n=new Map;for(let o of r.manifests)o.digest&&n.set(o.digest,o);return s.filter(o=>{let a=o.annotations?.["vnd.docker.reference.digest"];if(!a)return!1;let c=n.get(a);return c?c.platform?.os===i.os&&c.platform?.architecture===i.architecture&&(c.platform?.variant??"")===(i.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],s=It.tmpName({tmpdir:It.tmpDir(),template:"imagetools-metadata-XXXXXX"}),i=[],n=[];for(let a of e.sources){if(a.startsWith("cwd://")){let c=a.substring(6);c.length>0&&i.push(c);continue}n.push(a)}if(e.tags)for(let a of e.tags)r.push("--tag",a);if(e.platforms)for(let a of e.platforms)r.push("--platform",a);if(e.annotations)for(let a of e.annotations)r.push("--annotation",a);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",s);for(let a of i)r.push("--file",a);for(let a of n)r.push(a);let o=await this.getCreateComm
${o.message}`),await new Promise(l=>setTimeout(l,Math.pow(2,a)*100))}throw o??new Error(`ImageToolsinspectcommandfailedfor${e.name}`)}async execInspect(e,r,s){return await ve.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(i=>{if(i.stderr.length>0&&i.exitCode!=0)throw new Error(i.stderr.trim());return s(JSON.parse(i.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(e)}};var hOe="application/vnd.in-toto+json";var dOe="https://fulcio.sigstore.dev",fOe="https://rekor.sigstore.dev",pOe="https://timestamp.sigstore.dev",zA="https://search.sigstore.dev";var ukt="slsaprovenance1",mf=class t{cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Rh,this.imageTools=e?.imageTools||new OD}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");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);G(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let i=t.noTransparencyLog(e.noTransparencyLog),n=[];await this.cosign.versionSatisfies(">=3.0.4")?await Zt("Creating Sigstore protobuf signing config",async()=>{let o=It.tmpName({template:"signing-config-XXXXXX.json",tmpdir:It.tmpDir()}),a=["signing-config","create","--with-default-services=true",`--out=${o}`];i&&a.push("--no-default-rekor=true"),await ve.exec(this.cosign.binPath,a,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),G(JSON.stringify(JSON.parse(zl.default.readFileSync(o,{encoding:"utf-8"})),null,2)),n.push(`--signing-config=${o}`)}):(n.push("--use-signing-config"),i&&n.push("--tlog-upload=false"));for(let o of e.imageNames){let a=await this.imageTools.attestationDigests({name:`${o}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let c of a){let l=`${o}@${c}`;await Zt(`Signingattestationmanifest${l}`,async()=>{let u=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...n];G(`[command]${this.cosign.binPath}${[...u,l].join(" ")}`);let h=await ve.getExecOutput(this.cosign.binPath,["--verbose",...u,l],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),d=Rh.parseCommandOutput(h.stderr.trim());if(h.exitCode!=0)if(d.errors&&d.errors.length>0){let p=d.errors.map(m=>`-[${m.code}]${m.message}:${m.detail}`).join(`
${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);G(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let i=t.getProvenanceBlobs(e);for(let n of Object.keys(i))await Zt(`Signing${n}`,async()=>{let o=i[n],a=Af.default.join(Af.default.dirname(n),`${e.name??"provenance"}.sigstore.json`),c=t.getProvenanceSubjects(o);if(c.length===0){Ot(`Nosubjectsfoundinprovenance${n},skipsigning.`);return}let l=await t.signPayload({data:o,type:hOe},s),u=t.parseBundle(l);G("Provenance blob signed for:");for(let h of c){let[d,f]=Object.entries(h.digest)[0]||[];G(`-${h.name}(${d}:${f})`)}u.tlogID&&G(`AttestationsignatureuploadedtoRekortransparencylog:${zA}?logIndex=${u.tlogID}`),G(`WritingSigstorebundleto:${a}`),zl.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=Af.default.dirname(i);await Zt(`Verifyingsignaturebundle${n.bundlePath}`,async()=>{for(let a of n.subjects){let c=Af.default.join(o,a.name);G(`Verifyingsignedartifact${c}`);let l=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??ukt];(r.noTransparencyLog||!n.tlogID)&&l.push("--use-signed-timestamps","--insecure-ignore-tlog");let u=await ve.getExecOutput(this.cosign.binPath,[...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){G("Verifying keyless verification bundle signature");let i=JSON.parse(zl.default.readFileSync(r,"utf-8")),n=(0,_S.bundleFromJSON)(i);G("Fetching Sigstore TUF trusted root metadata");let o=await mOe.getTrustedRoot(),a=(0,eC.toTrustMaterial)(o);try{G("Verifying artifact signature");let c=(0,eC.toSignedEntity)(n,zl.default.readFileSync(e)),l=t.parseCertificate(n),u=n.verificationMaterial.tlogEntries,h=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 eC.Verifier(a).verify(c,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return _(`Sigstore.verifyArtifactsigner:${JSON.stringify(f)}`),{payload:i,certificate:l.toString(),tlogID:h}}catch(c){throw new Error(`Failedtoverifyartifactsignature:${c}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),G(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:dOe,rekorURL:e?void 0:fOe,tsaServerURL:pOe}}static noTransparencyLog(e){return e??kt.context.payload.repository?.private}static getProvenanceBlobs(e){let r=Af.default.join(e.localExportDir,"provenance.json");if(zl.default.existsSync(r))return{[r]:zl.default.readFileSync(r)};let s=zl.default.readdirSync(e.localExportDir,{withFileTypes:!0}),i=s.filter(n=>n.isDirectory());if(i.length>0&&i.length===s.length&&i.every(n=>zl.default.existsSync(Af.default.join(e.localExportDir,n.name,"provenance.json")))){let n={};for(let o of i){let a=