|
|
|
@@ -0,0 +1,413 @@
|
|
|
|
|
var kUe=Object.create;var OB=Object.defineProperty;var PUe=Object.getOwnPropertyDescriptor;var OUe=Object.getOwnPropertyNames;var LUe=Object.getPrototypeOf,MUe=Object.prototype.hasOwnProperty;var o=(t,e)=>OB(t,"name",{value:e,configurable:!0});var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),FUe=(t,e)=>{for(var r in e)OB(t,r,{get:e[r],enumerable:!0})},UUe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of OUe(e))!MUe.call(t,i)&&i!==r&&OB(t,i,{get:()=>e[i],enumerable:!(n=PUe(e,i))||n.enumerable});return t};var T=(t,e,r)=>(r=t!=null?kUe(LUe(t)):{},UUe(e||!t||!t.__esModule?OB(r,"default",{value:t,enumerable:!0}):r,t));var OX=g(VA=>{"use strict";var j8t=require("net"),$Ue=require("tls"),NO=require("http"),QX=require("https"),jUe=require("events"),W8t=require("assert"),WUe=require("util");VA.httpOverHttp=JUe;VA.httpsOverHttp=YUe;VA.httpOverHttps=KUe;VA.httpsOverHttps=XUe;function JUe(t){var e=new Jl(t);return e.request=NO.request,e}o(JUe,"httpOverHttp");function YUe(t){var e=new Jl(t);return e.request=NO.request,e.createSocket=kX,e.defaultPort=443,e}o(YUe,"httpsOverHttp");function KUe(t){var e=new Jl(t);return e.request=QX.request,e}o(KUe,"httpOverHttps");function XUe(t){var e=new Jl(t);return e.request=QX.request,e.createSocket=kX,e.defaultPort=443,e}o(XUe,"httpsOverHttps");function Jl(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||NO.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(n,i,s,a){for(var c=PX(i,s,a),l=0,u=e.requests.length;l<u;++l){var d=e.requests[l];if(d.host===c.host&&d.port===c.port){e.requests.splice(l,1),d.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}o(Jl,"TunnelingAgent");WUe.inherits(Jl,jUe.EventEmitter);Jl.prototype.addRequest=o(function(e,r,n,i){var s=this,a=_O({request:e},s.options,PX(r,n,i));if(s.sockets.length>=this.maxSockets){s.requests.push(a);return}s.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);function l(){s.emit("free",c,a)}o(l,"onFree");function u(d){s.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}o(u,"onCloseOrRemove")})},"addRequest");Jl.prototype.createSocket=o(function(e,r){var n=this,i={};n.sockets.push(i);var s=_O({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(s.localAddress=e.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+new Buffer(s.proxyAuth).toString("base64")),dd("making CONNECT request");var a=n.request(s);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",d),a.end();function c(f){f.upgrade=!0}o(c,"onResponse");function l(f,h,p){process.nextTick(function(){u(f,h,p)})}o(l,"onUpgrade");function u(f,h,p){if(a.removeAllListeners(),h.removeAllListeners(),f.statusCode!==200){dd("tunneling socket could not be established, statusCode=%d",f.statusCode),h.destroy();var m=new Error("tunneling socket could not be established, statusCode="+f.statusCode);m.code="ECONNRESET",e.request.emit("error",m),n.removeSocket(i);return}if(p.length>0){dd("got illegal response body from proxy"),h.destroy();var m=new Error("got illegal response body from proxy");m.code="ECONNRESET",e.request.emit("error",m),n.removeSocket(i);return}return dd("tunneling connection has established"),n.sockets[n.sockets.indexOf(i)]=h,r(h)}o(u,"onConnect");function d(f){a.removeAllListeners(),dd(`tunneling socket could not be established, cause=%s
|
|
|
|
|
`,f.message,f.stack);var h=new Error("tunneling socket could not be established, cause="+f.message);h.code="ECONNRESET",e.request.emit("error",h),n.removeSocket(i)}o(d,"onError")},"createSocket");Jl.prototype.removeSocket=o(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(i){n.request.onSocket(i)})}},"removeSocket");function kX(t,e){var r=this;Jl.prototype.createSocket.call(r,t,function(n){var i=t.request.getHeader("host"),s=_O({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):t.host}),a=$Ue.connect(0,s);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}o(kX,"createSecureSocket");function PX(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}o(PX,"toOptions");function _O(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var i=Object.keys(n),s=0,a=i.length;s<a;++s){var c=i[s];n[c]!==void 0&&(t[c]=n[c])}}return t}o(_O,"mergeOptions");var dd;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?dd=o(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):dd=o(function(){},"debug");VA.debug=dd});var $A=g((K8t,LX)=>{LX.exports=OX()});var lr=g((X8t,MX)=>{MX.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var xt=g((Z8t,lZ)=>{"use strict";var FX=Symbol.for("undici.error.UND_ERR"),ur=class extends Error{static{o(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[FX]===!0}[FX]=!0},UX=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),RO=class extends ur{static{o(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[UX]===!0}[UX]=!0},qX=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),TO=class extends ur{static{o(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[qX]===!0}[qX]=!0},GX=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),DO=class extends ur{static{o(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[GX]===!0}[GX]=!0},HX=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),QO=class extends ur{static{o(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"
Line truncated
|
|
|
|
|
`)||t.includes("\r")||t.includes("\0"))===!1}o(wee,"isValidHeaderValue");function pGe(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),i="";if(n.length>0)for(let s=n.length;s!==0;s--){let a=n[s-1].trim();if(X3e.has(a)){i=a;break}}i!==""&&(t.referrerPolicy=i)}o(pGe,"setRequestReferrerPolicyOnRedirect");function AGe(){return"allowed"}o(AGe,"crossOriginResourcePolicyCheck");function mGe(){return"success"}o(mGe,"corsCheck");function gGe(){return"success"}o(gGe,"TAOCheck");function yGe(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}o(yGe,"appendFetchMetadata");function EGe(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&BL(t.origin)&&!BL(PC(t))&&(e=null);break;case"same-origin":ax(t,PC(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}o(EGe,"appendRequestOriginHeader");function rm(t,e){return t}o(rm,"coarsenTime");function CGe(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:rm(t.domainLookupStartTime,r),domainLookupEndTime:rm(t.domainLookupEndTime,r),connectionStartTime:rm(t.connectionStartTime,r),connectionEndTime:rm(t.connectionEndTime,r),secureConnectionStartTime:rm(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}o(CGe,"clampAndCoarsenConnectionTimingInfo");function bGe(t){return rm(nGe.now(),t)}o(bGe,"coarsenedSharedCurrentTime");function wGe(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}o(wGe,"createOpaqueTimingInfo");function Iee(){return{referrerPolicy:"strict-origin-when-cross-origin"}}o(Iee,"makePolicyContainer");function IGe(t){return{referrerPolicy:t.referrerPolicy}}o(IGe,"clonePolicyContainer");function SGe(t){let e=t.referrerPolicy;ah(e);let r=null;if(t.referrer==="client"){let c=gee();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let n=SL(r),i=SL(r,!0);n.toString().length>4096&&(n=i);let s=ax(t,n),a=kC(n)&&!kC(t.url);switch(e){case"origin":return i??SL(r,!0);case"unsafe-url":return n;case"same-origin":return s?i:"no-referrer";case"origin-when-cross-origin":return s?n:i;case"strict-origin-when-cross-origin":{let c=PC(t);return ax(n,c)?n:kC(n)&&!kC(c)?"no-referrer":i}default:return a?"no-referrer":i}}o(SGe,"determineRequestsReferrer");function SL(t,e){return ah(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}o(SL,"stripURLForReferrer");function kC(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}o(kC,"isURLPotentiallyTrustworthy");function BGe(t,e){if(ox===void 0)return!0;let r=See(e);if(r==="no metadata"||r.length===0)return!0;let n=vGe(r),i=NGe(r,n);for(let s of i){let a=s.algo,c=s.hash,l=ox.createHash(a).update(t).digest("base64");if(l[l.length-1]==="="&&(l[l.length-2]==="="?l=l.slice(0,-2):l=l.slice(0,-1)),_Ge(l,c))return!0}return!1}o(BGe,"bytesMatch");var xGe=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function See(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let i=xGe.exec(n);if(i===null||i.groups===void 0||i.groups.algo===void 0)continue;let s=i.groups.algo.toLowerCase();Eee.includes(s)&&e.push(i.groups)}return r===!0?"no metadata":e}o(See,"parseMetadata");function vGe(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}o(vGe,"getStrongestMetadata");function NGe(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}o(NGe,"filterMetadataListByAlgorithm");function _Ge(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}o(_Ge,"compareBase64Mixed");function RGe(t){}o(RGe,"tryUpgr
Line truncated
|
|
|
|
|
`);function f4e(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}o(f4e,"isAsciiString");function h4e(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}o(h4e,"validateBoundary");function p4e(t,e){lx(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),i=[],s={position:0};for(;t[s.position]===13&&t[s.position+1]===10;)s.position+=2;let a=t.length;for(;t[a-1]===10&&t[a-2]===13;)a-=2;for(a!==t.length&&(t=t.subarray(0,a));;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else return"failure";if(s.position===t.length-2&&ux(t,u4e,s)||s.position===t.length-4&&ux(t,d4e,s))return i;if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let c=A4e(t,s);if(c==="failure")return"failure";let{name:l,filename:u,contentType:d,encoding:f}=c;s.position+=2;let h;{let m=t.indexOf(n.subarray(2),s.position);if(m===-1)return"failure";h=t.subarray(s.position,m-4),s.position+=h.length,f==="base64"&&(h=Buffer.from(h.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let p;u!==null?(d??="text/plain",f4e(d)||(d=""),p=new c4e([h],u,{type:d})):p=n4e(Buffer.from(h)),lx(Lee(l)),lx(typeof p=="string"&&Lee(p)||s4e(p)),i.push(o4e(l,p,u))}}o(p4e,"multipartFormDataParser");function A4e(t,e){let r=null,n=null,i=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:i,encoding:s};let a=im(c=>c!==10&&c!==13&&c!==58,t,e);if(a=DL(a,!0,!0,c=>c===9||c===32),!i4e.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,im(c=>c===32||c===9,t,e),r4e(a)){case"content-disposition":{if(r=n=null,!ux(t,l4e,e)||(e.position+=17,r=Uee(t,e),r===null))return"failure";if(ux(t,Fee,e)){let c=e.position+Fee.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=Uee(t,e),n===null))return"failure"}break}case"content-type":{let c=im(l=>l!==10&&l!==13,t,e);c=DL(c,!1,!0,l=>l===9||l===32),i=Mee(c);break}case"content-transfer-encoding":{let c=im(l=>l!==10&&l!==13,t,e);c=DL(c,!1,!0,l=>l===9||l===32),s=Mee(c);break}default:im(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}o(A4e,"parseMultipartFormDataHeaders");function Uee(t,e){lx(t[e.position-1]===34);let r=im(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
|
|
|
|
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}o(Uee,"parseMultipartFormDataName");function im(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}o(im,"collectASequenceOfBytes");function DL(t,e,r,n){let i=0,s=t.length-1;if(e)for(;i<t.length&&n(t[i]);)i++;if(r)for(;s>0&&n(t[s]);)s--;return i===0&&s===t.length-1?t:t.subarray(i,s+1)}o(DL,"removeChars");function ux(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}o(ux,"bufferStartsWith");qee.exports={multipartFormDataParser:p4e,validateBoundary:h4e}});var am=g((Fzt,Xee)=>{"use strict";var MC=st(),{ReadableStreamFrom:m4e,isBlobLike:Hee,isReadableStreamLike:g4e,readableStreamClose:y4e,createDeferredPromise:E4e,fullyReadBody:C4e,extractMimeType:b4e,utf8DecodeBytes:$ee}=Rs(),{FormData:zee}=LC(),{kState:om}=fd(),{webidl:w4e}=Hn(),{Blob:I4e}=require("node:buffer"),QL=require("node:assert"),{isErrored:jee,isDisturbed:S4e}=require("node:stream"),{isArrayBuffer:B4e}=require("node:util/types"),{serializeAMimeType:x4e}=es(),{multipartFormDataParser:v4e}=Gee(),kL;try{let t=require("node:crypto");kL=o(e=>t.randomInt(0,e),"random")}catch{kL=o(t=>Math.floor(Math.random(t)),"random")}var dx=new TextEncoder;function N4e(){}o(N4e,"noop");var Wee=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,Jee;Wee&&(Jee=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!S4e(e)&&!jee(e)&&e.cancel("Response object has been garbage collected").catch(N4e)}));function Yee(t,e=!1){let r=null;t instanceof ReadableStream?r=t:Hee(t)?r=t.stream():r=new ReadableStream({async pull(l){let u=typeof i=="string"?dx.encode(i):i;u.byteLength&&l.enqueue(u),queueMicrotask(()=>y4e(l))},start(){},type:"bytes"}),QL(g4e(r));let n=null,i=null,s=null,a=null;if(typeof t=="string")i=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(B4e(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(MC.isFormDataLike(t)){let l=`----formdata-undici-0${`${kL(1e11)}`.padStart(11,"0")}`,u=`--${l}\r
|
|
|
|
|
Content-Disposition: form-data`;let d=o(E=>E.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),f=o(E=>E.replace(/\r?\n|\r/g,`\r
|
|
|
|
|
`),"normalizeLinefeeds"),h=[],p=new Uint8Array([13,10]);s=0;let m=!1;for(let[E,y]of t)if(typeof y=="string"){let C=dx.encode(u+`; name="${d(f(E))}"\r
|
|
|
|
|
\r
|
|
|
|
|
${f(y)}\r
|
|
|
|
|
`);h.push(C),s+=C.byteLength}else{let C=dx.encode(`${u}; name="${d(f(E))}"`+(y.name?`; filename="${d(y.name)}"`:"")+`\r
|
|
|
|
|
Content-Type: ${y.type||"application/octet-stream"}\r
|
|
|
|
|
\r
|
|
|
|
|
`);h.push(C,y,p),typeof y.size=="number"?s+=C.byteLength+y.size+p.byteLength:m=!0}let A=dx.encode(`--${l}--\r
|
|
|
|
|
`);h.push(A),s+=A.byteLength,m&&(s=null),i=t,n=o(async function*(){for(let E of h)E.stream?yield*E.stream():yield E},"action"),a=`multipart/form-data; boundary=${l}`}else if(Hee(t))i=t,s=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(MC.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:m4e(t)}if((typeof i=="string"||MC.isBuffer(i))&&(s=Buffer.byteLength(i)),n!=null){let l;r=new ReadableStream({async start(){l=n(t)[Symbol.asyncIterator]()},async pull(u){let{value:d,done:f}=await l.next();if(f)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!jee(r)){let h=new Uint8Array(d);h.byteLength&&u.enqueue(h)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:i,length:s},a]}o(Yee,"extractBody");function _4e(t,e=!1){return t instanceof ReadableStream&&(QL(!MC.isDisturbed(t),"The body has already been consumed."),QL(!t.locked,"The stream is locked.")),Yee(t,e)}o(_4e,"safelyExtractBody");function R4e(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}o(R4e,"cloneBody");function T4e(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(T4e,"throwIfAborted");function D4e(t){return{blob(){return sm(this,r=>{let n=Vee(this);return n===null?n="":n&&(n=x4e(n)),new I4e([r],{type:n})},t)},arrayBuffer(){return sm(this,r=>new Uint8Array(r).buffer,t)},text(){return sm(this,$ee,t)},json(){return sm(this,k4e,t)},formData(){return sm(this,r=>{let n=Vee(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let i=v4e(r,n);if(i==="failure")throw new TypeError("Failed to parse body as FormData.");let s=new zee;return s[om]=i,s}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(r.toString()),s=new zee;for(let[a,c]of i)s.append(a,c);return s}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return sm(this,r=>new Uint8Array(r),t)}}}o(D4e,"bodyMixinMethods");function Q4e(t){Object.assign(t.prototype,D4e(t))}o(Q4e,"mixinBody");async function sm(t,e,r){if(w4e.brandCheck(t,r),Kee(t))throw new TypeError("Body is unusable: Body has already been read");T4e(t[om]);let n=E4e(),i=o(a=>n.reject(a),"errorSteps"),s=o(a=>{try{n.resolve(e(a))}catch(c){i(c)}},"successSteps");return t[om].body==null?(s(Buffer.allocUnsafe(0)),n.promise):(await C4e(t[om].body,s,i),n.promise)}o(sm,"consumeBody");function Kee(t){let e=t[om].body;return e!=null&&(e.stream.locked||MC.isDisturbed(e.stream))}o(Kee,"bodyUnusable");function k4e(t){return JSON.parse($ee(t))}o(k4e,"parseJSONFromBytes");function Vee(t){let e=t[om].headersList,r=b4e(e);return r==="failure"?null:r}o(Vee,"bodyMimeType");Xee.exports={extractBody:Yee,safelyExtractBody:_4e,cloneBody:R4e,mixinBody:Q4e,streamRegistry:Jee,hasFinalizationRegistry:Wee,bodyUnusable:Kee}});var pte=g((qzt,hte)=>{"use strict";var _e=require("node:assert"),De=st(),{channels:Zee}=WA(),PL=mL(),{RequestContentLengthMismatchError:ch,ResponseContentLengthMismatchError:ete,RequestAbortedError:cte,InvalidArgumentError:P4e,HeadersTimeoutError:O4e,HeadersOverflowError:L4e,SocketError:cm,InformationalError:lm,BodyTimeoutError:M4e,HTTPParserError:F4e,ResponseExceededMaxSizeError:U4e}=xt(),{kUrl:lte,kReset:ts,kClient:Ax,kParser:Yt,kBlocking:qC,kRunning:en,kPending:ute,kSize:tte,kWriting:hd,kQueue:Ea,kNoRef:FC,kKeepAliveDefaultTimeout:q4e,kHostHeader:G4e,kPendingIdx:H4e,kRunningIdx:yo,kError:xi,kPipelining:mx,kSocket:uh,kKeepAliveTimeoutValue:yx,kMaxHeadersSize:OL,kKeepAliveMaxTimeout:z4e,kKeepAliveTimeoutThreshold:V4e,kHeadersTimeout:$4e,kBodyTimeout:j4e,kStrictContentLength:FL,kMaxRequests:rte,kCounter:W4e,kMaxResponseSize:J4e,kOnError:nte,kResume:tu,kHTTPContext:dte}=lr(),Ts=JZ(),ite=Buffer.alloc(0),fx=Buffer[Symbol.species],hx=De.addListener,Y4e=De.removeAllListeners,dh=Symbol("kIdleSocketValidation"),lh=Symbol("kIdleSocketValidationTimeout"),HL=Symbol("kSocketUsed"),LL;async function K4e(){let t=process.env.JEST_WORKER_ID?EL():void 0,e;try{e=await WebAssembly.compile(XZ())}catch{e=await WebAssembly.compile(t||EL())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:o((r,n,i)=>0,"wasm_on_url"),wasm_on_status:o((r,n,i)=>{_e(Sr.ptr===r);let s=n-fc+dc.byteOffset;return Sr.onStatus(new fx(dc.buffer,s,i))||0},"wasm_on_status"),wasm_on_message_begin:o(r=>(_e(Sr.ptr===r),Sr.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:o((r,n,i)=>{_e(Sr.ptr===r);let s=n-fc+dc.byteOffset;return Sr.onHeaderField(new fx(dc.buffer,s,i))||0},"wasm_on_header_field"),wasm_on_header_value:o((r,n,i)=>{_e(Sr.ptr===r);let s=n-fc+dc.byteOffset;return Sr.onHeaderValue(new fx(dc.buffer,s,i))||0},"wasm_on_header_value"),wasm_on_headers_complete:o((r,n,i,s)=>(_e(Sr.ptr===r),Sr.onHeadersComplete(n,!!i,!!s)||0),"wasm_on_headers_complete"),wasm_on_body:o((r,n,i)=>{_e(Sr.ptr===
Line truncated
|
|
|
|
|
`;if(typeof i=="string"?A+=`host: ${i}\r
|
|
|
|
|
`:A+=t[G4e],s?A+=`connection: upgrade\r
|
|
|
|
|
upgrade: ${s}\r
|
|
|
|
|
`:t[mx]&&!p[ts]?A+=`connection: keep-alive\r
|
|
|
|
|
`:A+=`connection: close\r
|
|
|
|
|
`,Array.isArray(u))for(let E=0;E<u.length;E+=2){let y=u[E+0],C=u[E+1];if(Array.isArray(C))for(let w=0;w<C.length;w++)A+=`${y}: ${C[w]}\r
|
|
|
|
|
`;else A+=`${y}: ${C}\r
|
|
|
|
|
`}return Zee.sendHeaders.hasSubscribers&&Zee.sendHeaders.publish({request:e,headers:A,socket:p}),!l||h===0?ote(m,null,t,e,p,d,A,f):De.isBuffer(l)?ote(m,l,t,e,p,d,A,f):De.isBlobLike(l)?typeof l.stream=="function"?ate(m,l.stream(),t,e,p,d,A,f):s5e(m,l,t,e,p,d,A,f):De.isStream(l)?i5e(m,l,t,e,p,d,A,f):De.isIterable(l)?ate(m,l,t,e,p,d,A,f):_e(!1),!0}o(n5e,"writeH1");function i5e(t,e,r,n,i,s,a,c){_e(s!==0||r[en]===0,"stream body cannot be pipelined");let l=!1,u=new Ex({abort:t,socket:i,request:n,contentLength:s,client:r,expectsPayload:c,header:a}),d=o(function(m){if(!l)try{!u.write(m)&&this.pause&&this.pause()}catch(A){De.destroy(this,A)}},"onData"),f=o(function(){l||e.resume&&e.resume()},"onDrain"),h=o(function(){if(queueMicrotask(()=>{e.removeListener("error",p)}),!l){let m=new cte;queueMicrotask(()=>p(m))}},"onClose"),p=o(function(m){if(!l){if(l=!0,_e(i.destroyed||i[hd]&&r[en]<=1),i.off("drain",f).off("error",p),e.removeListener("data",d).removeListener("end",p).removeListener("close",h),!m)try{u.end()}catch(A){m=A}u.destroy(m),m&&(m.code!=="UND_ERR_INFO"||m.message!=="reset")?De.destroy(e,m):De.destroy(e)}},"onFinished");e.on("data",d).on("end",p).on("error",p).on("close",h),e.resume&&e.resume(),i.on("drain",f).on("error",p),e.errorEmitted??e.errored?setImmediate(()=>p(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>p(null)),(e.closeEmitted??e.closed)&&setImmediate(h)}o(i5e,"writeStream");function ote(t,e,r,n,i,s,a,c){try{e?De.isBuffer(e)&&(_e(s===e.byteLength,"buffer body must have content length"),i.cork(),i.write(`${a}content-length: ${s}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),i.write(e),i.uncork(),n.onBodySent(e),!c&&n.reset!==!1&&(i[ts]=!0)):s===0?i.write(`${a}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):(_e(s===null,"no body must not have content length"),i.write(`${a}\r
|
|
|
|
|
`,"latin1")),n.onRequestSent(),r[tu]()}catch(l){t(l)}}o(ote,"writeBuffer");async function s5e(t,e,r,n,i,s,a,c){_e(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new ch;let l=Buffer.from(await e.arrayBuffer());i.cork(),i.write(`${a}content-length: ${s}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),i.write(l),i.uncork(),n.onBodySent(l),n.onRequestSent(),!c&&n.reset!==!1&&(i[ts]=!0),r[tu]()}catch(l){t(l)}}o(s5e,"writeBlob");async function ate(t,e,r,n,i,s,a,c){_e(s!==0||r[en]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let h=l;l=null,h()}}o(u,"onDrain");let d=o(()=>new Promise((h,p)=>{_e(l===null),i[xi]?p(i[xi]):l=h}),"waitForDrain");i.on("close",u).on("drain",u);let f=new Ex({abort:t,socket:i,request:n,contentLength:s,client:r,expectsPayload:c,header:a});try{for await(let h of e){if(i[xi])throw i[xi];f.write(h)||await d()}f.end()}catch(h){f.destroy(h)}finally{i.off("close",u).off("drain",u)}}o(ate,"writeIterable");var Ex=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:i,client:s,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=i,this.client=s,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[hd]=!0}write(e){let{socket:r,request:n,contentLength:i,client:s,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[xi])throw r[xi];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(i!==null&&a+u>i){if(s[FL])throw new ch;process.emitWarning(new ch)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[ts]=!0),i===null?r.write(`${l}transfer-encoding: chunked\r
|
|
|
|
|
`,"latin1"):r.write(`${l}content-length: ${i}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1")),i===null&&r.write(`\r
|
|
|
|
|
${u.toString(16)}\r
|
|
|
|
|
`,"latin1"),this.bytesWritten+=u;let d=r.write(e);return r.uncork(),n.onBodySent(e),d||r[Yt].timeout&&r[Yt].timeoutType===um&&r[Yt].timeout.refresh&&r[Yt].timeout.refresh(),d}end(){let{socket:e,contentLength:r,client:n,bytesWritten:i,expectsPayload:s,header:a,request:c}=this;if(c.onRequestSent(),e[hd]=!1,e[xi])throw e[xi];if(!e.destroyed){if(i===0?s?e.write(`${a}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):e.write(`${a}\r
|
|
|
|
|
`,"latin1"):r===null&&e.write(`\r
|
|
|
|
|
0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),r!==null&&i!==r){if(n[FL])throw new ch;process.emitWarning(new ch)}e[Yt].timeout&&e[Yt].timeoutType===um&&e[Yt].timeout.refresh&&e[Yt].timeout.refresh(),n[tu]()}}destroy(e){let{socket:r,client:n,abort:i}=this;r[hd]=!1,e&&(_e(n[en]<=1,"pipeline should only contain this request"),i(e))}};hte.exports=Z4e});var wte=g((Hzt,bte)=>{"use strict";var Eo=require("node:assert"),{pipeline:o5e}=require("node:stream"),dt=st(),{RequestContentLengthMismatchError:zL,RequestAbortedError:Ate,SocketError:GC,InformationalError:VL}=xt(),{kUrl:Cx,kReset:wx,kClient:dm,kRunning:Ix,kPending:a5e,kQueue:pd,kPendingIdx:$L,kRunningIdx:Ca,kError:wa,kSocket:vn,kStrictContentLength:c5e,kOnError:jL,kMaxConcurrentStreams:Cte,kHTTP2Session:ba,kResume:Ad,kSize:l5e,kHTTPContext:u5e}=lr(),ru=Symbol("open streams"),mte,gte=!1,bx;try{bx=require("node:http2")}catch{bx={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:d5e,HTTP2_HEADER_METHOD:f5e,HTTP2_HEADER_PATH:h5e,HTTP2_HEADER_SCHEME:p5e,HTTP2_HEADER_CONTENT_LENGTH:A5e,HTTP2_HEADER_EXPECT:m5e,HTTP2_HEADER_STATUS:g5e}}=bx;function y5e(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let i of n)e.push(Buffer.from(r),Buffer.from(i));else e.push(Buffer.from(r),Buffer.from(n));return e}o(y5e,"parseH2Headers");async function E5e(t,e){t[vn]=e,gte||(gte=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=bx.connect(t[Cx],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[Cte]});r[ru]=0,r[dm]=t,r[vn]=e,dt.addListener(r,"error",b5e),dt.addListener(r,"frameError",w5e),dt.addListener(r,"end",I5e),dt.addListener(r,"goaway",S5e),dt.addListener(r,"close",function(){let{[dm]:i}=this,{[vn]:s}=i,a=this[vn][wa]||this[wa]||new GC("closed",dt.getSocketInfo(s));if(i[ba]=null,i.destroyed){Eo(i[a5e]===0);let c=i[pd].splice(i[Ca]);for(let l=0;l<c.length;l++){let u=c[l];dt.errorRequest(i,u,a)}}}),r.unref(),t[ba]=r,e[ba]=r,dt.addListener(e,"error",function(i){Eo(i.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[wa]=i,this[dm][jL](i)}),dt.addListener(e,"end",function(){dt.destroy(this,new GC("other side closed",dt.getSocketInfo(this)))}),dt.addListener(e,"close",function(){let i=this[wa]||new GC("closed",dt.getSocketInfo(this));t[vn]=null,this[ba]!=null&&this[ba].destroy(i),t[$L]=t[Ca],Eo(t[Ix]===0),t.emit("disconnect",t[Cx],[t],i),t[Ad]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...i){return x5e(t,...i)},resume(){C5e(t)},destroy(i,s){n?queueMicrotask(s):e.destroy(i).on("close",s)},get destroyed(){return e.destroyed},busy(){return!1}}}o(E5e,"connectH2");function C5e(t){let e=t[vn];e?.destroyed===!1&&(t[l5e]===0&&t[Cte]===0?(e.unref(),t[ba].unref()):(e.ref(),t[ba].ref()))}o(C5e,"resumeH2");function b5e(t){Eo(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[vn][wa]=t,this[dm][jL](t)}o(b5e,"onHttp2SessionError");function w5e(t,e,r){if(r===0){let n=new VL(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[vn][wa]=n,this[dm][jL](n)}}o(w5e,"onHttp2FrameError");function I5e(){let t=new GC("other side closed",dt.getSocketInfo(this[vn]));this.destroy(t),dt.destroy(this[vn],t)}o(I5e,"onHttp2SessionEnd");function S5e(t){let e=this[wa]||new GC(`HTTP/2: "GOAWAY" frame received with code ${t}`,dt.getSocketInfo(this)),r=this[dm];if(r[vn]=null,r[u5e]=null,this[ba]!=null&&(this[ba].destroy(e),this[ba]=null),dt.destroy(this[vn],e),r[Ca]<r[pd].length){let n=r[pd][r[Ca]];r[pd][r[Ca]++]=null,dt.errorRequest(r,n,e),r[$L]=r[Ca]}Eo(r[Ix]===0),r.emit("disconnect",r[Cx],[r],e),r[Ad]()}o(S5e,"onHTTP2GoAway");function B5e(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(B5e,"shouldSendContentLength");function x5e(t,e){let r=t[ba],{method:n,path:i,host:s,upgrade:a,expectContinue:c,signal:l,headers:u}=e,{body:d}=e;if(a)return dt.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let f={};for(let B=0;B<u.length;B+=2){let k=u[B+0],F=u[B+1];if(Array.isArray(F))for(let N=0;N<F.length;N++)f[k]?f[k]+=`,${F[N]}`:f[k]=F[N];else f[k]=F}let h,{hostname:p,port:m}=t[Cx];f[d5e]=s||`${p}${m?`:${m}`:""}`,f[f5e]=n;let A=o(B=>{e.aborted||e.completed||(B=B||new Ate,dt.errorRequest(t,e,B),h!=null&&dt.destroy(h,B),dt.destroy(d,B),t[pd][t[Ca]++]=null,t[Ad]())},"abort");try{e.onConnect(A)}catch(B){dt.errorRequest(t,e,B)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),h=r.request(f,{endStream:!1,signal:l}),h.id&&!h.pending?(e.onUpgrade(null,null,h),++r[ru],t[pd][t[Ca]++]=null):h.once("ready",()=>{e.onUpgrade(null,null,h),++r[ru],t[pd][t[Ca]++]=null}),h.once("close",()=>{r[ru]-=1,r[ru]===0&&r.unref()}),!0;f[h5e]=i,f[p5e]="https";let E=n==="PUT"||n==="POST"||n==="PATCH";d&&typeof d.read=="function"&&d.read(0);let y=dt.bodyLength(d);if(dt.isFormDataLike(d)){mte??=am().extractBody;let[B,k]=mte(d);f["content-type"]=k,d=B.stream,y=B.length}if(y==null&&(y=e.contentLength),(y===0||!E)&&(y=null),B5e(n)&&y>0&&e.contentLength!=null&&e.contentLength!==y){if(t[c5e])return dt.err
Line truncated
|
|
|
|
|
`,this[X5e]=l??3e5,this[K5e]=i??3e5,this[Z5e]=C??!0,this[eHe]=B,this[KL]=F,this[gd]=null,this[sHe]=$>-1?$:-1,this[aHe]=z??100,this[Ur]=null,this[Ia]=[],this[iu]=0,this[Sa]=0,this[$C]=se=>ZL(this,se),this[oHe]=se=>kte(this,se)}get pipelining(){return this[vx]}set pipelining(e){this[vx]=e,this[$C](!0)}get[JC](){return this[Ia].length-this[Sa]}get[WC](){return this[Sa]-this[iu]}get[jC](){return this[Ia].length-this[iu]}get[z5e](){return!!this[Ur]&&!this[hm]&&!this[Ur].destroyed}get[YL](){return!!(this[Ur]?.busy(null)||this[jC]>=(Qte(this)||1)||this[JC]>0)}[H5e](e){Pte(this),this.once("connect",e)}[iHe](e,r){let n=e.origin||this[pc].origin,i=new L5e(n,e,r);return this[Ia].push(i),this[hh]||(fh.bodyLength(i.body)==null&&fh.isIterable(i.body)?(this[hh]=1,queueMicrotask(()=>ZL(this))):this[$C](!0)),this[hh]&&this[yd]!==2&&this[YL]&&(this[yd]=2),this[yd]<2}async[rHe](){return new Promise(e=>{this[jC]?this[gd]=e:e(null)})}async[nHe](e){return new Promise(r=>{let n=this[Ia].splice(this[Sa]);for(let s=0;s<n.length;s++){let a=n[s];fh.errorRequest(this,a,e)}let i=o(()=>{this[gd]&&(this[gd](),this[gd]=null),r(null)},"callback");this[Ur]?(this[Ur].destroy(e,i),this[Ur]=null):queueMicrotask(i),this[$C]()})}},uHe=xx();function kte(t,e){if(t[WC]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){nu(t[Sa]===t[iu]);let r=t[Ia].splice(t[iu]);for(let n=0;n<r.length;n++){let i=r[n];fh.errorRequest(t,i,e)}nu(t[jC]===0)}}o(kte,"onError");async function Pte(t){nu(!t[hm]),nu(!t[Ur]);let{host:e,hostname:r,protocol:n,port:i}=t[pc];if(r[0]==="["){let s=r.indexOf("]");nu(s!==-1);let a=r.substring(1,s);nu(Dte.isIP(a)),r=a}t[hm]=!0,fm.beforeConnect.hasSubscribers&&fm.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[Ur]?.version,servername:t[md],localAddress:t[VC]},connector:t[zC]});try{let s=await new Promise((a,c)=>{t[zC]({host:e,hostname:r,protocol:n,port:i,servername:t[md],localAddress:t[VC]},(l,u)=>{l?c(l):a(u)})});if(t.destroyed){fh.destroy(s.on("error",Rte),new U5e);return}nu(s);try{t[Ur]=s.alpnProtocol==="h2"?await lHe(t,s):await cHe(t,s)}catch(a){throw s.destroy().on("error",Rte),a}t[hm]=!1,s[tHe]=0,s[KL]=t[KL],s[G5e]=t,s[$5e]=null,fm.connected.hasSubscribers&&fm.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[Ur]?.version,servername:t[md],localAddress:t[VC]},connector:t[zC],socket:s}),t.emit("connect",t[pc],[t])}catch(s){if(t.destroyed)return;if(t[hm]=!1,fm.connectError.hasSubscribers&&fm.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[Ur]?.version,servername:t[md],localAddress:t[VC]},connector:t[zC],error:s}),s.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(nu(t[WC]===0);t[JC]>0&&t[Ia][t[Sa]].servername===t[md];){let a=t[Ia][t[Sa]++];fh.errorRequest(t,a,s)}else kte(t,s);t.emit("connectionError",t[pc],[t],s)}t[$C]()}o(Pte,"connect");function Tte(t){t[yd]=0,t.emit("drain",t[pc],[t])}o(Tte,"emitDrain");function ZL(t,e){t[hh]!==2&&(t[hh]=2,dHe(t,e),t[hh]=0,t[iu]>256&&(t[Ia].splice(0,t[iu]),t[Sa]-=t[iu],t[iu]=0))}o(ZL,"resume");function dHe(t,e){for(;;){if(t.destroyed){nu(t[JC]===0);return}if(t[gd]&&!t[jC]){t[gd](),t[gd]=null;return}if(t[Ur]&&t[Ur].resume(),t[YL])t[yd]=2;else if(t[yd]===2){e?(t[yd]=1,queueMicrotask(()=>Tte(t))):Tte(t);continue}if(t[JC]===0||t[WC]>=(Qte(t)||1))return;let r=t[Ia][t[Sa]];if(t[pc].protocol==="https:"&&t[md]!==r.servername){if(t[WC]>0)return;t[md]=r.servername,t[Ur]?.destroy(new F5e("servername changed"),()=>{t[Ur]=null,ZL(t)})}if(t[hm])return;if(!t[Ur]){Pte(t);return}if(t[Ur].destroyed||t[Ur].busy(r))return;!r.aborted&&t[Ur].write(r)?t[Sa]++:t[Ia].splice(t[Sa],1)}}o(dHe,"_resume");Ote.exports=XL});var eM=g((Xzt,Lte)=>{"use strict";var Nx=class{static{o(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};Lte.exports=class{static{o(this,"FixedQueue")}constructor(){this.head=this.tail=new Nx}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Nx),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Fte=g((eVt,Mte)=>{var{kFree:fHe,kConnected:hHe,kPending:pHe,kQueued:AHe,kRunning:mHe,kSize:gHe}=lr(),ph=Symbol("pool"),tM=class{static{o(this,"PoolStats")}constructor(e){this[ph]=e}get connected(){return this[ph][hHe]}get free(){return this[ph][fHe]}get pending(){return this[ph][pHe]}get queued(){return this[ph][AHe]}get running(){return this[ph][mHe]}get size(){return this[ph][gHe]}};Mte.exports=tM});var aM=g((rVt,Jte)=>{"use strict";var yHe=XA(),EHe=eM(),{kConnected:rM,kSize:Ute,kRunning:qte,kPending:Gte,kQueued:YC,kBusy:CHe,kFree:bHe,kUrl:wHe,kClose:IHe,kDestroy:SHe,kDispatch:BHe}=lr(
Line truncated
|
|
|
|
|
${n.count} ${n.noun} ${n.is} pending:
|
|
|
|
|
|
|
|
|
|
${e.format(r)}
|
|
|
|
|
`.trim())}};rie.exports=aF});var $x=g((e6t,aie)=>{"use strict";var iie=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Xze}=xt(),Zze=mm();oie()===void 0&&sie(new Zze);function sie(t){if(!t||typeof t.dispatch!="function")throw new Xze("Argument agent must implement Agent");Object.defineProperty(globalThis,iie,{value:t,writable:!0,enumerable:!1,configurable:!1})}o(sie,"setGlobalDispatcher");function oie(){return globalThis[iie]}o(oie,"getGlobalDispatcher");aie.exports={setGlobalDispatcher:sie,getGlobalDispatcher:oie}});var jx=g((n6t,cie)=>{"use strict";cie.exports=class{static{o(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var uie=g((s6t,lie)=>{"use strict";var eVe=Bx();lie.exports=t=>{let e=t?.maxRedirections;return r=>o(function(i,s){let{maxRedirections:a=e,...c}=i;if(!a)return r(i,s);let l=new eVe(r,a,i,s);return r(c,l)},"redirectInterceptor")}});var fie=g((a6t,die)=>{"use strict";var tVe=Ox();die.exports=t=>e=>o(function(n,i){return e(n,new tVe({...n,retryOptions:{...t,...n.retryOptions}},{handler:i,dispatch:e}))},"retryInterceptor")});var pie=g((l6t,hie)=>{"use strict";var rVe=st(),{InvalidArgumentError:nVe,RequestAbortedError:iVe}=xt(),sVe=jx(),cF=class extends sVe{static{o(this,"DumpHandler")}#e=1024*1024;#r=null;#n=!1;#t=!1;#i=0;#s=null;#l=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new nVe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#l=r}onConnect(e){this.#r=e,this.#l.onConnect(this.#a.bind(this))}#a(e){this.#t=!0,this.#s=e}onHeaders(e,r,n,i){let a=rVe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new iVe(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#t?!0:this.#l.onHeaders(e,r,n,i)}onError(e){this.#n||(e=this.#s??e,this.#l.onError(e))}onData(e){return this.#i=this.#i+e.length,this.#i>=this.#e&&(this.#n=!0,this.#t?this.#l.onError(this.#s):this.#l.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#t){this.#l.onError(this.reason);return}this.#l.onComplete(e)}}};function oVe({maxSize:t}={maxSize:1024*1024}){return e=>o(function(n,i){let{dumpMaxSize:s=t}=n,a=new cF({maxSize:s},i);return e(n,a)},"Intercept")}o(oVe,"createDumpInterceptor");hie.exports=oVe});var gie=g((d6t,mie)=>{"use strict";var{isIP:aVe}=require("node:net"),{lookup:cVe}=require("node:dns"),lVe=jx(),{InvalidArgumentError:vm,InformationalError:uVe}=xt(),Aie=Math.pow(2,31)-1,lF=class{static{o(this,"DNSInstance")}#e=0;#r=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#r=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#t,this.pick=e.pick??this.#i}get full(){return this.#n.size===this.#r}runLookup(e,r,n){let i=this.#n.get(e.hostname);if(i==null&&this.full){n(null,e.origin);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#r};if(i==null)this.lookup(e,s,(a,c)=>{if(a||c==null||c.length===0){n(a??new uVe("No DNS entries found"));return}this.setRecords(e,c);let l=this.#n.get(e.hostname),u=this.pick(e,l,s.affinity),d;typeof u.port=="number"?d=`:${u.port}`:e.port!==""?d=`:${e.port}`:d="",n(null,`${e.protocol}//${u.family===6?`[${u.address}]`:u.address}${d}`)});else{let a=this.pick(e,i,s.affinity);if(a==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#t(e,r,n){cVe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(i,s)=>{if(i)return n(i);let a=new Map;for(let c of s)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#i(e,r,n){let i=null,{records:s,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===Aie?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?c=s[n]:c=s[n===4?6:4]):c=s[n],c==null||c.ips.length===0)return i;c.offset==null||c.offset===Aie?c.offset=0:c.offset++;let l=c.offset%c.ips.length;return i=c.ips[l]??null,i==null?i:Date.now()-i.timestamp>i.ttl?(c.ips.splice(l,1),this.pick(e,r,n)):i}setRecords(e,r){let n=Date.now(),i={records:{4:null,6:null}};for(let s of r){s.timestamp=n,typeof s.ttl=="number"?s.ttl=Math.min(s.ttl,this.#e):s.ttl=this.#e;let a=i.records[s.family]??{ips:[]};a.ips.push(s),i.records[s.family]=a}this.#n.set(e.hostname,i)}getHandler(e,r){return new uF(this,e,r)}},uF=class extends lVe{static{o(this,"DNSDispatchHan
Line truncated
|
|
|
|
|
${s}`;break;case"retry":Joe(s)&&(r[i]=s);break;case"id":Yoe(s)&&(r[i]=s);break;case"event":s.length>0&&(r[i]=s);break}}processEvent(e){e.retry&&Joe(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Yoe(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};Koe.exports={EventSourceStream:ZF}});var oae=g((p9t,sae)=>{"use strict";var{pipeline:yje}=require("node:stream"),{fetching:Eje}=lb(),{makeRequest:Cje}=Rm(),{webidl:lu}=Hn(),{EventSourceStream:bje}=Xoe(),{parseMIMEType:wje}=es(),{createFastMessageEvent:Ije}=Om(),{isNetworkError:Zoe}=ab(),{delay:Sje}=KF(),{kEnumerableProperty:_h}=st(),{environmentSettingsObject:eae}=Rs(),tae=!1,rae=3e3,Ib=0,nae=1,Sb=2,Bje="anonymous",xje="use-credentials",qm=class t extends EventTarget{static{o(this,"EventSource")}#e={open:null,error:null,message:null};#r=null;#n=!1;#t=Ib;#i=null;#s=null;#l;#a;constructor(e,r={}){super(),lu.util.markAsUncloneable(this);let n="EventSource constructor";lu.argumentLengthCheck(arguments,1,n),tae||(tae=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=lu.converters.USVString(e,n,"url"),r=lu.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#l=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:rae};let i=eae,s;try{s=new URL(e,i.settingsObject.baseUrl),this.#a.origin=s.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#r=s.href;let a=Bje;r.withCredentials&&(a=xje,this.#n=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=eae.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#r)],this.#i=Cje(c),this.#c()}get readyState(){return this.#t}get url(){return this.#r}get withCredentials(){return this.#n}#c(){if(this.#t===Sb)return;this.#t=Ib;let e={request:this.#i,dispatcher:this.#l},r=o(n=>{Zoe(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#o()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(Zoe(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#o();return}let i=n.headersList.get("content-type",!0),s=i!==null?wje(i):"failure",a=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#t=nae,this.dispatchEvent(new Event("open")),this.#a.origin=n.urlList[n.urlList.length-1].origin;let c=new bje({eventSourceSettings:this.#a,push:o(l=>{this.dispatchEvent(Ije(l.type,l.options))},"push")});yje(n.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#s=Eje(e)}async#o(){this.#t!==Sb&&(this.#t=Ib,this.dispatchEvent(new Event("error")),await Sje(this.#a.reconnectionTime),this.#t===Ib&&(this.#a.lastEventId.length&&this.#i.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#c()))}close(){lu.brandCheck(this,t),this.#t!==Sb&&(this.#t=Sb,this.#s.abort(),this.#i=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},iae={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Ib,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:nae,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Sb,writable:!1}};Object.defineProperties(qm,iae);Object.defineProperties(qm.prototype,iae);Object.defineProperties(qm.prototype,{close:_h,onerror:_h,onmessage:_h,onopen:_h,readyState:_h,url:_h,withCredentials:_h});lu.converters.EventSourceInitDict=lu.dictionaryConverter([{key:"withCredentials",converter:lu.converters.boolean,defaultValue:o(()=>!1,"defaultValue")},{key:"dispatcher",converter:lu.converters.any}]);sae.exports={EventSource:qm,defaultReconnectionTime:rae}});var Rh=g((m9t,Me)=>{"use strict";var vje=pm(),aae=NC(),Nje=Am(),_je=ire(),Rje=mm(),Tje=CM(),Dje=Nre(),Qje=Pre(),cae=xt(),k2=st(),{InvalidArgumentError:Q2}=cae,Gm=bne(),kje=RC(),Pje=tF(),Oje=nie(),Lje=iF(),Mje=GM(),Fje=Ox(),{getGlobalDispatcher:lae,setGlobalDispatcher:Uje}=$x(),qje=jx(),Gje=Bx(),Hje=xx();Object.assign(aae.prototype,Gm);Me.exports.Dispatcher=aae;Me.exports.Client=vje;Me.exports.Pool=Nje;Me.exports.BalancedPoo
Line truncated
|
|
|
|
|
`).join(`
|
|
|
|
|
`+s),t.push(i+"m+"+jv.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=drt()+e+" "+t[0]}o(urt,"formatArgs");function drt(){return Wn.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(drt,"getDate");function frt(...t){return process.stderr.write($v.format(...t)+`
|
|
|
|
|
`)}o(frt,"log");function hrt(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(hrt,"save");function prt(){return process.env.DEBUG}o(prt,"load");function Art(t){t.inspectOpts={};let e=Object.keys(Wn.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Wn.inspectOpts[e[r]]}o(Art,"init");jv.exports=Zq()(Wn);var{formatters:ehe}=jv.exports;ehe.o=function(t){return this.inspectOpts.colors=this.useColors,$v.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};ehe.O=function(t){return this.inspectOpts.colors=this.useColors,$v.inspect(t,this.inspectOpts)}});var Wv=g((sZt,n3)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?n3.exports=Jfe():n3.exports=the()});var ihe=g(cs=>{"use strict";var mrt=cs&&cs.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),grt=cs&&cs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rhe=cs&&cs.__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)&&mrt(e,t,r);return grt(e,t),e};Object.defineProperty(cs,"__esModule",{value:!0});cs.req=cs.json=cs.toBuffer=void 0;var yrt=rhe(require("http")),Ert=rhe(require("https"));async function nhe(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(nhe,"toBuffer");cs.toBuffer=nhe;async function Crt(t){let r=(await nhe(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}o(Crt,"json");cs.json=Crt;function brt(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?Ert:yrt).request(t,e),i=new Promise((s,a)=>{n.once("response",s).once("error",a).end()});return n.then=i.then.bind(i),n}o(brt,"req");cs.req=brt});var che=g($s=>{"use strict";var ohe=$s&&$s.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),wrt=$s&&$s.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ahe=$s&&$s.__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)&&ohe(e,t,r);return wrt(e,t),e},Irt=$s&&$s.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ohe(e,t,r)};Object.defineProperty($s,"__esModule",{value:!0});$s.Agent=void 0;var Srt=ahe(require("net")),she=ahe(require("http")),Brt=require("https");Irt(ihe(),$s);var xc=Symbol("AgentBaseInternalState"),i3=class extends she.Agent{static{o(this,"Agent")}constructor(e){super(e),this[xc]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
|
|
|
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new Srt.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Brt.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(c=>{if(this.decrementSockets(s,a),c instanceof she.Agent)try{return c.addRequest(e,i)}catch(l){return n(l)}this[xc].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(s,a),n(c)})}createConnection(){let e=this[xc].currentSocket;if(this[xc].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[xc].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[xc]&&(this[xc].defaultPort=e)}get protocol(){return this[xc].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[xc]&&(this[xc].protocol=e)}};$s.Agent=i3});var lhe=g(lg=>{"use strict";var xrt=lg&&lg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lg,"__esModule",{value:!0});lg.parseProxyResponse=void 0;var vrt=xrt(Wv()),Jv=(0,vrt.default)("https-proxy-agent:parse-proxy-response");function Nrt(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let d=t.read();d?u(d):t.once("readable",s)}o(s,"read");function a(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",s)}o(a,"cleanup");function c(){a(),Jv("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function l(d){a(),Jv("onerror %o",d),r(d)}o(l,"onerror");function u(d){i.push(d),n+=d.length;let f=Buffer.concat(i,n),h=f.indexOf(`\r
|
|
|
|
|
\r
|
|
|
|
|
`);if(h===-1){Jv("have not received end of HTTP headers yet..."),s();return}let p=f.slice(0,h).toString("ascii").split(`\r
|
|
|
|
|
`),m=p.shift();if(!m)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let A=m.split(" "),E=+A[1],y=A.slice(2).join(" "),C={};for(let w of p){if(!w)continue;let B=w.indexOf(":");if(B===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${w}"`));let k=w.slice(0,B).toLowerCase(),F=w.slice(B+1).trimStart(),N=C[k];typeof N=="string"?C[k]=[N,F]:Array.isArray(N)?N.push(F):C[k]=F}Jv("got proxy server response: %o %o",m,C),a(),e({connect:{statusCode:E,statusText:y,headers:C},buffered:f})}o(u,"ondata"),t.on("error",l),t.on("end",c),s()})}o(Nrt,"parseProxyResponse");lg.parseProxyResponse=Nrt});var Ahe=g(ko=>{"use strict";var _rt=ko&&ko.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Rrt=ko&&ko.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hhe=ko&&ko.__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)&&_rt(e,t,r);return Rrt(e,t),e},phe=ko&&ko.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ko,"__esModule",{value:!0});ko.HttpsProxyAgent=void 0;var Yv=hhe(require("net")),uhe=hhe(require("tls")),Trt=phe(require("assert")),Drt=phe(Wv()),Qrt=che(),krt=require("url"),Prt=lhe(),d0=(0,Drt.default)("https-proxy-agent"),dhe=o(t=>t.servername===void 0&&t.host&&!Yv.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),Kv=class extends Qrt.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new krt.URL(e):e,this.proxyHeaders=r?.headers??{},d0("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?fhe(r,"headers"):null,host:n,port:i}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;n.protocol==="https:"?(d0("Creating `tls.Socket`: %o",this.connectOpts),i=uhe.connect(dhe(this.connectOpts))):(d0("Creating `net.Socket`: %o",this.connectOpts),i=Yv.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=Yv.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(n.username||n.password){let h=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(h).toString("base64")}`}s.Host=`${a}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let h of Object.keys(s))c+=`${h}: ${s[h]}\r
|
|
|
|
|
`;let l=(0,Prt.parseProxyResponse)(i);i.write(`${c}\r
|
|
|
|
|
`);let{connect:u,buffered:d}=await l;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",Ort),r.secureEndpoint?(d0("Upgrading socket connection to TLS"),uhe.connect({...fhe(dhe(r),"host","path","port"),socket:i})):i;i.destroy();let f=new Yv.Socket({writable:!1});return f.readable=!0,e.once("socket",h=>{d0("Replaying proxy buffer for failed request"),(0,Trt.default)(h.listenerCount("data")>0),h.push(d),h.push(null)}),f}};Kv.protocols=["http","https"];ko.HttpsProxyAgent=Kv;function Ort(t){t.resume()}o(Ort,"resume");function fhe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(fhe,"omit")});var yhe=g(ls=>{"use strict";var Lrt=ls&&ls.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Mrt=ls&&ls.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mhe=ls&&ls.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Lrt(e,t,r);return Mrt(e,t),e};Object.defineProperty(ls,"__esModule",{value:!0});ls.req=ls.json=ls.toBuffer=void 0;var Frt=mhe(require("http")),Urt=mhe(require("https"));async function ghe(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(ghe,"toBuffer");ls.toBuffer=ghe;async function qrt(t){let r=(await ghe(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}o(qrt,"json");ls.json=qrt;function Grt(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?Urt:Frt).request(t,e),i=new Promise((s,a)=>{n.once("response",s).once("error",a).end()});return n.then=i.then.bind(i),n}o(Grt,"req");ls.req=Grt});var whe=g(js=>{"use strict";var Che=js&&js.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Hrt=js&&js.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bhe=js&&js.__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)&&Che(e,t,r);return Hrt(e,t),e},zrt=js&&js.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Che(e,t,r)};Object.defineProperty(js,"__esModule",{value:!0});js.Agent=void 0;var Vrt=bhe(require("net")),Ehe=bhe(require("http")),$rt=require("https");zrt(yhe(),js);var vc=Symbol("AgentBaseInternalState"),s3=class extends Ehe.Agent{static{o(this,"Agent")}constructor(e){super(e),this[vc]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
|
|
|
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new Vrt.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?$rt.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(c=>{if(this.decrementSockets(s,a),c instanceof Ehe.Agent)return c.addRequest(e,i);this[vc].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(s,a),n(c)})}createConnection(){let e=this[vc].currentSocket;if(this[vc].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[vc].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[vc]&&(this[vc].defaultPort=e)}get protocol(){return this[vc].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[vc]&&(this[vc].protocol=e)}};js.Agent=s3});var Bhe=g(Po=>{"use strict";var jrt=Po&&Po.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Wrt=Po&&Po.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),She=Po&&Po.__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)&&jrt(e,t,r);return Wrt(e,t),e},Jrt=Po&&Po.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Po,"__esModule",{value:!0});Po.HttpProxyAgent=void 0;var Yrt=She(require("net")),Krt=She(require("tls")),Xrt=Jrt(Wv()),Zrt=require("events"),ent=whe(),Ihe=require("url"),ug=(0,Xrt.default)("http-proxy-agent"),Xv=class extends ent.Agent{static{o(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new Ihe.URL(e):e,this.proxyHeaders=r?.headers??{},ug("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?tnt(r,"headers"):null,host:n,port:i}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,i=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",a=`${i}//${s}`,c=new Ihe.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let l=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let u=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;l["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}l["Proxy-Connection"]||(l["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let u of Object.keys(l)){let d=l[u];d&&e.setHeader(u,d)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,i;ug("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(ug("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,i=n.indexOf(`\r
|
|
|
|
|
\r
|
|
|
|
|
`)+4,e.outputData[0].data=e._header+n.substring(i),ug("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(ug("Creating `tls.Socket`: %o",this.connectOpts),s=Krt.connect(this.connectOpts)):(ug("Creating `net.Socket`: %o",this.connectOpts),s=Yrt.connect(this.connectOpts)),await(0,Zrt.once)(s,"connect"),s}};Xv.protocols=["http","https"];Po.HttpProxyAgent=Xv;function tnt(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(tnt,"omit")});var jhe=g(fN=>{"use strict";Object.defineProperty(fN,"__esModule",{value:!0});fN.state=void 0;fN.state={instrumenterImplementation:void 0}});var upe=g(gN=>{"use strict";Object.defineProperty(gN,"__esModule",{value:!0});gN.state=void 0;gN.state={operationRequestMap:new WeakMap}});var Gme=g(Ng=>{"use strict";Object.defineProperty(Ng,"__esModule",{value:!0});var bct=require("os"),wct=require("util");function Ict(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}o(Ict,"_interopDefaultLegacy");var Sct=Ict(wct);function Bct(t,...e){process.stderr.write(`${Sct.default.format(t,...e)}${bct.EOL}`)}o(Bct,"log");var Dme=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,kme,LH=[],MH=[],O_=[];Dme&&FH(Dme);var Pme=Object.assign(t=>Ome(t),{enable:FH,enabled:UH,disable:xct,log:Bct});function FH(t){kme=t,LH=[],MH=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?MH.push(new RegExp(`^${n.substr(1)}$`)):LH.push(new RegExp(`^${n}$`));for(let n of O_)n.enabled=UH(n.namespace)}o(FH,"enable");function UH(t){if(t.endsWith("*"))return!0;for(let e of MH)if(e.test(t))return!1;for(let e of LH)if(e.test(t))return!0;return!1}o(UH,"enabled");function xct(){let t=kme||"";return FH(""),t}o(xct,"disable");function Ome(t){let e=Object.assign(r,{enabled:UH(t),destroy:vct,log:Pme.log,namespace:t,extend:Nct});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return o(r,"debug"),O_.push(e),e}o(Ome,"createDebugger");function vct(){let t=O_.indexOf(this);return t>=0?(O_.splice(t,1),!0):!1}o(vct,"destroy");function Nct(t){let e=Ome(`${this.namespace}:${t}`);return e.log=this.log,e}o(Nct,"extend");var X0=Pme,Lme=new Set,k_=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,L_,M_=X0("azure");M_.log=(...t)=>{X0.log(...t)};var qH=["verbose","info","warning","error"];k_&&(qme(k_)?Mme(k_):console.error(`AZURE_LOG_LEVEL set to unknown log level '${k_}'; logging is not enabled. Acceptable values: ${qH.join(", ")}.`));function Mme(t){if(t&&!qme(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${qH.join(",")}`);L_=t;let e=[];for(let r of Lme)Ume(r)&&e.push(r.namespace);X0.enable(e.join(","))}o(Mme,"setLogLevel");function _ct(){return L_}o(_ct,"getLogLevel");var Qme={verbose:400,info:300,warning:200,error:100};function Rct(t){let e=M_.extend(t);return Fme(M_,e),{error:P_(e,"error"),warning:P_(e,"warning"),info:P_(e,"info"),verbose:P_(e,"verbose")}}o(Rct,"createClientLogger");function Fme(t,e){e.log=(...r)=>{t.log(...r)}}o(Fme,"patchLogMethod");function P_(t,e){let r=Object.assign(t.extend(e),{level:e});if(Fme(t,r),Ume(r)){let n=X0.disable();X0.enable(n+","+r.namespace)}return Lme.add(r),r}o(P_,"createLogger");function Ume(t){return!!(L_&&Qme[t.level]<=Qme[L_])}o(Ume,"shouldEnable");function qme(t){return qH.includes(t)}o(qme,"isAzureLogLevel");Ng.AzureLogger=M_;Ng.createClientLogger=Rct;Ng.getLogLevel=_ct;Ng.setLogLevel=Mme});var zH=g(ew=>{"use strict";Object.defineProperty(ew,"__esModule",{value:!0});var _g=new WeakMap,F_=new WeakMap,Z0=class t{static{o(this,"AbortSignal")}constructor(){this.onabort=null,_g.set(this,[]),F_.set(this,!1)}get aborted(){if(!F_.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return F_.get(this)}static get none(){return new t}addEventListener(e,r){if(!_g.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");_g.get(this).push(r)}removeEventListener(e,r){if(!_g.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=_g.get(this),i=n.indexOf(r);i>-1&&n.splice(i,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function Hme(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=_g.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),F_.set(t,!0)}o(Hme,"abortSignal");var GH=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},HH=class{static{o(this,"AbortController")}constructor(e){if(this._signal=new Z0,!!e){Array.isArray(e)||(e=arguments);for(let r of e)r.aborted?this.abort():r.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){Hme(this._signal)}static timeout(e){let r=new Z0,n=setTimeout(Hme,e,r);return typeof n.unref=="function"&&n.unref(),r}};ew.AbortController=HH;ew.AbortError=GH;ew.AbortSignal=Z0});var Wme=g(Tr=>{"use strict";Object.defineP
Line truncated
|
|
|
|
|
Polling from: ${r.config.operationLocation}
|
|
|
|
|
Operation status: ${d}
|
|
|
|
|
Polling status: ${Xme.includes(d)?"Stopped":"Running"}`),d==="succeeded"){let f=a(u,r);if(f!==void 0)return{response:await e(f).catch(Yme({state:r,stateProxy:n,isOperationError:c})),status:d}}return{response:u,status:d}}o(olt,"pollOperationHelper");async function rge(t){let{poll:e,state:r,stateProxy:n,options:i,getOperationStatus:s,getResourceLocation:a,getOperationLocation:c,isOperationError:l,withOperationLocation:u,getPollingInterval:d,processResult:f,getError:h,updateState:p,setDelay:m,isDone:A,setErrorAsResult:E}=t,{operationLocation:y}=r.config;if(y!==void 0){let{response:C,status:w}=await olt({poll:e,getOperationStatus:s,state:r,stateProxy:n,operationLocation:y,getResourceLocation:a,isOperationError:l,options:i});if(ege({status:w,response:C,state:r,stateProxy:n,isDone:A,processResult:f,getError:h,setErrorAsResult:E}),!Xme.includes(w)){let B=d?.(C);B&&m(B);let k=c?.(C,r);if(k!==void 0){let F=y!==k;r.config.operationLocation=k,u?.(k,F)}else u?.(y,!1)}p?.(r,C)}}o(rge,"pollOperation");function nge(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}o(nge,"getOperationLocationPollingUrl");function ige(t){return t.headers.location}o(ige,"getLocationHeader");function sge(t){return t.headers["operation-location"]}o(sge,"getOperationLocationHeader");function oge(t){return t.headers["azure-asyncoperation"]}o(oge,"getAzureAsyncOperationHeader");function alt(t){var e;let{location:r,requestMethod:n,requestPath:i,resourceLocationConfig:s}=t;switch(n){case"PUT":return i;case"DELETE":return;case"PATCH":return(e=a())!==null&&e!==void 0?e:i;default:return a()}function a(){switch(s){case"azure-async-operation":return;case"original-uri":return i;default:return r}}o(a,"getDefault")}o(alt,"findResourceLocation");function age(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:i}=t,s=sge(e),a=oge(e),c=nge({operationLocation:s,azureAsyncOperation:a}),l=ige(e),u=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:alt({requestMethod:u,location:l,requestPath:n,resourceLocationConfig:i})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:u==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}o(age,"inferLroMode");function cge(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return t8(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return dp.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(cge,"transformStatus");function clt(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return cge({status:r,statusCode:t.statusCode})}o(clt,"getStatus");function llt(t){var e,r;let{properties:n,provisioningState:i}=(e=t.body)!==null&&e!==void 0?e:{},s=(r=n?.provisioningState)!==null&&r!==void 0?r:i;return cge({status:s,statusCode:t.statusCode})}o(llt,"getProvisioningState");function t8(t){return t===202?"running":t<300?"succeeded":"failed"}o(t8,"toOperationStatus");function lge({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?ult(new Date(e)):r*1e3}}o(lge,"parseRetryAfter");function uge(t){let e=t.flatResponse.error;if(!e){dp.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){dp.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}o(uge,"getErrorFromResponse");function ult(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}o(ult,"calculatePollingIntervalFromDate");function dge(t){let{response:e,state:r,operationLocation:n}=t;function i(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return t8(e.rawResponse.statusCode);case"Body":return r8(e,r);default:return"running"}}o(i,"helper");let s=i();return s==="running"&&n===void 0?"succeeded":s}o(dge,"getStatusFromInitialResponse");async function dlt(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:i,setErrorAsResult:s}=t;return tge({init:o(async()=>{let a=await i.sendInitialRequest(),c=age({rawResponse:a.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},"init"),stateProxy:e,processResult:n?({flatResponse:a},c)=>n(a,c):({flatResponse:a})=>a,getOperationStatus:dge,setErrorAsResult:s})}o(dlt,"initHttpOperation");function fge({rawResponse:t},e){var r;switchLine truncated
|
|
|
|
|
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:a=s,i=1;break;case 1:r[n++]=a<<2|(s&48)>>4,a=s,i=2;break;case 2:r[n++]=(a&15)<<4|(s&60)>>2,a=s,i=3;break;case 3:r[n++]=(a&3)<<6|s,i=0;break}}if(i==1)throw Error("invalid base64 string.");return r.subarray(0,n)}o(Wlt,"base64decode");Pg.base64decode=Wlt;function Jlt(t){let e="",r=0,n,i=0;for(let s=0;s<t.length;s++)switch(n=t[s],r){case 0:e+=_u[n>>2],i=(n&3)<<4,r=1;break;case 1:e+=_u[i|n>>4],i=(n&15)<<2,r=2;break;case 2:e+=_u[i|n>>6],e+=_u[n&63],r=0;break}return r&&(e+=_u[i],e+="=",r==1&&(e+="=")),e}o(Jlt,"base64encode");Pg.base64encode=Jlt});var Vge=g(iR=>{"use strict";Object.defineProperty(iR,"__esModule",{value:!0});iR.utf8read=void 0;var h8=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function Ylt(t){if(t.length<1)return"";let e=0,r=[],n=[],i=0,s,a=t.length;for(;e<a;)s=t[e++],s<128?n[i++]=s:s>191&&s<224?n[i++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[i++]=55296+(s>>10),n[i++]=56320+(s&1023)):n[i++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(r.push(h8(n)),i=0);return r.length?(i&&r.push(h8(n.slice(0,i))),r.join("")):h8(n.slice(0,i))}o(Ylt,"utf8read");iR.utf8read=Ylt});var cw=g(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.WireType=Zc.mergeBinaryOptions=Zc.UnknownFieldHandler=void 0;var Klt;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,i,s,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:i,wireType:s,data:a})},t.onWrite=(r,n,i)=>{for(let{no:s,wireType:a,data:c}of t.list(n))i.tag(s,a).raw(c)},t.list=(r,n)=>{if(e(r)){let i=r[t.symbol];return n?i.filter(s=>s.no==n):i}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=o(r=>r&&Array.isArray(r[t.symbol]),"is")})(Klt=Zc.UnknownFieldHandler||(Zc.UnknownFieldHandler={}));function Xlt(t,e){return Object.assign(Object.assign({},t),e)}o(Xlt,"mergeBinaryOptions");Zc.mergeBinaryOptions=Xlt;var Zlt;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(Zlt=Zc.WireType||(Zc.WireType={}))});var oR=g(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.varint32read=ms.varint32write=ms.int64toString=ms.int64fromString=ms.varint64write=ms.varint64read=void 0;function eut(){let t=0,e=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(eut,"varint64read");ms.varint64read=eut;function tut(t,e,r){for(let s=0;s<28;s=s+7){let a=t>>>s,c=!(!(a>>>7)&&e==0),l=(c?a|128:a)&255;if(r.push(l),!c)return}let n=t>>>28&15|(e&7)<<4,i=e>>3!=0;if(r.push((i?n|128:n)&255),!!i){for(let s=3;s<31;s=s+7){let a=e>>>s,c=!!(a>>>7),l=(c?a|128:a)&255;if(r.push(l),!c)return}r.push(e>>>31&1)}}o(tut,"varint64write");ms.varint64write=tut;var sR=65536*65536;function rut(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,i=0;function s(a,c){let l=Number(t.slice(a,c));i*=r,n=n*r+l,n>=sR&&(i=i+(n/sR|0),n=n%sR)}return o(s,"add1e6digit"),s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,i]}o(rut,"int64fromString");ms.int64fromString=rut;function nut(t,e){if(e>>>0<=2097151)return""+(sR*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,s=r+n*6777216+i*6710656,a=n+i*8147497,c=i*2,l=1e7;s>=l&&(a+=Math.floor(s/l),s%=l),a>=l&&(c+=Math.floor(a/l),a%=l);function u(d,f){let h=d?String(d):"";return f?"0000000".slice(h.length)+h:h}return o(u,"decimalFrom1e7"),u(c,0)+u(a,c)+u(s,1)}o(nut,"int64toString");ms.int64toString=nut;function iut(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}o(iut,"varint32write");ms.varint32write=iut;function sut(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(sut,"varint32read");ms.varint32read=sut});var Zd=g(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});Xd.PbLong=Xd.PbULong=Xd.detectBi=void 0;var lw=oR(),zt;function $ge(){let t=new DataView(new ArrayBuffer(8));zt=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("922337203685477580
Line truncated
|
|
|
|
|
`)}};QR.RpcError=U8});var G8=g(PR=>{"use strict";Object.defineProperty(PR,"__esModule",{value:!0});PR.mergeRpcOptions=void 0;var Sye=nt();function vdt(t,e){if(!e)return t;let r={};kR(t,r),kR(e,r);for(let n of Object.keys(e)){let i=e[n];switch(n){case"jsonOptions":r.jsonOptions=Sye.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=Sye.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},kR(t.meta,r.meta),kR(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(i):i.concat();break}}return r}o(vdt,"mergeRpcOptions");PR.mergeRpcOptions=vdt;function kR(t,e){if(!t)return;let r=e;for(let[n,i]of Object.entries(t))i instanceof Date?r[n]=new Date(i.getTime()):Array.isArray(i)?r[n]=i.concat():r[n]=i}o(kR,"copy")});var z8=g(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.Deferred=mp.DeferredState=void 0;var rl;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(rl=mp.DeferredState||(mp.DeferredState={}));var H8=class{static{o(this,"Deferred")}constructor(e=!0){this._state=rl.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==rl.PENDING)throw new Error(`cannot resolve ${rl[this.state].toLowerCase()}`);this._resolve(e),this._state=rl.RESOLVED}reject(e){if(this.state!==rl.PENDING)throw new Error(`cannot reject ${rl[this.state].toLowerCase()}`);this._reject(e),this._state=rl.REJECTED}resolvePending(e){this._state===rl.PENDING&&this.resolve(e)}rejectPending(e){this._state===rl.PENDING&&this.reject(e)}};mp.Deferred=H8});var $8=g(OR=>{"use strict";Object.defineProperty(OR,"__esModule",{value:!0});OR.RpcOutputStreamController=void 0;var Bye=z8(),gp=nt(),V8=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){gp.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){gp.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){gp.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){gp.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:o(()=>{let e=this._itState;gp.assert(e,"bad state"),gp.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new Bye.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;gp.assert(n.state==Bye.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};OR.RpcOutputStreamController=V8});var W8=g(Gg=>{"use strict";var Ndt=Gg&&Gg.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Gg,"__esModule",{value:!0});Gg.UnaryCall=void 0;var j8=class{static{o(this,"UnaryCall")}constructor(e,r,n,i,s,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=i,this.response=s,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return Ndt(this,void 0,void 0,function*(){let[e,r,n,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:i}})}};Gg.UnaryCall=j8});var Y8=g(Hg=>{"use strict";var _dt=Hg&&Hg.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function
Line truncated
|
|
|
|
|
You can add a runtime option to disable the check or this warning:
|
|
|
|
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(Omt,"logUnexpecedPropertyAccessOnce");function Lmt(){Object.keys(yT).forEach(function(t){delete yT[t]})}o(Lmt,"resetLoggedProperties")});var CT=g(al=>{"use strict";al.__esModule=!0;al.HandlebarsEnvironment=mV;function Fbe(t){return t&&t.__esModule?t:{default:t}}o(Fbe,"_interopRequireDefault");var Sp=fi(),Mmt=Wo(),pV=Fbe(Mmt),Fmt=uV(),Umt=Pbe(),qmt=fV(),ET=Fbe(qmt),Gmt=hV(),Hmt="4.7.10";al.VERSION=Hmt;var zmt=8;al.COMPILER_REVISION=zmt;var Vmt=7;al.LAST_COMPATIBLE_COMPILER_REVISION=Vmt;var $mt={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"};al.REVISION_CHANGES=$mt;var AV="[object Object]";function mV(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Fmt.registerDefaultHelpers(this),Umt.registerDefaultDecorators(this)}o(mV,"HandlebarsEnvironment");mV.prototype={constructor:mV,logger:ET.default,log:ET.default.log,registerHelper:o(function(e,r){if(Sp.toString.call(e)===AV){if(r)throw new pV.default("Arg not supported with multiple helpers");Sp.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:o(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:o(function(e,r){if(Sp.toString.call(e)===AV)Sp.extend(this.partials,e);else{if(typeof r>"u")throw new pV.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:o(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:o(function(e,r){if(Sp.toString.call(e)===AV){if(r)throw new pV.default("Arg not supported with multiple decorators");Sp.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){Gmt.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var jmt=ET.default.log;al.log=jmt;al.createFrame=Sp.createFrame;al.logger=ET.default});var qbe=g((bT,Ube)=>{"use strict";bT.__esModule=!0;function gV(t){this.string=t}o(gV,"SafeString");gV.prototype.toString=gV.prototype.toHTML=function(){return""+this.string};bT.default=gV;Ube.exports=bT.default});var Gbe=g(yV=>{"use strict";yV.__esModule=!0;yV.wrapHelper=Wmt;function Wmt(t,e){if(typeof t!="function")return t;var r=o(function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)},"wrapper");return r}o(Wmt,"wrapHelper")});var jbe=g(nf=>{"use strict";nf.__esModule=!0;nf.checkRevision=egt;nf.template=tgt;nf.wrapProgram=wT;nf.resolvePartial=rgt;nf.invokePartial=ngt;nf.noop=Vbe;function Jmt(t){return t&&t.__esModule?t:{default:t}}o(Jmt,"_interopRequireDefault");function Ymt(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}o(Ymt,"_interopRequireWildcard");var Kmt=fi(),Bp=Ymt(Kmt),Xmt=Wo(),$a=Jmt(Xmt),Tu=CT(),Hbe=uV(),Zmt=Gbe(),EV=hV();function egt(t){var e=t&&t[0]||1,r=Tu.COMPILER_REVISION;if(!(e>=Tu.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Tu.COMPILER_REVISION))if(e<Tu.LAST_COMPATIBLE_COMPILER_REVISION){var n=Tu.REVISION_CHANGES[r],i=Tu.REVISION_CHANGES[e];throw new $a.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 ("+i+").")}else throw new $a.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}o(egt,"checkRevision");function tgt(t,e){if(!e)throw new $a.default("No environment passed to template");if(!t||!t.main)throw new $a.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(a,c,l){l.hash&&(c=Bp.extend({},c,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,c,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var u=e.VM.invokePartial.call(this,a,c,l);if(u==null&&Bp.isFunction(a))throw new $a.default("The partial "+l.name+" returned no output: partials must return a string");if(u==null&&e.compile){if(typeof a!="string")throw new $a.default("The partial "+l.name+" could not be compiled: partials must be strings or functions returning strings");l.partials[l.name]=e.compile(a,t.compilerOptions,e),u=l.partials[l.name](c,l)}if(u!=null){if(l.indent){for(var d=u.split(`
|
|
|
|
|
`),f=0,h=d.length;f<h&&!(!d[f]&&f+1===h);f++)d[f]=l.indent+d[f];u=d.join(`
|
|
|
|
|
`)}return u}else throw new $a.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}o(n,"invokePartialWrapper");var i={strict:o(function(c,l,u){if(!c||!(l in c))throw new $a.default('"'+l+'" not defined in '+c,{loc:u});return i.lookupProperty(c,l)},"strict"),lookupProperty:o(function(c,l){var u=c[l];if(u==null||Object.prototype.hasOwnProperty.call(c,l)&&!EV.isPrototypeConstructor(c,l,u)||EV.resultIsAllowed(u,i.protoAccessControl,l))return u},"lookupProperty"),lookup:o(function(c,l){for(var u=c.length,d=0;d<u;d++){var f=c[d]&&i.lookupProperty(c[d],l);if(f!=null)return f}},"lookup"),lambda:o(function(c,l){return typeof c=="function"?c.call(l):c},"lambda"),escapeExpression:Bp.escapeExpression,invokePartial:n,fn:o(function(c){var l=t[c];return l.decorator=t[c+"_d"],l},"fn"),programs:[],program:o(function(c,l,u,d,f){var h=this.programs[c],p=this.fn(c);return l||f||d||u?h=wT(this,c,p,l,u,d,f):h||(h=this.programs[c]=wT(this,c,p)),h},"program"),data:o(function(c,l){for(;c&&l--;)c=c._parent;return c},"data"),mergeIfNeeded:o(function(c,l){var u=c||l;return c&&l&&c!==l&&(u=Bp.extend({},l,c)),u},"mergeIfNeeded"),nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function s(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=c.data;s._setup(c),!c.partial&&t.useData&&(l=igt(a,l));var u=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(c.depths?u=a!=c.depths[0]?[a].concat(c.depths):c.depths:u=[a]);function f(h){return""+t.main(i,h,i.helpers,i.partials,l,d,u)}return o(f,"main"),f=$be(t.main,f,i,c.depths||[],l,d),f(a,c)}return o(s,"ret"),s.isTop=!0,s._setup=function(a){if(a.partial)i.protoAccessControl=a.protoAccessControl,i.helpers=a.helpers,i.partials=a.partials,i.decorators=a.decorators,i.hooks=a.hooks;else{var c={};zbe(c,e.helpers,i),zbe(c,a.helpers,i),i.helpers=c,t.usePartial&&(i.partials=i.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Bp.extend({},e.decorators,a.decorators)),i.hooks={},i.protoAccessControl=EV.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||r;Hbe.moveHelperToHooks(i,"helperMissing",l),Hbe.moveHelperToHooks(i,"blockHelperMissing",l)}},s._child=function(a,c,l,u){if(t.useBlockParams&&!l)throw new $a.default("must pass block params");if(t.useDepths&&!u)throw new $a.default("must pass parent depths");return wT(i,a,t[a],c,0,l,u)},s}o(tgt,"template");function wT(t,e,r,n,i,s,a){function c(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=a;return a&&l!=a[0]&&!(l===t.nullContext&&a[0]===null)&&(d=[l].concat(a)),r(t,l,t.helpers,t.partials,u.data||n,s&&[u.blockParams].concat(s),d)}return o(c,"prog"),c=$be(r,c,t,a,n,s),c.program=e,c.depth=a?a.length:0,c.blockParams=i||0,c}o(wT,"wrapProgram");function rgt(t,e,r){return t?typeof t!="function"&&!r.name&&(r.name=t,t=IT(r.partials,t)):r.name==="@partial-block"?t=IT(r.data,"partial-block"):t=IT(r.partials,r.name),t}o(rgt,"resolvePartial");function ngt(t,e,r){var n=IT(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==Vbe&&(function(){r.data=Tu.createFrame(r.data);var s=r.fn;i=r.data["partial-block"]=o(function(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Tu.createFrame(l.data),l.data["partial-block"]=n,s(c,l)},"partialBlockWrapper"),s.partials&&(r.partials=Bp.extend({},r.partials,s.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new $a.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}o(ngt,"invokePartial");function Vbe(){return""}o(Vbe,"noop");function IT(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}o(IT,"lookupOwnProperty");function igt(t,e){return(!e||!("root"in e))&&(e=e?Tu.createFrame(e):{},e.root=t),e}o(igt,"initData");function $be(t,e,r,n,i,s){if(t.decorator){var a={};e=t.decorator(e,a,r,n&&n[0],i,s,n),Bp.extend(e,a)}return e}o($be,"executeDecorators");function zbe(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=sgt(i,r)})}o(zbe,"addHelpers");function sgt(t,e){var r=e.lookupProperty;return Zmt.wrapHelper(t,function(n){return n.lookupProperty=r,n})}o(sgt,"passLookupPropertyOption")});var CV=g((ST,Wbe)=>{"use strict";ST.__esModule=!0;ST.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};Wbe.exports=ST.default});var Zbe=g((BT,Xbe)=>{"use strict";BT.__esModule=!0;function wV(t){return t&&t.__esModule?t:{default:t}}o(wV,"_interopRequireDefault");function IV(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}o(IV,"_interopRequireWildcard");var ogt=CT(),Jbe=IV(ogt),agt=qbe(),cgt=wV(agt),lg
Line truncated
|
|
|
|
|
`+this.lexer.showPosition()+`
|
|
|
|
|
Expecting `+se.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Ie="Parse error on line "+(f+1)+": Unexpected "+(B==1?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Ie,{text:this.lexer.match,token:this.terminals_[B]||B,line:this.lexer.yylineno,loc:E,expected:se})}}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+B);switch(N[0]){case 1:a.push(B),c.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(N[1]),B=null,k?(B=k,k=null):(h=this.lexer.yyleng,d=this.lexer.yytext,f=this.lexer.yylineno,E=this.lexer.yylloc,p>0&&p--);break;case 2:if(j=this.productions_[N[1]][1],G.$=c[c.length-j],G._$={first_line:l[l.length-(j||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(j||1)].first_column,last_column:l[l.length-1].last_column},y&&(G._$.range=[l[l.length-(j||1)].range[0],l[l.length-1].range[1]]),Q=this.performAction.call(G,d,h,f,this.yy,N[1],c,l),typeof Q<"u")return Q;j&&(a=a.slice(0,-1*j*2),c=c.slice(0,-1*j),l=l.slice(0,-1*j)),a.push(this.productions_[N[1]][0]),c.push(G.$),l.push(G._$),oe=u[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},e=(function(){var n={EOF:1,parseError:o(function(s,a){if(this.yy.parser)this.yy.parser.parseError(s,a);else throw new Error(s)},"parseError"),setInput:o(function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var a=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===l.length?this.yylloc.first_column:0)+l[l.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-a]),this},"unput"),more:o(function(){return this._more=!0,this},"more"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
|
|
|
`+a+"^"},"showPosition"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,c,l,u,d;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),h=0;h<f.length&&(c=this._input.match(this.rules[f[h]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,l=h,!this.options.flex)));h++);return a?(d=a[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],s=this.performAction.call(this,this.yy,this,f[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var s=this.next();return typeof s<"u"?s:this.lex()},"lex"),begin:o(function(s){this.conditionStack.push(s)},"begin"),popState:o(function(){return this.conditionStack.pop()},"popState"),_currentRules:o(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:o(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:o(function(s){this.begin(s)},"begin")};return n.options={},n.performAction=o(function(s,a,c,l){function u(f,h){return a.yytext=a.yytext.substring(f,a.yyleng-h+f)}o(u,"strip");var d=l;switch(c){case 0:if(a.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return o(r,"Parser"),r.prototype=t,t.Parser=r,new r})();vT.default=Agt;r0e.exports=vT.default});var xV=g(BV=>{"use strict";BV.__esModule=!0;var mgt=["Program","BlockStatement","DecoratorBlock","PartialStatement","PartialBlockStatement","Decorator","MustacheStatement","ContentStatement","CommentStatement","SubExpression","PathExpression","StringLiteral","NumberLiteral","BooleanLiteral","UndefinedLiteral","NullLiteral","Hash","HashPair"];BV.NODE_TYPES=mgt});var TT=g((RT,a0e)=>{"use strict";RT.__esModule=!0;function ggt(t){return t&&t.__esModule?t:{default:t}}o(ggt,"_interopRequireDefault");var ygt=Wo(),vV=ggt(ygt),Egt=fi(),Cgt=xV();function _T(){this.parents=[]}o(_T,"Visitor");function i0e(t,e){return Egt.indexOf(Cgt.NODE_TYPES,e)!==-1||!(e in _T.prototype)&&typeof t[e]=="function"}o(i0e,"isDispatchable");_T.prototype={constructor:_T,mutating:!1,acceptKey:o(function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!i0e(this,n.type))throw new vV.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},"acceptKey"),acceptRequired:o(function(e,r){if(this.acceptKey(e,r),!e[r])throw new vV.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:o(function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},"acceptArray"),accept:o(function(e){if(e){if(!i0e(this,e.type)||!this[e.type])throw new vV.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.tLine truncated
|
|
|
|
|
`])}),e},"merge"),each:o(function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},"each"),empty:o(function(){var e=this.currentLocation||{start:{}};return new _p(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:o(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof _p?e:(e=YV(e,this,r),new _p(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:o(function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:o(function(e){return e=e+"",myt.test(e)?H0e(e):'"'+e+'"'},"quotedString"),objectLiteral:o(function(e){var r=this,n=[];Object.keys(e).forEach(function(s){var a=YV(e[s],r);a!=="undefined"&&n.push([r.quotedString(s),":",a])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},"objectLiteral"),generateList:o(function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(YV(e[n],this));return r},"generateList"),generateArray:o(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};UT.default=z0e});var X0e=g((qT,K0e)=>{"use strict";qT.__esModule=!0;function W0e(t){return t&&t.__esModule?t:{default:t}}o(W0e,"_interopRequireDefault");var $0e=CT(),Cyt=Wo(),XV=W0e(Cyt),byt=fi(),J0e=V0e(),j0e=W0e(J0e);function ly(t){this.value=t}o(ly,"Literal");function uy(){}o(uy,"JavaScriptCompiler");uy.prototype={nameLookup:o(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:o(function(e){return[this.aliasable("container.lookup"),"(depths, ",this.quotedString(e),")"]},"depthedLookup"),compilerInfo:o(function(){var e=$0e.COMPILER_REVISION,r=$0e.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:o(function(e,r,n){return byt.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:o(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:o(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",this.quotedString(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:o(function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var s=e.opcodes,a=void 0,c=void 0,l=void 0,u=void 0;for(l=0,u=s.length;l<u;l++)a=s[l],this.source.currentLocation=a.loc,c=c||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=c,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new XV.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
|
|
|
`]),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
|
|
|
`),this.decorators.push(`}
|
|
|
|
|
`),this.decorators=this.decorators.merge()));var d=this.createFunctionContext(i);if(this.isChild)return d;var f={compiler:this.compilerInfo(),main:d};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var h=this.context,p=h.programs,m=h.decorators;for(l=0,u=p.length;l<u;l++)f[l]=p[l],m[l]&&(f[l+"_d"]=m[l],f.useDecorators=!0);return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),i?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),r.srcName?(f=f.toStringWithSourceMap({file:r.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},"compile"),preamble:o(function(){this.lastContext=0,this.source=new j0e.default(this.options.srcName),this.decorators=new j0e.default(this.options.srcName)},"preamble"),createFunctionContext:o(function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var s=0;Object.keys(this.aliases).forEach(function(l){var u=r.aliases[l];u.children&&u.referenceCount>1&&(n+=", alias"+ ++s+"="+l,u.children[0]="alias"+s)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var c=this.mergeSource(n);return e?(a.push(c),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
|
|
|
|
|
`,c,"}"])},"createFunctionContext"),mergeSource:o(function(e){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,s=void 0,a=void 0,c=void 0;return this.source.each(function(l){l.appendToBuffer?(a?l.prepend(" + "):a=l,c=l):(a&&(s?a.prepend("buffer += "):i=!0,c.add(";"),a=c=void 0),s=!0,r||(n=!1))}),n?a?(a.prepend("return "),c.add(";")):s||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),c.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
|
|
|
|
|
`)),this.source.merge()},"mergeSource"),lookupPropertyFunctionVarDeclaration:o(function(){return`
|
|
|
|
|
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
|
|
|
return parent[propertyName];
|
|
|
|
|
}
|
|
|
|
|
return undefined
|
|
|
|
|
}
|
|
|
|
|
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:o(function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},"blockValue"),ambiguousBlockValue:o(function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},"ambiguousBlockValue"),appendContent:o(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:o(function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},"append"),appendEscaped:o(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:o(function(e){this.lastContext=e},"getContext"),pushContext:o(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:o(function(e,r,n,i){var s=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[s++])):this.pushContext(),this.resolvePath("context",e,s,r,n)},"lookupOnContext"),lookupBlockParam:o(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:o(function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},"lookupData"),resolvePath:o(function(e,r,n,i,s){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(wyt(this.options.strict&&s,this,r,n,e));return}for(var c=r.length,l=o(function(d){a.replaceStack(function(f){var h=a.nameLookup(f,r[d],e);return i?[" && ",h]:[" != null ? ",h," : ",f]})},"_loop"),u=n;u<c;u++)l(u)},"resolvePath"),resolvePossibleLambda:o(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:o(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:o(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:o(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:o(function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},"popHash"),pushString:o(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:o(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:o(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:o(function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},"registerDecorator"),invokeHelper:o(function(e,r,n){var i=this.popStack(),s=this.setupHelper(e,r),a=[];n&&a.push(s.name),a.push(i),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var c=["(",this.itemsSeparatedBy(a,"||"),")"],l=this.source.functionCall(c,"call",s.callParams);this.push(l)},"invokeHelper"),itemsSeparatedBy:o(function(e,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},"itemsSeparatedBy"),invokeKnownHelper:o(function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:o(function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),s=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",s," || ",n,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("h
Line truncated
|
|
|
|
|
`,e};kr.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var s="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)s+=" "+t.blockParams[n];s+=" ]",e+=this.pad(s)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};kr.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};kr.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};kr.prototype.BlockStatement=kr.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};kr.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};kr.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};kr.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};kr.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};kr.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,s=e.length;i<s;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};kr.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};kr.prototype.StringLiteral=function(t){return'"'+t.value+'"'};kr.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};kr.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};kr.prototype.UndefinedLiteral=function(){return"UNDEFINED"};kr.prototype.NullLiteral=function(){return"NULL"};kr.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};kr.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var owe=g((zwr,swe)=>{var zT=twe().default,iwe=rwe();zT.PrintVisitor=iwe.PrintVisitor;zT.print=iwe.print;swe.exports=zT;function nwe(t,e){var r=require("fs"),n=r.readFileSync(e,"utf8");t.exports=zT.compile(n)}o(nwe,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=nwe,require.extensions[".hbs"]=nwe)});var Ewe=g(JT=>{"use strict";Object.defineProperty(JT,"__esModule",{value:!0});JT.getProxyUrl=qyt;JT.checkBypass=ywe;function qyt(t){let e=t.protocol==="https:";if(ywe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new WT(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new WT(`http://${r}`)}else return}o(qyt,"getProxyUrl");function ywe(t){if(!t.hostname)return!1;let e=t.hostname;if(Gyt(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let i=[t.hostname.toUpperCase()];typeof n=="number"&&i.push(`${i[0]}:${n}`);for(let s of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(s==="*"||i.some(a=>a===s||a.endsWith(`.${s}`)||s.startsWith(".")&&a.endsWith(`${s}`)))return!0;return!1}o(ywe,"checkBypass");function Gyt(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(Gyt,"isLoopbackAddress");var WT=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}});var bwe=g(Ar=>{"use strict";var Hyt=Ar&&Ar.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zyt=Ar&&Ar.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ZT=Ar&&Ar.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Hyt(r,e,n[i]);return zyt(r,e),
Line truncated
|
|
|
|
|
globstar while`,e,f,r,h,p),this.matchOne(e.slice(f),r.slice(h),n))return this.debug("globstar found match!",f,c,p),!0;if(p==="."||p===".."||!i.dot&&p.charAt(0)==="."){this.debug("dot detected!",e,f,r,h);break}this.debug("globstar swallow a segment, and continue"),f++}return!!(n&&(this.debug(`
|
|
|
|
|
>>> no match, partial?`,e,f,r,h),f===c))}var m;if(typeof u=="string"?(m=d===u,this.debug("string match",u,d,m)):(m=d.match(u),this.debug("pattern match",u,d,m)),!m)return!1}if(s===c&&a===l)return!0;if(s===c)return n;if(a===l)return s===c-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return cSe(this.pattern,this.options)}parse(e,r){g1(e);let n=this.options;if(e==="**")if(n.noglobstar)e="*";else return Ja;if(e==="")return"";let i="",s=!1,a=!1,c=[],l=[],u,d=!1,f=-1,h=-1,p,m,A,E=e.charAt(0)===".",y=n.dot||E,C=o(()=>E?"":y?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)","patternStart"),w=o(N=>N.charAt(0)==="."?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)","subPatternStart"),B=o(()=>{if(u){switch(u){case"*":i+=b9,s=!0;break;case"?":i+=S9,s=!0;break;default:i+="\\"+u;break}this.debug("clearStateChar %j %j",u,i),u=!1}},"clearStateChar");for(let N=0,$;N<e.length&&($=e.charAt(N));N++){if(this.debug("%s %s %s %j",e,N,i,$),a){if($==="/")return!1;sSe[$]&&(i+="\\"),i+=$,a=!1;continue}switch($){case"/":return!1;case"\\":if(d&&e.charAt(N+1)==="-"){i+=$;continue}B(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,N,i,$),d){this.debug(" in class"),$==="!"&&N===h+1&&($="^"),i+=$;continue}this.debug("call clearStateChar %j",u),B(),u=$,n.noext&&B();continue;case"(":{if(d){i+="(";continue}if(!u){i+="\\(";continue}let Q={type:u,start:N-1,reStart:i.length,open:iSe[u].open,close:iSe[u].close};this.debug(this.pattern," ",Q),c.push(Q),i+=Q.open,Q.start===0&&Q.type!=="!"&&(E=!0,i+=w(e.slice(N+1))),this.debug("plType %j %j",u,i),u=!1;continue}case")":{let Q=c[c.length-1];if(d||!Q){i+="\\)";continue}c.pop(),B(),s=!0,m=Q,i+=m.close,m.type==="!"&&l.push(Object.assign(m,{reEnd:i.length}));continue}case"|":{let Q=c[c.length-1];if(d||!Q){i+="\\|";continue}B(),i+="|",Q.start===0&&Q.type!=="!"&&(E=!0,i+=w(e.slice(N+1)));continue}case"[":if(B(),d){i+="\\"+$;continue}d=!0,h=N,f=i.length,i+=$;continue;case"]":if(N===h+1||!d){i+="\\"+$;continue}p=e.substring(h+1,N);try{RegExp("["+OCt(kCt(p))+"]"),i+=$}catch{i=i.substring(0,f)+"(?:$.)"}s=!0,d=!1;continue;default:B(),sSe[$]&&!($==="^"&&d)&&(i+="\\"),i+=$;break}}for(d&&(p=e.slice(h+1),A=this.parse(p,w9),i=i.substring(0,f)+"\\["+A[0],s=s||A[1]),m=c.pop();m;m=c.pop()){let N;N=i.slice(m.reStart+m.open.length),this.debug("setting tail",i,m),N=N.replace(/((?:\\{2}){0,64})(\\?)\|/g,(Q,G,z)=>(z||(z="\\"),G+G+z+"|")),this.debug(`tail=%j
|
|
|
|
|
%s`,N,N,m,i);let $=m.type==="*"?b9:m.type==="?"?S9:"\\"+m.type;s=!0,i=i.slice(0,m.reStart)+$+"\\("+N}B(),a&&(i+="\\\\");let k=TCt[i.charAt(0)];for(let N=l.length-1;N>-1;N--){let $=l[N],Q=i.slice(0,$.reStart),G=i.slice($.reStart,$.reEnd-8),z=i.slice($.reEnd),j=i.slice($.reEnd-8,$.reEnd)+z,oe=Q.split(")").length,se=Q.split("(").length-oe,Ie=z;for(let he=0;he<se;he++)Ie=Ie.replace(/\)[+*?]?/,"");z=Ie;let J=z===""&&r!==w9?"(?:$|\\/)":"";i=Q+G+z+J+j}if(i!==""&&s&&(i="(?=.)"+i),k&&(i=C()+i),r===w9)return[i,s];if(n.nocase&&!s&&(s=e.toUpperCase()!==e.toLowerCase()),!s)return QCt(e);let F=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",F),{_glob:e,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?b9:r.dot?_Ct:RCt,i=r.nocase?"i":"",s=e.map(a=>(a=a.map(c=>typeof c=="string"?PCt(c):c===Ja?Ja:c._src).reduce((c,l)=>(c[c.length-1]===Ja&&l===Ja||c.push(l),c),[]),a.forEach((c,l)=>{c!==Ja||a[l-1]===Ja||(l===0?a.length>1?a[l+1]="(?:\\/|"+n+"\\/)?"+a[l+1]:a[l]=n:l===a.length-1?a[l-1]+="(?:\\/|"+n+")?":(a[l-1]+="(?:\\/|\\/"+n+"\\/)"+a[l+1],a[l+1]=Ja))}),a.filter(c=>c!==Ja).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,i)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;I9.sep!=="/"&&(e=e.split(I9.sep).join("/")),e=e.split(oSe),this.debug(this.pattern,"split",e);let i=this.set;this.debug(this.pattern,"set",i);let s;for(let a=e.length-1;a>=0&&(s=e[a],!s);a--);for(let a=0;a<i.length;a++){let c=i[a],l=e;if(n.matchBase&&c.length===1&&(l=[s]),this.matchOne(l,c,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return so.defaults(e).Minimatch}};so.Minimatch=Sy});var pSe=g(($xr,hSe)=>{hSe.exports=fSe;var v9=require("fs"),{EventEmitter:LCt}=require("events"),{Minimatch:x9}=lSe(),{resolve:MCt}=require("path");function FCt(t,e){return new Promise((r,n)=>{v9.readdir(t,{withFileTypes:!0},(i,s)=>{if(i)switch(i.code){case"ENOTDIR":e?n(i):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:n(i);break}else r(s)})})}o(FCt,"readdir");function uSe(t,e){return new Promise((r,n)=>{(e?v9.stat:v9.lstat)(t,(s,a)=>{s?s.code==="ENOENT"?r(e?uSe(t,!1):null):r(null):r(a)})})}o(uSe,"stat");async function*dSe(t,e,r,n,i,s){let a=await FCt(e+t,s);for(let c of a){let l=c.name;l===void 0&&(l=c,n=!0);let u=t+"/"+l,d=u.slice(1),f=e+"/"+d,h=null;(n||r)&&(h=await uSe(f,r)),!h&&c.name!==void 0&&(h=c),h===null&&(h={isDirectory:o(()=>!1,"isDirectory")}),h.isDirectory()?i(d)||(yield{relative:d,absolute:f,stats:h},yield*dSe(u,e,r,n,i,!1)):yield{relative:d,absolute:f,stats:h}}}o(dSe,"exploreWalkAsync");async function*UCt(t,e,r,n){yield*dSe("",t,e,r,n,!0)}o(UCt,"explore");function qCt(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}o(qCt,"readOptions");var y1=class extends LCt{static{o(this,"ReaddirGlob")}constructor(e,r,n){if(super(),typeof r=="function"&&(n=r,r=null),this.options=qCt(r||{}),this.matchers=[],this.options.pattern){let i=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=i.map(s=>new x9(s,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let i=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=i.map(s=>new x9(s,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let i=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=i.map(s=>new x9(s,{dot:!0}))}this.iterator=UCt(MCt(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",i=>this._matches.push(this.options.absolute?i.absolute:i.relative)),this.on("error",i=>n(i)),this.on("end",()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let n=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(i=>i.match(n)))&&!this.ignoreMatchers.some(i=>i.match(n))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let n=e.value.relative,i=e.value.absolute;this.options.mark&&r&&(n+="/",i+="/"),this.options.stat?this.emit("match",{relative:n,absolute:i,stat:e.value.stats}):this.emit("match",{relative:n,
Line truncated
|
|
|
|
|
`,S);S=P===-1?I.length:P}else if(R!==-1&&I[S]==="/"&&I[S+1]==="*"){let P=I.indexOf("*/",S);P!==-1?(S=P+2,R=I.indexOf("*/",S)):(b+=I[S],S++)}else b+=I[S],S++;return b}o(gC,"stripComments");function fB(I){let b=gC(I.toString()),S=b.match(mO);if(S||(S=b.match(uB)),!S)throw new Error(`could not parse args in autoInject
|
|
|
|
|
Source:
|
|
|
|
|
`+b);let[,R]=S;return R.replace(/\s/g,"").split(dB).map(P=>P.replace(mC,"").trim())}o(fB,"parseParams");function FA(I,b){var S={};return Object.keys(I).forEach(R=>{var P=I[R],L,U=p(P),H=!U&&P.length===1||U&&P.length===0;if(Array.isArray(P))L=[...P],P=L.pop(),S[R]=L.concat(L.length>0?W:P);else if(H)S[R]=P;else{if(L=fB(P),P.length===0&&!U&&L.length===0)throw new Error("autoInject task functions require explicit parameters.");U||L.pop(),S[R]=L.concat(W)}function W(we,gt){var vt=L.map(Ct=>we[Ct]);vt.push(gt),E(P)(...vt)}o(W,"newTask")}),AC(S,b)}o(FA,"autoInject");class hB{static{o(this,"DLL")}constructor(){this.head=this.tail=null,this.length=0}removeLink(b){return b.prev?b.prev.next=b.next:this.head=b.next,b.next?b.next.prev=b.prev:this.tail=b.prev,b.prev=b.next=null,this.length-=1,b}empty(){for(;this.head;)this.shift();return this}insertAfter(b,S){S.prev=b,S.next=b.next,b.next?b.next.prev=S:this.tail=S,b.next=S,this.length+=1}insertBefore(b,S){S.prev=b.prev,S.next=b,b.prev?b.prev.next=S:this.head=S,b.prev=S,this.length+=1}unshift(b){this.head?this.insertBefore(this.head,b):yC(this,b)}push(b){this.tail?this.insertAfter(this.tail,b):yC(this,b)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var b=this.head;b;)yield b.data,b=b.next}remove(b){for(var S=this.head;S;){var{next:R}=S;b(S)&&this.removeLink(S),S=R}return this}}function yC(I,b){I.length=1,I.head=I.tail=b}o(yC,"setInitial");function UA(I,b,S){if(b==null)b=1;else if(b===0)throw new RangeError("Concurrency must not be zero");var R=E(I),P=0,L=[];let U={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function H(Qe,be){U[Qe].push(be)}o(H,"on");function W(Qe,be){let ke=o((...bt)=>{we(Qe,ke),be(...bt)},"handleAndRemove");U[Qe].push(ke)}o(W,"once");function we(Qe,be){if(!Qe)return Object.keys(U).forEach(ke=>U[ke]=[]);if(!be)return U[Qe]=[];U[Qe]=U[Qe].filter(ke=>ke!==be)}o(we,"off");function gt(Qe,...be){U[Qe].forEach(ke=>ke(...be))}o(gt,"trigger");var vt=!1;function Ct(Qe,be,ke,bt){if(bt!=null&&typeof bt!="function")throw new Error("task callback must be a function");Nt.started=!0;var cr,Bn;function mo(nh,...BC){if(nh)return ke?Bn(nh):cr();if(BC.length<=1)return cr(BC[0]);cr(BC)}o(mo,"promiseCallback");var zA=Nt._createTaskItem(Qe,ke?mo:bt||mo);if(be?Nt._tasks.unshift(zA):Nt._tasks.push(zA),vt||(vt=!0,u(()=>{vt=!1,Nt.process()})),ke||!bt)return new Promise((nh,BC)=>{cr=nh,Bn=BC})}o(Ct,"_insert");function Ao(Qe){return function(be,...ke){P-=1;for(var bt=0,cr=Qe.length;bt<cr;bt++){var Bn=Qe[bt],mo=L.indexOf(Bn);mo===0?L.shift():mo>0&&L.splice(mo,1),Bn.callback(be,...ke),be!=null&>("error",be,Bn.data)}P<=Nt.concurrency-Nt.buffer&>("unsaturated"),Nt.idle()&>("drain"),Nt.process()}}o(Ao,"_createCB");function HA(Qe){return Qe.length===0&&Nt.idle()?(u(()=>gt("drain")),!0):!1}o(HA,"_maybeDrain");let rh=o(Qe=>be=>{if(!be)return new Promise((ke,bt)=>{W(Qe,(cr,Bn)=>{if(cr)return bt(cr);ke(Bn)})});we(Qe),H(Qe,be)},"eventMethod");var SC=!1,Nt={_tasks:new hB,_createTaskItem(Qe,be){return{data:Qe,callback:be}},*[Symbol.iterator](){yield*Nt._tasks[Symbol.iterator]()},concurrency:b,payload:S,buffer:b/4,started:!1,paused:!1,push(Qe,be){return Array.isArray(Qe)?HA(Qe)?void 0:Qe.map(ke=>Ct(ke,!1,!1,be)):Ct(Qe,!1,!1,be)},pushAsync(Qe,be){return Array.isArray(Qe)?HA(Qe)?void 0:Qe.map(ke=>Ct(ke,!1,!0,be)):Ct(Qe,!1,!0,be)},kill(){we(),Nt._tasks.empty()},unshift(Qe,be){return Array.isArray(Qe)?HA(Qe)?void 0:Qe.map(ke=>Ct(ke,!0,!1,be)):Ct(Qe,!0,!1,be)},unshiftAsync(Qe,be){return Array.isArray(Qe)?HA(Qe)?void 0:Qe.map(ke=>Ct(ke,!0,!0,be)):Ct(Qe,!0,!0,be)},remove(Qe){Nt._tasks.remove(Qe)},process(){if(!SC){for(SC=!0;!Nt.paused&&P<Nt.concurrency&&Nt._tasks.length;){var Qe=[],be=[],ke=Nt._tasks.length;Nt.payload&&(ke=Math.min(ke,Nt.payload));for(var bt=0;bt<ke;bt++){var cr=Nt._tasks.shift();Qe.push(cr),L.push(cr),be.push(cr.data)}P+=1,Nt._tasks.length===0&>("empty"),P===Nt.concurrency&>("saturated");var Bn=oe(Ao(Qe));R(be,Bn)}SC=!1}},length(){return Nt._tasks.length},running(){return P},workersList(){return L},idle(){return Nt._tasks.length+P===0},pause(){Nt.paused=!0},resume(){Nt.paused!==!1&&(Nt.paused=!1,u(Nt.process))}};return Object.defineProperties(Nt,{saturated:{writable:!1,value:rh("saturated")},unsaturated:{writable:!1,value:rh("unsaturated")},empty:{writable:!1,value:rh("empty")},drain:{writable:!1,value:rh("drain")},error:{writable:!1,value:rh("error")}}),Nt}o(UA,"queue$1");function qA(I,b){return UA(I,1,b)}o(qA,"cargo$1");function _s(I,b,S){return UA(I,b,S)}o(_s,"cargo");function pB(I,b,S,R){R=N(R);var P=E(S);return ii(I,(L,U,H)=>{P(b,L,(W,we)=>{b=we,H(W)})},L=>R(L,b))}o(pB,"reduce");var ya=y(pB,4);function EC(...I){var b=I.map(E);return function(...S){var R=this,P=S[S.length-1];return typeof P=="function"?S.pop():P=ud(),ya(b,S,(L,U,H)=>{U.apply(R,L.concat((W,...we)=>{H(W,we)}))},(L,U)=>P(L,...U)),P[$l]}}o(EC,"seq");function Ce(...I){return EC(...I.revers
Line truncated
|
|
|
|
|
GFS4: `),console.error(t)},"debug"));Cr[Xn]||(SSe=global[Xn]||[],xSe(Cr,SSe),Cr.close=(function(t){function e(r,n){return t.call(Cr,r,function(i){i||BSe(),typeof n=="function"&&n.apply(this,arguments)})}return o(e,"close"),Object.defineProperty(e,I1,{value:t}),e})(Cr.close),Cr.closeSync=(function(t){function e(r){t.apply(Cr,arguments),BSe()}return o(e,"closeSync"),Object.defineProperty(e,I1,{value:t}),e})(Cr.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Lp(Cr[Xn]),require("assert").equal(Cr[Xn].length,0)}));var SSe;global[Xn]||xSe(global,Cr[Xn]);T9.exports=_9(YCt(Cr));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Cr.__patched&&(T9.exports=_9(Cr),Cr.__patched=!0);function _9(t){WCt(t),t.gracefulify=_9,t.createReadStream=k,t.createWriteStream=F;var e=t.readFile;t.readFile=r;function r(Q,G,z){return typeof G=="function"&&(z=G,G=null),j(Q,G,z);function j(oe,se,Ie,J){return e(oe,se,function(he){he&&(he.code==="EMFILE"||he.code==="ENFILE")?By([j,[oe,se,Ie],he,J||Date.now(),Date.now()]):typeof Ie=="function"&&Ie.apply(this,arguments)})}o(j,"go$readFile")}o(r,"readFile");var n=t.writeFile;t.writeFile=i;function i(Q,G,z,j){return typeof z=="function"&&(j=z,z=null),oe(Q,G,z,j);function oe(se,Ie,J,he,Tt){return n(se,Ie,J,function(yt){yt&&(yt.code==="EMFILE"||yt.code==="ENFILE")?By([oe,[se,Ie,J,he],yt,Tt||Date.now(),Date.now()]):typeof he=="function"&&he.apply(this,arguments)})}o(oe,"go$writeFile")}o(i,"writeFile");var s=t.appendFile;s&&(t.appendFile=a);function a(Q,G,z,j){return typeof z=="function"&&(j=z,z=null),oe(Q,G,z,j);function oe(se,Ie,J,he,Tt){return s(se,Ie,J,function(yt){yt&&(yt.code==="EMFILE"||yt.code==="ENFILE")?By([oe,[se,Ie,J,he],yt,Tt||Date.now(),Date.now()]):typeof he=="function"&&he.apply(this,arguments)})}o(oe,"go$appendFile")}o(a,"appendFile");var c=t.copyFile;c&&(t.copyFile=l);function l(Q,G,z,j){return typeof z=="function"&&(j=z,z=0),oe(Q,G,z,j);function oe(se,Ie,J,he,Tt){return c(se,Ie,J,function(yt){yt&&(yt.code==="EMFILE"||yt.code==="ENFILE")?By([oe,[se,Ie,J,he],yt,Tt||Date.now(),Date.now()]):typeof he=="function"&&he.apply(this,arguments)})}o(oe,"go$copyFile")}o(l,"copyFile");var u=t.readdir;t.readdir=f;var d=/^v[0-5]\./;function f(Q,G,z){typeof G=="function"&&(z=G,G=null);var j=d.test(process.version)?o(function(Ie,J,he,Tt){return u(Ie,oe(Ie,J,he,Tt))},"go$readdir"):o(function(Ie,J,he,Tt){return u(Ie,J,oe(Ie,J,he,Tt))},"go$readdir");return j(Q,G,z);function oe(se,Ie,J,he){return function(Tt,yt){Tt&&(Tt.code==="EMFILE"||Tt.code==="ENFILE")?By([j,[se,Ie,J],Tt,he||Date.now(),Date.now()]):(yt&&yt.sort&&yt.sort(),typeof J=="function"&&J.call(this,Tt,yt))}}}if(o(f,"readdir"),process.version.substr(0,4)==="v0.8"){var h=JCt(t);y=h.ReadStream,w=h.WriteStream}var p=t.ReadStream;p&&(y.prototype=Object.create(p.prototype),y.prototype.open=C);var m=t.WriteStream;m&&(w.prototype=Object.create(m.prototype),w.prototype.open=B),Object.defineProperty(t,"ReadStream",{get:o(function(){return y},"get"),set:o(function(Q){y=Q},"set"),enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:o(function(){return w},"get"),set:o(function(Q){w=Q},"set"),enumerable:!0,configurable:!0});var A=y;Object.defineProperty(t,"FileReadStream",{get:o(function(){return A},"get"),set:o(function(Q){A=Q},"set"),enumerable:!0,configurable:!0});var E=w;Object.defineProperty(t,"FileWriteStream",{get:o(function(){return E},"get"),set:o(function(Q){E=Q},"set"),enumerable:!0,configurable:!0});function y(Q,G){return this instanceof y?(p.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}o(y,"ReadStream");function C(){var Q=this;$(Q.path,Q.flags,Q.mode,function(G,z){G?(Q.autoClose&&Q.destroy(),Q.emit("error",G)):(Q.fd=z,Q.emit("open",z),Q.read())})}o(C,"ReadStream$open");function w(Q,G){return this instanceof w?(m.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}o(w,"WriteStream");function B(){var Q=this;$(Q.path,Q.flags,Q.mode,function(G,z){G?(Q.destroy(),Q.emit("error",G)):(Q.fd=z,Q.emit("open",z))})}o(B,"WriteStream$open");function k(Q,G){return new t.ReadStream(Q,G)}o(k,"createReadStream");function F(Q,G){return new t.WriteStream(Q,G)}o(F,"createWriteStream");var N=t.open;t.open=$;function $(Q,G,z,j){return typeof z=="function"&&(j=z,z=null),oe(Q,G,z,j);function oe(se,Ie,J,he,Tt){return N(se,Ie,J,function(yt,or){yt&&(yt.code==="EMFILE"||yt.code==="ENFILE")?By([oe,[se,Ie,J,he],yt,Tt||Date.now(),Date.now()]):typeof he=="function"&&he.apply(this,arguments)})}o(oe,"go$open")}return o($,"open"),t}o(_9,"patch");function By(t){Lp("ENQUEUE",t[0].name,t[1]),Cr[Xn].push(t),R9()}o(By,"enqueue");var w1;function BSe(){for(var t=Date.now(),e=0;e<Cr[Xn].length;++e)Cr[Xn][e].length>2&&(Cr[Xn][e][3]=t,Cr[Xn][e][4]=t);R9()}o(BSe,"resetQueue");function R9(){if(clearTimeout(w1),w1=void 0,Cr[Xn].length!==0){var t=Cr[Xn].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=t[4];if(i===void 0)Lp("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){Lp("TIMEOUT",e.n
Line truncated
|
|
|
|
|
`;super(r),this.name="AggregateError",this.errors=e}};g$.exports={AggregateError:m$,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:o(function(){let t,e;return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}},"createDeferredPromise"),promisify(t){return new Promise((e,r)=>{t((n,...i)=>n?r(n):e(...i))})},debuglog(){return function(){}},format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction(t){return t instanceof QSt},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:kSt,deprecate(t,e){return t},addAbortListener:require("events").addAbortListener||o(function(e,r){if(e===void 0)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);E2e(e,"signal"),PSt(r,"listener");let n;return e.aborted?queueMicrotask(()=>r()):(e.addEventListener("abort",r,{__proto__:null,once:!0,[_St]:!0}),n=o(()=>{e.removeEventListener("abort",r)},"removeEventListener")),{__proto__:null,[RSt](){var i;(i=n)===null||i===void 0||i()}}},"addAbortListener"),AbortSignalAny:TSt.any||o(function(e){if(e.length===1)return e[0];let r=new DSt,n=o(()=>r.abort(),"abort");return e.forEach(i=>{E2e(i,"signals"),i.addEventListener("abort",n,{once:!0})}),r.signal.addEventListener("abort",()=>{e.forEach(i=>i.removeEventListener("abort",n))},{once:!0}),r.signal},"AbortSignalAny")};g$.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var zi=g((lNr,w2e)=>{"use strict";var{format:OSt,inspect:$1,AggregateError:LSt}=Ai(),MSt=globalThis.AggregateError||LSt,FSt=Symbol("kIsNodeError"),USt=["string","function","number","object","Function","Object","boolean","bigint","symbol"],qSt=/^([A-Z][a-z0-9]*)+$/,GSt="__node_internal_",j1={};function Up(t,e){if(!t)throw new j1.ERR_INTERNAL_ASSERTION(e)}o(Up,"assert");function C2e(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}o(C2e,"addNumericalSeparator");function HSt(t,e,r){if(typeof e=="function")return Up(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return Up(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:OSt(e,...r)}o(HSt,"getMessage");function ei(t,e,r){r||(r=Error);class n extends r{static{o(this,"NodeError")}constructor(...s){super(HSt(t,e,s))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[FSt]=!0,j1[t]=n}o(ei,"E");function b2e(t){let e=GSt+t.name;return Object.defineProperty(t,"name",{value:e}),t}o(b2e,"hideStackFrames");function zSt(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new MSt([e,t],e.message);return r.code=e.code,r}return t||e}o(zSt,"aggregateTwoErrors");var y$=class extends Error{static{o(this,"AbortError")}constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new j1.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};ei("ERR_ASSERTION","%s",Error);ei("ERR_INVALID_ARG_TYPE",(t,e,r)=>{Up(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";let i=[],s=[],a=[];for(let l of e)Up(typeof l=="string","All expected entries have to be of type string"),USt.includes(l)?i.push(l.toLowerCase()):qSt.test(l)?s.push(l):(Up(l!=="object",'The value "object" should be written as "Object"'),a.push(l));if(s.length>0){let l=i.indexOf("object");l!==-1&&(i.splice(i,l,1),s.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{let l=i.pop();n+=`one of type ${i.join(", ")}, or ${l}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{let l=s.pop();n+=`an instance of ${s.join(", ")}, or ${l}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+Line truncated
|
|
|
|
|
`)),e.linkname&&(r+=WW(" linkpath="+e.linkname+`
|
|
|
|
|
`));let n=e.pax;if(n)for(let i in n)r+=WW(" "+i+"="+n[i]+`
|
|
|
|
|
`);return Bt.from(r)},"encodePax");pE.decodePax=o(function(e){let r={};for(;e.length;){let n=0;for(;n<e.length&&e[n]!==32;)n++;let i=parseInt(Bt.toString(e.subarray(0,n)),10);if(!i)return r;let s=Bt.toString(e.subarray(n+1,i-1)),a=s.indexOf("=");if(a===-1)return r;r[s.slice(0,a)]=s.slice(a+1),e=e.subarray(i)}return r},"decodePax");pE.encode=o(function(e){let r=Bt.alloc(512),n=e.name,i="";if(e.typeflag===5&&n[n.length-1]!=="/"&&(n+="/"),Bt.byteLength(n)!==n.length)return null;for(;Bt.byteLength(n)>100;){let s=n.indexOf("/");if(s===-1)return null;i+=i?"/"+n.slice(0,s):n.slice(0,s),n=n.slice(s+1)}return Bt.byteLength(n)>100||Bt.byteLength(i)>155||e.linkname&&Bt.byteLength(e.linkname)>100?null:(Bt.write(r,n),Bt.write(r,Nf(e.mode&okt,6),100),Bt.write(r,Nf(e.uid,6),108),Bt.write(r,Nf(e.gid,6),116),hkt(e.size,r,124),Bt.write(r,Nf(e.mtime.getTime()/1e3|0,11),136),r[156]=IQ+dkt(e.type),e.linkname&&Bt.write(r,e.linkname,157),Bt.copy(bDe,r,fS),Bt.copy(nkt,r,JW),e.uname&&Bt.write(r,e.uname,265),e.gname&&Bt.write(r,e.gname,297),Bt.write(r,Nf(e.devmajor||0,6),329),Bt.write(r,Nf(e.devminor||0,6),337),i&&Bt.write(r,i,345),Bt.write(r,Nf(IDe(r),6),148),r)},"encode");pE.decode=o(function(e,r,n){let i=e[156]===0?0:e[156]-IQ,s=hE(e,0,100,r),a=vf(e,100,8),c=vf(e,108,8),l=vf(e,116,8),u=vf(e,124,12),d=vf(e,136,12),f=ukt(i),h=e[157]===0?null:hE(e,157,100,r),p=hE(e,265,32),m=hE(e,297,32),A=vf(e,329,8),E=vf(e,337,8),y=IDe(e);if(y===256)return null;if(y!==vf(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(akt(e))e[345]&&(s=hE(e,345,155,r)+"/"+s);else if(!ckt(e)){if(!n)throw new Error("Invalid tar header: unknown format.")}return i===0&&s&&s[s.length-1]==="/"&&(i=5),{name:s,mode:a,uid:c,gid:l,size:u,mtime:new Date(1e3*d),type:f,linkname:h,uname:p,gname:m,devmajor:A,devminor:E,pax:null}},"decode");function akt(t){return Bt.equals(bDe,t.subarray(fS,fS+6))}o(akt,"isUSTAR");function ckt(t){return Bt.equals(ikt,t.subarray(fS,fS+6))&&Bt.equals(skt,t.subarray(JW,JW+2))}o(ckt,"isGNU");function lkt(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}o(lkt,"clamp");function ukt(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}o(ukt,"toType");function dkt(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}o(dkt,"toTypeflag");function wDe(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n}o(wDe,"indexOf");function IDe(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}o(IDe,"cksum");function Nf(t,e){return t=t.toString(8),t.length>e?rkt.slice(0,e)+" ":tkt.slice(0,e-t.length)+t+" "}o(Nf,"encodeOct");function fkt(t,e,r){e[r]=128;for(let n=11;n>0;n--)e[r+n]=t&255,t=Math.floor(t/256)}o(fkt,"encodeSizeBin");function hkt(t,e,r){t.toString(8).length>11?fkt(t,e,r):Bt.write(e,Nf(t,11),r)}o(hkt,"encodeSize");function pkt(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let r=[],n;for(n=t.length-1;n>0;n--){let a=t[n];e?r.push(a):r.push(255-a)}let i=0,s=r.length;for(n=0;n<s;n++)i+=r[n]*Math.pow(256,n);return e?i:-1*i}o(pkt,"parse256");function vf(t,e,r){if(t=t.subarray(e,e+r),e=0,t[e]&128)return pkt(t);{for(;e<t.length&&t[e]===32;)e++;let n=lkt(wDe(t,32,e,t.length),t.length,t.length);for(;e<n&&t[e]===0;)e++;return n===e?0:parseInt(Bt.toString(t.subarray(e,n)),8)}}o(vf,"decodeOct");function hE(t,e,r,n){return Bt.toString(t.subarray(e,wDe(t,0,e,e+r)),n)}o(hE,"decodeStr");function WW(t){let e=Bt.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t}o(WW,"addLength")});var NDe=g((m1r,vDe)=>{var{Writable:Akt,Readable:mkt,getStreamError:SDe}=jW(),gkt=TW(),BDe=wQ(),AE=YW(),ykt=BDe.alloc(0),XW=class{static{o(this,"BufferList")}constructor(){this.buffered=0,this.shifted=0,this.queue=new gkt,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return ykt;let r=this._next(e);if(e===r.byteLength)return r;let n=[r];for(;(e-=r.byteLength)>0;)r=this._next(e),n.push(r);return BDe.concat(n)}_next(e){let r=this.queue.peek(),n=r.byteLength-this._offset;if(e>=n){let i=this._offset?r.subarray(this._offset,r.byteLength):r;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,i}return this.buffered-=e,this.shifted+=e,r.subarray(this._offset,this._offset+=e)}},ZW=class extends mkt{static{o(this,"Source")}constructor(e,r,n){super(),this.header=r,this.offset=n,this._parent=e}_
Line truncated
|
|
|
|
|
`).join(`
|
|
|
|
|
`+s),t.push(i+"m+"+_k.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=bqt()+e+" "+t[0]}o(Cqt,"formatArgs");function bqt(){return Gn.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(bqt,"getDate");function wqt(...t){return process.stderr.write(Nk.formatWithOptions(Gn.inspectOpts,...t)+`
|
|
|
|
|
`)}o(wqt,"log");function Iqt(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(Iqt,"save");function Sqt(){return process.env.DEBUG}o(Sqt,"load");function Bqt(t){t.inspectOpts={};let e=Object.keys(Gn.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Gn.inspectOpts[e[r]]}o(Bqt,"init");_k.exports=kY()(Gn);var{formatters:_Oe}=_k.exports;_Oe.o=function(t){return this.inspectOpts.colors=this.useColors,Nk.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};_Oe.O=function(t){return this.inspectOpts.colors=this.useColors,Nk.inspect(t,this.inspectOpts)}});var OY=g((POr,PY)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?PY.exports=NOe():PY.exports=ROe()});var Tk=g(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.DownloadHTTPError=Lr.DownloadLengthMismatchError=Lr.DownloadError=Lr.ExpiredMetadataError=Lr.EqualVersionError=Lr.BadVersionError=Lr.RepositoryError=Lr.PersistError=Lr.RuntimeError=Lr.ValueError=void 0;var LY=class extends Error{static{o(this,"ValueError")}};Lr.ValueError=LY;var MY=class extends Error{static{o(this,"RuntimeError")}};Lr.RuntimeError=MY;var FY=class extends Error{static{o(this,"PersistError")}};Lr.PersistError=FY;var PS=class extends Error{static{o(this,"RepositoryError")}};Lr.RepositoryError=PS;var Rk=class extends PS{static{o(this,"BadVersionError")}};Lr.BadVersionError=Rk;var UY=class extends Rk{static{o(this,"EqualVersionError")}};Lr.EqualVersionError=UY;var qY=class extends PS{static{o(this,"ExpiredMetadataError")}};Lr.ExpiredMetadataError=qY;var OS=class extends Error{static{o(this,"DownloadError")}};Lr.DownloadError=OS;var GY=class extends OS{static{o(this,"DownloadLengthMismatchError")}};Lr.DownloadLengthMismatchError=GY;var HY=class extends OS{static{o(this,"DownloadHTTPError")}statusCode;constructor(e,r){super(e),this.statusCode=r}};Lr.DownloadHTTPError=HY});var DOe=g(qE=>{"use strict";var VY=qE&&qE.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qE,"__esModule",{value:!0});qE.withTempFile=void 0;var zY=VY(require("fs/promises")),xqt=VY(require("os")),TOe=VY(require("path")),vqt=o(async t=>Nqt(async e=>t(TOe.default.join(e,"tempfile"))),"withTempFile");qE.withTempFile=vqt;var Nqt=o(async t=>{let e=await zY.default.realpath(xqt.default.tmpdir()),r=await zY.default.mkdtemp(e+TOe.default.sep);try{return await t(r)}finally{await zY.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}},"withTempDir")});var kOe=g((UOr,QOe)=>{var $Y=class{static{o(this,"RetryOperation")}#e=1;#r=null;#n=[];#t=null;#i;#s=null;#l;#a;#c=null;#o;constructor(e,r={}){this.#l=[...e],this.#a=[...e],this.#o=r.unref,this.#i=r.maxRetryTime||1/0,r.forever&&(this.#r=[...this.#a])}get timeouts(){return[...this.#a]}get errors(){return[...this.#n]}get attempts(){return this.#e}get mainError(){let e=null;if(this.#n.length){let r=0,n={};for(let i=0;i<this.#n.length;i++){let s=this.#n[i],{message:a}=s;n[a]||(n[a]=0),n[a]++,n[a]>=r&&(e=s,r=n[a])}}return e}reset(){this.#e=1,this.#a=[...this.#l]}stop(){this.#c&&clearTimeout(this.#c),this.#a=[],this.#r=null}retry(e){if(this.#n.push(e),new Date().getTime()-this.#s>=this.#i)return this.#n.unshift(new Error("RetryOperation timeout occurred")),!1;let r=this.#a.shift();if(r===void 0)if(this.#r)this.#n.pop(),r=this.#r.at(-1);else return!1;return this.#c=setTimeout(()=>{this.#e++,this.#t(this.#e)},r),this.#o&&this.#c.unref(),!0}attempt(e){this.#t=e,this.#s=new Date().getTime(),this.#t(this.#e)}};QOe.exports={RetryOperation:$Y}});var LOe=g((GOr,OOe)=>{var{RetryOperation:_qt}=kOe(),POe=o((t,e)=>Math.min(Math.round((1+(e.randomize?Math.random():0))*Math.max(e.minTimeout,1)*Math.pow(e.factor,t)),e.maxTimeout),"createTimeout"),Rqt=o(t=>t?.code==="EPROMISERETRY"&&Object.hasOwn(t,"retried"),"isRetryError"),Tqt=o(async(t,e={})=>{let r=[];if(e instanceof Array)r=[...e];else{e.retries===1/0&&(e.forever=!0,delete e.retries);let i={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1,...e};if(i.minTimeout>i.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");if(i.retries){for(let s=0;s<i.retries;s++)r.push(POe(s,i));r.sort((s,a)=>s-a)}else e.forever&&r.push(POe(0,i))}let n=new _qt(r,{forever:e.forever,unref:e.unref,maxRetryTime:e.maxRetryTime});return new Promise(function(i,s){n.attempt(async a=>{try{let c=await t(l=>{throw Object.assign(new Error("Retrying"),{code:"EPROMISERETRY",retried:l})},a,n);return i(c)}catch(c){if(!Rqt(c))return s(c);if(!n.retry(c.retried||new Error))return s(c.retried)}})})},"promiseRetry");OOe.exports={promiseRetry:Tqt}});var JY=g(Gf=>{"use strict";var WY=Gf&&Gf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Gf,"__esModule",{value:!0});Gf.DefaultFetcher=Gf.BaseFetcher=void 0;var Dqt=WY(OY()),MOe=WY(require("fs")),Qqt=WY(require("util")),FOe=Tk(),kqt=DOe(),Pqt=LOe(),Oqt=(0,Dqt.default)("tuf:fetch"),Lqt="User-Agent",Dk=class{static{o(this,"BaseFetcher")}async downloadFile(e,r,n){return(0,kqt.withTempFile)(async i=>{let s=await this.fetch(e),a=0,c=MOe.default.createWriteStream(i),l=s.getReader();try{for(;;){let{done:u,value:d}=await l.read();if(u)break;if(a+=d.length,a>r)throw new FOe.DownloadLengthMismatchError("Max length reached");await Mqt(c,Buffer.from(d))}}finally{l.releaseLock(),await Qqt.default.promisify(c.close).bind(c)()}return n(i)})}async downloadBytes(e,r){return this.downloadFile(e,r,async n=>{let i=MOe.defau
Line truncated
|
|
|
|
|
`).forEach(r=>{r.match(H3t)||r.match(z3t)||(e+=r)}),Buffer.from(e,"base64")}o(V3t,"toDER");function $3t(t,e="CERTIFICATE"){let n=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...n,`-----END ${e}-----`].join(`
|
|
|
|
|
`).concat(`
|
|
|
|
|
`)}o($3t,"fromDER")});var Wk=g(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.SHA2_HASH_ALGOS=jf.RSA_SIGNATURE_ALGOS=jf.ECDSA_SIGNATURE_ALGOS=void 0;jf.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};jf.RSA_SIGNATURE_ALGOS={"1.2.840.113549.1.1.14":"sha224","1.2.840.113549.1.1.11":"sha256","1.2.840.113549.1.1.12":"sha384","1.2.840.113549.1.1.13":"sha512"};jf.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var E7=g(Jk=>{"use strict";Object.defineProperty(Jk,"__esModule",{value:!0});Jk.RFC3161TimestampVerificationError=void 0;var y7=class extends Error{static{o(this,"RFC3161TimestampVerificationError")}};Jk.RFC3161TimestampVerificationError=y7});var ALe=g(Pl=>{"use strict";var j3t=Pl&&Pl.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),W3t=Pl&&Pl.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),J3t=Pl&&Pl.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&j3t(r,e,n[i]);return W3t(r,e),r}})();Object.defineProperty(Pl,"__esModule",{value:!0});Pl.TSTInfo=void 0;var pLe=J3t(jE()),Y3t=Wk(),K3t=E7(),C7=class{static{o(this,"TSTInfo")}root;constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return Y3t.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=pLe.digest(this.messageImprintHashAlgorithm,e);if(!pLe.bufferEqual(r,this.messageImprintHashedMessage))throw new K3t.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};Pl.TSTInfo=C7});var gLe=g(Ol=>{"use strict";var X3t=Ol&&Ol.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Z3t=Ol&&Ol.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),eGt=Ol&&Ol.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&X3t(r,e,n[i]);return Z3t(r,e),r}})();Object.defineProperty(Ol,"__esModule",{value:!0});Ol.RFC3161Timestamp=void 0;var tGt=Vk(),b7=eGt(jE()),mLe=Wk(),GS=E7(),rGt=ALe(),nGt="1.2.840.113549.1.7.2",iGt="1.2.840.113549.1.9.16.1.4",sGt="1.2.840.113549.1.9.4",w7=class t{static{o(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}static parse(e){let r=tGt.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return mLe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return mLe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new rGt.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new GS.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==nGt)throw new GS.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==iGt)throw new GS.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=b7.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].valu
Line truncated
|
|
|
|
|
|
|
|
|
|
`,B4t=/\u2014 (\S+) (\S+)\n/g;function x4t(t,e){let r=t.inclusionProof,n=X7.fromString(r.checkpoint.envelope),i=AP.fromString(n.note);if(!v4t(n,e))throw new eC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return i}o(x4t,"verifyCheckpoint");function v4t(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let i=e.find(s=>KLe.crypto.bufferEqual(s.logID.subarray(0,4),n.keyHint)&&s.baseURL.includes(n.name));return i?KLe.crypto.verify(r,i.publicKey,n.signature):!1})}o(v4t,"verifySignedNote");var X7=class t{static{o(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(K7))throw new eC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(K7),n=e.slice(0,r+1),s=e.slice(r+K7.length).matchAll(B4t),a=Array.from(s,c=>{let[,l,u]=c,d=Buffer.from(u,"base64");if(d.length<5)throw new eC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:l,keyHint:d.subarray(0,4),signature:d.subarray(4)}});if(a.length===0)throw new eC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},AP=class t{static{o(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,i){this.origin=e,this.logSize=r,this.logHash=n,this.rest=i}static fromString(e){let r=e.trimEnd().split(`
|
|
|
|
|
`);if(r.length<3)throw new eC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],i;try{i=BigInt(r[1])}catch{throw new eC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint log size"})}let s=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,i,s,a)}};jS.LogCheckpoint=AP});var ZLe=g(tK=>{"use strict";Object.defineProperty(tK,"__esModule",{value:!0});tK.verifyMerkleInclusion=R4t;var eK=ic(),mP=Ii(),N4t=Buffer.from([0]),_4t=Buffer.from([1]);function R4t(t,e){let r=t.inclusionProof,n;try{n=BigInt(r.logIndex)}catch{throw new mP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid inclusion proof log index"})}let i=BigInt(e.logSize);if(n<0n||n>=i)throw new mP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${n}`});let{inner:s,border:a}=T4t(n,i);if(r.hashes.length!==s+a)throw new mP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,s),l=r.hashes.slice(s),u=L4t(t.canonicalizedBody),d=Q4t(D4t(u,c,n),l);if(!eK.crypto.bufferEqual(d,e.logHash))throw new mP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(R4t,"verifyMerkleInclusion");function T4t(t,e){let r=k4t(t,e),n=P4t(t>>BigInt(r));return{inner:r,border:n}}o(T4t,"decompInclProof");function D4t(t,e,r){return e.reduce((n,i,s)=>r>>BigInt(s)&BigInt(1)?Z7(i,n):Z7(n,i),t)}o(D4t,"chainInner");function Q4t(t,e){return e.reduce((r,n)=>Z7(n,r),t)}o(Q4t,"chainBorderRight");function k4t(t,e){return O4t(t^e-BigInt(1))}o(k4t,"innerProofSize");function P4t(t){return t.toString(2).split("1").length-1}o(P4t,"onesCount");function O4t(t){return t===0n?0:t.toString(2).length}o(O4t,"bitLength");function Z7(t,e){return eK.crypto.digest("sha256",_4t,t,e)}o(Z7,"hashChildren");function L4t(t){return eK.crypto.digest("sha256",N4t,t)}o(L4t,"hashLeaf")});var tMe=g(rK=>{"use strict";Object.defineProperty(rK,"__esModule",{value:!0});rK.verifyTLogSET=U4t;var eMe=ic(),M4t=Ii(),F4t=YE();function U4t(t,e){if(!(0,F4t.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(i=>{let s=q4t(t),a=Buffer.from(eMe.json.canonicalize(s),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return eMe.crypto.verify(a,i.publicKey,c)}))throw new M4t.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o(U4t,"verifyTLogSET");function q4t(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:i}=t;return{body:i.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}o(q4t,"toVerificationPayload")});var nMe=g(yP=>{"use strict";Object.defineProperty(yP,"__esModule",{value:!0});yP.verifyTLogBody=$4t;yP.verifyTLogInclusion=j4t;var rMe=jLe(),gP=Ii(),nK=WLe(),iK=JLe(),G4t=YLe(),H4t=XLe(),z4t=ZLe(),V4t=tMe();function $4t(t,e){let{kind:r,version:n}=t.kindVersion,i;try{i=JSON.parse(t.canonicalizedBody.toString("utf8"))}catch{throw new gP.VerificationError({code:"TLOG_BODY_ERROR",message:"invalid canonicalized body"})}if(r!==i.kind||n!==i.apiVersion)throw new gP.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${n}, received: ${i.kind}/${i.apiVersion}`});switch(r){case"dsse":if(n==nK.DSSE_API_VERSION_V1)return(0,nK.verifyDSSETLogBody)(i,e);{let s=rMe.Entry.fromJSON(i);return(0,nK.verifyDSSETLogBodyV2)(s,e)}case"intoto":return(0,G4t.verifyIntotoTLogBody)(i,e);case"hashedrekord":if(n==iK.HASHEDREKORD_API_VERSION_V1)return(0,iK.verifyHashedRekordTLogBody)(i,e);{let s=rMe.Entry.fromJSON(i);return(0,iK.verifyHashedRekordTLogBodyV2)(s,e)}default:throw new gP.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}o($4t,"verifyTLogBody");function j4t(t,e){let r=!1;if(W4t(t)&&((0,V4t.verifyTLogSET)(t,e),r=!0),J4t(t)){let n=(0,H4t.verifyCheckpoint)(t,e);(0,z4t.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new gP.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}o(j4t,"verifyTLogInclusion");function W4t(t){return t.inclusionPromise!==void 0}o(W4t,"isTLogEntryWithInclusionPromise");function J4t(t){return t.inclusionProof!==void 0}o(J4t,"isTLogEntryWithInclusionProof")});var aMe=g(EP=>{"use strict";Object.defineProperty(EP,"__esModule",{value:!0});EP.Verifier=void 0;var Y4t=require("util"),QA=Ii(),iMe=PLe(),sK=OLe(),sMe=FLe(),oMe=nMe(),aK=class{static{o(this,"Verifier")}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),i=this.verifySigningKey(e,n);return this.verifyTLogs(e),this.verifySignature(e,i),r&&this.verifyPolicy(r,i.identity||{}),i}verifyTimestamps(e){let r=[];for(let n of e.timestamps)switch(n.$case){case"time
Line truncated
|
|
|
|
|
You can add a runtime option to disable the check or this warning:
|
|
|
|
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(W5t,"logUnexpecedPropertyAccessOnce");function J5t(){Object.keys(WP).forEach(function(t){delete WP[t]})}o(J5t,"resetLoggedProperties")});var YP=g(zl=>{"use strict";zl.__esModule=!0;zl.HandlebarsEnvironment=xK;function VMe(t){return t&&t.__esModule?t:{default:t}}o(VMe,"_interopRequireDefault");var PA=Xi(),Y5t=po(),SK=VMe(Y5t),K5t=CK(),X5t=qMe(),Z5t=wK(),JP=VMe(Z5t),eHt=IK(),tHt="4.7.9";zl.VERSION=tHt;var rHt=8;zl.COMPILER_REVISION=rHt;var nHt=7;zl.LAST_COMPATIBLE_COMPILER_REVISION=nHt;var iHt={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"};zl.REVISION_CHANGES=iHt;var BK="[object Object]";function xK(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},K5t.registerDefaultHelpers(this),X5t.registerDefaultDecorators(this)}o(xK,"HandlebarsEnvironment");xK.prototype={constructor:xK,logger:JP.default,log:JP.default.log,registerHelper:o(function(e,r){if(PA.toString.call(e)===BK){if(r)throw new SK.default("Arg not supported with multiple helpers");PA.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:o(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:o(function(e,r){if(PA.toString.call(e)===BK)PA.extend(this.partials,e);else{if(typeof r>"u")throw new SK.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:o(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:o(function(e,r){if(PA.toString.call(e)===BK){if(r)throw new SK.default("Arg not supported with multiple decorators");PA.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){eHt.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var sHt=JP.default.log;zl.log=sHt;zl.createFrame=PA.createFrame;zl.logger=JP.default});var jMe=g((KP,$Me)=>{"use strict";KP.__esModule=!0;function vK(t){this.string=t}o(vK,"SafeString");vK.prototype.toString=vK.prototype.toHTML=function(){return""+this.string};KP.default=vK;$Me.exports=KP.default});var WMe=g(NK=>{"use strict";NK.__esModule=!0;NK.wrapHelper=oHt;function oHt(t,e){if(typeof t!="function")return t;var r=o(function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)},"wrapper");return r}o(oHt,"wrapHelper")});var eFe=g(Xf=>{"use strict";Xf.__esModule=!0;Xf.checkRevision=fHt;Xf.template=hHt;Xf.wrapProgram=XP;Xf.resolvePartial=pHt;Xf.invokePartial=AHt;Xf.noop=XMe;function aHt(t){return t&&t.__esModule?t:{default:t}}o(aHt,"_interopRequireDefault");function cHt(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}o(cHt,"_interopRequireWildcard");var lHt=Xi(),uC=cHt(lHt),uHt=po(),cd=aHt(uHt),ld=YP(),JMe=CK(),dHt=WMe(),YMe=IK();function fHt(t){var e=t&&t[0]||1,r=ld.COMPILER_REVISION;if(!(e>=ld.LAST_COMPATIBLE_COMPILER_REVISION&&e<=ld.COMPILER_REVISION))if(e<ld.LAST_COMPATIBLE_COMPILER_REVISION){var n=ld.REVISION_CHANGES[r],i=ld.REVISION_CHANGES[e];throw new cd.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 ("+i+").")}else throw new cd.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}o(fHt,"checkRevision");function hHt(t,e){if(!e)throw new cd.default("No environment passed to template");if(!t||!t.main)throw new cd.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(a,c,l){l.hash&&(c=uC.extend({},c,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,c,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var u=e.VM.invokePartial.call(this,a,c,l);if(u==null&&e.compile&&(l.partials[l.name]=e.compile(a,t.compilerOptions,e),u=l.partials[l.name](c,l)),u!=null){if(l.indent){for(var d=u.split(`
|
|
|
|
|
`),f=0,h=d.length;f<h&&!(!d[f]&&f+1===h);f++)d[f]=l.indent+d[f];u=d.join(`
|
|
|
|
|
`)}return u}else throw new cd.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}o(n,"invokePartialWrapper");var i={strict:o(function(c,l,u){if(!c||!(l in c))throw new cd.default('"'+l+'" not defined in '+c,{loc:u});return i.lookupProperty(c,l)},"strict"),lookupProperty:o(function(c,l){var u=c[l];if(u==null||Object.prototype.hasOwnProperty.call(c,l)||YMe.resultIsAllowed(u,i.protoAccessControl,l))return u},"lookupProperty"),lookup:o(function(c,l){for(var u=c.length,d=0;d<u;d++){var f=c[d]&&i.lookupProperty(c[d],l);if(f!=null)return f}},"lookup"),lambda:o(function(c,l){return typeof c=="function"?c.call(l):c},"lambda"),escapeExpression:uC.escapeExpression,invokePartial:n,fn:o(function(c){var l=t[c];return l.decorator=t[c+"_d"],l},"fn"),programs:[],program:o(function(c,l,u,d,f){var h=this.programs[c],p=this.fn(c);return l||f||d||u?h=XP(this,c,p,l,u,d,f):h||(h=this.programs[c]=XP(this,c,p)),h},"program"),data:o(function(c,l){for(;c&&l--;)c=c._parent;return c},"data"),mergeIfNeeded:o(function(c,l){var u=c||l;return c&&l&&c!==l&&(u=uC.extend({},l,c)),u},"mergeIfNeeded"),nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function s(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=c.data;s._setup(c),!c.partial&&t.useData&&(l=mHt(a,l));var u=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(c.depths?u=a!=c.depths[0]?[a].concat(c.depths):c.depths:u=[a]);function f(h){return""+t.main(i,h,i.helpers,i.partials,l,d,u)}return o(f,"main"),f=ZMe(t.main,f,i,c.depths||[],l,d),f(a,c)}return o(s,"ret"),s.isTop=!0,s._setup=function(a){if(a.partial)i.protoAccessControl=a.protoAccessControl,i.helpers=a.helpers,i.partials=a.partials,i.decorators=a.decorators,i.hooks=a.hooks;else{var c={};KMe(c,e.helpers,i),KMe(c,a.helpers,i),i.helpers=c,t.usePartial&&(i.partials=i.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=uC.extend({},e.decorators,a.decorators)),i.hooks={},i.protoAccessControl=YMe.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||r;JMe.moveHelperToHooks(i,"helperMissing",l),JMe.moveHelperToHooks(i,"blockHelperMissing",l)}},s._child=function(a,c,l,u){if(t.useBlockParams&&!l)throw new cd.default("must pass block params");if(t.useDepths&&!u)throw new cd.default("must pass parent depths");return XP(i,a,t[a],c,0,l,u)},s}o(hHt,"template");function XP(t,e,r,n,i,s,a){function c(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=a;return a&&l!=a[0]&&!(l===t.nullContext&&a[0]===null)&&(d=[l].concat(a)),r(t,l,t.helpers,t.partials,u.data||n,s&&[u.blockParams].concat(s),d)}return o(c,"prog"),c=ZMe(r,c,t,a,n,s),c.program=e,c.depth=a?a.length:0,c.blockParams=i||0,c}o(XP,"wrapProgram");function pHt(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=ZP(r.partials,t)):r.name==="@partial-block"?t=ZP(r.data,"partial-block"):t=ZP(r.partials,r.name),t}o(pHt,"resolvePartial");function AHt(t,e,r){var n=ZP(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==XMe&&(function(){r.data=ld.createFrame(r.data);var s=r.fn;i=r.data["partial-block"]=o(function(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=ld.createFrame(l.data),l.data["partial-block"]=n,s(c,l)},"partialBlockWrapper"),s.partials&&(r.partials=uC.extend({},r.partials,s.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new cd.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}o(AHt,"invokePartial");function XMe(){return""}o(XMe,"noop");function ZP(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}o(ZP,"lookupOwnProperty");function mHt(t,e){return(!e||!("root"in e))&&(e=e?ld.createFrame(e):{},e.root=t),e}o(mHt,"initData");function ZMe(t,e,r,n,i,s){if(t.decorator){var a={};e=t.decorator(e,a,r,n&&n[0],i,s,n),uC.extend(e,a)}return e}o(ZMe,"executeDecorators");function KMe(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=gHt(i,r)})}o(KMe,"addHelpers");function gHt(t,e){var r=e.lookupProperty;return dHt.wrapHelper(t,function(n){return n.lookupProperty=r,n})}o(gHt,"passLookupPropertyOption")});var _K=g((eO,tFe)=>{"use strict";eO.__esModule=!0;eO.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};tFe.exports=eO.default});var oFe=g((tO,sFe)=>{"use strict";tO.__esModule=!0;function TK(t){return t&&t.__esModule?t:{default:t}}o(TK,"_interopRequireDefault");function DK(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}o(DK,"_interopRequireWildcard");var yHt=YP(),rFe=DK(yHt),EHt=jMe(),CHt=TK(EHt),bHt=po(),wHt=TK(bHt),IHt=Xi(),RK=DK(IHt),SHt=eFe
Line truncated
|
|
|
|
|
`+this.lexer.showPosition()+`
|
|
|
|
|
Expecting `+se.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Ie="Parse error on line "+(f+1)+": Unexpected "+(B==1?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Ie,{text:this.lexer.match,token:this.terminals_[B]||B,line:this.lexer.yylineno,loc:E,expected:se})}}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+B);switch(N[0]){case 1:a.push(B),c.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(N[1]),B=null,k?(B=k,k=null):(h=this.lexer.yyleng,d=this.lexer.yytext,f=this.lexer.yylineno,E=this.lexer.yylloc,p>0&&p--);break;case 2:if(j=this.productions_[N[1]][1],G.$=c[c.length-j],G._$={first_line:l[l.length-(j||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(j||1)].first_column,last_column:l[l.length-1].last_column},y&&(G._$.range=[l[l.length-(j||1)].range[0],l[l.length-1].range[1]]),Q=this.performAction.call(G,d,h,f,this.yy,N[1],c,l),typeof Q<"u")return Q;j&&(a=a.slice(0,-1*j*2),c=c.slice(0,-1*j),l=l.slice(0,-1*j)),a.push(this.productions_[N[1]][0]),c.push(G.$),l.push(G._$),oe=u[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},e=(function(){var n={EOF:1,parseError:o(function(s,a){if(this.yy.parser)this.yy.parser.parseError(s,a);else throw new Error(s)},"parseError"),setInput:o(function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var a=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===l.length?this.yylloc.first_column:0)+l[l.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-a]),this},"unput"),more:o(function(){return this._more=!0,this},"more"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
|
|
|
`+a+"^"},"showPosition"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,c,l,u,d;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),h=0;h<f.length&&(c=this._input.match(this.rules[f[h]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,l=h,!this.options.flex)));h++);return a?(d=a[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],s=this.performAction.call(this,this.yy,this,f[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var s=this.next();return typeof s<"u"?s:this.lex()},"lex"),begin:o(function(s){this.conditionStack.push(s)},"begin"),popState:o(function(){return this.conditionStack.pop()},"popState"),_currentRules:o(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:o(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:o(function(s){this.begin(s)},"begin")};return n.options={},n.performAction=o(function(s,a,c,l){function u(f,h){return a.yytext=a.yytext.substring(f,a.yyleng-h+f)}o(u,"strip");var d=l;switch(c){case 0:if(a.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return o(r,"Parser"),r.prototype=t,t.Parser=r,new r})();nO.default=vHt;lFe.exports=nO.default});var aO=g((oO,hFe)=>{"use strict";oO.__esModule=!0;function NHt(t){return t&&t.__esModule?t:{default:t}}o(NHt,"_interopRequireDefault");var _Ht=po(),kK=NHt(_Ht);function iO(){this.parents=[]}o(iO,"Visitor");iO.prototype={constructor:iO,mutating:!1,acceptKey:o(function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!iO.prototype[n.type])throw new kK.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},"acceptKey"),acceptRequired:o(function(e,r){if(this.acceptKey(e,r),!e[r])throw new kK.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:o(function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},"acceptArray"),accept:o(function(e){if(e){if(!this[e.type])throw new kK.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},"accept"),Program:o(function(e){this.acceptArray(e.body)},"Program"),MustacheStatement:sO,Decorator:sO,BlockStatement:dFe,DecoratorBlock:dFe,PartialStatement:fFe,PartialBlockStatement:o(function(e){fFe.call(this,e),this.acceptKey(e,"program")},"PartialBlockStatement"),ContentStatement:o(function(){},"ContentStatement"),CommentStatement:o(function(){},"CommentStatement"),SubExpression:sO,PathExpression:o(function(){},"PathExpressionLine truncated
|
|
|
|
|
`])}),e},"merge"),each:o(function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},"each"),empty:o(function(){var e=this.currentLocation||{start:{}};return new LA(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:o(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof LA?e:(e=HK(e,this,r),new LA(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:o(function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:o(function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:o(function(e){var r=this,n=[];Object.keys(e).forEach(function(s){var a=HK(e[s],r);a!=="undefined"&&n.push([r.quotedString(s),":",a])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},"objectLiteral"),generateList:o(function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(HK(e[n],this));return r},"generateList"),generateArray:o(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};uO.default=SFe;BFe.exports=uO.default});var TFe=g((dO,RFe)=>{"use strict";dO.__esModule=!0;function _Fe(t){return t&&t.__esModule?t:{default:t}}o(_Fe,"_interopRequireDefault");var vFe=YP(),a8t=po(),VK=_Fe(a8t),c8t=Xi(),l8t=xFe(),NFe=_Fe(l8t);function dC(t){this.value=t}o(dC,"Literal");function fC(){}o(fC,"JavaScriptCompiler");fC.prototype={nameLookup:o(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:o(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:o(function(){var e=vFe.COMPILER_REVISION,r=vFe.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:o(function(e,r,n){return c8t.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:o(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:o(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:o(function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var s=e.opcodes,a=void 0,c=void 0,l=void 0,u=void 0;for(l=0,u=s.length;l<u;l++)a=s[l],this.source.currentLocation=a.loc,c=c||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=c,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new VK.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
|
|
|
`]),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
|
|
|
`),this.decorators.push(`}
|
|
|
|
|
`),this.decorators=this.decorators.merge()));var d=this.createFunctionContext(i);if(this.isChild)return d;var f={compiler:this.compilerInfo(),main:d};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var h=this.context,p=h.programs,m=h.decorators;for(l=0,u=p.length;l<u;l++)f[l]=p[l],m[l]&&(f[l+"_d"]=m[l],f.useDecorators=!0);return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),i?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),r.srcName?(f=f.toStringWithSourceMap({file:r.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},"compile"),preamble:o(function(){this.lastContext=0,this.source=new NFe.default(this.options.srcName),this.decorators=new NFe.default(this.options.srcName)},"preamble"),createFunctionContext:o(function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var s=0;Object.keys(this.aliases).forEach(function(l){var u=r.aliases[l];u.children&&u.referenceCount>1&&(n+=", alias"+ ++s+"="+l,u.children[0]="alias"+s)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var c=this.mergeSource(n);return e?(a.push(c),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
|
|
|
|
|
`,c,"}"])},"createFunctionContext"),mergeSource:o(function(e){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,s=void 0,a=void 0,c=void 0;return this.source.each(function(l){l.appendToBuffer?(a?l.prepend(" + "):a=l,c=l):(a&&(s?a.prepend("buffer += "):i=!0,c.add(";"),a=c=void 0),s=!0,r||(n=!1))}),n?a?(a.prepend("return "),c.add(";")):s||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),c.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
|
|
|
|
|
`)),this.source.merge()},"mergeSource"),lookupPropertyFunctionVarDeclaration:o(function(){return`
|
|
|
|
|
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
|
|
|
return parent[propertyName];
|
|
|
|
|
}
|
|
|
|
|
return undefined
|
|
|
|
|
}
|
|
|
|
|
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:o(function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},"blockValue"),ambiguousBlockValue:o(function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},"ambiguousBlockValue"),appendContent:o(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:o(function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},"append"),appendEscaped:o(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:o(function(e){this.lastContext=e},"getContext"),pushContext:o(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:o(function(e,r,n,i){var s=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[s++])):this.pushContext(),this.resolvePath("context",e,s,r,n)},"lookupOnContext"),lookupBlockParam:o(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:o(function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},"lookupData"),resolvePath:o(function(e,r,n,i,s){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(u8t(this.options.strict&&s,this,r,n,e));return}for(var c=r.length,l=o(function(d){a.replaceStack(function(f){var h=a.nameLookup(f,r[d],e);return i?[" && ",h]:[" != null ? ",h," : ",f]})},"_loop"),u=n;u<c;u++)l(u)},"resolvePath"),resolvePossibleLambda:o(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:o(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:o(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:o(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:o(function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},"popHash"),pushString:o(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:o(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:o(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:o(function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},"registerDecorator"),invokeHelper:o(function(e,r,n){var i=this.popStack(),s=this.setupHelper(e,r),a=[];n&&a.push(s.name),a.push(i),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var c=["(",this.itemsSeparatedBy(a,"||"),")"],l=this.source.functionCall(c,"call",s.callParams);this.push(l)},"invokeHelper"),itemsSeparatedBy:o(function(e,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},"itemsSeparatedBy"),invokeKnownHelper:o(function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:o(function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),s=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",s," || ",n,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("h
Line truncated
|
|
|
|
|
`,e};Mr.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var s="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)s+=" "+t.blockParams[n];s+=" ]",e+=this.pad(s)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};Mr.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Mr.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Mr.prototype.BlockStatement=Mr.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};Mr.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};Mr.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};Mr.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Mr.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Mr.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,s=e.length;i<s;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};Mr.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Mr.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Mr.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Mr.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Mr.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Mr.prototype.NullLiteral=function(){return"NULL"};Mr.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};Mr.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var FFe=g((Rqr,MFe)=>{var pO=kFe().default,LFe=PFe();pO.PrintVisitor=LFe.PrintVisitor;pO.print=LFe.print;MFe.exports=pO;function OFe(t,e){var r=require("fs"),n=r.readFileSync(e,"utf8");t.exports=pO.compile(n)}o(OFe,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=OFe,require.extensions[".hbs"]=OFe)});var eUe=T(require("fs"),1),tUe=T(require("path"),1);var TX=T(require("os"),1);function jl(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(jl,"toCommandValue");function IO(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}o(IO,"toCommandProperties");function Wl(t,e,r){let n=new SO(t,e,r);process.stdout.write(n.toString()+TX.EOL)}o(Wl,"issueCommand");function BO(t,e=""){Wl(t,{},e)}o(BO,"issue");var RX="::",SO=class{static{o(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=RX+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let i=this.properties[n];i&&(r?r=!1:e+=",",e+=`${n}=${GUe(i)}`)}}return e+=`${RX}${qUe(this.message)}`,e}};function qUe(t){return jl(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(qUe,"escapeData");function GUe(t){return jl(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(GUe,"escapeProperty");var DX=T(require("crypto"),1),MB=T(require("fs"),1),LB=T(require("os"),1);function FB(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unable to find environment variable for file command ${t}`);if(!MB.existsSync(r))throw new Error(`Missing file at path: ${r}`);MB.appendFileSync(r,`${jl(e)}${LB.EOL}`,{encoding:"utf8"})}o(FB,"issueFileCommand");function xO(t,e){let r=`ghadelimiter_${DX.randomUUID()}`,n=jl(e);if(t.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${t}<<${r}${LB.EOL}${n}${LB.EOL}${r}`}o(xO,"prepareKeyValueMessage");var mU=T(require("os"),1),Tae=T(require("path"),1);var vb=T(require("http"),1),rU=T(require("https"),1);function vO(t){let e=t.protocol==="https:";if(HUe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new UB(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://")
Line truncated
|
|
|
|
|
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}o(kh,"getBooleanInput");function F2(t,e){if(process.env.GITHUB_OUTPUT||"")return FB("OUTPUT",xO(t,e));process.stdout.write(mU.EOL),Wl("set-output",{name:t},jl(e))}o(F2,"setOutput");function U2(t){process.exitCode=AU.Failure,_a(t)}o(U2,"setFailed");function Ph(){return process.env.RUNNER_DEBUG==="1"}o(Ph,"isDebug");function v(t){Wl("debug",{},t)}o(v,"debug");function _a(t,e={}){Wl("error",IO(e),t instanceof Error?t.toString():t)}o(_a,"error");function xe(t,e={}){Wl("warning",IO(e),t instanceof Error?t.toString():t)}o(xe,"warning");function D(t){process.stdout.write(t+mU.EOL)}o(D,"info");function wWe(t){BO("group",t)}o(wWe,"startGroup");function IWe(){BO("endgroup")}o(IWe,"endGroup");function Br(t,e){return bWe(this,void 0,void 0,function*(){wWe(t);let r;try{r=yield e()}finally{IWe()}return r})}o(Br,"group");function Ra(t,e){if(process.env.GITHUB_STATE||"")return FB("STATE",xO(t,e));Wl("save-state",{name:t},jl(e))}o(Ra,"saveState");function Dae(t){return process.env[`STATE_${t}`]||""}o(Dae,"getState");var Sw=T(require("fs"),1),Tz=T(require("os"),1),Dz=T(require("path"),1);var kae=T(require("os"),1);function Qb(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(Qb,"toCommandValue");function Pae(t,e,r){let n=new gU(t,e,r);process.stdout.write(n.toString()+kae.EOL)}o(Pae,"issueCommand");var Qae="::",gU=class{static{o(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=Qae+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let i=this.properties[n];i&&(r?r=!1:e+=",",e+=`${n}=${BWe(i)}`)}}return e+=`${Qae}${SWe(this.message)}`,e}};function SWe(t){return Qb(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(SWe,"escapeData");function BWe(t){return Qb(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(BWe,"escapeProperty");var Fae=T(require("os"),1);var Lae=require("os"),kb=require("fs");var yU=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:xWe,appendFile:vWe,writeFile:NWe}=kb.promises,Oae="GITHUB_STEP_SUMMARY";var EU=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return yU(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Oae];if(!e)throw new Error(`Unable to find environment variable for $${Oae}. Check if your runtime environment supports job summaries.`);try{yield xWe(e,kb.constants.R_OK|kb.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let i=Object.entries(n).map(([s,a])=>` ${s}="${a}"`).join("");return r?`<${e}${i}>${r}</${e}>`:`<${e}${i}>`}write(e){return yU(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?NWe:vWe)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return yU(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(Lae.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(i).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",i=e.map(a=>this.wrap("li",a)).join(""),s=this.wrap(n,i);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(i=>{let s=i.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,f=c?"th":"td",h=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(f,l,h)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:i,height:s}=n||{},a=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,i=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(i,e);return this.addRaw(s).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),i=this.wrap("blockquote",e,n);return this.addRLine truncated
|
|
|
|
|
`),e=e.replace(/\r/g,`
|
|
|
|
|
`));let i=e.split(`
|
|
|
|
|
`).map(s=>s.trim());for(let s of i)!s||s.startsWith("#")||n.patterns.push(new Jb(s));return n.searchPaths.push(...ZU(n.patterns)),n})}static stat(e,r,n){return cq(this,void 0,void 0,function*(){let i;if(r.followSymbolicLinks)try{i=yield Km.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){No(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else i=yield Km.promises.lstat(e.path);if(i.isDirectory()&&r.followSymbolicLinks){let s=yield Km.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===s)){No(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return i})}};var rXe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function pue(t,e){return rXe(this,void 0,void 0,function*(){return yield sv.create(t,e)})}o(pue,"create");var wv=T(require("crypto"),1),tg=T(require("fs"),1),Uh=T(require("path"),1),afe=T(sfe(),1),cfe=T(require("util"),1);var r0;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(r0||(r0={}));var Qi;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Qi||(Qi={}));var Hs;(function(t){t.GNU="gnu",t.BSD="bsd"})(Hs||(Hs={}));var Ev=2,Cv=5e3,_q=5e3,Rq=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,ofe=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,n0="cache.tar",Tq="manifest.txt",$7t=10*Math.pow(1024,3),bv="cache read denied:";var eg=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},htt=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(a){return new Promise(function(c,l){a=t[s](a),i(c,l,a.done,a.value)})}}function i(s,a,c,l){Promise.resolve(l).then(function(u){s({value:u,done:c})},a)}},ptt="1.0";function qh(){return eg(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=Uh.join(n,"actions","temp")}let r=Uh.join(e,wv.randomUUID());return yield du(r),r})}o(qh,"createTempDirectory");function Ic(t){return tg.statSync(t).size}o(Ic,"getArchiveFileSizeInBytes");function Dq(t){return eg(this,void 0,void 0,function*(){var e,r,n,i,s;let a=[],c=(s=process.env.GITHUB_WORKSPACE)!==null&&s!==void 0?s:process.cwd(),l=yield pue(t.join(`
|
|
|
|
|
`),{implicitDescendants:!1});try{for(var u=!0,d=htt(l.globGenerator()),f;f=yield d.next(),e=f.done,!e;u=!0){i=f.value,u=!1;let p=Uh.relative(c,i).replace(new RegExp(`\\${Uh.sep}`,"g"),"/");v(`Matched: ${p}`),p===""?a.push("."):a.push(`${p}`)}}catch(h){r={error:h}}finally{try{!u&&!e&&(n=d.return)&&(yield n.call(d))}finally{if(r)throw r.error}}return a})}o(Dq,"resolvePaths");function i0(t){return eg(this,void 0,void 0,function*(){return cfe.promisify(tg.unlink)(t)})}o(i0,"unlinkFile");function lfe(t){return eg(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),v(`Checking ${e} ${r.join(" ")}`);try{yield Gs(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:o(i=>n+=i.toString(),"stdout"),stderr:o(i=>n+=i.toString(),"stderr")}})}catch(i){v(i.message)}return n=n.trim(),v(n),n})}o(lfe,"getVersion");function s0(){return eg(this,void 0,void 0,function*(){let t=yield lfe("zstd",["--quiet"]),e=afe.clean(t);return v(`zstd version: ${e}`),t===""?Qi.Gzip:Qi.ZstdWithoutLong})}o(s0,"getCompressionMethod");function Md(t){return t===Qi.Gzip?r0.Gzip:r0.Zstd}o(Md,"getCacheFileName");function ufe(){return eg(this,void 0,void 0,function*(){return tg.existsSync(Rq)?Rq:(yield lfe("tar")).toLowerCase().includes("gnu tar")?zn("tar"):""})}o(ufe,"getGnuTarPathOnWindows");function Qq(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(Qq,"assertDefined");function rg(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(ptt),wv.createHash("sha256").update(n.join("|")).digest("hex")}o(rg,"getCacheVersion");function dfe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(dfe,"getRuntimeToken");var a0=T(require("http"),1),Oq=T(require("https"),1);function kq(t){let e=t.protocol==="https:";if(Att(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Sv(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Sv(`http://${r}`)}else return}o(kq,"getProxyUrl");function Att(t){if(!t.hostname)return!1;let e=t.hostname;if(mtt(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let i=[t.hostname.toUpperCase()];typeof n=="number"&&i.push(`${i[0]}:${n}`);for(let s of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(s==="*"||i.some(a=>a===s||a.endsWith(`.${s}`)||s.startsWith(".")&&a.endsWith(`${s}`)))return!0;return!1}o(Att,"checkBypass");function mtt(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(mtt,"isLoopbackAddress");var Sv=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var Fd=T($A(),1),ffe=T(Rh(),1);var Gr=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},xr;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(xr||(xr={}));var ki;(function(t){t.Accept="accept",t.ContentType="content-type"})(ki||(ki={}));var Au;(function(t){t.ApplicationJson="application/json"})(Au||(Au={}));var ytt=[xr.MovedPermanently,xr.ResourceMoved,xr.SeeOther,xr.TemporaryRedirect,xr.PermanentRedirect],Ett=[xr.BadGateway,xr.ServiceUnavailable,xr.GatewayTimeout],Ctt=["OPTIONS","GET","DELETE","HEAD"],btt=10,wtt=5,Sc=class t extends Error{static{o(this,"HttpClientError")}const
Line truncated
|
|
|
|
|
${Ttt.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Rv(t){return t instanceof Pi?!0:Hh(t)&&t.name==="RestError"}o(Rv,"isRestError");function as(t,e){return Buffer.from(t,e)}o(as,"stringToUint8Array");var Tv=T(require("node:http"),1),Dv=T(require("node:https"),1),$q=T(require("node:zlib"),1),Rfe=require("node:stream");var Do=c0("ts-http-runtime");var Dtt={};function l0(t){return t&&typeof t.pipe=="function"}o(l0,"isReadableStream");function _fe(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}o(_fe,"isStreamComplete");function Tfe(t){return t&&typeof t.byteLength=="number"}o(Tfe,"isArrayBuffer");var Qv=class extends Rfe.Transform{static{o(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(i){n(i)}}constructor(e){super(),this.progressCallback=e}},jq=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Bc("The operation was aborted. Request has already been canceled.");n=o(u=>{u.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let i;e.timeout>0&&(i=setTimeout(()=>{let u=new ka;Do.info(`request to '${u.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let s=e.headers.get("Accept-Encoding"),a=s?.includes("gzip")||s?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let u=Ott(c);u!==null&&e.headers.set("Content-Length",u)}let l;try{if(c&&e.onUploadProgress){let m=e.onUploadProgress,A=new Qv(m);A.on("error",E=>{Do.error("Error in upload progress",E)}),l0(c)?c.pipe(A):A.end(c),c=A}let u=await this.makeRequest(e,r,c);i!==void 0&&clearTimeout(i);let d=Qtt(u),h={status:u.statusCode??0,headers:d,request:e};if(e.method==="HEAD")return u.resume(),h;l=a?ktt(u,d):u;let p=e.onDownloadProgress;if(p){let m=new Qv(p);m.on("error",A=>{Do.error("Error in download progress",A)}),l.pipe(m),l=m}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(h.status)?h.readableStreamBody=l:h.bodyAsText=await Ptt(l),h}finally{if(e.abortSignal&&n){let u=Promise.resolve();l0(c)&&(u=_fe(c));let d=Promise.resolve();l0(l)&&(d=_fe(l)),Promise.all([u,d]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(f=>{Do.warning("Error when cleaning up abortListener on httpRequest",f)})}}}makeRequest(e,r,n){let i=new URL(e.url),s=i.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,s),hostname:i.hostname,path:`${i.pathname}${i.search}`,port:i.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((l,u)=>{let d=s?Tv.default.request(c,l):Dv.default.request(c,l);d.once("error",f=>{u(new Pi(f.message,{code:f.code??Pi.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let f=new Bc("The operation was aborted. Rejecting from abort signal callback while making request.");d.destroy(f),u(f)}),n&&l0(n)?n.pipe(d):n?typeof n=="string"||Buffer.isBuffer(n)?d.end(n):Tfe(n)?d.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Do.error("Unrecognized body type",n),u(new Pi("Unrecognized body type"))):d.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?Tv.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Tv.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return Dv.default.globalAgent;let i=e.tlsSettings??Dtt,s=this.cachedHttpsAgents.get(i);return s&&s.options.keepAlive===!n||(Do.info("No cached TLS Agent exist, creating a new Agent"),s=new Dv.default.Agent({keepAlive:!n,...i}),this.cachedHttpsAgents.set(i,s)),s}}};function Qtt(t){let e=zs();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}o(Qtt,"getResponseHeaders");function ktt(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=$q.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=$q.default.createInflate();return t.pipe(n),n}return t}o(ktt,"getDecodedResponseStream");function Ptt(t){return new Promise((e,r)=>{let n=[];t.on("data",i=>{Buffer.isBuffer(i)?n.push(i):n.push(Buffer.from(i))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",i=>{i&&i?.name==="AbortError"?r(i):r(new Pi(`Error reading response as text: ${i.message}`,{code:Pi.PARSE_ERROR}))})})}o(Ptt,"streamToText");function Ott(t){return t?Buffer.isBuffer(t)?t.length:
Line truncated
|
|
|
|
|
`;return e}o(hnt,"encodeHeaders");function pnt(t){return t instanceof Uint8Array?t.byteLength:nN(t)?t.size===-1?void 0:t.size:void 0}o(pnt,"getLength");function Ant(t){let e=0;for(let r of t){let n=pnt(r);if(n===void 0)return;e+=n}return e}o(Ant,"getTotalLength");async function mnt(t,e,r){let n=[as(`--${r}`,"utf-8"),...e.flatMap(s=>[as(`\r
|
|
|
|
|
`,"utf-8"),as(hnt(s.headers),"utf-8"),as(`\r
|
|
|
|
|
`,"utf-8"),s.body,as(`\r
|
|
|
|
|
--${r}`,"utf-8")]),as(`--\r
|
|
|
|
|
\r
|
|
|
|
|
`,"utf-8")],i=Ant(n);i&&t.headers.set("Content-Length",i),t.body=await Phe(n)}o(mnt,"buildRequestBody");var f0="multipartPolicy",gnt=70,ynt=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Ent(t){if(t.length>gnt)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!ynt.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}o(Ent,"assertValidBoundary");function sN(){return{name:f0,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",i=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,s,a]=i;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?Ent(r):r=fnt(),t.headers.set("Content-Type",`${s}; boundary=${r}`),await mnt(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(sN,"multipartPolicy");function oN(){return _v()}o(oN,"createEmptyPipeline");var Ohe=xv({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),ztr=Ohe.logger;function Nc(t){return Ohe.createClientLogger(t)}o(Nc,"createClientLogger");var _c=Nc("core-rest-pipeline");function f3(t={}){return Pv({logger:_c.info,...t})}o(f3,"logPolicy");var h3=Ov;function p3(t={}){return Lv(t)}o(p3,"redirectPolicy");var aN=T(require("node:os"),1),cN=T(require("node:process"),1);function Lhe(){return"User-Agent"}o(Lhe,"getHeaderName");async function Mhe(t){if(cN.default&&cN.default.versions){let e=`${aN.default.type()} ${aN.default.release()}; ${aN.default.arch()}`,r=cN.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})`)}}o(Mhe,"setPlatformSpecificData");var lN="1.22.2";function vnt(t){let e=[];for(let[r,n]of t){let i=n?`${r}/${n}`:r;e.push(i)}return e.join(" ")}o(vnt,"getUserAgentString");function Fhe(){return Lhe()}o(Fhe,"getUserAgentHeaderName");async function uN(t){let e=new Map;e.set("core-rest-pipeline",lN),await Mhe(e);let r=vnt(e);return t?`${t} ${r}`:r}o(uN,"getUserAgentValue");var Uhe=Fhe(),qhe="userAgentPolicy";function A3(t={}){let e=uN(t.userAgentPrefix);return{name:qhe,async sendRequest(r,n){return r.headers.has(Uhe)||r.headers.set(Uhe,await e),n(r)}}}o(A3,"userAgentPolicy");var Ws=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function m3(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:i}=e??{};return new Promise((s,a)=>{function c(){a(new Ws(i??"The operation was aborted."))}o(c,"rejectOnAbort");function l(){n?.removeEventListener("abort",u)}o(l,"removeListeners");function u(){r?.(),l(),c()}if(o(u,"onAbort"),n?.aborted)return c();try{t(d=>{l(),s(d)},d=>{l(),a(d)})}catch(d){a(d)}n?.addEventListener("abort",u)})}o(m3,"createAbortablePromise");var Dnt="The delay was aborted.";function h0(t,e){let r,{abortSignal:n,abortErrorMsg:i}=e??{};return m3(s=>{r=setTimeout(s,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:i??Dnt})}o(h0,"delay");function qd(t){if(Hh(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}o(qd,"getErrorMessage");function Ghe(t){return Hh(t)}o(Ghe,"isError");function dg(){return Gh()}o(dg,"randomUUID");var Qt=$h;var Hhe=Symbol("rawContent");function y3(t){return typeof t[Hhe]=="function"}o(y3,"hasRawContent");function zhe(t){return y3(t)?t[Hhe]():t}o(zhe,"getRawContent");var dN=f0;function E3(){let t=sN();return{name:dN,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)y3(n.body)&&(n.body=zhe(n.body));return t.sendRequest(e,r)},"sendRequest")}}o(E3,"multipartPolicy");var C3=Mv;function b3(){return Fv()}o(b3,"decompressResponsePolicy");function w3(t={}){return Gv(t)}o(w3,"defaultRetryPolicy");function I3(){return Hv()}o(I3,"formDataPolicy");function Gd(t){return a3(t)}o(Gd,"getDefaultProxySettings");function S3(t,e){return eN(t,e)}o(S3,"proxyPolicy");var Vhe="setClientRequestIdPolicy";function B3(t="x-ms-client-request-id"){return{name:Vhe,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}o(B3,"setClientRequestIdPolicy");function x3(t){return tN(t)}o(x3,"agentPolicy");function v3(t){return rN(t)}o(v3,"tlsPolicy");var fg={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function $he(t={}){let e=new N3(t.parentContext);return t.span&&(e=e.setValue(fg.span,t.span)),t.namespace&&(e=e.setValue(fg.namespace,t.namespace)),e}o($he,"createTracingContext");var N3=class t{static{o(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e i
Line truncated
|
|
|
|
|
`&&t[s]!=="\r";s++)l+=t[s];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),s--),!rst(l)){let f;return l.trim().length===0?f="Invalid space after '<'.":f="Tag '"+l+"' is an invalid name.",Hr("InvalidTag",f,Oi(t,s))}let u=Kit(t,s);if(u===!1)return Hr("InvalidAttr","Attributes for '"+l+"' have open quote.",Oi(t,s));let d=u.value;if(s=u.index,d[d.length-1]==="/"){let f=s-d.length;d=d.substring(0,d.length-1);let h=_pe(d,e);if(h===!0)n=!0;else return Hr(h.err.code,h.err.msg,Oi(t,f+h.err.line))}else if(c)if(u.tagClosed){if(d.trim().length>0)return Hr("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Oi(t,a));if(r.length===0)return Hr("InvalidTag","Closing tag '"+l+"' has not been opened.",Oi(t,a));{let f=r.pop();if(l!==f.tagName){let h=Oi(t,f.tagStartPos);return Hr("InvalidTag","Expected closing tag '"+f.tagName+"' (opened in line "+h.line+", col "+h.col+") instead of closing tag '"+l+"'.",Oi(t,a))}r.length==0&&(i=!0)}}else return Hr("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Oi(t,s));else{let f=_pe(d,e);if(f!==!0)return Hr(f.err.code,f.err.msg,Oi(t,s-d.length+f.err.line));if(i===!0)return Hr("InvalidXml","Multiple possible root nodes found.",Oi(t,s));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:a}),n=!0}for(s++;s<t.length;s++)if(t[s]==="<")if(t[s+1]==="!"){s++,s=Npe(t,s);continue}else if(t[s+1]==="?"){if(s=vpe(t,++s),s.err)return s}else break;else if(t[s]==="&"){let f=est(t,s);if(f==-1)return Hr("InvalidChar","char '&' is not expected.",Oi(t,s));s=f}else if(i===!0&&!xpe(t[s]))return Hr("InvalidXml","Extra text at the end",Oi(t,s));t[s]==="<"&&s--}}else{if(xpe(t[s]))continue;return Hr("InvalidChar","char '"+t[s]+"' is not expected.",Oi(t,s))}if(n){if(r.length==1)return Hr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Oi(t,r[0].tagStartPos));if(r.length>0)return Hr("InvalidXml","Invalid '"+JSON.stringify(r.map(s=>s.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Hr("InvalidXml","Start tag expected.",1);return!0}o(SN,"validate");function xpe(t){return t===" "||t===" "||t===`
|
|
|
|
|
`||t==="\r"}o(xpe,"isWhiteSpace");function vpe(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 Hr("InvalidXml","XML declaration allowed only at the start of the document.",Oi(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(vpe,"readPI");function Npe(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}o(Npe,"readCommentAndCDATA");var Jit='"',Yit="'";function Kit(t,e){let r="",n="",i=!1;for(;e<t.length;e++){if(t[e]===Jit||t[e]===Yit)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){i=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:i}}o(Kit,"readAttributeStr");var Xit=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function _pe(t,e){let r=wN(t,Xit),n={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return Hr("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",B0(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return Hr("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",B0(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return Hr("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",B0(r[i]));let s=r[i][2];if(!tst(s))return Hr("InvalidAttr","Attribute '"+s+"' is an invalid name.",B0(r[i]));if(!Object.prototype.hasOwnProperty.call(n,s))n[s]=1;else return Hr("InvalidAttr","Attribute '"+s+"' is repeated.",B0(r[i]))}return!0}o(_pe,"validateAttributeString");function Zit(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}o(Zit,"validateNumberAmpersand");function est(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Zit(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}o(est,"validateAmpersand");function Hr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o(Hr,"getErrorObject");function tst(t){return $3(t)}o(tst,"validateAttrName");function rst(t){return $3(t)}o(rst,"validateTagName");function Oi(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(Oi,"getLineNumberForPosition");function B0(t){return t.startIndex+t[1].length}o(B0,"getPositionFromMatch");var Rpe={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"},Tpe={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",thorn:"\xFE",szlig:"\xDF",yuml:"\xFF",Yuml:"\u0178"},Dpe={Amacr:"\u0100",amacr:"\u0101",Abreve:"\u0102",abreve:"\u0103",Aogon:"\u0104",aogon:"\u0105",Cacute:"\u0106",cacute:"\u0107",Ccirc:"\u0108",ccirc:"\u0109",Cdot:"\u010A",cdot:"\u010B",Ccaron:"\u010C",ccaron:"\u010D",Dcaron:"\u010E",dcaron:"\u010F",Dstrok:"\u0110",dstrok:"\u0111",Emacr:"\u0112",emacr:"\u0113",Ecaron:"\u011A",ecaron:"\u011B",Edot:"\u0116",edot:"\u0117",Eogon:"\u0118",eogon:"\u0119",Gcirc:"\u011C",gcirc:"\u011D",Gbreve:"\u011E",gbreve:"\u011F",Gdot:"\u0120",gdot:"\u0121",Gcedil:"\u0122",Hcirc:"\u0124",hcirc:"\Line truncated
|
|
|
|
|
`);let e=new ds("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=this.options,s=new N0(i.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let u=t.charCodeAt(c+1);if(u===47){let d=gg(t,">",c,"Closing Tag is not closed."),f=t.substring(c+2,d).trim();if(i.removeNSPrefix){let p=f.indexOf(":");p!==-1&&(f=f.substr(p+1))}f=eG(i.transformTagName,f,"",i).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let h=this.matcher.getCurrentTag();if(f&&i.unpairedTagsSet.has(f))throw new Error(`Unpaired tag can not be used as closing tag: </${f}>`);h&&i.unpairedTagsSet.has(h)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=d}else if(u===63){let d=tG(t,c,!1,"?>");if(!d)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let f=this.buildAttributesMap(d.tagExp,this.matcher,d.tagName,!0);if(f){let h=f[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(h)||1),s.setXmlVersion(Number(h)||1)}if(!(i.ignoreDeclaration&&d.tagName==="?xml"||i.ignorePiTags)){let h=new ds(d.tagName);h.add(i.textNodeName,""),d.tagName!==d.tagExp&&d.attrExpPresent&&i.ignoreAttributes!==!0&&(h[":@"]=f),this.addChild(r,h,this.readonlyMatcher,c)}c=d.closeIndex+1}else if(u===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let d=gg(t,"-->",c+4,"Comment is not closed.");if(i.commentPropName){let f=t.substring(c+4,d-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(i.commentPropName,[{[i.textNodeName]:f}])}c=d}else if(u===33&&t.charCodeAt(c+2)===68){let d=s.readDocType(t,c);this.entityDecoder.addInputEntities(d.entities),c=d.i}else if(u===33&&t.charCodeAt(c+2)===91){let d=gg(t,"]]>",c,"CDATA is not closed.")-2,f=t.substring(c+9,d);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let h=this.parseTextData(f,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);h==null&&(h=""),i.cdataPropName?r.add(i.cdataPropName,[{[i.textNodeName]:f}]):r.add(i.textNodeName,h),c=d+2}else{let d=tG(t,c,i.removeNSPrefix);if(!d){let F=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${F}"`)}let f=d.tagName,h=d.rawTagName,p=d.tagExp,m=d.attrExpPresent,A=d.closeIndex;if({tagName:f,tagExp:p}=eG(i.transformTagName,f,p,i),i.strictReservedNames&&(f===i.commentPropName||f===i.cdataPropName||f===i.textNodeName||f===i.attributesGroupName))throw new Error(`Invalid tag name: ${f}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let E=r;E&&i.unpairedTagsSet.has(E.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let y=!1;p.length>0&&p.lastIndexOf("/")===p.length-1&&(y=!0,f[f.length-1]==="/"?(f=f.substr(0,f.length-1),p=f):p=p.substr(0,p.length-1),m=f!==p);let C=null,w={},B;B=Bst(h),f!==e.tagname&&this.matcher.push(f,{},B),f!==p&&m&&(C=this.buildAttributesMap(p,this.matcher,f),C&&(w=Sst(C,i))),f!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let k=c;if(this.isCurrentNodeStopNode){let F="";if(y)c=d.closeIndex;else if(i.unpairedTagsSet.has(f))c=d.closeIndex;else{let $=this.readStopNodeData(t,h,A+1);if(!$)throw new Error(`Unexpected end of ${h}`);c=$.i,F=$.tagContent}let N=new ds(f);C&&(N[":@"]=C),N.add(i.textNodeName,F),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,N,this.readonlyMatcher,k)}else{if(y){({tagName:f,tagExp:p}=eG(i.transformTagName,f,p,i));let F=new ds(f);C&&(F[":@"]=C),this.addChild(r,F,this.readonlyMatcher,k),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(f)){let F=new ds(f);C&&(F[":@"]=C),this.addChild(r,F,this.readonlyMatcher,k),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=d.closeIndex;continue}else{let F=new ds(f);if(this.tagsNodeStack.length>i.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),C&&(F[":@"]=C),this.addChild(r,F,this.readonlyMatcher,k),r=F}n="",c=A}}}else n+=t[c];return e.child},"parseXml");function Tst(t,e,r,n){this.options.captureMetaData||(n=void 0);let i=this.options.jPath?r.toString():r,s=this.options.updateTag(e.tagname,i,e[":@"]);s===!1||(typeof s=="string"&&(e.tagname=s),t.addChild(e,n))}o(Tst,"addChild");function Dst(t,e,r){let n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){let i=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,i)))return t}if(n.tagFilter){let i=this.options.jPath?r.toString():r;if(!n.tagFilter(e,i))return t}return this.entityDecoder.decode(t)}o(Dst,"replaceEntitiesValue");function Qst(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}o(Qst,"saveTextToParentTag");function kst(){return this.stopNodeExpressionsSet.Line truncated
|
|
|
|
|
`;function Hst(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(aG(r)==="?xml"){let i=r[":@"];if(i){let s=e.attributeNamePrefix+"version";if(i[s])return i[s]}}return"1.0"}o(Hst,"detectXmlVersionFromArray");function Xpe(t,e,r,n,i){return!r.sanitizeName||Kh(t,{xmlVersion:i})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}o(Xpe,"resolveTagName");function oG(t,e){let r="";e.format&&(r=Gst);let n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let a=0;a<e.stopNodes.length;a++){let c=e.stopNodes[a];typeof c=="string"?n.push(new Ks(c)):c instanceof Ks&&n.push(c)}let i=Hst(t,e),s=new Dc;return Zpe(t,e,r,s,n,i)}o(oG,"toXml");function Zpe(t,e,r,n,i,s){let a="",c=!1;if(e.maxNestedTags&&n.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let l=t.toString();return l=sG(l,e),l}return""}for(let l=0;l<t.length;l++){let u=t[l],d=aG(u);if(d===void 0)continue;let h=d===e.textNodeName||d===e.cdataPropName||d===e.commentPropName||d[0]==="?"?d:Xpe(d,!1,e,n,s),p=zst(u[":@"],e);n.push(h,p);let m=$st(n,i);if(h===e.textNodeName){let w=u[d];m||(w=e.tagValueProcessor(h,w),w=sG(w,e)),c&&(a+=r),a+=w,c=!1,n.pop();continue}else if(h===e.cdataPropName){c&&(a+=r);let w=u[d][0][e.textNodeName],B=_N(w);a+=`<![CDATA[${B}]]>`,c=!1,n.pop();continue}else if(h===e.commentPropName){let w=u[d][0][e.textNodeName],B=NN(w);a+=r+`<!--${B}-->`,c=!0,n.pop();continue}else if(h[0]==="?"){let w=Kpe(u[":@"],e,m,n,s);a+=(h==="?xml"?"":r)+`<${h}${w}?>`,c=!0,n.pop();continue}let A=r;A!==""&&(A+=e.indentBy);let E=Kpe(u[":@"],e,m,n,s),y=r+`<${h}${E}`,C;m?C=eAe(u[d],e):C=Zpe(u[d],e,A,n,i,s),e.unpairedTags.indexOf(h)!==-1?e.suppressUnpairedNode?a+=y+">":a+=y+"/>":(!C||C.length===0)&&e.suppressEmptyNode?a+=y+"/>":C&&C.endsWith(">")?a+=y+`>${C}${r}</${h}>`:(a+=y+">",C&&r!==""&&(C.includes("/>")||C.includes("</"))?a+=r+e.indentBy+C+r:a+=C,a+=`</${h}>`),c=!0,n.pop()}return a}o(Zpe,"arrToStr");function zst(t,e){if(!t||e.ignoreAttributes)return null;let r={},n=!1;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let s=i.startsWith(e.attributeNamePrefix)?i.substr(e.attributeNamePrefix.length):i;r[s]=Vd(t[i]),n=!0}return n?r:null}o(zst,"extractAttributeValues");function eAe(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let n=0;n<t.length;n++){let i=t[n],s=aG(i);if(s===e.textNodeName)r+=i[s];else if(s===e.cdataPropName)r+=i[s][0][e.textNodeName];else if(s===e.commentPropName)r+=i[s][0][e.textNodeName];else{if(s&&s[0]==="?")continue;if(s){let a=Vst(i[":@"],e),c=eAe(i[s],e);!c||c.length===0?r+=`<${s}${a}/>`:r+=`<${s}${a}>${c}</${s}>`}}}return r}o(eAe,"getRawContent");function Vst(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=t[n];i===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${Vd(i)}"`}return r}o(Vst,"attr_to_str_raw");function aG(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let n=e[r];if(Object.prototype.hasOwnProperty.call(t,n)&&n!==":@")return n}}o(aG,"propName");function Kpe(t,e,r,n,i){let s="";if(t&&!e.ignoreAttributes)for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=a.substr(e.attributeNamePrefix.length),l=r?c:Xpe(c,!0,e,n,i),u;r?u=t[a]:(u=e.attributeValueProcessor(a,t[a]),u=sG(u,e)),u===!0&&e.suppressBooleanAttributes?s+=` ${l}`:s+=` ${l}="${Vd(u)}"`}return s}o(Kpe,"attr_to_str");function $st(t,e){if(!e||e.length===0)return!1;for(let r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}o($st,"checkStopNode");function sG(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){let n=e.entities[r];t=t.replace(n.regex,n.val)}return t}o(sG,"replaceEntitiesValue");function cG(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}o(cG,"getIgnoreAttributesFn");var jst={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:o(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:o(function(t,e){return e},"attributeValueProcessor"),preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function hs(t){if(this.options=Object.assign({},jst,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&ArraLine truncated
|
|
|
|
|
`,this.newLine=`
|
|
|
|
|
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}o(hs,"Builder");function Wst(t,e){let r=t["?xml"];if(r&&typeof r=="object"){if(e.attributesGroupName&&r[e.attributesGroupName]){let i=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(i)return i}let n=r[e.attributeNamePrefix+"version"];if(n)return n}return"1.0"}o(Wst,"detectXmlVersionFromObj");function lG(t,e,r,n,i){return!r.sanitizeName||Kh(t,{xmlVersion:i})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}o(lG,"resolveTagName");hs.prototype.build=function(t){if(this.options.preserveOrder)return oG(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new Dc,r=Wst(t,this.options);return this.j2x(t,0,e,r).val}};hs.prototype.j2x=function(t,e,r,n){let i="",s="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let a=this.options.jPath?r.toString():r,c=this.checkStopNode(r);for(let l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;let d=l===this.options.textNodeName||l===this.options.cdataPropName||l===this.options.commentPropName||this.options.attributesGroupName&&l===this.options.attributesGroupName||this.isAttribute(l)||l[0]==="?"?l:lG(l,!1,this.options,r,n);if(typeof t[l]>"u")this.isAttribute(l)&&(s+="");else if(t[l]===null)this.isAttribute(l)||d===this.options.cdataPropName||d===this.options.commentPropName?s+="":d[0]==="?"?s+=this.indentate(e)+"<"+d+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+d+"/"+this.tagEndChar;else if(t[l]instanceof Date)s+=this.buildTextValNode(t[l],d,"",e,r);else if(typeof t[l]!="object"){let f=this.isAttribute(l);if(f&&!this.ignoreAttributesFn(f,a)){let h=lG(f,!0,this.options,r,n);i+=this.buildAttrPairStr(h,""+t[l],c)}else if(!f)if(l===this.options.textNodeName){let h=this.options.tagValueProcessor(l,""+t[l]);s+=this.replaceEntitiesValue(h)}else{r.push(d);let h=this.checkStopNode(r);if(r.pop(),h){let p=""+t[l];p===""?s+=this.indentate(e)+"<"+d+this.closeTag(d)+this.tagEndChar:s+=this.indentate(e)+"<"+d+">"+p+"</"+d+this.tagEndChar}else s+=this.buildTextValNode(t[l],d,"",e,r)}}else if(Array.isArray(t[l])){let f=t[l].length,h="",p="";for(let m=0;m<f;m++){let A=t[l][m];if(!(typeof A>"u"))if(A===null)d[0]==="?"?s+=this.indentate(e)+"<"+d+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+d+"/"+this.tagEndChar;else if(typeof A=="object")if(this.options.oneListGroup){r.push(d);let E=this.j2x(A,e+1,r,n);r.pop(),h+=E.val,this.options.attributesGroupName&&A.hasOwnProperty(this.options.attributesGroupName)&&(p+=E.attrStr)}else h+=this.processTextOrObjNode(A,d,e,r,n);else if(this.options.oneListGroup){let E=this.options.tagValueProcessor(d,A);E=this.replaceEntitiesValue(E),h+=E}else{r.push(d);let E=this.checkStopNode(r);if(r.pop(),E){let y=""+A;y===""?h+=this.indentate(e)+"<"+d+this.closeTag(d)+this.tagEndChar:h+=this.indentate(e)+"<"+d+">"+y+"</"+d+this.tagEndChar}else h+=this.buildTextValNode(A,d,"",e,r)}}this.options.oneListGroup&&(h=this.buildObjectNode(h,d,p,e)),s+=h}else if(this.options.attributesGroupName&&l===this.options.attributesGroupName){let f=Object.keys(t[l]),h=f.length;for(let p=0;p<h;p++){let m=lG(f[p],!0,this.options,r,n);i+=this.buildAttrPairStr(m,""+t[l][f[p]],c)}}else s+=this.processTextOrObjNode(t[l],d,e,r,n)}return{attrStr:i,val:s}};hs.prototype.buildAttrPairStr=function(t,e,r){return r||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+Vd(e)+'"'};function Jst(t,e,r,n,i){let s=this.extractAttributes(t);if(n.push(e,s),this.checkStopNode(n)){let l=this.buildRawContent(t),u=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(l,e,u,r)}let c=this.j2x(t,r+1,n,i);return n.pop(),e[0]==="?"?this.buildTextValNode("",e,c.attrStr,r,n):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,c.attrStr,r,n):this.buildObjectNode(c.val,e,c.attrStr,r)}o(Jst,"processTextOrObjNode");hs.prototype.extractAttributes=function(t){if(!t||typeof t!="object")return null;let e={},r=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let n=t[this.options.attributesGroupName];for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let s=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i;e[s]=Vd(n[i]),r=!0}}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=this.isAttribute(n);i&&(e[i]=Vd(t[n]),r=!0)}return r?e:null};hs.prototype.buildRawContent=function(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return String(t);if(t[this.options.textNodeName]!==void 0)return t[this.options.textNodeName];let e="";for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||this.isAttribute(r)||this.options.attributesGroupName&&r===this.o
Line truncated
|
|
|
|
|
`)+`
|
|
|
|
|
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(Ge.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===Ge.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(i=>i.name.toLowerCase().startsWith(Ge.PREFIX_FOR_STORAGE));r.sort((i,s)=>UN(i.name.toLowerCase(),s.name.toLowerCase())),r=r.filter((i,s,a)=>!(s>0&&i.name.toLowerCase()===a[s-1].name.toLowerCase()));let n="";return r.forEach(i=>{n+=`${i.name.toLowerCase().trimRight()}:${i.value.trimLeft()}
|
|
|
|
|
`}),n}getCanonicalizedResourceString(e){let r=LN(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let i=MN(e.url),s={};if(i){let a=[];for(let c in i)if(Object.prototype.hasOwnProperty.call(i,c)){let l=c.toLowerCase();s[l]=i[c],a.push(l)}a.sort();for(let c of a)n+=`
|
|
|
|
|
${c}:${decodeURIComponent(s[c])}`}return n}};var vr=class extends ep{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new Q0(e,r,this)}computeHMACSHA256(e){return(0,cAe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var pn=Nc("storage-common");var Oo;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Oo||(Oo={}));var jd={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Oo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},iot=new Ws("The operation was aborted."),k0=class extends Qc{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=jd){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:jd.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):jd.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:jd.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:jd.maxRetryDelayInMs):jd.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:jd.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:jd.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let i=e.clone(),s=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;s||(i.url=ON(i.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(i.url=$d(i.url,Cu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(pn.info(`RetryPolicy: =====> Try=${n} ${s?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(i),!this.shouldRetry(s,n,a))return a;r=r||!s&&a.status===404}catch(c){if(pn.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(s,n,a,c))throw c}return await this.delay(s,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,i){if(r>=this.retryOptions.maxTries)return pn.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let s=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i){for(let a of s)if(i.name.toUpperCase().includes(a)||i.message.toUpperCase().includes(a)||i.code&&i.code.toString().toUpperCase()===a)return pn.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||i){let a=n?n.status:i?i.statusCode:0;if(!e&&a===404)return pn.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return pn.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(Ge.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return i?.code==="PARSE_ERROR"&&i?.message.startsWith('Error "Error: Unclosed root tag')?(pn.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case Oo.EXPONENTIAL:i=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Oo.FIXED:i=this.retryOptions.retryDelayInMs;break}else i=Math.random()*1e3;return pn.info(`RetryPolicy: Delay for ${i}ms`),FN(i,n,iot)}};var P0=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new k0(e,r,this.retryOptions)}};var sot="storageBrowserPolicy";function lAe(){return{name:sot,async sendRequest(t,e){return Qt||((t.method==="GET"||t.method==="HEAD")&&(t.url=$d(t.url,Cu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Ge.COOKIE),t.headers.delete(Ge.CONTENT_LENGTH)),e(t)}}}o(lAe,"storageBrowserPolicy");var oot="StorageCorrectContentLengthPolicy";function uAe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Ge.CONTENT_LENGTH,Buffer.byteLength(e.body))}return o(t,"correctContentLength"),{name:oot,async sendRequest(e,r){return t(e),r(e)}}}o(uAe,"storageCorrectContentLengthPolicy");var aot="storageRetryPolicy",Eg={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Oo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},cot=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],lot=new Ws("The operation was aborted.");function dAe(t={}){let e=t.retryPolicyType??Eg.retryPolicyType,r=t.maxTries??Eg.maxTries,n=t.retryDelayInMs??Eg.retryDelayInMs,i=t.maxRetryDelayInMs??Eg.maxRetryDelayInMs,s=t.secondaryHost??Eg.secondaryHost,a=t.tryTimeoutInMs??Eg.tryTimeoutInMs;function c({isPrimaryRetry:u,attempt:d,response:f,error:h}){if(d>=r)return
Line truncated
|
|
|
|
|
`)+`
|
|
|
|
|
`+n(s)+i(s),c=(0,fAe.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");s.headers.set(Ge.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}o(e,"signRequest");function r(s,a){let c=s.headers.get(a);return!c||a===Ge.CONTENT_LENGTH&&c==="0"?"":c}o(r,"getHeaderValueToSign");function n(s){let a=[];for(let[l,u]of s.headers)l.toLowerCase().startsWith(Ge.PREFIX_FOR_STORAGE)&&a.push({name:l,value:u});a.sort((l,u)=>UN(l.name.toLowerCase(),u.name.toLowerCase())),a=a.filter((l,u,d)=>!(u>0&&l.name.toLowerCase()===d[u-1].name.toLowerCase()));let c="";return a.forEach(l=>{c+=`${l.name.toLowerCase().trimRight()}:${l.value.trimLeft()}
|
|
|
|
|
`}),c}o(n,"getCanonicalizedHeadersString");function i(s){let a=LN(s.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=MN(s.url),u={};if(l){let d=[];for(let f in l)if(Object.prototype.hasOwnProperty.call(l,f)){let h=f.toLowerCase();u[h]=l[f],d.push(h)}d.sort();for(let f of d)c+=`
|
|
|
|
|
${f}:${decodeURIComponent(u[f])}`}return c}return o(i,"getCanonicalizedResourceString"),{name:uot,async sendRequest(s,a){return e(s),a(s)}}}o(pG,"storageSharedKeyCredentialPolicy");var dot="storageRequestFailureDetailsParserPolicy";function hAe(){return{name:dot,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
|
|
|
|
|
`),r}}}}o(hAe,"storageRequestFailureDetailsParserPolicy");var pAe=require("node:crypto");var qN=class{static{o(this,"UserDelegationKeyCredential")}accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,pAe.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var GN="12.31.0",HN="2026-02-06";var zN="https://storage.azure.com/.default",bu={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var Pa="",AG="*",fot=1*1024*1024;var hot=4*fot;var AAe="AES256",mAe="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",gAe=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],yAe=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],EAe="BlobUsesCustomerSpecifiedEncryption",CAe="BlobDoesNotUseCustomerSpecifiedEncryption",bAe=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function wu(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}o(wu,"isPipelineLike");var O0=class{static{o(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function zr(t,e={}){t||(t=new fr);let r=new O0([],e);return r._credential=t,r}o(zr,"newPipeline");function pot(t){let e=[Aot,wAe,mot,got,yot,Eot,bot];if(t.factories.length){let r=t.factories.filter(n=>!e.some(i=>i(n)));if(r.length){let n=r.some(i=>Cot(i));return{wrappedPolicies:z3(r),afterRetry:n}}}}o(pot,"processDownlevelPipeline");function mG(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?V3(e):hG(),t._coreHttpClient=n);let i=t._corePipeline;if(!i){let s=`azsdk-js-azure-storage-blob/${GN}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${s}`:`${s}`;i=y0({...r,loggingOptions:{additionalAllowedHeaderNames:gAe,additionalAllowedQueryParameters:yAe,logger:TN.info},userAgentOptions:{userAgentPrefix:a},serializationOptions:{stringifyXML:RN,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:dG,serializerOptions:{xml:{xmlCharKey:"#"}}}}),i.removePolicy({phase:"Retry"}),i.removePolicy({name:C3}),i.addPolicy(uAe()),i.addPolicy(dAe(r.retryOptions),{phase:"R
Line truncated
|
|
|
|
|
`),s=e.computeHMACSHA256(i);return{sasQueryParameters:new Ua(t.version,s,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:i}}o(pct,"generateBlobSASQueryParameters20150405");function Act(t,e){if(t=lp(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 i;t.permissions&&(t.blobName?i=Yc.parse(t.permissions.toString()).toString():i=Kc.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?kt(t.startsOn,!1):"",t.expiresOn?kt(t.expiresOn,!1):"",cp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Fa(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(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Ua(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}o(Act,"generateBlobSASQueryParameters20181109");function mct(t,e){if(t=lp(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 i;t.permissions&&(t.blobName?i=Yc.parse(t.permissions.toString()).toString():i=Kc.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?kt(t.startsOn,!1):"",t.expiresOn?kt(t.expiresOn,!1):"",cp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Fa(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(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Ua(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:s}}o(mct,"generateBlobSASQueryParameters20201206");function gct(t,e){if(t=lp(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 i;t.permissions&&(t.blobName?i=Yc.parse(t.permissions.toString()).toString():i=Kc.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?kt(t.startsOn,!1):"",t.expiresOn?kt(t.expiresOn,!1):"",cp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?kt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?kt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Fa(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Ua(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:s}}o(gct,"generateBlobSASQueryParametersUDK20181109");function yct(t,e){if(t=lp(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 i;t.permissions&&(t.blobName?i=Yc.parse(t.permissions.toString()).toString():i=Kc.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?kt(t.startsOn,!1):"",t.expiresOn?kt(t.expiresOn,!1):"",cp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?kt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?kt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Fa(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Ua(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:s}}o(yct,"generateBlobSASQueryParametersUDK20200210");function Ect(t,e){if(t=lp(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 i;t.permissions&&(t.blobName?i=Yc.parse(t.permissions.toString()).toString():i=Kc.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?kt(t.startsOn,!1):"",t.expiresOn?kt(t.expiresOn,!1):"",cp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?kt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?kt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Fa(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Ua(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}o(Ect,"generateBlobSASQueryParametersUDK20201206");function Cct(t,e){if(t=lp(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 i;t.permissions&&(t.blobName?i=Yc.parse(t.permissions.toString()).toString():i=Kc.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?kt(t.startsOn,!1):"",t.expiresOn?kt(t.expiresOn,!1):"",cp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?kt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?kt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Fa(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Ua(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:s}}o(Cct,"generateBlobSASQueryParametersUDK20250705");function cp(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}o(cp,"getCanonicalName");function lp(t){let e=t.version?t.version:HN;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}o(lp,"SASSignatureValuesSanityCheckAndAutofill");var W0=class{static{o(this,"BlobLeaseClient")}_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=dg()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Pa||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Pa||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=>ve(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!==Pa||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Pa||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 i=ve(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,i})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Pa||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Pa||e.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-releaseLease",e,async r=>ve(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async renewLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Pa||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Pa||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default val
Line truncated
|
|
|
|
|
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};Tg.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var hp=class extends Error{static{o(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
|
|
|
|
|
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};hp.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var iw=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var Rlt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},o8=class{static{o(this,"UploadProgress")}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,i=(e/(1024*1024)/(n/1e3)).toFixed(1);D(`Sent ${e} of ${this.contentLength} (${r}%), ${i} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Bge(t,e,r){return Rlt(this,void 0,void 0,function*(){var n;let i=new qa(t),s=i.getBlockBlobClient(),a=new o8((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),v(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let l=yield s.uploadFile(e,c);if(l._response.status>=400)throw new W_(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw xe(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}o(Bge,"uploadCacheArchiveSDK");var vge=T(require("buffer"),1),Xc=T(require("fs"),1),Nge=T(require("stream"),1),_ge=T(require("util"),1);var J_=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function Y_(t){return t?t>=200&&t<300:!1}o(Y_,"isSuccessStatusCode");function Tlt(t){return t?t>=500:!0}o(Tlt,"isServerErrorStatusCode");function Dlt(t){return t?[xr.BadGateway,xr.ServiceUnavailable,xr.GatewayTimeout].includes(t):!1}o(Dlt,"isRetryableStatusCode");function Qlt(t){return J_(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(Qlt,"sleep");function xge(t,e,r){return J_(this,arguments,void 0,function*(n,i,s,a=Ev,c=Cv,l=void 0){let u="",d=1;for(;d<=a;){let f,h,p=!1;try{f=yield i()}catch(m){l&&(f=l(m)),p=!0,u=m.message}if(f&&(h=s(f),!Tlt(h)))return f;if(h&&(p=Dlt(h),u=`Cache service responded with ${h}`),v(`${n} - Attempt ${d} of ${a} failed with error: ${u}`),!p){v(`${n} - Error is not retryable`);break}yield Qlt(c),d++}throw Error(`${n} failed: ${u}`)})}o(xge,"retry");function sw(t,e){return J_(this,arguments,void 0,function*(r,n,i=Ev,s=Cv){return yield xge(r,n,a=>a.statusCode,i,s,a=>{if(a instanceof Sc)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(sw,"retryTypedResponse");function Dg(t,e){return J_(this,arguments,void 0,function*(r,n,i=Ev,s=Cv){return yield xge(r,n,a=>a.message.statusCode,i,s)})}o(Dg,"retryHttpClientResponse");var qo=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function klt(t,e){return qo(this,void 0,void 0,function*(){yield _ge.promisify(Nge.pipeline)(t.message,e)})}o(klt,"pipeResponseToStream");var K_=class{static{o(this,"DownloadProgress")}constructor(e){this.contentLength=e,this.segmentIndex=0,this.segmentSize=0,this.segmentOffset=0,this.receivedBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize,this.segmentIndex=this.segmentIndex+1,this.segmentSize=e,this.receivedBytes=0,v(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){th
Line truncated
|
|
|
|
|
Other caches with similar key:`);for(let c of s?.artifactCaches||[])v(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}o(qlt,"printCachesListForDiagnostics");function d8(t,e,r){return As(this,void 0,void 0,function*(){let n=new Gge.URL(t),i=Qge(r);n.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield Tge(t,e,i):i.concurrentBlobDownloads?yield Rge(t,e,i):yield X_(t,e):yield X_(t,e)})}o(d8,"downloadCache");function zge(t,e,r){return As(this,void 0,void 0,function*(){let n=u8(),i=rg(e,r?.compressionMethod,r?.enableCrossOsArchive),s={key:t,version:i,cacheSize:r?.cacheSize};return yield sw("reserveCache",()=>As(this,void 0,void 0,function*(){return n.postJson(aw("caches"),s)}))})}o(zge,"reserveCache");function qge(t,e){return`bytes ${t}-${e}/*`}o(qge,"getContentRange");function Glt(t,e,r,n,i){return As(this,void 0,void 0,function*(){v(`Uploading chunk of size ${i-n+1} bytes at offset ${n} with content range: ${qge(n,i)}`);let s={"Content-Type":"application/octet-stream","Content-Range":qge(n,i)},a=yield Dg(`uploadChunk (start: ${n}, end: ${i})`,()=>As(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),s)}));if(!Y_(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}o(Glt,"uploadChunk");function Hlt(t,e,r,n){return As(this,void 0,void 0,function*(){let i=Ic(r),s=aw(`caches/${e.toString()}`),a=Qg.openSync(r,"r"),c=a8(n),l=Qq("uploadConcurrency",c.uploadConcurrency),u=Qq("uploadChunkSize",c.uploadChunkSize),d=[...new Array(l).keys()];v("Awaiting all uploads");let f=0;try{yield Promise.all(d.map(()=>As(this,void 0,void 0,function*(){for(;f<i;){let h=Math.min(i-f,u),p=f,m=f+h-1;f+=u,yield Glt(t,s,()=>Qg.createReadStream(r,{fd:a,start:p,end:m,autoClose:!1}).on("error",A=>{throw new Error(`Cache upload failed because file read failed with ${A.message}`)}),p,m)}})))}finally{Qg.closeSync(a)}})}o(Hlt,"uploadFile");function zlt(t,e,r){return As(this,void 0,void 0,function*(){let n={size:r};return yield sw("commitCache",()=>As(this,void 0,void 0,function*(){return t.postJson(aw(`caches/${e.toString()}`),n)}))})}o(zlt,"commitCache");function f8(t,e,r,n){return As(this,void 0,void 0,function*(){if(a8(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Bge(r,e,n)}else{let s=u8();v("Upload cache"),yield Hlt(s,t,e,n),v("Commiting cache");let a=Ic(e);D(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield zlt(s,t,a);if(!Y_(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);D("Cache saved successfully")}})}o(f8,"saveCache");var Lye=T(nz(),1),$r=T(nt(),1),eo=T(nt(),1),yp=T(nt(),1),Ep=T(nt(),1),Cp=T(nt(),1);var az=T(nt(),1),cz=T(nt(),1),kye=T(nt(),1),Pye=T(nt(),1),Oye=T(nt(),1);var iz=T(nt(),1),sz=T(nt(),1),Tye=T(nt(),1),Dye=T(nt(),1),Qye=T(nt(),1);var oz=class extends Qye.MessageType{static{o(this,"CacheScope$Type")}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,Dye.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Tye.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:s.scope=e.string();break;case 2:s.permission=e.int64().toString();break;default:let u=n.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${l}) for ${this.typeName}`);let d=e.skip(l);u!==!1&&(u===!0?sz.UnknownFieldHandler.onRead:u)(this.typeName,s,c,l,d)}}return s}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,iz.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,iz.WireType.Varint).int64(e.permission);let i=n.writeUnknownFields;return i!==!1&&(i==!0?sz.UnknownFieldHandler.onWrite:i)(this.typeName,e,r),r}},FR=new oz;var lz=class extends Oye.MessageType{static{o(this,"CacheMetadata$Type")}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:o(()=>FR,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,Pye.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,kye.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,i){let s=i??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:s.repositoryId=e.int64().toString();break;case 2:s.scope.push(FR.internalBinaryRead(e,e.uint32(),n));break;default:let u=n.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${l}) for ${this.typeName}`);let d=e.skip(l);u!==!1&&(u===!0?cz.UnknownFieldHandler.onRead:u)(this.typeName,s,c,l,d)}}return s}internalBinaryWrite(e,r,n){e.repositoryId!=="
Line truncated
|
|
|
|
|
`));let{commands:n}=yield Uye(r,"create");yield Gye(n,t)})}o(xz,"createTar");var Jg=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},za=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},bp=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},vz="cache write denied:",HR=class t extends bp{static{o(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},zye=bv,zR=class t extends Error{static{o(this,"CacheReadDeniedError")}constructor(e){super(e),this.name="CacheReadDeniedError",Object.setPrototypeOf(this,t.prototype)}},VR=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Vye(t){if(!t||t.length===0)throw new za("Path Validation Error: At least one directory or file path is required")}o(Vye,"checkPaths");function Nz(t){if(t.length>512)throw new za(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new za(`Key Validation Error: ${t} cannot contain commas.`)}o(Nz,"checkKey");function _z(){return ow()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(_z,"isFeatureAvailable");function $ye(t,e,r,n){return Jg(this,arguments,void 0,function*(i,s,a,c,l=!1){let u=ow();v(`Cache service version: ${u}`),Vye(i);let d=l8();if(!Pge(d)){D(`Cache restore skipped: the effective cache-mode '${d}' does not permit reads.`),v(`Skipped restore for paths [${i.join(", ")}] with primary key '${s}'.`);return}return u==="v2"?yield sft(i,s,a,c,l):yield ift(i,s,a,c,l)})}o($ye,"restoreCache");function ift(t,e,r,n){return Jg(this,arguments,void 0,function*(i,s,a,c,l=!1){var u;a=a||[];let d=[s,...a];if(v("Resolved Keys:"),v(JSON.stringify(d)),d.length>10)throw new za("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of d)Nz(p);let f=yield s0(),h="";try{let p;try{p=yield Hge(d,i,{compressionMethod:f,enableCrossOsArchive:l})}catch(A){let E=(u=A?.message)!==null&&u!==void 0?u:"";throw E.includes(zye)?new zR(E):A}if(!p?.archiveLocation)return;if(c?.lookupOnly)return D("Lookup only - skipping download"),p.cacheKey;h=Iw.join(yield qh(),Md(f)),v(`Archive Path: ${h}`),yield d8(p.archiveLocation,h,c),Ph()&&(yield ww(h,f));let m=Ic(h);return D(`Cache Size: ~${Math.round(m/(1024*1024))} MB (${m} B)`),yield Bz(h,f),D("Cache restored successfully"),p.cacheKey}catch(p){let m=p;if(m.name===za.name)throw p;m instanceof Sc&&typeof m.statusCode=="number"&&m.statusCode>=500?_a(`Failed to restore: ${p.message}`):xe(`Failed to restore: ${p.message}`)}finally{try{yield i0(h)}catch(p){v(`Failed to delete archive: ${p}`)}}})}o(ift,"restoreCacheV1");function sft(t,e,r,n){return Jg(this,arguments,void 0,function*(i,s,a,c,l=!1){var u;c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let d=[s,...a];if(v("Resolved Keys:"),v(JSON.stringify(d)),d.length>10)throw new za("Key Validation Error: Keys are limited to a maximum of 10.");for(let h of d)Nz(h);let f="";try{let h=Iz(),p=yield s0(),m={key:s,restoreKeys:a,version:rg(i,p,l)},A;try{A=yield h.GetCacheEntryDownloadURL(m)}catch(C){let w=(u=C?.message)!==null&&u!==void 0?u:"";throw w.includes(zye)?new zR(w):C}if(!A.ok){v(`Cache not found for version ${m.version} of keys: ${d.join(", ")}`);return}if(m.key!==A.matchedKey?D(`Cache hit for restore-key: ${A.matchedKey}`):D(`Cache hit for: ${A.matchedKey}`),c?.lookupOnly)return D("Lookup only - skipping download"),A.matchedKey;f=Iw.join(yield qh(),Md(p)),v(`Archive path: ${f}`),v(`Starting download of archive to: ${f}`),yield d8(A.signedDownloadUrl,f,c);let y=Ic(f);return D(`Cache Size: ~${Math.round(y/(1024*1024))} MB (${y} B)`),Ph()&&(yield ww(f,p)),yield Bz(f,p),D("Cache restored successfully"),A.matchedKey}catch(h){let p=h;if(p.name===za.name)throw h;p instanceof Sc&&typeof p.statusCode=="number"&&p.statusCode>=500?_a(`Failed to restore: ${h.message}`):xe(`Failed to restore: ${h.message}`)}finally{try{f&&(yield i0(f))}catch(h){v(`Failed to delete archive: ${h}`)}}})}o(sft,"restoreCacheV2");function Rz(t,e,r){return Jg(this,arguments,void 0,function*(n,i,s,a=!1){let c=ow();v(`Cache service version: ${c}`),Vye(n),Nz(i);let l=l8();return Oge(l)?c==="v2"?yield aft(n,i,s,a):yield oft(n,i,s,a):(D(`Cache save skipped: the effective cache-mode '${l}' does not permit writes.`),v(`Skipped save for paths [${n.join(", ")}] with key '${i}'.`),-1)})}o(Rz,"saveCache");function oft(t,e,r){return Jg(this,ar
Line truncated
|
|
|
|
|
`,a).length:f,u?(c===null?0:c.length)+l.length:0,u?l.length+f:0);return h<p},"__needMoreData"),parse:o(function(n,i,s,a){let{bom:c,comment_no_infix:l,delimiter_auto:u,encoding:d,from_line:f,ltrim:h,max_record_size:p,raw:m,relax_quotes:A,rtrim:E,skip_empty_lines:y,to:C,to_line:w}=this.options,{comment:B,escape:k,quote:F,record_delimiter:N}=this.options,{bomSkipped:$,delimiterDiscovered:Q,delimiterBufPrevious:G,rawBuffer:z,escapeIsQuote:j}=this.state;if(!Q&&u){let he;if(G===void 0?he=n:G!==void 0&&n===void 0?he=G:he=Buffer.concat([G,n]),n=void 0,i||he.length>u.size)this.options.delimiter=[Buffer.from(lwe(he,this.options.delimiter_auto))],this.state.previousBuf=he,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=he;return}}let{previousBuf:oe}=this.state,se;if(oe===void 0)if(n===void 0){a();return}else se=n;else oe!==void 0&&n===void 0?se=oe:se=Buffer.concat([oe,n]);if($===!1)if(c===!1)this.state.bomSkipped=!0;else if(se.length<3){if(i===!1){this.state.previousBuf=se;return}}else{for(let he in hy)if(hy[he].compare(se,0,hy[he].length)===0){let Tt=hy[he].length;this.state.bufBytesStart+=Tt,se=se.slice(Tt);let yt=fy({...this.original_options,encoding:he});for(let or in yt)this.options[or]=yt[or];({comment:B,escape:k,quote:F}=this.options);break}this.state.bomSkipped=!0}let Ie=se.length,J;for(J=0;J<Ie&&!this.__needMoreData(J,Ie,i);J++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),w!==-1&&this.info.lines>w){this.state.stop=!0,a();return}this.state.quoting===!1&&N.length===0&&this.__autoDiscoverRecordDelimiter(se,J)&&(N=this.options.record_delimiter);let he=se[J];if(m===!0&&z.append(he),(he===Fyt||he===Uyt)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(k!==null&&this.state.quoting===!0&&this.__isEscape(se,J,he)&&J+k.length<Ie)if(j){if(this.__isQuote(se,J+k.length)){this.state.escaping=!0,J+=k.length-1;continue}}else{this.state.escaping=!0,J+=k.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(se,J))if(this.state.quoting===!0){let or=se[J+F.length],ar=E&&this.__isCharTrimable(se,J+F.length),Zi=B!==null&&this.__compareBytes(B,se,J+F.length,or),Si=this.__isDelimiter(se,J+F.length,or),ac=N.length===0?this.__autoDiscoverRecordDelimiter(se,J+F.length):this.__isRecordDelimiter(or,se,J+F.length);if(k!==null&&this.__isEscape(se,J,he)&&this.__isQuote(se,J+k.length))J+=k.length-1;else if(!or||Si||ac||Zi||ar){this.state.quoting=!1,this.state.wasQuoting=!0,J+=F.length-1;continue}else if(A===!1){let eh=this.__error(new ct("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(or)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(eh!==void 0)return eh}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(F),J+=F.length-1}else if(this.state.field.length!==0){if(A===!1){let or=this.__infoField(),ar=Object.keys(hy).map(Si=>hy[Si].equals(this.state.field.toString())?Si:!1).filter(Boolean)[0],Zi=this.__error(new ct("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(or.column)} at line ${or.lines}, value is ${JSON.stringify(this.state.field.toString(d))}`,ar?`(${ar} bom)`:void 0],this.options,or,{field:this.state.field}));if(Zi!==void 0)return Zi}}else{this.state.quoting=!0,J+=F.length-1;continue}if(this.state.quoting===!1){let or=this.__isRecordDelimiter(he,se,J);if(or!==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)>=f){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),J+=or-1;continue}if(y===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,J+=or-1;continue}this.info.bytes=this.state.bufBytesStart+J;let Si=this.__onField();if(Si!==void 0)return Si;this.info.bytes=this.state.bufBytesStart+J+or;let ac=this.__onRecord(s);if(ac!==void 0)return ac;if(C!==-1&&this.info.records>=C){this.state.stop=!0,a();return}}this.state.commenting=!1,J+=or-1;continue}if(this.state.commenting)continue;if(B!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(B,se,J,he)!==0){this.state.commenting=!0;continue}let ar=this.__isDelimiter(se,J,he);if(ar!==0){this.info.bytes=this.state.bufBytesStart+J;let Zi=this.__onField();if(Zi!==void 0)return Zi;J+=ar-1;continue}}}if(this.state.commenting===!1&&p!==0&&this.state.record_length+this.state.field.length>p)return this.__error(new ct("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${p}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let Tt=h===!1||this.state.quot
Line truncated
|
|
|
|
|
`,s),Buffer.from(`
|
|
|
|
|
`,s),Buffer.from("\r",s)];e:for(let c=0;c<a.length;c++){let l=a[c].length;for(let u=0;u<l;u++)if(a[c][u]!==n[i+u])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:o(function(n){let{encoding:i,raw:s,skip_records_with_error:a}=this.options,c=typeof n=="string"?new Error(n):n;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,s?this.state.rawBuffer.toString(i):void 0)}catch(l){return l}return}else return c},"__error"),__infoDataSet:o(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:o(function(){let{columns:n,raw:i,encoding:s}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:i?this.state.rawBuffer.toString(s):void 0}},"__infoRecord"),__infoField:o(function(){let{columns:n}=this.options,i=Array.isArray(n),s=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:s,column:i===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var no=o(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=$T(e),i=o(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),s=o(()=>{},"close"),a=n.parse(t,!0,i,s);if(a!==void 0)throw a;return r},"parse");var ee=class t{static{o(this,"Util")}static getInputList(e,r){return this.getList(Vn(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let n=[];if(e=="")return n;let i=no(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let s of i)s.length==1?r?.ignoreComma?n.push(s[0]):n.push(...s[0].split(",")):r?.ignoreComma?n.push(s.join(",")):n.push(...s);return n.filter(s=>s).map(s=>r?.trimWhitespace===!1?s:s.trim())}static getInputNumber(e){let r=Vn(e);if(r)return parseInt(r)}static async asyncForEach(e,r){for(let n=0;n<e.length;n++)await r(e[n],n,e)}static isValidURL(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}static isValidRef(e){if(t.isValidURL(e))return!0;for(let r of["git://","github.com/","git@"])if(e.startsWith(r))return!0;return!1}static async powershellCommand(e,r){let n=await zn("powershell",!0),i=e.replace(/'/g,"''"),s=[];if(r)for(let a in r)s.push(`-${a} '${r[a].replace(/'/g,"''")}'`);return{command:`"${n}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-EncodedCommand",Buffer.from(`& '${i}' ${s.join(" ")}`,"utf16le").toString("base64")]}}static isDirectory(e){try{return dwe.default.lstatSync(e).isDirectory()}catch{}return!1}static trimPrefix(e,r){return!e||!r||e.indexOf(r)!==0?e:e.substring(r.length)}static trimSuffix(e,r){if(!e||!r)return e;let n=e.lastIndexOf(r);return n===-1||n+r.length!==e.length?e:e.substring(0,n)}static sleep(e){return new Promise(r=>setTimeout(r,e*1e3))}static hash(e){return n6.default.createHash("sha256").update(e).digest("hex")}static parseBool(e){if(e===void 0)return!1;switch(e){case"1":case"t":case"T":case"true":case"TRUE":case"True":return!0;case"0":case"f":case"F":case"false":case"FALSE":case"False":return!1;default:throw new Error(`parseBool syntax error: ${e}`)}}static parseBoolOrDefault(e,r=!1){try{return this.parseBool(e)}catch{return r}}static formatFileSize(e){if(e===0)return"0 Bytes";let r=1024,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,i)).toFixed(2))+" "+n[i]}static generateRandomString(e=10){return n6.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,n){return fwe.default.compile(e,r)(n)}static stringToUnicodeEntities(e){return Array.from(e).map(r=>`&#x${r.charCodeAt(0).toString(16)};`).join("")}static countLines(e){return e.split(/\r\n|\r|\n/).length}static isPathRelativeTo(e,r){let n=Uw.default.resolve(e);return Uw.default.resolve(r).startsWith(n.endsWith(Uw.default.sep)?n:`${n}${Uw.default.sep}`)}static formatDuration(e){if(e===0)return"0s";let r=Math.floor(e/1e9),n=Math.floor(r/3600),i=Math.floor(r%3600/60),s=r%60,a=[];return n&&a.push(`${n}h`),i&&a.push(`${i}m`),(s||a.length===0)&&a.push(`${s}s`),a.join("")}};var jr=class t{static{o(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||qw.default.join(hwe.default.homedir(),".docker")}static configFile(){let e=qw.default.join(t.configDir,"config.json");if(i6.default.existsSync(e))return JSON.parse(i6.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await zn("docker",!0).then(e=>(v(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(v(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0
Line truncated
|
|
|
|
|
${i}`)},"onRetry")})}static isPullTransientError(e){return/Client\.Timeout exceeded|TLS handshake timeout|i\/o timeout|context deadline exceeded|request canceled|connection reset by peer|connection refused|connection timed out|temporary failure|unexpected EOF|\bEOF\b|server misbehaving/i.test(e)||/\b(500|502|503|504)\b/.test(e)||/\b(service unavailable|bad gateway|gateway timeout|internal server error)\b/i.test(e)}};var hIe=T(require("crypto"),1);var jT=require("fs"),mwe=require("os");var py=class{static{o(this,"Context")}constructor(){var e,r,n;if(this.payload={},process.env.GITHUB_EVENT_PATH)if((0,jT.existsSync)(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse((0,jT.readFileSync)(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}));else{let i=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${i} does not exist${mwe.EOL}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:"https://api.github.com",this.serverUrl=(r=process.env.GITHUB_SERVER_URL)!==null&&r!==void 0?r:"https://github.com",this.graphqlUrl=(n=process.env.GITHUB_GRAPHQL_URL)!==null&&n!==void 0?n:"https://api.github.com/graphql"}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,r]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:r}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}};var c6=T(bwe(),1),wwe=T(Rh(),1);var Zyt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function Iwe(t,e){if(!t&&!e.auth)throw new Error("Parameter token or opts.auth is required");if(t&&e.auth)throw new Error("Parameters token and opts.auth may not both be specified");return typeof e.auth=="string"?e.auth:`token ${t}`}o(Iwe,"getAuthString");function Swe(t){return new c6.HttpClient().getAgent(t)}o(Swe,"getProxyAgent");function eEt(t){return new c6.HttpClient().getAgentDispatcher(t)}o(eEt,"getProxyAgentDispatcher");function Bwe(t){let e=eEt(t);return o((n,i)=>Zyt(this,void 0,void 0,function*(){return(0,wwe.fetch)(n,Object.assign(Object.assign({},i),{dispatcher:e}))}),"proxyFetch")}o(Bwe,"getProxyFetch");function xwe(){return process.env.GITHUB_API_URL||"https://api.github.com"}o(xwe,"getApiBaseUrl");function l6(t){var e;let r=(e=process.env.ACTIONS_ORCHESTRATION_ID)===null||e===void 0?void 0:e.trim();if(r){let i=`actions_orchestration_id/${r.replace(/[^a-z0-9_.-]/gi,"_")}`;return t?.includes(i)?t:`${t?`${t} `:""}${i}`}return t}o(l6,"getUserAgentWithOrchestrationId");function af(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:"<environment undetectable>"}o(af,"getUserAgent");function e1(t,e,r,n){if(typeof r!="function")throw new Error("method for before hook must be a function");return n||(n={}),Array.isArray(e)?e.reverse().reduce((i,s)=>e1.bind(null,t,s,i,n),r)():Promise.resolve().then(()=>t.registry[e]?t.registry[e].reduce((i,s)=>s.hook.bind(null,i,n),r)():r(n))}o(e1,"register");function vwe(t,e,r,n){let i=n;t.registry[r]||(t.registry[r]=[]),e==="before"&&(n=o((s,a)=>Promise.resolve().then(i.bind(null,a)).then(s.bind(null,a)),"hook")),e==="after"&&(n=o((s,a)=>{let c;return Promise.resolve().then(s.bind(null,a)).then(l=>(c=l,i(c,a))).then(()=>c)},"hook")),e==="error"&&(n=o((s,a)=>Promise.resolve().then(s.bind(null,a)).catch(c=>i(c,a)),"hook")),t.registry[r].push({hook:n,orig:i})}o(vwe,"addHook");function Nwe(t,e,r){if(!t.registry[e])return;let n=t.registry[e].map(i=>i.orig).indexOf(r);n!==-1&&t.registry[e].splice(n,1)}o(Nwe,"removeHook");var _we=Function.bind,Rwe=_we.bind(_we);function Twe(t,e,r){let n=Rwe(Nwe,null).apply(null,r?[e,r]:[e]);t.api={remove:n},t.remove=n,["before","error","after","wrap"].forEach(i=>{let s=r?[e,i,r]:[e,i];t[i]=t.api[i]=Rwe(vwe,null).apply(null,s)})}o(Twe,"bindApi");function rEt(){let t=Symbol("Singular"),e={registry:{}},r=e1.bind(null,e,t);return Twe(r,e,t),r}o(rEt,"Singular");function nEt(){let t={registry:{}},e=e1.bind(null,
Line truncated
|
|
|
|
|
`+t.errors.map(e=>` - ${e.message}`).join(`
|
|
|
|
|
`)}o(DEt,"_buildMessageForResponseErrors");var QEt=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(DEt(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},kEt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],PEt=["query","method","url"],Zwe=/\/api\/v3\/?$/;function OEt(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(PEt.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,i=Object.keys(n).reduce((a,c)=>kEt.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Zwe.test(s)&&(i.url=s.replace(Zwe,"/api/graphql")),t(i).then(a=>{if(a.data.errors){let c={};for(let l of Object.keys(a.headers))c[l]=a.headers[l];throw new QEt(i,c,a.data)}return a.data.data})}o(OEt,"graphql");function A6(t,e){let r=t.defaults(e);return Object.assign(o((i,s)=>OEt(r,i,s),"newApi"),{defaults:A6.bind(null,r),endpoint:r.endpoint})}o(A6,"withDefaults");var ESr=A6(Vw,{headers:{"user-agent":`octokit-graphql.js/${TEt} ${af()}`},method:"POST",url:"/graphql"});function eIe(t){return A6(t,{method:"POST",url:"/graphql"})}o(eIe,"withCustomRequest");var m6="(?:[a-zA-Z0-9_-]+)",tIe="\\.",rIe=new RegExp(`^${m6}${tIe}${m6}${tIe}${m6}$`),LEt=rIe.test.bind(rIe);async function MEt(t){let e=LEt(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}o(MEt,"auth");function FEt(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}o(FEt,"withAuthorizationPrefix");async function UEt(t,e,r,n){let i=e.endpoint.merge(r,n);return i.headers.authorization=FEt(t),e(i)}o(UEt,"hook");var nIe=o(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(MEt.bind(null,e),{hook:UEt.bind(null,e)})},"createTokenAuth2");var g6="7.0.6";var iIe=o(()=>{},"noop"),qEt=console.warn.bind(console),GEt=console.error.bind(console);function HEt(t={}){return typeof t.debug!="function"&&(t.debug=iIe),typeof t.info!="function"&&(t.info=iIe),typeof t.warn!="function"&&(t.warn=qEt),typeof t.error!="function"&&(t.error=GEt),t}o(HEt,"createLogger");var sIe=`octokit-core.js/${g6} ${af()}`,i1=class{static{o(this,"Octokit")}static VERSION=g6;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}constructor(...n){let i=n[0]||{};if(typeof e=="function"){super(e(i));return}super(Object.assign({},e,i,i.userAgent&&e.userAgent?{userAgent:`${i.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{o(this,"NewOctokit")}static plugins=r.concat(e.filter(i=>!r.includes(i)))}}constructor(e={}){let r=new Dwe.Collection,n={baseUrl:Vw.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${sIe}`:sIe,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=Vw.defaults(n),this.graphql=eIe(this.request).defaults(n),this.log=HEt(e.log),this.hook=r,e.authStrategy){let{authStrategy:s,...a}=e,c=s(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let s=nIe(e.auth);r.wrap("request",s.hook),this.auth=s}let i=this.constructor;for(let s=0;s<i.plugins.length;++s)Object.assign(this,i.plugins[s](this,e))}request;graphql;log;hook;auth};var y6="17.0.0";var zEt={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"
Line truncated
|
|
|
|
|
More info: ${l.url}`);let p=l.range&&l.range.length>0?l.range[0]?.start.line:void 0,m=!1;for(let A of a)if(A.remote||A.path.endsWith(u)&&A.content===d){c.push({title:f,message:h,file:A.path,startLine:p}),m=!0;break}m||v(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${u}: ${f}`)}return c}};var N6=T(require("fs"),1),_6=T(require("path"),1);var u1=class t{static{o(this,"History")}buildx;constructor(e){this.buildx=e?.buildx||new pt}async getCommand(e){return await this.buildx.getCommand(["history",...e])}async getInspectCommand(e){return await this.getCommand(["inspect",...e])}async getExportCommand(e){return await this.getCommand(["export",...e])}async inspect(e){let r=["--format","json"];e.builder&&r.push("--builder",e.builder),e.ref&&r.push(e.ref);let n=await this.getInspectCommand(r);return await Ne.getExecOutput(n.command,n.args,{ignoreReturnCode:!0,silent:!0}).then(i=>{if(i.stderr.length>0&&i.exitCode!=0)throw new Error(i.stderr.trim());return JSON.parse(i.stdout)})}async export(e){if(!await this.buildx.versionSatisfies(">=0.23.0"))throw new Error("Buildx >= 0.23.0 is required to export a build record");let r="",n="",i=[];for(let f of e.refs){let h=f.split("/");if(h.length!=3)throw new Error(`Invalid build ref: ${f}`);i.push(h[2]),r||(r=h[0]),n||(n=h[1])}if(i.length===0)throw new Error("No build refs provided");let s=_6.default.join(ht.tmpDir(),"export");D(`exporting build record to ${s}`),N6.default.mkdirSync(s,{recursive:!0}),await this.buildx.versionSatisfies("<0.24.0")&&await ee.sleep(3);let a={};if(!e.noSummaries)for(let f of i)await this.inspect({ref:f,builder:r}).then(h=>{let p="";h.Error&&h.Status!=="canceled"&&(h.Error.Message?p=h.Error.Message:h.Error.Name&&h.Error.Logs&&(p=`=> ${h.Error.Name}
|
|
|
|
|
${h.Error.Logs}`)),a[f]={name:h.Name,status:h.Status,duration:ee.formatDuration(h.Duration),numCachedSteps:h.NumCachedSteps,numTotalSteps:h.NumTotalSteps,numCompletedSteps:h.NumCompletedSteps,defaultPlatform:h.Platform?.[0],error:p}});let c=_6.default.join(s,`${t.exportFilename(i)}.dockerbuild`),l=["--builder",r,"--output",c,...i];await this.buildx.versionSatisfies(">=0.24.0")&&l.push("--finalize");let u=await this.getExportCommand(l);await Ne.getExecOutput(u.command,u.args);let d=N6.default.statSync(c);return{dockerbuildFilename:c,dockerbuildSize:d.size,builderName:r,nodeName:n,refs:i,summaries:a}}static exportFilename(e){let r=`${Ke.context.repo.owner}~${Ke.context.repo.repo}~${e[0].substring(0,6).toUpperCase()}`;return e.length>1&&(r+=`+${e.length-1}`),r}};var cke=T(require("fs"),1),AJ=T(require("path"),1);var gIe=T(require("os"),1);function Pp(){return 8*1024*1024}o(Pp,"getUploadChunkSize");function d1(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(d1,"getRuntimeToken");function yIe(){let t=process.env.ACTIONS_RESULTS_URL;if(!t)throw new Error("Unable to get the ACTIONS_RESULTS_URL env variable");return new URL(t).origin}o(yIe,"getResultsServiceUrl");function gy(){let e=new URL(process.env.GITHUB_SERVER_URL||"https://github.com").hostname.trimEnd().toUpperCase(),r=e==="GITHUB.COM",n=e.endsWith(".GHE.COM"),i=e.endsWith(".LOCALHOST");return!r&&!n&&!i}o(gy,"isGhes");function EIe(){let t=process.env.GITHUB_WORKSPACE;if(!t)throw new Error("Unable to get the GITHUB_WORKSPACE env variable");return t}o(EIe,"getGitHubWorkspaceDir");function CIe(){let t=gIe.default.cpus().length,e=32;if(t>4){let n=16*t;e=n>300?300:n}let r=process.env.ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY;if(r){let n=parseInt(r);if(isNaN(n)||n<1)throw new Error("Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable");return n<e?(D("Set concurrency based on the value set in ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY."),n):(D(`ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY is higher than the cap of ${e} based on the number of cpus. Set it to the maximum value allowed.`),e)}return 5}o(CIe,"getConcurrency");function bIe(){let t=process.env.ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS;if(!t)return 3e5;let e=parseInt(t);if(isNaN(e))throw new Error("Invalid value set for ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS env variable");return e}o(bIe,"getUploadChunkTimeout");function wIe(){let t=process.env.ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT||"1000",e=parseInt(t);if(isNaN(e)||e<1)throw new Error("Invalid value set for ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT env variable");return e}o(wIe,"getMaxArtifactListCount");var nQe=T(require("fs"),1),iQe=T(require("path"),1);var R6=T(nt(),1),T6=T(nt(),1),IIe=T(nt(),1),SIe=T(nt(),1),BIe=T(nt(),1),yy=T(nt(),1),xIe=T(nt(),1);var D6=class extends xIe.MessageType{static{o(this,"Timestamp$Type")}constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){let e=this.create(),r=Date.now();return e.seconds=yy.PbLong.from(Math.floor(r/1e3)).toString(),e.nanos=r%1e3*1e6,e}toDate(e){return new Date(yy.PbLong.from(e.seconds).toNumber()*1e3+Math.ceil(e.nanos/1e6))}fromDate(e){let r=this.create(),n=e.getTime();return r.seconds=yy.PbLong.from(Math.floor(n/1e3)).toString(),r.nanos=n%1e3*1e6,r}internalJsonWrite(e,r){let n=yy.PbLong.from(e.seconds).toNumber()*1e3;if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(e.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let i="Z";if(e.nanos>0){let s=(e.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?i="."+s.substring(0,3)+"Z":s.substring(6)==="000"?i="."+s.substring(0,6)+"Z":i="."+s+"Z"}return new Date(n).toISOString().replace(".000Z",i)}internalJsonRead(e,r,n){if(typeof e!="string")throw new Error("Unable to parse Timestamp from JSON "+(0,BIe.typeofJsonValue)(e)+".");let i=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!i)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let s=Date.parse(i[1]+"-"+i[2]+"-"+i[3]+"T"+i[4]+":"+i[5]+":"+i[6]+(i[8]?i[8]:"Z"));if(Number.isNaN(s))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return n||(n=this.create()),n.seconds=yy.PbLong.from(s/1e3).toString(),n.nanos=0,i[7]&&(n.nanos=parseInt("1"+i[7]+"0".repeat(9-i[7].length))-1e9),n}create(e){let r={seconds:"0",nanos:0};return globalThis.Object.defineProperty(r,SIe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,IIe.reflectio
Line truncated
|
|
|
|
|
`," Line feed \\n"]]),_Ie=new Map([...d9,["\\"," Backslash \\"],["/"," Forward slash /"]]);function RIe(t){if(!t)throw new Error("Provided artifact name input during validation is empty");for(let[e,r]of _Ie)if(t.includes(e))throw new Error(`The artifact name is not valid: ${t}. Contains the following character: ${r}
|
|
|
|
|
|
|
|
|
|
Invalid characters include: ${Array.from(_Ie.values()).toString()}
|
|
|
|
|
|
|
|
|
|
These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);D("Artifact name is valid!")}o(RIe,"validateArtifactName");function f9(t){if(!t)throw new Error("Provided file path input during validation is empty");for(let[e,r]of d9)if(t.includes(e))throw new Error(`The path for one of the files in artifact is not valid: ${t}. Contains the following character: ${r}
|
|
|
|
|
|
|
|
|
|
Invalid characters include: ${Array.from(d9.values()).toString()}
|
|
|
|
|
|
|
|
|
|
The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
|
|
|
|
|
`)}o(f9,"validateFilePath");var Yw=T(require("http"),1),m9=T(require("https"),1);function h9(t){let e=t.protocol==="https:";if(cCt(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new h1(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new h1(`http://${r}`)}else return}o(h9,"getProxyUrl");function cCt(t){if(!t.hostname)return!1;let e=t.hostname;if(lCt(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let i=[t.hostname.toUpperCase()];typeof n=="number"&&i.push(`${i[0]}:${n}`);for(let s of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(s==="*"||i.some(a=>a===s||a.endsWith(`.${s}`)||s.startsWith(".")&&a.endsWith(`${s}`)))return!0;return!1}o(cCt,"checkBypass");function lCt(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(lCt,"isLoopbackAddress");var h1=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var lf=T($A(),1),TIe=T(Rh(),1);var Yr=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},wn;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(wn||(wn={}));var Hi;(function(t){t.Accept="accept",t.ContentType="content-type"})(Hi||(Hi={}));var Ou;(function(t){t.ApplicationJson="application/json"})(Ou||(Ou={}));var dCt=[wn.MovedPermanently,wn.ResourceMoved,wn.SeeOther,wn.TemporaryRedirect,wn.PermanentRedirect],fCt=[wn.BadGateway,wn.ServiceUnavailable,wn.GatewayTimeout],hCt=["OPTIONS","GET","DELETE","HEAD"],pCt=10,ACt=5,p9=class t extends Error{static{o(this,"HttpClientError")}constructor(e,r){super(e),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,t.prototype)}},A9=class{static{o(this,"HttpClientResponse")}constructor(e){this.message=e}readBody(){return Yr(this,void 0,void 0,function*(){return new Promise(e=>Yr(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n])}),this.message.on("end",()=>{e(r.toString())})}))})}readBodyBuffer(){return Yr(this,void 0,void 0,function*(){return new Promise(e=>Yr(this,void 0,void 0,function*(){let r=[];this.message.on("data",n=>{r.push(n)}),this.message.on("end",()=>{e(Buffer.concat(r))})}))})}};var Cy=class{static{o(this,"HttpClient")}constructor(e,r,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,r){return Yr(this,void 0,void 0,function*(){return this.request("OPTIONS",e,null,r||{})})}get(e,r){return Yr(this,void 0,void 0,function*(){return this.request("GET",e,null,r||{})})}del(e,r){return Yr(this,void 0,void 0,function*(){return this.request("DELETE",e,null,r||{}
Line truncated
|
|
|
|
|
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};Mu.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Op=class extends Error{static{o(this,"UsageError")}constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts.
|
|
|
|
|
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Op.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var A1=new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims");function pl(){let t=d1(),e=c1(t);if(!e.scp)throw A1;let r=e.scp.split(" ");if(r.length===0)throw A1;for(let n of r){let i=n.split(":");if(i?.[0]!=="Actions.Results")continue;if(i.length!==3)throw A1;let s={workflowRunBackendId:i[1],workflowJobRunBackendId:i[2]};return v(`Workflow Run Backend ID: ${s.workflowRunBackendId}`),v(`Workflow Job Run Backend ID: ${s.workflowJobRunBackendId}`),s}throw A1}o(pl,"getBackendIdsFromToken");function OIe(t){if(t)try{let r=new URL(t).searchParams.get("sig");r&&(Us(r),Us(encodeURIComponent(r)))}catch(e){v(`Failed to parse URL: ${t} ${e instanceof Error?e.message:String(e)}`)}}o(OIe,"maskSigUrl");function LIe(t){if(typeof t!="object"||t===null){v("body is not an object or is null");return}"signed_upload_url"in t&&typeof t.signed_upload_url=="string"&&OIe(t.signed_upload_url),"signed_url"in t&&typeof t.signed_url=="string"&&OIe(t.signed_url)}o(LIe,"maskSecretUrls");var m1=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},g9=class{static{o(this,"ArtifactHttpClient")}constructor(e,r,n,i){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=8e3,this.retryMultiplier=1.5,this.retryTimeoutMilliseconds=12e4;let s=d1();this.baseUrl=yIe(),r&&(this.maxAttempts=r),n&&(this.baseRetryIntervalMilliseconds=n),i&&(this.retryMultiplier=i),this.httpClient=new Cy(e,[new p1(s)])}request(e,r,n,i){return m1(this,void 0,void 0,function*(){let s=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;v(`[Request] ${r} ${s}`);let a={"Content-Type":n};try{let{body:c}=yield this.retryableRequest(()=>m1(this,void 0,void 0,function*(){return this.httpClient.post(s,JSON.stringify(i),a)}));return c}catch(c){throw new Error(`Failed to ${r}: ${c.message}`)}})}retryableRequest(e){return m1(this,void 0,void 0,function*(){let r=0,n="",i="",s=0;for(;r<this.maxAttempts;){let a=!1,c;try{let u=yield e(),d=u.message.statusCode;d===wn.TooManyRequests&&(c=this.getRetryAfterSeconds(u)),i=yield u.readBody(),v(`[Response] - ${u.message.statusCode}`),v(`Headers: ${JSON.stringify(u.message.headers,null,2)}`);let f=JSON.parse(i);if(LIe(f),v(`Body: ${JSON.stringify(f,null,2)}`),this.isSuccessStatusCode(d))return{response:u,body:f};if(a=this.isRetryableHttpStatusCode(d),n=`Failed request: (${d}) ${u.message.statusMessage}`,f.msg){if(Op.isUsageErrorMessage(f.msg))throw new Op;n=`${n}: ${f.msg}`}}catch(u){if(u instanceof SyntaxError&&v(`Raw Body: ${i}`),u instanceof Op)throw u;if(Mu.isNetworkErrorCode(u?.code))throw new Mu(u?.code);a=!0,n=u.message}if(!a)throw new Error(`Received non-retryable error: ${n}`);if(r+1===this.maxAttempts)throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${n}`);let l=c!==void 0?c*1e3:this.getExponentialRetryTimeMilliseconds(r);if(s+l>this.retryTimeoutMilliseconds)throw new Error(`Retry wait of ${l} ms would exceed the maximum total retry wait of ${this.retryTimeoutMilliseconds} ms: ${n}`);D(`Attempt ${r+1} of ${this.maxAttempts} failed with error: ${n}. Retrying request in ${l} ms...`),yield this.sleep(l),s+=l,r++}throw new Error("Request failed")})}isSuccessStatusCode(e){return e?e>=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[wn.BadGateway,wn.GatewayTimeout,wn.InternalServerError,wn.ServiceUnavailable,wn.TooManyRequests].includes(e):!1}getRetryAfterSeconds(e){var r;let n=e.message.headers["retry-after"],i=(r=Array.isArray(n)?n[0]:n)===null||r===void 0?void 0:r.trim();if(i===void 0||!/^\d+$/.test(i))return;let s=parseInt(i,10);return!isNaN(s)&&s>0?s:void 0}sleep(e){return m1(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw new Error("attempt should be a positive integer");if(e===0)return this.baseRetryIntervalMilliseconds;let r=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,e),n=r*this.retryMultiplier;return Math.trunc(Math.random()*(n-r)+r)}};function Al(t){let e=new g9(hl(),t?.maxAttempts,t?.retryIntervalMs,t?.retryMultiplier);return new f1(e)}o(Al,"internalArtifactTwirpClient");var Iy=T(require("fs"),1);var wy=require("path");function MIe(t){if(!Iy.existsSync(t))throw new Error(`The provided rootDirectory ${t} does not exist`);if(!Iy.statSync(t).isDirectory())throw new Error(`The provided rootDirectory ${t} is not a valid directory`);D("Root directory input is valid!")}o(MIe,"validateRootDirectory");function FIe(t,e)
Line truncated
|
|
|
|
|
Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`);l.length>1&&xe("Multiple artifacts found, defaulting to first.");let u={workflowRunBackendId:l[0].workflowRunBackendId,workflowJobRunBackendId:l[0].workflowJobRunBackendId,name:l[0].name},{signedUrl:d}=yield n.GetSignedArtifactURL(u);D(`Redirecting to blob download url: ${zQe(d)}`);try{D(`Starting download of artifact to: ${r}`);let f=yield VQe(d,r,e?.skipDecompress);D("Artifact download completed successfully."),e?.expectedHash&&e?.expectedHash!==f.sha256Digest&&(i=!0,v(`Computed digest: ${f.sha256Digest}`),v(`Expected digest: ${e.expectedHash}`))}catch(f){throw new Error(`Unable to download and extract artifact: ${f.message}`)}return{downloadPath:r,digestMismatch:i}})}o(jQe,"downloadArtifactInternal");function WQe(){return EE(this,arguments,void 0,function*(t=EIe()){return(yield mPt(t))?v(`Artifact destination folder already exists: ${t}`):(v(`Artifact destination folder does not exist, creating: ${t}`),yield fJ.default.mkdir(t,{recursive:!0})),t})}o(WQe,"resolveOrCreateDirectory");var yPt=5,EPt=[400,401,403,404,422];function CE(t,e=yPt,r=EPt){var n;if(e<=0)return[{enabled:!1},t.request];let i={enabled:!0};r.length>0&&(i.doNotRetry=r);let s=Object.assign(Object.assign({},t.request),{retries:e});return v(`GitHub client configured with: (retries: ${s.retries}, retry-exempt-status-code: ${(n=i.doNotRetry)!==null&&n!==void 0?n:"octokit default: [400, 401, 403, 404, 422]"})`),[i,s]}o(CE,"getRetryOptions");var JQe="6.0.0";function fA(t){t.hook.wrap("request",(e,r)=>{t.log.debug("request",r);let n=Date.now(),i=t.request.endpoint.parse(r),s=i.url.replace(r.baseUrl,"");return e(r).then(a=>{let c=a.headers["x-github-request-id"];return t.log.info(`${i.method} ${s} - ${a.status} with id ${c} in ${Date.now()-n}ms`),a}).catch(a=>{let c=a.response?.headers["x-github-request-id"]||"UNKNOWN";throw t.log.error(`${i.method} ${s} - ${a.status} with id ${c} in ${Date.now()-n}ms`),a})})}o(fA,"requestLog");fA.VERSION=JQe;var XQe=T(YQe(),1);var NQ=class extends Error{static{o(this,"RequestError")}name;status;request;response;constructor(e,r,n){super(e,{cause:n.cause}),this.name="HttpError",this.status=Number.parseInt(r),Number.isNaN(this.status)&&(this.status=0);"response"in n&&(this.response=n.response);let i=Object.assign({},n.request);n.request.headers.authorization&&(i.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/(?<! ) .*$/," [REDACTED]")})),i.url=i.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]"),this.request=i}};var CPt="0.0.0-development";function bPt(t){return t.request!==void 0}o(bPt,"isRequestError");async function KQe(t,e,r,n){if(!bPt(r)||!r?.request.request)throw r;if(r.status>=400&&!t.doNotRetry.includes(r.status)){let i=n.request.retries!=null?n.request.retries:t.retries,s=Math.pow((n.request.retryCount||0)+1,2);throw e.retry.retryRequest(r,i,s)}throw r}o(KQe,"errorRequest");async function wPt(t,e,r,n){let i=new XQe.default;return i.on("failed",function(s,a){let c=~~s.request.request?.retries,l=~~s.request.request?.retryAfter;if(n.request.retryCount=a.retryCount+1,c>a.retryCount)return l*t.retryAfterBaseValue}),i.schedule(IPt.bind(null,t,e,r),n)}o(wPt,"wrapRequest");async function IPt(t,e,r,n){let i=await r(n);if(i.data&&i.data.errors&&i.data.errors.length>0&&/Something went wrong while executing your query/.test(i.data.errors[0].message)){let s=new NQ(i.data.errors[0].message,500,{request:n,response:i});return KQe(t,e,s,n)}return i}o(IPt,"requestWithGraphqlErrorHandling");function hA(t,e){let r=Object.assign({enabled:!0,retryAfterBaseValue:1e3,doNotRetry:[400,401,403,404,410,422,451],retries:3},e.retry),n={retry:{retryRequest:o((i,s,a)=>(i.request.request=Object.assign({},i.request.request,{retries:s,retryAfter:a}),i),"retryRequest")}};return r.enabled&&(t.hook.error("request",KQe.bind(null,r,n)),t.hook.wrap("request",wPt.bind(null,r,n))),n}o(hA,"retry");hA.VERSION=CPt;var ZQe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function _Q(t,e,r,n,i){return ZQe(this,void 0,void 0,function*(){var s;let[a,c]=CE(Qp),l={log:void 0,userAgent:hl(),previews:void 0,retry:a,request:c},d=yield Xo(i,l,hA,fA).request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}",{owner:r,repo:n,run_id:e,name:t});if(d.status!==200)throw new Wa(`Invalid response from GitHub API: ${d.status} (${(s=d?.headers)===null||s===void 0?void 0:s["x-github-request-id"]})`);if(d.data.artifacts.length===0)throw new Lu(`Artifact not found for name: ${t}
|
|
|
|
|
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
|
|
|
|
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let f=d.data.artifacts[0];return d.data.artifacts.length>1&&(f=d.data.artifacts.sort((h,p)=>p.id-h.id)[0],v(`More than one artifact found for a single name, returning newest (id: ${f.id})`)),{artifact:{name:f.name,id:f.id,size:f.size_in_bytes,createdAt:f.created_at?new Date(f.created_at):void 0,digest:f.digest}}})}o(_Q,"getArtifactPublic");function eke(t){return ZQe(this,void 0,void 0,function*(){var e;let r=Al(),{workflowRunBackendId:n,workflowJobRunBackendId:i}=pl(),s={workflowRunBackendId:n,workflowJobRunBackendId:i,nameFilter:on.create({value:t})},a=yield r.ListArtifacts(s);if(a.artifacts.length===0)throw new Lu(`Artifact not found for name: ${t}
|
|
|
|
|
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
|
|
|
|
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let c=a.artifacts[0];return a.artifacts.length>1&&(c=a.artifacts.sort((l,u)=>Number(u.databaseId)-Number(l.databaseId))[0],v(`More than one artifact found for a single name, returning newest (id: ${c.databaseId})`)),{artifact:{name:c.name,id:Number(c.databaseId),size:Number(c.size),createdAt:c.createdAt?io.toDate(c.createdAt):void 0,digest:(e=c.digest)===null||e===void 0?void 0:e.value}}})}o(eke,"getArtifactInternal");var tke=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function rke(t,e,r,n,i){return tke(this,void 0,void 0,function*(){var s;let[a,c]=CE(Qp),l={log:void 0,userAgent:hl(),previews:void 0,retry:a,request:c},u=Xo(i,l,hA,fA),d=yield _Q(t,e,r,n,i),f=yield u.rest.actions.deleteArtifact({owner:r,repo:n,artifact_id:d.artifact.id});if(f.status!==204)throw new Wa(`Invalid response from GitHub API: ${f.status} (${(s=f?.headers)===null||s===void 0?void 0:s["x-github-request-id"]})`);return{id:d.artifact.id}})}o(rke,"deleteArtifactPublic");function nke(t){return tke(this,void 0,void 0,function*(){let e=Al(),{workflowRunBackendId:r,workflowJobRunBackendId:n}=pl(),i={workflowRunBackendId:r,workflowJobRunBackendId:n,nameFilter:on.create({value:t})},s=yield e.ListArtifacts(i);if(s.artifacts.length===0)throw new Lu(`Artifact not found for name: ${t}`);let a=s.artifacts[0];s.artifacts.length>1&&(a=s.artifacts.sort((u,d)=>Number(d.databaseId)-Number(u.databaseId))[0],v(`More than one artifact found for a single name, returning newest (id: ${a.databaseId})`));let c={workflowRunBackendId:a.workflowRunBackendId,workflowJobRunBackendId:a.workflowJobRunBackendId,name:a.name},l=yield e.DeleteArtifact(c);return D(`Artifact '${t}' (ID: ${l.artifactId}) deleted`),{id:Number(l.artifactId)}})}o(nke,"deleteArtifactInternal");var ike=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},RQ=wIe(),TQ=100,SPt=Math.ceil(RQ/TQ);function ske(t,e,r,n){return ike(this,arguments,void 0,function*(i,s,a,c,l=!1){D(`Fetching artifact list for workflow run ${i} in repository ${s}/${a}`);let u=[],[d,f]=CE(Qp),h={log:void 0,userAgent:hl(),previews:void 0,retry:d,request:f},p=Xo(c,h,hA,fA),m=1,{data:A}=yield p.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:s,repo:a,run_id:i,per_page:TQ,page:m}),E=Math.ceil(A.total_count/TQ),y=A.total_count;y>RQ&&(xe(`Workflow run ${i} has ${y} artifacts, exceeding the limit of ${RQ}. Results will be incomplete as only the first ${RQ} artifacts will be returned`),E=SPt);for(let C of A.artifacts)u.push({name:C.name,id:C.id,size:C.size_in_bytes,createdAt:C.created_at?new Date(C.created_at):void 0,digest:C.digest});for(m++,m;m<=E;m++){v(`Fetching page ${m} of artifact list`);let{data:C}=yield p.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:s,repo:a,run_id:i,per_page:TQ,page:m});for(let w of C.artifacts)u.push({name:w.name,id:w.id,size:w.size_in_bytes,createdAt:w.created_at?new Date(w.created_at):void 0,digest:w.digest})}return l&&(u=ake(u)),D(`Found ${u.length} artifact(s)`),{artifacts:u}})}o(ske,"listArtifactsPublic");function oke(){return ike(this,arguments,void 0,function*(t=!1){let e=Al(),{workflowRunBackendId:r,workflowJobRunBackendId:n}=pl(),i={workflowRunBackendId:r,workflowJobRunBackendId:n},a=(yield e.ListArtifacts(i)).artifacts.map(c=>{var l;return{name:c.name,id:Number(c.databaseId),size:Number(c.size),createdAt:c.createdAt?io.toDate(c.createdAt):void 0,digest:(l=c.digest)===null||l===void 0?void 0:l.value}});return t&&(a=ake(a)),D(`Found ${a.length} artifact(s)`),{artifacts:a}})}o(oke,"listArtifactsInternal");function ake(t){t.sort((n,i)=>i.id-n.id);let e=[],r=new Set;for(let n of t)r.has(n.name)||(e.push(n),r.add(n.name));return e}o(ake,"filterLatest");var ES=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(d){try{u(n.next(d))}catch(f){a(f)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(f){a(f)}}o(l,"rejected");function u(d){d.done?s(d.value):i(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},BPt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Ob
Line truncated
|
|
|
|
|
|
|
|
|
|
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
|
|
|
|
|
|
|
|
|
If the error persists, please check whether Actions is operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),s}})}downloadArtifact(e,r){return ES(this,void 0,void 0,function*(){try{if(gy())throw new uf;if(r?.findBy){let{findBy:{repositoryOwner:n,repositoryName:i,token:s}}=r,a=BPt(r,["findBy"]);return $Qe(e,n,i,s,a)}return jQe(e,r)}catch(n){throw xe(`Download Artifact failed with error: ${n}.
|
|
|
|
|
|
|
|
|
|
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
|
|
|
|
|
|
|
|
|
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}listArtifacts(e){return ES(this,void 0,void 0,function*(){try{if(gy())throw new uf;if(e?.findBy){let{findBy:{workflowRunId:r,repositoryOwner:n,repositoryName:i,token:s}}=e;return ske(r,n,i,s,e?.latest)}return oke(e?.latest)}catch(r){throw xe(`Listing Artifacts failed with error: ${r}.
|
|
|
|
|
|
|
|
|
|
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
|
|
|
|
|
|
|
|
|
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),r}})}getArtifact(e,r){return ES(this,void 0,void 0,function*(){try{if(gy())throw new uf;if(r?.findBy){let{findBy:{workflowRunId:n,repositoryOwner:i,repositoryName:s,token:a}}=r;return _Q(e,n,i,s,a)}return eke(e)}catch(n){throw xe(`Get Artifact failed with error: ${n}.
|
|
|
|
|
|
|
|
|
|
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
|
|
|
|
|
|
|
|
|
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}deleteArtifact(e,r){return ES(this,void 0,void 0,function*(){try{if(gy())throw new uf;if(r?.findBy){let{findBy:{repositoryOwner:n,repositoryName:i,workflowRunId:s,token:a}}=r;return rke(e,s,n,i,a)}return nke(e)}catch(n){throw xe(`Delete Artifact failed with error: ${n}.
|
|
|
|
|
|
|
|
|
|
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
|
|
|
|
|
|
|
|
|
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}};var zQr=new bE;var DQ=class{static{o(this,"GitHubArtifact")}static async upload(e){if(Ke.isGHES)throw new Error("@actions/artifact v2.0.0+ is currently not supported on GHES.");let r=AJ.default.basename(e.filename),n=new bE;D(`Uploading ${r} as an artifact`);let i=AJ.default.dirname(e.filename),s=await n.uploadArtifact(r,[e.filename],i,{retentionDays:e.retentionDays,skipArchive:!0});if(!s.id)throw new Wa("Cannot upload artifact");let a=s.size??cke.default.statSync(e.filename).size,c=`${Ke.workflowRunURL()}/artifacts/${s.id}`;return D(`Artifact download URL: ${c}`),{id:s.id,filename:r,digest:s.digest||"",size:a,url:c}}};var lke=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,uke=/[\x01-\x7F]/g,dke=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,mJ=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,wE=new Map([[" ","Tab"],[`
|
|
|
|
|
`,"NewLine"],["!","excl"],['"',"quot"],["#","num"],["$","dollar"],["%","percnt"],["&","amp"],["'","apos"],["(","lpar"],[")","rpar"],["*","ast"],["+","plus"],[",","comma"],[".","period"],["/","sol"],[":","colon"],[";","semi"],["<","lt"],["<\u20D2","nvlt"],["=","equals"],["=\u20E5","bne"],[">","gt"],[">\u20D2","nvgt"],["?","quest"],["@","commat"],["[","lsqb"],["]","rsqb"],["^","Hat"],["_","lowbar"],["`","grave"],["fj","fjlig"],["{","lcub"],["|","vert"],["}","rcub"],["\xA0","nbsp"],["\xA1","iexcl"],["\xA2","cent"],["\xA3","pound"],["\xA4","curren"],["\xA5","yen"],["\xA6","brvbar"],["\xA7","sect"],["\xA8","die"],["\xA9","copy"],["\xAA","ordf"],["\xAB","laquo"],["\xAC","not"],["\xAD","shy"],["\xAE","reg"],["\xAF","macr"],["\xB0","deg"],["\xB1","pm"],["\xB2","sup2"],["\xB3","sup3"],["\xB4","acute"],["\xB5","micro"],["\xB6","para"],["\xB7","middot"],["\xB8","cedil"],["\xB9","sup1"],["\xBA","ordm"],["\xBB","raquo"],["\xBC","frac14"],["\xBD","half"],["\xBE","frac34"],["\xBF","iquest"],["\xC0","Agrave"],["\xC1","Aacute"],["\xC2","Acirc"],["\xC3","Atilde"],["\xC4","Auml"],["\xC5","angst"],["\xC6","AElig"],["\xC7","Ccedil"],["\xC8","Egrave"],["\xC9","Eacute"],["\xCA","Ecirc"],["\xCB","Euml"],["\xCC","Igrave"],["\xCD","Iacute"],["\xCE","Icirc"],["\xCF","Iuml"],["\xD0","ETH"],["\xD1","Ntilde"],["\xD2","Ograve"],["\xD3","Oacute"],["\xD4","Ocirc"],["\xD5","Otilde"],["\xD6","Ouml"],["\xD7","times"],["\xD8","Oslash"],["\xD9","Ugrave"],["\xDA","Uacute"],["\xDB","Ucirc"],["\xDC","Uuml"],["\xDD","Yacute"],["\xDE","THORN"],["\xDF","szlig"],["\xE0","agrave"],["\xE1","aacute"],["\xE2","acirc"],["\xE3","atilde"],["\xE4","auml"],["\xE5","aring"],["\xE6","aelig"],["\xE7","ccedil"],["\xE8","egrave"],["\xE9","eacute"],["\xEA","ecirc"],["\xEB","euml"],["\xEC","igrave"],["\xED","iacute"],["\xEE","icirc"],["\xEF","iuml"],["\xF0","eth"],["\xF1","ntilde"],["\xF2","ograve"],["\xF3","oacute"],["\xF4","ocirc"],["\xF5","otilde"],["\xF6","ouml"],["\xF7","div"],["\xF8","oslash"],["\xF9","ugrave"],["\xFA","uacute"],["\xFB","ucirc"],["\xFC","uuml"],["\xFD","yacute"],["\xFE","thorn"],["\xFF","yuml"],["\u0100","Amacr"],["\u0101","amacr"],["\u0102","Abreve"],["\u0103","abreve"],["\u0104","Aogon"],["\u0105","aogon"],["\u0106","Cacute"],["\u0107","cacute"],["\u0108","Ccirc"],["\u0109","ccirc"],["\u010A","Cdot"],["\u010B","cdot"],["\u010C","Ccaron"],["\u010D","ccaron"],["\u010E","Dcaron"],["\u010F","dcaron"],["\u0110","Dstrok"],["\u0111","dstrok"],["\u0112","Emacr"],["\u0113","emacr"],["\u0116","Edot"],["\u0117","edot"],["\u0118","Eogon"],["\u0119","eogon"],["\u011A","Ecaron"],["\u011B","ecaron"],["\u011C","Gcirc"],["\u011D","gcirc"],["\u011E","Gbreve"],["\u011F","gbreve"],["\u0120","Gdot"],["\u0121","gdot"],["\u0122","Gcedil"],["\u0124","Hcirc"],["\u0125","hcirc"],["\u0126","Hstrok"],["\u0127","hstrok"],["\u0128","Itilde"],["\u0129","itilde"],["\u012A","Imacr"],["\u012B","imacr"],["\u012E","Iogon"],["\u012F","iogon"],["\u0130","Idot"],["\u0131","imath"],["\u0132","IJlig"],["\u0133","ijlig"],["\u0134","Jcirc"],["\u0135","jcirc"],["\u0136","Kcedil"],["\u0137","kcedil"],["\u0138","kgreen"],["\u0139","Lacute"],["\u013A","lacute"],["\u013B","Lcedil"],["\u013C","lcedil"],["\u013D","Lcaron"],["\u013E","lcaron"],["\u013F","Lmidot"],["\u0140","lmidot"],["\u0141","Lstrok"],["\u0142","lstrok"],["\u0143","Nacute"],["\u0144","nacute"],["\u0145","Ncedil"],["\u0146","ncedil"],["\u0147","Ncaron"],["\u0148","ncaron"],["\u0149","napos"],["\u014A","ENG"],["\u014B","eng"],["\u014C","Omacr"],["\u014D","omacr"],["\u0150","Odblac"],["\u0151","odblac"],["\u0152","OElig"],["\u0153","oelig"],["\u0154","Racute"],["\u0155","racute"],["\u0156","Rcedil"],["\u0157","rcedil"],["\u0158","Rcaron"],["\u0159","rcaron"],["\u015A","Sacute"],["\u015B","sacute"],["\u015C","Scirc"],["\u015D","scirc"],["\u015E","Scedil"],["\u015F","scedil"],["\u0160","Scaron"],["\u0161","scaron"],["\u0162","Tcedil"],["\u0163","tcedil"],["\u0164","Tcaron"],["\u0165","tcaron"],["\u0166","Tstrok"],["\u0167","tstrok"],["\u0168","Utilde"],["\u0169","utilde"],["\u016A","Umacr"],["\u016B","umacr"],["\u016C","Ubreve"],["\u016D","ubreve"],["\u016E","Uring"],["\u016F","uring"],["\u0170","Udblac"],["\u0171","udblac"],["\u0172","Uogon"],["\u0173","uogon"],["\u0174","Wcirc"],["\u0175","wcirc"],["\u0176","Ycirc"],["\u0177","ycirc"],["\u0178","Yuml"],["\u0179","Zacute"],["\u017A","zacute"],["\u017B","Zdot"],["\u017C","zdot"],["\u017D","Zcaron"],["\u017E","zcaron"],["\u0192","fnof"],["\u01B5","imped"],["\u01F5","gacute"],["\u0237","jmath"],["\u02C6","circ"],["\u02C7","caron"],["\u02D8","breve"],["\u02D9","dot"],["\u02DA","ring"],["\u02DB","ogon"],["\u02DC","tilde"],["\u02DD","dblac"],["\u0311","DownBreve"],["\u0391","Alpha"],["\u0392","Beta"],["\u0393","Gamma"],["\u0394","Delta"],["\u0395","Epsilon"],["\u0396","Zeta"],["\u0397","Eta"],["\u0398","Theta"],["\u0399","Iota"],["\u039A","Kappa"],["\u039B","Lambda"],["\u039C","Mu"],["\u039D","Nu"],["\u039E","Xi"],["\u039F","Omicron"],["\u03A0","Pi"],["\u03A1","Rho"],["\u03A3","SigmaLine truncated
|
|
|
|
|
`],["Nfr","\u{1D511}"],["NoBreak","\u2060"],["NonBreakingSpace","\xA0"],["Nopf","\u2115"],["Not","\u2AEC"],["NotCongruent","\u2262"],["NotCupCap","\u226D"],["NotDoubleVerticalBar","\u2226"],["NotElement","\u2209"],["NotEqual","\u2260"],["NotEqualTilde","\u2242\u0338"],["NotExists","\u2204"],["NotGreater","\u226F"],["NotGreaterEqual","\u2271"],["NotGreaterFullEqual","\u2267\u0338"],["NotGreaterGreater","\u226B\u0338"],["NotGreaterLess","\u2279"],["NotGreaterSlantEqual","\u2A7E\u0338"],["NotGreaterTilde","\u2275"],["NotHumpDownHump","\u224E\u0338"],["NotHumpEqual","\u224F\u0338"],["NotLeftTriangle","\u22EA"],["NotLeftTriangleBar","\u29CF\u0338"],["NotLeftTriangleEqual","\u22EC"],["NotLess","\u226E"],["NotLessEqual","\u2270"],["NotLessGreater","\u2278"],["NotLessLess","\u226A\u0338"],["NotLessSlantEqual","\u2A7D\u0338"],["NotLessTilde","\u2274"],["NotNestedGreaterGreater","\u2AA2\u0338"],["NotNestedLessLess","\u2AA1\u0338"],["NotPrecedes","\u2280"],["NotPrecedesEqual","\u2AAF\u0338"],["NotPrecedesSlantEqual","\u22E0"],["NotReverseElement","\u220C"],["NotRightTriangle","\u22EB"],["NotRightTriangleBar","\u29D0\u0338"],["NotRightTriangleEqual","\u22ED"],["NotSquareSubset","\u228F\u0338"],["NotSquareSubsetEqual","\u22E2"],["NotSquareSuperset","\u2290\u0338"],["NotSquareSupersetEqual","\u22E3"],["NotSubset","\u2282\u20D2"],["NotSubsetEqual","\u2288"],["NotSucceeds","\u2281"],["NotSucceedsEqual","\u2AB0\u0338"],["NotSucceedsSlantEqual","\u22E1"],["NotSucceedsTilde","\u227F\u0338"],["NotSuperset","\u2283\u20D2"],["NotSupersetEqual","\u2289"],["NotTilde","\u2241"],["NotTildeEqual","\u2244"],["NotTildeFullEqual","\u2247"],["NotTildeTilde","\u2249"],["NotVerticalBar","\u2224"],["Nscr","\u{1D4A9}"],["Ntilde","\xD1"],["Nu","\u039D"],["OElig","\u0152"],["Oacute","\xD3"],["Ocirc","\xD4"],["Ocy","\u041E"],["Odblac","\u0150"],["Ofr","\u{1D512}"],["Ograve","\xD2"],["Omacr","\u014C"],["Omega","\u03A9"],["Omicron","\u039F"],["Oopf","\u{1D546}"],["OpenCurlyDoubleQuote","\u201C"],["OpenCurlyQuote","\u2018"],["Or","\u2A54"],["Oscr","\u{1D4AA}"],["Oslash","\xD8"],["Otilde","\xD5"],["Otimes","\u2A37"],["Ouml","\xD6"],["OverBar","\u203E"],["OverBrace","\u23DE"],["OverBracket","\u23B4"],["OverParenthesis","\u23DC"],["PartialD","\u2202"],["Pcy","\u041F"],["Pfr","\u{1D513}"],["Phi","\u03A6"],["Pi","\u03A0"],["PlusMinus","\xB1"],["Poincareplane","\u210C"],["Popf","\u2119"],["Pr","\u2ABB"],["Precedes","\u227A"],["PrecedesEqual","\u2AAF"],["PrecedesSlantEqual","\u227C"],["PrecedesTilde","\u227E"],["Prime","\u2033"],["Product","\u220F"],["Proportion","\u2237"],["Proportional","\u221D"],["Pscr","\u{1D4AB}"],["Psi","\u03A8"],["QUOT",'"'],["Qfr","\u{1D514}"],["Qopf","\u211A"],["Qscr","\u{1D4AC}"],["RBarr","\u2910"],["REG","\xAE"],["Racute","\u0154"],["Rang","\u27EB"],["Rarr","\u21A0"],["Rarrtl","\u2916"],["Rcaron","\u0158"],["Rcedil","\u0156"],["Rcy","\u0420"],["Re","\u211C"],["ReverseElement","\u220B"],["ReverseEquilibrium","\u21CB"],["ReverseUpEquilibrium","\u296F"],["Rfr","\u211C"],["Rho","\u03A1"],["RightAngleBracket","\u27E9"],["RightArrow","\u2192"],["RightArrowBar","\u21E5"],["RightArrowLeftArrow","\u21C4"],["RightCeiling","\u2309"],["RightDoubleBracket","\u27E7"],["RightDownTeeVector","\u295D"],["RightDownVector","\u21C2"],["RightDownVectorBar","\u2955"],["RightFloor","\u230B"],["RightTee","\u22A2"],["RightTeeArrow","\u21A6"],["RightTeeVector","\u295B"],["RightTriangle","\u22B3"],["RightTriangleBar","\u29D0"],["RightTriangleEqual","\u22B5"],["RightUpDownVector","\u294F"],["RightUpTeeVector","\u295C"],["RightUpVector","\u21BE"],["RightUpVectorBar","\u2954"],["RightVector","\u21C0"],["RightVectorBar","\u2953"],["Rightarrow","\u21D2"],["Ropf","\u211D"],["RoundImplies","\u2970"],["Rrightarrow","\u21DB"],["Rscr","\u211B"],["Rsh","\u21B1"],["RuleDelayed","\u29F4"],["SHCHcy","\u0429"],["SHcy","\u0428"],["SOFTcy","\u042C"],["Sacute","\u015A"],["Sc","\u2ABC"],["Scaron","\u0160"],["Scedil","\u015E"],["Scirc","\u015C"],["Scy","\u0421"],["Sfr","\u{1D516}"],["ShortDownArrow","\u2193"],["ShortLeftArrow","\u2190"],["ShortRightArrow","\u2192"],["ShortUpArrow","\u2191"],["Sigma","\u03A3"],["SmallCircle","\u2218"],["Sopf","\u{1D54A}"],["Sqrt","\u221A"],["Square","\u25A1"],["SquareIntersection","\u2293"],["SquareSubset","\u228F"],["SquareSubsetEqual","\u2291"],["SquareSuperset","\u2290"],["SquareSupersetEqual","\u2292"],["SquareUnion","\u2294"],["Sscr","\u{1D4AE}"],["Star","\u22C6"],["Sub","\u22D0"],["Subset","\u22D0"],["SubsetEqual","\u2286"],["Succeeds","\u227B"],["SucceedsEqual","\u2AB0"],["SucceedsSlantEqual","\u227D"],["SucceedsTilde","\u227F"],["SuchThat","\u220B"],["Sum","\u2211"],["Sup","\u22D1"],["Superset","\u2283"],["SupersetEqual","\u2287"],["Supset","\u22D1"],["THORN","\xDE"],["TRADE","\u2122"],["TSHcy","\u040B"],["TScy","\u0426"],["Tab"," "],["Tau","\u03A4"],["Tcaron","\u0164"],["Tcedil","\u0162"],["Tcy","\u0422"],["Tfr","\u{1D517}"],["Therefore","\u2234"],["Theta","\u0398"],["ThickSpace","\u205F\u200A"],["ThinSpace","\u2009"],["Tilde","\u2
Line truncated
|
|
|
|
|
${l}`}let f=yJ(t.buffer,i[c],s[c],t.position,d);l+=`${" ".repeat(r.indent)}${EJ((t.line+1).toString(),u)} | ${f.str}
|
|
|
|
|
`,l+=`${"-".repeat(r.indent+u+3+f.pos)}^
|
|
|
|
|
`;for(let h=1;h<=r.linesAfter&&!(c+h>=s.length);h++){let p=yJ(t.buffer,i[c+h],s[c+h],t.position-(i[c]-i[c+h]),d);l+=`${" ".repeat(r.indent)}${EJ((t.line+h+1).toString(),u)} | ${p.str}
|
|
|
|
|
`}return l.replace(/\n$/,"")}o(FOt,"makeSnippet");function Ike(t,e){let r="";return t.mark?(t.mark.name&&(r+=`in "${t.mark.name}" `),r+=`(${t.mark.line+1}:${t.mark.column+1})`,!e&&t.mark.snippet&&(r+=`
|
|
|
|
|
|
|
|
|
|
${t.mark.snippet}`),`${t.reason} ${r}`):t.reason}o(Ike,"formatError");var UOt=class Dke extends Error{static{o(this,"YAMLException")}reason;mark;constructor(e,r){super(),this.name="YAMLException",this.reason=e,this.mark=r,this.message=Ike(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${Ike(this,e)}`}static throwAt(e,r,n,i=""){let s=0,a=0;for(let l=0;l<r;l++){let u=e.charCodeAt(l);u===10?(s++,a=l+1):u===13&&(s++,e.charCodeAt(l+1)===10&&l++,a=l+1)}let c={name:i,buffer:e,position:r,line:s,column:r-a};throw c.snippet=FOt(c),new Dke(n,c)}},IE={DOCUMENT:1,SEQUENCE:2,MAPPING:3,SCALAR:4,ALIAS:5,POP:6},rt={PLAIN:1,SINGLE_QUOTED:2,DOUBLE_QUOTED:3,LITERAL_BLOCK:4,FOLDED_BLOCK:5},kf={BLOCK:1,FLOW:2},TJ={CLIP:1,STRIP:2,KEEP:3};function Ske(t){switch(t){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
|
|
|
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}o(Ske,"simpleEscapeSequence");var qOt=new Array(256),GOt=new Array(256);for(let t=0;t<256;t++)qOt[t]=Ske(t)?1:0,GOt[t]=Ske(t);var skr=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});function CJ(t){return encodeURI(t).replace(/!/g,"%21")}o(CJ,"tagPercentEncode");function Qke(t){let e=t;return e.charCodeAt(0)===33?(e=e.slice(1),`!${CJ(e)}`):e.slice(0,18)==="tag:yaml.org,2002:"?`!!${CJ(e.slice(18))}`:`!<${CJ(e)}>`}o(Qke,"tagNameShort");var HOt={filename:"",schema:POt,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};var IJ=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,kke=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,okr=new RegExp(`^(?:${IJ})*$`),akr=new RegExp(`^(?:${kke})+$`),ckr=new RegExp(`^(?:!(?:${IJ})*|${kke}(?:${IJ})*)$`),zOt={filename:"",maxDepth:100};var lkr={...zOt,...HOt};var pA=Symbol("INVALID");function VOt(t){let e=new Set([t.defaultScalarTag,t.defaultSequenceTag,t.defaultMappingTag].filter(s=>s!==void 0)),r=t.implicitScalarTags,n=t.tags.filter(s=>!(s.nodeKind==="scalar"&&s.implicit)&&!e.has(s)),i=t.tags.filter(s=>e.has(s));return[...r.map(s=>({tag:s,implicitTag:!0})),...n.map(s=>({tag:s,implicitTag:!1})),...i.map(s=>({tag:s,implicitTag:!0}))]}o(VOt,"buildRepresentTypes");function $Ot(t,e){for(let r=0,n=t.representTypes.length;r<n;r+=1){let{tag:i,implicitTag:s}=t.representTypes[r];if(i.identify(e)){let a;return i.matchByTagPrefix?a=i.representTagName(e):a=i.tagName,{tag:i,tagName:a,implicitTag:s}}}return null}o($Ot,"matchTag");function wS(t,e){if(!t.noRefs&&e!==null&&typeof e=="object"){let u=t.refs.get(e);if(u)return u.anchor===void 0&&(u.anchor=`ref_${t.refCounter++}`),{kind:"alias",anchor:u.anchor}}let r=$Ot(t,e);if(!r){if(e===void 0||t.skipInvalid)return pA;throw new UOt(`unacceptable kind of an object to dump ${Object.prototype.toString.call(e)}`)}let{tag:n,tagName:i,implicitTag:s}=r,a=s?i:Qke(i);if(n.nodeKind==="scalar")return{kind:"scalar",tag:a,tagged:!s,style:rt.PLAIN,value:n.represent(e)};if(n.nodeKind==="sequence"){let u=n.represent(e),d={kind:"sequence",tag:a,tagged:!s,style:kf.BLOCK,items:[]};t.noRefs||t.refs.set(e,d);for(let f=0,h=u.length;f<h;f+=1){let p=wS(t,u[f]);p===pA&&u[f]===void 0&&(p=wS(t,null)),p!==pA&&d.items.push(p)}return d}let c=n.represent(e),l={kind:"mapping",tag:a,tagged:!s,style:kf.BLOCK,items:[]};t.noRefs||t.refs.set(e,l);for(let[u,d]of c){let f=wS(t,u);if(f===pA)continue;let h=wS(t,d);h!==pA&&l.items.push({key:f,value:h})}return l}o(wS,"build");function jOt(t,e,r={}){let n=wS({representTypes:VOt(e),noRefs:r.noRefs??!1,skipInvalid:r.skipInvalid??!1,refs:new Map,refCounter:0},t);return[{contents:n===pA?null:n,directives:[]}]}o(jOt,"jsToAst");var WOt=Symbol("visit:break"),Pke=Symbol("visit:skip");function QQ(t,e,r){let n=e(t,r);if(n===WOt)return!0;if(n===Pke)return!1;let i=r.depth+1;switch(t.kind){case"sequence":for(let s of t.items)if(QQ(s,e,{depth:i,parent:t,isKey:!1}))return!0;break;case"mapping":for(let{key:s,value:a}of t.items)if(QQ(s,e,{depth:i,parent:t,isKey:!0})||QQ(a,e,{depth:i,parent:t,isKey:!1}))return!0;break}return!1}o(QQ,"visitNode");function Bke(t,e){for(let r of t)if(r.contents&&QQ(r.contents,e,{depth:0,parent:null,isKey:!1}))return}o(Bke,"visit");function MQ(t,e){return(t&1<<e)!==0}o(MQ,"hasBit");var xke={applyQuoteFlowKeysOption:JOt,doubleQuoteForInvisibles:YOt,doubleQuoteWhitespaceOnly:KOt,applyForceQuotesOption:XOt,tryLongOrMultilineAsBlock:ZOt,quoteInvalidPlain:eLt,fallbackToDoubleQuoted:tLt};function Oke(t){return t.presenterOptions.quoteStyle==="single"&&MQ(t.allowedStylesMask,rt.SINGLE_QUOTED)?rt.SINGLE_QUOTED:rt.DOUBLE_QUOTED}o(Oke,"_preferredQuotedStyle");function JOt(t){t.presenterOptions.quoteFlowKeys&&(!t.isKey||!t.flowOnly||t.style!==rt.PLAIN||(t.style=rt.DOUBLE_QUOTED))}o(JOt,"applyQuoteFlowKeysOption");function YOt(t){t.style===rt.PLAIN&&/[\t\x7F-\xA0\u2028\u2029\uFEFF\uFFFE\uFFFF]/.test(t.node.value)&&(t.style=rt.DOUBLE_QUOTED)}o(YOt,"doubleQuoteForInvisibles");function KOt(t){t.style===rt.PLAIN&&/^\s+$/.test(t.node.value)&&(t.style=rt.DOUBLE_QUOTED)}o(KOt,"doubleQuoteWhitespaceOnly");function XOt(t){t.presenterOptions.forceQuotes&&(t.isKey||t.style!==rt.PLAIN||t.node.tag===t.presenterOptions.schema.defaultScalarTag.tagName&&(t.style=t.node.value.includes(`
|
|
|
|
|
`)?rt.DOUBLE_QUOTED:Oke(t)))}o(XOt,"applyForceQuotesOption");function ZOt(t){if(t.style!==rt.PLAIN||t.isKey)return;let e=t.node.value,r=e.indexOf(`
|
|
|
|
|
`)!==-1;if(!MQ(t.allowedStylesMask,rt.LITERAL_BLOCK)){r&&(t.style=rt.DOUBLE_QUOTED);return}let n=t.presenterOptions.lineWidth;if(n===-1){r&&(t.style=rt.LITERAL_BLOCK);return}let i=Math.max(Math.min(n,40),n-t.shiftOfContent),s=0,a=!1;for(;s<=e.length;){let c=e.length,l=e.indexOf(`
|
|
|
|
|
`,s);l!==-1&&(c=l);let u=e.slice(s,c);if(u.length>i&&u[0]!==" "&&/ [^ \t]/.test(u)&&(a=!0),l===-1)break;s=l+1}a?t.style=rt.FOLDED_BLOCK:r&&(t.style=rt.LITERAL_BLOCK)}o(ZOt,"tryLongOrMultilineAsBlock");function eLt(t){t.style===rt.PLAIN&&!MQ(t.allowedStylesMask,rt.PLAIN)&&(t.style=Oke(t))}o(eLt,"quoteInvalidPlain");function tLt(t){MQ(t.allowedStylesMask,t.style)||(t.style=rt.DOUBLE_QUOTED)}o(tLt,"fallbackToDoubleQuoted");function bS(t,e){return t|1<<e}o(bS,"setBit");var rLt="[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]",nLt="[\\n\\r]",iLt="\\uFEFF",DJ="[ \\t]",Lke=`(?:(?!(?:${nLt}|${iLt}))${rLt})`,FQ=`(?:(?!${DJ})${Lke})`,Mke="[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]",Fke="[-?:,\\[\\]{}#&*!|>'\"%@`]",sLt="[,\\[\\]{}]",SJ=FQ,BJ=`(?:(?!${sLt})${FQ})`,oLt=`(?:(?:(?!${Fke})${FQ})|[?:-](?=${SJ}))`,aLt=`(?:(?:(?!${Fke})${FQ})|[?:-](?=${BJ}))`,Uke=`(?:(?:(?![:#])${SJ})|:(?=${SJ}))#*`,qke=`(?:(?:(?![:#])${BJ})|:(?=${BJ}))#*`,Gke=`(?:${DJ}*${Uke})*`,Hke=`(?:${DJ}*${qke})*`,zke=`${oLt}#*${Gke}`,Vke=`${aLt}#*${Hke}`,cLt=zke,lLt=Vke,uLt=`\\n+${Uke}${Gke}`,dLt=`\\n+${qke}${Hke}`,fLt=`${zke}(?:${uLt})*`,hLt=`${Vke}(?:${dLt})*`,pLt=new RegExp(`^(?:${fLt})$`,"u"),ALt=new RegExp(`^(?:${hLt})$`,"u"),mLt=new RegExp(`^(?:${cLt})$`,"u"),gLt=new RegExp(`^(?:${lLt})$`,"u"),yLt=new RegExp(`^(?:${Mke})*$`,"u"),ELt=new RegExp(`^(?:${Mke}|\\n)*$`,"u"),CLt=new RegExp(`^(?:${Lke}|\\n)*$`,"u"),bLt=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/,QJ=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/m;function wLt(t){let e=t.node.value;if(e!==""){if(!(t.isKey?t.flowOnly?gLt:mLt:t.flowOnly?ALt:pLt).test(e)||t.shiftOfFirstLine===0&&bLt.test(e))return!1;if(t.shiftOfContent===0){let n=e.indexOf(`
|
|
|
|
|
`);if(n!==-1){let i=e.slice(n+1);if(QJ.test(i))return!1}}}let r=t.presenterOptions.schema.resolveImplicitScalarTag(e).tag.tagName;return!(!t.node.tagged&&r!==t.node.tag||!t.node.tagged&&e==="="&&r===t.presenterOptions.schema.defaultScalarTag.tagName)}o(wLt,"canUsePlain");function ILt(t){let e=t.node.value;if(!(t.isKey?yLt:ELt).test(e)||/[ \t]\n|\n[ \t]/.test(e))return!1;if(!t.isKey&&t.shiftOfContent===0){let r=e.indexOf(`
|
|
|
|
|
`);if(r!==-1&&QJ.test(e.slice(r+1)))return!1}return!0}o(ILt,"canUseSingleQuoted");function SLt(t){if(t.flowOnly||!CLt.test(t.node.value))return!1;let e=t.shiftOfContent-t.shiftOfParent;return!(e<1||e>9&&/^\n* /.test(t.node.value)||t.shiftOfContent===0&&QJ.test(t.node.value))}o(SLt,"canUseBlock");function BLt(t){let e=bS(0,rt.DOUBLE_QUOTED);wLt(t)&&(e=bS(e,rt.PLAIN)),ILt(t)&&(e=bS(e,rt.SINGLE_QUOTED)),SLt(t)&&(e=bS(bS(e,rt.LITERAL_BLOCK),rt.FOLDED_BLOCK)),t.allowedStylesMask=e}o(BLt,"detectAllowedStyles");function xLt(t){switch(t.style){case rt.PLAIN:return vLt(t);case rt.SINGLE_QUOTED:return NLt(t);case rt.LITERAL_BLOCK:return _Lt(t);case rt.FOLDED_BLOCK:return RLt(t);case rt.DOUBLE_QUOTED:return TLt(t)}}o(xLt,"renderScalar");function vLt(t){return $ke(t.node.value,t.shiftOfContent)}o(vLt,"renderPlain");function NLt(t){return`'${$ke(t.node.value,t.shiftOfContent).replace(/'/g,"''")}'`}o(NLt,"renderSingleQuoted");function _Lt(t){let e=t.node.value;return"|"+Wke(e,t.shiftOfParent,t.shiftOfContent)+Jke(jke(e,t.shiftOfContent))}o(_Lt,"renderLiteralBlock");function RLt(t){let e=t.node.value,r=t.presenterOptions.lineWidth,n=1/0;return r!==-1&&(n=Math.max(Math.min(r,40),r-t.shiftOfContent)),">"+Wke(e,t.shiftOfParent,t.shiftOfContent)+Jke(jke(QLt(e,n),t.shiftOfContent))}o(RLt,"renderFoldedBlock");function TLt(t){return`"${OLt(t.node.value)}"`}o(TLt,"renderDoubleQuoted");function $ke(t,e){let r=t.indexOf(`
|
|
|
|
|
`);if(r===-1)return t;let n=" ".repeat(e),i=t.slice(0,r),s=/(\n+)([^\n]*)/g;s.lastIndex=r;let a;for(;a=s.exec(t);){let c=a[1].length,l=a[2];i+=`
|
|
|
|
|
`.repeat(c+1)+n+l}return i}o($ke,"encodeFlowBreaks");function jke(t,e){let r=" ".repeat(e),n=0,i="",s=t.length;for(;n<s;){let a,c=t.indexOf(`
|
|
|
|
|
`,n);c===-1?(a=t.slice(n),n=s):(a=t.slice(n,c+1),n=c+1),a.length&&a!==`
|
|
|
|
|
`&&(i+=r),i+=a}return i}o(jke,"indentString");function DLt(t){return/^\n* /.test(t)}o(DLt,"needIndentIndicator");function Wke(t,e,r){let n=DLt(t)?String(r-e):"",i=t[t.length-1]===`
|
|
|
|
|
`;return`${n}${i&&(t[t.length-2]===`
|
|
|
|
|
`||t===`
|
|
|
|
|
`)?"+":i?"":"-"}
|
|
|
|
|
`}o(Wke,"blockHeader");function Jke(t){return t[t.length-1]===`
|
|
|
|
|
`?t.slice(0,-1):t}o(Jke,"dropEndingNewline");function xJ(t){return t===" "||t===" "}o(xJ,"isMoreIndented");function vke(t,e){if(t===""||xJ(t[0]))return t;let r=/ [^ \t]/g,n,i=0,s,a=0,c=0,l="";for(;n=r.exec(t);)c=n.index,c-i>e&&(s=a>i?a:c,l+=`
|
|
|
|
|
${t.slice(i,s)}`,i=s+1),a=c;return l+=`
|
|
|
|
|
`,t.length-i>e&&a>i?l+=`${t.slice(i,a)}
|
|
|
|
|
${t.slice(a+1)}`:l+=t.slice(i),l.slice(1)}o(vke,"foldLine");function QLt(t,e){let r=/(\n+)([^\n]*)/g,n=t.indexOf(`
|
|
|
|
|
`);n===-1&&(n=t.length),r.lastIndex=n;let i=vke(t.slice(0,n),e),s=t[0]===`
|
|
|
|
|
`||xJ(t[0]),a,c;for(;c=r.exec(t);){let l=c[1],u=c[2];a=u!==""&&xJ(u[0]),i+=l+(!s&&!a&&u!==""?`
|
|
|
|
|
`:"")+vke(u,e),s=a}return i}o(QLt,"foldBlockScalar");var kLt=/["\\\x00-\x1F\x7F-\xA0\u2028\u2029\uD800-\uDFFF\uFEFF\uFFFE\uFFFF]/gu;function PLt(t){switch(t){case"\0":return"\\0";case"\x07":return"\\a";case"\b":return"\\b";case" ":return"\\t";case`
|
|
|
|
|
`:return"\\n";case"\v":return"\\v";case"\f":return"\\f";case"\r":return"\\r";case"\x1B":return"\\e";case'"':return'\\"';case"\\":return"\\\\";case"\x85":return"\\N";case"\xA0":return"\\_";case"\u2028":return"\\L";case"\u2029":return"\\P"}let e=t.charCodeAt(0),r=e.toString(16).toUpperCase();return e<=255?`\\x${"0".repeat(2-r.length)}${r}`:`\\u${"0".repeat(4-r.length)}${r}`}o(PLt,"escapeCharacter");function OLt(t){return t.replace(kLt,PLt)}o(OLt,"escapeString");var kQ=10,kJ={indent:2,seqNoIndent:!1,seqInlineFirst:!0,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,scalarStyleRules:Object.keys(xke).map(t=>Reflect.get(xke,t)),tagBeforeAnchor:!1};function LLt(t){return t.tagged?t.tag:Qke(t.tag)}o(LLt,"nodeTagShort");function MLt(t){let e={...kJ,...t};return e.flowSkipColonSpace&&(e.quoteFlowKeys=!0),{...e,defaultScalarTagName:e.schema.defaultScalarTag.tagName,openEnded:!1}}o(MLt,"createPresenterState");function vJ(t,e){return`
|
|
|
|
|
${" ".repeat(t.indent*e)}`}o(vJ,"generateNextLine");function FLt(t,e,r,n,i,s){return{node:e,parent:r,level:n,isKey:i,flowOnly:s,shiftOfParent:n===0?-1:t.indent*(n-1),shiftOfContent:t.indent*Math.max(1,n),shiftOfFirstLine:n===0?0:t.indent*n,presenterOptions:t,allowedStylesMask:0,style:e.style}}o(FLt,"scalarLayout");function ULt(t,e,r){let n="";for(let s=0,a=r.items.length;s<a;s+=1){let c=Xu(t,e,r.items[s],r,{}).text;s>0&&(n+=`,${t.flowSkipCommaSpace?"":" "}`),n+=c}let i=t.flowBracketPadding&&r.items.length>0?" ":"";return`[${i}${n}${i}]`}o(ULt,"writeFlowSequence");function Nke(t,e,r,n){let i="";for(let s=0,a=r.items.length;s<a;s+=1){let c=Xu(t,e+1,r.items[s],r,{block:!0,compact:t.seqInlineFirst,isblockseq:!0}).text;(!n||i!=="")&&(i+=vJ(t,e)),c===""||kQ===c.charCodeAt(0)?i+="-":i+="- ",i+=c}return i}o(Nke,"writeBlockSequence");function qLt(t,e,r){let n="";for(let{key:s,value:a}of r.items){let c="";n!==""&&(c+=`,${t.flowSkipCommaSpace?"":" "}`);let l=Xu(t,e,s,r,{iskey:!0}),u=l.text,d=Xu(t,e,a,r,{}).text,f=t.flowSkipColonSpace||d===""?"":" ",h=s.kind==="scalar"&&l.noBody&&(s.tagged||s.anchor!==void 0),p=s.kind==="alias"||h?" ":"";c+=`${u}${p}:${f}${d}`,n+=c}let i=t.flowBracketPadding&&n!==""?" ":"";return`{${i}${n}${i}}`}o(qLt,"writeFlowMapping");function GLt(t,e,r,n){let i="";for(let s=0,a=r.items.length;s<a;s+=1){let c="";(!n||i!=="")&&(c+=vJ(t,e));let{key:l,value:u}=r.items[s],d=(l.kind==="mapping"||l.kind==="sequence")&&l.style===kf.BLOCK&&l.items.length!==0||l.kind==="scalar"&&(l.style===rt.LITERAL_BLOCK||l.style===rt.FOLDED_BLOCK),f=d?Xu(t,e+1,l,r,{block:!0,compact:!0,isblockseq:!NJ(t,l,e+1)}):Xu(t,e+1,l,r,{block:!0,compact:!0,iskey:!0}),h=f.text,p=l.kind==="scalar"&&l.value.indexOf(`
|
|
|
|
|
`)!==-1,m=h.length>1024&&/^[\s\S]{1025}/u.test(h),A=d||p||m;A&&(h&&kQ===h.charCodeAt(0)?c+="?":c+="? "),c+=h,A&&(c+=vJ(t,e));let E=Xu(t,e+1,u,r,{block:!0,compact:A,isblockseq:A&&!NJ(t,u,e+1)}).text,y=l.kind==="scalar"&&f.noBody&&(l.tagged||l.anchor!==void 0),C=!A&&(l.kind==="alias"||y)?" ":"";E===""||kQ===E.charCodeAt(0)?c+=`${C}:`:c+=`${C}: `,c+=E,i+=c}return i}o(GLt,"writeBlockMapping");function NJ(t,e,r){return e.kind==="alias"?!0:e.tagged||e.anchor!==void 0||t.indent<2&&r>0}o(NJ,"cannotBeCompact");function Xu(t,e,r,n,i){if(r.kind==="alias")return t.openEnded=!1,{text:`*${r.anchor}`,noBody:!1};let{block:s=!1,iskey:a=!1,isblockseq:c=!1}=i,l=i.compact??!1,u=r.anchor!==void 0;NJ(t,r,e)&&(l=!1);let d,f=r.tagged,h=s&&(r.kind==="mapping"||r.kind==="sequence")&&r.style===kf.BLOCK&&r.items.length!==0;if(r.kind==="mapping")h?d=GLt(t,e,r,l):d=qLt(t,e,r);else if(r.kind==="sequence")h?t.seqNoIndent&&!c&&e>0?d=Nke(t,e-1,r,l):d=Nke(t,e,r,l):d=ULt(t,e,r);else{let A=FLt(t,r,n,e,a,!s);BLt(A);for(let E of t.scalarStyleRules)E(A);d=xLt(A),t.openEnded=(A.style===rt.LITERAL_BLOCK||A.style===rt.FOLDED_BLOCK)&&(r.value===`
|
|
|
|
|
`||r.value.endsWith(`
|
|
|
|
|
|
|
|
|
|
`)),f=r.tagged||d===""&&A.flowOnly&&n?.kind==="sequence"&&!u||A.style!==rt.PLAIN&&r.tag!==t.defaultScalarTagName}(r.kind==="mapping"||r.kind==="sequence")&&!h&&(t.openEnded=!1),h&&l&&e>0&&t.indent>2&&(d=`${" ".repeat(t.indent-2)}${d}`);let p=d==="",m=d;if(f||u){let A=[],E=f?LLt(r):null,y=u?`&${r.anchor}`:null;t.tagBeforeAnchor?(E!==null&&A.push(E),y!==null&&A.push(y)):(y!==null&&A.push(y),E!==null&&A.push(E));let C=d===""||d.charCodeAt(0)===kQ?"":" ";m=`${A.join(" ")}${C}${d}`}return{text:m,noBody:p}}o(Xu,"writeNode");function HLt(t){return(t.kind==="sequence"||t.kind==="mapping")&&t.style===kf.BLOCK&&t.items.length!==0&&!t.tagged&&t.anchor===void 0}o(HLt,"rootStartsOwnLine");function zLt(t){let e="";for(let r of t.directives){if(r.kind==="yaml"){e+=`%YAML ${r.version}
|
|
|
|
|
`;continue}let{handle:n,prefix:i}=r;e+=`%TAG ${n} ${i}
|
|
|
|
|
`}return e}o(zLt,"writeDocumentDirectives");function VLt(t,e){let r=MLt(e),n="",i=!1;for(let s=0;s<t.length;s+=1){let a=t[s];r.openEnded=!1;let c=zLt(a),l=c!=="",u=a.explicitStart||l||s>0&&!i;if(n+=c,a.contents===null)u&&(n+=`---
|
|
|
|
|
`);else if(u){let d=Xu(r,0,a.contents,null,{block:!0,compact:!0}).text,f=d===""?"":l||HLt(a.contents)?`
|
|
|
|
|
`:" ";n+=`---${f}${d}
|
|
|
|
|
`}else n+=Xu(r,0,a.contents,null,{block:!0,compact:!0}).text+`
|
|
|
|
|
`;i=a.explicitEnd||r.openEnded,i&&(n+=`...
|
|
|
|
|
`)}return n}o(VLt,"present");var $Lt={...kJ,schema:LOt,skipInvalid:!1,noRefs:!1,flowLevel:-1,sortKeys:!1,transform:o(()=>{},"transform")};function jLt(t,e){let r=String(t),n=String(e);return r<n?-1:r>n?1:0}o(jLt,"defaultCompareFn");function Yke(t,e={}){let r={...$Lt,...e},n=jOt(t,r.schema,{noRefs:r.noRefs,skipInvalid:r.skipInvalid});if(r.flowLevel>=0&&Bke(n,(i,s)=>{if(!(s.depth<r.flowLevel))return(i.kind==="sequence"||i.kind==="mapping")&&(i.style=kf.FLOW),Pke}),r.sortKeys){let i=r.sortKeys===!0?jLt:r.sortKeys;Bke(n,s=>{s.kind==="mapping"&&s.items.sort((a,c)=>i(a.key.kind==="scalar"?a.key.value:"",c.key.kind==="scalar"?c.key.value:""))})}return r.transform(n),VLt(n,{...vOt(r,Object.keys(kJ)),schema:r.schema})}o(Yke,"dump");var ukr=IE.DOCUMENT,dkr=IE.SEQUENCE,fkr=IE.MAPPING,hkr=IE.SCALAR,pkr=IE.ALIAS,Akr=IE.POP,mkr=rt.PLAIN,gkr=rt.SINGLE_QUOTED,ykr=rt.DOUBLE_QUOTED,Ekr=rt.LITERAL_BLOCK,Ckr=rt.FOLDED_BLOCK,bkr=kf.BLOCK,wkr=kf.FLOW,Ikr=TJ.CLIP,Skr=TJ.STRIP,Bkr=TJ.KEEP;var Kke=T(require("os"),1);var UQ=class t{static{o(this,"GitHubSummary")}static async writeBuildSummary(e){let r=o(function(l,u,d=!1){return`<a href="${u}">${l}</a>`+(d?Kke.default.EOL:"")},"addLink"),n=e.exportRes.refs.length,i=n>0?e.exportRes.refs?.[0]:void 0,s=i?e.exportRes.summaries?.[i]:void 0,a=e.driver==="cloud"&&e.endpoint?e.endpoint?.replace(/^cloud:\/\//,"").split("/")[0]:void 0,c=sU.addHeading("Docker Build summary",2);if(a&&n===1&&i&&s){let l=t.formatDBCBuildURL(a,i,s.defaultPlatform);c.addRaw("<p>").addRaw("For a detailed look at the build, you can check the results at:").addRaw("</p>").addRaw("<p>").addRaw(`:whale: ${r(`<strong>${l}</strong>`,l)}`).addRaw("</p>")}if(e.uploadRes){let l=`./${Ke.runId}/${e.uploadRes.url.split("/").slice(-2).join("/")}`;a&&n===1?c.addRaw("<p>").addRaw("You can also download the following build record archive and import it into Docker Desktop's Builds view. ").addBreak().addRaw("Build records include details such as timing, dependencies, results, logs, traces, and other information about a build. ").addRaw(r("Learn more","https://www.docker.com/blog/new-beta-feature-deep-dive-into-github-actions-docker-builds-with-docker-desktop/?utm_source=github&utm_medium=actions")).addRaw("</p>"):c.addRaw("<p>").addRaw("For a detailed look at the build, download the following build record archive and import it into Docker Desktop's Builds view. ").addBreak().addRaw("Build records include details such as timing, dependencies, results, logs, traces, and other information about a build. ").addRaw(r("Learn more","https://www.docker.com/blog/new-beta-feature-deep-dive-into-github-actions-docker-builds-with-docker-desktop/?utm_source=github&utm_medium=actions")).addRaw("</p>"),c.addRaw("<p>").addRaw(`:arrow_down: ${r(`<strong>${ee.stringToUnicodeEntities(e.uploadRes.filename)}</strong>`,l)} (${ee.formatFileSize(e.uploadRes.size)} - includes <strong>${n} build record${n>1?"s":""}</strong>)`).addRaw("</p>")}else e.exportRes.summaries&&c.addRaw("<p>").addRaw("The following table provides a brief summary of your build.").addBreak().addRaw("For a detailed look at the build, including timing, dependencies, results, logs, traces, and other information, consider enabling the export of the build record so you can import it into Docker Desktop's Builds view. ").addRaw(r("Learn more","https://www.docker.com/blog/new-beta-feature-deep-dive-into-github-actions-docker-builds-with-docker-desktop/?utm_source=github&utm_medium=actions")).addRaw("</p>");if(c.addRaw("<p>").addRaw("Find this useful? ").addRaw(r("Let us know","https://docs.docker.com/feedback/gha-build-summary")).addRaw("</p>"),e.exportRes.summaries){c.addRaw("<p>");let l=[[{header:!0,data:"ID"},{header:!0,data:"Name"},{header:!0,data:"Status"},{header:!0,data:"Cached"},{header:!0,data:"Duration"},...a&&n>1?[{header:!0,data:"Build result URL"}]:[]]],u;for(let d in e.exportRes.summaries)if(Object.prototype.hasOwnProperty.call(e.exportRes.summaries,d)){let f=e.exportRes.summaries[d];l.push([{data:`<code>${d.substring(0,6).toUpperCase()}</code>`},{data:`<strong>${ee.stringToUnicodeEntities(f.name)}</strong>`},{data:`${f.status==="completed"?":white_check_mark:":f.status==="canceled"?":no_entry_sign:":":x:"} ${f.status}`},{data:`${f.numCachedSteps>0?Math.round(f.numCachedSteps/f.numTotalSteps*100):0}%`},{data:f.duration},...a&&n>1?[{data:r(":whale: Open",t.formatDBCBuildURL(a,d,f.defaultPlatform))}]:[]]),f.error&&(u=f.error)}c.addTable([...l]),c.addRaw("</p>"),u&&(c.addRaw("<blockquote>"),ee.countLines(u)>10?c.addRaw("<details><summary><strong>Error</strong></summary>").addCodeBlock(CS(u),"text").addRaw("</details>"):c.addRaw("<strong>Error</strong>").addBreak().addRaw("<p>").addCodeBlock(CS(u),"text").addRaw("</p>"),c.addRaw("</blockquote>"))}e.inputs&&c.addRaw("<details><summary><strong>Build inputs</strong></summary>").addCodeBlock(Yke(e.inputs,{indent:2,lineWidth:-1}),"yaml").addRaw("</details>"),e.bakeDefinition&&c.addRaw("<details><summary><strong>Bake definition</strong></
Line truncated
|
|
|
|
|
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let i of n){if(i.length==1&&!i[0].startsWith("type="))return e=="local";for(let[s,a]of i.map(c=>c.split("=").map(l=>l.trim())))if(s=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let n=no(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let i of n)for(let[s,a]of i.map(c=>c.split("=").map(l=>l.trim())))if(s=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=no(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let i of r)for(let s of i)try{let a=ee.parseBool(s);n.push(`disabled=${!a}`)}catch{n.push(s)}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("="),i=e.substring(0,n),s=e.substring(n+1);if(i.length==0||s.length==0)throw new Error(`${e} is not a valid secret`);return r&&Us(s),[i,s]}};var OJ=T(require("fs"),1),Xke=T(require("path"),1);var qQ=class t{static{o(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new pt,this.metadataFilename=`bake-metadata-${ee.generateRandomString()}.json`}getMetadataFilePath(){return Xke.default.join(ht.tmpDir(),this.metadataFilename)}static resolveContextTargets(e,r){let n=e.target||{},i=Object.keys(n);if(i.length===0)throw new Error("Bake definition does not contain any targets");if(!Object.prototype.hasOwnProperty.call(n,r))throw new Error(`Unable to resolve ${r} target, found: ${i.join(", ")}`);let s=new Set([r]),a=[r];for(;a.length>0;){let c=a.pop();for(let l of Object.values(n[c].contexts||{})){let u=l.match(/^target:(.+)$/)?.[1];if(!(!u||s.has(u))){if(!Object.prototype.hasOwnProperty.call(n,u))throw new Error(`Target ${c} uses unknown named context target ${u}`);s.add(u),a.push(u)}}}return[...s]}resolveMetadata(){let e=this.getMetadataFilePath();if(!OJ.default.existsSync(e))return;let r=OJ.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"],i,s=[],a=[...e.files||[],e.source];if(a){for(let l of a.map(u=>u?u.trim():""))if(l.length!=0){if(!ee.isValidRef(l)){s.push(l);continue}if(i)throw new Error("Only one remote bake definition can be defined");i=l}}i&&n.push(i);for(let l of s)n.push("--file",l);if(e.overrides)for(let l of e.overrides)n.push("--set",l);if(e.vars)for(let l of e.vars)n.push("--var",l);if(e.allow)for(let l of e.allow)n.push("--allow",l);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 c=await this.buildx.getCommand([...n,"--print",...e.targets||[]]);return await Ne.getExecOutput(c.command,c.args,r).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)throw new Error(`cannot parse bake definitions: ${pt.getErrorMessage(l.stderr)}`);return t.parseDefinition(l.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let n in r.target){let i=r.target[n];i.attest&&Array.isArray(i.attest)&&(i.attest=i.attest.map(s=>t.parseAttestEntry(s))),i["cache-from"]&&Array.isArray(i["cache-from"])&&(i["cache-from"]=i["cache-from"].map(s=>t.parseCacheEntry(s))),i["cache-to"]&&Array.isArray(i["cache-to"])&&(i["cache-to"]=i["cache-to"].map(s=>t.parseCacheEntry(s))),i.output&&Array.isArray(i.output)&&(i.output=i.output.map(s=>t.parseExportEntry(s))),i.secret&&Array.isArray(i.secret)&&(i.secret=i.secret.map(s=>t.parseSecretEntry(s))),i.ssh&&Array.isArray(i.ssh)&&(i.ssh=i.ssh.map(s=>t.parseSSHEntry(s)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=no(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of n){let[s,a]=i.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(s){case"type":r.type=a;break;case"disabled":r.disabled=ee.parseBool(a);break;default:r[s]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=no(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let i of n){let[s,a]=i.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());s==="type"?r.type=a:r[s]=a}return r}static parseExportEntry(e){if(typeof e!="string")return e;let r={type:""},n=no(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&n[0]===e&&!e.startsWith("type="))return e!=="-"?(r.type="local",r.dest=e,r):(r.type="tar",r.dest=e,r);for(let i of n){let[s,a]=i.toStri
Line truncated
|
|
|
|
|
`)[0])}static async isHeadDetached(e){return await t.exec(["branch","--show-current"],e).then(r=>r.length==0)}static async getDetachedRef(e){let r=await t.exec(["show","-s","--pretty=%D"],e);v(`detached HEAD ref: ${r}`);let n=r.replace(/^grafted, /,"").trim();if(n==="HEAD")return await t.inferRefFromHead(e);let i=n.match(/^HEAD, (.*)$/);if(!i||!i[1])throw new Error(`Cannot find detached HEAD ref in "${r}"`);let s=i[1].trim();if(s.startsWith("tag: "))return await t.findDetachedTagRef(s,r,e);if(s.match(/^pull\/\d+\/(head|merge)$/))return`refs/${s}`;let c=s.match(/^[^/]+\/[^/]+, (.+)$/);if(c)return`refs/heads/${c[1].trim()}`;let l=s.match(/^[^/]+\/(.+)$/);if(l)return`refs/heads/${l[1].trim()}`;throw new Error(`Unsupported detached HEAD ref in "${r}"`)}static async exec(e=[],r){return await Ne.getExecOutput("git",e,{cwd:r,ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.stderr.length>0&&n.exitCode!=0)throw new Error(n.stderr);return n.stdout.trim()})}static async inferRefFromHead(e){let r=await t.findContainingRef("refs/heads/",e);if(r)return r;let n=await t.findContainingRef("refs/remotes/",e);if(n){let a=n.match(/^refs\/remotes\/[^/]+\/(.+)$/);return a?`refs/heads/${a[1]}`:n}let i=await t.exec(["tag","--contains","HEAD"],e),[s]=i.split(`
|
|
|
|
|
`).map(a=>a.trim()).filter(a=>a.length>0);return s?`refs/tags/${s}`:""}static async findDetachedTagRef(e,r,n){let s=(await t.exec(["for-each-ref","--format=%(refname)","--points-at","HEAD","refs/tags/"],n)).split(`
|
|
|
|
|
`).map(a=>a.trim()).filter(a=>a.length>0).sort((a,c)=>c.length-a.length);for(let a of s){let c=`tag: ${a.slice(10)}`;if(e===c||e.startsWith(`${c}, `))return a}if(s.length===1)return s[0];throw new Error(`Cannot find detached tag ref in "${r}"`)}static async findContainingRef(e,r){let n=await t.exec(["for-each-ref","--format=%(refname)","--contains","HEAD","--sort=-committerdate",e],r),[i]=n.split(`
|
|
|
|
|
`).map(s=>s.trim()).filter(s=>s.length>0);return i}static async commitDate(e,r){return new Date(await t.exec(["show","-s",'--format="%ci"',e],r))}};var pMe=require("crypto"),Ul=T(require("fs"),1),ql=T(require("path"),1);var rC=T(zJ(),1),AMe=T(s7(),1),nC=T(lMe(),1);var dMe=require("util");var cK=T(zJ(),1);var fMe=T(Va(),1);var uMe="application/vnd.oci.empty.v1+json";var Ns=class{static{o(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await Ne.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(v(`Cosign.isAvailable cmd err: ${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(v(`Cosign.isAvailable error: ${r}`),!1));return v(`Cosign.isAvailable: ${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Ne.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 Ne.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}static getErrorMessage(e){let r=(0,dMe.stripVTControlCharacters)(e).split(/[\r\n]/);for(let n=r.length-1;n>=0;n--){let i=r[n].trim();if(i)return i}return"unknown error"}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return v("Cosign.versionSatisfies false: undefined version"),!1;let i=fMe.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return v(`Cosign.versionSatisfies ${n} statisfies ${e}: ${i}`),i}static parseCommandOutput(e){let r,n,i,s;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let l;try{l=JSON.parse(c)}catch{continue}if(l&&Array.isArray(l.errors)&&l.errors.length>0&&(s=l.errors),!r&&l&&Array.isArray(l.manifests)&&l.manifests.length>0){let u=l.manifests[0];u?.artifactType===cK.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===uMe&&typeof u.digest=="string"&&(n=u.digest)}if(!i&&l&&l.mediaType===cK.BUNDLE_V03_MEDIA_TYPE&&(i=l),i&&(r||n)){s=void 0;break}}return{bundle:i,signatureManifestDigest:r||n,errors:s}}};var lK=T(require("fs"),1);var CP=class t{static{o(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new pt}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(`No descriptor found for ${e.name}`);let n=r.manifests.filter(a=>a.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return n;let i=e.platform,s=new Map;for(let a of r.manifests)a.digest&&s.set(a.digest,a);return n.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let l=s.get(c);return l?l.platform?.os===i.os&&l.platform?.architecture===i.architecture&&(l.platform?.variant??"")===(i.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}static toIndexAnnotation(e){let r=e.indexOf("="),n=r===-1?e:e.substring(0,r),i=r===-1?"":e.substring(r),s=n.indexOf(":");if(s!==-1){let a=n.substring(0,s),c=n.substring(s+1);if(a.split(",").map(u=>u.replace(/\[.*\]$/,"")).some(u=>["manifest","index","manifest-descriptor","index-descriptor"].includes(u)))return`index:${c}${i}`}return`index:${e}`}async create(e){let r=[],n=ht.tmpName({tmpdir:ht.tmpDir(),template:"imagetools-metadata-XXXXXX"}),i=[],s=[];for(let c of e.sources){if(c.startsWith("cwd://")){let l=c.substring(6);l.length>0&&i.push(l);continue}s.push(c)}if(e.tags)for(let c of e.tags)r.push("--tag",c);if(e.platforms)for(let c of e.platforms)r.push("--platform",c);if(e.annotations)for(let c of e.annotations)r.push("--annotation",c);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",n);for(let c of i)r.push("--file",c);for(let c of s)r.push(c);let a=await this.getCreateCommand(r);if(e.skipExec){D(`[command]${a.command} ${a.args.join(" ")}`),D("Skipped create command");return}return await Ne.getExecOutput(a.command,a.args,{ignoreReturnCode:!0,silent:e.silent}).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(c.stderr.trim());if(!e.dryRun){if(!lK.default.existsSync(n))return;let
Line truncated
|
|
|
|
|
${a.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,c)*100))}throw a??new Error(`ImageTools inspect command failed for ${e.name}`)}async execInspect(e,r,n){return await Ne.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(i=>{if(i.stderr.length>0&&i.exitCode!=0)throw new Error(i.stderr.trim());return n(JSON.parse(i.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown)/i.test(e)||/:\s*not found$/i.test(e)}};var tC="https://search.sigstore.dev";var hMe="slsaprovenance1",Yf=class t{static{o(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Ns,this.imageTools=e?.imageTools||new CP}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={noTransparencyLog:e.noTransparencyLog,rekorV2:e.rekorV2},i=await this.cosignSigningConfigArgs(n);for(let s of e.imageNames){let a=await this.imageTools.attestationDigests({name:`${s}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let c of a){let l=`${s}@${c}`;await Br(`Signing attestation manifest ${l}`,async()=>{let u=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1",...await this.bundleFormatArgs(),...i];D(`[command]${this.cosign.binPath} ${[...u,l].join(" ")}`);let d=await Ne.getExecOutput(this.cosign.binPath,["--verbose",...u,l],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),f=Ns.parseCommandOutput(d.stderr.trim());if(d.exitCode!=0)if(f.errors&&f.errors.length>0){let p=f.errors.map(m=>`- [${m.code}] ${m.message} : ${m.detail}`).join(`
|
|
|
|
|
`);throw new Error(`Cosign sign command failed with errors:
|
|
|
|
|
${p}`)}else throw new Error(`Cosign sign command failed with: ${Ns.getErrorMessage(d.stderr)}`);let h=t.parseBundle((0,rC.bundleFromJSON)(f.bundle));h.tlogID&&await this.logTransparencyUpload(h.tlogID,n),D(`Signature manifest pushed: https://oci.dag.dev/?referrers=${l}`),r[l]={...h,imageName:s}})}}}catch(n){throw new Error(`Signing BuildKit attestation manifests failed: ${n.message}`)}return r}async verifySignedManifests(e,r){let n={};for(let[i,s]of Object.entries(e))await Br(`Verifying signature of ${i}`,async()=>{let a=await this.verifyImageAttestation(i,{certificateIdentityRegexp:r.certificateIdentityRegexp,noTransparencyLog:r.noTransparencyLog||!s.tlogID,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});D(`Signature manifest verified: https://oci.dag.dev/?image=${s.imageName}@${a.signatureManifestDigest}`),n[i]=a});return n}async verifyImageAttestations(e,r){let n={},i=await this.imageTools.attestationDigests({name:e,platform:r.platform,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});if(i.length===0)throw new Error(`No attestation manifests found for ${e}`);let s=e.split(":",1)[0];for(let a of i){let c=`${s}@${a}`,l=await this.verifyImageAttestation(c,r);D(`Signature manifest verified: https://oci.dag.dev/?image=${s}@${l.signatureManifestDigest}`),n[c]=l}return n}async verifyImageAttestation(e,r){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed manifests");let n=["verify","--experimental-oci11",...await this.bundleFormatArgs(),"--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp];if(r.noTransparencyLog&&n.push("--use-signed-timestamps","--insecure-ignore-tlog"),!r.retryOnManifestUnknown){D(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);let a=await Ne.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})});if(a.exitCode!==0)throw new Error(`Cosign verify command failed with: ${Ns.getErrorMessage(a.stderr)}`);let c=Ns.parseCommandOutput(a.stderr.trim());return{cosignArgs:n,signatureManifestDigest:c.signatureManifestDigest}}let i=r.retryLimit??15,s;D(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);for(let a=0;a<i;a++){let c=await Ne.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),l=Ns.parseCommandOutput(c.stderr.trim());if(c.exitCode===0)return{cosignArgs:n,signatureManifestDigest:l.signatureManifestDigest};if(l.errors&&l.errors.length>0){let u=l.errors.map(d=>`- [${d.code}] ${d.message} : ${d.detail}`).join(`
|
|
|
|
|
`);if(s=new Error(`Cosign verify command failed with errors:
|
|
|
|
|
${u}`),l.errors.some(d=>d.code==="MANIFEST_UNKNOWN"))D(`Cosign verify command failed with MANIFEST_UNKNOWN, retrying attempt ${a+1}/${i}...
|
|
|
|
|
${u}`),await new Promise(d=>setTimeout(d,Math.pow(2,a)*100));else throw s}else throw new Error(`Cosign verify command failed with: ${Ns.getErrorMessage(c.stderr)}`)}throw s}async signProvenanceBlobs(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign provenance blobs");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={noTransparencyLog:e.noTransparencyLog,rekorV2:e.rekorV2},i=await this.cosignSigningConfigArgs(n),s=t.getProvenanceBlobs(e);for(let a of Object.keys(s))await Br(`Signing ${a}`,async()=>{let c=s[a],l=ql.default.join(ql.default.dirname(a),`${e.name??"provenance"}.sigstore.json`),u=t.getProvenanceSubjects(c);if(u.length===0){xe(`No subjects found in provenance ${a}, skip signing.`);return}let d=ql.default.join(ql.default.dirname(a),u[0].name),f=["attest-blob","--yes","--oidc-provider","github-actions",...await this.bundleFormatArgs(),"--statement",a,"--type",hMe,"--bundle",l,...i];D(`[command]${this.cosign.binPath} ${[...f,d].join(" ")}`);let h=await Ne.getExecOutput(this.cosign.binPath,["--verbose",...f,d],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),p=Ns.parseCommandOutput(h.stderr.trim());if(h.exitCode!=0)if(p.errors&&p.errors.length>0){let A=p.errors.map(E=>`- [${E.code}] ${E.message} : ${E.detail}`).join(`
|
|
|
|
|
`);throw new Error(`Cosign attest-blob command failed with errors:
|
|
|
|
|
${A}`)}else throw new Error(`Cosign attest-blob command failed with: ${Ns.getErrorMessage(h.stderr)}`);let m=t.parseBundle((0,rC.bundleFromJSON)(JSON.parse(Ul.default.readFileSync(l,{encoding:"utf-8"}))));D("Provenance blob signed for:");for(let A of u){let[E,y]=Object.entries(A.digest)[0]||[];D(` - ${A.name} (${E}:${y})`)}m.tlogID&&await this.logTransparencyUpload(m.tlogID,n),D(`Sigstore bundle written to: ${l}`),r[a]={...m,bundlePath:l,subjects:u}})}catch(n){throw new Error(`Signing BuildKit provenance blobs failed: ${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[i,s]of Object.entries(e)){let a=ql.default.dirname(i);await Br(`Verifying signature bundle ${s.bundlePath}`,async()=>{for(let c of s.subjects){let l=ql.default.join(a,c.name);D(`Verifying signed artifact ${l}`);let u=["verify-blob-attestation",...await this.bundleFormatArgs(),"--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??hMe];(r.noTransparencyLog||!s.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let d=await Ne.getExecOutput(this.cosign.binPath,[...u,"--bundle",s.bundlePath,l],{ignoreReturnCode:!0});if(d.stderr.length>0&&d.exitCode!=0)throw new Error(d.stderr);n[l]={bundlePath:s.bundlePath,cosignArgs:u}}})}return n}async verifyArtifact(e,r,n){D("Verifying keyless verification bundle signature");let i=JSON.parse(Ul.default.readFileSync(r,"utf-8")),s=(0,rC.bundleFromJSON)(i);D("Fetching Sigstore TUF trusted root metadata");let a=await AMe.getTrustedRoot({retry:{retries:5}}),c=(0,nC.toTrustMaterial)(a);try{D("Verifying artifact signature");let l=(0,nC.toSignedEntity)(s,Ul.default.readFileSync(e)),u=t.parseCertificate(s),d=s.verificationMaterial.tlogEntries,f=d.length>0?d[0].logIndex:void 0,p=new nC.Verifier(c).verify(l,{subjectAlternativeName:n?.subjectAlternativeName,extensions:n?.issuer?{issuer:n.issuer}:void 0});return v(`Sigstore.verifyArtifact signer: ${JSON.stringify(p)}`),{payload:i,certificate:u.toString(),tlogID:f}}catch(l){throw new Error(`Failed to verify artifact signature: ${l}`)}}static noTransparencyLog(e){return e??Ke.context.payload.repository?.private??!1}async cosignSigningConfigArgs(e){let r=[],n=t.noTransparencyLog(e.noTransparencyLog);if(D(`Upload to transparency log: ${n?"disabled":"enabled"}`),await this.cosign.versionSatisfies(">=3.0.4")){let i=await this.useRekorV2(e);await Br("Creating Sigstore protobuf signing config",async()=>{let s=ht.tmpName({template:"signing-config-XXXXXX.json",tmpdir:ht.tmpDir()}),a=["signing-config","create",i?"--with-default-rekor-v2=true":"--with-default-services=true",`--out=${s}`];n&&a.push("--no-default-rekor=true"),await Ne.exec(this.cosign.binPath,a,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),D(JSON.stringify(JSON.parse(Ul.default.readFileSync(s,{encoding:"utf-8"})),null,2)),r.push(`--signing-config=${s}`)})}else r.push("--use-signing-config"),n&&r.push("--tlog-upload=false");return r}async logTransparencyUpload(e,r){if(await this.useRekorV2(r)){D(`Attestation signature uploaded to Rekor v2 transparency log with index ${e}`);return}D(`Attestation signature uploaded to Rekor transparency log: ${tC}?logIndex=${e}`)}async useRekorV2(e){return e.rekorV2===!0&&!t.noTransparencyLog(e.noTransparencyLog)&&await this.cosign.versionSatisfies(">=3.1.1")}static getProvenanceBlobs(e){let r=ql.default.join(e.localExportDir,"provenance.json");if(Ul.default.existsSync(r))return{[r]:Ul.default.readFileSync(r)};let n=Ul.default.readdirSync(e.localExportDir,{withFileTypes:!0}),i=n.filter(s=>s.isDirectory());if(i.length>0&&i.length===n.length&&i.every(s=>Ul.default.existsSync(ql.default.join(e.localExportDir,s.name,"provenance.json")))){let s={};for(let a of i){let c=ql.default.join(e.localExportDir,a.name,"provenance.json");s[c]=Ul.default.readFileSync(c)}return s}throw new Error(`No valid provenance.json found in ${e.localExportDir}`)}static getProvenanceSubjects(e){return JSON.parse(e.toString()).subject.map(n=>({name:n.name,digest:n.digest}))}static parseBundle(e){let r=t.parseCertificate(e),n=e.verificationMaterial.tlogEntries,i=n.length>0?n[0].logIndex:void 0;return{payload:(0,rC.bundleToJSON)(e),certificate:r.toString(),tlogID:i}}static parseCertificate(e){let r;switch(e.verificationMaterial.content.$case){case"x509CertificateChain":r=e.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes;break;case"certificate":r=e.verificationMaterial.content.certificate.rawBytes;break;default:throw new Error("Bundle must contain an x509 certificate")}return new pMe.X509Certificate(r)}async bundleFormatArgs(){return await this.cosign.versionSatisfies(">=3.1.1")?[]:["--new-bundle-format"]}};var bP=class t{static{o(this,"Install")}standalone;githubToken;sigstore;constructor(e){this.standalone=e?.standalone,this.githubToke
Line truncated
|
|
|
|
|
`)){let[u,...d]=l.split(":"),f=u.toLowerCase(),h=d.map(p=>p.trim()).join(":");if(u.length!=0)switch(!0){case f=="name":n=void 0,r.name==null?r.name=h:(s&&i.gcPolicy&&(i.gcPolicy.push(s),s=void 0),i.name&&r.nodes.push(i),i={name:h});break;case f=="driver":n=void 0,r.driver=h;break;case f=="last activity":n=void 0,r.lastActivity=new Date(h);break;case f=="endpoint":n=void 0,i.endpoint=h;break;case f=="driver options":n=void 0,i["driver-opts"]=(h.match(/([a-zA-Z0-9_.]+)="([^"]*)"/g)||[]).map(p=>p.replace(/^(.*)="(.*)"$/g,"$1=$2"));break;case f=="status":n=void 0,i.status=h;break;case f=="buildkit daemon flags":case f=="flags":n=void 0,i["buildkitd-flags"]=h;break;case f=="buildkit version":case f=="buildkit":n=void 0,i.buildkit=h;break;case f=="platforms":{if(n=void 0,!h)break;let p=[];if(h.includes("*"))for(let m of h.split(", "))m.includes("*")&&p.push(m.replace(/\*/g,""));else p=h.split(", ");i.platforms=p.join(",");break}case f=="features":n="features",i.features={};break;case f=="labels":n="label",i.labels={};break;case f=="devices":n="devices",i.devices=i.devices||[];break;case f.startsWith("gc policy rule#"):n="gcpolicy",i.gcPolicy&&s&&(i.gcPolicy.push(s),s=void 0);break;case f.startsWith("file#"):n="file",c=u.split("#")[1],i.files=i.files||{},i.files[c]="";break;default:switch(n&&n!=="devices"&&i.devices&&a&&(i.devices.push(a),a=void 0),n||""){case"features":{i.features=i.features||{},i.features[u.trim()]=!!h;break}case"label":{i.labels=i.labels||{},i.labels[u.trim()]=h;break}case"devices":{switch(f.trim()){case"name":{i.devices&&a&&i.devices.push(a),a={},a.name=h;break}case"on-demand":{a&&h&&(a.onDemand=h=="true");break}case"automatically allowed":{a&&h&&(a.autoAllow=h=="true");break}case"annotations":{a&&(a.annotations=a.annotations||{});break}default:a&&a.annotations&&(a.annotations[u.trim()]=h)}break}case"gcpolicy":{switch(i.gcPolicy=i.gcPolicy||[],s=s||{},f.trim()){case"all":{s.all=h=="true";break}case"filters":{h&&(s.filter=h.split(","));break}case"keep duration":{s.keepDuration=h;break}case"keep bytes":{s.keepBytes=h;break}case"reserved space":{s.reservedSpace=h;break}case"max used space":{s.maxUsedSpace=h;break}case"min free space":{s.minFreeSpace=h;break}}break}case"file":{c&&i.files&&(i.files[c].length>0&&(i.files[c]+=`
|
|
|
|
|
`),i.files[c]+=l.replace(/^\s>\s?/,""));break}}}}return a&&i.devices&&i.devices.push(a),s&&i.gcPolicy&&i.gcPolicy.push(s),i.name&&r.nodes.push(i),r}};var mMe=T(Va(),1);var wP=T(require("fs"),1);var IP=class{static{o(this,"Config")}resolveFromString(e){return this.resolve(e,!1)}resolveFromFile(e){return this.resolve(e,!0)}resolve(e,r){if(r){if(!wP.default.existsSync(e))throw new Error(`config file ${e} not found`);e=wP.default.readFileSync(e,{encoding:"utf-8"})}let n=ht.tmpName({tmpdir:ht.tmpDir()});return wP.default.writeFileSync(n,e),n}};var SP=class{static{o(this,"BuildKit")}buildx;config;constructor(e){this.config=new IP,this.buildx=e?.buildx||new pt}async getVersion(e){if(!e.buildkit&&e.name)try{return await this.getVersionWithinImage(e.name)}catch(r){xe(r)}return e.buildkit}async getVersionWithinImage(e){return v(`BuildKit.getVersionWithinImage nodeName: ${e}`),jr.getExecOutput(["inspect","--format","{{.Config.Image}}",`${pt.containerNamePrefix}${e}`],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.exitCode==0&&r.stdout.length>0)return v(`BuildKit.getVersionWithinImage image: ${r.stdout.trim()}`),jr.getExecOutput(["run","--rm",r.stdout.trim(),"--version"],{ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.exitCode==0&&n.stdout.length>0)return`${r.stdout.trim()} => ${n.stdout.trim()}`;if(n.stderr.length>0)throw new Error(r.stderr.trim());return n.stdout.trim()});if(r.stderr.length>0)throw new Error(r.stderr.trim());return r.stdout.trim()})}async versionSatisfies(e,r,n){n||(n=await new sC({buildx:this.buildx}).inspect(e));for(let i of n.nodes){let s=i.buildkit;if(v(`BuildKit.versionSatisfies ${s}: ${r}`),!s)try{s=await this.getVersionWithinImage(i.name||"")}catch{return v(`BuildKit.versionSatisfies ${i.name}: can't get version`),!1}if(v(`BuildKit.versionSatisfies ${i.name}: version ${s}`),n.driver=="docker"&&!s.endsWith("-moby")||!mMe.satisfies(s.replace(/-moby$/,""),r))return!1}return!0}};var BP=class t{static{o(this,"Compose")}_version;_versionOnce;_standalone;constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}async isStandalone(){let e=this._standalone??!await jr.isAvailable();return v(`Compose.isStandalone: ${e}`),e}async getCommand(e){let r=await this.isStandalone();return{command:r?"compose":"docker",args:r?e:["compose",...e]}}async isAvailable(){let e=await this.getCommand([]),r=await Ne.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(n=>n.stderr.length>0&&n.exitCode!=0?(v(`Compose.isAvailable cmd err: ${n.stderr.trim()}`),!1):n.exitCode==0).catch(n=>(v(`Compose.isAvailable error: ${n}`),!1));return v(`Compose.isAvailable: ${r}`),r}async version(){if(this._versionOnce)return this._version;this._versionOnce=!0;let e=await this.getCommand(["version"]);return this._version=await Ne.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr.trim());return t.parseVersion(r.stdout.trim())}),this._version}async printVersion(){let e=await this.getCommand(["version"]);await Ne.exec(e.command,e.args,{failOnStdErr:!1})}static parseVersion(e){let r=/\sv?([0-9a-f]{7}|[0-9.]+)/.exec(e);if(!r)throw new Error("Cannot parse compose version");return r[1]}};var od=T(require("fs"),1),Hl=T(require("os"),1),oC=T(require("path"),1);var vP=T(Va(),1),dK=T(require("util"),1);var xP=class t{static{o(this,"Install")}standalone;githubToken;constructor(e){this.standalone=e?.standalone,this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN}async download(e,r){let n=await t.getDownloadVersion(e);v(`Install.download version: ${n.version}`);let i=await t.getRelease(n,this.githubToken);v(`Install.download release tag name: ${i.tag_name}`);let s=await this.vspec(i.tag_name);v(`Install.download vspec: ${s}`);let a=vP.clean(s)||"";if(!vP.valid(a))throw new Error(`Invalid Compose version "${s}".`);let c=new kn({htcName:n.key!="official"?`compose-dl-bin-${n.key}`:"compose-dl-bin",htcVersion:s,baseCacheDir:oC.default.join(Hl.default.homedir(),".bin","docker-compose"),cacheFile:Hl.default.platform()=="win32"?"docker-compose.exe":"docker-compose",ghaNoCache:r}),l=await c.find();if(l)return D(`Compose binary found in ${l}`),l;let u=dK.format(n.downloadURL,s,this.filename());D(`Downloading ${u}`);let d=await vo(u,void 0,this.githubToken);v(`Install.download htcDownloadPath: ${d}`);let f=await c.save(d);return D(`Cached to ${f}`),f}async installStandalone(e,r){D("Standalone mode"),r=r||ht.tmpDir();let n=oC.default.join(r,"compose-bin-standalone");od.default.existsSync(n)||od.default.mkdirSync(n,{recursive:!0});let i=Hl.default.platform()=="win32"?"compose.exe":"compose",s=oC.default.join(n,i);return od.default.copyFileSync(e,s),D("Fixing perms"),od.default.chmodSync(s,"0755"),Ec(n),D("Added Compose to PATH"),D(`Binary path: ${s}`),s}async installPlugin(e,r){D("Docker plugin mode"),r=r||jr.configDir;let n=oC.default.join(r,"cli-plugins");od.default.existsSync(n)||od.default.mkdirSync(n,{recursive:!0});let i=Hl.default
Line truncated
|
|
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
|
|
|
|
|
ARG GO_VERSION="1.24"
|
|
|
|
|
ARG ALPINE_VERSION="3.22"
|
|
|
|
|
|
|
|
|
|
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.7.0 AS xx
|
|
|
|
|
|
|
|
|
|
FROM --platform=$BUILDPLATFORM golang:\${GO_VERSION}-alpine\${ALPINE_VERSION} AS builder-base
|
|
|
|
|
COPY --from=xx / /
|
|
|
|
|
RUN apk add --no-cache git
|
|
|
|
|
ENV GOTOOLCHAIN=auto
|
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
RUN --mount=type=cache,target=/go/pkg/mod \\
|
|
|
|
|
--mount=type=bind,source=go.mod,target=go.mod \\
|
|
|
|
|
--mount=type=bind,source=go.sum,target=go.sum \\
|
|
|
|
|
go mod download
|
|
|
|
|
|
|
|
|
|
FROM builder-base AS version
|
|
|
|
|
RUN --mount=type=bind,target=. <<'EOT'
|
|
|
|
|
git rev-parse HEAD 2>/dev/null || {
|
|
|
|
|
echo >&2 "Failed to get git revision, make sure --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 is set when building from Git directly"
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
set -ex
|
|
|
|
|
export PKG=sigs.k8s.io BUILDDATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") TREESTATE=$(if ! git diff --no-ext-diff --quiet --exit-code; then echo dirty; else echo clean; fi) VERSION=$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags) COMMIT=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi);
|
|
|
|
|
echo "-X \${PKG}/release-utils/version.gitVersion=\${VERSION} -X \${PKG}/release-utils/version.gitCommit=\${COMMIT} -X \${PKG}/release-utils/version.gitTreeState=\${TREESTATE} -X \${PKG}/release-utils/version.buildDate=\${BUILDDATE}" > /tmp/.ldflags;
|
|
|
|
|
echo -n "\${VERSION}" > /tmp/.version;
|
|
|
|
|
EOT
|
|
|
|
|
|
|
|
|
|
FROM builder-base AS builder
|
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
|
RUN --mount=type=bind,target=. \\
|
|
|
|
|
--mount=type=cache,target=/root/.cache,id=cosign-$TARGETPLATFORM \\
|
|
|
|
|
--mount=source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \\
|
|
|
|
|
--mount=type=cache,target=/go/pkg/mod <<EOT
|
|
|
|
|
set -ex
|
|
|
|
|
xx-go build -trimpath -ldflags "-s -w $(cat /tmp/.ldflags)" -o /out/cosign ./cmd/cosign
|
|
|
|
|
xx-verify --static /out/cosign
|
|
|
|
|
EOT
|
|
|
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
|
COPY --from=builder /out /
|
|
|
|
|
`;var NP=class t{static{o(this,"Install")}githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||new pt,this.sigstore=e?.sigstore||new Yf}async download(e){let r=await t.getDownloadVersion(e.version);v(`Install.download version: ${r.version}`);let n=await t.getRelease(r,this.githubToken);v(`Install.download release tag name: ${n.tag_name}`);let i=await this.vspec(n.tag_name);v(`Install.download vspec: ${i}`);let s=cC.clean(i)||"";if(!cC.valid(s))throw new Error(`Invalid Cosign version "${i}".`);let a=new kn({htcName:"cosign-dl-bin",htcVersion:i,baseCacheDir:aC.default.join(sc.default.homedir(),".bin"),cacheFile:sc.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),c=await a.find();if(c)return D(`Cosign binary found in ${c}`),c;let l=fK.format(r.downloadURL,i,this.filename());D(`Downloading ${l}`);let u=await vo(l,void 0,this.githubToken);v(`Install.download htcDownloadPath: ${u}`),e.verifySignature&&cC.satisfies(i,">=3.0.1")&&await this.verifySignature(u,l);let d=await a.save(u,e.skipState);return D(`Cached to ${d}`),d}async build(e,r,n){let i=await this.vspec(e);v(`Install.build vspec: ${i}`);let s=new kn({htcName:"cosign-build-bin",htcVersion:i,baseCacheDir:aC.default.join(sc.default.homedir(),".bin"),cacheFile:sc.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),a=await s.find();if(a)return D(`Cosign binary found in ${a}`),a;let c=aC.default.join(ht.tmpDir(),"cosign-build-cache"),l=await this.buildCommand(e,c),u=await Ne.getExecOutput(l.command,l.args,{ignoreReturnCode:!0,input:Buffer.from(gMe)}).then(f=>{if(f.stderr.length>0&&f.exitCode!=0)throw new Error(`build failed with: ${pt.getErrorMessage(f.stderr)}`);return`${c}/cosign`}),d=await s.save(u,n);return D(`Cached to ${d}`),d}async install(e,r){r=r||ht.tmpDir();let n=aC.default.join(r,"cosign-bin");WS.default.existsSync(n)||WS.default.mkdirSync(n,{recursive:!0});let i=sc.default.platform()=="win32"?"cosign.exe":"cosign",s=aC.default.join(n,i);return WS.default.copyFileSync(e,s),D("Fixing perms"),WS.default.chmodSync(s,"0755"),Ec(n),D("Added Cosign to PATH"),D(`Binary path: ${s}`),s}async buildCommand(e,r){let n=await new pt({standalone:!0}).isAvailable(),i=await new pt({standalone:!1}).isAvailable(),s=!1;if(await this.buildx.isStandalone()&&n)v("Install.buildCommand: Buildx standalone found, build with it"),s=!0;else if(!await this.buildx.isStandalone()&&i)v("Install.buildCommand: Buildx plugin found, build with it"),s=!1;else if(n)v("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),s=!0;else if(i)v("Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it"),s=!1;else throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${e}`);let a=["build","--platform","local","--build-arg","BUILDKIT_CONTEXT_KEEP_GIT_DIR=1","--output",`type=local,dest=${r}`];return process.env.GIT_AUTH_TOKEN&&a.push("--secret","id=GIT_AUTH_TOKEN"),a.push("-f-",e),await new pt({standalone:s}).getCommand(a)}async verifySignature(e,r){let n=`${r}.sigstore.json`;D(`Downloading keyless verification bundle at ${n}`);let i=await vo(n,void 0,this.githubToken);v(`Install.verifySignature bundlePath: ${i}`);let s=await this.sigstore.verifyArtifact(e,i,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});D(`Cosign binary signature verified! ${s.tlogID?`${tC}?logIndex=${s.tlogID}`:""}`)}filename(){let e;switch(sc.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=sc.default.arch();break}}let r=sc.default.platform()=="win32"?"windows":sc.default.platform(),n=sc.default.platform()=="win32"?".exe":"";return fK.format("cosign-%s-%s%s",r,e,n)}async vspec(e){if(!ee.isValidRef(e)){let u=e.replace(/^v+|v+$/g,"");return D(`Use ${u} version spec cache key for ${e}`),u}let[r,n]=e.split("#");n.length==0&&(n="master");let i;n.match(/^[0-9a-fA-F]{40}$/)?i=n:i=await SE.remoteSha(r,n,process.env.GIT_AUTH_TOKEN);let[s,a]=r.substring(19).split("/"),c=`${s}/${ee.trimSuffix(a,".git")}/${i}`,l=ee.hash(c);return D(`Use ${l} version spec cache key for ${c}`),l}static async getDownloadVersion(e){return{version:e,downloadURL:"https://github.com/sigstore/cosign/releases/download/v%s/%s",contentOpts:{owner:"docker",repo:"actions-toolkit",ref:"main",path:".github/cosign-releases.json"}}}static async getRelease(e,r){let i=await new Ke({token:r}).releases("Cosign",e.contentOpts);if(!i[e.version])throw new Error(`Cannot find Cosign release ${e.version} in releases JSON`);return i[e.version]}};var yMe=T(Va(),1);var _P=class{static{o(this,"Regctl")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"regctl",this._version="",this._versionOnce=!1}async blobGet(e){return await Ne.getExecOutput(this.binPath,["blob","get",e.repository,e.digest],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stder
Line truncated
|
|
|
|
|
`)[0]?.trim()):a=new Error(`buildx failed with: ${pt.getErrorMessage(f.stderr)}`))});let c=r.buildxBuild.resolveImageID(),l=r.buildxBuild.resolveMetadata(),u=r.buildxBuild.resolveDigest(l);c&&await Br("ImageID",async()=>{D(c),F2("imageid",c)}),u&&await Br("Digest",async()=>{D(u),F2("digest",u)}),l&&await Br("Metadata",async()=>{let f=JSON.stringify(l,null,2);Ke.printUntrusted(f),F2("metadata",f)});let d;if(await Br("Reference",async()=>{d=await D8t(r,t,e.builder),d?(D(d),KFe(d)):D("No build reference found")}),Q8t()){let f=r.buildxBuild.resolveWarnings(l);if(d&&f&&f.length>0){let h=await pt.convertWarningsToGitHubAnnotations(f,[d]);v(`annotations: ${JSON.stringify(h,null,2)}`),h&&h.length>0&&await Br(`Generating GitHub annotations (${h.length} build checks found)`,async()=>{for(let p of h)xe(p.message,p)})}}if(await Br("Check build summary support",async()=>{k8t()?e.call&&e.call!=="build"?D(`Build summary skipped for ${e.call} subrequest`):Ke.isGHES?D("Build summary is not yet supported on GHES"):await r.buildx.versionSatisfies(">=0.23.0")?d?(D("Build summary supported!"),XFe()):D("Build summary requires a build reference"):D("Build summary requires Buildx >= 0.23.0"):D("Build summary disabled")}),a)throw a},async()=>{jFe&&await Br("Generating build summary",async()=>{try{let t=P8t(),e;t&&(e=O8t());let n=await new u1().export({refs:JK?[JK]:[]});D(`Build record written to ${n.dockerbuildFilename} (${ee.formatFileSize(n.dockerbuildSize)})`);let i;t&&(i=await DQ.upload({filename:n.dockerbuildFilename,retentionDays:e})),await UQ.writeBuildSummary({exportRes:n,uploadRes:i,inputs:$Fe,driver:zFe,endpoint:VFe})}catch(t){xe(t.message)}}),lB.length>0&&await Br(`Removing temp folder ${lB}`,async()=>{try{eUe.rmSync(lB,{recursive:!0})}catch{xe(`Failed to remove temp folder ${lB}`)}})});async function D8t(t,e,r){let n=t.buildxBuild.resolveRef();if(n)return n;r||(r=(await t.builder.inspect()).name);let i=pt.refs({dir:pt.refsDir,builderName:r,since:e});return Object.keys(i).length>0?Object.keys(i)[0]:""}o(D8t,"buildRef");function Q8t(){return process.env.DOCKER_BUILD_CHECKS_ANNOTATIONS?ee.parseBool(process.env.DOCKER_BUILD_CHECKS_ANNOTATIONS):!0}o(Q8t,"buildChecksAnnotationsEnabled");function k8t(){return process.env.DOCKER_BUILD_SUMMARY?ee.parseBool(process.env.DOCKER_BUILD_SUMMARY):!0}o(k8t,"buildSummaryEnabled");function P8t(){return process.env.DOCKER_BUILD_RECORD_UPLOAD?ee.parseBool(process.env.DOCKER_BUILD_RECORD_UPLOAD):!0}o(P8t,"buildRecordUploadEnabled");function O8t(){let t=process.env.DOCKER_BUILD_RECORD_RETENTION_DAYS;if(t){let e=parseInt(t);if(isNaN(e))throw new Error(`Invalid build record retention days: ${t}`);return e}}o(O8t,"buildRecordRetentionDays");
|
|
|
|
|
/*! Bundled license information:
|
|
|
|
|
|
|
|
|
|
undici/lib/web/fetch/body.js:
|
|
|
|
|
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
|
|
|
|
|
|
|
|
|
undici/lib/web/websocket/frame.js:
|
|
|
|
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
|
|
|
|
|
|
|
|
tmp/lib/tmp.js:
|
|
|
|
|
(*!
|
|
|
|
|
* Tmp
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
|
|
|
|
|
*
|
|
|
|
|
* MIT Licensed
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
normalize-path/index.js:
|
|
|
|
|
(*!
|
|
|
|
|
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
|
|
|
* Released under the MIT License.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
archiver/lib/error.js:
|
|
|
|
|
archiver/lib/core.js:
|
|
|
|
|
(**
|
|
|
|
|
* Archiver Core
|
|
|
|
|
*
|
|
|
|
|
* @ignore
|
|
|
|
|
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
|
|
|
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
crc-32/crc32.js:
|
|
|
|
|
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
|
|
|
|
|
|
|
|
|
|
zip-stream/index.js:
|
|
|
|
|
(**
|
|
|
|
|
* ZipStream
|
|
|
|
|
*
|
|
|
|
|
* @ignore
|
|
|
|
|
* @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
|
|
|
|
|
* @copyright (c) 2014 Chris Talkington, contributors.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
archiver/lib/plugins/zip.js:
|
|
|
|
|
(**
|
|
|
|
|
* ZIP Format Plugin
|
|
|
|
|
*
|
|
|
|
|
* @module plugins/zip
|
|
|
|
|
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
|
|
|
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
archiver/lib/plugins/tar.js:
|
|
|
|
|
(**
|
|
|
|
|
* TAR Format Plugin
|
|
|
|
|
*
|
|
|
|
|
* @module plugins/tar
|
|
|
|
|
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
|
|
|
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
archiver/lib/plugins/json.js:
|
|
|
|
|
(**
|
|
|
|
|
* JSON Format Plugin
|
|
|
|
|
*
|
|
|
|
|
* @module plugins/json
|
|
|
|
|
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
|
|
|
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
archiver/index.js:
|
|
|
|
|
(**
|
|
|
|
|
* Archiver Vending
|
|
|
|
|
*
|
|
|
|
|
* @ignore
|
|
|
|
|
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
|
|
|
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
@octokit/request-error/dist-src/index.js:
|
|
|
|
|
@octokit/request-error/dist-src/index.js:
|
|
|
|
|
(* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist *)
|
|
|
|
|
|
|
|
|
|
@octokit/request/dist-bundle/index.js:
|
|
|
|
|
(* v8 ignore next -- @preserve *)
|
|
|
|
|
(* v8 ignore else -- @preserve *)
|
|
|
|
|
|
|
|
|
|
he/src/he.mjs:
|
|
|
|
|
(*! https://mths.be/he by @mathias | MIT license *)
|
|
|
|
|
|
|
|
|
|
js-yaml/dist/js-yaml.mjs:
|
|
|
|
|
(*! js-yaml 5.4.3 https://github.com/nodeca/js-yaml @license MIT *)
|
|
|
|
|
*/
|
|
|
|
|
//# sourceMappingURL=index.cjs.map
|