varFje=Object.create;varh_=Object.defineProperty;varTje=Object.getOwnPropertyDescriptor;varxje=Object.getOwnPropertyNames;var_je=Object.getPrototypeOf,Wje=Object.prototype.hasOwnProperty;varLje=(t,e)=>()=>(t&&(e=t(t=0)),e);varh=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xne=(t,e)=>{for(varrine)h_(t,r,{get:e[r],enumerable:!0})},Qje=(t,e,r,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letsofxje(e))!Wje.call(t,s)&&s!==r&&h_(t,s,{get:()=>e[s],enumerable:!(n=Tje(e,s))||n.enumerable});returnt};varx=(t,e,r)=>(r=t!=null?Fje(_je(t)):{},Qje(e||!t||!t.__esModule?h_(r,"default",{value:t,enumerable:!0}):r,t));varZne=h(fh=>{"use strict";varls0=require("net"),Xje=require("tls"),z_=require("http"),Yne=require("https"),Vje=require("events"),As0=require("assert"),jje=require("util");fh.httpOverHttp=$je;fh.httpsOverHttp=Yje;fh.httpOverHttps=Jje;fh.httpsOverHttps=Kje;function$je(t){vare=newpu(t);returne.request=z_.request,e}functionYje(t){vare=newpu(t);returne.request=z_.request,e.createSocket=Jne,e.defaultPort=443,e}functionJje(t){vare=newpu(t);returne.request=Yne.request,e}functionKje(t){vare=newpu(t);returne.request=Yne.request,e.createSocket=Jne,e.defaultPort=443,e}functionpu(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||z_.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(n,s,i,o){for(vara=Kne(s,i,o),c=0,u=e.requests.length;c<u;++c){varp=e.requests[c];if(p.host===a.host&&p.port===a.port){e.requests.splice(c,1),p.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)})}jje.inherits(pu,Vje.EventEmitter);pu.prototype.addRequest=function(e,r,n,s){vari=this,o=O_({request:e},i.options,Kne(r,n,s));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",c),a.on("close",u),a.on("agentRemove",u),e.onSocket(a);functionc(){i.emit("free",a,o)}functionu(p){i.removeSocket(a),a.removeListener("free",c),a.removeListener("close",u),a.removeListener("agentRemove",u)}})};pu.prototype.createSocket=function(e,r){varn=this,s={};n.sockets.push(s);vari=O_({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+newBuffer(i.proxyAuth).toString("base64")),ul("making CONNECT request");varo=n.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",u),o.once("error",p),o.end();functiona(l){l.upgrade=!0}functionc(l,A,f){process.nextTick(function(){u(l,A,f)})}functionu(l,A,f){if(o.removeAllListeners(),A.removeAllListeners(),l.statusCode!==200){ul("tunneling socket could not be established, statusCode=%d",l.statusCode),A.destroy();varM=newError("tunneling socket could not be established, statusCode="+l.statusCode);M.code="ECONNRESET",e.request.emit("error",M),n.removeSocket(s);return}if(f.length>0){ul("got illegal response body from proxy"),A.destroy();varM=newError("got illegal response body from proxy");M.code="ECONNRESET",e.request.emit("error",M),n.removeSocket(s);return}returnul("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=A,r(A)}functionp(l){o.removeAllListeners(),ul(`tunneling socket could not be established, cause=%s
`);A.push(g),i+=g.byteLength,M&&(i=null),s=t,n=async function*(){for(let y of A)y.stream?yield*y.stream():yield y},o=`multipart/form-data;boundary=${c}`}else if(aoe(t))s=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Mz.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:bKe(t)}if((typeof s=="string"||Mz.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let c;r=new ReadableStream({async start(){c=n(t)[Symbol.asyncIterator]()},async pull(u){let{value:p,done:l}=await c.next();if(l)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!loe(r)){let A=new Uint8Array(p);A.byteLength&&u.enqueue(A)}return u.desiredSize>0},async cancel(u){await c.return()},type:"bytes"})}return[{stream:r,source:s,length:i},o]}function RKe(t,e=!1){return t instanceof ReadableStream&&(BW(!Mz.isDisturbed(t),"The body has already been consumed."),BW(!t.locked,"The stream is locked.")),foe(t,e)}function wKe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}function SKe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function NKe(t){return{blob(){return qh(this,r=>{let n=uoe(this);return n===null?n="":n&&(n=DKe(n)),new yKe([r],{type:n})},t)},arrayBuffer(){return qh(this,r=>new Uint8Array(r).buffer,t)},text(){return qh(this,poe,t)},json(){return qh(this,FKe,t)},formData(){return qh(this,r=>{let n=uoe(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=qKe(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new coe;return i[Ih]=s,i}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),i=new coe;for(let[o,a]of s)i.append(o,a);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return qh(this,r=>new Uint8Array(r),t)}}}function vKe(t){Object.assign(t.prototype,NKe(t))}async function qh(t,e,r){if(EKe.brandCheck(t,r),hoe(t))throw new TypeError("Body is unusable: Body has already been read");SKe(t[Ih]);let n=gKe(),s=o=>n.reject(o),i=o=>{try{n.resolve(e(o))}catch(a){s(a)}};return t[Ih].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(await zKe(t[Ih].body,i,s),n.promise)}function hoe(t){let e=t[Ih].body;return e!=null&&(e.stream.locked||Mz.isDisturbed(e.stream))}function FKe(t){return JSON.parse(poe(t))}function uoe(t){let e=t[Ih].headersList,r=OKe(e);return r==="failure"?null:r}boe.exports={extractBody:foe,safelyExtractBody:RKe,cloneBody:wKe,mixinBody:vKe,streamRegistry:doe,hasFinalizationRegistry:Aoe,bodyUnusable:hoe}});var qoe=h((ks0,Doe)=>{"use strict";var Ne=require("node:assert"),Ue=st(),{channels:Moe}=bh(),qW=cW(),{RequestContentLengthMismatchError:ld,ResponseContentLengthMismatchError:TKe,RequestAbortedError:yoe,HeadersTimeoutError:xKe,HeadersOverflowError:_Ke,SocketError:UB,InformationalError:wh,BodyTimeoutError:WKe,HTTPParserError:LKe,ResponseExceededMaxSizeError:QKe}=Ot(),{kUrl:Coe,kReset:Fn,kClient:SW,kParser:I0,kBlocking:zz,kRunning:Mr,kPending:PKe,kSize:moe,kWriting:Al,kQueue:mo,kNoRef:mz,kKeepAliveDefaultTimeout:kKe,kHostHeader:UKe,kPendingIdx:GKe,kRunningIdx:li,kError:Ai,kPipelining:PB,kSocket:Sh,kKeepAliveTimeoutValue:GB,kMaxHeadersSize:IW,kKeepAliveMaxTimeout:HKe,kKeepAliveTimeoutThreshold:XKe,kHeadersTimeout:VKe,kBodyTimeout:jKe,kStrictContentLength:NW,kMaxRequests:goe,kCounter:$Ke,kMaxResponseSize:YKe,kOnError:JKe,kResume:ll,kHTTPContext:Boe}=d0(),da=die(),KKe=Buffer.alloc(0),WB=Buffer[Symbol.species],LB=Ue.addListener,ZKe=Ue.removeAllListeners,RW;async function eZe(){let t=process.env.JEST_WORKER_ID?lW():void 0,e;try{e=await WebAssembly.compile(bie())}catch{e=await WebAssembly.compile(t||lW())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,s)=>0,wasm_on_status:(r,n,s)=>{Ne(m1.ptr===r);let i=n-ha+fa.byteOffset;return m1.onStatus(new WB(fa.buffer,i,s))||0},wasm_on_message_begin:r=>(Ne(m1.ptr===r),m1.onMessageBegin()||0),wasm_on_he
`}return Moe.sendHeaders.hasSubscribers&&Moe.sendHeaders.publish({request:e,headers:g,socket:f}),!c||A===0?Ooe(M,null,t,e,f,p,g,l):Ue.isBuffer(c)?Ooe(M,c,t,e,f,p,g,l):Ue.isBlobLike(c)?typeof c.stream=="function"?Eoe(M,c.stream(),t,e,f,p,g,l):aZe(M,c,t,e,f,p,g,l):Ue.isStream(c)?oZe(M,c,t,e,f,p,g,l):Ue.isIterable(c)?Eoe(M,c,t,e,f,p,g,l):Ne(!1),!0}function oZe(t,e,r,n,s,i,o,a){Ne(i!==0||r[Mr]===0,"stream body cannot be pipelined");let c=!1,u=new HB({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o}),p=function(M){if(!c)try{!u.write(M)&&this.pause&&this.pause()}catch(g){Ue.destroy(this,g)}},l=function(){c||e.resume&&e.resume()},A=function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!c){let M=new yoe;queueMicrotask(()=>f(M))}},f=function(M){if(!c){if(c=!0,Ne(s.destroyed||s[Al]&&r[Mr]<=1),s.off("drain",l).off("error",f),e.removeListener("data",p).removeListener("end",f).removeListener("close",A),!M)try{u.end()}catch(g){M=g}u.destroy(M),M&&(M.code!=="UND_ERR_INFO"||M.message!=="reset")?Ue.destroy(e,M):Ue.destroy(e)}};e.on("data",p).on("end",f).on("error",f).on("close",A),e.resume&&e.resume(),s.on("drain",l).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(A)}function Ooe(t,e,r,n,s,i,o,a){try{e?Ue.isBuffer(e)&&(Ne(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${o}content-length:${i}\r
`,"latin1"):(Ne(i===null,"no body must not have content length"),s.write(`${o}\r
`,"latin1")),n.onRequestSent(),r[ll]()}catch(c){t(c)}}async function aZe(t,e,r,n,s,i,o,a){Ne(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new ld;let c=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${o}content-length:${i}\r
`,"latin1"),s.write(c),s.uncork(),n.onBodySent(c),n.onRequestSent(),!a&&n.reset!==!1&&(s[Fn]=!0),r[ll]()}catch(c){t(c)}}async function Eoe(t,e,r,n,s,i,o,a){Ne(i!==0||r[Mr]===0,"iterator body cannot be pipelined");let c=null;function u(){if(c){let A=c;c=null,A()}}let p=()=>new Promise((A,f)=>{Ne(c===null),s[Ai]?f(s[Ai]):c=A});s.on("close",u).on("drain",u);let l=new HB({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let A of e){if(s[Ai])throw s[Ai];l.write(A)||await p()}l.end()}catch(A){l.destroy(A)}finally{s.off("close",u).off("drain",u)}}var HB=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[Al]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[Ai])throw r[Ai];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(s!==null&&o+u>s){if(i[NW])throw new ld;process.emitWarning(new ld)}r.cork(),o===0&&(!a&&n.reset!==!1&&(r[Fn]=!0),s===null?r.write(`${c}transfer-encoding:chunked\r
`,"latin1"),r!==null&&s!==r){if(n[NW])throw new ld;process.emitWarning(new ld)}e[I0].timeout&&e[I0].timeoutType===Nh&&e[I0].timeout.refresh&&e[I0].timeout.refresh(),n[ll]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Al]=!1,e&&(Ne(n[Mr]<=1,"pipeline should only contain this request"),s(e))}};Doe.exports=rZe});var Toe=h((Us0,Foe)=>{"use strict";var di=require("node:assert"),{pipeline:cZe}=require("node:stream"),pt=st(),{RequestContentLengthMismatchError:xW,RequestAbortedError:Ioe,SocketError:Oz,InformationalError:_W}=Ot(),{kUrl:XB,kReset:jB,kClient:vh,kRunning:$B,kPending:uZe,kQueue:dl,kPendingIdx:WW,kRunningIdx:go,kError:Oo,kSocket:R1,kStrictContentLength:pZe,kOnError:LW,kMaxConcurrentStreams:voe,kHTTP2Session:zo,kResume:fl,kSize:lZe,kHTTPContext:AZe}=d0(),bu=Symbol("open streams"),Roe,woe=!1,VB;try{VB=require("node:http2")}catch{VB={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:dZe,HTTP2_HEADER_METHOD:fZe,HTTP2_HEADER_PATH:hZe,HTTP2_HEADER_SCHEME:bZe,HTTP2_HEADER_CONTENT_LENGTH:MZe,HTTP2_HEADER_EXPECT:mZe,HTTP2_HEADER_STATUS:gZe}}=VB;function zZe(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}async function OZe(t,e){t[R1]=e,woe||(woe=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=VB.connect(t[XB],{createConnection:()=>e,peerMaxConcurrentStreams:t[voe]});r[bu]=0,r[vh]=t,r[R1]=e,pt.addListener(r,"error",yZe),pt.addListener(r,"frameError",CZe),pt.addListener(r,"end",BZe),pt.addListener(r,"goaway",DZe),pt.addListener(r,"close",function(){let{[vh]:s}=this,{[R1]:i}=s,o=this[R1][Oo]||this[Oo]||new Oz("closed",pt.getSocketInfo(i));if(s[zo]=null,s.destroyed){di(s[uZe]===0);let a=s[dl].splice(s[go]);for(let c=0;c<a.length;c++){let u=a[c];pt.errorRequest(s,u,o)}}}),r.unref(),t[zo]=r,e[zo]=r,pt.addListener(e,"error",function(s){di(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Oo]=s,this[vh][LW](s)}),pt.addListener(e,"end",function(){pt.destroy(this,new Oz("other side closed",pt.getSocketInfo(this)))}),pt.addListener(e,"close",function(){let s=this[Oo]||new Oz("closed",pt.getSocketInfo(this));t[R1]=null,this[zo]!=null&&this[zo].destroy(s),t[WW]=t[go],di(t[$B]===0),t.emit("disconnect",t[XB],[t],s),t[fl]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return IZe(t,...s)},resume(){EZe(t)},destroy(s,i){n?queueMicrotask(i):e.destroy(s).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function EZe(t){let e=t[R1];e?.destroyed===!1&&(t[lZe]===0&&t[voe]===0?(e.unref(),t[zo].unref()):(e.ref(),t[zo].ref()))}function yZe(t){di(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[R1][Oo]=t,this[vh][LW](t)}function CZe(t,e,r){if(r===0){let n=new _W(`HTTP/2:"frameError"received-type${t},code${e}`);this[R1][Oo]=n,this[vh][LW](n)}}function BZe(){let t=new Oz("other side closed",pt.getSocketInfo(this[R1]));this.destroy(t),pt.destroy(this[R1],t)}function DZe(t){let e=this[Oo]||new Oz(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,pt.getSocketInfo(this)),r=this[vh];if(r[R1]=null,r[AZe]=null,this[zo]!=null&&(this[zo].destroy(e),this[zo]=null),pt.destroy(this[R1],e),r[go]<r[dl].length){let n=r[dl][r[go]];r[dl][r[go]++]=null,pt.errorRequest(r,n,e),r[WW]=r[go]}di(r[$B]===0),r.emit("disconnect",r[XB],[r],e),r[fl]()}function qZe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function IZe(t,e){let r=t[zo],{method:n,path:s,host:i,upgrade:o,expectContinue:a,signal:c,headers:u}=e,{body:p}=e;if(o)return pt.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let R=0;R<u.length;R+=2){let S=u[R+0],T=u[R+1];if(Array.isArray(T))for(let L=0;L<T.length;L++)l[S]?l[S]+=`,${T[L]}`:l[S]=T[L];else l[S]=T}let A,{hostname:f,port:M}=t[XB];l[dZe]=i||`${f}${M?`:${M}`:""}`,l[fZe]=n;let g=R=>{e.aborted||e.completed||(R=R||new Ioe,pt.errorRequest(t,e,R),A!=null&&pt.destroy(A,R),pt.destroy(p,R),t[dl][t[go]++]=null,t[fl]())};try{e.onConnect(g)}catch(R){pt.errorRequest
globstarwhile`,t,p,e,l,A),this.matchOne(t.slice(p),e.slice(l),r))return this.debug("globstar found match!",p,o,A),!0;if(A==="."||A===".."||!n.dot&&A.charAt(0)==="."){this.debug("dot detected!",t,p,e,l);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
`);if(A===-1){zI("have not received end of HTTP headers yet..."),i();return}let f=l.slice(0,A).toString("ascii").split(`\r
`),M=f.shift();if(!M)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=M.split(" "),y=+g[1],O=g.slice(2).join(" "),C={};for(let q of f){if(!q)continue;let R=q.indexOf(":");if(R===-1)return t.destroy(),r(new Error(`InvalidheaderfromproxyCONNECTresponse:"${q}"`));let S=q.slice(0,R).toLowerCase(),T=q.slice(R+1).trimStart(),L=C[S];typeof L=="string"?C[S]=[L,T]:Array.isArray(L)?L.push(T):C[S]=T}zI("got proxy server response: %o %o",M,C),o(),e({connect:{statusCode:y,statusText:O,headers:C},buffered:l})}t.on("error",c),t.on("end",a),i()})}Nb.parseProxyResponse=L2t});var vMe=h(qi=>{"use strict";var Q2t=qi&&qi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),P2t=qi&&qi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),SMe=qi&&qi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Q2t(e,t,r);return P2t(e,t),e},NMe=qi&&qi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qi,"__esModule",{value:!0});qi.HttpsProxyAgent=void 0;var OI=SMe(require("net")),IMe=SMe(require("tls")),k2t=NMe(require("assert")),U2t=NMe(Hd()),G2t=DMe(),H2t=require("url"),X2t=qMe(),UO=(0,U2t.default)("https-proxy-agent"),RMe=t=>t.servername===void 0&&t.host&&!OI.isIP(t.host)?{...t,servername:t.host}:t,EI=class extends G2t.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new H2t.URL(e):e,this.proxyHeaders=r?.headers??{},UO("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?wMe(r,"headers"):null,host:n,port:s}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let s;n.protocol==="https:"?(UO("Creating `tls.Socket`: %o",this.connectOpts),s=IMe.connect(RMe(this.connectOpts))):(UO("Creating `net.Socket`: %o",this.connectOpts),s=OI.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=OI.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT${o}:${r.port}HTTP/1.1\r
`;if(n.username||n.password){let A=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(A).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(i))a+=`${A}:${i[A]}\r
`)+4,e.outputData[0].data=e._header+n.substring(s),vb("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(vb("Creating `tls.Socket`: %o",this.connectOpts),i=cft.connect(this.connectOpts)):(vb("Creating `net.Socket`: %o",this.connectOpts),i=aft.connect(this.connectOpts)),await(0,pft.once)(i,"connect"),i}};yI.protocols=["http","https"];Ii.HttpProxyAgent=yI;function Aft(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var ume=h(_I=>{"use strict";Object.defineProperty(_I,"__esModule",{value:!0});_I.state=void 0;_I.state={instrumenterImplementation:void 0}});var Dme=h(kI=>{"use strict";Object.defineProperty(kI,"__esModule",{value:!0});kI.state=void 0;kI.state={operationRequestMap:new WeakMap}});var sOe=h(Jb=>{"use strict";Object.defineProperty(Jb,"__esModule",{value:!0});var Ngt=require("os"),vgt=require("util");function Fgt(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Tgt=Fgt(vgt);function xgt(t,...e){process.stderr.write(`${Tgt.default.format(t,...e)}${Ngt.EOL}`)}var jze=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Yze,BG=[],DG=[],a5=[];jze&&qG(jze);var Jze=Object.assign(t=>Kze(t),{enable:qG,enabled:IG,disable:_gt,log:xgt});function qG(t){Yze=t,BG=[],DG=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?DG.push(new RegExp(`^${n.substr(1)}$`)):BG.push(new RegExp(`^${n}$`));for(let n of a5)n.enabled=IG(n.namespace)}function IG(t){if(t.endsWith("*"))return!0;for(let e of DG)if(e.test(t))return!1;for(let e of BG)if(e.test(t))return!0;return!1}function _gt(){let t=Yze||"";return qG(""),t}function Kze(t){let e=Object.assign(r,{enabled:IG(t),destroy:Wgt,log:Jze.log,namespace:t,extend:Lgt});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t}${n[0]}`),e.log(...n))}return a5.push(e),e}function Wgt(){let t=a5.indexOf(this);return t>=0?(a5.splice(t,1),!0):!1}function Lgt(t){let e=Kze(`${this.namespace}:${t}`);return e.log=this.log,e}var S3=Jze,Zze=new Set,i5=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,c5,u5=S3("azure");u5.log=(...t)=>{S3.log(...t)};var RG=["verbose","info","warning","error"];i5&&(nOe(i5)?eOe(i5):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${i5}';loggingisnotenabled.Acceptablevalues:${RG.join(", ")}.`));function eOe(t){if(t&&!nOe(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${RG.join(",")}`);c5=t;let e=[];for(let r of Zze)rOe(r)&&e.push(r.namespace);S3.enable(e.join(","))}function Qgt(){return c5}var $ze={verbose:400,info:300,warning:200,error:100};function Pgt(t){let e=u5.extend(t);return tOe(u5,e),{error:o5(e,"error"),warning:o5(e,"warning"),info:o5(e,"info"),verbose:o5(e,"verbose")}}function tOe(t,e){e.log=(...r)=>{t.log(...r)}}function o5(t,e){let r=Object.assign(t.extend(e),{level:e});if(tOe(t,r),rOe(r)){let n=S3.disable();S3.enable(n+","+r.namespace)}return Zze.add(r),r}function rOe(t){return!!(c5&&$ze[t.level]<=$ze[c5])}function nOe(t){return RG.includes(t)}Jb.AzureLogger=u5;Jb.createClientLogger=Pgt;Jb.getLogLevel=Qgt;Jb.setLogLevel=eOe});var NG=h(v3=>{"use strict";Object.defineProperty(v3,"__esModule",{value:!0});var Kb=new WeakMap,p5=new WeakMap,N3=class t{constructor(){this.onabort=null,Kb.set(this,[]),p5.set(this,!1)}get aborted(){if(!p5.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return p5.get(this)}static get none(){return new t}addEventListener(e,r){if(!Kb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Kb.get(this).push(r)}removeEventListener(e,r){if(!Kb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=Kb.get(this),s=n.indexOf(r);s>-1&&n.splice(s,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function iOe(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=Kb.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),p5.set(t,!0)}var wG=class extends Error{constructor(e){super(e),t
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function r4t(){Object.keys(Hw).forEach(function(t){delete Hw[t]})}});var Vw=h(uc=>{"use strict";uc.__esModule=!0;uc.HandlebarsEnvironment=oV;function Yye(t){return t&&t.__esModule?t:{default:t}}var C2=pn(),n4t=Hs(),sV=Yye(n4t),s4t=eV(),i4t=Xye(),o4t=rV(),Xw=Yye(o4t),a4t=nV(),c4t="4.7.9";uc.VERSION=c4t;var u4t=8;uc.COMPILER_REVISION=u4t;var p4t=7;uc.LAST_COMPATIBLE_COMPILER_REVISION=p4t;var l4t={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"};uc.REVISION_CHANGES=l4t;var iV="[object Object]";function oV(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},s4t.registerDefaultHelpers(this),i4t.registerDefaultDecorators(this)}oV.prototype={constructor:oV,logger:Xw.default,log:Xw.default.log,registerHelper:function(e,r){if(C2.toString.call(e)===iV){if(r)throw new sV.default("Arg not supported with multiple helpers");C2.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(C2.toString.call(e)===iV)C2.extend(this.partials,e);else{if(typeof r>"u")throw new sV.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(C2.toString.call(e)===iV){if(r)throw new sV.default("Arg not supported with multiple decorators");C2.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){a4t.resetLoggedProperties()}};var A4t=Xw.default.log;uc.log=A4t;uc.createFrame=C2.createFrame;uc.logger=Xw.default});var Kye=h((jw,Jye)=>{"use strict";jw.__esModule=!0;function aV(t){this.string=t}aV.prototype.toString=aV.prototype.toHTML=function(){return""+this.string};jw.default=aV;Jye.exports=jw.default});var Zye=h(cV=>{"use strict";cV.__esModule=!0;cV.wrapHelper=d4t;function d4t(t,e){if(typeof t!="function")return t;var r=function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=e(s),t.apply(this,arguments)};return r}});var iCe=h(rA=>{"use strict";rA.__esModule=!0;rA.checkRevision=g4t;rA.template=z4t;rA.wrapProgram=$w;rA.resolvePartial=O4t;rA.invokePartial=E4t;rA.noop=nCe;function f4t(t){return t&&t.__esModule?t:{default:t}}function h4t(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 b4t=pn(),DM=h4t(b4t),M4t=Hs(),Yu=f4t(M4t),Ju=Vw(),eCe=eV(),m4t=Zye(),tCe=nV();function g4t(t){var e=t&&t[0]||1,r=Ju.COMPILER_REVISION;if(!(e>=Ju.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Ju.COMPILER_REVISION))if(e<Ju.LAST_COMPATIBLE_COMPILER_REVISION){var n=Ju.REVISION_CHANGES[r],s=Ju.REVISION_CHANGES[e];throw new Yu.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+s+").")}else throw new Yu.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 z4t(t,e){if(!e)throw new Yu.default("No environment passed to template");if(!t||!t.main)throw new Yu.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 n(o,a,c){c.hash&&(a=DM.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 u=e.VM.invokePartial.call(this,o,a,c);if(u==null&&e.compile&&(c.partials[c.name]=e.compile(o,t.compilerOptions,e),u=c.partials[c.name](a,c)),u!=null){if(c.indent){for(var p=u.split(`
`+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,a,c,u,p;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),A=0;A<l.length&&(a=this._input.match(this.rules[l[A]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,c=A,!this.options.flex)));A++);return o?(p=o[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.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],i=this.performAction.call(this,this.yy,this,l[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`.Unrecognizedtext.
${M6(u)}${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return m6(t,c)}ti.exports.find=_vt;async function _vt(t,e){let r=By(t,e);try{return(await b6(r)).reduce((s,i)=>i&&i.key===e?m6(t,i):s,null)}catch(n){if(n.code==="ENOENT")return null;throw n}}ti.exports.delete=Wvt;function Wvt(t,e,r={}){if(!r.removeFully)return pwe(t,e,null,r);let n=By(t,e);return uwe(n,{recursive:!0,force:!0})}ti.exports.lsStream=lwe;function lwe(t){let e=PJ(t),r=new Rvt({objectMode:!0});return Promise.resolve().then(async()=>{let{default:n}=await Promise.resolve().then(()=>(h6(),f6)),s=await LJ(e);return await n(s,async i=>{let o=Rc.join(e,i),a=await LJ(o);await n(a,async c=>{let u=Rc.join(o,c),p=await LJ(u);await n(p,async l=>{let A=Rc.join(u,l);try{let M=(await b6(A)).reduce((g,y)=>(g.set(y.key,y),g),new Map);for(let g of M.values()){let y=m6(t,g);y&&r.write(y)}}catch(f){if(f.code==="ENOENT")return;throw f}},{concurrency:WJ})},{concurrency:WJ})},{concurrency:WJ}),r.end(),r}).catch(n=>r.emit("error",n)),r}ti.exports.ls=Lvt;async function Lvt(t){return(await lwe(t).collect()).reduce((r,n)=>(r[n.key]=n,r),{})}ti.exports.bucketEntries=b6;async function b6(t,e){let r=await Dvt(t,"utf8");return Qvt(r,e)}function Qvt(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let n=r.split(" ");if(!n[1]||M6(n[1])!==n[0])return;let s;try{s=JSON.parse(n[1])}catch{}s&&e.push(s)}),e}ti.exports.bucketDir=PJ;function PJ(t){return Rc.join(t,`index-v${Fvt}`)}ti.exports.bucketPath=By;function By(t,e){let r=Awe(e);return Rc.join.apply(Rc,[PJ(t)].concat(vvt(r)))}ti.exports.hashKey=Awe;function Awe(t){return dwe(t,"sha256")}ti.exports.hashEntry=M6;function M6(t){return dwe(t,"sha1")}function dwe(t,e){return Cvt.createHash(e).update(t).digest("hex")}function m6(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?Nvt(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}function LJ(t){return qvt(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}});var Mm=h(z6=>{"use strict";Object.defineProperty(z6,"__esModule",{value:!0});z6.LRUCache=void 0;var Pvt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,hwe=new Set,kJ=typeof process=="object"&&process?process:{},bwe=(t,e,r,n)=>{typeof kJ.emitWarning=="function"?kJ.emitWarning(t,e,r,n):console.error(`[${r}]${e}:${t}`)},g6=globalThis.AbortController,fwe=globalThis.AbortSignal;if(typeof g6>"u"){fwe=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,s){this._onabort.push(s)}},g6=class{constructor(){e()}signal=new fwe;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let s of this.signal._onabort)s(n);this.signal.onabort?.(n)}}};let t=kJ.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,bwe("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 kvt=t=>!hwe.has(t),zA=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Mwe=t=>zA(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?bm:null:null,bm=class extends Array{constructor(e){super(e),this.fill(0)}},UJ=class t{heap;length;static#e=!1;static create(e){let r=Mwe(e);if(!r)return[];t.#e=!0;let n=new t(e,r);return t.#e=!1,n}constructor(e,r){if(!t.#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]}},GJ=class t{#e;#t;#n;#r;#s;#i;#c;#a;get perf(){return this.#a}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#l;#d;#A;#u;#b;#O;#M;#m;#B;#g;#y;#C;#h;#E;#D;#z;#p;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#h,sizes:e.#y,keyMap:e.#d,keyList:e.#A,valList:e.#u,next:e.#b,prev:e.#O,get head(){return e.#M},get tail(){return e.#m},free:e.#B,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,n,s,i)=>e.#U(r,n,s,i),moveToTail:r=>e.#_(r),indexes:r=>e.#w(r),rindexes:r=>e.#N(r),isStale:r=>e.#I(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#c}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#s}constructor(e){let{max:r=0,ttl:n,ttlResolution:s=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:u,onInsert:p,disposeAfter:l,noDisposeOnSet:A,noUpdateTTL:f,maxSize:M=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:O,memoMethod:C,noDeleteOnFetchRejection:q,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:T,ignoreFetchAbort:L,perf:j}=e;if(j!==void 0&&typeof j?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#a=j??Pvt,r!==
globstarwhile`,e,A,r,f,M),this.matchOne(e.slice(A),r.slice(f),n))return this.debug("globstar found match!",A,c,M),!0;if(M==="."||M===".."||!s.dot&&M.charAt(0)==="."){this.debug("dot detected!",e,A,r,f);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(n&&(this.debug(`
`);if(A===-1){Ev("have not received end of HTTP headers yet..."),i();return}let f=l.slice(0,A).toString("ascii").split(`\r
`),M=f.shift();if(!M)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=M.split(" "),y=+g[1],O=g.slice(2).join(" "),C={};for(let q of f){if(!q)continue;let R=q.indexOf(":");if(R===-1)return t.destroy(),r(new Error(`InvalidheaderfromproxyCONNECTresponse:"${q}"`));let S=q.slice(0,R).toLowerCase(),T=q.slice(R+1).trimStart(),L=C[S];typeof L=="string"?C[S]=[L,T]:Array.isArray(L)?L.push(T):C[S]=T}Ev("got proxy server response: %o %o",M,C),o(),e({connect:{statusCode:y,statusText:O,headers:C},buffered:l})}t.on("error",c),t.on("end",a),i()})}Fm.parseProxyResponse=iWt});var vNe=h(Zi=>{"use strict";var oWt=Zi&&Zi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),aWt=Zi&&Zi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),SNe=Zi&&Zi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&oWt(e,t,r);return aWt(e,t),e},NNe=Zi&&Zi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.HttpsProxyAgent=void 0;var sC=SNe(require("net")),RNe=SNe(require("tls")),cWt=NNe(require("assert")),uWt=NNe(Hd()),pWt=GO(),lWt=require("url"),AWt=INe(),iC=(0,uWt.default)("https-proxy-agent"),yv=class extends pWt.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new lWt.URL(e):e,this.proxyHeaders=r?.headers??{},iC("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?wNe(r,"headers"):null,host:n,port:s}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let s;if(n.protocol==="https:"){iC("Creating `tls.Socket`: %o",this.connectOpts);let A=this.connectOpts.servername||this.connectOpts.host;s=RNe.connect({...this.connectOpts,servername:A&&sC.isIP(A)?void 0:A})}else iC("Creating `net.Socket`: %o",this.connectOpts),s=sC.connect(this.connectOpts);let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=sC.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT${o}:${r.port}HTTP/1.1\r
`;if(n.username||n.password){let A=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(A).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(i))a+=`${A}:${i[A]}\r
`);let{connect:u,buffered:p}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",dWt),r.secureEndpoint){iC("Upgrading socket connection to TLS");let A=r.servername||r.host;return RNe.connect({...wNe(r,"host","path","port"),socket:s,servername:sC.isIP(A)?void 0:A})}return s}s.destroy();let l=new sC.Socket({writable:!1});return l.readable=!0,e.once("socket",A=>{iC("Replaying proxy buffer for failed request"),(0,cWt.default)(A.listenerCount("data")>0),A.push(p),A.push(null)}),l}};yv.protocols=["http","https"];Zi.HttpsProxyAgent=yv;function dWt(t){t.resume()}function wNe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var _Ne=h(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var FNe=require("buffer"),df={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."};Lp.ERRORS=df;function fWt(t){if(!FNe.Buffer.isEncoding(t))throw new Error(df.INVALID_ENCODING)}Lp.checkEncoding=fWt;function TNe(t){return typeof t=="number"&&isFinite(t)&&mWt(t)}Lp.isFiniteInteger=TNe;function xNe(t,e){if(typeof t=="number"){if(!TNe(t)||t<0)throw new Error(e?df.INVALID_OFFSET:df.INVALID_LENGTH)}else throw new Error(e?df.INVALID_OFFSET_NON_NUMBER:df.INVALID_LENGTH_NON_NUMBER)}function hWt(t){xNe(t,!1)}Lp.checkLengthValue=hWt;function bWt(t){xNe(t,!0)}Lp.checkOffsetValue=bWt;function MWt(t,e){if(t<0||t>e.length)throw new Error(df.INVALID_TARGET_OFFSET)}Lp.checkTargetOffset=MWt;function mWt(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function gWt(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof FNe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}Lp.bigIntAndBufferInt64Check=gWt});var LNe=h(oZ=>{"use strict";Object.defineProperty(oZ,"__esModule",{value:!0});var rt=_Ne(),WNe=4096,zWt="utf8",iZ=class t{constructor(e){if(this.length=0,this._encoding=zWt,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(rt.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(rt.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(rt.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(rt.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(WNe);else{if(typeof e<"u")throw new Error(rt.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(WNe)}}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
`,qHt=/\u2014 (\S+) (\S+)\n/g;function IHt(t,e){let r=t.inclusionProof,n=I0e.fromString(r.checkpoint.envelope),s=OT.fromString(n.note);if(!RHt(n,e))throw new WC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return s}function RHt(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let s=e.find(i=>fxe.crypto.bufferEqual(i.logID.subarray(0,4),n.keyHint)&&i.baseURL.match(n.name));return s?fxe.crypto.verify(r,s.publicKey,n.signature):!1})}var I0e=class t{note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(q0e))throw new WC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(q0e),n=e.slice(0,r+1),i=e.slice(r+q0e.length).matchAll(qHt),o=Array.from(i,a=>{let[,c,u]=a,p=Buffer.from(u,"base64");if(p.length<5)throw new WC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:c,keyHint:p.subarray(0,4),signature:p.subarray(4)}});if(o.length===0)throw new WC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,o)}},OT=class t{origin;logSize;logHash;rest;constructor(e,r,n,s){this.origin=e,this.logSize=r,this.logHash=n,this.rest=s}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new WC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],s=BigInt(r[1]),i=Buffer.from(r[2],"base64"),o=r.slice(3);return new t(n,s,i,o)}};LC.LogCheckpoint=OT});var bxe=h(N0e=>{"use strict";Object.defineProperty(N0e,"__esModule",{value:!0});N0e.verifyMerkleInclusion=NHt;var S0e=Zo(),R0e=kr(),wHt=Buffer.from([0]),SHt=Buffer.from([1]);function NHt(t,e){let r=t.inclusionProof,n=BigInt(r.logIndex),s=BigInt(e.logSize);if(n<0n||n>=s)throw new R0e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${n}`});let{inner:i,border:o}=vHt(n,s);if(r.hashes.length!==i+o)throw new R0e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=r.hashes.slice(0,i),c=r.hashes.slice(i),u=LHt(t.canonicalizedBody),p=THt(FHt(u,a,n),c);if(!S0e.crypto.bufferEqual(p,e.logHash))throw new R0e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function vHt(t,e){let r=xHt(t,e),n=_Ht(t>>BigInt(r));return{inner:r,border:n}}function FHt(t,e,r){return e.reduce((n,s,i)=>r>>BigInt(i)&BigInt(1)?w0e(s,n):w0e(n,s),t)}function THt(t,e){return e.reduce((r,n)=>w0e(n,r),t)}function xHt(t,e){return WHt(t^e-BigInt(1))}function _Ht(t){return t.toString(2).split("1").length-1}function WHt(t){return t===0n?0:t.toString(2).length}function w0e(t,e){return S0e.crypto.digest("sha256",SHt,t,e)}function LHt(t){return S0e.crypto.digest("sha256",wHt,t)}});var mxe=h(v0e=>{"use strict";Object.defineProperty(v0e,"__esModule",{value:!0});v0e.verifyTLogSET=kHt;var Mxe=Zo(),QHt=kr(),PHt=gg();function kHt(t,e){if(!(0,PHt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(s=>{let i=UHt(t),o=Buffer.from(Mxe.json.canonicalize(i),"utf8"),a=t.inclusionPromise.signedEntryTimestamp;return Mxe.crypto.verify(o,s.publicKey,a)}))throw new QHt.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function UHt(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:s}=t;return{body:s.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}});var zxe=h(ET=>{"use strict";Object.defineProperty(ET,"__esModule",{value:!0});ET.verifyTLogBody=jHt;ET.verifyTLogInclusion=$Ht;var gxe=eee(),x0e=kr(),F0e=lxe(),T0e=Axe(),GHt=dxe(),HHt=hxe(),XHt=bxe(),VHt=mxe();function jHt(t,e){let{kind:r,version:n}=t.kindVersion,s=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==s.kind||n!==s.apiVersion)throw new x0e.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${n},received:${s.kind}/${s.apiVersion}`});switch(r){case"dsse":if(n==F0e.DSSE_API_VERSION_V1)return(0,F0e.verifyDSSETLogBody)(s,e);{let i=gxe.Entry.fromJSON(s);return(0,F0e.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,GHt.verifyIntotoTLogBody)(s,e);case"hashedrekord":if(n==T0e.HASHEDREKORD_API_VERSION_V1)return(0,T0e.verifyHashedRekordTLogBody)(s,e);{let i=gxe.Entry.fromJSON(s);return(0,T0e.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new x0e.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}function $Ht(t,e){let r=!1;if(YHt(t)&&((0,VHt.verifyTLogSET)(t,e),r=!0),JHt(t)){let n=(0,HHt.verifyCheckpoint)(t,e);(0,XHt.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new x0e.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}function YHt(t){return t.inclusionPromise!==void 0}function JHt(t){return t.inclusionProof!==void 0}});var Bxe=h(yT=>{"use strict";Object.defineProperty(yT,"__esModule",{value:!0});yT.Verifier=void 0;var KHt=require("util"),zg=kr(),Oxe=oxe(),_0e=axe(),Exe=pxe(),yxe=zxe(),W0e=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 n=this.verifyTimestamps(e),s=this.verifySigningKey(e,n);return
[`+w+"] ";for(W in arguments[0])i(arguments[0],W)&&(D+=W+": "+arguments[0][W]+", ");D=D.slice(0,-2)}else D=arguments[w];z.push(D)}L(d+`
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,N10.default)(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function Q10(t,e){var r;if(t){if(typeof t=="string")return WUe(t,e);var n=(0,po.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,x10.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WUe(t,e)}}function WUe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var l0="xregexp",Xf={astral:!1,namespacing:!1},U0={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},ru={},E4={},Pg={},Hre=[],kg="default",LUe="class",P10={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},k10=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,U10=U0.exec.call(/()??/,"")[1]===void 0,G10=(0,Hf.default)(/x/)!==void 0,H10={},GUe=H10.toString;function Vre(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),n=".a".replace(new RegExp("a",r),".")==="..";n&&(e=!1)}}catch{e=!1}return e}var HUe=Vre("u"),jre=Vre("y"),XUe={g:!0,i:!0,m:!0,u:HUe,y:jre};function VUe(t,e,r,n,s){var i;if(t[l0]={captureNames:e},s)return t;if(t.__proto__)t.__proto__=ue.prototype;else for(var o in ue.prototype)t[o]=ue.prototype[o];return t[l0].source=r,t[l0].flags=n&&(0,L10.default)(i=n.split("")).call(i).join(""),t}function y4(t){return U0.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}function jf(t,e){var r;if(!ue.isRegExp(t))throw new TypeError("Type RegExp expected");var n=t[l0]||{},s=X10(t),i="",o="",a=null,c=null;return e=e||{},e.removeG&&(o+="g"),e.removeY&&(o+="y"),o&&(s=U0.replace.call(s,new RegExp("[".concat(o,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(s=y4(s+i)),e.isInternalOnly||(n.source!==void 0&&(a=n.source),(0,Hf.default)(n)!=null&&(c=i?y4((0,Hf.default)(n)+i):(0,Hf.default)(n))),t=VUe(new RegExp(e.source||t.source,s),V10(t)?(0,po.default)(r=n.captureNames).call(r,0):null,a,c,e.isInternalOnly),t}function jUe(t){return(0,UUe.default)(t,16)}function $Ue(t,e,r){return t.input[t.index-1]==="("||t.input[t.index+t[0].length]===")"||t.input[t.index-1]==="|"||t.input[t.index+t[0].length]==="|"||t.index<1||t.index+t[0].length>=t.input.length||U0.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||j10(t.input,t.index+t[0].length,r)?"":"(?:)"}function X10(t){return G10?(0,Hf.default)(t):U0.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}function V10(t){return!!(t[l0]&&t[l0].captureNames)}function YUe(t){return(0,UUe.default)(t,10).toString(16)}function j10(t,e,r){var n="\\(\\?#[^)]*\\)",s="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return U0.test.call((0,Vf.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,po.default)(t).call(t,e))}function $re(t,e){return GUe.call(t)==="[object ".concat(e,"]")}function JUe(t){for(;t.length<4;)t="0".concat(t);return t}function $10(t,e){if(y4(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=U0.replace.call(t,/^\(\?([\w$]+)\)/,function(i,o){if(U0.test.call(/[gy]/,o))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=y4(e+o),""});var r=C4(e),n;try{for(r.s();!(n=r.n()).done;){var s=n.value;if(!XUe[s])throw new SyntaxError("Unknown regex flag ".concat(s))}}catch(i){r.e(i)}finally{r.f()}return{pattern:t,flags:e}}function KUe(t){var e={};return $re(t,"String")?((0,Xre.default)(ue).call(ue,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}function QUe(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,Sr0.default)(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function Qr0(t,e){var r;if(t){if(typeof t=="string")return WGe(t,e);var n=(0,xr0.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,Tr0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WGe(t,e)}}function WGe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Pr0=function(e){var r={},n=e._dec,s=e._hex,i=e._pad4;function o(A){return A.replace(/[- _]+/g,"").toLowerCase()}function a(A){var f=/^\\[xu](.+)/.exec(A);return f?n(f[1]):A.charCodeAt(A[0]==="\\"?1:0)}function c(A){var f="",M=-1;return(0,Wr0.default)(e).call(e,A,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(g){var y=a(g[1]);y>M+1&&(f+="\\u".concat(i(s(M+1))),y>M+2&&(f+="-\\u".concat(i(s(y-1))))),M=a(g[2]||g[1])}),M<65535&&(f+="\\u".concat(i(s(M+1))),M<65534&&(f+="-\\uFFFF")),f}function u(A){var f="b!";return r[A][f]||(r[A][f]=c(r[A].bmp))}function p(A,f){var M=r[A],g="";if(M.bmp&&!M.isBmpLast){var y;g=(0,Zre.default)(y="[".concat(M.bmp,"]")).call(y,M.astral?"|":"")}if(M.astral&&(g+=M.astral),M.isBmpLast&&M.bmp){var O;g+=(0,Zre.default)(O="".concat(M.astral?"|":"","[")).call(O,M.bmp,"]")}return f?"(?:(?!".concat(g,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(g,")")}function l(A,f){var M=f?"a!":"a=";return r[A][M]||(r[A][M]=p(A,f))}e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(A,f,M){var g="Invalid double negation ",y="Unknown Unicode token ",O="Unicode token missing data ",C="Astral mode required for Unicode token ",q="Astral mode does not support Unicode tokens within character classes",R=A[1]==="P"||!!A[2],S=(0,_r0.default)(M).call(M,"A"),T=o(A[4]||A[3]),L=r[T];if(A[1]==="P"&&A[2])throw new SyntaxError(g+A[0]);if(!r.hasOwnProperty(T))throw new SyntaxError(y+A[0]);if(L.inverseOf){if(T=o(L.inverseOf),!r.hasOwnProperty(T)){var j;throw new ReferenceError((0,Zre.default)(j="".concat(O+A[0]," -> ")).call(j,L.inverseOf))}L=r[T],R=!R}if(!(L.bmp||S))throw new SyntaxError(C+A[0]);if(S){if(f==="class")throw new SyntaxError(q);return l(T,R)}return f==="class"?R?u(T):L.bmp:"".concat((R?"[^":"[")+L.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(A){var f="Unicode token requires name",M="Unicode token has no character data ",g=Lr0(A),y;try{for(g.s();!(y=g.n()).done;){var O=y.value;if(!O.name)throw new Error(f);if(!(O.inverseOf||O.bmp||O.astral))throw new Error(M+O.name);r[o(O.name)]=O,O.alias&&(r[o(O.alias)]=O)}}catch(C){g.e(C)}finally{g.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(A){var f=o(A);return r[f]}};w4.default=Pr0;LGe.exports=w4.default});var kGe=h((tQ0,PGe)=>{PGe.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",bmp:"\uFE70-\uFEFF"},{name:"InArabic_Supplement",bmp:"\u0750-\u077F"},{name:"InArmenian",bmp:"\u0530-\u058F"},{name:"InArrows",bmp:"\u2190-\u21FF"},{name:"InAvestan",astral:"\uD802[\uDF00-\uDF3F]"},{name:"InBalinese",bmp:"\u1B00-\u1B7F"},{name:"InBamum",
Supportbooleaninputlist:\`true | True | TRUE | false | False | FALSE\``)}functioniQ(t,e){if(process.env.GITHUB_OUTPUT||"")returnsz("OUTPUT",lB(t,e));process.stdout.write(sQ.EOL),ua("set-output",{name:t},ca(e))}functionVAe(t){process.exitCode=nQ.Failure,db(t)}functionDu(){returnprocess.env.RUNNER_DEBUG==="1"}functionF(t){ua("debug",{},t)}functiondb(t,e={}){ua("error",b_(e),tinstanceofError?t.toString():t)}functionEt(t,e={}){ua("warning",b_(e),tinstanceofError?t.toString():t)}function_(t){process.stdout.write(t+sQ.EOL)}functionvd(t){m_("group",t)}functionFd(){m_("endgroup")}functioncr(t,e){returnBot(this,void0,void0,function*(){vd(t);letr;try{r=yielde()}finally{Fd()}returnr})}functionAq(t,e){if(process.env.GITHUB_STATE||"")returnsz("STATE",lB(t,e));ua("save-state",{name:t},ca(e))}functionjAe(t){returnprocess.env[`STATE_${t}`]||""}varhw=x(require("fs"),1),MX=x(require("os"),1),mX=x(require("path"),1);varYAe=x(require("os"),1);functionAO(t){returnt==null?"":typeoft=="string"||tinstanceofString?t:JSON.stringify(t)}functionJAe(t,e,r){letn=newoQ(t,e,r);process.stdout.write(n.toString()+YAe.EOL)}var$Ae="::",oQ=class{constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){lete=$Ae+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";letr=!0;for(letninthis.properties)if(this.properties.hasOwnProperty(n)){lets=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${qot(s)}`)}}returne+=`${$Ae}${Dot(this.message)}`,e}};functionDot(t){returnAO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}functionqot(t){returnAO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}vartde=x(require("os"),1);varZAe=require("os"),dO=require("fs"),aQ=function(t,e,r,n){functions(i){returniinstanceofr?i:newr(function(o){o(i)})}returnnew(r||(r=Promise))(function(i,o){functiona(p){try{u(n.next(p))}catch(l){o(l)}}functionc(p){try{u(n.throw(p))}catch(l){o(l)}}functionu(p){p.done?i(p.value):s(p.value).then(a,c)}u((n=n.apply(t,e||[])).next())})},{access:Iot,appendFile:Rot,writeFile:wot}=dO.promises,KAe="GITHUB_STEP_SUMMARY";varcQ=class{constructor(){this._buffer=""}filePath(){returnaQ(this,void0,void0,function*(){if(this._filePath)returnthis._filePath;lete=process.env[KAe];if(!e)thrownewError(`Unable to find environment variable for $${KAe}. Check if your runtime environment supports job summaries.`);try{yieldIot(e,dO.constants.R_OK|dO.constants.W_OK)}catch{thrownewError(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}returnthis._filePath=e,this._filePath})}wrap(e,r,n={}){lets=Object.entries(n).map(([i,o])=>`${i}="${o}"`).join("");returnr?`<${e}${s}>${r}</${e}>`:`<${e}${s}>`}write(e){returnaQ(this,void0,void0,function*(){letr=!!e?.overwrite,n=yieldthis.filePath();returnyield(r?wot:Rot)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){returnaQ(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(ZAe.EOL)}addCodeBlock(e,r){letn=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);returnthis.addRaw(s).addEOL()}addList(e,r=!1){letn=r?"ol":"ul",s=e.map(o=>this.wrap("li",o)).join(""),i=this.wrap(n,s);returnthis.addRaw(i).addEOL()}addTable(e){letr=e.map(s=>{leti=s.map(o=>{if(typeofo=="string")returnthis.wrap("td",o);let{header:a,data:c,colspan:u,rowspan:p}=o,l=a?"th":"td",A=Object.assign(Object.assign({},u&&{colspan:u}),p&&{rowspan:p});returnthis.wrap(l,c,A)}).join("");returnthis.wrap("tr",i)}).join(""),n=this.wrap("table",r);returnthis.addRaw(n).addEOL()}addDetails(e,r){letn=this.wrap("details",this.wrap("summary",e)+r);returnthis.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:i}=n||{},o=Object.assign(Object.assign({},s&&
${kdt.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function rI(t){return t instanceof rn?!0:Qd(t)&&t.name==="RestError"}function Ln(t,e){return Buffer.from(t,e)}var nI=x(require("node:http"),1),sI=x(require("node:https"),1),vP=x(require("node:zlib"),1),jbe=require("node:stream");var Bi=QO("ts-http-runtime");var Udt={};function PO(t){return t&&typeof t.pipe=="function"}function Vbe(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 $be(t){return t&&typeof t.byteLength=="number"}var iI=class extends jbe.Transform{loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},FP=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ra("The operation was aborted. Request has already been canceled.");n=u=>{u.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let u=new So;Bi.info(`requestto'${u.sanitizeUrl(e.url)}'timedout.canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),o=i?.includes("gzip")||i?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let u=Vdt(a);u!==null&&e.headers.set("Content-Length",u)}let c;try{if(a&&e.onUploadProgress){let M=e.onUploadProgress,g=new iI(M);g.on("error",y=>{Bi.error("Error in upload progress",y)}),PO(a)?a.pipe(g):g.end(a),a=g}let u=await this.makeRequest(e,r,a);s!==void 0&&clearTimeout(s);let p=Gdt(u),A={status:u.statusCode??0,headers:p,request:e};if(e.method==="HEAD")return u.resume(),A;c=o?Hdt(u,p):u;let f=e.onDownloadProgress;if(f){let M=new iI(f);M.on("error",g=>{Bi.error("Error in download progress",g)}),c.pipe(M),c=M}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(A.status)?A.readableStreamBody=c:A.bodyAsText=await Xdt(c),A}finally{if(e.abortSignal&&n){let u=Promise.resolve();PO(a)&&(u=Vbe(a));let p=Promise.resolve();PO(c)&&(p=Vbe(c)),Promise.all([u,p]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{Bi.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let s=new URL(e.url),i=s.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannotconnectto${e.url}whileallowInsecureConnectionisfalse.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,u)=>{let p=i?nI.default.request(a,c):sI.default.request(a,c);p.once("error",l=>{u(new rn(l.message,{code:l.code??rn.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new Ra("The operation was aborted. Rejecting from abort signal callback while making request.");p.destroy(l),u(l)}),n&&PO(n)?n.pipe(p):n?typeof n=="string"||Buffer.isBuffer(n)?p.end(n):$be(n)?p.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Bi.error("Unrecognized body type",n),u(new rn("Unrecognized body type"))):p.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?nI.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new nI.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return sI.default.globalAgent;let s=e.tlsSettings??Udt,i=this.cachedHttpsAgents.get(s);return i&&i.options.keepAlive===!n||(Bi.info("No cached TLS Agent exist, creating a new Agent"),i=new sI.default.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,i)),i}}};function Gdt(t){let e=Ns();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(
`;return e}function Bft(t){return t instanceof Uint8Array?t.byteLength:II(t)?t.size===-1?void 0:t.size:void 0}function Dft(t){let e=0;for(let r of t){let n=Bft(r);if(n===void 0)return;e+=n}return e}async function qft(t,e,r){let n=[Ln(`--${r}`,"utf-8"),...e.flatMap(i=>[Ln(`\r
`,"utf-8")],s=Dft(n);s&&t.headers.set("Content-Length",s),t.body=await JMe(n)}var HO="multipartPolicy",Ift=70,Rft=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function wft(t){if(t.length>Ift)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!Rft.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}function wI(){return{name:HO,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Gotmultipartrequestbody,butcontent-typeheaderwasnotmultipart:${n}`);let[,i,o]=s;if(o&&r&&o!==r)throw new Error(`Multipartboundarywasspecifiedas${o}intheheader,butgot${r}intherequestbody`);return r??=o,r?wft(r):r=yft(),t.headers.set("Content-Type",`${i};boundary=${r}`),await qft(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function SI(){return tI()}var KMe=Kq({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Wd0=KMe.logger;function Na(t){return KMe.createClientLogger(t)}var va=Na("core-rest-pipeline");function ek(t={}){return aI({logger:va.info,...t})}var tk=cI;function rk(t={}){return uI(t)}var NI=x(require("node:os"),1),vI=x(require("node:process"),1);function ZMe(){return"User-Agent"}async function eme(t){if(vI.default&&vI.default.versions){let e=`${NI.default.type()}${NI.default.release()};${NI.default.arch()}`,r=vI.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 FI="1.22.2";function Wft(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}function tme(){return ZMe()}async function TI(t){let e=new Map;e.set("core-rest-pipeline",FI),await eme(e);let r=Wft(e);return t?`${t}${r}`:r}var rme=tme(),nme="userAgentPolicy";function nk(t={}){let e=TI(t.userAgentPrefix);return{name:nme,async sendRequest(r,n){return r.headers.has(rme)||r.headers.set(rme,await e),n(r)}}}var xs=class extends Error{constructor(e){super(e),this.name="AbortError"}};function sk(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((i,o)=>{function a(){o(new xs(s??"The operation was aborted."))}function c(){n?.removeEventListener("abort",u)}function u(){r?.(),c(),a()}if(n?.aborted)return a();try{t(p=>{c(),i(p)},p=>{c(),o(p)})}catch(p){o(p)}n?.addEventListener("abort",u)})}var Uft="The delay was aborted.";function XO(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return sk(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:n,abortErrorMsg:s??Uft})}function Ll(t){if(Qd(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 sme(t){return Qd(t)}function Fb(){return Ld()}var wt=Ud;var ime=Symbol("rawContent");function ok(t){return typeof t[ime]=="function"}function ome(t){return ok(t)?t[ime]():t}var xI=HO;function ak(){let t=wI();return{name:xI,sendRequest:async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)ok(n.body)&&(n.body=ome(n.body));return t.sendRequest(e,r)}}}var ck=pI;function uk(){return lI()}function pk(t={}){return fI(t)}function lk(){return hI()}function Ql(t){return $P(t)}function Ak(t,e){return BI(t,e)}var ame="setClientRequestIdPolicy";function dk(t="x-ms-client-request-id"){return{name:ame,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function fk(t){return DI(t)}function hk(t){return qI(t)}var Tb={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function cme(t={}){let e=new bk(t.parentContext);return t.span&&(e=e.setValue(Tb.span,t.span)),t.namespace&&(e=e.setValue(Tb.namespace,t.namespace)),e}var bk=class t{_contextMap;constructor(e){this._contextMap=e instanceof t
`&&t[i]!=="\r";i++)c+=t[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!dbt(c)){let l;return c.trim().length===0?l="Invalid space after '<'.":l="Tag '"+c+"' is an invalid name.",Y0("InvalidTag",l,nn(t,i))}let u=cbt(t,i);if(u===!1)return Y0("InvalidAttr","Attributes for '"+c+"' have open quote.",nn(t,i));let p=u.value;if(i=u.index,p[p.length-1]==="/"){let l=i-p.length;p=p.substring(0,p.length-1);let A=Hme(p,e);if(A===!0)n=!0;else return Y0(A.err.code,A.err.msg,nn(t,l+A.err.line))}else if(a)if(u.tagClosed){if(p.trim().length>0)return Y0("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",nn(t,o));if(r.length===0)return Y0("InvalidTag","Closing tag '"+c+"' has not been opened.",nn(t,o));{let l=r.pop();if(c!==l.tagName){let A=nn(t,l.tagStartPos);return Y0("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+A.line+", col "+A.col+") instead of closing tag '"+c+"'.",nn(t,o))}r.length==0&&(s=!0)}}else return Y0("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",nn(t,i));else{let l=Hme(p,e);if(l!==!0)return Y0(l.err.code,l.err.msg,nn(t,i-p.length+l.err.line));if(s===!0)return Y0("InvalidXml","Multiple possible root nodes found.",nn(t,i));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:o}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=Gme(t,i);continue}else if(t[i+1]==="?"){if(i=Ume(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=lbt(t,i);if(l==-1)return Y0("InvalidChar","char '&' is not expected.",nn(t,i));i=l}else if(s===!0&&!kme(t[i]))return Y0("InvalidXml","Extra text at the end",nn(t,i));t[i]==="<"&&i--}}else{if(kme(t[i]))continue;return Y0("InvalidChar","char '"+t[i]+"' is not expected.",nn(t,i))}if(n){if(r.length==1)return Y0("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",nn(t,r[0].tagStartPos));if(r.length>0)return Y0("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Y0("InvalidXml","Start tag expected.",1);return!0}function kme(t){return t===" "||t===" "||t===`
`||t==="\r"}function Ume(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let n=t.substr(r,e-r);if(e>5&&n==="xml")return Y0("InvalidXml","XML declaration allowed only at the start of the document.",nn(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function Gme(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 obt='"',abt="'";function cbt(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===obt||t[e]===abt)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){s=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:s}}var ubt=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Hme(t,e){let r=VI(t,ubt),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return Y0("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",s3(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return Y0("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",s3(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return Y0("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",s3(r[s]));let i=r[s][2];if(!Abt(i))return Y0("InvalidAttr","Attribute '"+i+"' is an invalid name.",s3(r[s]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return Y0("InvalidAttr","Attribute '"+i+"' is repeated.",s3(r[s]))}return!0}function pbt(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 lbt(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,pbt(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 Y0(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Abt(t){return Fk(t)}function dbt(t){return Fk(t)}function nn(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function s3(t){return t.startIndex+t[1].length}var Xme={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"},Vme={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 Un("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=this.options,i=new a3(s.processEntities),o=t.length;for(let a=0;a<o;a++)if(t[a]==="<"){let u=t.charCodeAt(a+1);if(u===47){let p=Qb(t,">",a,"Closing Tag is not closed."),l=t.substring(a+2,p).trim();if(s.removeNSPrefix){let f=l.indexOf(":");f!==-1&&(l=l.substr(f+1))}l=kk(s.transformTagName,l,"",s).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let A=this.matcher.getCurrentTag();if(l&&s.unpairedTagsSet.has(l))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${l}>`);A&&s.unpairedTagsSet.has(A)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",a=p}else if(u===63){let p=Uk(t,a,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let l=this.buildAttributesMap(p.tagExp,this.matcher,p.tagName,!0);if(l){let A=l[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(A)||1),i.setXmlVersion(Number(A)||1)}if(!(s.ignoreDeclaration&&p.tagName==="?xml"||s.ignorePiTags)){let A=new Un(p.tagName);A.add(s.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&s.ignoreAttributes!==!0&&(A[":@"]=l),this.addChild(r,A,this.readonlyMatcher,a)}a=p.closeIndex+1}else if(u===33&&t.charCodeAt(a+2)===45&&t.charCodeAt(a+3)===45){let p=Qb(t,"-->",a+4,"Comment is not closed.");if(s.commentPropName){let l=t.substring(a+4,p-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(s.commentPropName,[{[s.textNodeName]:l}])}a=p}else if(u===33&&t.charCodeAt(a+2)===68){let p=i.readDocType(t,a);this.entityDecoder.addInputEntities(p.entities),a=p.i}else if(u===33&&t.charCodeAt(a+2)===91){let p=Qb(t,"]]>",a,"CDATA is not closed.")-2,l=t.substring(a+9,p);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let A=this.parseTextData(l,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);A==null&&(A=""),s.cdataPropName?r.add(s.cdataPropName,[{[s.textNodeName]:l}]):r.add(s.textNodeName,A),a=p+2}else{let p=Uk(t,a,s.removeNSPrefix);if(!p){let T=t.substring(Math.max(0,a-50),Math.min(o,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${T}"`)}let l=p.tagName,A=p.rawTagName,f=p.tagExp,M=p.attrExpPresent,g=p.closeIndex;if({tagName:l,tagExp:f}=kk(s.transformTagName,l,f,s),s.strictReservedNames&&(l===s.commentPropName||l===s.cdataPropName||l===s.textNodeName||l===s.attributesGroupName))throw new Error(`Invalid tag name: ${l}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let y=r;y&&s.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let O=!1;f.length>0&&f.lastIndexOf("/")===f.length-1&&(O=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),f=l):f=f.substr(0,f.length-1),M=l!==f);let C=null,q={},R;R=xbt(A),l!==e.tagname&&this.matcher.push(l,{},R),l!==f&&M&&(C=this.buildAttributesMap(f,this.matcher,l),C&&(q=Tbt(C,s))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let S=a;if(this.isCurrentNodeStopNode){let T="";if(O)a=p.closeIndex;else if(s.unpairedTagsSet.has(l))a=p.closeIndex;else{let j=this.readStopNodeData(t,A,g+1);if(!j)throw new Error(`Unexpected end of ${A}`);a=j.i,T=j.tagContent}let L=new Un(l);C&&(L[":@"]=C),L.add(s.textNodeName,T),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,L,this.readonlyMatcher,S)}else{if(O){({tagName:l,tagExp:f}=kk(s.transformTagName,l,f,s));let T=new Un(l);C&&(T[":@"]=C),this.addChild(r,T,this.readonlyMatcher,S),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(s.unpairedTagsSet.has(l)){let T=new Un(l);C&&(T[":@"]=C),this.addChild(r,T,this.readonlyMatcher,S),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=p.closeIndex;continue}else{let T=new Un(l);if(this.tagsNodeStack.length>s.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),C&&(T[":@"]=C),this.addChild(r,T,this.readonlyMatcher,S),r=T}n="",a=g}}}elsen+=t[a];returne.child};functionk
`}),n}getCanonicalizedResourceString(e){let r=cR(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=uR(e.url),i={};if(s){let o=[];for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){let c=a.toLowerCase();i[c]=s[a],o.push(c)}o.sort();for(let a of o)n+=`
${a}:${decodeURIComponent(i[a])}`}return n}};var w0=class extends Kd{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new A3(e,r,this)}computeHMACSHA256(e){return(0,Cge.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var z1=Na("storage-common");var Ri;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Ri||(Ri={}));var Hl={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Ri.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},hMt=new xs("The operation was aborted."),d3=class extends _a{retryOptions;constructor(e,r,n=Hl){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Hl.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Hl.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Hl.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Hl.maxRetryDelayInMs):Hl.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Hl.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Hl.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(s.url=aR(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=Gl(s.url,Tu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(z1.info(`RetryPolicy:=====>Try=${n}${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(s),!this.shouldRetry(i,n,o))return o;r=r||!i&&o.status===404}catch(a){if(z1.error(`RetryPolicy:Caughterror,message:${a.message},code:${a.code}`),!this.shouldRetry(i,n,o,a))throw a}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return z1.info(`RetryPolicy:Attempt(s)${r}>=maxTries${this.retryOptions.maxTries},nofurthertry.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(s){for(let o of i)if(s.name.toUpperCase().includes(o)||s.message.toUpperCase().includes(o)||s.code&&s.code.toString().toUpperCase()===o)return z1.info(`RetryPolicy:Networkerror${o}found,willretry.`),!0}if(n||s){let o=n?n.status:s?s.statusCode:0;if(!e&&o===404)return z1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return z1.info(`RetryPolicy:Willretryforstatuscode${o}.`),!0}if(n&&n?.status>=400){let o=n.headers.get(Pe.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return s?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(z1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let s=0;if(e)switch(this.retryOptions.retryPolicyType){case Ri.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Ri.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return z1.info(`RetryPolicy:Delayfor${s}ms`),pR(s,n,hMt)}};var f3=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new d3(e,r,this.retryOptions)}};var bMt="storageBrowserPolicy";function Bge(){return{name:bMt,async sendRequest(t,e){return wt||((t.method==="GET"||t.method==="HEAD")&&(t.url=Gl(t.url,Tu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Pe.COOKIE),t.headers.delete(Pe.CONTENT_LENGTH)),e(t)}}}var MMt="StorageCorrectContentLengthPolicy";function Dge(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Pe.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:MMt,async send
`}),a}function s(i){let o=cR(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=uR(i.url),u={};if(c){let p=[];for(let l in c)if(Object.prototype.hasOwnProperty.call(c,l)){let A=l.toLowerCase();u[A]=c[l],p.push(A)}p.sort();for(let l of p)a+=`
`),i=e.computeHMACSHA256(s);return{sasQueryParameters:new _o(t.version,i,n,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:s}}function Dgt(t,e){if(t=a2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=ec.parse(t.permissions.toString()).toString():s=tc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?St(t.startsOn,!1):"",t.expiresOn?St(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?xo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new _o(t.version,o,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 qgt(t,e){if(t=a2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=ec.parse(t.permissions.toString()).toString():s=tc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?St(t.startsOn,!1):"",t.expiresOn?St(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?xo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new _o(t.version,o,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,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}function Igt(t,e){if(t=a2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=ec.parse(t.permissions.toString()).toString():s=tc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?St(t.startsOn,!1):"",t.expiresOn?St(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?St(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?St(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?xo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new _o(t.version,o,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,e.userDelegationKey),stringToSign:i}}function Rgt(t,e){if(t=a2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=ec.parse(t.permissions.toString()).toString():s=tc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?St(t.startsOn,!1):"",t.expiresOn?St(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?St(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?St(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?xo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new _o(t.version,o,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,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}function wgt(t,e){if(t=a2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=ec.parse(t.permissions.toString()).toString():s=tc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?St(t.startsOn,!1):"",t.expiresOn?St(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?St(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?St(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?xo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new _o(t.version,o,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,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}function Sgt(t,e){if(t=a2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=ec.parse(t.permissions.toString()).toString():s=tc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?St(t.startsOn,!1):"",t.expiresOn?St(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?St(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?St(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?xo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new _o(t.version,o,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,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}function o2(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}function a2(t){let e=t.version?t.version:fR;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 q3=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=Fb()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==No||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==No||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 Ee.withSpan("BlobLeaseClient-acquireLease",r,async n=>Ie(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==No||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==No||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 Ee.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=Ie(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,s})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==No||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==No||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"}};eM.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var l2=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"}};l2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var _3=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var Pzt=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(n.next(p))}catch(l){o(l)}}function c(p){try{u(n.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):s(p.value).then(a,c)}u((n=n.apply(t,e||[])).next())})},jG=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);_(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function POe(t,e,r){return Pzt(this,void 0,void 0,function*(){var n;let s=new Gu(t),i=s.getBlockBlobClient(),o=new jG((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),F(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let c=yield i.uploadFile(e,a);if(c._response.status>=400)throw new g5(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw Et(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}var UOe=x(require("buffer"),1),rc=x(require("fs"),1),GOe=x(require("stream"),1),HOe=x(require("util"),1);var z5=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(n.next(p))}catch(l){o(l)}}function c(p){try{u(n.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):s(p.value).then(a,c)}u((n=n.apply(t,e||[])).next())})};function O5(t){return t?t>=200&&t<300:!1}function kzt(t){return t?t>=500:!0}function Uzt(t){return t?[R0.BadGateway,R0.ServiceUnavailable,R0.GatewayTimeout].includes(t):!1}function Gzt(t){return z5(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function kOe(t,e,r){return z5(this,arguments,void 0,function*(n,s,i,o=Xq,a=Vq,c=void 0){let u="",p=1;for(;p<=o;){let l,A,f=!1;try{l=yield s()}catch(M){c&&(l=c(M)),f=!0,u=M.message}if(l&&(A=i(l),!kzt(A)))return l;if(A&&(f=Uzt(A),u=`Cache service responded with ${A}`),F(`${n} - Attempt ${p} of ${o} failed with error: ${u}`),!f){F(`${n} - Error is not retryable`);break}yield Gzt(a),p++}throw Error(`${n} failed: ${u}`)})}function W3(t,e){return z5(this,arguments,void 0,function*(r,n,s=Xq,i=Vq){return yield kOe(r,n,o=>o.statusCode,s,i,o=>{if(o instanceof Ia)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function tM(t,e){return z5(this,arguments,void 0,function*(r,n,s=Xq,i=Vq){return yield kOe(r,n,o=>o.message.statusCode,s,i)})}var Fi=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(n.next(p))}catch(l){o(l)}}function c(p){try{u(n.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):s(p.value).then(a,c)}u((n=n.apply(t,e||[])).next())})};function Hzt(t,e){return Fi(this,void 0,void 0,function*(){yield HOe.promisify(GOe.pipeline)(t.message,e)})}var E5=class{constructor(e){this.contentLength=e,this.segmentIndex=0,this.s
Othercacheswithsimilarkey:`);for(let a of i?.artifactCaches||[])F(`CacheKey:${a?.cacheKey},CacheVersion:${a?.cacheVersion},CacheScope:${a?.scope},CacheCreated:${a?.creationTime}`)}}})}function KG(t,e,r){return Vn(this,void 0,void 0,function*(){let n=new t3e.URL(t),s=$Oe(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield VOe(t,e,s):s.concurrentBlobDownloads?yield XOe(t,e,s):yield y5(t,e):yield y5(t,e)})}function n3e(t,e,r){return Vn(this,void 0,void 0,function*(){let n=JG(),s=Bb(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:s,cacheSize:r?.cacheSize};return yield W3("reserveCache",()=>Vn(this,void 0,void 0,function*(){return n.postJson(Q3("caches"),i)}))})}function e3e(t,e){return`bytes${t}-${e}/*`}function Zzt(t,e,r,n,s){return Vn(this,void 0,void 0,function*(){F(`Uploadingchunkofsize${s-n+1}bytesatoffset${n}withcontentrange:${e3e(n,s)}`);let i={"Content-Type":"application/octet-stream","Content-Range":e3e(n,s)},o=yield tM(`uploadChunk(start:${n},end:${s})`,()=>Vn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!O5(o.message.statusCode))throw new Error(`Cacheservicerespondedwith${o.message.statusCode}duringuploadchunk.`)})}function eOt(t,e,r,n){return Vn(this,void 0,void 0,function*(){let s=qa(r),i=Q3(`caches/${e.toString()}`),o=rM.openSync(r,"r"),a=$G(n),c=zP("uploadConcurrency",a.uploadConcurrency),u=zP("uploadChunkSize",a.uploadChunkSize),p=[...new Array(c).keys()];F("Awaiting all uploads");let l=0;try{yield Promise.all(p.map(()=>Vn(this,void 0,void 0,function*(){for(;l<s;){let A=Math.min(s-l,u),f=l,M=l+A-1;l+=u,yield Zzt(t,i,()=>rM.createReadStream(r,{fd:o,start:f,end:M,autoClose:!1}).on("error",g=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${g.message}`)}),f,M)}})))}finally{rM.closeSync(o)}})}function tOt(t,e,r){return Vn(this,void 0,void 0,function*(){let n={size:r};return yield W3("commitCache",()=>Vn(this,void 0,void 0,function*(){return t.postJson(Q3(`caches/${e.toString()}`),n)}))})}function ZG(t,e,r,n){return Vn(this,void 0,void 0,function*(){if($G(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield POe(r,e,n)}else{let i=JG();F("Upload cache"),yield eOt(i,t,e,n),F("Commiting cache");let o=qa(e);_(`CacheSize:~${Math.round(o/(1024*1024))}MB(${o}B)`);let a=yield tOt(i,t,o);if(!O5(a.statusCode))throw new Error(`Cacheservicerespondedwith${a.statusCode}duringcommitcache.`);_("Cache saved successfully")}})}var J3e=x(G3e(),1),e1=x(Z0(),1),ks=x(Z0(),1),b2=x(Z0(),1),M2=x(Z0(),1),m2=x(Z0(),1);var VH=x(Z0(),1),jH=x(Z0(),1),j3e=x(Z0(),1),$3e=x(Z0(),1),Y3e=x(Z0(),1);var GH=x(Z0(),1),HH=x(Z0(),1),H3e=x(Z0(),1),X3e=x(Z0(),1),V3e=x(Z0(),1),XH=class extends V3e.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,X3e.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,H3e.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let u=n.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknownfield${a}(wiretype${c})for${this.typeName}`);let p=e.skip(c);u!==!1&&(u===!0?HH.UnknownFieldHandler.onRead:u)(this.typeName,i,a,c,p)}}return i}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,GH.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,GH.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?HH.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},pw=new XH;var $H=class extends Y3e.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:()=>pw}])}create(e){let r={repositoryId:"0",scope:[]};
`));let n=yield pX(r,"create");yield lX(n,t)})}var gM=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(n.next(p))}catch(l){o(l)}}function c(p){try{u(n.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):s(p.value).then(a,c)}u((n=n.apply(t,e||[])).next())})},Qo=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},mM=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},fw=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function tEe(t){if(!t||t.length===0)throw new Qo("Path Validation Error: At least one directory or file path is required")}function fX(t){if(t.length>512)throw new Qo(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new Qo(`KeyValidationError:${t}cannotcontaincommas.`)}function hX(){return L3()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function rEe(t,e,r,n){return gM(this,arguments,void 0,function*(s,i,o,a,c=!1){let u=L3();return F(`Cacheserviceversion:${u}`),tEe(s),u==="v2"?yield bEt(s,i,o,a,c):yield hEt(s,i,o,a,c)})}function hEt(t,e,r,n){return gM(this,arguments,void 0,function*(s,i,o,a,c=!1){o=o||[];let u=[i,...o];if(F("Resolved Keys:"),F(JSON.stringify(u)),u.length>10)throw new Qo("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of u)fX(A);let p=yield _O(),l="";try{let A=yield r3e(u,s,{compressionMethod:p,enableCrossOsArchive:c});if(!A?.archiveLocation)return;if(a?.lookupOnly)return _("Lookup only - skipping download"),A.cacheKey;l=rE.join(yield TO(),xl(p)),F(`ArchivePath:${l}`),yield KG(A.archiveLocation,l,a),Du()&&(yield tE(l,p));let f=qa(l);return _(`CacheSize:~${Math.round(f/(1024*1024))}MB(${f}B)`),yield AX(l,p),_("Cache restored successfully"),A.cacheKey}catch(A){let f=A;if(f.name===Qo.name)throw A;f instanceof Ia&&typeof f.statusCode=="number"&&f.statusCode>=500?db(`Failedtorestore:${A.message}`):Et(`Failedtorestore:${A.message}`)}finally{try{yield xO(l)}catch(A){F(`Failedtodeletearchive:${A}`)}}})}function bEt(t,e,r,n){return gM(this,arguments,void 0,function*(s,i,o,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let u=[i,...o];if(F("Resolved Keys:"),F(JSON.stringify(u)),u.length>10)throw new Qo("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of u)fX(l);let p="";try{let l=uX(),A=yield _O(),f={key:i,restoreKeys:o,version:Bb(s,A,c)},M=yield l.GetCacheEntryDownloadURL(f);if(!M.ok){F(`Cachenotfoundforversion${f.version}ofkeys:${u.join(", ")}`);return}if(f.key!==M.matchedKey?_(`Cachehitforrestore-key:${M.matchedKey}`):_(`Cachehitfor:${M.matchedKey}`),a?.lookupOnly)return _("Lookup only - skipping download"),M.matchedKey;p=rE.join(yield TO(),xl(A)),F(`Archivepath:${p}`),F(`Startingdownloadofarchiveto:${p}`),yield KG(M.signedDownloadUrl,p,a);let y=qa(p);return _(`CacheSize:~${Math.round(y/(1024*1024))}MB(${y}B)`),Du()&&(yield tE(p,A)),yield AX(p,A),_("Cache restored successfully"),M.matchedKey}catch(l){let A=l;if(A.name===Qo.name)throw l;A instanceof Ia&&typeof A.statusCode=="number"&&A.statusCode>=500?db(`Failedtorestore:${l.message}`):Et(`Failedtorestore:${l.message}`)}finally{try{p&&(yield xO(p))}catch(l){F(`Failedtodeletearchive:${l}`)}}})}function bX(t,e,r){return gM(this,arguments,void 0,function*(n,s,i,o=!1){let a=L3();return F(`Cacheserviceversion:${a}`),tEe(n),fX(s),a==="v2"?yield mEt(n,s,i,o):yield MEt(n,s,i,o)})}function MEt(t,e,r){return gM(this,arguments,void 0,function*(n,s,i,o=!1){var a,c,u,p,l;let A=yield _O(),f=-1,M=yield gP(n);if(F("Cache Paths:"),F(`${JSON.stringify(M)}`),M.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 g=yield TO(),y=rE.join(g,xl(A));F(`ArchivePath:${y}`);try{yie
Moreinfo:${c.url}`);let f=c.range&&c.range.length>0?c.range[0]?.start.line:void 0,M=!1;for(let g of o)if(g.remote||g.path.endsWith(u)&&g.content===p){a.push({title:l,message:A,file:g.path,startLine:f}),M=!0;break}M||F(`Buildx.convertWarningsToGitHubAnnotations:skippingwarningwithoutmatchingDockerfile${u}:${l}`)}return a}};var R2=x(require("fs"),1),VV=x(require("path"),1);var mS=class t{buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new Zt,this.iidFilename=`build-iidfile-${Ct.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${Ct.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),n=e?.attrs||{},s=Object.entries(n).filter(([f])=>!r.has(f)),i=Ct.parseBoolOrDefault(n["fetch-by-commit"]),o=e?.ref||n.ref||cn.ref;o.startsWith("refs/")?o.startsWith("refs/pull/")&&Ct.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(o=o.replace(/\/merge$/g,"/head")):o=`refs/heads/${o}`;let a=`${yt.serverURL}/${cn.repo.owner}/${cn.repo.repo}.git`,c=e?.checksum||n.checksum,u=e?.subdir||n.subdir,p=e?.format;if(!p){if(p="fragment",s.length>0)p="query";else if(Ct.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(p="query")}catch{}}let l=cn.sha||o;o.startsWith("refs/pull/")&&o.endsWith("/head")&&(l=typeof cn.payload.pull_request?.head?.sha=="string"?cn.payload.pull_request.head.sha:o);let A=c||l;if(p==="query"){let f=[`ref=${i||c?o:A}`],M=i?A:c;M&&f.push(`checksum=${M}`),u&&u!=="."&&f.push(`subdir=${u}`);for(let[g,y]of s)f.push(`${g}=${y}`);return`${a}?${f.join("&")}`}return`${a}#${A}${u&&u!=="."?`:${u}`:""}`}getImageIDFilePath(){return VV.default.join(gt.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(R2.default.existsSync(e))return R2.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return VV.default.join(gt.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!R2.default.existsSync(e))return;let r=R2.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}static resolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}static resolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}static resolveSecret(e,r){let[n,s]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!R2.default.existsSync(s))throw new Error(`secretfile${s}notfound`);return[n,s]}let i=gt.tmpName({tmpdir:gt.tmpDir()});return R2.default.writeFileSync(i,s),[n,i]}static getProvenanceInput(e){let r=Is(e);if(!r)return r;try{return XAe(e)?`builder-id=${yt.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${yt.workflowRunURL(!0)}`;let r=Vs(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of r)if(n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${yt.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let n="registry",s="",i="",o=Vs(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let a of o){let c=a.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());c[0]==="type"?n=c[1]:c[0]==="repository"?s=c[1]:c[0]==="ghtoken"&&(i=c[1])}return n==="gha"&&(s||(e=`${e},repository=${yt.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}stat
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let s of n){if(s.length==1&&!s[0].startsWith("type="))return e=="local";for(let[i,o]of s.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0}return!1}static hasAttestationType(e,r){let n=Vs(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let s of n)for(let[i,o]of s.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0;return!1}static resolveAttestationAttrs(e){let r=Vs(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let s of r)for(let i of s)try{let o=Ct.parseBool(i);n.push(`disabled=${!o}`)}catch{n.push(i)}return n.join(",")}static hasGitAuthTokenSecret(e,r){for(let n of e){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let n=e.indexOf("="),s=e.substring(0,n),i=e.substring(n+1);if(s.length==0||i.length==0)throw new Error(`${e}isnotavalidsecret`);return r&&Oa(i),[s,i]}};var jV=x(require("fs"),1),y4e=x(require("path"),1);var gS=class t{buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new Zt,this.metadataFilename=`bake-metadata-${Ct.generateRandomString()}.json`}getMetadataFilePath(){return y4e.default.join(gt.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!jV.default.existsSync(e))return;let r=jV.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 n in e)"buildx.build.ref"in e[n]&&r.push(e[n]["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 n=["bake"],s,i=[],o=[...e.files||[],e.source];if(o){for(let c of o.map(u=>u?u.trim():""))if(c.length!=0){if(!Ct.isValidRef(c)){i.push(c);continue}if(s)throw new Error("Only one remote bake definition can be defined");s=c}}s&&n.push(s);for(let c of i)n.push("--file",c);if(e.overrides)for(let c of e.overrides)n.push("--set",c);if(e.vars)for(let c of e.vars)n.push("--var",c);if(e.allow)for(let c of e.allow)n.push("--allow",c);e.call&&n.push("--call",e.call),e.load&&n.push("--load"),e.noCache&&n.push("--no-cache"),e.provenance&&n.push("--provenance",e.provenance),e.push&&n.push("--push"),e.sbom&&n.push("--sbom",e.sbom);let a=await this.buildx.getCommand([...n,"--print",...e.targets||[]]);return await xe.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 n in r.target){let s=r.target[n];s.attest&&Array.isArray(s.attest)&&(s.attest=s.attest.map(i=>t.parseAttestEntry(i))),s["cache-from"]&&Array.isArray(s["cache-from"])&&(s["cache-from"]=s["cache-from"].map(i=>t.parseCacheEntry(i))),s["cache-to"]&&Array.isArray(s["cache-to"])&&(s["cache-to"]=s["cache-to"].map(i=>t.parseCacheEntry(i))),s.output&&Array.isArray(s.output)&&(s.output=s.output.map(i=>t.parseExportEntry(i))),s.secret&&Array.isArray(s.secret)&&(s.secret=s.secret.map(i=>t.parseSecretEntry(i))),s.ssh&&Array.isArray(s.ssh)&&(s.ssh=s.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=Vs(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of n){let[i,o]=s.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());switch(i){case"type":r.type=o;break;case"disabled":r.disabled=Ct.parseBool(o);break;default:r[i]=o}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=Vs(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let s of n){let[i,o]=s.toString().split(/(?<=^[^=]+?)=/)
`).map(i=>i.trim()).filter(i=>i.length>0);if(s)return`refs/tags/${s}`;throw new Error("Cannot infer ref from detached HEAD")}static async findContainingRef(e){let r=await t.exec(["for-each-ref","--format=%(refname)","--contains","HEAD","--sort=-committerdate",e]),[n]=r.split(`
`).map(s=>s.trim()).filter(s=>s.length>0);return n}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var Fxe=require("crypto"),Vc=x(require("fs"),1),GA=x(require("path"),1);var QC=x(DE(),1),jc=x(yve(),1),Txe=x(Wte(),1),Og=x(qxe(),1);var L0e=x(DE(),1);var Rxe=x(ws(),1);var Ixe="application/vnd.oci.empty.v1+json";var Hp=class{binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await xe.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(F(`Cosign.isAvailablecmderr:${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(F(`Cosign.isAvailableerror:${r}`),!1));return F(`Cosign.isAvailable:${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await xe.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 xe.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return F("Cosign.versionSatisfies false: undefined version"),!1;let s=Rxe.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return F(`Cosign.versionSatisfies${n}statisfies${e}:${s}`),s}static parseCommandOutput(e){let r,n,s,i;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&&(i=c.errors),!r&&c&&Array.isArray(c.manifests)&&c.manifests.length>0){let u=c.manifests[0];u?.artifactType===L0e.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===Ixe&&typeof u.digest=="string"&&(n=u.digest)}if(!s&&c&&c.mediaType===L0e.BUNDLE_V03_MEDIA_TYPE&&(s=c),s&&(r||n)){i=void 0;break}}return{bundle:s,signatureManifestDigest:r||n,errors:i}}};var Q0e=x(require("fs"),1);var CT=class t{buildx;constructor(e){this.buildx=e?.buildx||new Zt}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 n=r.manifests.filter(o=>o.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return n;let s=e.platform,i=new Map;for(let o of r.manifests)o.digest&&i.set(o.digest,o);return n.filter(o=>{let a=o.annotations?.["vnd.docker.reference.digest"];if(!a)return!1;let c=i.get(a);return c?c.platform?.os===s.os&&c.platform?.architecture===s.architecture&&(c.platform?.variant??"")===(s.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],n=gt.tmpName({tmpdir:gt.tmpDir(),template:"imagetools-metadata-XXXXXX"}),s=[],i=[];for(let a of e.sources){if(a.startsWith("cwd://")){let c=a.substring(6);c.length>0&&s.push(c);continue}i.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",n);for(let a of s)r.push("--file",a);for(let a of i)r.push(a);let o=await this.getCreat
${o.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,a)*100))}throw o??new Error(`ImageToolsinspectcommandfailedfor${e.name}`)}async execInspect(e,r,n){return await xe.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(s=>{if(s.stderr.length>0&&s.exitCode!=0)throw new Error(s.stderr.trim());return n(JSON.parse(s.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(e)}};var wxe="application/vnd.in-toto+json";var Sxe="https://fulcio.sigstore.dev",Nxe="https://rekor.sigstore.dev",vxe="https://timestamp.sigstore.dev",Ff="https://search.sigstore.dev";var rXt="slsaprovenance1",HA=class t{cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Hp,this.imageTools=e?.imageTools||new CT}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 n=this.signingEndpoints(e.noTransparencyLog);_(`UsingSigstoresigningendpoint:${n.fulcioURL}`);let s=t.noTransparencyLog(e.noTransparencyLog),i=[];await this.cosign.versionSatisfies(">=3.0.4")?await cr("Creating Sigstore protobuf signing config",async()=>{let o=gt.tmpName({template:"signing-config-XXXXXX.json",tmpdir:gt.tmpDir()}),a=["signing-config","create","--with-default-services=true",`--out=${o}`];s&&a.push("--no-default-rekor=true"),await xe.exec(this.cosign.binPath,a,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),_(JSON.stringify(JSON.parse(Vc.default.readFileSync(o,{encoding:"utf-8"})),null,2)),i.push(`--signing-config=${o}`)}):(i.push("--use-signing-config"),s&&i.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 u=`${o}@${c}`;await cr(`Signingattestationmanifest${u}`,async()=>{let p=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...i];_(`[command]${this.cosign.binPath}${[...p,u].join(" ")}`);let l=await xe.getExecOutput(this.cosign.binPath,["--verbose",...p,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),A=Hp.parseCommandOutput(l.stderr.trim());if(l.exitCode!=0)if(A.errors&&A.errors.length>0){let M=A.errors.map(g=>`-[${g.code}]${g.message}:${g.detail}`).join(`
${u}`),await new Promise(p=>setTimeout(p,Math.pow(2,o)*100));else throw i}else throw new Error(`Cosignverifycommandfailedwith:${a.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`)}throw i}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 n=this.signingEndpoints(e.noTransparencyLog);_(`UsingSigstoresigningendpoint:${n.fulcioURL}`);let s=t.getProvenanceBlobs(e);for(let i of Object.keys(s))await cr(`Signing${i}`,async()=>{let o=s[i],a=GA.default.join(GA.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),c=t.getProvenanceSubjects(o);if(c.length===0){Et(`Nosubjectsfoundinprovenance${i},skipsigning.`);return}let u=await t.signPayload({data:o,type:wxe},n),p=t.parseBundle(u);_("Provenance blob signed for:");for(let l of c){let[A,f]=Object.entries(l.digest)[0]||[];_(`-${l.name}(${A}:${f})`)}p.tlogID&&_(`AttestationsignatureuploadedtoRekortransparencylog:${Ff}?logIndex=${p.tlogID}`),_(`WritingSigstorebundleto:${a}`),Vc.default.writeFileSync(a,JSON.stringify(p.payload,null,2),{encoding:"utf-8"}),r[i]={...p,bundlePath:a,subjects:c}})}catch(n){throw new Error(`SigningBuildKitprovenanceblobsfailed:${n.message}`)}return r}async verifySignedArtifacts(e,r){let n={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[s,i]of Object.entries(e)){let o=GA.default.dirname(s);await cr(`Verifyingsignaturebundle${i.bundlePath}`,async()=>{for(let a of i.subjects){let c=GA.default.join(o,a.name);_(`Verifyingsignedartifact${c}`);let u=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??rXt];(r.noTransparencyLog||!i.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let p=await xe.getExecOutput(this.cosign.binPath,[...u,"--bundle",i.bundlePath,c],{ignoreReturnCode:!0});if(p.stderr.length>0&&p.exitCode!=0)throw new Error(p.stderr);n[c]={bundlePath:i.bundlePath,cosignArgs:u}}})}return n}async verifyArtifact(e,r,n){_("Verifying keyless verification bundle signature");let s=JSON.parse(Vc.default.readFileSync(r,"utf-8")),i=(0,QC.bundleFromJSON)(s);_("Fetching Sigstore TUF trusted root metadata");let o=await Txe.getTrustedRoot(),a=(0,Og.toTrustMaterial)(o);try{_("Verifying artifact signature");let c=(0,Og.toSignedEntity)(i,Vc.default.readFileSync(e)),u=t.parseCertificate(i),p=i.verificationMaterial.tlogEntries,l=p.length>0?p[0].logIndex:void 0;if(n?.subjectAlternativeName&&n?.subjectAlternativeName instanceof RegExp){let M=u.subjectAltName?.replace(/^uri:/i,"");if(M){if(!M.match(n.subjectAlternativeName))throw new Error(`SigningcertificatesubjectAlternativeName"${M}"doesnotmatchexpectedpattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let f=new Og.Verifier(a).verify(c,{subjectAlternativeName:n?.subjectAlternativeName&&typeof n.subjectAlternativeName=="string"?n.subjectAlternativeName:void 0,extensions:n?.issuer?{issuer:n.issuer}:void 0});return F(`Sigstore.verifyArtifactsigner:${JSON.stringify(f)}`),{payload:s,certificate:u.toString(),tlogID:l}}catch(c){throw new Error(`Failedtoverifyartifactsignature:${c}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),_(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:Sxe,rekorURL:e?void 0:Nxe,tsaServerURL:vxe}}static noTransparencyLog(e){return e??yt.context.payload.repository?.private}static getProvenanceBlobs(e){let r=GA.default.join(e.localExportDir,"provenance.json");if(Vc.default.existsSync(r))return{[r]:Vc.default.readFileSync(r)};let n=Vc.default.readdirSync(e.localExportDir,{withFileTypes:!0}),s=n.filter(i=>i.isDirectory());if(s.length>0&&s.length===n.length&&s.every(i=>Vc.default.existsSync(GA.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let o of s){let a=
`,bakeTarget:Is("bake-target")||"docker-metadata-action",githubToken:Is("github-token")}}async function Pxe(t,e){switch(t){case"workflow":return await nXt(e);case"git":return await sXt();default:throw new Error(`Invalidcontextsource:${t}`)}}async function nXt(t){let e=yt.context;return/pull_request_target/.test(e.eventName)&&(e.ref=`refs/pull/${e.payload.number}/merge`),/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA||"")&&(/pull_request/.test(e.eventName)||/pull_request_target/.test(e.eventName))&&e.payload?.pull_request?.head?.sha!=null&&(e.sha=e.payload.pull_request.head.sha),{commitDate:await iXt(e.sha,t),...e}}async function sXt(){let t=await Zu.context();return{commitDate:await Zu.commitDate(t.sha),...t}}async function iXt(t,e){let r=yt.context.payload;if(r.commits){let n=r.commits.find(s=>s.id===t)?.timestamp;if(n)return new Date(n)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let n=await e.github.octokit.rest.repos.getCommit({owner:yt.context.repo.owner,repo:yt.context.repo.repo,ref:t});if(n.data.commit.committer?.date)return new Date(n.data.commit.committer.date);throw new Error("Committer date not found")}catch(n){return F(`FailedtogetcommitdatefromGitHubAPI:${n.message}`),new Date}}var rl=x(PV(),1),_He=x(require("fs"),1),WHe=x(require("path"),1),W4=x(Vxe(),1),ai=x(IHe(),1),Xg=x(ws(),1);var ct=class t extends Error{constructor(e,r,n,...s){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let i of s)for(let o in i){let a=i[o];this[o]=Buffer.isBuffer(a)?a.toString(n.encoding):a==null?a:JSON.parse(JSON.stringify(a))}}};var _4=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)};var Nx=function(t){let e=[];for(let r=0,n=t.length;r<n;r++){let s=t[r];if(s==null||s===!1)e[r]={disabled:!0};else if(typeof s=="string"||typeof s=="number")e[r]={name:`${s}`};else if(_4(s)){if(typeof s.name!="string")throw new ct("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property"name"isrequiredatposition${r}`,"when column is an object literal"]);e[r]=s}else throw new ct("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got${JSON.stringify(s)}atposition${r}`])}return e};var Ane=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let r=this.length+e.length;if(r>=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},dne=Ane;var RHe=function(t){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((n,s)=>{let i=Buffer.from(String.fromCharCode(s),t.encoding);return s!==63&&i.length===1&&i[0]===63||n.push(i),n},[]),r=new Uint8Array(256);for(let n of e)r[n[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new dne(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter?t.delimiter.map(n=>n.length):[],t.delimiter_auto?1:0
`,o).length:l,u?(a===null?0:a.length)+c.length:0,u?c.length+l:0);return A<f},parse:function(n,s,i,o){let{bom:a,comment_no_infix:c,delimiter_auto:u,encoding:p,from_line:l,ltrim:A,max_record_size:f,raw:M,relax_quotes:g,rtrim:y,skip_empty_lines:O,to:C,to_line:q}=this.options,{comment:R,escape:S,quote:T,record_delimiter:L}=this.options,{bomSkipped:j,delimiterDiscovered:Me,delimiterBufPrevious:Be,rawBuffer:K,escapeIsQuote:De}=this.state;if(!Me&&u){let ge;if(Be===void 0?ge=n:Be!==void 0&&n===void 0?ge=Be:ge=Buffer.concat([Be,n]),n=void 0,s||ge.length>u.size)this.options.delimiter=[Buffer.from(SHe(ge,this.options.delimiter_auto))],this.state.previousBuf=ge,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=ge;return}}let{previousBuf:$}=this.state,Y;if($===void 0)if(n===void 0){o();return}else Y=n;else $!==void 0&&n===void 0?Y=$:Y=Buffer.concat([$,n]);if(j===!1)if(a===!1)this.state.bomSkipped=!0;else if(Y.length<3){if(s===!1){this.state.previousBuf=Y;return}}else{for(let ge in Hg)if(Hg[ge].compare(Y,0,Hg[ge].length)===0){let ot=Hg[ge].length;this.state.bufBytesStart+=ot,Y=Y.slice(ot);let Wt=Gg({...this.original_options,encoding:ge});for(let Le in Wt)this.options[Le]=Wt[Le];({comment:R,escape:S,quote:T}=this.options);break}this.state.bomSkipped=!0}let Se=Y.length,te;for(te=0;te<Se&&!this.__needMoreData(te,Se,s);te++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),q!==-1&&this.info.lines>q){this.state.stop=!0,o();return}this.state.quoting===!1&&L.length===0&&this.__autoDiscoverRecordDelimiter(Y,te)&&(L=this.options.record_delimiter);let ge=Y[te];if(M===!0&&K.append(ge),(ge===$n0||ge===Yn0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(S!==null&&this.state.quoting===!0&&this.__isEscape(Y,te,ge)&&te+S.length<Se)if(De){if(this.__isQuote(Y,te+S.length)){this.state.escaping=!0,te+=S.length-1;continue}}else{this.state.escaping=!0,te+=S.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(Y,te))if(this.state.quoting===!0){let Le=Y[te+T.length],n0=y&&this.__isCharTrimable(Y,te+T.length),It=R!==null&&this.__compareBytes(R,Y,te+T.length,Le),ae=this.__isDelimiter(Y,te+T.length,Le),ci=L.length===0?this.__autoDiscoverRecordDelimiter(Y,te+T.length):this.__isRecordDelimiter(Le,Y,te+T.length);if(S!==null&&this.__isEscape(Y,te,ge)&&this.__isQuote(Y,te+S.length))te+=S.length-1;else if(!Le||ae||ci||It||n0){this.state.quoting=!1,this.state.wasQuoting=!0,te+=T.length-1;continue}else if(g===!1){let wn=this.__error(new ct("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got"${String.fromCharCode(Le)}"`,`atline${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(wn!==void 0)return wn}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(T),te+=T.length-1}else if(this.state.field.length!==0){if(g===!1){let Le=this.__infoField(),n0=Object.keys(Hg).map(ae=>Hg[ae].equals(this.state.field.toString())?ae:!1).filter(Boolean)[0],It=this.__error(new ct("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`aquoteisfoundonfield${JSON.stringify(Le.column)}atline${Le.lines},valueis${JSON.stringify(this.state.field.toString(p))}`,n0?`(${n0}bom)`:void 0],this.options,Le,{field:this.state.field}));if(It!==void 0)return It}}else{this.state.quoting=!0,te+=T.length-1;continue}if(this.state.quoting===!1){let Le=this.__isRecordDelimiter(ge,Y,te);if(Le!==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)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),te+=Le-1;continue}if(O===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,te+=Le-1;continue}this.info.bytes=this.state.bufBytesStart+te;let ae=this.__onFi
`,i),Buffer.from(`
`,i),Buffer.from("\r",i)];e:for(let a=0;a<o.length;a++){let c=o[a].length;for(let u=0;u<c;u++)if(o[a][u]!==n[s+u])continue e;return this.options.record_delimiter.push(o[a]),this.state.recordDelimiterMaxLength=o[a].length,o[a].length}return 0},__error:function(n){let{encoding:s,raw:i,skip_records_with_error:o}=this.options,a=typeof n=="string"?new Error(n):n;if(o){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(a,i?this.state.rawBuffer.toString(s):void 0)}catch(c){return c}return}else return a},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:n,raw:s,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:s?this.state.rawBuffer.toString(i):void 0}},__infoField:function(){let{columns:n}=this.options,s=Array.isArray(n),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:s===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var $f=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=vx(e),s=a=>{n.options.objname===void 0?r.push(a):r[a[0]]=a[1]},i=()=>{},o=n.parse(t,!0,s,i);if(o!==void 0)throw o;return r};function FHe(t){let e=[];if(t.length==1){let r=!1,n=$f(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of n){let i=s.toString().split("=").map(o=>o.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return vHe(e)}e=[];for(let r of t){let n={name:"",enable:!0},s=$f(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of s){let o=i.toString().split("=").map(a=>a.trim());if(o.length==1)n.name=o[0];else{let a=o[0].toLowerCase(),c=o[1];switch(a){case"name":{n.name=c;break}case"enable":{if(!["true","false"].includes(c))throw new Error(`Invalidenableattributevalue:${r}`);n.enable=/true/i.test(c);break}default:throw new Error(`Unknownimageattribute:${r}`)}}}if(n.name.length==0)throw new Error(`Imagenameattributeempty:${r}`);e.push(n)}return vHe(e)}function vHe(t){vd("Processing images input");for(let e of t)_(`name=${e.name},enable=${e.enable}`);return Fd(),t}var hne=(c=>(c.Schedule="schedule",c.Semver="semver",c.Pep440="pep440",c.Match="match",c.Edge="edge",c.Ref="ref",c.Raw="raw",c.Sha="sha",c))(hne||{}),Fx=(n=>(n.Branch="branch",n.Tag="tag",n.PR="pr",n))(Fx||{}),Tx=(r=>(r.Short="short",r.Long="long",r))(Tx||{}),fne=class{type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},Kn0={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function THe(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let n of t)e.push(Zn0(n));let r=e.sort((n,s)=>Number(n.attrs.priority)<Number(s.attrs.priority)?1:Number(n.attrs.priority)>Number(s.attrs.priority)?-1:0);vd("Processing tags input");for(let n of r)_(n.toString());return Fd(),r}function Zn0(t){let e=$f(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new fne;for(let n of e){let s=n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim());if(s.length==1)r.attrs.value=s[0];else{let i=s[0].toLowerCase(),o=s[1];switch(i){case"type":{if(!Object.values(hne).includes(o))throw new Error(`Unknowntagtypeattribute:${o}`);r.type=o;break}default:{r.attrs[i]=o;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missingpatternattributefor${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value=""),Object.prototype.hasOwnProperty.call(r.attrs,"match")||(r.attrs.match="");break}case"match":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Mis