|
|
|
@@ -1,196 +1,170 @@
|
|
|
|
|
var SZe=Object.create;var h_=Object.defineProperty;var NZe=Object.getOwnPropertyDescriptor;var vZe=Object.getOwnPropertyNames;var FZe=Object.getPrototypeOf,TZe=Object.prototype.hasOwnProperty;var xZe=(t,e)=>()=>(t&&(e=t(t=0)),e);var f=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gie=(t,e)=>{for(var r in e)h_(t,r,{get:e[r],enumerable:!0})},WZe=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of vZe(e))!TZe.call(t,n)&&n!==r&&h_(t,n,{get:()=>e[n],enumerable:!(s=NZe(e,n))||s.enumerable});return t};var F=(t,e,r)=>(r=t!=null?SZe(FZe(t)):{},WZe(e||!t||!t.__esModule?h_(r,"default",{value:t,enumerable:!0}):r,t));var Die=f(xh=>{"use strict";var L2t=require("net"),UZe=require("tls"),E_=require("http"),yie=require("https"),GZe=require("events"),P2t=require("assert"),HZe=require("util");xh.httpOverHttp=XZe;xh.httpsOverHttp=VZe;xh.httpOverHttps=jZe;xh.httpsOverHttps=$Ze;function XZe(t){var e=new Iu(t);return e.request=E_.request,e}function VZe(t){var e=new Iu(t);return e.request=E_.request,e.createSocket=Cie,e.defaultPort=443,e}function jZe(t){var e=new Iu(t);return e.request=yie.request,e}function $Ze(t){var e=new Iu(t);return e.request=yie.request,e.createSocket=Cie,e.defaultPort=443,e}function Iu(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||E_.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(s,n,i,o){for(var a=Bie(n,i,o),c=0,u=e.requests.length;c<u;++c){var p=e.requests[c];if(p.host===a.host&&p.port===a.port){e.requests.splice(c,1),p.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)})}HZe.inherits(Iu,GZe.EventEmitter);Iu.prototype.addRequest=function(e,r,s,n){var i=this,o=y_({request:e},i.options,Bie(r,s,n));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",c),a.on("close",u),a.on("agentRemove",u),e.onSocket(a);function c(){i.emit("free",a,o)}function u(p){i.removeSocket(a),a.removeListener("free",c),a.removeListener("close",u),a.removeListener("agentRemove",u)}})};Iu.prototype.createSocket=function(e,r){var s=this,n={};s.sockets.push(n);var i=y_({},s.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),Dl("making CONNECT request");var o=s.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",u),o.once("error",p),o.end();function a(l){l.upgrade=!0}function c(l,A,h){process.nextTick(function(){u(l,A,h)})}function u(l,A,h){if(o.removeAllListeners(),A.removeAllListeners(),l.statusCode!==200){Dl("tunneling socket could not be established, statusCode=%d",l.statusCode),A.destroy();var M=new Error("tunneling socket could not be established, statusCode="+l.statusCode);M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}if(h.length>0){Dl("got illegal response body from proxy"),A.destroy();var M=new Error("got illegal response body from proxy");M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}return Dl("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=A,r(A)}function p(l){o.removeAllListeners(),Dl(`tunneling socket could not be established, cause=%s
|
|
|
|
|
`,l.message,l.stack);var A=new Error("tunneling socket could not be established, cause="+l.message);A.code="ECONNRESET",e.request.emit("error",A),s.removeSocket(n)}};Iu.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var s=this.requests.shift();s&&this.createSocket(s,function(n){s.request.onSocket(n)})}};function Cie(t,e){var r=this;Iu.prototype.createSocket.call(r,t,function(s){var n=t.request.getHeader("host"),i=y_({},r.options,{socket:s,servername:n?n.replace(/:.*$/,""):t.host}),o=UZe.connect(0,i);r.sockets[r.sockets.indexOf(s)]=o,e(o)})}function Bie(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function y_(t){for(var e=1,r=arguments.length;e<r;++e){var s=arguments[e];if(typeof s=="object")for(var n=Object.keys(s),i=0,o=n.length;i<o;++i){var a=n[i];s[a]!==void 0&&(t[a]=s[a])}}return t}var Dl;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Dl=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)}:Dl=function(){};xh.debug=Dl});var Bz=f((k2t,qie)=>{qie.exports=Die()});var bt=f((U2t,Iie)=>{Iie.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 B0=f((G2t,Zie)=>{"use strict";var Rie=Symbol.for("undici.error.UND_ERR"),Mt=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[Rie]===!0}[Rie]=!0},wie=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),C_=class extends Mt{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[wie]===!0}[wie]=!0},Sie=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),B_=class extends Mt{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[Sie]===!0}[Sie]=!0},Nie=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),D_=class extends Mt{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[Nie]===!0}[Nie]=!0},vie=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),q_=class extends Mt{constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[vie]===!0}[vie]=!0},Fie=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),I_=class extends Mt{constructor(e,r,s,n){super(e),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_C
Line truncated
|
|
|
|
|
`)||t.includes("\r")||t.includes("\0"))===!1}function lt0(t,e){let{headersList:r}=e,s=(r.get("referrer-policy",!0)??"").split(","),n="";if(s.length>0)for(let i=s.length;i!==0;i--){let o=s[i-1].trim();if($00.has(o)){n=o;break}}n!==""&&(t.referrerPolicy=n)}function At0(){return"allowed"}function dt0(){return"success"}function ft0(){return"success"}function ht0(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function bt0(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&&gL(t.origin)&&!gL(Fz(t))&&(e=null);break;case"same-origin":oD(t,Fz(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function Xh(t,e){return t}function Mt0(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:Xh(t.domainLookupStartTime,r),domainLookupEndTime:Xh(t.domainLookupEndTime,r),connectionStartTime:Xh(t.connectionStartTime,r),connectionEndTime:Xh(t.connectionEndTime,r),secureConnectionStartTime:Xh(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function mt0(t){return Xh(et0.now(),t)}function gt0(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}}function fae(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function zt0(t){return{referrerPolicy:t.referrerPolicy}}function Ot0(t){let e=t.referrerPolicy;wd(e);let r=null;if(t.referrer==="client"){let a=cae();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let s=mL(r),n=mL(r,!0);s.toString().length>4096&&(s=n);let i=oD(t,s),o=vz(s)&&!vz(t.url);switch(e){case"origin":return n??mL(r,!0);case"unsafe-url":return s;case"same-origin":return i?n:"no-referrer";case"origin-when-cross-origin":return i?s:n;case"strict-origin-when-cross-origin":{let a=Fz(t);return oD(s,a)?s:vz(s)&&!vz(a)?"no-referrer":n}default:return o?"no-referrer":n}}function mL(t,e){return wd(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)}function vz(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 s=new URL(r);return!!(s.protocol==="https:"||s.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(s.hostname)||s.hostname==="localhost"||s.hostname.includes("localhost.")||s.hostname.endsWith(".localhost"))}}function Et0(t,e){if(iD===void 0)return!0;let r=hae(e);if(r==="no metadata"||r.length===0)return!0;let s=Ct0(r),n=Bt0(r,s);for(let i of n){let o=i.algo,a=i.hash,c=iD.createHash(o).update(t).digest("base64");if(c[c.length-1]==="="&&(c[c.length-2]==="="?c=c.slice(0,-2):c=c.slice(0,-1)),Dt0(c,a))return!0}return!1}var yt0=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function hae(t){let e=[],r=!0;for(let s of t.split(" ")){r=!1;let n=yt0.exec(s);if(n===null||n.groups===void 0||n.groups.algo===void 0)continue;let i=n.groups.algo.toLowerCase();pae.includes(i)&&e.push(n.groups)}return r===!0?"no metadata":e}function Ct0(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let s=t[r];if(s.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;s.algo[3]==="3"&&(e="sha384")}}return e}function Bt0(t,e){if(t.length===1)return t;let r=0;for(let s=0;s<t.length;++s)t[s].algo===e&&(t[r++]=t[s]);return t.length=r,t}function Dt0(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}function qt0(t){}function oD(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function It0(){let t,e;return{promise:new Promise((s,n)=>{t=s,e=n}),resolve:t,reject:e}}function Rt0(t){return t.controller.state==="aborted"}function wt0(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function St0(t){return st0[t.toLowerCase()]??t}function Nt0(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return wd(typeof e=="string"),e}var vt0=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function bae(t,e,r=0,s=1){class n{
Line truncated
|
|
|
|
|
`);function u10(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function p10(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let s=t.charCodeAt(r);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||s===39||s===45||s===95))return!1}return!0}function l10(t,e){cD(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let s=Buffer.from(`--${r}`,"utf8"),n=[],i={position:0};for(;t[i.position]===13&&t[i.position+1]===10;)i.position+=2;let o=t.length;for(;t[o-1]===10&&t[o-2]===13;)o-=2;for(o!==t.length&&(t=t.subarray(0,o));;){if(t.subarray(i.position,i.position+s.length).equals(s))i.position+=s.length;else return"failure";if(i.position===t.length-2&&uD(t,a10,i)||i.position===t.length-4&&uD(t,c10,i))return n;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let a=A10(t,i);if(a==="failure")return"failure";let{name:c,filename:u,contentType:p,encoding:l}=a;i.position+=2;let A;{let M=t.indexOf(s.subarray(2),i.position);if(M===-1)return"failure";A=t.subarray(i.position,M-4),i.position+=A.length,l==="base64"&&(A=Buffer.from(A.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let h;u!==null?(p??="text/plain",u10(p)||(p=""),h=new i10([A],u,{type:p})):h=e10(Buffer.from(A)),cD(Iae(c)),cD(typeof h=="string"&&Iae(h)||r10(h)),n.push(s10(c,h,u))}}function A10(t,e){let r=null,s=null,n=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:s,contentType:n,encoding:i};let o=jh(a=>a!==10&&a!==13&&a!==58,t,e);if(o=DL(o,!0,!0,a=>a===9||a===32),!t10.test(o.toString())||t[e.position]!==58)return"failure";switch(e.position++,jh(a=>a===32||a===9,t,e),Zt0(o)){case"content-disposition":{if(r=s=null,!uD(t,o10,e)||(e.position+=17,r=Sae(t,e),r===null))return"failure";if(uD(t,wae,e)){let a=e.position+wae.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,s=Sae(t,e),s===null))return"failure"}break}case"content-type":{let a=jh(c=>c!==10&&c!==13,t,e);a=DL(a,!1,!0,c=>c===9||c===32),n=Rae(a);break}case"content-transfer-encoding":{let a=jh(c=>c!==10&&c!==13,t,e);a=DL(a,!1,!0,c=>c===9||c===32),i=Rae(a);break}default:jh(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function Sae(t,e){cD(t[e.position-1]===34);let r=jh(s=>s!==10&&s!==13&&s!==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)}function jh(t,e,r){let s=r.position;for(;s<e.length&&t(e[s]);)++s;return e.subarray(r.position,r.position=s)}function DL(t,e,r,s){let n=0,i=t.length-1;if(e)for(;n<t.length&&s(t[n]);)n++;if(r)for(;i>0&&s(t[i]);)i--;return n===0&&i===t.length-1?t:t.subarray(n,i+1)}function uD(t,e,r){if(t.length<e.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[r.position+s])return!1;return!0}Nae.exports={multipartFormDataParser:l10,validateBoundary:p10}});var Jh=f((hft,Uae)=>{"use strict";var Wz=u0(),{ReadableStreamFrom:d10,isBlobLike:Fae,isReadableStreamLike:f10,readableStreamClose:h10,createDeferredPromise:b10,fullyReadBody:M10,extractMimeType:m10,utf8DecodeBytes:Wae}=Sn(),{FormData:Tae}=xz(),{kState:Yh}=ql(),{webidl:g10}=fr(),{Blob:z10}=require("node:buffer"),qL=require("node:assert"),{isErrored:_ae,isDisturbed:O10}=require("node:stream"),{isArrayBuffer:E10}=require("node:util/types"),{serializeAMimeType:y10}=Xs(),{multipartFormDataParser:C10}=vae(),IL;try{let t=require("node:crypto");IL=e=>t.randomInt(0,e)}catch{IL=t=>Math.floor(Math.random(t))}var pD=new TextEncoder;function B10(){}var Lae=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,Pae;Lae&&(Pae=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!O10(e)&&!_ae(e)&&e.cancel("Response object has been garbage collected").catch(B10)}));function Qae(t,e=!1){let r=null;t instanceof ReadableStream?r=t:Fae(t)?r=t.stream():r=new ReadableStream({async pull(c){let u=typeof n=="string"?pD.encode(n):n;u.byteLength&&c.enqueue(u),queueMicrotask(()=>h10(c))},start(){},type:"bytes"}),qL(f10(r));let s=null,n=null,i=null,o=null;if(typeof t=="string")n=t,o="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)n=t.toString(),o="application/x-www-form-urlencoded;charset=UTF-8";else if(E10(t))n=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))n=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Wz.isFormDataLike(t)){let c=`----formdata-undici-0${`${IL(1e11)}`.padStart(11,"0")}`,u=`--${c}\r
|
|
|
|
|
Content-Disposition: form-data`;let p=y=>y.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),l=y=>y.replace(/\r?\n|\r/g,`\r
|
|
|
|
|
`),A=[],h=new Uint8Array([13,10]);i=0;let M=!1;for(let[y,O]of t)if(typeof O=="string"){let B=pD.encode(u+`; name="${p(l(y))}"\r
|
|
|
|
|
var VIe=Object.create;var Mz=Object.defineProperty;var JIe=Object.getOwnPropertyDescriptor;var YIe=Object.getOwnPropertyNames;var $Ie=Object.getPrototypeOf,jIe=Object.prototype.hasOwnProperty;var s=(t,e)=>Mz(t,"name",{value:e,configurable:!0});var m=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),KIe=(t,e)=>{for(var r in e)Mz(t,r,{get:e[r],enumerable:!0})},ZIe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of YIe(e))!jIe.call(t,o)&&o!==r&&Mz(t,o,{get:()=>e[o],enumerable:!(n=JIe(e,o))||n.enumerable});return t};var w=(t,e,r)=>(r=t!=null?VIe($Ie(t)):{},ZIe(e||!t||!t.__esModule?Mz(r,"default",{value:t,enumerable:!0}):r,t));var i9=m(bA=>{"use strict";var _B0=require("net"),i5e=require("tls"),uI=require("http"),r9=require("https"),s5e=require("events"),QB0=require("assert"),a5e=require("util");bA.httpOverHttp=c5e;bA.httpsOverHttp=u5e;bA.httpOverHttps=p5e;bA.httpsOverHttps=A5e;function c5e(t){var e=new Os(t);return e.request=uI.request,e}s(c5e,"httpOverHttp");function u5e(t){var e=new Os(t);return e.request=uI.request,e.createSocket=n9,e.defaultPort=443,e}s(u5e,"httpsOverHttp");function p5e(t){var e=new Os(t);return e.request=r9.request,e}s(p5e,"httpOverHttps");function A5e(t){var e=new Os(t);return e.request=r9.request,e.createSocket=n9,e.defaultPort=443,e}s(A5e,"httpsOverHttps");function Os(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||uI.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",s(function(n,o,i,a){for(var c=o9(o,i,a),u=0,p=e.requests.length;u<p;++u){var A=e.requests[u];if(A.host===c.host&&A.port===c.port){e.requests.splice(u,1),A.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}s(Os,"TunnelingAgent");a5e.inherits(Os,s5e.EventEmitter);Os.prototype.addRequest=s(function(e,r,n,o){var i=this,a=pI({request:e},i.options,o9(r,n,o));if(i.sockets.length>=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(c){c.on("free",u),c.on("close",p),c.on("agentRemove",p),e.onSocket(c);function u(){i.emit("free",c,a)}s(u,"onFree");function p(A){i.removeSocket(c),c.removeListener("free",u),c.removeListener("close",p),c.removeListener("agentRemove",p)}s(p,"onCloseOrRemove")})},"addRequest");Os.prototype.createSocket=s(function(e,r){var n=this,o={};n.sockets.push(o);var i=pI({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),Sa("making CONNECT request");var a=n.request(i);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",u),a.once("connect",p),a.once("error",A),a.end();function c(l){l.upgrade=!0}s(c,"onResponse");function u(l,b,M){process.nextTick(function(){p(l,b,M)})}s(u,"onUpgrade");function p(l,b,M){if(a.removeAllListeners(),b.removeAllListeners(),l.statusCode!==200){Sa("tunneling socket could not be established, statusCode=%d",l.statusCode),b.destroy();var z=new Error("tunneling socket could not be established, statusCode="+l.statusCode);z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}if(M.length>0){Sa("got illegal response body from proxy"),b.destroy();var z=new Error("got illegal response body from proxy");z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}return Sa("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=b,r(b)}s(p,"onConnect");function A(l){a.removeAllListeners(),Sa(`tunneling socket could not be established, cause=%s
|
|
|
|
|
`,l.message,l.stack);var b=new Error("tunneling socket could not be established, cause="+l.message);b.code="ECONNRESET",e.request.emit("error",b),n.removeSocket(o)}s(A,"onError")},"createSocket");Os.prototype.removeSocket=s(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(o){n.request.onSocket(o)})}},"removeSocket");function n9(t,e){var r=this;Os.prototype.createSocket.call(r,t,function(n){var o=t.request.getHeader("host"),i=pI({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):t.host}),a=i5e.connect(0,i);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}s(n9,"createSecureSocket");function o9(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}s(o9,"toOptions");function pI(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var o=Object.keys(n),i=0,a=o.length;i<a;++i){var c=o[i];n[c]!==void 0&&(t[c]=n[c])}}return t}s(pI,"mergeOptions");var Sa;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Sa=s(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"):Sa=s(function(){},"debug");bA.debug=Sa});var Kd=m((UB0,s9)=>{s9.exports=i9()});var G0=m((GB0,a9)=>{a9.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 p0=m((HB0,S9)=>{"use strict";var c9=Symbol.for("undici.error.UND_ERR"),H0=class extends Error{static{s(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[c9]===!0}[c9]=!0},u9=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),AI=class extends H0{static{s(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[u9]===!0}[u9]=!0},p9=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),lI=class extends H0{static{s(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[p9]===!0}[p9]=!0},A9=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),dI=class extends H0{static{s(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[A9]===!0}[A9]=!0},l9=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),bI=class extends H0{static{s(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}s(HG,"isValidHeaderValue");function qNe(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),o="";if(n.length>0)for(let i=n.length;i!==0;i--){let a=n[i-1].trim();if(ANe.has(a)){o=a;break}}o!==""&&(t.referrerPolicy=o)}s(qNe,"setRequestReferrerPolicyOnRedirect");function INe(){return"allowed"}s(INe,"crossOriginResourcePolicyCheck");function RNe(){return"success"}s(RNe,"corsCheck");function NNe(){return"success"}s(NNe,"TAOCheck");function wNe(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}s(wNe,"appendFetchMetadata");function SNe(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&&s5(t.origin)&&!s5(cb(t))&&(e=null);break;case"same-origin":Pz(t,cb(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}s(SNe,"appendRequestOriginHeader");function yA(t,e){return t}s(yA,"coarsenTime");function FNe(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:yA(t.domainLookupStartTime,r),domainLookupEndTime:yA(t.domainLookupEndTime,r),connectionStartTime:yA(t.connectionStartTime,r),connectionEndTime:yA(t.connectionEndTime,r),secureConnectionStartTime:yA(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}s(FNe,"clampAndCoarsenConnectionTimingInfo");function WNe(t){return yA(MNe.now(),t)}s(WNe,"coarsenedSharedCurrentTime");function xNe(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}}s(xNe,"createOpaqueTimingInfo");function XG(){return{referrerPolicy:"strict-origin-when-cross-origin"}}s(XG,"makePolicyContainer");function TNe(t){return{referrerPolicy:t.referrerPolicy}}s(TNe,"clonePolicyContainer");function vNe(t){let e=t.referrerPolicy;nu(e);let r=null;if(t.referrer==="client"){let c=QG();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let n=i5(r),o=i5(r,!0);n.toString().length>4096&&(n=o);let i=Pz(t,n),a=ab(n)&&!ab(t.url);switch(e){case"origin":return o??i5(r,!0);case"unsafe-url":return n;case"same-origin":return i?o:"no-referrer";case"origin-when-cross-origin":return i?n:o;case"strict-origin-when-cross-origin":{let c=cb(t);return Pz(n,c)?n:ab(n)&&!ab(c)?"no-referrer":o}default:return a?"no-referrer":o}}s(vNe,"determineRequestsReferrer");function i5(t,e){return nu(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)}s(i5,"stripURLForReferrer");function ab(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"))}}s(ab,"isURLPotentiallyTrustworthy");function LNe(t,e){if(Qz===void 0)return!0;let r=VG(e);if(r==="no metadata"||r.length===0)return!0;let n=QNe(r),o=PNe(r,n);for(let i of o){let a=i.algo,c=i.hash,u=Qz.createHash(a).update(t).digest("base64");if(u[u.length-1]==="="&&(u[u.length-2]==="="?u=u.slice(0,-2):u=u.slice(0,-1)),kNe(u,c))return!0}return!1}s(LNe,"bytesMatch");var _Ne=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function VG(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let o=_Ne.exec(n);if(o===null||o.groups===void 0||o.groups.algo===void 0)continue;let i=o.groups.algo.toLowerCase();kG.includes(i)&&e.push(o.groups)}return r===!0?"no metadata":e}s(VG,"parseMetadata");function QNe(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}s(QNe,"getStrongestMetadata");function PNe(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}s(PNe,"filterMetadataListByAlgorithm");function kNe(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}s(kNe,"compareBase64Mixed");function UNe(t){}s(UNe,"tryUpgradeReque
Line truncated
|
|
|
|
|
`);function Bwe(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}s(Bwe,"isAsciiString");function Dwe(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}s(Dwe,"validateBoundary");function qwe(t,e){Uz(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"),o=[],i={position:0};for(;t[i.position]===13&&t[i.position+1]===10;)i.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(i.position,i.position+n.length).equals(n))i.position+=n.length;else return"failure";if(i.position===t.length-2&&Gz(t,Cwe,i)||i.position===t.length-4&&Gz(t,ywe,i))return o;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let c=Iwe(t,i);if(c==="failure")return"failure";let{name:u,filename:p,contentType:A,encoding:l}=c;i.position+=2;let b;{let z=t.indexOf(n.subarray(2),i.position);if(z===-1)return"failure";b=t.subarray(i.position,z-4),i.position+=b.length,l==="base64"&&(b=Buffer.from(b.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let M;p!==null?(A??="text/plain",Bwe(A)||(A=""),M=new Owe([b],p,{type:A})):M=Mwe(Buffer.from(b)),Uz(sH(u)),Uz(typeof M=="string"&&sH(M)||hwe(M)),o.push(zwe(u,M,p))}}s(qwe,"multipartFormDataParser");function Iwe(t,e){let r=null,n=null,o=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:o,encoding:i};let a=DA(c=>c!==10&&c!==13&&c!==58,t,e);if(a=d5(a,!0,!0,c=>c===9||c===32),!mwe.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,DA(c=>c===32||c===9,t,e),fwe(a)){case"content-disposition":{if(r=n=null,!Gz(t,Ewe,e)||(e.position+=17,r=uH(t,e),r===null))return"failure";if(Gz(t,cH,e)){let c=e.position+cH.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=uH(t,e),n===null))return"failure"}break}case"content-type":{let c=DA(u=>u!==10&&u!==13,t,e);c=d5(c,!1,!0,u=>u===9||u===32),o=aH(c);break}case"content-transfer-encoding":{let c=DA(u=>u!==10&&u!==13,t,e);c=d5(c,!1,!0,u=>u===9||u===32),i=aH(c);break}default:DA(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}s(Iwe,"parseMultipartFormDataHeaders");function uH(t,e){Uz(t[e.position-1]===34);let r=DA(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)}s(uH,"parseMultipartFormDataName");function DA(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}s(DA,"collectASequenceOfBytes");function d5(t,e,r,n){let o=0,i=t.length-1;if(e)for(;o<t.length&&n(t[o]);)o++;if(r)for(;i>0&&n(t[i]);)i--;return o===0&&i===t.length-1?t:t.subarray(o,i+1)}s(d5,"removeChars");function Gz(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}s(Gz,"bufferStartsWith");pH.exports={multipartFormDataParser:qwe,validateBoundary:Dwe}});var RA=m((wD0,OH)=>{"use strict";var Ab=Xe(),{ReadableStreamFrom:Rwe,isBlobLike:lH,isReadableStreamLike:Nwe,readableStreamClose:wwe,createDeferredPromise:Swe,fullyReadBody:Fwe,extractMimeType:Wwe,utf8DecodeBytes:fH}=wr(),{FormData:dH}=pb(),{kState:IA}=Fa(),{webidl:xwe}=st(),{Blob:Twe}=require("node:buffer"),b5=require("node:assert"),{isErrored:MH,isDisturbed:vwe}=require("node:stream"),{isArrayBuffer:Lwe}=require("node:util/types"),{serializeAMimeType:_we}=tr(),{multipartFormDataParser:Qwe}=AH(),f5;try{let t=require("node:crypto");f5=s(e=>t.randomInt(0,e),"random")}catch{f5=s(t=>Math.floor(Math.random(t)),"random")}var Hz=new TextEncoder;function Pwe(){}s(Pwe,"noop");var mH=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,hH;mH&&(hH=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!vwe(e)&&!MH(e)&&e.cancel("Response object has been garbage collected").catch(Pwe)}));function zH(t,e=!1){let r=null;t instanceof ReadableStream?r=t:lH(t)?r=t.stream():r=new ReadableStream({async pull(u){let p=typeof o=="string"?Hz.encode(o):o;p.byteLength&&u.enqueue(p),queueMicrotask(()=>wwe(u))},start(){},type:"bytes"}),b5(Nwe(r));let n=null,o=null,i=null,a=null;if(typeof t=="string")o=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)o=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(Lwe(t))o=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))o=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Ab.isFormDataLike(t)){let u=`----formdata-undici-0${`${f5(1e11)}`.padStart(11,"0")}`,p=`--${u}\r
|
|
|
|
|
Content-Disposition: form-data`;let A=s(C=>C.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),l=s(C=>C.replace(/\r?\n|\r/g,`\r
|
|
|
|
|
`),"normalizeLinefeeds"),b=[],M=new Uint8Array([13,10]);i=0;let z=!1;for(let[C,E]of t)if(typeof E=="string"){let B=Hz.encode(p+`; name="${A(l(C))}"\r
|
|
|
|
|
\r
|
|
|
|
|
${l(O)}\r
|
|
|
|
|
`);A.push(B),i+=B.byteLength}else{let B=pD.encode(`${u}; name="${p(l(y))}"`+(O.name?`; filename="${p(O.name)}"`:"")+`\r
|
|
|
|
|
Content-Type: ${O.type||"application/octet-stream"}\r
|
|
|
|
|
${l(E)}\r
|
|
|
|
|
`);b.push(B),i+=B.byteLength}else{let B=Hz.encode(`${p}; name="${A(l(C))}"`+(E.name?`; filename="${A(E.name)}"`:"")+`\r
|
|
|
|
|
Content-Type: ${E.type||"application/octet-stream"}\r
|
|
|
|
|
\r
|
|
|
|
|
`);A.push(B,O,h),typeof O.size=="number"?i+=B.byteLength+O.size+h.byteLength:M=!0}let g=pD.encode(`--${c}--\r
|
|
|
|
|
`);A.push(g),i+=g.byteLength,M&&(i=null),n=t,s=async function*(){for(let y of A)y.stream?yield*y.stream():yield y},o=`multipart/form-data; boundary=${c}`}else if(Fae(t))n=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Wz.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:d10(t)}if((typeof n=="string"||Wz.isBuffer(n))&&(i=Buffer.byteLength(n)),s!=null){let c;r=new ReadableStream({async start(){c=s(t)[Symbol.asyncIterator]()},async pull(u){let{value:p,done:l}=await c.next();if(l)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!_ae(r)){let A=new Uint8Array(p);A.byteLength&&u.enqueue(A)}return u.desiredSize>0},async cancel(u){await c.return()},type:"bytes"})}return[{stream:r,source:n,length:i},o]}function D10(t,e=!1){return t instanceof ReadableStream&&(qL(!Wz.isDisturbed(t),"The body has already been consumed."),qL(!t.locked,"The stream is locked.")),Qae(t,e)}function q10(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function I10(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function R10(t){return{blob(){return $h(this,r=>{let s=xae(this);return s===null?s="":s&&(s=y10(s)),new z10([r],{type:s})},t)},arrayBuffer(){return $h(this,r=>new Uint8Array(r).buffer,t)},text(){return $h(this,Wae,t)},json(){return $h(this,S10,t)},formData(){return $h(this,r=>{let s=xae(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=C10(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Tae;return i[Yh]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new Tae;for(let[o,a]of n)i.append(o,a);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return $h(this,r=>new Uint8Array(r),t)}}}function w10(t){Object.assign(t.prototype,R10(t))}async function $h(t,e,r){if(g10.brandCheck(t,r),kae(t))throw new TypeError("Body is unusable: Body has already been read");I10(t[Yh]);let s=b10(),n=o=>s.reject(o),i=o=>{try{s.resolve(e(o))}catch(a){n(a)}};return t[Yh].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await M10(t[Yh].body,i,n),s.promise)}function kae(t){let e=t[Yh].body;return e!=null&&(e.stream.locked||Wz.isDisturbed(e.stream))}function S10(t){return JSON.parse(Wae(t))}function xae(t){let e=t[Yh].headersList,r=m10(e);return r==="failure"?null:r}Uae.exports={extractBody:Qae,safelyExtractBody:D10,cloneBody:q10,mixinBody:w10,streamRegistry:Pae,hasFinalizationRegistry:Lae,bodyUnusable:kae}});var ece=f((bft,Zae)=>{"use strict";var Te=require("node:assert"),Xe=u0(),{channels:Gae}=_h(),RL=pL(),{RequestContentLengthMismatchError:Sd,ResponseContentLengthMismatchError:N10,RequestAbortedError:Yae,HeadersTimeoutError:v10,HeadersOverflowError:F10,SocketError:bD,InformationalError:Kh,BodyTimeoutError:T10,HTTPParserError:x10,ResponseExceededMaxSizeError:W10}=B0(),{kUrl:Jae,kReset:Vs,kClient:vL,kParser:Nt,kBlocking:Pz,kRunning:Br,kPending:_10,kSize:Hae,kWriting:Rl,kQueue:Fo,kNoRef:_z,kKeepAliveDefaultTimeout:L10,kHostHeader:P10,kPendingIdx:Q10,kRunningIdx:Oi,kError:Ei,kPipelining:fD,kSocket:Zh,kKeepAliveTimeoutValue:MD,kMaxHeadersSize:wL,kKeepAliveMaxTimeout:k10,kKeepAliveTimeoutThreshold:U10,kHeadersTimeout:G10,kBodyTimeout:H10,kStrictContentLength:FL,kMaxRequests:Xae,kCounter:X10,kMaxResponseSize:V10,kOnError:j10,kResume:Il,kHTTPContext:Kae}=bt(),Ia=Poe(),$10=Buffer.alloc(0),lD=Buffer[Symbol.species],AD=Xe.addListener,Y10=Xe.removeAllListeners,SL;async function J10(){let t=process.env.JEST_WORKER_ID?dL():void 0,e;try{e=await WebAssembly.compile(Uoe())}catch{e=await WebAssembly.compile(t||dL())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,n)=>0,wasm_on_status:(r,s,n)=>{Te(B1.ptr===r);let i=s-wa+Ra.byteOffset;return B1.onStatus(new lD(Ra.buffer,i,n))||0},wasm_on_message_begin:r=>(Te(B1.ptr===r),B1.onMessageBegin()||0),wasm_on_header_field:(r,s,n)=>{Te(B1.ptr===r);let i=s-wa+Ra.byteOffset;return B1.onHeaderField(new lD(Ra.buffer,i,n))||0},wasm_on_header_value:(r,s,n)=>{Te(B1.ptr===r);let i=s-wa+Ra.byteOffset;return B1.onHeaderValue(new lD(Ra.buffer,i,n))||0},wasm_on_headers_complete:(r,s,n,i)=>(Te(B1.ptr===r),B1.onHeadersComplete(s,!!n,!!i)||0),wasm_on_body:(r,s,n)=>{Te(B1.ptr===r);let i=s-wa+Ra.byteOffset;return B1.onBody(new lD(Ra.buffer,i,n))||0},wasm_on_message_complete:r=>(Te(B1.ptr===r),B1.onMessageComplete()||0)}})}var NL=null,TL=J10();TL.catch();var B1=null,Ra=null,dD=0,wa=null,K10=0,Lz=1,eb=2|Lz,hD=4|Lz,xL=8|K10,WL=class{constructor(e,r,{exports:s}){Te(Number.isFinite(e[wL])&&e[wL]>0),this.llhttp=s,this.ptr=this.llhttp.llhttp_alloc(Ia.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=
Line truncated
|
|
|
|
|
`;if(typeof n=="string"?g+=`host: ${n}\r
|
|
|
|
|
`:g+=t[P10],i?g+=`connection: upgrade\r
|
|
|
|
|
`);b.push(B,E,M),typeof E.size=="number"?i+=B.byteLength+E.size+M.byteLength:z=!0}let g=Hz.encode(`--${u}--\r
|
|
|
|
|
`);b.push(g),i+=g.byteLength,z&&(i=null),o=t,n=s(async function*(){for(let C of b)C.stream?yield*C.stream():yield C},"action"),a=`multipart/form-data; boundary=${u}`}else if(lH(t))o=t,i=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Ab.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Rwe(t)}if((typeof o=="string"||Ab.isBuffer(o))&&(i=Buffer.byteLength(o)),n!=null){let u;r=new ReadableStream({async start(){u=n(t)[Symbol.asyncIterator]()},async pull(p){let{value:A,done:l}=await u.next();if(l)queueMicrotask(()=>{p.close(),p.byobRequest?.respond(0)});else if(!MH(r)){let b=new Uint8Array(A);b.byteLength&&p.enqueue(b)}return p.desiredSize>0},async cancel(p){await u.return()},type:"bytes"})}return[{stream:r,source:o,length:i},a]}s(zH,"extractBody");function kwe(t,e=!1){return t instanceof ReadableStream&&(b5(!Ab.isDisturbed(t),"The body has already been consumed."),b5(!t.locked,"The stream is locked.")),zH(t,e)}s(kwe,"safelyExtractBody");function Uwe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}s(Uwe,"cloneBody");function Gwe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}s(Gwe,"throwIfAborted");function Hwe(t){return{blob(){return qA(this,r=>{let n=bH(this);return n===null?n="":n&&(n=_we(n)),new Twe([r],{type:n})},t)},arrayBuffer(){return qA(this,r=>new Uint8Array(r).buffer,t)},text(){return qA(this,fH,t)},json(){return qA(this,Vwe,t)},formData(){return qA(this,r=>{let n=bH(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let o=Qwe(r,n);if(o==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new dH;return i[IA]=o,i}case"application/x-www-form-urlencoded":{let o=new URLSearchParams(r.toString()),i=new dH;for(let[a,c]of o)i.append(a,c);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return qA(this,r=>new Uint8Array(r),t)}}}s(Hwe,"bodyMixinMethods");function Xwe(t){Object.assign(t.prototype,Hwe(t))}s(Xwe,"mixinBody");async function qA(t,e,r){if(xwe.brandCheck(t,r),gH(t))throw new TypeError("Body is unusable: Body has already been read");Gwe(t[IA]);let n=Swe(),o=s(a=>n.reject(a),"errorSteps"),i=s(a=>{try{n.resolve(e(a))}catch(c){o(c)}},"successSteps");return t[IA].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(await Fwe(t[IA].body,i,o),n.promise)}s(qA,"consumeBody");function gH(t){let e=t[IA].body;return e!=null&&(e.stream.locked||Ab.isDisturbed(e.stream))}s(gH,"bodyUnusable");function Vwe(t){return JSON.parse(fH(t))}s(Vwe,"parseJSONFromBytes");function bH(t){let e=t[IA].headersList,r=Wwe(e);return r==="failure"?null:r}s(bH,"bodyMimeType");OH.exports={extractBody:zH,safelyExtractBody:kwe,cloneBody:Uwe,mixinBody:Xwe,streamRegistry:hH,hasFinalizationRegistry:mH,bodyUnusable:gH}});var vH=m((FD0,TH)=>{"use strict";var fe=require("node:assert"),he=Xe(),{channels:EH}=MA(),M5=jI(),{RequestContentLengthMismatchError:ou,ResponseContentLengthMismatchError:CH,RequestAbortedError:wH,InvalidArgumentError:Jwe,HeadersTimeoutError:Ywe,HeadersOverflowError:$we,SocketError:NA,InformationalError:wA,BodyTimeoutError:jwe,HTTPParserError:Kwe,ResponseExceededMaxSizeError:Zwe}=p0(),{kUrl:SH,kReset:rr,kClient:Yz,kParser:T0,kBlocking:bb,kRunning:w1,kPending:FH,kSize:yH,kWriting:Wa,kQueue:ao,kNoRef:lb,kKeepAliveDefaultTimeout:e6e,kHostHeader:t6e,kPendingIdx:r6e,kRunningIdx:bn,kError:Ft,kPipelining:$z,kSocket:su,kKeepAliveTimeoutValue:Kz,kMaxHeadersSize:m5,kKeepAliveMaxTimeout:n6e,kKeepAliveTimeoutThreshold:o6e,kHeadersTimeout:i6e,kBodyTimeout:s6e,kStrictContentLength:g5,kMaxRequests:BH,kCounter:a6e,kMaxResponseSize:c6e,kOnError:DH,kResume:qs,kHTTPContext:WH}=G0(),Sr=hG(),qH=Buffer.alloc(0),Xz=Buffer[Symbol.species],Vz=he.addListener,u6e=he.removeAllListeners,au=Symbol("kIdleSocketValidation"),iu=Symbol("kIdleSocketValidationTimeout"),y5=Symbol("kSocketUsed"),h5;async function p6e(){let t=process.env.JEST_WORKER_ID?e5():void 0,e;try{e=await WebAssembly.compile(OG())}catch{e=await WebAssembly.compile(t||e5())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:s((r,n,o)=>0,"wasm_on_url"),wasm_on_status:s((r,n,o)=>{fe(o1.ptr===r);let i=n-Jo+Vo.byteOffset;return o1.onStatus(new Xz(Vo.buffer,i,o))||0},"wasm_on_status"),wasm_on_message_begin:s(r=>(fe(o1.ptr===r),o1.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:s((r,n,o)=>{fe(o1.ptr===r);let i=n-Jo+Vo.byteOffset;return o1.onHeaderField(new Xz(Vo.buffer,i,o))||0},"wasm_on_header_field"),wasm_on_header_value:s((r,n,o)=>{fe(o1.ptr===r);let i=n-Jo+Vo.byteOffset;return o1.onHeaderValue(new Xz(Vo.buffer,i,o))||0},"wasm_on_header_value"),wasm_on_headers_complete:s((r,n,o,i)=>(fe(o1.ptr===r),o1.onHeadersComplete(n,!!o,!!i)||0),"wasm_on_headers_complete"),wasm_on_body:s((r,n,o)=>{fe(o1.ptr===r);let i=n-Jo+Vo.byteOffset;retu
Line truncated
|
|
|
|
|
`;if(typeof o=="string"?g+=`host: ${o}\r
|
|
|
|
|
`:g+=t[t6e],i?g+=`connection: upgrade\r
|
|
|
|
|
upgrade: ${i}\r
|
|
|
|
|
`:t[fD]&&!h[Vs]?g+=`connection: keep-alive\r
|
|
|
|
|
`:t[$z]&&!M[rr]?g+=`connection: keep-alive\r
|
|
|
|
|
`:g+=`connection: close\r
|
|
|
|
|
`,Array.isArray(u))for(let y=0;y<u.length;y+=2){let O=u[y+0],B=u[y+1];if(Array.isArray(B))for(let I=0;I<B.length;I++)g+=`${O}: ${B[I]}\r
|
|
|
|
|
`;else g+=`${O}: ${B}\r
|
|
|
|
|
`}return Gae.sendHeaders.hasSubscribers&&Gae.sendHeaders.publish({request:e,headers:g,socket:h}),!c||A===0?jae(M,null,t,e,h,p,g,l):Xe.isBuffer(c)?jae(M,c,t,e,h,p,g,l):Xe.isBlobLike(c)?typeof c.stream=="function"?$ae(M,c.stream(),t,e,h,p,g,l):nr0(M,c,t,e,h,p,g,l):Xe.isStream(c)?sr0(M,c,t,e,h,p,g,l):Xe.isIterable(c)?$ae(M,c,t,e,h,p,g,l):Te(!1),!0}function sr0(t,e,r,s,n,i,o,a){Te(i!==0||r[Br]===0,"stream body cannot be pipelined");let c=!1,u=new mD({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o}),p=function(M){if(!c)try{!u.write(M)&&this.pause&&this.pause()}catch(g){Xe.destroy(this,g)}},l=function(){c||e.resume&&e.resume()},A=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!c){let M=new Yae;queueMicrotask(()=>h(M))}},h=function(M){if(!c){if(c=!0,Te(n.destroyed||n[Rl]&&r[Br]<=1),n.off("drain",l).off("error",h),e.removeListener("data",p).removeListener("end",h).removeListener("close",A),!M)try{u.end()}catch(g){M=g}u.destroy(M),M&&(M.code!=="UND_ERR_INFO"||M.message!=="reset")?Xe.destroy(e,M):Xe.destroy(e)}};e.on("data",p).on("end",h).on("error",h).on("close",A),e.resume&&e.resume(),n.on("drain",l).on("error",h),e.errorEmitted??e.errored?setImmediate(()=>h(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>h(null)),(e.closeEmitted??e.closed)&&setImmediate(A)}function jae(t,e,r,s,n,i,o,a){try{e?Xe.isBuffer(e)&&(Te(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${o}content-length: ${i}\r
|
|
|
|
|
`,Array.isArray(p))for(let C=0;C<p.length;C+=2){let E=p[C+0],B=p[C+1];if(Array.isArray(B))for(let D=0;D<B.length;D++)g+=`${E}: ${B[D]}\r
|
|
|
|
|
`;else g+=`${E}: ${B}\r
|
|
|
|
|
`}return EH.sendHeaders.hasSubscribers&&EH.sendHeaders.publish({request:e,headers:g,socket:M}),!u||b===0?RH(z,null,t,e,M,A,g,l):he.isBuffer(u)?RH(z,u,t,e,M,A,g,l):he.isBlobLike(u)?typeof u.stream=="function"?NH(z,u.stream(),t,e,M,A,g,l):h6e(z,u,t,e,M,A,g,l):he.isStream(u)?m6e(z,u,t,e,M,A,g,l):he.isIterable(u)?NH(z,u,t,e,M,A,g,l):fe(!1),!0}s(M6e,"writeH1");function m6e(t,e,r,n,o,i,a,c){fe(i!==0||r[w1]===0,"stream body cannot be pipelined");let u=!1,p=new Zz({abort:t,socket:o,request:n,contentLength:i,client:r,expectsPayload:c,header:a}),A=s(function(z){if(!u)try{!p.write(z)&&this.pause&&this.pause()}catch(g){he.destroy(this,g)}},"onData"),l=s(function(){u||e.resume&&e.resume()},"onDrain"),b=s(function(){if(queueMicrotask(()=>{e.removeListener("error",M)}),!u){let z=new wH;queueMicrotask(()=>M(z))}},"onClose"),M=s(function(z){if(!u){if(u=!0,fe(o.destroyed||o[Wa]&&r[w1]<=1),o.off("drain",l).off("error",M),e.removeListener("data",A).removeListener("end",M).removeListener("close",b),!z)try{p.end()}catch(g){z=g}p.destroy(z),z&&(z.code!=="UND_ERR_INFO"||z.message!=="reset")?he.destroy(e,z):he.destroy(e)}},"onFinished");e.on("data",A).on("end",M).on("error",M).on("close",b),e.resume&&e.resume(),o.on("drain",l).on("error",M),e.errorEmitted??e.errored?setImmediate(()=>M(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>M(null)),(e.closeEmitted??e.closed)&&setImmediate(b)}s(m6e,"writeStream");function RH(t,e,r,n,o,i,a,c){try{e?he.isBuffer(e)&&(fe(i===e.byteLength,"buffer body must have content length"),o.cork(),o.write(`${a}content-length: ${i}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),n.write(e),n.uncork(),s.onBodySent(e),!a&&s.reset!==!1&&(n[Vs]=!0)):i===0?n.write(`${o}content-length: 0\r
|
|
|
|
|
`,"latin1"),o.write(e),o.uncork(),n.onBodySent(e),!c&&n.reset!==!1&&(o[rr]=!0)):i===0?o.write(`${a}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):(Te(i===null,"no body must not have content length"),n.write(`${o}\r
|
|
|
|
|
`,"latin1")),s.onRequestSent(),r[Il]()}catch(c){t(c)}}async function nr0(t,e,r,s,n,i,o,a){Te(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Sd;let c=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${o}content-length: ${i}\r
|
|
|
|
|
`,"latin1"):(fe(i===null,"no body must not have content length"),o.write(`${a}\r
|
|
|
|
|
`,"latin1")),n.onRequestSent(),r[qs]()}catch(u){t(u)}}s(RH,"writeBuffer");async function h6e(t,e,r,n,o,i,a,c){fe(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new ou;let u=Buffer.from(await e.arrayBuffer());o.cork(),o.write(`${a}content-length: ${i}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),n.write(c),n.uncork(),s.onBodySent(c),s.onRequestSent(),!a&&s.reset!==!1&&(n[Vs]=!0),r[Il]()}catch(c){t(c)}}async function $ae(t,e,r,s,n,i,o,a){Te(i!==0||r[Br]===0,"iterator body cannot be pipelined");let c=null;function u(){if(c){let A=c;c=null,A()}}let p=()=>new Promise((A,h)=>{Te(c===null),n[Ei]?h(n[Ei]):c=A});n.on("close",u).on("drain",u);let l=new mD({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let A of e){if(n[Ei])throw n[Ei];l.write(A)||await p()}l.end()}catch(A){l.destroy(A)}finally{n.off("close",u).off("drain",u)}}var mD=class{constructor({abort:e,socket:r,request:s,contentLength:n,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=s,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[Rl]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[Ei])throw r[Ei];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(n!==null&&o+u>n){if(i[FL])throw new Sd;process.emitWarning(new Sd)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[Vs]=!0),n===null?r.write(`${c}transfer-encoding: chunked\r
|
|
|
|
|
`,"latin1"):r.write(`${c}content-length: ${n}\r
|
|
|
|
|
`,"latin1"),o.write(u),o.uncork(),n.onBodySent(u),n.onRequestSent(),!c&&n.reset!==!1&&(o[rr]=!0),r[qs]()}catch(u){t(u)}}s(h6e,"writeBlob");async function NH(t,e,r,n,o,i,a,c){fe(i!==0||r[w1]===0,"iterator body cannot be pipelined");let u=null;function p(){if(u){let b=u;u=null,b()}}s(p,"onDrain");let A=s(()=>new Promise((b,M)=>{fe(u===null),o[Ft]?M(o[Ft]):u=b}),"waitForDrain");o.on("close",p).on("drain",p);let l=new Zz({abort:t,socket:o,request:n,contentLength:i,client:r,expectsPayload:c,header:a});try{for await(let b of e){if(o[Ft])throw o[Ft];l.write(b)||await A()}l.end()}catch(b){l.destroy(b)}finally{o.off("close",p).off("drain",p)}}s(NH,"writeIterable");var Zz=class{static{s(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:o,client:i,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=o,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[Wa]=!0}write(e){let{socket:r,request:n,contentLength:o,client:i,bytesWritten:a,expectsPayload:c,header:u}=this;if(r[Ft])throw r[Ft];if(r.destroyed)return!1;let p=Buffer.byteLength(e);if(!p)return!0;if(o!==null&&a+p>o){if(i[g5])throw new ou;process.emitWarning(new ou)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[rr]=!0),o===null?r.write(`${u}transfer-encoding: chunked\r
|
|
|
|
|
`,"latin1"):r.write(`${u}content-length: ${o}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1")),n===null&&r.write(`\r
|
|
|
|
|
${u.toString(16)}\r
|
|
|
|
|
`,"latin1"),this.bytesWritten+=u;let p=r.write(e);return r.uncork(),s.onBodySent(e),p||r[Nt].timeout&&r[Nt].timeoutType===eb&&r[Nt].timeout.refresh&&r[Nt].timeout.refresh(),p}end(){let{socket:e,contentLength:r,client:s,bytesWritten:n,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[Rl]=!1,e[Ei])throw e[Ei];if(!e.destroyed){if(n===0?i?e.write(`${o}content-length: 0\r
|
|
|
|
|
`,"latin1")),o===null&&r.write(`\r
|
|
|
|
|
${p.toString(16)}\r
|
|
|
|
|
`,"latin1"),this.bytesWritten+=p;let A=r.write(e);return r.uncork(),n.onBodySent(e),A||r[T0].timeout&&r[T0].timeoutType===SA&&r[T0].timeout.refresh&&r[T0].timeout.refresh(),A}end(){let{socket:e,contentLength:r,client:n,bytesWritten:o,expectsPayload:i,header:a,request:c}=this;if(c.onRequestSent(),e[Wa]=!1,e[Ft])throw e[Ft];if(!e.destroyed){if(o===0?i?e.write(`${a}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):e.write(`${o}\r
|
|
|
|
|
`,"latin1"):e.write(`${a}\r
|
|
|
|
|
`,"latin1"):r===null&&e.write(`\r
|
|
|
|
|
0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),r!==null&&n!==r){if(s[FL])throw new Sd;process.emitWarning(new Sd)}e[Nt].timeout&&e[Nt].timeoutType===eb&&e[Nt].timeout.refresh&&e[Nt].timeout.refresh(),s[Il]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[Rl]=!1,e&&(Te(s[Br]<=1,"pipeline should only contain this request"),n(e))}};Zae.exports=Z10});var cce=f((Mft,ace)=>{"use strict";var yi=require("node:assert"),{pipeline:ir0}=require("node:stream"),d0=u0(),{RequestContentLengthMismatchError:_L,RequestAbortedError:tce,SocketError:Qz,InformationalError:LL}=B0(),{kUrl:gD,kReset:OD,kClient:tb,kRunning:ED,kPending:or0,kQueue:wl,kPendingIdx:PL,kRunningIdx:To,kError:Wo,kSocket:T1,kStrictContentLength:ar0,kOnError:QL,kMaxConcurrentStreams:oce,kHTTP2Session:xo,kResume:Sl,kSize:cr0,kHTTPContext:ur0}=bt(),Fu=Symbol("open streams"),rce,sce=!1,zD;try{zD=require("node:http2")}catch{zD={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:pr0,HTTP2_HEADER_METHOD:lr0,HTTP2_HEADER_PATH:Ar0,HTTP2_HEADER_SCHEME:dr0,HTTP2_HEADER_CONTENT_LENGTH:fr0,HTTP2_HEADER_EXPECT:hr0,HTTP2_HEADER_STATUS:br0}}=zD;function Mr0(t){let e=[];for(let[r,s]of Object.entries(t))if(Array.isArray(s))for(let n of s)e.push(Buffer.from(r),Buffer.from(n));else e.push(Buffer.from(r),Buffer.from(s));return e}async function mr0(t,e){t[T1]=e,sce||(sce=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=zD.connect(t[gD],{createConnection:()=>e,peerMaxConcurrentStreams:t[oce]});r[Fu]=0,r[tb]=t,r[T1]=e,d0.addListener(r,"error",zr0),d0.addListener(r,"frameError",Or0),d0.addListener(r,"end",Er0),d0.addListener(r,"goaway",yr0),d0.addListener(r,"close",function(){let{[tb]:n}=this,{[T1]:i}=n,o=this[T1][Wo]||this[Wo]||new Qz("closed",d0.getSocketInfo(i));if(n[xo]=null,n.destroyed){yi(n[or0]===0);let a=n[wl].splice(n[To]);for(let c=0;c<a.length;c++){let u=a[c];d0.errorRequest(n,u,o)}}}),r.unref(),t[xo]=r,e[xo]=r,d0.addListener(e,"error",function(n){yi(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Wo]=n,this[tb][QL](n)}),d0.addListener(e,"end",function(){d0.destroy(this,new Qz("other side closed",d0.getSocketInfo(this)))}),d0.addListener(e,"close",function(){let n=this[Wo]||new Qz("closed",d0.getSocketInfo(this));t[T1]=null,this[xo]!=null&&this[xo].destroy(n),t[PL]=t[To],yi(t[ED]===0),t.emit("disconnect",t[gD],[t],n),t[Sl]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return Br0(t,...n)},resume(){gr0(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function gr0(t){let e=t[T1];e?.destroyed===!1&&(t[cr0]===0&&t[oce]===0?(e.unref(),t[xo].unref()):(e.ref(),t[xo].ref()))}function zr0(t){yi(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[T1][Wo]=t,this[tb][QL](t)}function Or0(t,e,r){if(r===0){let s=new LL(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[T1][Wo]=s,this[tb][QL](s)}}function Er0(){let t=new Qz("other side closed",d0.getSocketInfo(this[T1]));this.destroy(t),d0.destroy(this[T1],t)}function yr0(t){let e=this[Wo]||new Qz(`HTTP/2: "GOAWAY" frame received with code ${t}`,d0.getSocketInfo(this)),r=this[tb];if(r[T1]=null,r[ur0]=null,this[xo]!=null&&(this[xo].destroy(e),this[xo]=null),d0.destroy(this[T1],e),r[To]<r[wl].length){let s=r[wl][r[To]];r[wl][r[To]++]=null,d0.errorRequest(r,s,e),r[PL]=r[To]}yi(r[ED]===0),r.emit("disconnect",r[gD],[r],e),r[Sl]()}function Cr0(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function Br0(t,e){let r=t[xo],{method:s,path:n,host:i,upgrade:o,expectContinue:a,signal:c,headers:u}=e,{body:p}=e;if(o)return d0.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let R=0;R<u.length;R+=2){let N=u[R+0],T=u[R+1];if(Array.isArray(T))for(let W=0;W<T.length;W++)l[N]?l[N]+=`,${T[W]}`:l[N]=T[W];else l[N]=T}let A,{hostname:h,port:M}=t[gD];l[pr0]=i||`${h}${M?`:${M}`:""}`,l[lr0]=s;let g=R=>{e.aborted||e.completed||(R=R||new tce,d0.errorRequest(t,e,R),A!=null&&d0.destroy(A,R),d0.destroy(p,R),t[wl][t[To]++]=null,t[Sl]())};try{e.onConnect(g)}catch(R){d0.errorRequest(t,e,R)}if(e.aborted)return!1;if(s==="CONNECT")return r.ref(),A=r.request(l,{endStream:!1,signal:c}),A.id&&!A.pending?(e.onUpgrade(null,null,A),++r[Fu],t[wl][t[To]++]=null):A.once("ready",()=>{e.onUpgrade(null,null,A),++r[Fu],t[wl][t[To]++]=null}),A.once("close",()=>{r[Fu]-=1,r[Fu]===0&&r.unref()}),!0;l[Ar0]=n,l[dr0]="https";let y=s==="PUT"||s==="POST"||s==="PATCH";p&&typeof p.read=="function"&&p.read(0);let O=d0.bodyLength(p);if(d0.isFormDataLike(p)){rce??=Jh().extractBody;let[R,N]=rce(p);l["content-type"]=N,p=R.stream,O=R.length}if(O==null&&(O=e.contentLength),(O===0||!y)&&(O=null),Cr0(s)&&O>0&&e.contentLength!=null&&e.contentLength!==O){if(t[ar0])return d0.errorRequest(t,e,new _L),!1;process.emitWarning(new _L)}O!=null&&(yi(p,"no body must not have content length"),l[fr0]=`${O}`),r.ref();let B=s==="GET"||s==="HEAD"||p===null;return a?(l[hr0]="100-continue",A=r.request(l,{endStream:B,signa
Line truncated
|
|
|
|
|
`,this[Jr0]=c??3e5,this[Yr0]=n??3e5,this[Kr0]=B??!0,this[Zr0]=R,this[HL]=T,this[vl]=null,this[ns0]=$>-1?$:-1,this[os0]=Z??100,this[Zt]=null,this[_o]=[],this[xu]=0,this[Lo]=0,this[Hz]=Ne=>VL(this,Ne),this[is0]=Ne=>zce(this,Ne)}get pipelining(){return this[DD]}set pipelining(e){this[DD]=e,this[Hz](!0)}get[jz](){return this[_o].length-this[Lo]}get[Vz](){return this[Lo]-this[xu]}get[Xz](){return this[_o].length-this[xu]}get[Ur0](){return!!this[Zt]&&!this[sb]&&!this[Zt].destroyed}get[GL](){return!!(this[Zt]?.busy(null)||this[Xz]>=(gce(this)||1)||this[jz]>0)}[kr0](e){Oce(this),this.once("connect",e)}[ss0](e,r){let s=e.origin||this[Na].origin,n=new xr0(s,e,r);return this[_o].push(n),this[vd]||(Nd.bodyLength(n.body)==null&&Nd.isIterable(n.body)?(this[vd]=1,queueMicrotask(()=>VL(this))):this[Hz](!0)),this[vd]&&this[Fl]!==2&&this[GL]&&(this[Fl]=2),this[Fl]<2}async[ts0](){return new Promise(e=>{this[Xz]?this[vl]=e:e(null)})}async[rs0](e){return new Promise(r=>{let s=this[_o].splice(this[Lo]);for(let i=0;i<s.length;i++){let o=s[i];Nd.errorRequest(this,o,e)}let n=()=>{this[vl]&&(this[vl](),this[vl]=null),r(null)};this[Zt]?(this[Zt].destroy(e,n),this[Zt]=null):queueMicrotask(n),this[Hz]()})}},us0=BD();function zce(t,e){if(t[Vz]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Tu(t[Lo]===t[xu]);let r=t[_o].splice(t[xu]);for(let s=0;s<r.length;s++){let n=r[s];Nd.errorRequest(t,n,e)}Tu(t[Xz]===0)}}async function Oce(t){Tu(!t[sb]),Tu(!t[Zt]);let{host:e,hostname:r,protocol:s,port:n}=t[Na];if(r[0]==="["){let i=r.indexOf("]");Tu(i!==-1);let o=r.substring(1,i);Tu(mce.isIP(o)),r=o}t[sb]=!0,rb.beforeConnect.hasSubscribers&&rb.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Zt]?.version,servername:t[Nl],localAddress:t[Gz]},connector:t[Uz]});try{let i=await new Promise((o,a)=>{t[Uz]({host:e,hostname:r,protocol:s,port:n,servername:t[Nl],localAddress:t[Gz]},(c,u)=>{c?a(c):o(u)})});if(t.destroyed){Nd.destroy(i.on("error",bce),new Lr0);return}Tu(i);try{t[Zt]=i.alpnProtocol==="h2"?await cs0(t,i):await as0(t,i)}catch(o){throw i.destroy().on("error",bce),o}t[sb]=!1,i[es0]=0,i[HL]=t[HL],i[Qr0]=t,i[Hr0]=null,rb.connected.hasSubscribers&&rb.connected.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Zt]?.version,servername:t[Nl],localAddress:t[Gz]},connector:t[Uz],socket:i}),t.emit("connect",t[Na],[t])}catch(i){if(t.destroyed)return;if(t[sb]=!1,rb.connectError.hasSubscribers&&rb.connectError.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Zt]?.version,servername:t[Nl],localAddress:t[Gz]},connector:t[Uz],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Tu(t[Vz]===0);t[jz]>0&&t[_o][t[Lo]].servername===t[Nl];){let o=t[_o][t[Lo]++];Nd.errorRequest(t,o,i)}else zce(t,i);t.emit("connectionError",t[Na],[t],i)}t[Hz]()}function Mce(t){t[Fl]=0,t.emit("drain",t[Na],[t])}function VL(t,e){t[vd]!==2&&(t[vd]=2,ps0(t,e),t[vd]=0,t[xu]>256&&(t[_o].splice(0,t[xu]),t[Lo]-=t[xu],t[xu]=0))}function ps0(t,e){for(;;){if(t.destroyed){Tu(t[jz]===0);return}if(t[vl]&&!t[Xz]){t[vl](),t[vl]=null;return}if(t[Zt]&&t[Zt].resume(),t[GL])t[Fl]=2;else if(t[Fl]===2){e?(t[Fl]=1,queueMicrotask(()=>Mce(t))):Mce(t);continue}if(t[jz]===0||t[Vz]>=(gce(t)||1))return;let r=t[_o][t[Lo]];if(t[Na].protocol==="https:"&&t[Nl]!==r.servername){if(t[Vz]>0)return;t[Nl]=r.servername,t[Zt]?.destroy(new _r0("servername changed"),()=>{t[Zt]=null,VL(t)})}if(t[sb])return;if(!t[Zt]){Oce(t);return}if(t[Zt].destroyed||t[Zt].busy(r))return;!r.aborted&&t[Zt].write(r)?t[Lo]++:t[_o].splice(t[Lo],1)}}Ece.exports=XL});var jL=f((Eft,yce)=>{"use strict";var qD=class{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)}};yce.exports=class{constructor(){this.head=this.tail=new qD}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new qD),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Bce=f((yft,Cce)=>{var{kFree:ls0,kConnected:As0,kPending:ds0,kQueued:fs0,kRunning:hs0,kSize:bs0}=bt(),Fd=Symbol("pool"),$L=class{constructor(e){this[Fd]=e}get connected(){return this[Fd][As0]}get free(){return this[Fd][ls0]}get pending(){return this[Fd][ds0]}get queued(){return this[Fd][fs0]}get running(){return this[Fd][hs0]}get size(){return this[Fd][bs0]}};Cce.exports=$L});var t8=f((Cft,Tce)=>{"use strict";var Ms0=kh(),ms0=jL(),{kConnected:YL,kSize:Dce,kRunning:qce,kPending:Ice,kQueued:$z,kBusy:gs0,kFree:zs0,kUrl:Os0,kClose:Es0,kDestroy:ys0,kDispatch:Cs0}=bt(),Bs0=Bce(),js=Symbol("clients"),os=Symbol("needDrain"),Yz=Symbol("queue"),JL=Symbol("closed resolve"),KL=Symbol("onDrain"),Rce=Symbol("onConnect"),wce=Symbol("onDisconnect"),Sce=Symbol("onCo
Line truncated
|
|
|
|
|
${s.count} ${s.noun} ${s.is} pending:
|
|
|
|
|
`,"latin1"),r!==null&&o!==r){if(n[g5])throw new ou;process.emitWarning(new ou)}e[T0].timeout&&e[T0].timeoutType===SA&&e[T0].timeout.refresh&&e[T0].timeout.refresh(),n[qs]()}}destroy(e){let{socket:r,client:n,abort:o}=this;r[Wa]=!1,e&&(fe(n[w1]<=1,"pipeline should only contain this request"),o(e))}};TH.exports=l6e});var HH=m((xD0,GH)=>{"use strict";var fn=require("node:assert"),{pipeline:z6e}=require("node:stream"),Ze=Xe(),{RequestContentLengthMismatchError:B5,RequestAbortedError:LH,SocketError:fb,InformationalError:D5}=p0(),{kUrl:eg,kReset:rg,kClient:FA,kRunning:ng,kPending:g6e,kQueue:xa,kPendingIdx:q5,kRunningIdx:co,kError:po,kSocket:$1,kStrictContentLength:O6e,kOnError:I5,kMaxConcurrentStreams:UH,kHTTP2Session:uo,kResume:Ta,kSize:E6e,kHTTPContext:C6e}=G0(),Is=Symbol("open streams"),_H,QH=!1,tg;try{tg=require("node:http2")}catch{tg={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:y6e,HTTP2_HEADER_METHOD:B6e,HTTP2_HEADER_PATH:D6e,HTTP2_HEADER_SCHEME:q6e,HTTP2_HEADER_CONTENT_LENGTH:I6e,HTTP2_HEADER_EXPECT:R6e,HTTP2_HEADER_STATUS:N6e}}=tg;function w6e(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.push(Buffer.from(r),Buffer.from(o));else e.push(Buffer.from(r),Buffer.from(n));return e}s(w6e,"parseH2Headers");async function S6e(t,e){t[$1]=e,QH||(QH=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=tg.connect(t[eg],{createConnection:s(()=>e,"createConnection"),peerMaxConcurrentStreams:t[UH]});r[Is]=0,r[FA]=t,r[$1]=e,Ze.addListener(r,"error",W6e),Ze.addListener(r,"frameError",x6e),Ze.addListener(r,"end",T6e),Ze.addListener(r,"goaway",v6e),Ze.addListener(r,"close",function(){let{[FA]:o}=this,{[$1]:i}=o,a=this[$1][po]||this[po]||new fb("closed",Ze.getSocketInfo(i));if(o[uo]=null,o.destroyed){fn(o[g6e]===0);let c=o[xa].splice(o[co]);for(let u=0;u<c.length;u++){let p=c[u];Ze.errorRequest(o,p,a)}}}),r.unref(),t[uo]=r,e[uo]=r,Ze.addListener(e,"error",function(o){fn(o.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[po]=o,this[FA][I5](o)}),Ze.addListener(e,"end",function(){Ze.destroy(this,new fb("other side closed",Ze.getSocketInfo(this)))}),Ze.addListener(e,"close",function(){let o=this[po]||new fb("closed",Ze.getSocketInfo(this));t[$1]=null,this[uo]!=null&&this[uo].destroy(o),t[q5]=t[co],fn(t[ng]===0),t.emit("disconnect",t[eg],[t],o),t[Ta]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...o){return _6e(t,...o)},resume(){F6e(t)},destroy(o,i){n?queueMicrotask(i):e.destroy(o).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}s(S6e,"connectH2");function F6e(t){let e=t[$1];e?.destroyed===!1&&(t[E6e]===0&&t[UH]===0?(e.unref(),t[uo].unref()):(e.ref(),t[uo].ref()))}s(F6e,"resumeH2");function W6e(t){fn(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[$1][po]=t,this[FA][I5](t)}s(W6e,"onHttp2SessionError");function x6e(t,e,r){if(r===0){let n=new D5(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[$1][po]=n,this[FA][I5](n)}}s(x6e,"onHttp2FrameError");function T6e(){let t=new fb("other side closed",Ze.getSocketInfo(this[$1]));this.destroy(t),Ze.destroy(this[$1],t)}s(T6e,"onHttp2SessionEnd");function v6e(t){let e=this[po]||new fb(`HTTP/2: "GOAWAY" frame received with code ${t}`,Ze.getSocketInfo(this)),r=this[FA];if(r[$1]=null,r[C6e]=null,this[uo]!=null&&(this[uo].destroy(e),this[uo]=null),Ze.destroy(this[$1],e),r[co]<r[xa].length){let n=r[xa][r[co]];r[xa][r[co]++]=null,Ze.errorRequest(r,n,e),r[q5]=r[co]}fn(r[ng]===0),r.emit("disconnect",r[eg],[r],e),r[Ta]()}s(v6e,"onHTTP2GoAway");function L6e(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}s(L6e,"shouldSendContentLength");function _6e(t,e){let r=t[uo],{method:n,path:o,host:i,upgrade:a,expectContinue:c,signal:u,headers:p}=e,{body:A}=e;if(a)return Ze.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let q=0;q<p.length;q+=2){let x=p[q+0],W=p[q+1];if(Array.isArray(W))for(let _=0;_<W.length;_++)l[x]?l[x]+=`,${W[_]}`:l[x]=W[_];else l[x]=W}let b,{hostname:M,port:z}=t[eg];l[y6e]=i||`${M}${z?`:${z}`:""}`,l[B6e]=n;let g=s(q=>{e.aborted||e.completed||(q=q||new LH,Ze.errorRequest(t,e,q),b!=null&&Ze.destroy(b,q),Ze.destroy(A,q),t[xa][t[co]++]=null,t[Ta]())},"abort");try{e.onConnect(g)}catch(q){Ze.errorRequest(t,e,q)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),b=r.request(l,{endStream:!1,signal:u}),b.id&&!b.pending?(e.onUpgrade(null,null,b),++r[Is],t[xa][t[co]++]=null):b.once("ready",()=>{e.onUpgrade(null,null,b),++r[Is],t[xa][t[co]++]=null}),b.once("close",()=>{r[Is]-=1,r[Is]===0&&r.unref()}),!0;l[D6e]=o,l[q6e]="https";let C=n==="PUT"||n==="POST"||n==="PATCH";A&&typeof A.read=="function"&&A.read(0);let E=Ze.bodyLength(A);if(Ze.isFormDataLike(A)){_H??=RA().extractBody;let[q,x]=_H(A);l["content-type"]=x,A=q.stream,E=q.length}if(E==null&&(E=e.contentLength),(E===0||!C)&&(E=null),L6e(n)&&E>0&&e.contentLength!=null&&e.contentLength!==E){if(t[O6e])return Ze.errorRequest(t,e,
Line truncated
|
|
|
|
|
`,this[ASe]=u??3e5,this[pSe]=o??3e5,this[lSe]=B??!0,this[dSe]=q,this[S5]=W,this[La]=null,this[hSe]=ae>-1?ae:-1,this[gSe]=Ne??100,this[g1]=null,this[Ao]=[],this[Ns]=0,this[lo]=0,this[zb]=k=>W5(this,k),this[zSe]=k=>nX(this,k)}get pipelining(){return this[ag]}set pipelining(e){this[ag]=e,this[zb](!0)}get[Eb](){return this[Ao].length-this[lo]}get[Ob](){return this[lo]-this[Ns]}get[gb](){return this[Ao].length-this[Ns]}get[nSe](){return!!this[g1]&&!this[xA]&&!this[g1].destroyed}get[w5](){return!!(this[g1]?.busy(null)||this[gb]>=(rX(this)||1)||this[Eb]>0)}[rSe](e){oX(this),this.once("connect",e)}[mSe](e,r){let n=e.origin||this[$o].origin,o=new $6e(n,e,r);return this[Ao].push(o),this[uu]||(cu.bodyLength(o.body)==null&&cu.isIterable(o.body)?(this[uu]=1,queueMicrotask(()=>W5(this))):this[zb](!0)),this[uu]&&this[_a]!==2&&this[w5]&&(this[_a]=2),this[_a]<2}async[fSe](){return new Promise(e=>{this[gb]?this[La]=e:e(null)})}async[MSe](e){return new Promise(r=>{let n=this[Ao].splice(this[lo]);for(let i=0;i<n.length;i++){let a=n[i];cu.errorRequest(this,a,e)}let o=s(()=>{this[La]&&(this[La](),this[La]=null),r(null)},"callback");this[g1]?(this[g1].destroy(e,o),this[g1]=null):queueMicrotask(o),this[zb]()})}},CSe=sg();function nX(t,e){if(t[Ob]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Rs(t[lo]===t[Ns]);let r=t[Ao].splice(t[Ns]);for(let n=0;n<r.length;n++){let o=r[n];cu.errorRequest(t,o,e)}Rs(t[gb]===0)}}s(nX,"onError");async function oX(t){Rs(!t[xA]),Rs(!t[g1]);let{host:e,hostname:r,protocol:n,port:o}=t[$o];if(r[0]==="["){let i=r.indexOf("]");Rs(i!==-1);let a=r.substring(1,i);Rs(tX.isIP(a)),r=a}t[xA]=!0,WA.beforeConnect.hasSubscribers&&WA.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[g1]?.version,servername:t[va],localAddress:t[hb]},connector:t[mb]});try{let i=await new Promise((a,c)=>{t[mb]({host:e,hostname:r,protocol:n,port:o,servername:t[va],localAddress:t[hb]},(u,p)=>{u?c(u):a(p)})});if(t.destroyed){cu.destroy(i.on("error",ZH),new Z6e);return}Rs(i);try{t[g1]=i.alpnProtocol==="h2"?await ESe(t,i):await OSe(t,i)}catch(a){throw i.destroy().on("error",ZH),a}t[xA]=!1,i[bSe]=0,i[S5]=t[S5],i[tSe]=t,i[iSe]=null,WA.connected.hasSubscribers&&WA.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[g1]?.version,servername:t[va],localAddress:t[hb]},connector:t[mb],socket:i}),t.emit("connect",t[$o],[t])}catch(i){if(t.destroyed)return;if(t[xA]=!1,WA.connectError.hasSubscribers&&WA.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[g1]?.version,servername:t[va],localAddress:t[hb]},connector:t[mb],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Rs(t[Ob]===0);t[Eb]>0&&t[Ao][t[lo]].servername===t[va];){let a=t[Ao][t[lo]++];cu.errorRequest(t,a,i)}else nX(t,i);t.emit("connectionError",t[$o],[t],i)}t[zb]()}s(oX,"connect");function eX(t){t[_a]=0,t.emit("drain",t[$o],[t])}s(eX,"emitDrain");function W5(t,e){t[uu]!==2&&(t[uu]=2,ySe(t,e),t[uu]=0,t[Ns]>256&&(t[Ao].splice(0,t[Ns]),t[lo]-=t[Ns],t[Ns]=0))}s(W5,"resume");function ySe(t,e){for(;;){if(t.destroyed){Rs(t[Eb]===0);return}if(t[La]&&!t[gb]){t[La](),t[La]=null;return}if(t[g1]&&t[g1].resume(),t[w5])t[_a]=2;else if(t[_a]===2){e?(t[_a]=1,queueMicrotask(()=>eX(t))):eX(t);continue}if(t[Eb]===0||t[Ob]>=(rX(t)||1))return;let r=t[Ao][t[lo]];if(t[$o].protocol==="https:"&&t[va]!==r.servername){if(t[Ob]>0)return;t[va]=r.servername,t[g1]?.destroy(new K6e("servername changed"),()=>{t[g1]=null,W5(t)})}if(t[xA])return;if(!t[g1]){oX(t);return}if(t[g1].destroyed||t[g1].busy(r))return;!r.aborted&&t[g1].write(r)?t[lo]++:t[Ao].splice(t[lo],1)}}s(ySe,"_resume");iX.exports=F5});var x5=m((GD0,sX)=>{"use strict";var cg=class{static{s(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)}};sX.exports=class{static{s(this,"FixedQueue")}constructor(){this.head=this.tail=new cg}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new cg),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var cX=m((XD0,aX)=>{var{kFree:BSe,kConnected:DSe,kPending:qSe,kQueued:ISe,kRunning:RSe,kSize:NSe}=G0(),pu=Symbol("pool"),T5=class{static{s(this,"PoolStats")}constructor(e){this[pu]=e}get connected(){return this[pu][DSe]}get free(){return this[pu][BSe]}get pending(){return this[pu][qSe]}get queued(){return this[pu][ISe]}get running(){return this[pu][RSe]}get size(){return this[pu][NSe]}};aX.exports=T5});var k5=m((JD0,hX)=>{"use strict";var wSe=gA(),SSe=x5(),{kConnected:v5,kSize:uX,kRunning:pX,kPending:AX,kQueued:Cb,kBusy:FSe,kFree:WSe,kUrl:xSe,kClose:TSe,kDestroy:vSe,kDispatch:LSe}=G0(),_Se=cX(),nr=Symbol("client
Line truncated
|
|
|
|
|
${n.count} ${n.noun} ${n.is} pending:
|
|
|
|
|
|
|
|
|
|
${e.format(r)}
|
|
|
|
|
`.trim())}};Qpe.exports=tP});var HD=f((Kft,Xpe)=>{"use strict";var Upe=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Ji0}=B0(),Ki0=ob();Hpe()===void 0&&Gpe(new Ki0);function Gpe(t){if(!t||typeof t.dispatch!="function")throw new Ji0("Argument agent must implement Agent");Object.defineProperty(globalThis,Upe,{value:t,writable:!0,enumerable:!1,configurable:!1})}function Hpe(){return globalThis[Upe]}Xpe.exports={setGlobalDispatcher:Gpe,getGlobalDispatcher:Hpe}});var XD=f((eht,Vpe)=>{"use strict";Vpe.exports=class{#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 $pe=f((tht,jpe)=>{"use strict";var Zi0=CD();jpe.exports=t=>{let e=t?.maxRedirections;return r=>function(n,i){let{maxRedirections:o=e,...a}=n;if(!o)return r(n,i);let c=new Zi0(r,o,n,i);return r(a,c)}}});var Jpe=f((rht,Ype)=>{"use strict";var eo0=TD();Ype.exports=t=>e=>function(s,n){return e(s,new eo0({...s,retryOptions:{...t,...s.retryOptions}},{handler:n,dispatch:e}))}});var Zpe=f((sht,Kpe)=>{"use strict";var to0=u0(),{InvalidArgumentError:ro0,RequestAbortedError:so0}=B0(),no0=XD(),rP=class extends no0{#e=1024*1024;#t=null;#s=!1;#r=!1;#n=0;#i=null;#c=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new ro0("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#c=r}onConnect(e){this.#t=e,this.#c.onConnect(this.#a.bind(this))}#a(e){this.#r=!0,this.#i=e}onHeaders(e,r,s,n){let o=to0.parseHeaders(r)["content-length"];if(o!=null&&o>this.#e)throw new so0(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#c.onHeaders(e,r,s,n)}onError(e){this.#s||(e=this.#i??e,this.#c.onError(e))}onData(e){return this.#n=this.#n+e.length,this.#n>=this.#e&&(this.#s=!0,this.#r?this.#c.onError(this.#i):this.#c.onComplete([])),!0}onComplete(e){if(!this.#s){if(this.#r){this.#c.onError(this.reason);return}this.#c.onComplete(e)}}};function io0({maxSize:t}={maxSize:1024*1024}){return e=>function(s,n){let{dumpMaxSize:i=t}=s,o=new rP({maxSize:i},n);return e(s,o)}}Kpe.exports=io0});var rle=f((nht,tle)=>{"use strict";var{isIP:oo0}=require("node:net"),{lookup:ao0}=require("node:dns"),co0=XD(),{InvalidArgumentError:bb,InformationalError:uo0}=B0(),ele=Math.pow(2,31)-1,sP=class{#e=0;#t=0;#s=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#n}get full(){return this.#s.size===this.#t}runLookup(e,r,s){let n=this.#s.get(e.hostname);if(n==null&&this.full){s(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(n==null)this.lookup(e,i,(o,a)=>{if(o||a==null||a.length===0){s(o??new uo0("No DNS entries found"));return}this.setRecords(e,a);let c=this.#s.get(e.hostname),u=this.pick(e,c,i.affinity),p;typeof u.port=="number"?p=`:${u.port}`:e.port!==""?p=`:${e.port}`:p="",s(null,`${e.protocol}//${u.family===6?`[${u.address}]`:u.address}${p}`)});else{let o=this.pick(e,n,i.affinity);if(o==null){this.#s.delete(e.hostname),this.runLookup(e,r,s);return}let a;typeof o.port=="number"?a=`:${o.port}`:e.port!==""?a=`:${e.port}`:a="",s(null,`${e.protocol}//${o.family===6?`[${o.address}]`:o.address}${a}`)}}#r(e,r,s){ao0(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(n,i)=>{if(n)return s(n);let o=new Map;for(let a of i)o.set(`${a.address}:${a.family}`,a);s(null,o.values())})}#n(e,r,s){let n=null,{records:i,offset:o}=r,a;if(this.dualStack?(s==null&&(o==null||o===ele?(r.offset=0,s=4):(r.offset++,s=(r.offset&1)===1?6:4)),i[s]!=null&&i[s].ips.length>0?a=i[s]:a=i[s===4?6:4]):a=i[s],a==null||a.ips.length===0)return n;a.offset==null||a.offset===ele?a.offset=0:a.offset++;let c=a.offset%a.ips.length;return n=a.ips[c]??null,n==null?n:Date.now()-n.timestamp>n.ttl?(a.ips.splice(c,1),this.pick(e,r,s)):n}setRecords(e,r){let s=Date.now(),n={records:{4:null,6:null}};for(let i of r){i.timestamp=s,typeof i.ttl=="number"?i.ttl=Math.min(i.ttl,this.#e):i.ttl=this.#e;let o=n.records[i.family]??{ips:[]};o.ips.push(i),n.records[i.family]=o}this.#s.set(e.hostname,n)}getHandler(e,r){return new nP(this,e,r)}},nP=class extends co0{#e=null;#t=null;#s=null;#r=null;#n=null;constructor(e,{origin:r,handler:s,dispatch:n},i){super(s),this.#n=r,this.#r=s,this.#t={...i},this.#e=e,this.#s=n}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#n,this.#t,(
Line truncated
|
|
|
|
|
${i}`;break;case"retry":Tde(i)&&(r[n]=i);break;case"id":xde(i)&&(r[n]=i);break;case"event":i.length>0&&(r[n]=i);break}}processEvent(e){e.retry&&Tde(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&xde(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}}};Wde.exports={EventSourceStream:GP}});var Xde=f((Tht,Hde)=>{"use strict";var{pipeline:mp0}=require("node:stream"),{fetching:gp0}=uO(),{makeRequest:zp0}=gb(),{webidl:Qu}=fr(),{EventSourceStream:Op0}=_de(),{parseMIMEType:Ep0}=Xs(),{createFastMessageEvent:yp0}=Bb(),{isNetworkError:Lde}=aO(),{delay:Cp0}=kP(),{kEnumerableProperty:$d}=u0(),{environmentSettingsObject:Pde}=Sn(),Qde=!1,kde=3e3,EO=0,Ude=1,yO=2,Bp0="anonymous",Dp0="use-credentials",wb=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#s=!1;#r=EO;#n=null;#i=null;#c;#a;constructor(e,r={}){super(),Qu.util.markAsUncloneable(this);let s="EventSource constructor";Qu.argumentLengthCheck(arguments,1,s),Qde||(Qde=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Qu.converters.USVString(e,s,"url"),r=Qu.converters.EventSourceInitDict(r,s,"eventSourceInitDict"),this.#c=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:kde};let n=Pde,i;try{i=new URL(e,n.settingsObject.baseUrl),this.#a.origin=i.origin}catch(c){throw new DOMException(c,"SyntaxError")}this.#t=i.href;let o=Bp0;r.withCredentials&&(o=Dp0,this.#s=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=Pde.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#n=zp0(a),this.#o()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#s}#o(){if(this.#r===yO)return;this.#r=EO;let e={request:this.#n,dispatcher:this.#c},r=s=>{Lde(s)&&(this.dispatchEvent(new Event("error")),this.close()),this.#l()};e.processResponseEndOfBody=r,e.processResponse=s=>{if(Lde(s))if(s.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#l();return}let n=s.headersList.get("content-type",!0),i=n!==null?Ep0(n):"failure",o=i!=="failure"&&i.essence==="text/event-stream";if(s.status!==200||o===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=Ude,this.dispatchEvent(new Event("open")),this.#a.origin=s.urlList[s.urlList.length-1].origin;let a=new Op0({eventSourceSettings:this.#a,push:c=>{this.dispatchEvent(yp0(c.type,c.options))}});mp0(s.body.stream,a,c=>{c?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=gp0(e)}async#l(){this.#r!==yO&&(this.#r=EO,this.dispatchEvent(new Event("error")),await Cp0(this.#a.reconnectionTime),this.#r===EO&&(this.#a.lastEventId.length&&this.#n.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#o()))}close(){Qu.brandCheck(this,t),this.#r!==yO&&(this.#r=yO,this.#i.abort(),this.#n=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}},Gde={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:EO,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:Ude,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:yO,writable:!1}};Object.defineProperties(wb,Gde);Object.defineProperties(wb.prototype,Gde);Object.defineProperties(wb.prototype,{close:$d,onerror:$d,onmessage:$d,onopen:$d,readyState:$d,url:$d,withCredentials:$d});Qu.converters.EventSourceInitDict=Qu.dictionaryConverter([{key:"withCredentials",converter:Qu.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Qu.converters.any}]);Hde.exports={EventSource:wb,defaultReconnectionTime:kde}});var Nb=f((xht,We)=>{"use strict";var qp0=nb(),Vde=qz(),Ip0=ib(),Rp0=Gce(),wp0=ob(),Sp0=f8(),Np0=fue(),vp0=zue(),jde=B0(),vq=u0(),{InvalidArgumentError:Nq}=jde,Sb=ope(),Fp0=Rz(),Tp0=$8(),xp0=kpe(),Wp0=K8(),_p0=x8(),Lp0=TD(),{getGlobalDispatcher:$de,setGlobalDispatcher:Pp0}=HD(),Qp0=XD(),kp0=CD(),Up0=BD();Object.assign(Vde.prototype,Sb);We.exports.Dispatcher=Vde;We.exports.Client=qp0;We.exports.Pool=Ip0;We.exports.BalancedPool=Rp0;We.exports.Agent=wp0;We.exports.ProxyAgent=Sp0;We.exports.EnvHttpProxyAgent=Np0;We.e
Line truncated
|
|
|
|
|
%s`,N,N,B,s);var T=B.type==="*"?GQ:B.type==="?"?UQ:"\\"+B.type;n=!0,s=s.slice(0,B.reStart)+T+"\\("+N}M(),i&&(s+="\\\\");var W=!1;switch(s.charAt(0)){case"[":case".":case"(":W=!0}for(var $=a.length-1;$>-1;$--){var ge=a[$],Fe=s.slice(0,ge.reStart),Z=s.slice(ge.reStart,ge.reEnd-8),we=s.slice(ge.reEnd-8,ge.reEnd),J=s.slice(ge.reEnd);we+=J;var Ne=Fe.split("(").length-1,Ge=J;for(g=0;g<Ne;g++)Ge=Ge.replace(/\)[+*?]?/,"");J=Ge;var C0="";J===""&&e!==cI&&(C0="$");var M0=Fe+Z+J+C0+we;s=M0}if(s!==""&&n&&(s="(?=.)"+s),W&&(s=A+s),e===cI)return[s,n];if(!n)return of0(t);var P0=r.nocase?"i":"";try{var Dt=new RegExp("^"+s+"$",P0)}catch{return new RegExp("$.")}return Dt._glob=t,Dt._src=s,Dt}Qn.makeRe=function(t,e){return new br(t,e||{}).makeRe()};br.prototype.makeRe=if0;function if0(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?GQ:e.dot?J20:K20,s=e.nocase?"i":"",n=t.map(function(i){return i.map(function(o){return o===HQ?r:typeof o=="string"?af0(o):o._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,s)}catch{this.regexp=!1}return this.regexp}Qn.match=function(t,e,r){r=r||{};var s=new br(e,r);return t=t.filter(function(n){return s.match(n)}),s.options.nonull&&!t.length&&t.push(e),t};br.prototype.match=function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var s=this.options;kO.sep!=="/"&&(e=e.split(kO.sep).join("/")),e=e.split($he),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,o;for(o=e.length-1;o>=0&&(i=e[o],!i);o--);for(o=0;o<n.length;o++){var a=n[o],c=e;s.matchBase&&a.length===1&&(c=[i]);var u=this.matchOne(c,a,r);if(u)return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate};br.prototype.matchOne=function(t,e,r){var s=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,i=0,o=t.length,a=e.length;n<o&&i<a;n++,i++){this.debug("matchOne loop");var c=e[i],u=t[n];if(this.debug(e,c,u),c===!1)return!1;if(c===HQ){this.debug("GLOBSTAR",[e,c,u]);var p=n,l=i+1;if(l===a){for(this.debug("** at the end");n<o;n++)if(t[n]==="."||t[n]===".."||!s.dot&&t[n].charAt(0)===".")return!1;return!0}for(;p<o;){var A=t[p];if(this.debug(`
|
|
|
|
|
globstar while`,t,p,e,l,A),this.matchOne(t.slice(p),e.slice(l),r))return this.debug("globstar found match!",p,o,A),!0;if(A==="."||A===".."||!s.dot&&A.charAt(0)==="."){this.debug("dot detected!",t,p,e,l);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
|
|
|
|
|
>>> no match, partial?`,t,p,e,l),p===o))}var h;if(typeof c=="string"?(h=u===c,this.debug("string match",c,u,h)):(h=u.match(c),this.debug("pattern match",c,u,h)),!h)return!1}if(n===o&&i===a)return!0;if(n===o)return r;if(i===a)return n===o-1&&t[n]==="";throw new Error("wtf?")};function of0(t){return t.replace(/\\(.)/g,"$1")}function af0(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var HO=f((imt,rbe)=>{"use strict";var hf0="2.0.0",bf0=Number.MAX_SAFE_INTEGER||9007199254740991,Mf0=16,mf0=250,gf0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];rbe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Mf0,MAX_SAFE_BUILD_LENGTH:mf0,MAX_SAFE_INTEGER:bf0,RELEASE_TYPES:gf0,SEMVER_SPEC_VERSION:hf0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var XO=f((omt,sbe)=>{"use strict";var zf0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};sbe.exports=zf0});var Gb=f((ka,nbe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:VQ,MAX_SAFE_BUILD_LENGTH:Of0,MAX_LENGTH:Ef0}=HO(),yf0=XO();ka=nbe.exports={};var Cf0=ka.re=[],Bf0=ka.safeRe=[],le=ka.src=[],Df0=ka.safeSrc=[],Ae=ka.t={},qf0=0,jQ="[a-zA-Z0-9-]",If0=[["\\s",1],["\\d",Ef0],[jQ,Of0]],Rf0=t=>{for(let[e,r]of If0)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Ke=(t,e,r)=>{let s=Rf0(e),n=qf0++;yf0(t,n,e),Ae[t]=n,le[n]=e,Df0[n]=s,Cf0[n]=new RegExp(e,r?"g":void 0),Bf0[n]=new RegExp(s,r?"g":void 0)};Ke("NUMERICIDENTIFIER","0|[1-9]\\d*");Ke("NUMERICIDENTIFIERLOOSE","\\d+");Ke("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${jQ}*`);Ke("MAINVERSION",`(${le[Ae.NUMERICIDENTIFIER]})\\.(${le[Ae.NUMERICIDENTIFIER]})\\.(${le[Ae.NUMERICIDENTIFIER]})`);Ke("MAINVERSIONLOOSE",`(${le[Ae.NUMERICIDENTIFIERLOOSE]})\\.(${le[Ae.NUMERICIDENTIFIERLOOSE]})\\.(${le[Ae.NUMERICIDENTIFIERLOOSE]})`);Ke("PRERELEASEIDENTIFIER",`(?:${le[Ae.NONNUMERICIDENTIFIER]}|${le[Ae.NUMERICIDENTIFIER]})`);Ke("PRERELEASEIDENTIFIERLOOSE",`(?:${le[Ae.NONNUMERICIDENTIFIER]}|${le[Ae.NUMERICIDENTIFIERLOOSE]})`);Ke("PRERELEASE",`(?:-(${le[Ae.PRERELEASEIDENTIFIER]}(?:\\.${le[Ae.PRERELEASEIDENTIFIER]})*))`);Ke("PRERELEASELOOSE",`(?:-?(${le[Ae.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${le[Ae.PRERELEASEIDENTIFIERLOOSE]})*))`);Ke("BUILDIDENTIFIER",`${jQ}+`);Ke("BUILD",`(?:\\+(${le[Ae.BUILDIDENTIFIER]}(?:\\.${le[Ae.BUILDIDENTIFIER]})*))`);Ke("FULLPLAIN",`v?${le[Ae.MAINVERSION]}${le[Ae.PRERELEASE]}?${le[Ae.BUILD]}?`);Ke("FULL",`^${le[Ae.FULLPLAIN]}$`);Ke("LOOSEPLAIN",`[v=\\s]*${le[Ae.MAINVERSIONLOOSE]}${le[Ae.PRERELEASELOOSE]}?${le[Ae.BUILD]}?`);Ke("LOOSE",`^${le[Ae.LOOSEPLAIN]}$`);Ke("GTLT","((?:<|>)?=?)");Ke("XRANGEIDENTIFIERLOOSE",`${le[Ae.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ke("XRANGEIDENTIFIER",`${le[Ae.NUMERICIDENTIFIER]}|x|X|\\*`);Ke("XRANGEPLAIN",`[v=\\s]*(${le[Ae.XRANGEIDENTIFIER]})(?:\\.(${le[Ae.XRANGEIDENTIFIER]})(?:\\.(${le[Ae.XRANGEIDENTIFIER]})(?:${le[Ae.PRERELEASE]})?${le[Ae.BUILD]}?)?)?`);Ke("XRANGEPLAINLOOSE",`[v=\\s]*(${le[Ae.XRANGEIDENTIFIERLOOSE]})(?:\\.(${le[Ae.XRANGEIDENTIFIERLOOSE]})(?:\\.(${le[Ae.XRANGEIDENTIFIERLOOSE]})(?:${le[Ae.PRERELEASELOOSE]})?${le[Ae.BUILD]}?)?)?`);Ke("XRANGE",`^${le[Ae.GTLT]}\\s*${le[Ae.XRANGEPLAIN]}$`);Ke("XRANGELOOSE",`^${le[Ae.GTLT]}\\s*${le[Ae.XRANGEPLAINLOOSE]}$`);Ke("COERCEPLAIN",`(^|[^\\d])(\\d{1,${VQ}})(?:\\.(\\d{1,${VQ}}))?(?:\\.(\\d{1,${VQ}}))?`);Ke("COERCE",`${le[Ae.COERCEPLAIN]}(?:$|[^\\d])`);Ke("COERCEFULL",le[Ae.COERCEPLAIN]+`(?:${le[Ae.PRERELEASE]})?(?:${le[Ae.BUILD]})?(?:$|[^\\d])`);Ke("COERCERTL",le[Ae.COERCE],!0);Ke("COERCERTLFULL",le[Ae.COERCEFULL],!0);Ke("LONETILDE","(?:~>?)");Ke("TILDETRIM",`(\\s*)${le[Ae.LONETILDE]}\\s+`,!0);ka.tildeTrimReplace="$1~";Ke("TILDE",`^${le[Ae.LONETILDE]}${le[Ae.XRANGEPLAIN]}$`);Ke("TILDELOOSE",`^${le[Ae.LONETILDE]}${le[Ae.XRANGEPLAINLOOSE]}$`);Ke("LONECARET","(?:\\^)");Ke("CARETTRIM",`(\\s*)${le[Ae.LONECARET]}\\s+`,!0);ka.caretTrimReplace="$1^";Ke("CARET",`^${le[Ae.LONECARET]}${le[Ae.XRANGEPLAIN]}$`);Ke("CARETLOOSE",`^${le[Ae.LONECARET]}${le[Ae.XRANGEPLAINLOOSE]}$`);Ke("COMPARATORLOOSE",`^${le[Ae.GTLT]}\\s*(${le[Ae.LOOSEPLAIN]})$|^$`);Ke("COMPARATOR",`^${le[Ae.GTLT]}\\s*(${le[Ae.FULLPLAIN]})$|^$`);Ke("COMPARATORTRIM",`(\\s*)${le[Ae.GTLT]}\\s*(${le[Ae.LOOSEPLAIN]}|${le[Ae.XRANGEPLAIN]})`,!0);ka.comparatorTrimReplace="$1$2$3";Ke("HYPHENRANGE",`^\\s*(${le[Ae.XRANGEPLAIN]})\\s+-\\s+(${le[Ae.XRANGEPLAIN]})\\s*$`);Ke("HYPHENRANGELOOSE",`^\\s*(${le[Ae.XRANGEPLAINLOOSE]})\\s+-\\s+(${le[Ae.XRANGEPLAINLOOSE]})\\s*$`);Ke("STAR","(<|>)?=?\\s*\\*");Ke("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ke("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var AI=f((amt,ibe)=>{"use strict";var wf0=Object.freeze({loose:!0}),Sf0=Object.freeze({}),Nf0=t=>t?typeof t!="object"?wf0:t:Sf0;ibe.exports=Nf0});var $Q=f((cmt,cbe)=>{"use strict";var obe=/^[0-9]+$/,abe=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=obe.test(t),s=obe.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},vf0=(t,e)=>abe(e
Line truncated
|
|
|
|
|
`.trim())}};BJ.exports=kR});var Dg=m((Xq0,NJ)=>{"use strict";var qJ=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Axe}=p0(),lxe=LA();RJ()===void 0&&IJ(new lxe);function IJ(t){if(!t||typeof t.dispatch!="function")throw new Axe("Argument agent must implement Agent");Object.defineProperty(globalThis,qJ,{value:t,writable:!0,enumerable:!1,configurable:!1})}s(IJ,"setGlobalDispatcher");function RJ(){return globalThis[qJ]}s(RJ,"getGlobalDispatcher");NJ.exports={setGlobalDispatcher:IJ,getGlobalDispatcher:RJ}});var qg=m((Yq0,wJ)=>{"use strict";wJ.exports=class{static{s(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 FJ=m((jq0,SJ)=>{"use strict";var dxe=ig();SJ.exports=t=>{let e=t?.maxRedirections;return r=>s(function(o,i){let{maxRedirections:a=e,...c}=o;if(!a)return r(o,i);let u=new dxe(r,a,o,i);return r(c,u)},"redirectInterceptor")}});var xJ=m((Zq0,WJ)=>{"use strict";var bxe=Mg();WJ.exports=t=>e=>s(function(n,o){return e(n,new bxe({...n,retryOptions:{...t,...n.retryOptions}},{handler:o,dispatch:e}))},"retryInterceptor")});var vJ=m((tI0,TJ)=>{"use strict";var fxe=Xe(),{InvalidArgumentError:Mxe,RequestAbortedError:mxe}=p0(),hxe=qg(),UR=class extends hxe{static{s(this,"DumpHandler")}#e=1024*1024;#t=null;#n=!1;#r=!1;#o=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new Mxe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#s.bind(this))}#s(e){this.#r=!0,this.#i=e}onHeaders(e,r,n,o){let a=fxe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new mxe(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,o)}onError(e){this.#n||(e=this.#i??e,this.#a.onError(e))}onData(e){return this.#o=this.#o+e.length,this.#o>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function zxe({maxSize:t}={maxSize:1024*1024}){return e=>s(function(n,o){let{dumpMaxSize:i=t}=n,a=new UR({maxSize:i},o);return e(n,a)},"Intercept")}s(zxe,"createDumpInterceptor");TJ.exports=zxe});var QJ=m((nI0,_J)=>{"use strict";var{isIP:gxe}=require("node:net"),{lookup:Oxe}=require("node:dns"),Exe=qg(),{InvalidArgumentError:YA,InformationalError:Cxe}=p0(),LJ=Math.pow(2,31)-1,GR=class{static{s(this,"DNSInstance")}#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#o}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let o=this.#n.get(e.hostname);if(o==null&&this.full){n(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(o==null)this.lookup(e,i,(a,c)=>{if(a||c==null||c.length===0){n(a??new Cxe("No DNS entries found"));return}this.setRecords(e,c);let u=this.#n.get(e.hostname),p=this.pick(e,u,i.affinity),A;typeof p.port=="number"?A=`:${p.port}`:e.port!==""?A=`:${e.port}`:A="",n(null,`${e.protocol}//${p.family===6?`[${p.address}]`:p.address}${A}`)});else{let a=this.pick(e,o,i.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}`)}}#r(e,r,n){Oxe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(o,i)=>{if(o)return n(o);let a=new Map;for(let c of i)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#o(e,r,n){let o=null,{records:i,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===LJ?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),i[n]!=null&&i[n].ips.length>0?c=i[n]:c=i[n===4?6:4]):c=i[n],c==null||c.ips.length===0)return o;c.offset==null||c.offset===LJ?c.offset=0:c.offset++;let u=c.offset%c.ips.length;return o=c.ips[u]??null,o==null?o:Date.now()-o.timestamp>o.ttl?(c.ips.splice(u,1),this.pick(e,r,n)):o}setRecords(e,r){let n=Date.now(),o={records:{4:null,6:null}};for(let i of r){i.timestamp=n,typeof i.ttl=="number"?i.ttl=Math.min(i.ttl,this.#e):i.ttl=this.#e;let a=o.records[i.family]??{ips:[]};a.ips.push(i),o.records[i.family]=a}this.#n.set(e.hostname,o)}getHandler(e,r){return new HR(this,e,r)}},HR=class extends Exe{static{s(this,"DNSDispatchHandler")}#e=null;#t=null;#n=null
Line truncated
|
|
|
|
|
${i}`;break;case"retry":hj(i)&&(r[o]=i);break;case"id":zj(i)&&(r[o]=i);break;case"event":i.length>0&&(r[o]=i);break}}processEvent(e){e.retry&&hj(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&zj(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}}};gj.exports={EventSourceStream:WN}});var Rj=m((s50,Ij)=>{"use strict";var{pipeline:w_e}=require("node:stream"),{fetching:S_e}=Tb(),{makeRequest:F_e}=KA(),{webidl:xs}=st(),{EventSourceStream:W_e}=Oj(),{parseMIMEType:x_e}=tr(),{createFastMessageEvent:T_e}=ol(),{isNetworkError:Ej}=Wb(),{delay:v_e}=SN(),{kEnumerableProperty:Bu}=Xe(),{environmentSettingsObject:Cj}=wr(),yj=!1,Bj=3e3,$b=0,Dj=1,jb=2,L_e="anonymous",__e="use-credentials",ul=class t extends EventTarget{static{s(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#n=!1;#r=$b;#o=null;#i=null;#a;#s;constructor(e,r={}){super(),xs.util.markAsUncloneable(this);let n="EventSource constructor";xs.argumentLengthCheck(arguments,1,n),yj||(yj=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=xs.converters.USVString(e,n,"url"),r=xs.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#s={lastEventId:"",reconnectionTime:Bj};let o=Cj,i;try{i=new URL(e,o.settingsObject.baseUrl),this.#s.origin=i.origin}catch(u){throw new DOMException(u,"SyntaxError")}this.#t=i.href;let a=L_e;r.withCredentials&&(a=__e,this.#n=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=Cj.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#o=F_e(c),this.#u()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#u(){if(this.#r===jb)return;this.#r=$b;let e={request:this.#o,dispatcher:this.#a},r=s(n=>{Ej(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(Ej(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let o=n.headersList.get("content-type",!0),i=o!==null?x_e(o):"failure",a=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=Dj,this.dispatchEvent(new Event("open")),this.#s.origin=n.urlList[n.urlList.length-1].origin;let c=new W_e({eventSourceSettings:this.#s,push:s(u=>{this.dispatchEvent(T_e(u.type,u.options))},"push")});w_e(n.body.stream,c,u=>{u?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=S_e(e)}async#c(){this.#r!==jb&&(this.#r=$b,this.dispatchEvent(new Event("error")),await v_e(this.#s.reconnectionTime),this.#r===$b&&(this.#s.lastEventId.length&&this.#o.headersList.set("last-event-id",this.#s.lastEventId,!0),this.#u()))}close(){xs.brandCheck(this,t),this.#r!==jb&&(this.#r=jb,this.#i.abort(),this.#o=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}},qj={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:$b,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:Dj,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:jb,writable:!1}};Object.defineProperties(ul,qj);Object.defineProperties(ul.prototype,qj);Object.defineProperties(ul.prototype,{close:Bu,onerror:Bu,onmessage:Bu,onopen:Bu,readyState:Bu,url:Bu,withCredentials:Bu});xs.converters.EventSourceInitDict=xs.dictionaryConverter([{key:"withCredentials",converter:xs.converters.boolean,defaultValue:s(()=>!1,"defaultValue")},{key:"dispatcher",converter:xs.converters.any}]);Ij.exports={EventSource:ul,defaultReconnectionTime:Bj}});var Al=m((c50,Oe)=>{"use strict";var Q_e=TA(),Nj=tb(),P_e=vA(),k_e=qX(),U_e=LA(),G_e=tR(),H_e=jX(),X_e=oV(),wj=p0(),bO=Xe(),{InvalidArgumentError:dO}=wj,pl=GV(),V_e=nb(),J_e=TR(),Y_e=DJ(),$_e=_R(),j_e=CR(),K_e=Mg(),{getGlobalDispatcher:Sj,setGlobalDispatcher:Z_e}=Dg(),eQe=qg(),tQe=ig(),rQe=sg();Object.assign(Nj.prototype,pl);Oe.exports.Dispatcher=Nj;Oe.exports.Client=Q_e;Oe.exports.Pool=P_e;Oe.exports.BalancedPool=k_e;Oe.exports.Agent=U_e;Oe.exports.
Line truncated
|
|
|
|
|
%s`,x,x,B,n);var W=B.type==="*"?_w:B.type==="?"?Lw:"\\"+B.type;o=!0,n=n.slice(0,B.reStart)+W+"\\("+x}z(),i&&(n+="\\\\");var _=!1;switch(n.charAt(0)){case"[":case".":case"(":_=!0}for(var ae=c.length-1;ae>-1;ae--){var Se=c[ae],xe=n.slice(0,Se.reStart),Ne=n.slice(Se.reStart,Se.reEnd-8),Ce=n.slice(Se.reEnd-8,Se.reEnd),we=n.slice(Se.reEnd);Ce+=we;var k=xe.split("(").length-1,Te=we;for(g=0;g<k;g++)Te=Te.replace(/\)[+*?]?/,"");we=Te;var T="";we===""&&e!==LO&&(T="$");var j=xe+Ne+we+T+Ce;n=j}if(n!==""&&o&&(n="(?=.)"+n),_&&(n=b+n),e===LO)return[n,o];if(!o)return g7e(t);var $e=r.nocase?"i":"";try{var m1=new RegExp("^"+n+"$",$e)}catch{return new RegExp("$.")}return m1._glob=t,m1._src=n,m1}s(h7e,"parse");Gr.makeRe=function(t,e){return new ut(t,e||{}).makeRe()};ut.prototype.makeRe=z7e;function z7e(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?_w:e.dot?A7e:l7e,n=e.nocase?"i":"",o=t.map(function(i){return i.map(function(a){return a===Qw?r:typeof a=="string"?O7e(a):a._src}).join("\\/")}).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,n)}catch{this.regexp=!1}return this.regexp}s(z7e,"makeRe");Gr.match=function(t,e,r){r=r||{};var n=new ut(e,r);return t=t.filter(function(o){return n.match(o)}),n.options.nonull&&!t.length&&t.push(e),t};ut.prototype.match=s(function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;Of.sep!=="/"&&(e=e.split(Of.sep).join("/")),e=e.split(Lee),this.debug(this.pattern,"split",e);var o=this.set;this.debug(this.pattern,"set",o);var i,a;for(a=e.length-1;a>=0&&(i=e[a],!i);a--);for(a=0;a<o.length;a++){var c=o[a],u=e;n.matchBase&&c.length===1&&(u=[i]);var p=this.matchOne(u,c,r);if(p)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate},"match");ut.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,i=0,a=t.length,c=e.length;o<a&&i<c;o++,i++){this.debug("matchOne loop");var u=e[i],p=t[o];if(this.debug(e,u,p),u===!1)return!1;if(u===Qw){this.debug("GLOBSTAR",[e,u,p]);var A=o,l=i+1;if(l===c){for(this.debug("** at the end");o<a;o++)if(t[o]==="."||t[o]===".."||!n.dot&&t[o].charAt(0)===".")return!1;return!0}for(;A<a;){var b=t[A];if(this.debug(`
|
|
|
|
|
globstar while`,t,A,e,l,b),this.matchOne(t.slice(A),e.slice(l),r))return this.debug("globstar found match!",A,a,b),!0;if(b==="."||b===".."||!n.dot&&b.charAt(0)==="."){this.debug("dot detected!",t,A,e,l);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(r&&(this.debug(`
|
|
|
|
|
>>> no match, partial?`,t,A,e,l),A===a))}var M;if(typeof u=="string"?(M=p===u,this.debug("string match",u,p,M)):(M=p.match(u),this.debug("pattern match",u,p,M)),!M)return!1}if(o===a&&i===c)return!0;if(o===a)return r;if(i===c)return o===a-1&&t[o]==="";throw new Error("wtf?")};function g7e(t){return t.replace(/\\(.)/g,"$1")}s(g7e,"globUnescape");function O7e(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}s(O7e,"regExpEscape")});var Ol=m((_60,Hee)=>{"use strict";var R7e="2.0.0",N7e=Number.MAX_SAFE_INTEGER||9007199254740991,w7e=16,S7e=250,F7e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Hee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:w7e,MAX_SAFE_BUILD_LENGTH:S7e,MAX_SAFE_INTEGER:N7e,RELEASE_TYPES:F7e,SEMVER_SPEC_VERSION:R7e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var yf=m((Q60,Xee)=>{"use strict";var W7e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Xee.exports=W7e});var El=m((ii,Vee)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:kw,MAX_SAFE_BUILD_LENGTH:x7e,MAX_LENGTH:T7e}=Ol(),v7e=yf();ii=Vee.exports={};var L7e=ii.re=[],_7e=ii.safeRe=[],re=ii.src=[],Q7e=ii.safeSrc=[],ne=ii.t={},P7e=0,Uw="[a-zA-Z0-9-]",k7e=[["\\s",1],["\\d",T7e],[Uw,x7e]],U7e=s(t=>{for(let[e,r]of k7e)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),Le=s((t,e,r)=>{let n=U7e(e),o=P7e++;v7e(t,o,e),ne[t]=o,re[o]=e,Q7e[o]=n,L7e[o]=new RegExp(e,r?"g":void 0),_7e[o]=new RegExp(n,r?"g":void 0)},"createToken");Le("NUMERICIDENTIFIER","0|[1-9]\\d*");Le("NUMERICIDENTIFIERLOOSE","\\d+");Le("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Uw}*`);Le("MAINVERSION",`(${re[ne.NUMERICIDENTIFIER]})\\.(${re[ne.NUMERICIDENTIFIER]})\\.(${re[ne.NUMERICIDENTIFIER]})`);Le("MAINVERSIONLOOSE",`(${re[ne.NUMERICIDENTIFIERLOOSE]})\\.(${re[ne.NUMERICIDENTIFIERLOOSE]})\\.(${re[ne.NUMERICIDENTIFIERLOOSE]})`);Le("PRERELEASEIDENTIFIER",`(?:${re[ne.NONNUMERICIDENTIFIER]}|${re[ne.NUMERICIDENTIFIER]})`);Le("PRERELEASEIDENTIFIERLOOSE",`(?:${re[ne.NONNUMERICIDENTIFIER]}|${re[ne.NUMERICIDENTIFIERLOOSE]})`);Le("PRERELEASE",`(?:-(${re[ne.PRERELEASEIDENTIFIER]}(?:\\.${re[ne.PRERELEASEIDENTIFIER]})*))`);Le("PRERELEASELOOSE",`(?:-?(${re[ne.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${re[ne.PRERELEASEIDENTIFIERLOOSE]})*))`);Le("BUILDIDENTIFIER",`${Uw}+`);Le("BUILD",`(?:\\+(${re[ne.BUILDIDENTIFIER]}(?:\\.${re[ne.BUILDIDENTIFIER]})*))`);Le("FULLPLAIN",`v?${re[ne.MAINVERSION]}${re[ne.PRERELEASE]}?${re[ne.BUILD]}?`);Le("FULL",`^${re[ne.FULLPLAIN]}$`);Le("LOOSEPLAIN",`[v=\\s]*${re[ne.MAINVERSIONLOOSE]}${re[ne.PRERELEASELOOSE]}?${re[ne.BUILD]}?`);Le("LOOSE",`^${re[ne.LOOSEPLAIN]}$`);Le("GTLT","((?:<|>)?=?)");Le("XRANGEIDENTIFIERLOOSE",`${re[ne.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Le("XRANGEIDENTIFIER",`${re[ne.NUMERICIDENTIFIER]}|x|X|\\*`);Le("XRANGEPLAIN",`[v=\\s]*(${re[ne.XRANGEIDENTIFIER]})(?:\\.(${re[ne.XRANGEIDENTIFIER]})(?:\\.(${re[ne.XRANGEIDENTIFIER]})(?:${re[ne.PRERELEASE]})?${re[ne.BUILD]}?)?)?`);Le("XRANGEPLAINLOOSE",`[v=\\s]*(${re[ne.XRANGEIDENTIFIERLOOSE]})(?:\\.(${re[ne.XRANGEIDENTIFIERLOOSE]})(?:\\.(${re[ne.XRANGEIDENTIFIERLOOSE]})(?:${re[ne.PRERELEASELOOSE]})?${re[ne.BUILD]}?)?)?`);Le("XRANGE",`^${re[ne.GTLT]}\\s*${re[ne.XRANGEPLAIN]}$`);Le("XRANGELOOSE",`^${re[ne.GTLT]}\\s*${re[ne.XRANGEPLAINLOOSE]}$`);Le("COERCEPLAIN",`(^|[^\\d])(\\d{1,${kw}})(?:\\.(\\d{1,${kw}}))?(?:\\.(\\d{1,${kw}}))?`);Le("COERCE",`${re[ne.COERCEPLAIN]}(?:$|[^\\d])`);Le("COERCEFULL",re[ne.COERCEPLAIN]+`(?:${re[ne.PRERELEASE]})?(?:${re[ne.BUILD]})?(?:$|[^\\d])`);Le("COERCERTL",re[ne.COERCE],!0);Le("COERCERTLFULL",re[ne.COERCEFULL],!0);Le("LONETILDE","(?:~>?)");Le("TILDETRIM",`(\\s*)${re[ne.LONETILDE]}\\s+`,!0);ii.tildeTrimReplace="$1~";Le("TILDE",`^${re[ne.LONETILDE]}${re[ne.XRANGEPLAIN]}$`);Le("TILDELOOSE",`^${re[ne.LONETILDE]}${re[ne.XRANGEPLAINLOOSE]}$`);Le("LONECARET","(?:\\^)");Le("CARETTRIM",`(\\s*)${re[ne.LONECARET]}\\s+`,!0);ii.caretTrimReplace="$1^";Le("CARET",`^${re[ne.LONECARET]}${re[ne.XRANGEPLAIN]}$`);Le("CARETLOOSE",`^${re[ne.LONECARET]}${re[ne.XRANGEPLAINLOOSE]}$`);Le("COMPARATORLOOSE",`^${re[ne.GTLT]}\\s*(${re[ne.LOOSEPLAIN]})$|^$`);Le("COMPARATOR",`^${re[ne.GTLT]}\\s*(${re[ne.FULLPLAIN]})$|^$`);Le("COMPARATORTRIM",`(\\s*)${re[ne.GTLT]}\\s*(${re[ne.LOOSEPLAIN]}|${re[ne.XRANGEPLAIN]})`,!0);ii.comparatorTrimReplace="$1$2$3";Le("HYPHENRANGE",`^\\s*(${re[ne.XRANGEPLAIN]})\\s+-\\s+(${re[ne.XRANGEPLAIN]})\\s*$`);Le("HYPHENRANGELOOSE",`^\\s*(${re[ne.XRANGEPLAINLOOSE]})\\s+-\\s+(${re[ne.XRANGEPLAINLOOSE]})\\s*$`);Le("STAR","(<|>)?=?\\s*\\*");Le("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Le("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var kO=m((k60,Jee)=>{"use strict";var G7e=Object.freeze({loose:!0}),H7e=Object.freeze({}),X7e=s(t=>t?typeof t!="object"?G7e:t:H7e,"parseOptions");Jee.exports=X7e});var Gw=m((G60,jee)=>{"use strict";var Yee=/^[0-9]+$/,$ee=s((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Yee
Line truncated
|
|
|
|
|
`).join(`
|
|
|
|
|
`+i),t.push(n+"m+"+YI.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=ZM0()+e+" "+t[0]}function ZM0(){return Mr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function em0(...t){return process.stderr.write($I.format(...t)+`
|
|
|
|
|
`)}function tm0(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function rm0(){return process.env.DEBUG}function sm0(t){t.inspectOpts={};let e=Object.keys(Mr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Mr.inspectOpts[e[r]]}YI.exports=vk()(Mr);var{formatters:_me}=YI.exports;_me.o=function(t){return this.inspectOpts.colors=this.useColors,$I.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};_me.O=function(t){return this.inspectOpts.colors=this.useColors,$I.inspect(t,this.inspectOpts)}});var d2=f((Ezt,Wk)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Wk.exports=vme():Wk.exports=Lme()});var kme=f(Zs=>{"use strict";var nm0=Zs&&Zs.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),im0=Zs&&Zs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Pme=Zs&&Zs.__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)&&nm0(e,t,r);return im0(e,t),e};Object.defineProperty(Zs,"__esModule",{value:!0});Zs.req=Zs.json=Zs.toBuffer=void 0;var om0=Pme(require("http")),am0=Pme(require("https"));async function Qme(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}Zs.toBuffer=Qme;async function cm0(t){let r=(await Qme(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=` (input: ${r})`,n}}Zs.json=cm0;function um0(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?am0:om0).request(t,e),n=new Promise((i,o)=>{s.once("response",i).once("error",o).end()});return s.then=n.then.bind(n),s}Zs.req=um0});var Xme=f(Hn=>{"use strict";var Gme=Hn&&Hn.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),pm0=Hn&&Hn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hme=Hn&&Hn.__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)&&Gme(e,t,r);return pm0(e,t),e},lm0=Hn&&Hn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Gme(e,t,r)};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.Agent=void 0;var Am0=Hme(require("net")),Ume=Hme(require("http")),dm0=require("https");lm0(kme(),Hn);var Ha=Symbol("AgentBaseInternalState"),_k=class extends Ume.Agent{constructor(e){super(e),this[Ha]={}}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(s=>s.indexOf("(https.js:")!==-1||s.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 Am0.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let s=this.sockets[e],n=s.indexOf(r);n!==-1&&(s.splice(n,1),this.totalSocketCount--,s.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?dm0.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,s){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(n),o=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,n)).then(a=>{if(this.decrementSockets(i,o),a instanceof Ume.Agent)try{return a.addRequest(e,n)}catch(c){return s(c)}this[Ha].currentSocket=a,super.createSocket(e,r,s)},a=>{this.decrementSockets(i,o),s(a)})}createConnection(){let e=this[Ha].currentSocket;if(this[Ha].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Ha].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Ha]&&(this[Ha].defaultPort=e)}get protocol(){return this[Ha].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Ha]&&(this[Ha].protocol=e)}};Hn.Agent=_k});var Vme=f(Zb=>{"use strict";var fm0=Zb&&Zb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zb,"__esModule",{value:!0});Zb.parseProxyResponse=void 0;var hm0=fm0(d2()),JI=(0,hm0.default)("https-proxy-agent:parse-proxy-response");function bm0(t){return new Promise((e,r)=>{let s=0,n=[];function i(){let p=t.read();p?u(p):t.once("readable",i)}function o(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",i)}function a(){o(),JI("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){o(),JI("onerror %o",p),r(p)}function u(p){n.push(p),s+=p.length;let l=Buffer.concat(n,s),A=l.indexOf(`\r
|
|
|
|
|
`+i),t.push(o+"m+"+I3.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=SHe()+e+" "+t[0]}s(wHe,"formatArgs");function SHe(){return lt.inspectOpts.hideDate?"":new Date().toISOString()+" "}s(SHe,"getDate");function FHe(...t){return process.stderr.write(q3.format(...t)+`
|
|
|
|
|
`)}s(FHe,"log");function WHe(t){t?process.env.DEBUG=t:delete process.env.DEBUG}s(WHe,"save");function xHe(){return process.env.DEBUG}s(xHe,"load");function THe(t){t.inspectOpts={};let e=Object.keys(lt.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=lt.inspectOpts[e[r]]}s(THe,"init");I3.exports=S6()(lt);var{formatters:Nte}=I3.exports;Nte.o=function(t){return this.inspectOpts.colors=this.useColors,q3.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};Nte.O=function(t){return this.inspectOpts.colors=this.useColors,q3.inspect(t,this.inspectOpts)}});var R3=m((wx0,T6)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?T6.exports=Bte():T6.exports=wte()});var Wte=m(cr=>{"use strict";var vHe=cr&&cr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),LHe=cr&&cr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ste=cr&&cr.__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)&&vHe(e,t,r);return LHe(e,t),e};Object.defineProperty(cr,"__esModule",{value:!0});cr.req=cr.json=cr.toBuffer=void 0;var _He=Ste(require("http")),QHe=Ste(require("https"));async function Fte(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}s(Fte,"toBuffer");cr.toBuffer=Fte;async function PHe(t){let r=(await Fte(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=` (input: ${r})`,o}}s(PHe,"json");cr.json=PHe;function kHe(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?QHe:_He).request(t,e),o=new Promise((i,a)=>{n.once("response",i).once("error",a).end()});return n.then=o.then.bind(o),n}s(kHe,"req");cr.req=kHe});var Lte=m(Jr=>{"use strict";var Tte=Jr&&Jr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),UHe=Jr&&Jr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vte=Jr&&Jr.__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)&&Tte(e,t,r);return UHe(e,t),e},GHe=Jr&&Jr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Tte(e,t,r)};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.Agent=void 0;var HHe=vte(require("net")),xte=vte(require("http")),XHe=require("https");GHe(Wte(),Jr);var ui=Symbol("AgentBaseInternalState"),v6=class extends xte.Agent{static{s(this,"Agent")}constructor(e){super(e),this[ui]={}}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 HHe.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],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?XHe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(o),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,o)).then(c=>{if(this.decrementSockets(i,a),c instanceof xte.Agent)try{return c.addRequest(e,o)}catch(u){return n(u)}this[ui].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){let e=this[ui].currentSocket;if(this[ui].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[ui].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[ui]&&(this[ui].defaultPort=e)}get protocol(){return this[ui].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[ui]&&(this[ui].protocol=e)}};Jr.Agent=v6});var _te=m(Sl=>{"use strict";var VHe=Sl&&Sl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sl,"__esModule",{value:!0});Sl.parseProxyResponse=void 0;var JHe=VHe(R3()),N3=(0,JHe.default)("https-proxy-agent:parse-proxy-response");function YHe(t){return new Promise((e,r)=>{let n=0,o=[];function i(){let A=t.read();A?p(A):t.once("readable",i)}s(i,"read");function a(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",i)}s(a,"cleanup");function c(){a(),N3("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}s(c,"onend");function u(A){a(),N3("onerror %o",A),r(A)}s(u,"onerror");function p(A){o.push(A),n+=A.length;let l=Buffer.concat(o,n),b=l.indexOf(`\r
|
|
|
|
|
\r
|
|
|
|
|
`);if(A===-1){JI("have not received end of HTTP headers yet..."),i();return}let h=l.slice(0,A).toString("ascii").split(`\r
|
|
|
|
|
`),M=h.shift();if(!M)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=M.split(" "),y=+g[1],O=g.slice(2).join(" "),B={};for(let I of h){if(!I)continue;let R=I.indexOf(":");if(R===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${I}"`));let N=I.slice(0,R).toLowerCase(),T=I.slice(R+1).trimStart(),W=B[N];typeof W=="string"?B[N]=[W,T]:Array.isArray(W)?W.push(T):B[N]=T}JI("got proxy server response: %o %o",M,B),o(),e({connect:{statusCode:y,statusText:O,headers:B},buffered:l})}t.on("error",c),t.on("end",a),i()})}Zb.parseProxyResponse=bm0});var Zme=f(_i=>{"use strict";var Mm0=_i&&_i.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),mm0=_i&&_i.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jme=_i&&_i.__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)&&Mm0(e,t,r);return mm0(e,t),e},Kme=_i&&_i.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_i,"__esModule",{value:!0});_i.HttpsProxyAgent=void 0;var KI=Jme(require("net")),jme=Jme(require("tls")),gm0=Kme(require("assert")),zm0=Kme(d2()),Om0=Xme(),Em0=require("url"),ym0=Vme(),o3=(0,zm0.default)("https-proxy-agent"),$me=t=>t.servername===void 0&&t.host&&!KI.isIP(t.host)?{...t,servername:t.host}:t,ZI=class extends Om0.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new Em0.URL(e):e,this.proxyHeaders=r?.headers??{},o3("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?Yme(r,"headers"):null,host:s,port:n}}async connect(e,r){let{proxy:s}=this;if(!r.host)throw new TypeError('No "host" provided');let n;s.protocol==="https:"?(o3("Creating `tls.Socket`: %o",this.connectOpts),n=jme.connect($me(this.connectOpts))):(o3("Creating `net.Socket`: %o",this.connectOpts),n=KI.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=KI.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(s.username||s.password){let A=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(A).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(i))a+=`${A}: ${i[A]}\r
|
|
|
|
|
`;let c=(0,ym0.parseProxyResponse)(n);n.write(`${a}\r
|
|
|
|
|
`);let{connect:u,buffered:p}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",Cm0),r.secureEndpoint?(o3("Upgrading socket connection to TLS"),jme.connect({...Yme($me(r),"host","path","port"),socket:n})):n;n.destroy();let l=new KI.Socket({writable:!1});return l.readable=!0,e.once("socket",A=>{o3("Replaying proxy buffer for failed request"),(0,gm0.default)(A.listenerCount("data")>0),A.push(p),A.push(null)}),l}};ZI.protocols=["http","https"];_i.HttpsProxyAgent=ZI;function Cm0(t){t.resume()}function Yme(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var rge=f(en=>{"use strict";var Bm0=en&&en.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Dm0=en&&en.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ege=en&&en.__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)&&Bm0(e,t,r);return Dm0(e,t),e};Object.defineProperty(en,"__esModule",{value:!0});en.req=en.json=en.toBuffer=void 0;var qm0=ege(require("http")),Im0=ege(require("https"));async function tge(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}en.toBuffer=tge;async function Rm0(t){let r=(await tge(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=` (input: ${r})`,n}}en.json=Rm0;function wm0(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?Im0:qm0).request(t,e),n=new Promise((i,o)=>{s.once("response",i).once("error",o).end()});return s.then=n.then.bind(n),s}en.req=wm0});var a3=f(Xn=>{"use strict";var nge=Xn&&Xn.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Sm0=Xn&&Xn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ige=Xn&&Xn.__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)&&nge(e,t,r);return Sm0(e,t),e},Nm0=Xn&&Xn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&nge(e,t,r)};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.Agent=void 0;var vm0=ige(require("net")),sge=ige(require("http")),Fm0=require("https");Nm0(rge(),Xn);var Xa=Symbol("AgentBaseInternalState"),Lk=class extends sge.Agent{constructor(e){super(e),this[Xa]={}}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(s=>s.indexOf("(https.js:")!==-1||s.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 vm0.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let s=this.sockets[e],n=s.indexOf(r);n!==-1&&(s.splice(n,1),this.totalSocketCount--,s.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?Fm0.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,s){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(n),o=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,n)).then(a=>{if(this.decrementSockets(i,o),a instanceof sge.Agent)return a.addRequest(e,n);this[Xa].currentSocket=a,super.createSocket(e,r,s)},a=>{this.decrementSockets(i,o),s(a)})}createConnection(){let e=this[Xa].currentSocket;if(this[Xa].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Xa].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Xa]&&(this[Xa].defaultPort=e)}get protocol(){return this[Xa].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Xa]&&(this[Xa].protocol=e)}};Xn.Agent=Lk});var Pk=f(Li=>{"use strict";var Tm0=Li&&Li.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),xm0=Li&&Li.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),age=Li&&Li.__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)&&Tm0(e,t,r);return xm0(e,t),e},Wm0=Li&&Li.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Li,"__esModule",{value:!0});Li.HttpProxyAgent=void 0;var _m0=age(require("net")),Lm0=age(require("tls")),Pm0=Wm0(d2()),Qm0=require("events"),km0=a3(),oge=require("url"),eM=(0,Pm0.default)("http-proxy-agent"),eR=class extends km0.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new oge.URL(e):e,this.proxyHeaders=r?.headers??{},eM("Creating new HttpProxyAgent instance: %o",this.proxy.href);let s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?Um0(r,"headers"):null,host:s,port:n}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:s}=this,n=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",o=`${n}//${i}`,a=new oge.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(s.username||s.password){let u=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let u of Object.keys(c)){let p=c[u];p&&e.setHeader(u,p)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let s,n;eM("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(eM("Patching connection write() output buffer with updated header"),s=e.outputData[0].data,n=s.indexOf(`\r
|
|
|
|
|
`);if(b===-1){N3("have not received end of HTTP headers yet..."),i();return}let M=l.slice(0,b).toString("ascii").split(`\r
|
|
|
|
|
`),z=M.shift();if(!z)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=z.split(" "),C=+g[1],E=g.slice(2).join(" "),B={};for(let D of M){if(!D)continue;let q=D.indexOf(":");if(q===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${D}"`));let x=D.slice(0,q).toLowerCase(),W=D.slice(q+1).trimStart(),_=B[x];typeof _=="string"?B[x]=[_,W]:Array.isArray(_)?_.push(W):B[x]=W}N3("got proxy server response: %o %o",z,B),a(),e({connect:{statusCode:C,statusText:E,headers:B},buffered:l})}s(p,"ondata"),t.on("error",u),t.on("end",c),i()})}s(YHe,"parseProxyResponse");Sl.parseProxyResponse=YHe});var Hte=m(Rn=>{"use strict";var $He=Rn&&Rn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),jHe=Rn&&Rn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ute=Rn&&Rn.__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)&&$He(e,t,r);return jHe(e,t),e},Gte=Rn&&Rn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.HttpsProxyAgent=void 0;var w3=Ute(require("net")),Qte=Ute(require("tls")),KHe=Gte(require("assert")),ZHe=Gte(R3()),eXe=Lte(),tXe=require("url"),rXe=_te(),_f=(0,ZHe.default)("https-proxy-agent"),Pte=s(t=>t.servername===void 0&&t.host&&!w3.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),S3=class extends eXe.Agent{static{s(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new tXe.URL(e):e,this.proxyHeaders=r?.headers??{},_f("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?kte(r,"headers"):null,host:n,port:o}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let o;n.protocol==="https:"?(_f("Creating `tls.Socket`: %o",this.connectOpts),o=Qte.connect(Pte(this.connectOpts))):(_f("Creating `net.Socket`: %o",this.connectOpts),o=w3.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=w3.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(n.username||n.password){let b=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(b).toString("base64")}`}i.Host=`${a}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let b of Object.keys(i))c+=`${b}: ${i[b]}\r
|
|
|
|
|
`;let u=(0,rXe.parseProxyResponse)(o);o.write(`${c}\r
|
|
|
|
|
`);let{connect:p,buffered:A}=await u;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",nXe),r.secureEndpoint?(_f("Upgrading socket connection to TLS"),Qte.connect({...kte(Pte(r),"host","path","port"),socket:o})):o;o.destroy();let l=new w3.Socket({writable:!1});return l.readable=!0,e.once("socket",b=>{_f("Replaying proxy buffer for failed request"),(0,KHe.default)(b.listenerCount("data")>0),b.push(A),b.push(null)}),l}};S3.protocols=["http","https"];Rn.HttpsProxyAgent=S3;function nXe(t){t.resume()}s(nXe,"resume");function kte(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}s(kte,"omit")});var Jte=m(ur=>{"use strict";var oXe=ur&&ur.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iXe=ur&&ur.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xte=ur&&ur.__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)&&oXe(e,t,r);return iXe(e,t),e};Object.defineProperty(ur,"__esModule",{value:!0});ur.req=ur.json=ur.toBuffer=void 0;var sXe=Xte(require("http")),aXe=Xte(require("https"));async function Vte(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}s(Vte,"toBuffer");ur.toBuffer=Vte;async function cXe(t){let r=(await Vte(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=` (input: ${r})`,o}}s(cXe,"json");ur.json=cXe;function uXe(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?aXe:sXe).request(t,e),o=new Promise((i,a)=>{n.once("response",i).once("error",a).end()});return n.then=o.then.bind(o),n}s(uXe,"req");ur.req=uXe});var Kte=m(Yr=>{"use strict";var $te=Yr&&Yr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),pXe=Yr&&Yr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),jte=Yr&&Yr.__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)&&$te(e,t,r);return pXe(e,t),e},AXe=Yr&&Yr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&$te(e,t,r)};Object.defineProperty(Yr,"__esModule",{value:!0});Yr.Agent=void 0;var lXe=jte(require("net")),Yte=jte(require("http")),dXe=require("https");AXe(Jte(),Yr);var pi=Symbol("AgentBaseInternalState"),L6=class extends Yte.Agent{static{s(this,"Agent")}constructor(e){super(e),this[pi]={}}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 lXe.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],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?dXe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(o),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,o)).then(c=>{if(this.decrementSockets(i,a),c instanceof Yte.Agent)return c.addRequest(e,o);this[pi].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){let e=this[pi].currentSocket;if(this[pi].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[pi].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[pi]&&(this[pi].defaultPort=e)}get protocol(){return this[pi].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[pi]&&(this[pi].protocol=e)}};Yr.Agent=L6});var tre=m(Nn=>{"use strict";var bXe=Nn&&Nn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),fXe=Nn&&Nn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ere=Nn&&Nn.__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)&&bXe(e,t,r);return fXe(e,t),e},MXe=Nn&&Nn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.HttpProxyAgent=void 0;var mXe=ere(require("net")),hXe=ere(require("tls")),zXe=MXe(R3()),gXe=require("events"),OXe=Kte(),Zte=require("url"),Fl=(0,zXe.default)("http-proxy-agent"),F3=class extends OXe.Agent{static{s(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new Zte.URL(e):e,this.proxyHeaders=r?.headers??{},Fl("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?EXe(r,"headers"):null,host:n,port:o}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,o=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",a=`${o}//${i}`,c=new Zte.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let u=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let p=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;u["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}u["Proxy-Connection"]||(u["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(u)){let A=u[p];A&&e.setHeader(p,A)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,o;Fl("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Fl("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,o=n.indexOf(`\r
|
|
|
|
|
\r
|
|
|
|
|
`)+4,e.outputData[0].data=e._header+s.substring(n),eM("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(eM("Creating `tls.Socket`: %o",this.connectOpts),i=Lm0.connect(this.connectOpts)):(eM("Creating `net.Socket`: %o",this.connectOpts),i=_m0.connect(this.connectOpts)),await(0,Qm0.once)(i,"connect"),i}};eR.protocols=["http","https"];Li.HttpProxyAgent=eR;function Um0(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var Rge=f(fR=>{"use strict";Object.defineProperty(fR,"__esModule",{value:!0});fR.state=void 0;fR.state={instrumenterImplementation:void 0}});var Xge=f(gR=>{"use strict";Object.defineProperty(gR,"__esModule",{value:!0});gR.state=void 0;gR.state={operationRequestMap:new WeakMap}});var C3e=f(mM=>{"use strict";Object.defineProperty(mM,"__esModule",{value:!0});var uy0=require("os"),py0=require("util");function ly0(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Ay0=ly0(py0);function dy0(t,...e){process.stderr.write(`${Ay0.default.format(t,...e)}${uy0.EOL}`)}var f3e=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,b3e,mH=[],gH=[],_5=[];f3e&&zH(f3e);var M3e=Object.assign(t=>m3e(t),{enable:zH,enabled:OH,disable:fy0,log:dy0});function zH(t){b3e=t,mH=[],gH=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?gH.push(new RegExp(`^${s.substr(1)}$`)):mH.push(new RegExp(`^${s}$`));for(let s of _5)s.enabled=OH(s.namespace)}function OH(t){if(t.endsWith("*"))return!0;for(let e of gH)if(e.test(t))return!1;for(let e of mH)if(e.test(t))return!0;return!1}function fy0(){let t=b3e||"";return zH(""),t}function m3e(t){let e=Object.assign(r,{enabled:OH(t),destroy:hy0,log:M3e.log,namespace:t,extend:by0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t} ${s[0]}`),e.log(...s))}return _5.push(e),e}function hy0(){let t=_5.indexOf(this);return t>=0?(_5.splice(t,1),!0):!1}function by0(t){let e=m3e(`${this.namespace}:${t}`);return e.log=this.log,e}var j3=M3e,g3e=new Set,x5=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,L5,P5=j3("azure");P5.log=(...t)=>{j3.log(...t)};var EH=["verbose","info","warning","error"];x5&&(y3e(x5)?z3e(x5):console.error(`AZURE_LOG_LEVEL set to unknown log level '${x5}'; logging is not enabled. Acceptable values: ${EH.join(", ")}.`));function z3e(t){if(t&&!y3e(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${EH.join(",")}`);L5=t;let e=[];for(let r of g3e)E3e(r)&&e.push(r.namespace);j3.enable(e.join(","))}function My0(){return L5}var h3e={verbose:400,info:300,warning:200,error:100};function my0(t){let e=P5.extend(t);return O3e(P5,e),{error:W5(e,"error"),warning:W5(e,"warning"),info:W5(e,"info"),verbose:W5(e,"verbose")}}function O3e(t,e){e.log=(...r)=>{t.log(...r)}}function W5(t,e){let r=Object.assign(t.extend(e),{level:e});if(O3e(t,r),E3e(r)){let s=j3.disable();j3.enable(s+","+r.namespace)}return g3e.add(r),r}function E3e(t){return!!(L5&&h3e[t.level]<=h3e[L5])}function y3e(t){return EH.includes(t)}mM.AzureLogger=P5;mM.createClientLogger=my0;mM.getLogLevel=My0;mM.setLogLevel=z3e});var BH=f(Y3=>{"use strict";Object.defineProperty(Y3,"__esModule",{value:!0});var gM=new WeakMap,Q5=new WeakMap,$3=class t{constructor(){this.onabort=null,gM.set(this,[]),Q5.set(this,!1)}get aborted(){if(!Q5.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Q5.get(this)}static get none(){return new t}addEventListener(e,r){if(!gM.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");gM.get(this).push(r)}removeEventListener(e,r){if(!gM.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=gM.get(this),n=s.indexOf(r);n>-1&&s.splice(n,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 B3e(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=gM.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),Q5.set(t,!0)}var yH=class extends Error{constructor(e){super(e),this.name="AbortError"}},CH=class{constructor(e){if(this._signal=new $3,!!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(){B3e(this._signal)}static timeout(e){let r=new $3,s=setTimeout(B3e,e,r);return typeof s.unref=="function"&&s.unref(),r}};Y3.AbortController=CH;Y3.AbortError=yH;Y3.AbortSignal=$3});var w3e=f(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});var gy0=BH(),NH=require("crypto");function D3e(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,o)=>{function a(){o(new gy0.AbortError(n??"The operation was aborted."))}function c(){s?.removeEventListener("abort",u)}function u(){r?.(),c(),a()}if(s?.aborted)return a();try{t(p=>{c(),i(p)},p=>{c(),o(p)})}catch(p){o(p)}s?.addEventListener("abort",u)})}var zy0="The delay was
Line truncated
|
|
|
|
|
`)+4,e.outputData[0].data=e._header+n.substring(o),Fl("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(Fl("Creating `tls.Socket`: %o",this.connectOpts),i=hXe.connect(this.connectOpts)):(Fl("Creating `net.Socket`: %o",this.connectOpts),i=mXe.connect(this.connectOpts)),await(0,gXe.once)(i,"connect"),i}};F3.protocols=["http","https"];Nn.HttpProxyAgent=F3;function EXe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}s(EXe,"omit")});var Cre=m(V3=>{"use strict";Object.defineProperty(V3,"__esModule",{value:!0});V3.state=void 0;V3.state={instrumenterImplementation:void 0}});var Qre=m(K3=>{"use strict";Object.defineProperty(K3,"__esModule",{value:!0});K3.state=void 0;K3.state={operationRequestMap:new WeakMap}});var hie=m(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var kje=require("os"),Uje=require("util");function Gje(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}s(Gje,"_interopDefaultLegacy");var Hje=Gje(Uje);function Xje(t,...e){process.stderr.write(`${Hje.default.format(t,...e)}${kje.EOL}`)}s(Xje,"log");var cie=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,pie,MT=[],mT=[],mC=[];cie&&hT(cie);var Aie=Object.assign(t=>lie(t),{enable:hT,enabled:zT,disable:Vje,log:Xje});function hT(t){pie=t,MT=[],mT=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?mT.push(new RegExp(`^${n.substr(1)}$`)):MT.push(new RegExp(`^${n}$`));for(let n of mC)n.enabled=zT(n.namespace)}s(hT,"enable");function zT(t){if(t.endsWith("*"))return!0;for(let e of mT)if(e.test(t))return!1;for(let e of MT)if(e.test(t))return!0;return!1}s(zT,"enabled");function Vje(){let t=pie||"";return hT(""),t}s(Vje,"disable");function lie(t){let e=Object.assign(r,{enabled:zT(t),destroy:Jje,log:Aie.log,namespace:t,extend:Yje});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return s(r,"debug"),mC.push(e),e}s(lie,"createDebugger");function Jje(){let t=mC.indexOf(this);return t>=0?(mC.splice(t,1),!0):!1}s(Jje,"destroy");function Yje(t){let e=lie(`${this.namespace}:${t}`);return e.log=this.log,e}s(Yje,"extend");var DM=Aie,die=new Set,fC=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,hC,zC=DM("azure");zC.log=(...t)=>{DM.log(...t)};var gT=["verbose","info","warning","error"];fC&&(mie(fC)?bie(fC):console.error(`AZURE_LOG_LEVEL set to unknown log level '${fC}'; logging is not enabled. Acceptable values: ${gT.join(", ")}.`));function bie(t){if(t&&!mie(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${gT.join(",")}`);hC=t;let e=[];for(let r of die)Mie(r)&&e.push(r.namespace);DM.enable(e.join(","))}s(bie,"setLogLevel");function $je(){return hC}s($je,"getLogLevel");var uie={verbose:400,info:300,warning:200,error:100};function jje(t){let e=zC.extend(t);return fie(zC,e),{error:MC(e,"error"),warning:MC(e,"warning"),info:MC(e,"info"),verbose:MC(e,"verbose")}}s(jje,"createClientLogger");function fie(t,e){e.log=(...r)=>{t.log(...r)}}s(fie,"patchLogMethod");function MC(t,e){let r=Object.assign(t.extend(e),{level:e});if(fie(t,r),Mie(r)){let n=DM.disable();DM.enable(n+","+r.namespace)}return die.add(r),r}s(MC,"createLogger");function Mie(t){return!!(hC&&uie[t.level]<=uie[hC])}s(Mie,"shouldEnable");function mie(t){return gT.includes(t)}s(mie,"isAzureLogLevel");jl.AzureLogger=zC;jl.createClientLogger=jje;jl.getLogLevel=$je;jl.setLogLevel=bie});var CT=m(IM=>{"use strict";Object.defineProperty(IM,"__esModule",{value:!0});var Kl=new WeakMap,gC=new WeakMap,qM=class t{static{s(this,"AbortSignal")}constructor(){this.onabort=null,Kl.set(this,[]),gC.set(this,!1)}get aborted(){if(!gC.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return gC.get(this)}static get none(){return new t}addEventListener(e,r){if(!Kl.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Kl.get(this).push(r)}removeEventListener(e,r){if(!Kl.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=Kl.get(this),o=n.indexOf(r);o>-1&&n.splice(o,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 zie(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=Kl.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),gC.set(t,!0)}s(zie,"abortSignal");var OT=class extends Error{static{s(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},ET=class{static{s(this,"AbortController")}constructor(e){if(this._signal=new qM,!!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(){zie(this._signal)}static timeout(e){let r=new qM,n=setTimeout(zie,e,r);return typeof n.unref=="function"&&n.unref(),r}};IM.AbortController=ET;IM.AbortError=OT;IM.AbortSignal=qM});var yie=m(p1=>{"use strict";Object.defineP
Line truncated
|
|
|
|
|
Polling from: ${r.config.operationLocation}
|
|
|
|
|
Operation status: ${p}
|
|
|
|
|
Polling status: ${F3e.includes(p)?"Stopped":"Running"}`),p==="succeeded"){let l=o(u,r);if(l!==void 0)return{response:await e(l).catch(N3e({state:r,stateProxy:s,isOperationError:a})),status:p}}return{response:u,status:p}}async function _3e(t){let{poll:e,state:r,stateProxy:s,options:n,getOperationStatus:i,getResourceLocation:o,getOperationLocation:a,isOperationError:c,withOperationLocation:u,getPollingInterval:p,processResult:l,getError:A,updateState:h,setDelay:M,isDone:g,setErrorAsResult:y}=t,{operationLocation:O}=r.config;if(O!==void 0){let{response:B,status:I}=await jy0({poll:e,getOperationStatus:i,state:r,stateProxy:s,operationLocation:O,getResourceLocation:o,isOperationError:c,options:n});if(x3e({status:I,response:B,state:r,stateProxy:s,isDone:g,processResult:l,getError:A,setErrorAsResult:y}),!F3e.includes(I)){let R=p?.(B);R&&M(R);let N=a?.(B,r);if(N!==void 0){let T=O!==N;r.config.operationLocation=N,u?.(N,T)}else u?.(O,!1)}h?.(r,B)}}function L3e(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}function P3e(t){return t.headers.location}function Q3e(t){return t.headers["operation-location"]}function k3e(t){return t.headers["azure-asyncoperation"]}function $y0(t){var e;let{location:r,requestMethod:s,requestPath:n,resourceLocationConfig:i}=t;switch(s){case"PUT":return n;case"DELETE":return;case"PATCH":return(e=o())!==null&&e!==void 0?e:n;default:return o()}function o(){switch(i){case"azure-async-operation":return;case"original-uri":return n;default:return r}}}function U3e(t){let{rawResponse:e,requestMethod:r,requestPath:s,resourceLocationConfig:n}=t,i=Q3e(e),o=k3e(e),a=L3e({operationLocation:i,azureAsyncOperation:o}),c=P3e(e),u=r?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:$y0({requestMethod:u,location:c,requestPath:s,resourceLocationConfig:n})}:c!==void 0?{mode:"ResourceLocation",operationLocation:c}:u==="PUT"&&s?{mode:"Body",operationLocation:s}:void 0}function G3e(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 xH(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 S2.verbose(`LRO: unrecognized operation status: ${e}`),e}}function Yy0(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return G3e({status:r,statusCode:t.statusCode})}function Jy0(t){var e,r;let{properties:s,provisioningState:n}=(e=t.body)!==null&&e!==void 0?e:{},i=(r=s?.provisioningState)!==null&&r!==void 0?r:n;return G3e({status:i,statusCode:t.statusCode})}function xH(t){return t===202?"running":t<300?"succeeded":"failed"}function H3e({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?Ky0(new Date(e)):r*1e3}}function X3e(t){let e=t.flatResponse.error;if(!e){S2.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){S2.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}function Ky0(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}function V3e(t){let{response:e,state:r,operationLocation:s}=t;function n(){var o;switch((o=r.config.metadata)===null||o===void 0?void 0:o.mode){case void 0:return xH(e.rawResponse.statusCode);case"Body":return WH(e,r);default:return"running"}}let i=n();return i==="running"&&s===void 0?"succeeded":i}async function Zy0(t){let{stateProxy:e,resourceLocationConfig:r,processResult:s,lro:n,setErrorAsResult:i}=t;return W3e({init:async()=>{let o=await n.sendInitialRequest(),a=U3e({rawResponse:o.rawResponse,requestPath:n.requestPath,requestMethod:n.requestMethod,resourceLocationConfig:r});return Object.assign({response:o,operationLocation:a?.operationLocation,resourceLocation:a?.resourceLocation},a?.mode?{metadata:{mode:a.mode}}:{})},stateProxy:e,processResult:s?({flatResponse:o},a)=>s(o,a):({flatResponse:o})=>o,getOperationStatus:V3e,setErrorAsResult:i})}function j3e({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r===void 0?void 0:r.mode){case"OperationLocation":return L3e({operationLocation:Q3e(t),azureAsyncOperation:k3e(t)});case"ResourceLocation":return P3e(t);default:return}}function WH({rawResponse:t},e){var r;let s=(r=e.config.metadata)===null||r===void 0?void 0:r.mode;switch(s){case"OperationLocation":return Yy0(t);case"ResourceLocation":return xH(t.statusCode);case"Body":return Jy0(t);default:throw new Error(`Internal error: Unexpected operation mode: ${s}`)}}function $3e({flatResponse:t},e){if(typeof t=="object"Line truncated
|
|
|
|
|
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(n){case 0:o=i,n=1;break;case 1:r[s++]=o<<2|(i&48)>>4,o=i,n=2;break;case 2:r[s++]=(o&15)<<4|(i&60)>>2,o=i,n=3;break;case 3:r[s++]=(o&3)<<6|i,n=0;break}}if(n==1)throw Error("invalid base64 string.");return r.subarray(0,s)}BM.base64decode=xC0;function WC0(t){let e="",r=0,s,n=0;for(let i=0;i<t.length;i++)switch(s=t[i],r){case 0:e+=ap[s>>2],n=(s&3)<<4,r=1;break;case 1:e+=ap[n|s>>4],n=(s&15)<<2,r=2;break;case 2:e+=ap[n|s>>6],e+=ap[s&63],r=0;break}return r&&(e+=ap[n],e+="=",r==1&&(e+="=")),e}BM.base64encode=WC0});var CEe=f(ow=>{"use strict";Object.defineProperty(ow,"__esModule",{value:!0});ow.utf8read=void 0;var VH=t=>String.fromCharCode.apply(String,t);function _C0(t){if(t.length<1)return"";let e=0,r=[],s=[],n=0,i,o=t.length;for(;e<o;)i=t[e++],i<128?s[n++]=i:i>191&&i<224?s[n++]=(i&31)<<6|t[e++]&63:i>239&&i<365?(i=((i&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,s[n++]=55296+(i>>10),s[n++]=56320+(i&1023)):s[n++]=(i&15)<<12|(t[e++]&63)<<6|t[e++]&63,n>8191&&(r.push(VH(s)),n=0);return r.length?(n&&r.push(VH(s.slice(0,n))),r.join("")):VH(s.slice(0,n))}ow.utf8read=_C0});var nE=f(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.WireType=mc.mergeBinaryOptions=mc.UnknownFieldHandler=void 0;var LC0;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,s,n,i,o)=>{(e(s)?s[t.symbol]:s[t.symbol]=[]).push({no:n,wireType:i,data:o})},t.onWrite=(r,s,n)=>{for(let{no:i,wireType:o,data:a}of t.list(s))n.tag(i,o).raw(a)},t.list=(r,s)=>{if(e(r)){let n=r[t.symbol];return s?n.filter(i=>i.no==s):n}return[]},t.last=(r,s)=>t.list(r,s).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(LC0=mc.UnknownFieldHandler||(mc.UnknownFieldHandler={}));function PC0(t,e){return Object.assign(Object.assign({},t),e)}mc.mergeBinaryOptions=PC0;var QC0;(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"})(QC0=mc.WireType||(mc.WireType={}))});var cw=f(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.varint32read=cn.varint32write=cn.int64toString=cn.int64fromString=cn.varint64write=cn.varint64read=void 0;function kC0(){let t=0,e=0;for(let s=0;s<28;s+=7){let n=this.buf[this.pos++];if(t|=(n&127)<<s,(n&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 s=3;s<=31;s+=7){let n=this.buf[this.pos++];if(e|=(n&127)<<s,(n&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}cn.varint64read=kC0;function UC0(t,e,r){for(let i=0;i<28;i=i+7){let o=t>>>i,a=!(!(o>>>7)&&e==0),c=(a?o|128:o)&255;if(r.push(c),!a)return}let s=t>>>28&15|(e&7)<<4,n=e>>3!=0;if(r.push((n?s|128:s)&255),!!n){for(let i=3;i<31;i=i+7){let o=e>>>i,a=!!(o>>>7),c=(a?o|128:o)&255;if(r.push(c),!a)return}r.push(e>>>31&1)}}cn.varint64write=UC0;var aw=65536*65536;function GC0(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,s=0,n=0;function i(o,a){let c=Number(t.slice(o,a));n*=r,s=s*r+c,s>=aw&&(n=n+(s/aw|0),s=s%aw)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,s,n]}cn.int64fromString=GC0;function HC0(t,e){if(e>>>0<=2097151)return""+(aw*e+(t>>>0));let r=t&16777215,s=(t>>>24|e<<8)>>>0&16777215,n=e>>16&65535,i=r+s*6777216+n*6710656,o=s+n*8147497,a=n*2,c=1e7;i>=c&&(o+=Math.floor(i/c),i%=c),o>=c&&(a+=Math.floor(o/c),o%=c);function u(p,l){let A=p?String(p):"";return l?"0000000".slice(A.length)+A:A}return u(a,0)+u(o,a)+u(i,1)}cn.int64toString=HC0;function XC0(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)}}cn.varint32write=XC0;function VC0(){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}cn.varint32read=VC0});var hA=f(fA=>{"use strict";Object.defineProperty(fA,"__esModule",{value:!0});fA.PbLong=fA.PbULong=fA.detectBi=void 0;var iE=cw(),$0;function BEe(){let t=new DataView(new ArrayBuffer(8));$0=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("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}fA.detectBi=BEe;BEe();function DEe(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var qEe=/^-?[0-9]+$/,pw=4294967296,uw=2147483648,lw=c
Line truncated
|
|
|
|
|
`)}};Tw.RpcError=zX});var EX=f(Ww=>{"use strict";Object.defineProperty(Ww,"__esModule",{value:!0});Ww.mergeRpcOptions=void 0;var sye=i1();function hB0(t,e){if(!e)return t;let r={};xw(t,r),xw(e,r);for(let s of Object.keys(e)){let n=e[s];switch(s){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={},xw(t.meta,r.meta),xw(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(n):n.concat();break}}return r}Ww.mergeRpcOptions=hB0;function xw(t,e){if(!t)return;let r=e;for(let[s,n]of Object.entries(t))n instanceof Date?r[s]=new Date(n.getTime()):Array.isArray(n)?r[s]=n.concat():r[s]=n}});var CX=f(x2=>{"use strict";Object.defineProperty(x2,"__esModule",{value:!0});x2.Deferred=x2.DeferredState=void 0;var Oc;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(Oc=x2.DeferredState||(x2.DeferredState={}));var yX=class{constructor(e=!0){this._state=Oc.PENDING,this._promise=new Promise((r,s)=>{this._resolve=r,this._reject=s}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==Oc.PENDING)throw new Error(`cannot resolve ${Oc[this.state].toLowerCase()}`);this._resolve(e),this._state=Oc.RESOLVED}reject(e){if(this.state!==Oc.PENDING)throw new Error(`cannot reject ${Oc[this.state].toLowerCase()}`);this._reject(e),this._state=Oc.REJECTED}resolvePending(e){this._state===Oc.PENDING&&this.resolve(e)}rejectPending(e){this._state===Oc.PENDING&&this.reject(e)}};x2.Deferred=yX});var DX=f(_w=>{"use strict";Object.defineProperty(_w,"__esModule",{value:!0});_w.RpcOutputStreamController=void 0;var nye=CX(),W2=i1(),BX=class{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 s=r.indexOf(e);s>=0&&r.splice(s,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,s){W2.assert((e?1:0)+(r?1:0)+(s?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),s&&this.notifyComplete()}notifyMessage(e){W2.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){W2.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(){W2.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:()=>{let e=this._itState;W2.assert(e,"bad state"),W2.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 nye.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let s=r.p;W2.assert(s.state==nye.DeferredState.PENDING,"iterator contract broken"),"value"in e?s.resolve(e):s.reject(e),delete r.p}else r.q.push(e)}};_w.RpcOutputStreamController=BX});var IX=f(NM=>{"use strict";var bB0=NM&&NM.__awaiter||function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};Object.defineProperty(NM,"__esModule",{value:!0});NM.UnaryCall=void 0;var qX=class{constructor(e,r,s,n,i,o,a){this.method=e,this.requestHeaders=r,this.request=s,this.headers=n,this.response=i,this.status=o,this.trailers=a}then(e,r){return this.promiseFinished().then(s=>e?Promise.resolve(e(s)):s,s=>r?Promise.resolve(r(s)):Promise.reject(s))}promiseFinished(){return bB0(this,void 0,void 0,function*(){let[e,r,s,n]=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:s,trailers:n}})}};NM.UnaryCall=qX});var wX=f(vM=>{"use strict";var MB0=vM&&vM.__awaiter||function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};Object.defineProperty(vM,"__esModule",{value:!0});vM.ServerStreamingCall=void 0;var RX=class{constructor(e
Line truncated
|
|
|
|
|
Operation status: ${A}
|
|
|
|
|
Polling status: ${Iie.includes(A)?"Stopped":"Running"}`),A==="succeeded"){let l=a(p,r);if(l!==void 0)return{response:await e(l).catch(Die({state:r,stateProxy:n,isOperationError:c})),status:A}}return{response:p,status:A}}s(qKe,"pollOperationHelper");async function Sie(t){let{poll:e,state:r,stateProxy:n,options:o,getOperationStatus:i,getResourceLocation:a,getOperationLocation:c,isOperationError:u,withOperationLocation:p,getPollingInterval:A,processResult:l,getError:b,updateState:M,setDelay:z,isDone:g,setErrorAsResult:C}=t,{operationLocation:E}=r.config;if(E!==void 0){let{response:B,status:D}=await qKe({poll:e,getOperationStatus:i,state:r,stateProxy:n,operationLocation:E,getResourceLocation:a,isOperationError:u,options:o});if(Nie({status:D,response:B,state:r,stateProxy:n,isDone:g,processResult:l,getError:b,setErrorAsResult:C}),!Iie.includes(D)){let q=A?.(B);q&&z(q);let x=c?.(B,r);if(x!==void 0){let W=E!==x;r.config.operationLocation=x,p?.(x,W)}else p?.(E,!1)}M?.(r,B)}}s(Sie,"pollOperation");function Fie(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}s(Fie,"getOperationLocationPollingUrl");function Wie(t){return t.headers.location}s(Wie,"getLocationHeader");function xie(t){return t.headers["operation-location"]}s(xie,"getOperationLocationHeader");function Tie(t){return t.headers["azure-asyncoperation"]}s(Tie,"getAzureAsyncOperationHeader");function IKe(t){var e;let{location:r,requestMethod:n,requestPath:o,resourceLocationConfig:i}=t;switch(n){case"PUT":return o;case"DELETE":return;case"PATCH":return(e=a())!==null&&e!==void 0?e:o;default:return a()}function a(){switch(i){case"azure-async-operation":return;case"original-uri":return o;default:return r}}s(a,"getDefault")}s(IKe,"findResourceLocation");function vie(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:o}=t,i=xie(e),a=Tie(e),c=Fie({operationLocation:i,azureAsyncOperation:a}),u=Wie(e),p=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:IKe({requestMethod:p,location:u,requestPath:n,resourceLocationConfig:o})}:u!==void 0?{mode:"ResourceLocation",operationLocation:u}:p==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}s(vie,"inferLroMode");function Lie(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 WT(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 op.verbose(`LRO: unrecognized operation status: ${e}`),e}}s(Lie,"transformStatus");function RKe(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return Lie({status:r,statusCode:t.statusCode})}s(RKe,"getStatus");function NKe(t){var e,r;let{properties:n,provisioningState:o}=(e=t.body)!==null&&e!==void 0?e:{},i=(r=n?.provisioningState)!==null&&r!==void 0?r:o;return Lie({status:i,statusCode:t.statusCode})}s(NKe,"getProvisioningState");function WT(t){return t===202?"running":t<300?"succeeded":"failed"}s(WT,"toOperationStatus");function _ie({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?wKe(new Date(e)):r*1e3}}s(_ie,"parseRetryAfter");function Qie(t){let e=t.flatResponse.error;if(!e){op.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){op.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}s(Qie,"getErrorFromResponse");function wKe(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}s(wKe,"calculatePollingIntervalFromDate");function Pie(t){let{response:e,state:r,operationLocation:n}=t;function o(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return WT(e.rawResponse.statusCode);case"Body":return xT(e,r);default:return"running"}}s(o,"helper");let i=o();return i==="running"&&n===void 0?"succeeded":i}s(Pie,"getStatusFromInitialResponse");async function SKe(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:o,setErrorAsResult:i}=t;return wie({init:s(async()=>{let a=await o.sendInitialRequest(),c=vie({rawResponse:a.rawResponse,requestPath:o.requestPath,requestMethod:o.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:Pie,setErrorAsResult:i})}s(SKe,"initHttpOperation");function kie({rawResponse:t},e){var r;switchLine truncated
|
|
|
|
|
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(o){case 0:a=i,o=1;break;case 1:r[n++]=a<<2|(i&48)>>4,a=i,o=2;break;case 2:r[n++]=(a&15)<<4|(i&60)>>2,a=i,o=3;break;case 3:r[n++]=(a&3)<<6|i,o=0;break}}if(o==1)throw Error("invalid base64 string.");return r.subarray(0,n)}s(fZe,"base64decode");o2.base64decode=fZe;function MZe(t){let e="",r=0,n,o=0;for(let i=0;i<t.length;i++)switch(n=t[i],r){case 0:e+=na[n>>2],o=(n&3)<<4,r=1;break;case 1:e+=na[o|n>>4],o=(n&15)<<2,r=2;break;case 2:e+=na[o|n>>6],e+=na[n&63],r=0;break}return r&&(e+=na[o],e+="=",r==1&&(e+="=")),e}s(MZe,"base64encode");o2.base64encode=MZe});var Ose=m(_C=>{"use strict";Object.defineProperty(_C,"__esModule",{value:!0});_C.utf8read=void 0;var XT=s(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function mZe(t){if(t.length<1)return"";let e=0,r=[],n=[],o=0,i,a=t.length;for(;e<a;)i=t[e++],i<128?n[o++]=i:i>191&&i<224?n[o++]=(i&31)<<6|t[e++]&63:i>239&&i<365?(i=((i&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[o++]=55296+(i>>10),n[o++]=56320+(i&1023)):n[o++]=(i&15)<<12|(t[e++]&63)<<6|t[e++]&63,o>8191&&(r.push(XT(n)),o=0);return r.length?(o&&r.push(XT(n.slice(0,o))),r.join("")):XT(n.slice(0,o))}s(mZe,"utf8read");_C.utf8read=mZe});var TM=m(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.WireType=Ti.mergeBinaryOptions=Ti.UnknownFieldHandler=void 0;var hZe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,o,i,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:o,wireType:i,data:a})},t.onWrite=(r,n,o)=>{for(let{no:i,wireType:a,data:c}of t.list(n))o.tag(i,a).raw(c)},t.list=(r,n)=>{if(e(r)){let o=r[t.symbol];return n?o.filter(i=>i.no==n):o}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=s(r=>r&&Array.isArray(r[t.symbol]),"is")})(hZe=Ti.UnknownFieldHandler||(Ti.UnknownFieldHandler={}));function zZe(t,e){return Object.assign(Object.assign({},t),e)}s(zZe,"mergeBinaryOptions");Ti.mergeBinaryOptions=zZe;var gZe;(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"})(gZe=Ti.WireType||(Ti.WireType={}))});var PC=m(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.varint32read=Mr.varint32write=Mr.int64toString=Mr.int64fromString=Mr.varint64write=Mr.varint64read=void 0;function OZe(){let t=0,e=0;for(let n=0;n<28;n+=7){let o=this.buf[this.pos++];if(t|=(o&127)<<n,(o&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 o=this.buf[this.pos++];if(e|=(o&127)<<n,(o&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}s(OZe,"varint64read");Mr.varint64read=OZe;function EZe(t,e,r){for(let i=0;i<28;i=i+7){let a=t>>>i,c=!(!(a>>>7)&&e==0),u=(c?a|128:a)&255;if(r.push(u),!c)return}let n=t>>>28&15|(e&7)<<4,o=e>>3!=0;if(r.push((o?n|128:n)&255),!!o){for(let i=3;i<31;i=i+7){let a=e>>>i,c=!!(a>>>7),u=(c?a|128:a)&255;if(r.push(u),!c)return}r.push(e>>>31&1)}}s(EZe,"varint64write");Mr.varint64write=EZe;var QC=65536*65536;function CZe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,o=0;function i(a,c){let u=Number(t.slice(a,c));o*=r,n=n*r+u,n>=QC&&(o=o+(n/QC|0),n=n%QC)}return s(i,"add1e6digit"),i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,n,o]}s(CZe,"int64fromString");Mr.int64fromString=CZe;function yZe(t,e){if(e>>>0<=2097151)return""+(QC*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,o=e>>16&65535,i=r+n*6777216+o*6710656,a=n+o*8147497,c=o*2,u=1e7;i>=u&&(a+=Math.floor(i/u),i%=u),a>=u&&(c+=Math.floor(a/u),a%=u);function p(A,l){let b=A?String(A):"";return l?"0000000".slice(b.length)+b:b}return s(p,"decimalFrom1e7"),p(c,0)+p(a,c)+p(i,1)}s(yZe,"int64toString");Mr.int64toString=yZe;function BZe(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)}}s(BZe,"varint32write");Mr.varint32write=BZe;function DZe(){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}s(DZe,"varint32read");Mr.varint32read=DZe});var zc=m(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.PbLong=hc.PbULong=hc.detectBi=void 0;var vM=PC(),D0;function Ese(){let t=new DataView(new ArrayBuffer(8));D0=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
|
|
|
|
|
`)}};by.RpcError=zv});var Ov=m(My=>{"use strict";Object.defineProperty(My,"__esModule",{value:!0});My.mergeRpcOptions=void 0;var eae=D1();function Je0(t,e){if(!e)return t;let r={};fy(t,r),fy(e,r);for(let n of Object.keys(e)){let o=e[n];switch(n){case"jsonOptions":r.jsonOptions=eae.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=eae.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},fy(t.meta,r.meta),fy(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(o):o.concat();break}}return r}s(Je0,"mergeRpcOptions");My.mergeRpcOptions=Je0;function fy(t,e){if(!t)return;let r=e;for(let[n,o]of Object.entries(t))o instanceof Date?r[n]=new Date(o.getTime()):Array.isArray(o)?r[n]=o.concat():r[n]=o}s(fy,"copy")});var Cv=m(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.Deferred=up.DeferredState=void 0;var _i;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(_i=up.DeferredState||(up.DeferredState={}));var Ev=class{static{s(this,"Deferred")}constructor(e=!0){this._state=_i.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!==_i.PENDING)throw new Error(`cannot resolve ${_i[this.state].toLowerCase()}`);this._resolve(e),this._state=_i.RESOLVED}reject(e){if(this.state!==_i.PENDING)throw new Error(`cannot reject ${_i[this.state].toLowerCase()}`);this._reject(e),this._state=_i.REJECTED}resolvePending(e){this._state===_i.PENDING&&this.resolve(e)}rejectPending(e){this._state===_i.PENDING&&this.reject(e)}};up.Deferred=Ev});var Bv=m(my=>{"use strict";Object.defineProperty(my,"__esModule",{value:!0});my.RpcOutputStreamController=void 0;var tae=Cv(),pp=D1(),yv=class{static{s(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){pp.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){pp.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){pp.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(){pp.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:s(()=>{let e=this._itState;pp.assert(e,"bad state"),pp.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 tae.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;pp.assert(n.state==tae.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};my.RpcOutputStreamController=yv});var qv=m(A2=>{"use strict";var Ye0=A2&&A2.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})};Object.defineProperty(A2,"__esModule",{value:!0});A2.UnaryCall=void 0;var Dv=class{static{s(this,"UnaryCall")}constructor(e,r,n,o,i,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=o,this.response=i,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 Ye0(this,void 0,void 0,function*(){let[e,r,n,o]=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:o}})}};A2.UnaryCall=Dv});var Rv=m(l2=>{"use strict";var $e0=l2&&l2.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(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`))}function _w0(){Object.keys(FS).forEach(function(t){delete FS[t]})}});var xS=f(Bc=>{"use strict";Bc.__esModule=!0;Bc.HandlebarsEnvironment=mj;function oDe(t){return t&&t.__esModule?t:{default:t}}var X2=Es(),Lw0=si(),bj=oDe(Lw0),Pw0=Aj(),Qw0=rDe(),kw0=fj(),TS=oDe(kw0),Uw0=hj(),Gw0="4.7.9";Bc.VERSION=Gw0;var Hw0=8;Bc.COMPILER_REVISION=Hw0;var Xw0=7;Bc.LAST_COMPATIBLE_COMPILER_REVISION=Xw0;var Vw0={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"};Bc.REVISION_CHANGES=Vw0;var Mj="[object Object]";function mj(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Pw0.registerDefaultHelpers(this),Qw0.registerDefaultDecorators(this)}mj.prototype={constructor:mj,logger:TS.default,log:TS.default.log,registerHelper:function(e,r){if(X2.toString.call(e)===Mj){if(r)throw new bj.default("Arg not supported with multiple helpers");X2.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(X2.toString.call(e)===Mj)X2.extend(this.partials,e);else{if(typeof r>"u")throw new bj.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(X2.toString.call(e)===Mj){if(r)throw new bj.default("Arg not supported with multiple decorators");X2.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Uw0.resetLoggedProperties()}};var jw0=TS.default.log;Bc.log=jw0;Bc.createFrame=X2.createFrame;Bc.logger=TS.default});var cDe=f((WS,aDe)=>{"use strict";WS.__esModule=!0;function gj(t){this.string=t}gj.prototype.toString=gj.prototype.toHTML=function(){return""+this.string};WS.default=gj;aDe.exports=WS.default});var uDe=f(zj=>{"use strict";zj.__esModule=!0;zj.wrapHelper=$w0;function $w0(t,e){if(typeof t!="function")return t;var r=function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=e(n),t.apply(this,arguments)};return r}});var hDe=f(OA=>{"use strict";OA.__esModule=!0;OA.checkRevision=tS0;OA.template=rS0;OA.wrapProgram=_S;OA.resolvePartial=sS0;OA.invokePartial=nS0;OA.noop=dDe;function Yw0(t){return t&&t.__esModule?t:{default:t}}function Jw0(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var Kw0=Es(),$M=Jw0(Kw0),Zw0=si(),Ap=Yw0(Zw0),dp=xS(),pDe=Aj(),eS0=uDe(),lDe=hj();function tS0(t){var e=t&&t[0]||1,r=dp.COMPILER_REVISION;if(!(e>=dp.LAST_COMPATIBLE_COMPILER_REVISION&&e<=dp.COMPILER_REVISION))if(e<dp.LAST_COMPATIBLE_COMPILER_REVISION){var s=dp.REVISION_CHANGES[r],n=dp.REVISION_CHANGES[e];throw new Ap.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+n+").")}else throw new Ap.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function rS0(t,e){if(!e)throw new Ap.default("No environment passed to template");if(!t||!t.main)throw new Ap.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function s(o,a,c){c.hash&&(a=$M.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),o=e.VM.resolvePartial.call(this,o,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var u=e.VM.invokePartial.call(this,o,a,c);if(u==null&&e.compile&&(c.partials[c.name]=e.compile(o,t.compilerOptions,e),u=c.partials[c.name](a,c)),u!=null){if(c.indent){for(var p=u.split(`
|
|
|
|
|
`),l=0,A=p.length;l<A&&!(!p[l]&&l+1===A);l++)p[l]=c.indent+p[l];u=p.join(`
|
|
|
|
|
`)}return u}else throw new Ap.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var n={strict:function(a,c,u){if(!a||!(c in a))throw new Ap.default('"'+c+'" not defined in '+a,{loc:u});return n.lookupProperty(a,c)},lookupProperty:function(a,c){var u=a[c];if(u==null||Object.prototype.hasOwnProperty.call(a,c)||lDe.resultIsAllowed(u,n.protoAccessControl,c))return u},lookup:function(a,c){for(var u=a.length,p=0;p<u;p++){var l=a[p]&&n.lookupProperty(a[p],c);if(l!=null)return l}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:$M.escapeExpression,invokePartial:s,fn:function(a){var c=t[a];return c.decorator=t[a+"_d"],c},programs:[],program:function(a,c,u,p,l){var A=this.programs[a],h=this.fn(a);return c||l||p||u?A=_S(this,a,h,c,u,p,l):A||(A=this.programs[a]=_S(this,a,h)),A},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var u=a||c;return a&&c&&a!==c&&(u=$M.extend({},c,a)),u},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function i(o){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;i._setup(a),!a.partial&&t.useData&&(c=iS0(o,c));var u=void 0,p=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?u=o!=a.depths[0]?[o].concat(a.depths):a.depths:u=[o]);function l(A){return""+t.main(n,A,n.helpers,n.partials,c,p,u)}return l=fDe(t.main,l,n,a.depths||[],c,p),l(o,a)}return i.isTop=!0,i._setup=function(o){if(o.partial)n.protoAccessControl=o.protoAccessControl,n.helpers=o.helpers,n.partials=o.partials,n.decorators=o.decorators,n.hooks=o.hooks;else{var a={};ADe(a,e.helpers,n),ADe(a,o.helpers,n),n.helpers=a,t.usePartial&&(n.partials=n.mergeIfNeeded(o.partials,e.partials)),(t.usePartial||t.useDecorators)&&(n.decorators=$M.extend({},e.decorators,o.decorators)),n.hooks={},n.protoAccessControl=lDe.createProtoAccessControl(o);var c=o.allowCallsToHelperMissing||r;pDe.moveHelperToHooks(n,"helperMissing",c),pDe.moveHelperToHooks(n,"blockHelperMissing",c)}},i._child=function(o,a,c,u){if(t.useBlockParams&&!c)throw new Ap.default("must pass block params");if(t.useDepths&&!u)throw new Ap.default("must pass parent depths");return _S(n,o,t[o],a,0,c,u)},i}function _S(t,e,r,s,n,i,o){function a(c){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=o;return o&&c!=o[0]&&!(c===t.nullContext&&o[0]===null)&&(p=[c].concat(o)),r(t,c,t.helpers,t.partials,u.data||s,i&&[u.blockParams].concat(i),p)}return a=fDe(r,a,t,o,s,i),a.program=e,a.depth=o?o.length:0,a.blockParams=n||0,a}function sS0(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=LS(r.partials,t)):r.name==="@partial-block"?t=LS(r.data,"partial-block"):t=LS(r.partials,r.name),t}function nS0(t,e,r){var s=LS(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var n=void 0;if(r.fn&&r.fn!==dDe&&(function(){r.data=dp.createFrame(r.data);var i=r.fn;n=r.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=dp.createFrame(c.data),c.data["partial-block"]=s,i(a,c)},i.partials&&(r.partials=$M.extend({},r.partials,i.partials))})(),t===void 0&&n&&(t=n),t===void 0)throw new Ap.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function dDe(){return""}function LS(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function iS0(t,e){return(!e||!("root"in e))&&(e=e?dp.createFrame(e):{},e.root=t),e}function fDe(t,e,r,s,n,i){if(t.decorator){var o={};e=t.decorator(e,o,r,s&&s[0],n,i,s),$M.extend(e,o)}return e}function ADe(t,e,r){e&&Object.keys(e).forEach(function(s){var n=e[s];t[s]=oS0(n,r)})}function oS0(t,e){var r=e.lookupProperty;return eS0.wrapHelper(t,function(s){return s.lookupProperty=r,s})}});var Oj=f((PS,bDe)=>{"use strict";PS.__esModule=!0;PS.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}};bDe.exports=PS.default});var ODe=f((QS,zDe)=>{"use strict";QS.__esModule=!0;function yj(t){return t&&t.__esModule?t:{default:t}}function Cj(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var aS0=xS(),MDe=Cj(aS0),cS0=cDe(),uS0=yj(cS0),pS0=si(),lS0=yj(pS0),AS0=Es(),Ej=Cj(AS0),dS0=hDe(),mDe=Cj(dS0),fS0=Oj(),hS0=yj(fS0);function gDe(){var t=new MDe.HandlebarsEnvironment;return Ej.extend(t,MDe),t.SafeString=uS0.default,t.Exception=lS0.default,t.Utils=Ej,t.escapeExpression=Ej.escapeExpression,t.VM=mDe,t.template=function(e){return mDe.template(e,t)},t}var FE=gDe();FE.create=gDe;hS0.default(FE);FE.default=FE;QS.default=FE;zDe.exports=QS.default});var Bj=f((kS,yDe)=>{"use strict";kS.__esModule=!0;var EDe={helpers:{helperExpression:function(e){return e.type==="
Line truncated
|
|
|
|
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}s(Ei0,"logUnexpecedPropertyAccessOnce");function Ci0(){Object.keys(f4).forEach(function(t){delete f4[t]})}s(Ci0,"resetLoggedProperties")});var m4=m(Ui=>{"use strict";Ui.__esModule=!0;Ui.HandlebarsEnvironment=z_;function dAe(t){return t&&t.__esModule?t:{default:t}}s(dAe,"_interopRequireDefault");var Op=$t(),yi0=sn(),m_=dAe(yi0),Bi0=d_(),Di0=uAe(),qi0=f_(),M4=dAe(qi0),Ii0=M_(),Ri0="4.7.9";Ui.VERSION=Ri0;var Ni0=8;Ui.COMPILER_REVISION=Ni0;var wi0=7;Ui.LAST_COMPATIBLE_COMPILER_REVISION=wi0;var Si0={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"};Ui.REVISION_CHANGES=Si0;var h_="[object Object]";function z_(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Bi0.registerDefaultHelpers(this),Di0.registerDefaultDecorators(this)}s(z_,"HandlebarsEnvironment");z_.prototype={constructor:z_,logger:M4.default,log:M4.default.log,registerHelper:s(function(e,r){if(Op.toString.call(e)===h_){if(r)throw new m_.default("Arg not supported with multiple helpers");Op.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:s(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:s(function(e,r){if(Op.toString.call(e)===h_)Op.extend(this.partials,e);else{if(typeof r>"u")throw new m_.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:s(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:s(function(e,r){if(Op.toString.call(e)===h_){if(r)throw new m_.default("Arg not supported with multiple decorators");Op.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:s(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:s(function(){Ii0.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var Fi0=M4.default.log;Ui.log=Fi0;Ui.createFrame=Op.createFrame;Ui.logger=M4.default});var fAe=m((h4,bAe)=>{"use strict";h4.__esModule=!0;function g_(t){this.string=t}s(g_,"SafeString");g_.prototype.toString=g_.prototype.toHTML=function(){return""+this.string};h4.default=g_;bAe.exports=h4.default});var MAe=m(O_=>{"use strict";O_.__esModule=!0;O_.wrapHelper=Wi0;function Wi0(t,e){if(typeof t!="function")return t;var r=s(function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=e(o),t.apply(this,arguments)},"wrapper");return r}s(Wi0,"wrapHelper")});var EAe=m(Bc=>{"use strict";Bc.__esModule=!0;Bc.checkRevision=Qi0;Bc.template=Pi0;Bc.wrapProgram=z4;Bc.resolvePartial=ki0;Bc.invokePartial=Ui0;Bc.noop=gAe;function xi0(t){return t&&t.__esModule?t:{default:t}}s(xi0,"_interopRequireDefault");function Ti0(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}s(Ti0,"_interopRequireWildcard");var vi0=$t(),q2=Ti0(vi0),Li0=sn(),ca=xi0(Li0),ua=m4(),mAe=d_(),_i0=MAe(),hAe=M_();function Qi0(t){var e=t&&t[0]||1,r=ua.COMPILER_REVISION;if(!(e>=ua.LAST_COMPATIBLE_COMPILER_REVISION&&e<=ua.COMPILER_REVISION))if(e<ua.LAST_COMPATIBLE_COMPILER_REVISION){var n=ua.REVISION_CHANGES[r],o=ua.REVISION_CHANGES[e];throw new ca.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 ("+o+").")}else throw new ca.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}s(Qi0,"checkRevision");function Pi0(t,e){if(!e)throw new ca.default("No environment passed to template");if(!t||!t.main)throw new ca.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,u){u.hash&&(c=q2.extend({},c,u.hash),u.ids&&(u.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,c,u),u.hooks=this.hooks,u.protoAccessControl=this.protoAccessControl;var p=e.VM.invokePartial.call(this,a,c,u);if(p==null&&e.compile&&(u.partials[u.name]=e.compile(a,t.compilerOptions,e),p=u.partials[u.name](c,u)),p!=null){if(u.indent){for(var A=p.split(`
|
|
|
|
|
`),l=0,b=A.length;l<b&&!(!A[l]&&l+1===b);l++)A[l]=u.indent+A[l];p=A.join(`
|
|
|
|
|
`)}return p}else throw new ca.default("The partial "+u.name+" could not be compiled when running in runtime-only mode")}s(n,"invokePartialWrapper");var o={strict:s(function(c,u,p){if(!c||!(u in c))throw new ca.default('"'+u+'" not defined in '+c,{loc:p});return o.lookupProperty(c,u)},"strict"),lookupProperty:s(function(c,u){var p=c[u];if(p==null||Object.prototype.hasOwnProperty.call(c,u)||hAe.resultIsAllowed(p,o.protoAccessControl,u))return p},"lookupProperty"),lookup:s(function(c,u){for(var p=c.length,A=0;A<p;A++){var l=c[A]&&o.lookupProperty(c[A],u);if(l!=null)return l}},"lookup"),lambda:s(function(c,u){return typeof c=="function"?c.call(u):c},"lambda"),escapeExpression:q2.escapeExpression,invokePartial:n,fn:s(function(c){var u=t[c];return u.decorator=t[c+"_d"],u},"fn"),programs:[],program:s(function(c,u,p,A,l){var b=this.programs[c],M=this.fn(c);return u||l||A||p?b=z4(this,c,M,u,p,A,l):b||(b=this.programs[c]=z4(this,c,M)),b},"program"),data:s(function(c,u){for(;c&&u--;)c=c._parent;return c},"data"),mergeIfNeeded:s(function(c,u){var p=c||u;return c&&u&&c!==u&&(p=q2.extend({},u,c)),p},"mergeIfNeeded"),nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function i(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],u=c.data;i._setup(c),!c.partial&&t.useData&&(u=Gi0(a,u));var p=void 0,A=t.useBlockParams?[]:void 0;t.useDepths&&(c.depths?p=a!=c.depths[0]?[a].concat(c.depths):c.depths:p=[a]);function l(b){return""+t.main(o,b,o.helpers,o.partials,u,A,p)}return s(l,"main"),l=OAe(t.main,l,o,c.depths||[],u,A),l(a,c)}return s(i,"ret"),i.isTop=!0,i._setup=function(a){if(a.partial)o.protoAccessControl=a.protoAccessControl,o.helpers=a.helpers,o.partials=a.partials,o.decorators=a.decorators,o.hooks=a.hooks;else{var c={};zAe(c,e.helpers,o),zAe(c,a.helpers,o),o.helpers=c,t.usePartial&&(o.partials=o.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(o.decorators=q2.extend({},e.decorators,a.decorators)),o.hooks={},o.protoAccessControl=hAe.createProtoAccessControl(a);var u=a.allowCallsToHelperMissing||r;mAe.moveHelperToHooks(o,"helperMissing",u),mAe.moveHelperToHooks(o,"blockHelperMissing",u)}},i._child=function(a,c,u,p){if(t.useBlockParams&&!u)throw new ca.default("must pass block params");if(t.useDepths&&!p)throw new ca.default("must pass parent depths");return z4(o,a,t[a],c,0,u,p)},i}s(Pi0,"template");function z4(t,e,r,n,o,i,a){function c(u){var p=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],A=a;return a&&u!=a[0]&&!(u===t.nullContext&&a[0]===null)&&(A=[u].concat(a)),r(t,u,t.helpers,t.partials,p.data||n,i&&[p.blockParams].concat(i),A)}return s(c,"prog"),c=OAe(r,c,t,a,n,i),c.program=e,c.depth=a?a.length:0,c.blockParams=o||0,c}s(z4,"wrapProgram");function ki0(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=g4(r.partials,t)):r.name==="@partial-block"?t=g4(r.data,"partial-block"):t=g4(r.partials,r.name),t}s(ki0,"resolvePartial");function Ui0(t,e,r){var n=g4(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var o=void 0;if(r.fn&&r.fn!==gAe&&(function(){r.data=ua.createFrame(r.data);var i=r.fn;o=r.data["partial-block"]=s(function(c){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return u.data=ua.createFrame(u.data),u.data["partial-block"]=n,i(c,u)},"partialBlockWrapper"),i.partials&&(r.partials=q2.extend({},r.partials,i.partials))})(),t===void 0&&o&&(t=o),t===void 0)throw new ca.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}s(Ui0,"invokePartial");function gAe(){return""}s(gAe,"noop");function g4(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}s(g4,"lookupOwnProperty");function Gi0(t,e){return(!e||!("root"in e))&&(e=e?ua.createFrame(e):{},e.root=t),e}s(Gi0,"initData");function OAe(t,e,r,n,o,i){if(t.decorator){var a={};e=t.decorator(e,a,r,n&&n[0],o,i,n),q2.extend(e,a)}return e}s(OAe,"executeDecorators");function zAe(t,e,r){e&&Object.keys(e).forEach(function(n){var o=e[n];t[n]=Hi0(o,r)})}s(zAe,"addHelpers");function Hi0(t,e){var r=e.lookupProperty;return _i0.wrapHelper(t,function(n){return n.lookupProperty=r,n})}s(Hi0,"passLookupPropertyOption")});var E_=m((O4,CAe)=>{"use strict";O4.__esModule=!0;O4.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}};CAe.exports=O4.default});var IAe=m((E4,qAe)=>{"use strict";E4.__esModule=!0;function y_(t){return t&&t.__esModule?t:{default:t}}s(y_,"_interopRequireDefault");function B_(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}s(B_,"_interopRequireWildcard");var Xi0=m4(),yAe=B_(Xi0),Vi0=fAe(),Ji0=y_(Vi0),Yi0=sn(),$i0=y_(Yi0),ji0=$t(),C_=B_(ji0),Ki0=EAe
Line truncated
|
|
|
|
|
`+this.lexer.showPosition()+`
|
|
|
|
|
Expecting `+Ne.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Ge="Parse error on line "+(l+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(Ge,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:y,expected:Ne})}}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+R);switch(W[0]){case 1:o.push(R),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),o.push(W[1]),R=null,N?(R=N,N=null):(A=this.lexer.yyleng,p=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,h>0&&h--);break;case 2:if(we=this.productions_[W[1]][1],Fe.$=a[a.length-we],Fe._$={first_line:c[c.length-(we||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(we||1)].first_column,last_column:c[c.length-1].last_column},O&&(Fe._$.range=[c[c.length-(we||1)].range[0],c[c.length-1].range[1]]),ge=this.performAction.call(Fe,p,A,l,this.yy,W[1],a,c),typeof ge<"u")return ge;we&&(o=o.slice(0,-1*we*2),a=a.slice(0,-1*we),c=c.slice(0,-1*we)),o.push(this.productions_[W[1]][0]),a.push(Fe.$),c.push(Fe._$),J=u[o[o.length-2]][o[o.length-1]],o.push(J);break;case 3:return!0}}return!0}},e=(function(){var s={EOF:1,parseError:function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},setInput:function(i){return this._input=i,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},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var o=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o-1),this.offset-=o;var c=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),a.length-1&&(this.yylineno-=a.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:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-o]),this},more:function(){return this._more=!0,this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
|
|
|
`+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,a,c,u,p;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),A=0;A<l.length&&(a=this._input.match(this.rules[l[A]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,c=A,!this.options.flex)));A++);return o?(p=o[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],i=this.performAction.call(this,this.yy,this,l[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return typeof i<"u"?i:this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(i){this.begin(i)}};return s.options={},s.performAction=function(i,o,a,c){function u(l,A){return o.yytext=o.yytext.substring(l,o.yyleng-A+l)}var p=c;switch(a){case 0:if(o.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):o.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),o.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(o.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 o.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return o.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 o.yytext=o.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},s.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],s.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}},s})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();US.default=bS0;CDe.exports=US.default});var VS=f((XS,IDe)=>{"use strict";XS.__esModule=!0;function MS0(t){return t&&t.__esModule?t:{default:t}}var mS0=si(),Dj=MS0(mS0);function GS(){this.parents=[]}GS.prototype={constructor:GS,mutating:!1,acceptKey:function(e,r){var s=this.accept(e[r]);if(this.mutating){if(s&&!GS.prototype[s.type])throw new Dj.default('Unexpected node type "'+s.type+'" found when accepting '+r+" on "+e.type);e[r]=s}},acceptRequired:function(e,r){if(this.acceptKey(e,r),!e[r])throw new Dj.default(e.type+" requires "+r)},acceptArray:function(e){for(var r=0,s=e.length;r<s;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,s--)},accept:function(e){if(e){if(!this[e.type])throw new Dj.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}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:HS,Decorator:HS,BlockStatement:DDe,DecoratorBlock:DDe,PartialStatement:qDe,PartialBlockStatement:function(e){qDe.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:HS,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}};function HS(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function
Line truncated
|
|
|
|
|
`])}),e},each:function(e){for(var r=0,s=this.source.length;r<s;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new Y2(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Y2?e:(e=jj(e,this,r),new Y2(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,s){return s=this.generateList(s),this.wrap([e,r?"."+r+"(":"(",s,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,s=[];Object.keys(e).forEach(function(i){var o=jj(e[i],r);o!=="undefined"&&s.push([r.quotedString(i),":",o])});var n=this.generateList(s);return n.prepend("{"),n.add("}"),n},generateList:function(e){for(var r=this.empty(),s=0,n=e.length;s<n;s++)s&&r.add(","),r.add(jj(e[s],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};tN.default=uqe;pqe.exports=tN.default});var bqe=f((rN,hqe)=>{"use strict";rN.__esModule=!0;function fqe(t){return t&&t.__esModule?t:{default:t}}var Aqe=xS(),hN0=si(),Yj=fqe(hN0),bN0=Es(),MN0=lqe(),dqe=fqe(MN0);function tm(t){this.value=t}function rm(){}rm.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Aqe.COMPILER_REVISION,r=Aqe.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,s){return bN0.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:s?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,s,n){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!n,this.name=this.environment.name,this.isChild=!!s,this.context=s||{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 i=e.opcodes,o=void 0,a=void 0,c=void 0,u=void 0;for(c=0,u=i.length;c<u;c++)o=i[c],this.source.currentLocation=o.loc,a=a||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new Yj.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;"),n?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) {
|
|
|
|
|
Expecting `+k.join(", ")+", got '"+(this.terminals_[q]||q)+"'":Te="Parse error on line "+(l+1)+": Unexpected "+(q==1?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(Te,{text:this.lexer.match,token:this.terminals_[q]||q,line:this.lexer.yylineno,loc:C,expected:k})}}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+q);switch(_[0]){case 1:a.push(q),c.push(this.lexer.yytext),u.push(this.lexer.yylloc),a.push(_[1]),q=null,x?(q=x,x=null):(b=this.lexer.yyleng,A=this.lexer.yytext,l=this.lexer.yylineno,C=this.lexer.yylloc,M>0&&M--);break;case 2:if(Ce=this.productions_[_[1]][1],xe.$=c[c.length-Ce],xe._$={first_line:u[u.length-(Ce||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(Ce||1)].first_column,last_column:u[u.length-1].last_column},E&&(xe._$.range=[u[u.length-(Ce||1)].range[0],u[u.length-1].range[1]]),Se=this.performAction.call(xe,A,b,l,this.yy,_[1],c,u),typeof Se<"u")return Se;Ce&&(a=a.slice(0,-1*Ce*2),c=c.slice(0,-1*Ce),u=u.slice(0,-1*Ce)),a.push(this.productions_[_[1]][0]),c.push(xe.$),u.push(xe._$),we=p[a[a.length-2]][a[a.length-1]],a.push(we);break;case 3:return!0}}return!0},"parse")},e=(function(){var n={EOF:1,parseError:s(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:s(function(i){return this._input=i,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:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.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),i},"input"),unput:s(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var u=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 p=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===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this},"unput"),more:s(function(){return this._more=!0,this},"more"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
|
|
|
`+a+"^"},"showPosition"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,u,p,A;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),b=0;b<l.length&&(c=this._input.match(this.rules[l[b]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,u=b,!this.options.flex)));b++);return a?(A=a[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.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],i=this.performAction.call(this,this.yy,this,l[u],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var i=this.next();return typeof i<"u"?i:this.lex()},"lex"),begin:s(function(i){this.conditionStack.push(i)},"begin"),popState:s(function(){return this.conditionStack.pop()},"popState"),_currentRules:s(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:s(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:s(function(i){this.begin(i)},"begin")};return n.options={},n.performAction=s(function(i,a,c,u){function p(l,b){return a.yytext=a.yytext.substring(l,a.yyleng-b+l)}s(p,"strip");var A=u;switch(c){case 0:if(a.yytext.slice(-2)==="\\\\"?(p(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(p(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:(p(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=p(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=p(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 s(r,"Parser"),r.prototype=t,t.Parser=r,new r})();y4.default=ts0;wAe.exports=y4.default});var I4=m((q4,xAe)=>{"use strict";q4.__esModule=!0;function rs0(t){return t&&t.__esModule?t:{default:t}}s(rs0,"_interopRequireDefault");var ns0=sn(),q_=rs0(ns0);function B4(){this.parents=[]}s(B4,"Visitor");B4.prototype={constructor:B4,mutating:!1,acceptKey:s(function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!B4.prototype[n.type])throw new q_.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},"acceptKey"),acceptRequired:s(function(e,r){if(this.acceptKey(e,r),!e[r])throw new q_.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:s(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:s(function(e){if(e){if(!this[e.type])throw new q_.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:s(function(e){this.acceptArray(e.body)},"Program"),MustacheStatement:D4,Decorator:D4,BlockStatement:FAe,DecoratorBlock:FAe,PartialStatement:WAe,PartialBlockStatement:s(function(e){WAe.call(this,e),this.acceptKey(e,"program")},"PartialBlockStatement"),ContentStatement:s(function(){},"ContentStatement"),CommentStatement:s(function(){},"CommentStatement"),SubExpression:D4,PathExpression:s(function(){},"PathExpressionLine truncated
|
|
|
|
|
`])}),e},"merge"),each:s(function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},"each"),empty:s(function(){var e=this.currentLocation||{start:{}};return new Bp(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:s(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Bp?e:(e=Y_(e,this,r),new Bp(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:s(function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:s(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:s(function(e){var r=this,n=[];Object.keys(e).forEach(function(i){var a=Y_(e[i],r);a!=="undefined"&&n.push([r.quotedString(i),":",a])});var o=this.generateList(n);return o.prepend("{"),o.add("}"),o},"objectLiteral"),generateList:s(function(e){for(var r=this.empty(),n=0,o=e.length;n<o;n++)n&&r.add(","),r.add(Y_(e[n],this));return r},"generateList"),generateArray:s(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};T4.default=Mle;mle.exports=T4.default});var Cle=m((v4,Ele)=>{"use strict";v4.__esModule=!0;function Ole(t){return t&&t.__esModule?t:{default:t}}s(Ole,"_interopRequireDefault");var zle=m4(),ea0=sn(),j_=Ole(ea0),ta0=$t(),ra0=hle(),gle=Ole(ra0);function F2(t){this.value=t}s(F2,"Literal");function W2(){}s(W2,"JavaScriptCompiler");W2.prototype={nameLookup:s(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:s(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:s(function(){var e=zle.COMPILER_REVISION,r=zle.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:s(function(e,r,n){return ta0.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:s(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:s(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:s(function(e,r,n,o){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,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 i=e.opcodes,a=void 0,c=void 0,u=void 0,p=void 0;for(u=0,p=i.length;u<p;u++)a=i[u],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 j_.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;"),o?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 p=this.createFunctionContext(n);if(this.isChild)return p;var l={compiler:this.compilerInfo(),main:p};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var A=this.context,h=A.programs,M=A.decorators;for(c=0,u=h.length;c<u;c++)l[c]=h[c],M[c]&&(l[c+"_d"]=M[c],l.useDecorators=!0);return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),n?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),r.srcName?(l=l.toStringWithSourceMap({file:r.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new dqe.default(this.options.srcName),this.decorators=new dqe.default(this.options.srcName)},createFunctionContext:function(e){var r=this,s="",n=this.stackVars.concat(this.registers.list);n.length>0&&(s+=", "+n.join(", "));var i=0;Object.keys(this.aliases).forEach(function(c){var u=r.aliases[c];u.children&&u.referenceCount>1&&(s+=", alias"+ ++i+"="+c,u.children[0]="alias"+i)}),this.lookupPropertyFunctionIsUsed&&(s+=", "+this.lookupPropertyFunctionVarDeclaration());var o=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&o.push("blockParams"),this.useDepths&&o.push("depths");var a=this.mergeSource(s);return e?(o.push(a),Function.apply(this,o)):this.source.wrap(["function(",o.join(","),`) {
|
|
|
|
|
`,a,"}"])},mergeSource:function(e){var r=this.environment.isSimple,s=!this.forceBuffer,n=void 0,i=void 0,o=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(o?c.prepend(" + "):o=c,a=c):(o&&(i?o.prepend("buffer += "):n=!0,a.add(";"),o=a=void 0),i=!0,r||(s=!1))}),s?o?(o.prepend("return "),a.add(";")):i||this.source.push('return "";'):(e+=", buffer = "+(n?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(n?"":`;
|
|
|
|
|
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
|
|
|
`),this.decorators=this.decorators.merge()));var A=this.createFunctionContext(o);if(this.isChild)return A;var l={compiler:this.compilerInfo(),main:A};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var b=this.context,M=b.programs,z=b.decorators;for(u=0,p=M.length;u<p;u++)l[u]=M[u],z[u]&&(l[u+"_d"]=z[u],l.useDecorators=!0);return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),o?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),r.srcName?(l=l.toStringWithSourceMap({file:r.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},"compile"),preamble:s(function(){this.lastContext=0,this.source=new gle.default(this.options.srcName),this.decorators=new gle.default(this.options.srcName)},"preamble"),createFunctionContext:s(function(e){var r=this,n="",o=this.stackVars.concat(this.registers.list);o.length>0&&(n+=", "+o.join(", "));var i=0;Object.keys(this.aliases).forEach(function(u){var p=r.aliases[u];p.children&&p.referenceCount>1&&(n+=", alias"+ ++i+"="+u,p.children[0]="alias"+i)}),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:s(function(e){var r=this.environment.isSimple,n=!this.forceBuffer,o=void 0,i=void 0,a=void 0,c=void 0;return this.source.each(function(u){u.appendToBuffer?(a?u.prepend(" + "):a=u,c=u):(a&&(i?a.prepend("buffer += "):o=!0,c.add(";"),a=c=void 0),i=!0,r||(n=!1))}),n?a?(a.prepend("return "),c.add(";")):i||this.source.push('return "";'):(e+=", buffer = "+(o?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),c.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(o?"":`;
|
|
|
|
|
`)),this.source.merge()},"mergeSource"),lookupPropertyFunctionVarDeclaration:s(function(){return`
|
|
|
|
|
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
|
|
|
return parent[propertyName];
|
|
|
|
|
}
|
|
|
|
|
return undefined
|
|
|
|
|
}
|
|
|
|
|
`.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),s=[this.contextName(0)];this.setupHelperArgs(e,0,s);var n=this.popStack();s.splice(1,0,n),this.push(this.source.functionCall(r,"call",s))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var s=this.topStack();r.splice(1,0,s),this.pushSource(["if (!",this.lastHelper,") { ",s," = ",this.source.functionCall(e,"call",r),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append: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)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,r,s,n){var i=0;!n&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[i++])):this.pushContext(),this.resolvePath("context",e,i,r,s)},lookupBlockParam:function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(e,r,s){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,s)},resolvePath:function(e,r,s,n,i){var o=this;if(this.options.strict||this.options.assumeObjects){this.push(mN0(this.options.strict&&i,this,r,s,e));return}for(var a=r.length,c=function(p){o.replaceStack(function(l){var A=o.nameLookup(l,r[p],e);return n?[" && ",A]:[" != null ? ",A," : ",l]})},u=s;u<a;u++)c(u)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash: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))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var s=this.nameLookup("decorators",r,"decorator"),n=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",s,";"]),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",n])," || fn;"])},invokeHelper:function(e,r,s){var n=this.popStack(),i=this.setupHelper(e,r),o=[];s&&o.push(i.name),o.push(n),this.options.strict||o.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(o,"||"),")"],c=this.source.functionCall(a,"call",i.callParams);this.push(c)},itemsSeparatedBy:function(e,r){var s=[];s.push(e[0]);for(var n=1;n<e.length;n++)s.push(r,e[n]);return s},invokeKnownHelper:function(e,r){var s=this.setupHelper(e,r);this.push(this.source.functionCall(s.name,"call",s.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var s=this.popStack();this.emptyHash();var n=this.setupHelper(0,e,r),i=this.lastHelper=this.nameLookup("helpers",e,"helper"),o=["(","(helper = ",i," || ",s,")"];this.options.strict||(o[0]="(helper = ",o.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",o,n.paramsInit?["),(",n.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",n.callParams)," : helper))"])},invokePartial:function(e,r,s){var n=[],i=this.setupParams(r,1,n);e&&(r=this.popStack(),delete i.name),s&&(i.indent=JSON.stringify(s)),i.helpers="helpers",i.partials="partials",i.decorators="container.decorators",e?n.unshift(r):n.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(i.depths="depths"),i=this.objectLiteral(i),n.push(i),this.push(this.source.functionCall("container.invokePartial","",n))},assignToHash
Line truncated
|
|
|
|
|
`,e};kt.prototype.Program=function(t){var e="",r=t.body,s=void 0,n=void 0;if(t.blockParams){var i="BLOCK PARAMS: [";for(s=0,n=t.blockParams.length;s<n;s++)i+=" "+t.blockParams[s];i+=" ]",e+=this.pad(i)}for(s=0,n=r.length;s<n;s++)e+=this.accept(r[s]);return this.padding--,e};kt.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};kt.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};kt.prototype.BlockStatement=kt.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};kt.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+" }}")};kt.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+" }}")};kt.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};kt.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};kt.prototype.SubExpression=function(t){for(var e=t.params,r=[],s=void 0,n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return e="["+r.join(", ")+"]",s=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+s};kt.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};kt.prototype.StringLiteral=function(t){return'"'+t.value+'"'};kt.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};kt.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};kt.prototype.UndefinedLiteral=function(){return"UNDEFINED"};kt.prototype.NullLiteral=function(){return"NULL"};kt.prototype.Hash=function(t){for(var e=t.pairs,r=[],s=0,n=e.length;s<n;s++)r.push(this.accept(e[s]));return"HASH{"+r.join(", ")+"}"};kt.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Zj=f((UTt,yqe)=>{var iN=gqe().default,Eqe=zqe();iN.PrintVisitor=Eqe.PrintVisitor;iN.print=Eqe.print;yqe.exports=iN;function Oqe(t,e){var r=require("fs"),s=r.readFileSync(e,"utf8");t.exports=iN.compile(s)}typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=Oqe,require.extensions[".hbs"]=Oqe)});var pN=f(yA=>{"use strict";Object.defineProperty(yA,"__esModule",{value:!0});yA.Signature=yA.Envelope=void 0;yA.Envelope={fromJSON(t){return{payload:uN(t.payload)?Buffer.from(Fqe(t.payload)):Buffer.alloc(0),payloadType:uN(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>yA.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=Tqe(t.payload)),t.payloadType!==""&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>yA.Signature.toJSON(r))),e}};yA.Signature={fromJSON(t){return{sig:uN(t.sig)?Buffer.from(Fqe(t.sig)):Buffer.alloc(0),keyid:uN(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=Tqe(t.sig)),t.keyid!==""&&(e.keyid=t.keyid),e}};function Fqe(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function Tqe(t){return globalThis.Buffer.from(t).toString("base64")}function uN(t){return t!=null}});var Wqe=f(lN=>{"use strict";Object.defineProperty(lN,"__esModule",{value:!0});lN.Timestamp=void 0;lN.Timestamp={fromJSON(t){return{seconds:xqe(t.seconds)?globalThis.String(t.seconds):"0",nanos:xqe(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!=="0"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function xqe(t){return t!=null}});var bp=f(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.TimeRange=Qe.X509CertificateChain=Qe.SubjectAlternativeName=Qe.X509Certificate=Qe.DistinguishedName=Qe.ObjectIdentifierValuePair=Qe.ObjectIdentifier=Qe.PublicKeyIdentifier=Qe.PublicKey=Qe.RFC3161SignedTimestamp=Qe.LogId=Qe.MessageSignature=Qe.HashOutput=Qe.SubjectAlternativeNameType=Qe.PublicKeyDetails=Qe.HashAlgorithm=void 0;Qe.hashAlgorithmFromJSON=Lqe;Qe.hashAlgorithmToJSON=Pqe;Qe.publicKeyDetailsFromJSON=Qqe;Qe.publicKeyDetailsToJSON=kqe;Qe.subjectAlternativeNameTypeFromJSON=Uqe;Qe.subjectAlternativeNameTypeToJSON=Gqe;var QN0=Wqe(),An;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",t[t.SHA2_256=1]="SHA2_256",t[t.SHA2_384=2]="SHA2_384",t[t.SHA2_512=3]="SHA2_512",t[t.SHA3_256=4]="SHA3_256",t[t.SHA3_384=5]="SHA3_384"})(An||(Qe.HashAlgorithm=An={}));function Lqe(t){switch(t){cas
Line truncated
|
|
|
|
|
`).forEach(r=>{r.match(v60)||r.match(F60)||(e+=r)}),Buffer.from(e,"base64")}function x60(t,e="CERTIFICATE"){let s=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`
|
|
|
|
|
`).concat(`
|
|
|
|
|
`)}});var NN=f(RA=>{"use strict";Object.defineProperty(RA,"__esModule",{value:!0});RA.SHA2_HASH_ALGOS=RA.RSA_SIGNATURE_ALGOS=RA.ECDSA_SIGNATURE_ALGOS=void 0;RA.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"};RA.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"};RA.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 D$=f(vN=>{"use strict";Object.defineProperty(vN,"__esModule",{value:!0});vN.RFC3161TimestampVerificationError=void 0;var B$=class extends Error{};vN.RFC3161TimestampVerificationError=B$});var EIe=f(Sc=>{"use strict";var W60=Sc&&Sc.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),_60=Sc&&Sc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),L60=Sc&&Sc.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!=="default"&&W60(r,e,s[n]);return _60(r,e),r}})();Object.defineProperty(Sc,"__esModule",{value:!0});Sc.TSTInfo=void 0;var OIe=L60(um()),P60=NN(),Q60=D$(),q$=class{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 P60.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=OIe.digest(this.messageImprintHashAlgorithm,e);if(!OIe.bufferEqual(r,this.messageImprintHashedMessage))throw new Q60.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};Sc.TSTInfo=q$});var CIe=f(Nc=>{"use strict";var k60=Nc&&Nc.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),U60=Nc&&Nc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),G60=Nc&&Nc.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!=="default"&&k60(r,e,s[n]);return U60(r,e),r}})();Object.defineProperty(Nc,"__esModule",{value:!0});Nc.RFC3161Timestamp=void 0;var H60=RN(),I$=G60(um()),yIe=NN(),YE=D$(),X60=EIe(),V60="1.2.840.113549.1.7.2",j60="1.2.840.113549.1.9.16.1.4",$60="1.2.840.113549.1.9.4",R$=class t{root;constructor(e){this.root=e}static parse(e){let r=H60.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 yIe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return yIe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new X60.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new YE.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==V60)throw new YE.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==j60)throw new YE.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=I$.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!I$.bufferEqual(e,r))throw new YE.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(e){let r=this.signedAttrsObj.toDER();if(r[0
Line truncated
|
|
|
|
|
\v\f\r\x1B !"#$\u066A&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xB0\xB7\u2219\u221A\u2592\u2500\u2502\u253C\u2524\u252C\u251C\u2534\u2510\u250C\u2514\u2518\u03B2\u221E\u03C6\xB1\xBD\xBC\u2248\xAB\xBB\uFEF7\uFEF8\uFFFD\uFFFD\uFEFB\uFEFC\uFFFD\xA0\xAD\uFE82\xA3\xA4\uFE84\uFFFD\uFFFD\uFE8E\uFE8F\uFE95\uFE99\u060C\uFE9D\uFEA1\uFEA5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFED1\u061B\uFEB1\uFEB5\uFEB9\u061F\xA2\uFE80\uFE81\uFE83\uFE85\uFECA\uFE8B\uFE8D\uFE91\uFE93\uFE97\uFE9B\uFE9F\uFEA3\uFEA7\uFEA9\uFEAB\uFEAD\uFEAF\uFEB3\uFEB7\uFEBB\uFEBF\uFEC1\uFEC5\uFECB\uFECF\xA6\xAC\xF7\xD7\uFEC9\u0640\uFED3\uFED7\uFEDB\uFEDF\uFEE3\uFEE7\uFEEB\uFEED\uFEEF\uFEF3\uFEBD\uFECC\uFECE\uFECD\uFEE1\uFE7D\u0651\uFEE5\uFEE9\uFEEC\uFEF0\uFEF2\uFED0\uFED5\uFEF5\uFEF6\uFEDD\uFED9\uFEF1\u25A0\uFFFD`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xA4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0386\uFFFD\xB7\xAC\xA6\u2018\u2019\u0388\u2015\u0389\u038A\u03AA\u038C\uFFFD\uFFFD\u038E\u03AB\xA9\u038F\xB2\xB3\u03AC\xA3\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03CD\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xBD\u0398\u0399\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u039A\u039B\u039C\u039D\u2563\u2551\u2557\u255D\u039E\u039F\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u03A0\u03A1\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u2518\u250C\u2588\u2584\u03B4\u03B5\u2580\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u0384\xAD\xB1\u03C5\u03C6\u03C7\xA7\u03C8\u0385\xB0\xA8\u03C9\u03CB\u03B0\u03CE\u25A0\xA0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\u203E\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0160\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\u017D\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0161\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\u017E\xFF"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\uFE88\xD7\xF7\uF8F6\uF8F5\uF8F4\uF8F7\uFE71\x88\u25A0\u2502\u2500\u2510\u250C\u2514\u2518\uFE79\uFE7B\uFE7D\uFE7F\uFE77\uFE8A\uFEF0\uFEF3\uFEF2\uFECE\uFECF\uFED0\uFEF6\uFEF8\uFEFA\uFEFC\xA0\uF8FA\uF8F9\uF8F8\xA4\uF8FB\uFE8B\uFE91\uFE97\uFE9B\uFE9F\uFEA3\u060C\xAD\uFEA7\uFEB3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFEB7\u061B\uFEBB\uFEBF\uFECA\u061F\uFECB\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\uFEC7\u0639\u063A\uFECC\uFE82\uFE84\uFE8E\uFED3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFED7\uFEDB\uFEDF\uF8FC\uFEF5\uFEF7\uFEF9\uFEFB\uFEE3\uFEE7\uFEEC\uFEE9\uFFFD"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041FLine truncated
|
|
|
|
|
\v\f\r\u1EE8\u1EF0\u1EF2\u1EF6\u1EF8\xDD\u1EF4\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xC0\u1EA2\xC3\xC1\u1EA0\u1EB6\u1EAC\xC8\u1EBA\u1EBC\xC9\u1EB8\u1EC6\xCC\u1EC8\u0128\xCD\u1ECA\xD2\u1ECE\xD5\xD3\u1ECC\u1ED8\u1EDC\u1EDE\u1EE0\u1EDA\u1EE2\xD9\u1EE6\u0168\xA0\u0102\xC2\xCA\xD4\u01A0\u01AF\u0110\u0103\xE2\xEA\xF4\u01A1\u01B0\u0111\u1EB0\u0300\u0309\u0303\u0301\u0323\xE0\u1EA3\xE3\xE1\u1EA1\u1EB2\u1EB1\u1EB3\u1EB5\u1EAF\u1EB4\u1EAE\u1EA6\u1EA8\u1EAA\u1EA4\u1EC0\u1EB7\u1EA7\u1EA9\u1EAB\u1EA5\u1EAD\xE8\u1EC2\u1EBB\u1EBD\xE9\u1EB9\u1EC1\u1EC3\u1EC5\u1EBF\u1EC7\xEC\u1EC9\u1EC4\u1EBE\u1ED2\u0129\xED\u1ECB\xF2\u1ED4\u1ECF\xF5\xF3\u1ECD\u1ED3\u1ED5\u1ED7\u1ED1\u1ED9\u1EDD\u1EDF\u1EE1\u1EDB\u1EE3\xF9\u1ED6\u1EE7\u0169\xFA\u1EE5\u1EEB\u1EED\u1EEF\u1EE9\u1EF1\u1EF3\u1EF7\u1EF9\xFD\u1EF5\u1ED0`},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10EF\u10F0\u10F1\u10F2\u10F3\u10F4\u10F5\u10F6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10F1\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10F2\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10F3\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10F4\u10EF\u10F0\u10F5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04EE\u0493\u201E\u2026\u04B6\u04AE\u04B2\u04AF\u04A0\u04E2\u04A2\u049A\u04BA\u04B8\u0497\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u04B3\u04B7\u04A1\u04E3\u04A3\u049B\u04BB\u04B9\xA0\u040E\u045E\u0408\u04E8\u0498\u04B0\xA7\u0401\xA9\u04D8\xAB\xAC\u04EF\xAE\u049C\xB0\u04B1\u0406\u0456\u0499\u04E9\xB6\xB7\u0451\u2116\u04D9\xBB\u0458\u04AA\u04AB\u049D\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},viscii:{type:"_sbcs",chars:`\0\u1EB2\u1EB4\u1EAA\x07\b
|
|
|
|
|
\v\f\r\u1EF6\u1EF8\x1B\u1EF4 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\u1EA0\u1EAE\u1EB0\u1EB6\u1EA4\u1EA6\u1EA8\u1EAC\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EE2\u1EDA\u1EDC\u1EDE\u1ECA\u1ECE\u1ECC\u1EC8\u1EE6\u0168\u1EE4\u1EF2\xD5\u1EAF\u1EB1\u1EB7\u1EA5\u1EA7\u1EA9\u1EAD\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1ED1\u1ED3\u1ED5\u1ED7\u1EE0\u01A0\u1ED9\u1EDD\u1EDF\u1ECB\u1EF0\u1EE8\u1EEA\u1EEC\u01A1\u1EDB\u01AF\xC0\xC1\xC2\xC3\u1EA2\u0102\u1EB3\u1EB5\xC8\xC9\xCA\u1EBA\xCC\xCD\u0128\u1EF3\u0110\u1EE9\xD2\xD3\xD4\u1EA1\u1EF7\u1EEB\u1EED\xD9\xDA\u1EF9\u1EF5\xDD\u1EE1\u01B0\xE0\xE1\xE2\xE3\u1EA3\u0103\u1EEF\u1EAB\xE8\xE9\xEA\u1EBB\xEC\xED\u0129\u1EC9\u0111\u1EF1\xF2\xF3\xF4\xF5\u1ECF\u1ECD\u1EE5\xF9\xFA\u0169\u1EE7\xFD\u1EE3\u1EEE`},iso646cn:{type:"_sbcs",chars:`\0\x07\b
|
|
|
|
|
\v\f\r\x1B !"#\xA5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},iso646jp:{type:"_sbcs",chars:`\0\x07\b
|
|
|
|
|
\v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD"},macintosh:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},ascii:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},tis620:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"}}});var _Re=f(WRe=>{"use strict";var MJ=Dp().Buffer;WRe._dbcs=Ip;var Er=-1,xRe=-2,io=-10,ws=-1e3,ym=new Array(256),hy=-1;for(m6=0;m6<256;m6++)ym[m6]=Er;var m6;function Ip(t,e){if(this.encodingName=t.encodingName,!t)throw new Error("DBCS codec is called without the data.");if(!t.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var r=t.table();this.decodeTables=[],this.decodeTables[0]=ym.slice(0),this.decodeTableSeq=[];for(var s=0;s<r.length;s++)this._addDecodeChunk(r[s]);if(typeof t.gb18030=="function"){this.gb18030=t.gb18030();var n=this.decodeTables.length;this.decodeTables.push(ym.slice(0));var i=this.decodeTables.length;this.decodeTables.push(ym.slice(0));for(var o=this.decodeTables[0],s=129;s<=254;s++)for(var a=this.decodeTables[ws-o[s]],c=48;c<=57;c++){if(a[c]===Er)a[c]=ws-n;else if(a[c]>ws)throw new Error("gb18030 decode tables conflict at byte 2");for(var u=this.decodeTables[ws-a[c]],p=129;p<=254;p++){if(u[p]===Er)u[p]=ws-i;else{if(u[p]===ws-i)continue;if(u[p]>ws)throw new Error("gb18030 decode tables conflict at byte 3")}for(var l=this.decodeTables[ws-u[p]],A=48;A<=57;A++)l[A]===Er&&(l[A]=xRe)}}}this.defaultCharUnicode=e.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var h={};if(t.encodeSkipVals)for(var s=0;s<t.encodeSkipValsLine truncated
|
|
|
|
|
Wanted: ${this.expectedSize}
|
|
|
|
|
Found: ${this.size}`);s.code="EBADSIZE",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit("error",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);s.code="EINTEGRITY",s.found=e,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit("error",s)}else this.#t=this.size,this.emit("size",this.size),this.#e=e,this.emit("integrity",e),r&&(this.#s=r,this.emit("verified",r))}},vp=class{get isHash(){return!0}constructor(e,r){let s=r?.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let n=this.source.match(s?ax0:ox0);if(!n||s&&!QJ.includes(n[1])||!G5e.includes(n[1]))return;this.algorithm=n[1],this.digest=n[2];let i=n[3];i&&(this.options=i.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(e,r){let s=ui(e,r);if(!s)return!1;if(s.isIntegrity){let n=s.pickAlgorithm(r,[this.algorithm]);if(!n)return!1;let i=s[n].find(o=>o.digest===this.digest);return i||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(QJ.includes(this.algorithm)&&this.digest.match(ix0)&&this.options.every(r=>r.match(cx0)))?"":`${this.algorithm}-${this.digest}${yy(this.options)}`}};function U5e(t,e,r,s){let n=t!=="",i=!1,o="",a=s.length-1;for(let u=0;u<a;u++){let p=vp.prototype.toString.call(s[u],r);p&&(i=!0,o+=p,o+=e)}let c=vp.prototype.toString.call(s[a],r);return c&&(i=!0,o+=c),n&&i?t+e+o:t+o}var bf=class{get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let r=e?.sep||" ",s="";if(e?.strict){r=r.replace(/\S+/g," ");for(let n of QJ)this[n]&&(s=U5e(s,r,e,this[n]))}else for(let n of Object.keys(this))s=U5e(s,r,e,this[n]);return s}concat(e,r){let s=typeof e=="string"?e:Oy(e,r);return ui(`${this.toString(r)} ${s}`,r)}hexDigest(){return ui(this,{single:!0}).hexDigest()}merge(e,r){let s=ui(e,r);for(let n in s)if(this[n]){if(!this[n].find(i=>s[n].find(o=>i.digest===o.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[n]=s[n]}match(e,r){let s=ui(e,r);if(!s)return!1;let n=s.pickAlgorithm(r,Object.keys(this));return!!n&&this[n].find(i=>s[n].find(o=>i.digest===o.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||hx0,n=Object.keys(this);return r?.length&&(n=n.filter(i=>r.includes(i))),n.length?n.reduce((i,o)=>s(i,o)||i):null}};kc.exports.parse=ui;function ui(t,e){if(!t)return null;if(typeof t=="string")return PJ(t,e);if(t.algorithm&&t.digest){let r=new bf;return r[t.algorithm]=[t],PJ(Oy(r,e),e)}else return PJ(Oy(t,e),e)}function PJ(t,e){if(e?.single)return new vp(t,e);let r=t.trim().split(/\s+/).reduce((s,n)=>{let i=new vp(n,e);if(i.algorithm&&i.digest){let o=i.algorithm;Object.keys(s).includes(o)||(s[o]=[]),s[o].push(i)}return s},new bf);return r.isEmpty()?null:r}kc.exports.stringify=Oy;function Oy(t,e){return t.algorithm&&t.digest?vp.prototype.toString.call(t,e):typeof t=="string"?Oy(ui(t,e),e):bf.prototype.toString.call(t,e)}kc.exports.fromHex=ux0;function ux0(t,e,r){let s=yy(r?.options);return ui(`${e}-${Buffer.from(t,"hex").toString("base64")}${s}`,r)}kc.exports.fromData=px0;function px0(t,e){let r=e?.algorithms||[...UJ],s=yy(e?.options);return r.reduce((n,i)=>{let o=Ey.createHash(i).update(t).digest("base64"),a=new vp(`${i}-${o}${s}`,e);if(a.algorithm&&a.digest){let c=a.algorithm;n[c]||(n[c]=[]),n[c].push(a)}return n},new bf)}kc.exports.fromStream=lx0;function lx0(t,e){let r=GJ(e);return new Promise((s,n)=>{t.pipe(r),t.on("error",n),r.on("error",n);let i;r.on("integrity",o=>{i=o}),r.on("end",()=>s(i)),r.resume()})}kc.exports.checkData=Ax0;function Ax0(t,e,r){if(e=ui(e,r),!e||!Object.keys(e).length){if(r?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let s=e.pickAlgorithm(r),n=Ey.createHash(s).update(t).digest("base64"),i=ui({algorithm:s,digest:n}),o=i.match(e,r);if(r=r||{},o||!r.error)return o;if(typeof r.size=="number"&&t.length!==r.size){let a=new Error(`data size mismatch when checking ${e}.
|
|
|
|
|
Wanted: ${r.size}
|
|
|
|
|
Found: ${t.length}`);throw a.code="EBADSIZE",a.found=t.length,a.expected=r.size,a.sri=e,a}else{let a=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${i}. (${t.length} bytes)`);throw a.code="EINTEGRITY",a.found=i,a.expected=e,a.algorithm=s,a.sri=e,a}}kc.exports.checkStream=dx0;function dx0(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=ui(e,r),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let s=GJ(r);return new Promise((n,i)=>{t.pipe(s),t.on("error",i),s.on("error",i);let o;s.on("verified",a=>{o=a}),s.on("end",()=>n(o)),s.resume()})}kc.exports.integrityStream=GJ;function GJ(t=Object.create(null)){return new kJ(t)}kc.exports.create=fx0;function fx0(t){let e=t?.algorithms||[...UJ],r=yy(t?.options),s=e.map(Ey.createHash);return{update:function(n,i){return s.forEach(o=>o.update(n,i)),this},digest:function(){return e.reduce((i,o)=>{let a=s.shift().digest("base64"),c=new vp(`${o}-${a}${r}`,t);return i[c.algorithm]||(i[c.algorithm]=[]),i[c.algorithm].push(c),i},new bf)}}}function hx0(t,e){return k5e.indexOf(t.toLowerCase())>=k5e.indexOf(e.toLowerCase())?t:e}});var XJ=f((B_t,$5e)=>{var H5e=vJ(),X5e=LJ(),bx0=Cy(),V5e={shared:!1,ignoreCargoCult:!0},Mx0={status:200,headers:{}},Dm=t=>{let e={method:t.method,url:t.url,headers:{},compress:t.compress};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},j5e=t=>{let e={status:t.status,headers:{}};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},HJ=class{constructor({entry:e,request:r,response:s,options:n}){this.entry=e,this.request=Dm(r),this.response=j5e(s),this.options=n,this.policy=new H5e(this.request,this.response,V5e),this.entry&&(this.policy._responseTime=this.entry.metadata.time)}static storable(e,r){return!r.cachePath||r.cache==="no-store"||!["GET","HEAD"].includes(e.method)?!1:new H5e(Dm(e),Mx0,V5e).storable()}satisfies(e){let r=Dm(e);if(this.request.headers.host!==r.headers.host||this.request.compress!==r.compress)return!1;let s=new X5e(this.request),n=new X5e(r);return JSON.stringify(s.mediaTypes())!==JSON.stringify(n.mediaTypes())||JSON.stringify(s.languages())!==JSON.stringify(n.languages())||JSON.stringify(s.encodings())!==JSON.stringify(n.encodings())?!1:this.options.integrity?bx0.parse(this.options.integrity).match(this.entry.integrity):!0}storable(){return this.policy.storable()}get mustRevalidate(){return!!this.policy._rescc["must-revalidate"]}needsRevalidation(e){let r=Dm(e);return r.method="GET",!this.policy.satisfiesWithoutRevalidation(r)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let r=Dm(e);return this.policy.revalidationHeaders(r)}revalidated(e,r){let s=Dm(e),n=j5e(r);return!this.policy.revalidatedPolicy(s,n).modified}};$5e.exports=HJ});var J5e=f((D_t,Y5e)=>{var VJ=class extends Error{constructor(e){super(`request to ${e} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};Y5e.exports={NotCachedError:VJ}});var awe=f((q_t,owe)=>{"use strict";var K5e=typeof process=="object"&&process?process:{stdout:null,stderr:null},mx0=require("events"),Z5e=require("stream"),ewe=require("string_decoder").StringDecoder,Fp=Symbol("EOF"),Tp=Symbol("maybeEmitEnd"),WA=Symbol("emittedEnd"),S6=Symbol("emittingEnd"),By=Symbol("emittedError"),N6=Symbol("closed"),twe=Symbol("read"),v6=Symbol("flush"),rwe=Symbol("flushChunk"),fn=Symbol("encoding"),xp=Symbol("decoder"),F6=Symbol("flowing"),Dy=Symbol("paused"),qm=Symbol("resume"),Z1=Symbol("bufferLength"),jJ=Symbol("bufferPush"),$J=Symbol("bufferShift"),Ur=Symbol("objectMode"),Gr=Symbol("destroyed"),YJ=Symbol("emitData"),swe=Symbol("emitEnd"),JJ=Symbol("emitEnd2"),Wp=Symbol("async"),qy=t=>Promise.resolve().then(t),nwe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",gx0=nwe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),zx0=nwe&&Symbol.iterator||Symbol("iterator not implemented"),Ox0=t=>t==="end"||t==="finish"||t==="prefinish",Ex0=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,yx0=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),T6=class{constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[qm](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},KJ=class extends T6{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}};owe.exports=class iwe extends Z5e{constructor(e){super(),this[F6]=!1,this[Dy]=!1,this.pipes=[],this.buffer=[],this[Ur]=e&&e.objectMode||!1,this[Ur]?this[fn]=null:this[fn]=e&&e.encoding||null,this[fn]==="buffer"&&(this[fn]=null),this[Wp]=e&&!!e.async||!1,this[xp]=this[fn]?new ewe(this[fn]):null,this[Fp]=!1,this[WA]=!1,this[S6]=!1,this[N6]=!1,this[By]=null,this.writable=!0,this.readable=!0,thi
Line truncated
|
|
|
|
|
Wanted: ${this.expectedSize}
|
|
|
|
|
Found: ${this.size}`);s.code="EBADSIZE",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit("error",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);s.code="EINTEGRITY",s.found=e,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit("error",s)}else this.#t=this.size,this.emit("size",this.size),this.#e=e,this.emit("integrity",e),r&&(this.#s=r,this.emit("verified",r))}},kp=class{get isHash(){return!0}constructor(e,r){let s=r?.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let n=this.source.match(s?Wx0:xx0);if(!n||s&&!hK.includes(n[1]))return;this.algorithm=n[1],this.digest=n[2];let i=n[3];i&&(this.options=i.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(e,r){let s=li(e,r);if(!s)return!1;if(s.isIntegrity){let n=s.pickAlgorithm(r,[this.algorithm]);if(!n)return!1;let i=s[n].find(o=>o.digest===this.digest);return i||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(hK.includes(this.algorithm)&&this.digest.match(Tx0)&&this.options.every(r=>r.match(_x0)))?"":`${this.algorithm}-${this.digest}${Fy(this.options)}`}};function qwe(t,e,r,s){let n=t!=="",i=!1,o="",a=s.length-1;for(let u=0;u<a;u++){let p=kp.prototype.toString.call(s[u],r);p&&(i=!0,o+=p,o+=e)}let c=kp.prototype.toString.call(s[a],r);return c&&(i=!0,o+=c),n&&i?t+e+o:t+o}var gf=class{get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let r=e?.sep||" ",s="";if(e?.strict){r=r.replace(/\S+/g," ");for(let n of hK)this[n]&&(s=qwe(s,r,e,this[n]))}else for(let n of Object.keys(this))s=qwe(s,r,e,this[n]);return s}concat(e,r){let s=typeof e=="string"?e:Ny(e,r);return li(`${this.toString(r)} ${s}`,r)}hexDigest(){return li(this,{single:!0}).hexDigest()}merge(e,r){let s=li(e,r);for(let n in s)if(this[n]){if(!this[n].find(i=>s[n].find(o=>i.digest===o.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[n]=s[n]}match(e,r){let s=li(e,r);if(!s)return!1;let n=s.pickAlgorithm(r,Object.keys(this));return!!n&&this[n]&&s[n]&&this[n].find(i=>s[n].find(o=>i.digest===o.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||Xx0,n=Object.keys(this).filter(i=>r?.length?r.includes(i):!0);return n.length?n.reduce((i,o)=>s(i,o)||i):null}};Uc.exports.parse=li;function li(t,e){if(!t)return null;if(typeof t=="string")return fK(t,e);if(t.algorithm&&t.digest){let r=new gf;return r[t.algorithm]=[t],fK(Ny(r,e),e)}else return fK(Ny(t,e),e)}function fK(t,e){if(e?.single)return new kp(t,e);let r=t.trim().split(/\s+/).reduce((s,n)=>{let i=new kp(n,e);if(i.algorithm&&i.digest){let o=i.algorithm;s[o]||(s[o]=[]),s[o].push(i)}return s},new gf);return r.isEmpty()?null:r}Uc.exports.stringify=Ny;function Ny(t,e){return t.algorithm&&t.digest?kp.prototype.toString.call(t,e):typeof t=="string"?Ny(li(t,e),e):gf.prototype.toString.call(t,e)}Uc.exports.fromHex=Lx0;function Lx0(t,e,r){let s=Fy(r?.options);return li(`${e}-${Buffer.from(t,"hex").toString("base64")}${s}`,r)}Uc.exports.fromData=Px0;function Px0(t,e){let r=e?.algorithms||[...MK],s=Fy(e?.options);return r.reduce((n,i)=>{let o=vy.createHash(i).update(t).digest("base64"),a=new kp(`${i}-${o}${s}`,e);if(a.algorithm&&a.digest){let c=a.algorithm;n[c]||(n[c]=[]),n[c].push(a)}return n},new gf)}Uc.exports.fromStream=Qx0;function Qx0(t,e){let r=mK(e);return new Promise((s,n)=>{t.pipe(r),t.on("error",n),r.on("error",n);let i;r.on("integrity",o=>{i=o}),r.on("end",()=>s(i)),r.resume()})}Uc.exports.checkData=kx0;function kx0(t,e,r){if(e=li(e,r),!e||!Object.keys(e).length){if(r?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let s=e.pickAlgorithm(r),n=vy.createHash(s).update(t).digest("base64"),i=li({algorithm:s,digest:n}),o=i.match(e,r);if(r=r||{},o||!r.error)return o;if(typeof r.size=="number"&&t.length!==r.size){let a=new Error(`data size mismatch when checking ${e}.
|
|
|
|
|
Wanted: ${r.size}
|
|
|
|
|
Found: ${t.length}`);throw a.code="EBADSIZE",a.found=t.length,a.expected=r.size,a.sri=e,a}else{let a=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${i}. (${t.length} bytes)`);throw a.code="EINTEGRITY",a.found=i,a.expected=e,a.algorithm=s,a.sri=e,a}}Uc.exports.checkStream=Ux0;function Ux0(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=li(e,r),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let s=mK(r);return new Promise((n,i)=>{t.pipe(s),t.on("error",i),s.on("error",i);let o;s.on("verified",a=>{o=a}),s.on("end",()=>n(o)),s.resume()})}Uc.exports.integrityStream=mK;function mK(t=Object.create(null)){return new bK(t)}Uc.exports.create=Gx0;function Gx0(t){let e=t?.algorithms||[...MK],r=Fy(t?.options),s=e.map(vy.createHash);return{update:function(n,i){return s.forEach(o=>o.update(n,i)),this},digest:function(){return e.reduce((i,o)=>{let a=s.shift().digest("base64"),c=new kp(`${o}-${a}${r}`,t);if(c.algorithm&&c.digest){let u=c.algorithm;i[u]||(i[u]=[]),i[u].push(c)}return i},new gf)}}}var Hx0=vy.getHashes(),Iwe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>Hx0.includes(t));function Xx0(t,e){return Iwe.indexOf(t.toLowerCase())>=Iwe.indexOf(e.toLowerCase())?t:e}});var Rwe=f((v_t,gK)=>{(function(){var t;function e(r,s){var n=this instanceof e?this:t;if(n.reset(s),typeof r=="string"&&r.length>0&&n.hash(r),n!==this)return n}e.prototype.hash=function(r){var s,n,i,o,a;switch(a=r.length,this.len+=a,n=this.k1,i=0,this.rem){case 0:n^=a>i?r.charCodeAt(i++)&65535:0;case 1:n^=a>i?(r.charCodeAt(i++)&65535)<<8:0;case 2:n^=a>i?(r.charCodeAt(i++)&65535)<<16:0;case 3:n^=a>i?(r.charCodeAt(i)&255)<<24:0,n^=a>i?(r.charCodeAt(i++)&65280)>>8:0}if(this.rem=a+this.rem&3,a-=this.rem,a>0){for(s=this.h1;n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,s^=n,s=s<<13|s>>>19,s=s*5+3864292196&4294967295,!(i>=a);)n=r.charCodeAt(i++)&65535^(r.charCodeAt(i++)&65535)<<8^(r.charCodeAt(i++)&65535)<<16,o=r.charCodeAt(i++),n^=(o&255)<<24^(o&65280)>>8;switch(n=0,this.rem){case 3:n^=(r.charCodeAt(i+2)&65535)<<16;case 2:n^=(r.charCodeAt(i+1)&65535)<<8;case 1:n^=r.charCodeAt(i)&65535}this.h1=s}return this.k1=n,this},e.prototype.result=function(){var r,s;return r=this.k1,s=this.h1,r>0&&(r=r*11601+(r&65535)*3432906752&4294967295,r=r<<15|r>>>17,r=r*13715+(r&65535)*461832192&4294967295,s^=r),s^=this.len,s^=s>>>16,s=s*51819+(s&65535)*2246770688&4294967295,s^=s>>>13,s=s*44597+(s&65535)*3266445312&4294967295,s^=s>>>16,s>>>0},e.prototype.reset=function(r){return this.h1=typeof r=="number"?r:0,this.rem=this.k1=this.len=0,this},t=new e,typeof gK<"u"?gK.exports=e:this.MurmurHash3=e})()});var Swe=f((F_t,wwe)=>{"use strict";var Vx0=Rwe();wwe.exports=function(t){if(t){var e=new Vx0(t);return("00000000"+e.result().toString(16)).slice(-8)}else return(Math.random().toString(16)+"0000000").slice(2,10)}});var zK=f((T_t,Nwe)=>{var jx0=require("path"),$x0=Swe();Nwe.exports=function(t,e,r){return jx0.join(t,(e?e+"-":"")+$x0(r))}});var OK=f((x_t,Yx0)=>{Yx0.exports={name:"cacache",version:"20.0.1","cache-version":{content:"2",index:"5"},description:"Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",snap:"tap",coverage:"tap","test-docker":'docker run -it --rm --name pacotest -v "$PWD":/tmp -w /tmp node:latest npm test',lint:"npm run eslint",npmclilint:"npmcli-lint",lintfix:"npm run eslint -- --fix",postsnap:"npm run lintfix --",postlint:"template-oss-check",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},repository:{type:"git",url:"git+https://github.com/npm/cacache.git"},keywords:["cache","caching","content-addressable","sri","sri hash","subresource integrity","cache","storage","store","file store","filesystem","disk cache","disk storage"],license:"ISC",dependencies:{"@npmcli/fs":"^4.0.0","fs-minipass":"^3.0.0",glob:"^11.0.3","lru-cache":"^11.1.0",minipass:"^7.0.3","minipass-collect":"^2.0.1","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4","p-map":"^7.0.2",ssri:"^12.0.0","unique-filename":"^4.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",windowsCI:!1,version:"4.25.0",publish:"true"},author:"GitHub Inc.",tap:{"nyc-arg":["--exclude","tap-snapshots/**"]}}});var EK=f((W_t,vwe)=>{"use strict";vwe.exports=Jx0;function Jx0(t){return[t.slice(0,2),t.slice(2,4),t.slice(4)]}});var Nm=f((__t,yK)=>{"use strict";var Kx0=OK()["cache-version"].content,Zx0=EK(),Fwe=require("path"),eW0=Sm();yK.exports=tW0;function tW0(t,e){let r=eW
Line truncated
|
|
|
|
|
`+o.map(A=>{let h=JSON.stringify(A);return`${ov(h)} ${h}`}).join(`
|
|
|
|
|
`),c=async()=>{let A=dP0(Hc.join(t,"tmp"),s.tmpPrefix);return await KK(Hc.dirname(A),{recursive:!0}),{target:A,moved:!1}},u=async A=>{if(!A.moved)return g6e(A.target,{recursive:!0,force:!0})},p=async A=>{await pP0(A.target,a,{flag:"wx"}),await KK(Hc.dirname(n),{recursive:!0}),await MP0(A.target,n),A.moved=!0},l=await c();try{await p(l)}finally{await u(l)}return o.reverse().map(A=>av(t,A,!0))}Ai.exports.insert=z6e;async function z6e(t,e,r,s={}){let{metadata:n,size:i,time:o}=s,a=Vy(t,e),c={key:e,integrity:r&&AP0.stringify(r),time:o||Date.now(),size:i,metadata:n};try{await KK(Hc.dirname(a),{recursive:!0});let u=JSON.stringify(c);await aP0(a,`
|
|
|
|
|
${ov(u)} ${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return av(t,c)}Ai.exports.find=gP0;async function gP0(t,e){let r=Vy(t,e);try{return(await iv(r)).reduce((n,i)=>i&&i.key===e?av(t,i):n,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}Ai.exports.delete=zP0;function zP0(t,e,r={}){if(!r.removeFully)return z6e(t,e,null,r);let s=Vy(t,e);return g6e(s,{recursive:!0,force:!0})}Ai.exports.lsStream=O6e;function O6e(t){let e=ZK(t),r=new lP0({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(nv(),sv)),n=await JK(e);return await s(n,async i=>{let o=Hc.join(e,i),a=await JK(o);await s(a,async c=>{let u=Hc.join(o,c),p=await JK(u);await s(p,async l=>{let A=Hc.join(u,l);try{let M=(await iv(A)).reduce((g,y)=>(g.set(y.key,y),g),new Map);for(let g of M.values()){let y=av(t,g);y&&r.write(y)}}catch(h){if(h.code==="ENOENT")return;throw h}},{concurrency:YK})},{concurrency:YK})},{concurrency:YK}),r.end(),r}).catch(s=>r.emit("error",s)),r}Ai.exports.ls=OP0;async function OP0(t){return(await O6e(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}Ai.exports.bucketEntries=iv;async function iv(t,e){let r=await cP0(t,"utf8");return EP0(r,e)}function EP0(t){let e=[];return t.split(`
|
|
|
|
|
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||ov(s[1])!==s[0])return;let n;try{n=JSON.parse(s[1])}catch{}n&&e.push(n)}),e}Ai.exports.bucketDir=ZK;function ZK(t){return Hc.join(t,`index-v${bP0}`)}Ai.exports.bucketPath=Vy;function Vy(t,e){let r=E6e(e);return Hc.join.apply(Hc,[ZK(t)].concat(hP0(r)))}Ai.exports.hashKey=E6e;function E6e(t){return y6e(t,"sha256")}Ai.exports.hashEntry=ov;function ov(t){return y6e(t,"sha1")}function y6e(t,e){return oP0.createHash(e).update(t).digest("hex")}function av(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?fP0(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}function JK(t){return uP0(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}});var Pm=f(uv=>{"use strict";Object.defineProperty(uv,"__esModule",{value:!0});uv.LRUCache=void 0;var yP0=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,B6e=new Set,eZ=typeof process=="object"&&process?process:{},D6e=(t,e,r,s)=>{typeof eZ.emitWarning=="function"?eZ.emitWarning(t,e,r,s):console.error(`[${r}] ${e}: ${t}`)},cv=globalThis.AbortController,C6e=globalThis.AbortSignal;if(typeof cv>"u"){C6e=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,n){this._onabort.push(n)}},cv=class{constructor(){e()}signal=new C6e;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let n of this.signal._onabort)n(s);this.signal.onabort?.(s)}}};let t=eZ.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,D6e("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var CP0=t=>!B6e.has(t),LA=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),q6e=t=>LA(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Lm:null:null,Lm=class extends Array{constructor(e){super(e),this.fill(0)}},tZ=class t{heap;length;static#e=!1;static create(e){let r=q6e(e);if(!r)return[];t.#e=!0;let s=new t(e,r);return t.#e=!1,s}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},rZ=class t{#e;#t;#s;#r;#n;#i;#c;#a;get perf(){return this.#a}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#l;#d;#A;#u;#b;#O;#M;#m;#B;#g;#y;#C;#h;#E;#D;#z;#p;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#h,sizes:e.#y,keyMap:e.#d,keyList:e.#A,valList:e.#u,next:e.#b,prev:e.#O,get head(){return e.#M},get tail(){return e.#m},free:e.#B,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,s,n,i)=>e.#U(r,s,n,i),moveToTail:r=>e.#W(r),indexes:r=>e.#w(r),rindexes:r=>e.#N(r),isStale:r=>e.#I(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#c}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#n}constructor(e){let{max:r=0,ttl:s,ttlResolution:n=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:u,onInsert:p,disposeAfter:l,noDisposeOnSet:A,noUpdateTTL:h,maxSize:M=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:O,memoMethod:B,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:T,ignoreFetchAbort:W,perf:$}=e;if($!==void 0&&typeof $?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#a=$??yP0,r!==0&&!LA(r))throw new TypeError("max option must be a nonnegative integer");let ge=r?q6e(r):Array;if(!ge)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=M,this.maxEntrySize=g||this.#t,this.sizeCalculation=y,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(B!==void 0&&typeof B!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#c=B,O!==void 0&&typeof O!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#i=O,this.#D=!!O,this.#d=new Map,this.#A=new Array(r).fill(void 0),this.#u=new Array(r).fill(void 0),this.#b=new ge(r),this.#O=new ge(r),this.#M=0,this.#m=0,this.#B=tZ.create(r),this.#o=0,this.#l=0,typeof u=="function"
Line truncated
|
|
|
|
|
Wanted: ${t}
|
|
|
|
|
Found: ${e}`);return r.code="EINTEGRITY",r.expected=t,r.found=e,r}});var $6e=f((KLt,bZ)=>{"use strict";var H6e=_m(),X6e=jy(),V6e=G6e(),oQ0=Iy(),{PassThrough:aQ0}=sK(),cQ0=mf(),j6e=t=>({algorithms:["sha512"],...t});bZ.exports=uQ0;async function uQ0(t,e,r,s={}){let{memoize:n}=s;s=j6e(s);let i=await V6e(t,r,s),o=await H6e.insert(t,e,i.integrity,{...s,size:i.size});return n&&X6e.put(t,o,r,s),i.integrity}bZ.exports.stream=pQ0;function pQ0(t,e,r={}){let{memoize:s}=r;r=j6e(r);let n,i,o,a,c=new cQ0;if(s){let p=new aQ0().on("collect",l=>{a=l});c.push(p)}let u=V6e.stream(t,r).on("integrity",p=>{n=p}).on("size",p=>{i=p}).on("error",p=>{o=p});return c.push(u),c.push(new oQ0({async flush(){if(!o){let p=await H6e.insert(t,e,n,{...r,size:i});s&&a&&X6e.put(t,p,a,r),c.emit("integrity",n),c.emit("size",i)}}})),c}});var J6e=f(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.range=If.balanced=void 0;var lQ0=(t,e,r)=>{let s=t instanceof RegExp?Y6e(t,r):t,n=e instanceof RegExp?Y6e(e,r):e,i=s!==null&&n!=null&&(0,If.range)(s,n,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+s.length,i[1]),post:r.slice(i[1]+n.length)}};If.balanced=lQ0;var Y6e=(t,e)=>{let r=e.match(t);return r?r[0]:null},AQ0=(t,e,r)=>{let s,n,i,o,a,c=r.indexOf(t),u=r.indexOf(e,c+1),p=c;if(c>=0&&u>0){if(t===e)return[c,u];for(s=[],i=r.length;p>=0&&!a;){if(p===c)s.push(p),c=r.indexOf(t,p+1);else if(s.length===1){let l=s.pop();l!==void 0&&(a=[l,u])}else n=s.pop(),n!==void 0&&n<i&&(i=n,o=u),u=r.indexOf(e,p+1);p=c<u&&c>=0?c:u}s.length&&o!==void 0&&(a=[i,o])}return a};If.range=AQ0});var nve=f($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.EXPANSION_MAX=void 0;$m.expand=BQ0;var K6e=J6e(),Z6e="\0SLASH"+Math.random()+"\0",eve="\0OPEN"+Math.random()+"\0",mZ="\0CLOSE"+Math.random()+"\0",tve="\0COMMA"+Math.random()+"\0",rve="\0PERIOD"+Math.random()+"\0",dQ0=new RegExp(Z6e,"g"),fQ0=new RegExp(eve,"g"),hQ0=new RegExp(mZ,"g"),bQ0=new RegExp(tve,"g"),MQ0=new RegExp(rve,"g"),mQ0=/\\\\/g,gQ0=/\\{/g,zQ0=/\\}/g,OQ0=/\\,/g,EQ0=/\\./g;$m.EXPANSION_MAX=1e5;function MZ(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function yQ0(t){return t.replace(mQ0,Z6e).replace(gQ0,eve).replace(zQ0,mZ).replace(OQ0,tve).replace(EQ0,rve)}function CQ0(t){return t.replace(dQ0,"\\").replace(fQ0,"{").replace(hQ0,"}").replace(bQ0,",").replace(MQ0,".")}function sve(t){if(!t)return[""];let e=[],r=(0,K6e.balanced)("{","}",t);if(!r)return t.split(",");let{pre:s,body:n,post:i}=r,o=s.split(",");o[o.length-1]+="{"+n+"}";let a=sve(i);return i.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function BQ0(t,e={}){if(!t)return[];let{max:r=$m.EXPANSION_MAX}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),tC(yQ0(t),r,!0).map(CQ0)}function DQ0(t){return"{"+t+"}"}function qQ0(t){return/^-?0\d/.test(t)}function IQ0(t,e){return t<=e}function RQ0(t,e){return t>=e}function tC(t,e,r){let s=[],n=(0,K6e.balanced)("{","}",t);if(!n)return[t];let i=n.pre,o=n.post.length?tC(n.post,e,!1):[""];if(/\$$/.test(n.pre))for(let a=0;a<o.length&&a<e;a++){let c=i+"{"+n.body+"}"+o[a];s.push(c)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),u=a||c,p=n.body.indexOf(",")>=0;if(!u&&!p)return n.post.match(/,(?!,).*\}/)?(t=n.pre+"{"+n.body+mZ+n.post,tC(t,e,!0)):[t];let l;if(u)l=n.body.split(/\.\./);else if(l=sve(n.body),l.length===1&&l[0]!==void 0&&(l=tC(l[0],e,!1).map(DQ0),l.length===1))return o.map(h=>n.pre+l[0]+h);let A;if(u&&l[0]!==void 0&&l[1]!==void 0){let h=MZ(l[0]),M=MZ(l[1]),g=Math.max(l[0].length,l[1].length),y=l.length===3&&l[2]!==void 0?Math.abs(MZ(l[2])):1,O=IQ0;M<h&&(y*=-1,O=RQ0);let I=l.some(qQ0);A=[];for(let R=h;O(R,M);R+=y){let N;if(c)N=String.fromCharCode(R),N==="\\"&&(N="");else if(N=String(R),I){let T=g-N.length;if(T>0){let W=new Array(T+1).join("0");R<0?N="-"+W+N.slice(1):N=W+N}}A.push(N)}}else{A=[];for(let h=0;h<l.length;h++)A.push.apply(A,tC(l[h],e,!1))}for(let h=0;h<A.length;h++)for(let M=0;M<o.length&&s.length<e;M++){let g=i+A[h]+o[M];(!r||u||g)&&s.push(g)}}return s}});var ive=f(zv=>{"use strict";Object.defineProperty(zv,"__esModule",{value:!0});zv.assertValidPattern=void 0;var wQ0=1024*64,SQ0=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>wQ0)throw new TypeError("pattern is too long")};zv.assertValidPattern=SQ0});var ave=f(Ov=>{"use strict";Object.defineProperty(Ov,"__esModule",{value:!0});Ov.parseClass=void 0;var NQ0={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},rC=t=>t.replace(/[[\]\\-]/g,"\\$&"),vQ0=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\
Line truncated
|
|
|
|
|
globstar while`,e,A,r,h,M),this.matchOne(e.slice(A),r.slice(h),s))return this.debug("globstar found match!",A,c,M),!0;if(M==="."||M===".."||!n.dot&&M.charAt(0)==="."){this.debug("dot detected!",e,A,r,h);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(s&&(this.debug(`
|
|
|
|
|
>>> no match, partial?`,e,A,r,h),A===c))}let g;if(typeof p=="string"?(g=l===p,this.debug("string match",p,l,g)):(g=p.test(l),this.debug("pattern match",p,l,g)),!g)return!1}if(o===c&&a===u)return!0;if(o===c)return s;if(a===u)return o===c-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return(0,Be.braceExpand)(this.pattern,this.options)}parse(e){(0,Iv.assertValidPattern)(e);let r=this.options;if(e==="**")return Be.GLOBSTAR;if(e==="")return"";let s,n=null;(s=e.match(nk0))?n=r.dot?ok0:ik0:(s=e.match(jQ0))?n=(r.nocase?r.dot?KQ0:JQ0:r.dot?YQ0:$Q0)(s[1]):(s=e.match(ak0))?n=(r.nocase?r.dot?uk0:ck0:r.dot?pk0:lk0)(s):(s=e.match(ZQ0))?n=r.dot?tk0:ek0:(s=e.match(rk0))&&(n=sk0);let i=dve.AST.fromGlob(e,this.options).toMMPattern();return n&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:n}),i}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,s=r.noglobstar?dk0:r.dot?fk0:hk0,n=new Set(r.nocase?["i"]:[]),i=e.map(c=>{let u=c.map(l=>{if(l instanceof RegExp)for(let A of l.flags.split(""))n.add(A);return typeof l=="string"?Ok0(l):l===Be.GLOBSTAR?Be.GLOBSTAR:l._src});u.forEach((l,A)=>{let h=u[A+1],M=u[A-1];l!==Be.GLOBSTAR||M===Be.GLOBSTAR||(M===void 0?h!==void 0&&h!==Be.GLOBSTAR?u[A+1]="(?:\\/|"+s+"\\/)?"+h:u[A]=s:h===void 0?u[A-1]=M+"(?:\\/|\\/"+s+")?":h!==Be.GLOBSTAR&&(u[A-1]=M+"(?:\\/|\\/"+s+"\\/)"+h,u[A+1]=Be.GLOBSTAR))});let p=u.filter(l=>l!==Be.GLOBSTAR);if(this.partial&&p.length>=1){let l=[];for(let A=1;A<=p.length;A++)l.push(p.slice(0,A).join("/"));return"(?:"+l.join("|")+")"}return p.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];i="^"+o+i+a+"$",this.partial&&(i="^(?:\\/|"+o+i.slice(1,-1)+a+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}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 s=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let i=this.set;this.debug(this.pattern,"set",i);let o=n[n.length-1];if(!o)for(let a=n.length-2;!o&&a>=0;a--)o=n[a];for(let a=0;a<i.length;a++){let c=i[a],u=n;if(s.matchBase&&c.length===1&&(u=[o]),this.matchOne(u,c,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return Be.minimatch.defaults(e).Minimatch}};Be.Minimatch=Rf;var Ek0=OZ();Object.defineProperty(Be,"AST",{enumerable:!0,get:function(){return Ek0.AST}});var yk0=EZ();Object.defineProperty(Be,"escape",{enumerable:!0,get:function(){return yk0.escape}});var Ck0=yv();Object.defineProperty(Be,"unescape",{enumerable:!0,get:function(){return Ck0.unescape}});Be.minimatch.AST=dve.AST;Be.minimatch.Minimatch=Rf;Be.minimatch.escape=HQ0.escape;Be.minimatch.unescape=XQ0.unescape});var Eve=f(Fs=>{"use strict";var Bk0=Fs&&Fs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fs,"__esModule",{value:!0});Fs.Minipass=Fs.isWritable=Fs.isReadable=Fs.isStream=void 0;var Mve=typeof process=="object"&&process?process:{stdout:null,stderr:null},RZ=require("node:events"),Ove=Bk0(require("node:stream")),Dk0=require("node:string_decoder"),qk0=t=>!!t&&typeof t=="object"&&(t instanceof Tv||t instanceof Ove.default||(0,Fs.isReadable)(t)||(0,Fs.isWritable)(t));Fs.isStream=qk0;var Ik0=t=>!!t&&typeof t=="object"&&t instanceof RZ.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Ove.default.Writable.prototype.pipe;Fs.isReadable=Ik0;var Rk0=t=>!!t&&typeof t=="object"&&t instanceof RZ.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function";Fs.isWritable=Rk0;var Jp=Symbol("EOF"),Kp=Symbol("maybeEmitEnd"),GA=Symbol("emittedEnd"),Rv=Symbol("emittingEnd"),sC=Symbol("emittedError"),wv=Symbol("closed"),mve=Symbol("read"),Sv=Symbol("flush"),gve=Symbol("flushChunk"),la=Symbol("encoding"),Ym=Symbol("decoder"),rr=Symbol("flowing"),nC=Symbol("paused"),Jm=Symbol("resume"),sr=Symbol("buffer"),vs=Symbol("pipes"),nr=Symbol("bufferLength"),yZ=Symbol("bufferPush"),Nv=Symbol("bufferShift"),jr=Symbol("objectMode"),d1=Symbol("destroyed"),CZ=Symbol("error"),BZ=Symbol("emitData"),zve=Symbol("emitEnd"),DZ=Symbol("emitEnd2"),Vc=Symbol("async"),qZ=Symbol("abort"),vv=Symbol("aborted"),iC=Symbol("signal"),wf=Symbol("dataListeners"),di=Symbol("discarded"),oC=t=>Promise.resolve().then(t),wk0=t=>t(),Sk0=t=>t==="end"||t==="finish"||t==="prefinish",Nk0=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,vk0=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Fv=class{src;dest;opts;ondrain;constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[Jm](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyE
Line truncated
|
|
|
|
|
\r
|
|
|
|
|
`);if(A===-1){lF("have not received end of HTTP headers yet..."),i();return}let h=l.slice(0,A).toString("ascii").split(`\r
|
|
|
|
|
`),M=h.shift();if(!M)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=M.split(" "),y=+g[1],O=g.slice(2).join(" "),B={};for(let I of h){if(!I)continue;let R=I.indexOf(":");if(R===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${I}"`));let N=I.slice(0,R).toLowerCase(),T=I.slice(R+1).trimStart(),W=B[N];typeof W=="string"?B[N]=[W,T]:Array.isArray(W)?W.push(T):B[N]=T}lF("got proxy server response: %o %o",M,B),o(),e({connect:{statusCode:y,statusText:O,headers:B},buffered:l})}t.on("error",c),t.on("end",a),i()})}sg.parseProxyResponse=Q90});var UFe=f(Ao=>{"use strict";var k90=Ao&&Ao.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),U90=Ao&&Ao.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),QFe=Ao&&Ao.__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)&&k90(e,t,r);return U90(e,t),e},kFe=Ao&&Ao.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.HttpsProxyAgent=void 0;var DC=QFe(require("net")),LFe=QFe(require("tls")),G90=kFe(require("assert")),H90=kFe(d2()),X90=a3(),V90=require("url"),j90=_Fe(),qC=(0,H90.default)("https-proxy-agent"),AF=class extends X90.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new V90.URL(e):e,this.proxyHeaders=r?.headers??{},qC("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?PFe(r,"headers"):null,host:s,port:n}}async connect(e,r){let{proxy:s}=this;if(!r.host)throw new TypeError('No "host" provided');let n;if(s.protocol==="https:"){qC("Creating `tls.Socket`: %o",this.connectOpts);let A=this.connectOpts.servername||this.connectOpts.host;n=LFe.connect({...this.connectOpts,servername:A&&DC.isIP(A)?void 0:A})}else qC("Creating `net.Socket`: %o",this.connectOpts),n=DC.connect(this.connectOpts);let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=DC.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(s.username||s.password){let A=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(A).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(i))a+=`${A}: ${i[A]}\r
|
|
|
|
|
`;let c=(0,j90.parseProxyResponse)(n);n.write(`${a}\r
|
|
|
|
|
`);let{connect:u,buffered:p}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",$90),r.secureEndpoint){qC("Upgrading socket connection to TLS");let A=r.servername||r.host;return LFe.connect({...PFe(r,"host","path","port"),socket:n,servername:DC.isIP(A)?void 0:A})}return n}n.destroy();let l=new DC.Socket({writable:!1});return l.readable=!0,e.once("socket",A=>{qC("Replaying proxy buffer for failed request"),(0,G90.default)(A.listenerCount("data")>0),A.push(p),A.push(null)}),l}};AF.protocols=["http","https"];Ao.HttpsProxyAgent=AF;function $90(t){t.resume()}function PFe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var VFe=f(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var GFe=require("buffer"),Tf={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};tl.ERRORS=Tf;function Y90(t){if(!GFe.Buffer.isEncoding(t))throw new Error(Tf.INVALID_ENCODING)}tl.checkEncoding=Y90;function HFe(t){return typeof t=="number"&&isFinite(t)&&eU0(t)}tl.isFiniteInteger=HFe;function XFe(t,e){if(typeof t=="number"){if(!HFe(t)||t<0)throw new Error(e?Tf.INVALID_OFFSET:Tf.INVALID_LENGTH)}else throw new Error(e?Tf.INVALID_OFFSET_NON_NUMBER:Tf.INVALID_LENGTH_NON_NUMBER)}function J90(t){XFe(t,!1)}tl.checkLengthValue=J90;function K90(t){XFe(t,!0)}tl.checkOffsetValue=K90;function Z90(t,e){if(t<0||t>e.length)throw new Error(Tf.INVALID_TARGET_OFFSET)}tl.checkTargetOffset=Z90;function eU0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function tU0(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof GFe.Buffer.prototype[t]>"u")throw new Error(`Platform does not support Buffer.prototype.${t}.`)}tl.bigIntAndBufferInt64Check=tU0});var $Fe=f(mee=>{"use strict";Object.defineProperty(mee,"__esModule",{value:!0});var a0=VFe(),jFe=4096,rU0="utf8",Mee=class t{constructor(e){if(this.length=0,this._encoding=rU0,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(a0.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(a0.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(a0.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(a0.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(jFe);else{if(typeof e<"u")throw new Error(a0.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(jFe)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return a0.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return a0.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,r){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,r),this}insertInt8(e,r){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,r)}writeInt16BE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,r)}insertInt16BE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,r)}writeInt16LE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,r)}insertInt16LE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,r)}writeInt32BE(e,r){retur
Line truncated
|
|
|
|
|
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:s(function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var o=this.popStack();n.splice(1,0,o),this.push(this.source.functionCall(r,"call",n))},"blockValue"),ambiguousBlockValue:s(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:s(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:s(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:s(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:s(function(e){this.lastContext=e},"getContext"),pushContext:s(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:s(function(e,r,n,o){var i=0;!o&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[i++])):this.pushContext(),this.resolvePath("context",e,i,r,n)},"lookupOnContext"),lookupBlockParam:s(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:s(function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},"lookupData"),resolvePath:s(function(e,r,n,o,i){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(na0(this.options.strict&&i,this,r,n,e));return}for(var c=r.length,u=s(function(A){a.replaceStack(function(l){var b=a.nameLookup(l,r[A],e);return o?[" && ",b]:[" != null ? ",b," : ",l]})},"_loop"),p=n;p<c;p++)u(p)},"resolvePath"),resolvePossibleLambda:s(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:s(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:s(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:s(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:s(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:s(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:s(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:s(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:s(function(e,r){var n=this.nameLookup("decorators",r,"decorator"),o=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",o])," || fn;"])},"registerDecorator"),invokeHelper:s(function(e,r,n){var o=this.popStack(),i=this.setupHelper(e,r),a=[];n&&a.push(i.name),a.push(o),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var c=["(",this.itemsSeparatedBy(a,"||"),")"],u=this.source.functionCall(c,"call",i.callParams);this.push(u)},"invokeHelper"),itemsSeparatedBy:s(function(e,r){var n=[];n.push(e[0]);for(var o=1;o<e.length;o++)n.push(r,e[o]);return n},"itemsSeparatedBy"),invokeKnownHelper:s(function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:s(function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var o=this.setupHelper(0,e,r),i=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",i," || ",n,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,o.paramsInit?["),(",o.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("h
Line truncated
|
|
|
|
|
`,e};d1.prototype.Program=function(t){var e="",r=t.body,n=void 0,o=void 0;if(t.blockParams){var i="BLOCK PARAMS: [";for(n=0,o=t.blockParams.length;n<o;n++)i+=" "+t.blockParams[n];i+=" ]",e+=this.pad(i)}for(n=0,o=r.length;n<o;n++)e+=this.accept(r[n]);return this.padding--,e};d1.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};d1.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};d1.prototype.BlockStatement=d1.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};d1.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+" }}")};d1.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+" }}")};d1.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};d1.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};d1.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,o=0,i=e.length;o<i;o++)r.push(this.accept(e[o]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};d1.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};d1.prototype.StringLiteral=function(t){return'"'+t.value+'"'};d1.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};d1.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};d1.prototype.UndefinedLiteral=function(){return"UNDEFINED"};d1.prototype.NullLiteral=function(){return"NULL"};d1.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,o=e.length;n<o;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};d1.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var eQ=m((_r1,Nle)=>{var Q4=Dle().default,Rle=qle();Q4.PrintVisitor=Rle.PrintVisitor;Q4.print=Rle.print;Nle.exports=Q4;function Ile(t,e){var r=require("fs"),n=r.readFileSync(e,"utf8");t.exports=Q4.compile(n)}s(Ile,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=Ile,require.extensions[".hbs"]=Ile)});var X4=m(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.Signature=qc.Envelope=void 0;qc.Envelope={fromJSON(t){return{payload:H4(t.payload)?Buffer.from(Ule(t.payload)):Buffer.alloc(0),payloadType:H4(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>qc.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=Gle(t.payload)),t.payloadType!==""&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>qc.Signature.toJSON(r))),e}};qc.Signature={fromJSON(t){return{sig:H4(t.sig)?Buffer.from(Ule(t.sig)):Buffer.alloc(0),keyid:H4(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=Gle(t.sig)),t.keyid!==""&&(e.keyid=t.keyid),e}};function Ule(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}s(Ule,"bytesFromBase64");function Gle(t){return globalThis.Buffer.from(t).toString("base64")}s(Gle,"base64FromBytes");function H4(t){return t!=null}s(H4,"isSet")});var Xle=m(V4=>{"use strict";Object.defineProperty(V4,"__esModule",{value:!0});V4.Timestamp=void 0;V4.Timestamp={fromJSON(t){return{seconds:Hle(t.seconds)?globalThis.String(t.seconds):"0",nanos:Hle(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!=="0"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function Hle(t){return t!=null}s(Hle,"isSet")});var la=m(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.TimeRange=Be.X509CertificateChain=Be.SubjectAlternativeName=Be.X509Certificate=Be.DistinguishedName=Be.ObjectIdentifierValuePair=Be.ObjectIdentifier=Be.PublicKeyIdentifier=Be.PublicKey=Be.RFC3161SignedTimestamp=Be.LogId=Be.MessageSignature=Be.HashOutput=Be.SubjectAlternativeNameType=Be.PublicKeyDetails=Be.HashAlgorithm=void 0;Be.hashAlgorithmFromJSON=Jle;Be.hashAlgorithmToJSON=Yle;Be.publicKeyDetailsFromJSON=$le;Be.publicKeyDetailsToJSON=jle;Be.subjectAlternativeNameTypeFromJSON=Kle;Be.subjectAlternativeNameTypeToJSON=Zle;var Ea0=Xle(),Or;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",t[t.SHA2_256=1]="SHA2_256",t[t.SHA2_384=2]="SHA2_384",t[t.SHA2_512=3]="SHA2_512",t[t.SHA3_256=4]="SH
Line truncated
|
|
|
|
|
`).join(`
|
|
|
|
|
`+i),t.push(n+"m+"+BT.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=q$0()+e+" "+t[0]}function q$0(){return pr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function I$0(...t){return process.stderr.write(CT.formatWithOptions(pr.inspectOpts,...t)+`
|
|
|
|
|
`)}function R$0(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function w$0(){return process.env.DEBUG}function S$0(t){t.inspectOpts={};let e=Object.keys(pr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=pr.inspectOpts[e[r]]}BT.exports=hte()(pr);var{formatters:_We}=BT.exports;_We.o=function(t){return this.inspectOpts.colors=this.useColors,CT.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};_We.O=function(t){return this.inspectOpts.colors=this.useColors,CT.inspect(t,this.inspectOpts)}});var Mte=f((MQt,bte)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?bte.exports=WWe():bte.exports=LWe()});var QWe=f((mQt,PWe)=>{var N$0=require("dns"),v$0=["if-modified-since","if-none-match","if-unmodified-since","if-match","if-range"],F$0=t=>{let{strictSSL:e,...r}={...t};if(r.method=r.method?r.method.toUpperCase():"GET",e==null?r.rejectUnauthorized=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0":r.rejectUnauthorized=e!==!1,!r.retry)r.retry={retries:0};else if(typeof r.retry=="string"){let s=parseInt(r.retry,10);isFinite(s)?r.retry={retries:s}:r.retry={retries:0}}else typeof r.retry=="number"?r.retry={retries:r.retry}:r.retry={retries:0,...r.retry};return r.dns={ttl:300*1e3,lookup:N$0.lookup,...r.dns},r.cache=r.cache||"default",r.cache==="default"&&Object.keys(r.headers||{}).some(n=>v$0.includes(n.toLowerCase()))&&(r.cache="no-store"),r.cacheAdditionalHeaders=r.cacheAdditionalHeaders||[],r.cacheManager&&!r.cachePath&&(r.cachePath=r.cacheManager),r};PWe.exports=F$0});var gte=f((gQt,XWe)=>{var kWe=vJ(),UWe=LJ(),T$0=Cy(),GWe={shared:!1,ignoreCargoCult:!0},x$0={status:200,headers:{}},Sg=t=>{let e={method:t.method,url:t.url,headers:{},compress:t.compress};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},HWe=t=>{let e={status:t.status,headers:{}};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},mte=class{constructor({entry:e,request:r,response:s,options:n}){this.entry=e,this.request=Sg(r),this.response=HWe(s),this.options=n,this.policy=new kWe(this.request,this.response,GWe),this.entry&&(this.policy._responseTime=this.entry.metadata.time)}static storable(e,r){return!r.cachePath||r.cache==="no-store"||!["GET","HEAD"].includes(e.method)?!1:new kWe(Sg(e),x$0,GWe).storable()}satisfies(e){let r=Sg(e);if(this.request.headers.host!==r.headers.host||this.request.compress!==r.compress)return!1;let s=new UWe(this.request),n=new UWe(r);return JSON.stringify(s.mediaTypes())!==JSON.stringify(n.mediaTypes())||JSON.stringify(s.languages())!==JSON.stringify(n.languages())||JSON.stringify(s.encodings())!==JSON.stringify(n.encodings())?!1:this.options.integrity?T$0.parse(this.options.integrity).match(this.entry.integrity):!0}storable(){return this.policy.storable()}get mustRevalidate(){return!!this.policy._rescc["must-revalidate"]}needsRevalidation(e){let r=Sg(e);return r.method="GET",!this.policy.satisfiesWithoutRevalidation(r)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let r=Sg(e);return this.policy.revalidationHeaders(r)}revalidated(e,r){let s=Sg(e),n=HWe(r);return!this.policy.revalidatedPolicy(s,n).modified}};XWe.exports=mte});var jWe=f((zQt,VWe)=>{var zte=class extends Error{constructor(e){super(`request to ${e} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};VWe.exports={NotCachedError:zte}});var Ete=f((OQt,$We)=>{"use strict";var W$0=mf(),Ote=class extends W$0{#e=[];#t=new Map;constructor(e,...r){super(),this.#e=e.events,r.length&&this.push(...r)}on(e,r){return this.#e.includes(e)&&this.#t.has(e)?r(...this.#t.get(e)):super.on(e,r)}emit(e,...r){return this.#e.includes(e)&&this.#t.set(e,r),super.emit(e,...r)}};$We.exports=Ote});var JWe=f((EQt,YWe)=>{var{URL:_$0,format:L$0}=require("url"),P$0={auth:!1,fragment:!1,search:!0,unicode:!1},Q$0=t=>{let e=new _$0(t.url);return`make-fetch-happen:request-cache:${L$0(e,P$0)}`};YWe.exports=Q$0});var KWe=f((yQt,k$0)=>{k$0.exports={name:"make-fetch-happen",version:"15.0.4",description:"Opinionated, caching, retrying fetch client",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",posttest:"npm run lint",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/make-fetch-happen.git"},keywords:["http","request","fetch","mean girls","caching","cache","subresource integrity"],author:"GitHub Inc.",license:"ISC",dependencies:{"@gar/promise-retry":"^1.0.0","@npmcli/agent":"^4.0.0",cacache:"^20.0.1","http-cache-semantics":"^4.1.1",minipass:"^7.0.2","minipass-fetch":"^5.0.0","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4",negotiator:"^1.0.0","proc-log":"^6.0.0",ssri:"^13.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",nock:"^13.2.4","safe-buffer":"^5.2.1","standard-version":"^9.3.2",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},tap:{color:1,files:"test/*.js","check-coverage":!0,timeout:60,"nyc-arg":["--exclude","tap-snapshots/**"]},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}});var qT=f((CQt,e_e)=>{var{Minipass:U$0}=Qr(),DT=Np(),{promiseRetry:G$0}=pee(),H$0=Cy(),{log:ZWe}=aF(
Line truncated
|
|
|
|
|
`).forEach(r=>{r.match(wJ0)||r.match(SJ0)||(e+=r)}),Buffer.from(e,"base64")}function vJ0(t,e="CERTIFICATE"){let s=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`
|
|
|
|
|
`+i),t.push(o+"m+"+SB.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Yp0()+e+" "+t[0]}s(Jp0,"formatArgs");function Yp0(){return ot.inspectOpts.hideDate?"":new Date().toISOString()+" "}s(Yp0,"getDate");function $p0(...t){return process.stderr.write(wB.formatWithOptions(ot.inspectOpts,...t)+`
|
|
|
|
|
`)}s($p0,"log");function jp0(t){t?process.env.DEBUG=t:delete process.env.DEBUG}s(jp0,"save");function Kp0(){return process.env.DEBUG}s(Kp0,"load");function Zp0(t){t.inspectOpts={};let e=Object.keys(ot.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=ot.inspectOpts[e[r]]}s(Zp0,"init");SB.exports=o8()(ot);var{formatters:zde}=SB.exports;zde.o=function(t){return this.inspectOpts.colors=this.useColors,wB.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};zde.O=function(t){return this.inspectOpts.colors=this.useColors,wB.inspect(t,this.inspectOpts)}});var s8=m((Pi1,i8)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?i8.exports=hde():i8.exports=gde()});var WB=m(b1=>{"use strict";Object.defineProperty(b1,"__esModule",{value:!0});b1.DownloadHTTPError=b1.DownloadLengthMismatchError=b1.DownloadError=b1.ExpiredMetadataError=b1.EqualVersionError=b1.BadVersionError=b1.RepositoryError=b1.PersistError=b1.RuntimeError=b1.ValueError=void 0;var a8=class extends Error{static{s(this,"ValueError")}};b1.ValueError=a8;var c8=class extends Error{static{s(this,"RuntimeError")}};b1.RuntimeError=c8;var u8=class extends Error{static{s(this,"PersistError")}};b1.PersistError=u8;var _m=class extends Error{static{s(this,"RepositoryError")}};b1.RepositoryError=_m;var FB=class extends _m{static{s(this,"BadVersionError")}};b1.BadVersionError=FB;var p8=class extends FB{static{s(this,"EqualVersionError")}};b1.EqualVersionError=p8;var A8=class extends _m{static{s(this,"ExpiredMetadataError")}};b1.ExpiredMetadataError=A8;var Qm=class extends Error{static{s(this,"DownloadError")}};b1.DownloadError=Qm;var l8=class extends Qm{static{s(this,"DownloadLengthMismatchError")}};b1.DownloadLengthMismatchError=l8;var d8=class extends Qm{static{s(this,"DownloadHTTPError")}statusCode;constructor(e,r){super(e),this.statusCode=r}};b1.DownloadHTTPError=d8});var Ede=m(ed=>{"use strict";var f8=ed&&ed.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ed,"__esModule",{value:!0});ed.withTempFile=void 0;var b8=f8(require("fs/promises")),eA0=f8(require("os")),Ode=f8(require("path")),tA0=s(async t=>rA0(async e=>t(Ode.default.join(e,"tempfile"))),"withTempFile");ed.withTempFile=tA0;var rA0=s(async t=>{let e=await b8.default.realpath(eA0.default.tmpdir()),r=await b8.default.mkdtemp(e+Ode.default.sep);try{return await t(r)}finally{await b8.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}},"withTempDir")});var yde=m((Xi1,Cde)=>{var M8=class{static{s(this,"RetryOperation")}#e=1;#t=null;#n=[];#r=null;#o;#i=null;#a;#s;#u=null;#c;constructor(e,r={}){this.#a=[...e],this.#s=[...e],this.#c=r.unref,this.#o=r.maxRetryTime||1/0,r.forever&&(this.#t=[...this.#s])}get timeouts(){return[...this.#s]}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 o=0;o<this.#n.length;o++){let i=this.#n[o],{message:a}=i;n[a]||(n[a]=0),n[a]++,n[a]>=r&&(e=i,r=n[a])}}return e}reset(){this.#e=1,this.#s=[...this.#a]}stop(){this.#u&&clearTimeout(this.#u),this.#s=[],this.#t=null}retry(e){if(this.#n.push(e),new Date().getTime()-this.#i>=this.#o)return this.#n.unshift(new Error("RetryOperation timeout occurred")),!1;let r=this.#s.shift();if(r===void 0)if(this.#t)this.#n.pop(),r=this.#t.at(-1);else return!1;return this.#u=setTimeout(()=>{this.#e++,this.#r(this.#e)},r),this.#c&&this.#u.unref(),!0}attempt(e){this.#r=e,this.#i=new Date().getTime(),this.#r(this.#e)}};Cde.exports={RetryOperation:M8}});var qde=m((Ji1,Dde)=>{var{RetryOperation:nA0}=yde(),Bde=s((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"),oA0=s(t=>t?.code==="EPROMISERETRY"&&Object.hasOwn(t,"retried"),"isRetryError"),iA0=s(async(t,e={})=>{let r=[];if(e instanceof Array)r=[...e];else{e.retries===1/0&&(e.forever=!0,delete e.retries);let o={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1,...e};if(o.minTimeout>o.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");if(o.retries){for(let i=0;i<o.retries;i++)r.push(Bde(i,o));r.sort((i,a)=>i-a)}else e.forever&&r.push(Bde(0,o))}let n=new nA0(r,{forever:e.forever,unref:e.unref,maxRetryTime:e.maxRetryTime});return new Promise(function(o,i){n.attempt(async a=>{try{let c=await t(u=>{throw Object.assign(new Error("Retrying"),{code:"EPROMISERETRY",retried:u})},a,n);return o(c)}catch(c){if(!oA0(c))return i(c);if(!n.retry(c.retried||new Error))return i(c.retried)}})})},"promiseRetry");Dde.exports={promiseRetry:iA0}});var z8=m(Wc=>{"use strict";var h8=Wc&&Wc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Wc,"__esModule",{value:!0});Wc.DefaultFetcher=Wc.BaseFetcher=void 0;var sA0=h8(s8()),Ide=h8(require("fs")),aA0=h8(require("util")),Rde=WB(),cA0=Ede(),uA0=qde(),pA0=(0,sA0.default)("tuf:fetch"),AA0="User-Agent",xB=class{static{s(this,"BaseFetcher")}async downloadFile(e,r,n){return(0,cA0.withTempFile)(async o=>{let i=await this.fetch(e),a=0,c=Ide.default.createWriteStream(o),u=i.getReader();try{for(;;){let{done:p,value:A}=await u.read();if(p)break;if(a+=A.length,a>r)throw new Rde.DownloadLengthMismatchError("Max length reached");await lA0(c,Buffer.from(A))}}finally{u.releaseLock(),await aA0.default.promisify(c.close).bind(c)()}return n(o)})}async downloadBytes(e,r){return this.downloadFile(e,r,async n=>{let o=Ide.defau
Line truncated
|
|
|
|
|
`).forEach(r=>{r.match(ml0)||r.match(hl0)||(e+=r)}),Buffer.from(e,"base64")}s(zl0,"toDER");function gl0(t,e="CERTIFICATE"){let n=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...n,`-----END ${e}-----`].join(`
|
|
|
|
|
`).concat(`
|
|
|
|
|
`)}});var JT=f(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.SHA2_HASH_ALGOS=od.RSA_SIGNATURE_ALGOS=od.ECDSA_SIGNATURE_ALGOS=void 0;od.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"};od.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"};od.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 u1e=f(KT=>{"use strict";Object.defineProperty(KT,"__esModule",{value:!0});KT.RFC3161TimestampVerificationError=void 0;var c1e=class extends Error{};KT.RFC3161TimestampVerificationError=c1e});var Y_e=f(ou=>{"use strict";var FJ0=ou&&ou.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),TJ0=ou&&ou.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xJ0=ou&&ou.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!=="default"&&FJ0(r,e,s[n]);return TJ0(r,e),r}})();Object.defineProperty(ou,"__esModule",{value:!0});ou.TSTInfo=void 0;var $_e=xJ0(_g()),WJ0=JT(),_J0=u1e(),p1e=class{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 WJ0.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=$_e.digest(this.messageImprintHashAlgorithm,e);if(!$_e.bufferEqual(r,this.messageImprintHashedMessage))throw new _J0.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};ou.TSTInfo=p1e});var K_e=f(au=>{"use strict";var LJ0=au&&au.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),PJ0=au&&au.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),QJ0=au&&au.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!=="default"&&LJ0(r,e,s[n]);return PJ0(r,e),r}})();Object.defineProperty(au,"__esModule",{value:!0});au.RFC3161Timestamp=void 0;var kJ0=jT(),l1e=QJ0(_g()),J_e=JT(),t4=u1e(),UJ0=Y_e(),GJ0="1.2.840.113549.1.7.2",HJ0="1.2.840.113549.1.9.16.1.4",XJ0="1.2.840.113549.1.9.4",A1e=class t{root;constructor(e){this.root=e}static parse(e){let r=kJ0.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 J_e.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return J_e.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new UJ0.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new t4.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==GJ0)throw new t4.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==HJ0)throw new t4.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=l1e.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!l1e.bufferEqual(e,r))throw new t4.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(e){let r=this.signedAttrsObj.toD
Line truncated
|
|
|
|
|
`)}s(gl0,"fromDER")});var jB=m(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.SHA2_HASH_ALGOS=_c.RSA_SIGNATURE_ALGOS=_c.ECDSA_SIGNATURE_ALGOS=void 0;_c.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"};_c.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"};_c.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 U8=m(KB=>{"use strict";Object.defineProperty(KB,"__esModule",{value:!0});KB.RFC3161TimestampVerificationError=void 0;var k8=class extends Error{static{s(this,"RFC3161TimestampVerificationError")}};KB.RFC3161TimestampVerificationError=k8});var ibe=m(ji=>{"use strict";var Ol0=ji&&ji.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),El0=ji&&ji.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Cl0=ji&&ji.__importStar||(function(){var t=s(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&Ol0(r,e,n[o]);return El0(r,e),r}})();Object.defineProperty(ji,"__esModule",{value:!0});ji.TSTInfo=void 0;var obe=Cl0(sd()),yl0=jB(),Bl0=U8(),G8=class{static{s(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 yl0.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=obe.digest(this.messageImprintHashAlgorithm,e);if(!obe.bufferEqual(r,this.messageImprintHashedMessage))throw new Bl0.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};ji.TSTInfo=G8});var abe=m(Ki=>{"use strict";var Dl0=Ki&&Ki.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ql0=Ki&&Ki.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Il0=Ki&&Ki.__importStar||(function(){var t=s(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&Dl0(r,e,n[o]);return ql0(r,e),r}})();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.RFC3161Timestamp=void 0;var Rl0=JB(),H8=Il0(sd()),sbe=jB(),Xm=U8(),Nl0=ibe(),wl0="1.2.840.113549.1.7.2",Sl0="1.2.840.113549.1.9.16.1.4",Fl0="1.2.840.113549.1.9.4",X8=class t{static{s(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}static parse(e){let r=Rl0.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 sbe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return sbe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new Nl0.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new Xm.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==wl0)throw new Xm.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==Sl0)throw new Xm.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=H8.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].valu
Line truncated
|
|
|
|
|
|
|
|
|
|
`,aZ0=/\u2014 (\S+) (\S+)\n/g;function cZ0(t,e){let r=t.inclusionProof,s=L1e.fromString(r.checkpoint.envelope),n=lx.fromString(s.note);if(!uZ0(s,e))throw new o4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return n}function uZ0(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let n=e.find(i=>BLe.crypto.bufferEqual(i.logID.subarray(0,4),s.keyHint)&&i.baseURL.match(s.name));return n?BLe.crypto.verify(r,n.publicKey,s.signature):!1})}var L1e=class t{note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(_1e))throw new o4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(_1e),s=e.slice(0,r+1),i=e.slice(r+_1e.length).matchAll(aZ0),o=Array.from(i,a=>{let[,c,u]=a,p=Buffer.from(u,"base64");if(p.length<5)throw new o4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:c,keyHint:p.subarray(0,4),signature:p.subarray(4)}});if(o.length===0)throw new o4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,o)}},lx=class t{origin;logSize;logHash;rest;constructor(e,r,s,n){this.origin=e,this.logSize=r,this.logHash=s,this.rest=n}static fromString(e){let r=e.trimEnd().split(`
|
|
|
|
|
`);if(r.length<3)throw new o4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],n=BigInt(r[1]),i=Buffer.from(r[2],"base64"),o=r.slice(3);return new t(s,n,i,o)}};a4.LogCheckpoint=lx});var qLe=f(U1e=>{"use strict";Object.defineProperty(U1e,"__esModule",{value:!0});U1e.verifyMerkleInclusion=AZ0;var k1e=ba(),P1e=Kr(),pZ0=Buffer.from([0]),lZ0=Buffer.from([1]);function AZ0(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),n=BigInt(e.logSize);if(s<0n||s>=n)throw new P1e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${s}`});let{inner:i,border:o}=dZ0(s,n);if(r.hashes.length!==i+o)throw new P1e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=r.hashes.slice(0,i),c=r.hashes.slice(i),u=gZ0(t.canonicalizedBody),p=hZ0(fZ0(u,a,s),c);if(!k1e.crypto.bufferEqual(p,e.logHash))throw new P1e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function dZ0(t,e){let r=bZ0(t,e),s=MZ0(t>>BigInt(r));return{inner:r,border:s}}function fZ0(t,e,r){return e.reduce((s,n,i)=>r>>BigInt(i)&BigInt(1)?Q1e(n,s):Q1e(s,n),t)}function hZ0(t,e){return e.reduce((r,s)=>Q1e(s,r),t)}function bZ0(t,e){return mZ0(t^e-BigInt(1))}function MZ0(t){return t.toString(2).split("1").length-1}function mZ0(t){return t===0n?0:t.toString(2).length}function Q1e(t,e){return k1e.crypto.digest("sha256",lZ0,t,e)}function gZ0(t){return k1e.crypto.digest("sha256",pZ0,t)}});var RLe=f(G1e=>{"use strict";Object.defineProperty(G1e,"__esModule",{value:!0});G1e.verifyTLogSET=EZ0;var ILe=ba(),zZ0=Kr(),OZ0=Qg();function EZ0(t,e){if(!(0,OZ0.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(n=>{let i=yZ0(t),o=Buffer.from(ILe.json.canonicalize(i),"utf8"),a=t.inclusionPromise.signedEntryTimestamp;return ILe.crypto.verify(o,n.publicKey,a)}))throw new zZ0.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function yZ0(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:n}=t;return{body:n.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var SLe=f(Ax=>{"use strict";Object.defineProperty(Ax,"__esModule",{value:!0});Ax.verifyTLogBody=IZ0;Ax.verifyTLogInclusion=RZ0;var wLe=A0e(),V1e=Kr(),H1e=ELe(),X1e=yLe(),CZ0=CLe(),BZ0=DLe(),DZ0=qLe(),qZ0=RLe();function IZ0(t,e){let{kind:r,version:s}=t.kindVersion,n=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==n.kind||s!==n.apiVersion)throw new V1e.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${s}, received: ${n.kind}/${n.apiVersion}`});switch(r){case"dsse":if(s==H1e.DSSE_API_VERSION_V1)return(0,H1e.verifyDSSETLogBody)(n,e);{let i=wLe.Entry.fromJSON(n);return(0,H1e.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,CZ0.verifyIntotoTLogBody)(n,e);case"hashedrekord":if(s==X1e.HASHEDREKORD_API_VERSION_V1)return(0,X1e.verifyHashedRekordTLogBody)(n,e);{let i=wLe.Entry.fromJSON(n);return(0,X1e.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new V1e.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}function RZ0(t,e){let r=!1;if(wZ0(t)&&((0,qZ0.verifyTLogSET)(t,e),r=!0),SZ0(t)){let s=(0,BZ0.verifyCheckpoint)(t,e);(0,DZ0.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new V1e.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}function wZ0(t){return t.inclusionPromise!==void 0}function SZ0(t){return t.inclusionProof!==void 0}});var WLe=f(dx=>{"use strict";Object.defineProperty(dx,"__esModule",{value:!0});dx.Verifier=void 0;var NZ0=require("util"),kg=Kr(),NLe=bLe(),vLe=mLe(),FLe=OLe(),TLe=SLe(),j1e=class{trustMaterial;options;constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,timestampThreshold:r.timestampThreshold??r.tsaThreshold??1,tsaThreshold:0}}verify(e,r){let s=this.verifyTimestamps(e),n=this.verifySigningKey(e,s);return this.verifyTLogs(e),this.verifySignature(e,n),r&&this.verifyPolicy(r,n.identity||{}),n}verifyTimestamps(e){let r=0,s=e.timestamps.map(n=>{switch(n.$case){case"timestamp-authority":return r++,(0,FLe.getTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities);case"transparency-log":return r++,(0,FLe.getTLogTimestamp)(n.tlogEntry)}});if(xLe(s))throw new kg.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(r<this.options.timestampThreshold)throw new kg.VerificationError({code:"TIMESTAMP_ERROR",message:`expected ${this.options.timestampThreshold} timestamps, got ${r}`});return s.map(n=>n.timestamp)}verifySigningKey({key:e},r){switch(e.$case){case"public-key":return(0,NLe.verifyPublicKey)(e.hint,r,this.trustMaterial);case"certificate":{let s=(0,NLe.verifyCertificate)(e.certificate,r,this.trustMaterial);if(xLe(s.scts))throw new kg.Verificat
Line truncated
|
|
|
|
|
[`+w+"] ";for(x in arguments[0])i(arguments[0],x)&&(D+=x+": "+arguments[0][x]+", ");D=D.slice(0,-2)}else D=arguments[w];z.push(D)}W(d+`
|
|
|
|
|
Arguments: `+Array.prototype.slice.call(z).join("")+`
|
|
|
|
|
`+new Error().stack),m=!1}return b.apply(this,arguments)},b)}var ge={};function Fe(d,b){e.deprecationHandler!=null&&e.deprecationHandler(d,b),ge[d]||(W(b),ge[d]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function Z(d){return typeof Function<"u"&&d instanceof Function||Object.prototype.toString.call(d)==="[object Function]"}function we(d){var b,m;for(m in d)i(d,m)&&(b=d[m],Z(b)?this[m]=b:this["_"+m]=b);this._config=d,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function J(d,b){var m=l({},d),z;for(z in b)i(b,z)&&(n(d[z])&&n(b[z])?(m[z]={},l(m[z],d[z]),l(m[z],b[z])):b[z]!=null?m[z]=b[z]:delete m[z]);for(z in d)i(d,z)&&!i(b,z)&&n(d[z])&&(m[z]=l({},m[z]));return m}function Ne(d){d!=null&&this.set(d)}var Ge;Object.keys?Ge=Object.keys:Ge=function(d){var b,m=[];for(b in d)i(d,b)&&m.push(b);return m};var C0={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function M0(d,b,m){var z=this._calendar[d]||this._calendar.sameElse;return Z(z)?z.call(b,m):z}function P0(d,b,m){var z=""+Math.abs(d),D=b-z.length,w=d>=0;return(w?m?"+":"":"-")+Math.pow(10,Math.max(0,D)).toString().substr(1)+z}var Dt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V0=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ar={},$t={};function Ce(d,b,m,z){var D=z;typeof z=="string"&&(D=function(){return this[z]()}),d&&($t[d]=D),b&&($t[b[0]]=function(){return P0(D.apply(this,arguments),b[1],b[2])}),m&&($t[m]=function(){return this.localeData().ordinal(D.apply(this,arguments),d)})}function md(d){return d.match(/\[[\s\S]/)?d.replace(/^\[|\]$/g,""):d.replace(/\\/g,"")}function qo(d){var b=d.match(Dt),m,z;for(m=0,z=b.length;m<z;m++)$t[b[m]]?b[m]=$t[b[m]]:b[m]=md(b[m]);return function(D){var w="",x;for(x=0;x<z;x++)w+=Z(b[x])?b[x].call(D,d):b[x];return w}}function I0(d,b){return d.isValid()?(b=St(b,d.localeData()),Ar[b]=Ar[b]||qo(b),Ar[b](d)):d.localeData().invalidDate()}function St(d,b){var m=5;function z(D){return b.longDateFormat(D)||D}for(V0.lastIndex=0;m>=0&&V0.test(d);)d=d.replace(V0,z),V0.lastIndex=0,m-=1;return d}var mh={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function gh(d){var b=this._longDateFormat[d],m=this._longDateFormat[d.toUpperCase()];return b||!m?b:(this._longDateFormat[d]=m.match(Dt).map(function(z){return z==="MMMM"||z==="MM"||z==="DD"||z==="dddd"?z.slice(1):z}).join(""),this._longDateFormat[d])}var fz="Invalid date";function zu(){return this._invalidDate}var S="%d",Q=/\d{1,2}/;function k(d){return this._ordinal.replace("%d",d)}var Y={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function _e(d,b,m,z){var D=this._relativeTime[m];return Z(D)?D(d,b,m,z):D.replace(/%d/i,d)}function A0(d,b){var m=this._relativeTime[d>0?"future":"past"];return Z(m)?m(b):m.replace(/%s/i,b)}var it={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function je(d){return typeof d=="string"?it[d]||it[d.toLowerCase()]:void 0}function Q0(d){var b={},m,z;for(z in d)i(d,z)&&(m=je(z),m&&(b[m]=d[z]));return b}var dB={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function WW(d){var b=[],m;for(m in d)i(d,m)&&b.push({unit:m,priority:dB[m]});return b.sort(function(z,D){return z.priority-D.priority}),b}var fB=/\d/,ts=/\d\d/,hB=/\d{3}/,hz=/\d{4}/,zh=/[+-]?\d{6}/,j0=/\d\d?/,bB=/\d\d\d\d?/,MB=/\d\d\d\d\d\d?/,Oh=/\d{1,3}/,gd=/\d{1,4}/,Eh=/[+-]?\d{1,6}/,Ou=/\d+/,yh=/[+-]?\d+/,mB=/Z|[+-]\d\d:?\d\d/gi,Ch=/Z|[+-]\d\d(?::?\d\d)?/gi,_W=/[+-]?\d+(\.\d{1,3})?/,zd=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,gl=/^[1-9]\d?/,bz=/^([1-9]\d|\d)/,Bh;Bh={};function oe(d,b,m){Bh[d]=Z(b
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}P4.exports=Sat,P4.exports.__esModule=!0,P4.exports.default=P4.exports});var sHe=f((IVt,Q4)=>{var Nat=QUe(),vat=NGe(),Fat=tHe(),Tat=rHe();function xat(t,e){return Nat(t)||vat(t,e)||Fat(t,e)||Tat()}Q4.exports=xat,Q4.exports.__esModule=!0,Q4.exports.default=Q4.exports});var iHe=f((RVt,nHe)=>{"use strict";var Wat=uW().forEach,_at=T4(),Lat=_at("forEach");nHe.exports=Lat?[].forEach:function(e){return Wat(this,e,arguments.length>1?arguments[1]:void 0)}});var aHe=f(()=>{"use strict";var Pat=nt(),oHe=iHe();Pat({target:"Array",proto:!0,forced:[].forEach!==oHe},{forEach:oHe})});var uHe=f((NVt,cHe)=>{"use strict";aHe();var Qat=ya();cHe.exports=Qat("Array","forEach")});var lHe=f((vVt,pHe)=>{"use strict";var kat=uHe();pHe.exports=kat});var AHe=f(()=>{});var fHe=f((xVt,dHe)=>{"use strict";var Uat=iz(),Gat=Ps(),Hat=yn(),Xat=lHe();AHe();var Hse=Array.prototype,Vat={DOMTokenList:!0,NodeList:!0};dHe.exports=function(t){var e=t.forEach;return t===Hse||Hat(Hse,t)&&e===Hse.forEach||Gat(Vat,Uat(t))?Xat:e}});var Xse=f((WVt,hHe)=>{hHe.exports=fHe()});var bHe=f(()=>{"use strict";var jat=nt(),$at=Xx().includes,Yat=Vt(),Jat=Dre(),Kat=Yat(function(){return!Array(1).includes()});jat({target:"Array",proto:!0,forced:Kat},{includes:function(e){return $at(this,e,arguments.length>1?arguments[1]:void 0)}});Jat("includes")});var mHe=f((PVt,MHe)=>{"use strict";bHe();var Zat=ya();MHe.exports=Zat("Array","includes")});var zHe=f((QVt,gHe)=>{"use strict";var ect=Mi(),tct=ll(),rct=h1(),sct=rct("match");gHe.exports=function(t){var e;return ect(t)&&((e=t[sct])!==void 0?!!e:tct(t)==="RegExp")}});var EHe=f((kVt,OHe)=>{"use strict";var nct=zHe(),ict=TypeError;OHe.exports=function(t){if(nct(t))throw new ict("The method doesn't accept regular expressions");return t}});var CHe=f((UVt,yHe)=>{"use strict";var oct=h1(),act=oct("match");yHe.exports=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[act]=!1,"/./"[t](e)}catch{}}return!1}});var DHe=f(()=>{"use strict";var cct=nt(),uct=wt(),pct=EHe(),lct=sh(),BHe=Mu(),Act=CHe(),dct=uct("".indexOf);cct({target:"String",proto:!0,forced:!Act("includes")},{includes:function(e){return!!~dct(BHe(lct(this)),BHe(pct(e)),arguments.length>1?arguments[1]:void 0)}})});var IHe=f((XVt,qHe)=>{"use strict";DHe();var fct=ya();qHe.exports=fct("String","includes")});var SHe=f((VVt,wHe)=>{"use strict";var RHe=yn(),hct=mHe(),bct=IHe(),Vse=Array.prototype,jse=String.prototype;wHe.exports=function(t){var e=t.includes;return t===Vse||RHe(Vse,t)&&e===Vse.includes?hct:typeof t=="string"||t===jse||RHe(jse,t)&&e===jse.includes?bct:e}});var vHe=f((jVt,NHe)=>{"use strict";var Mct=SHe();NHe.exports=Mct});var k4=f(($Vt,FHe)=>{FHe.exports=vHe()});var $se=f((YVt,THe)=>{"use strict";THe.exports=`
|
|
|
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var _He=f((JVt,WHe)=>{"use strict";var mct=wt(),gct=sh(),zct=Mu(),Jse=$se(),xHe=mct("".replace),Oct=RegExp("^["+Jse+"]+"),Ect=RegExp("(^|[^"+Jse+"])["+Jse+"]+$"),Yse=function(t){return function(e){var r=zct(gct(e));return t&1&&(r=xHe(r,Oct,"")),t&2&&(r=xHe(r,Ect,"$1")),r}};WHe.exports={start:Yse(1),end:Yse(2),trim:Yse(3)}});var HHe=f((KVt,GHe)=>{"use strict";var kHe=N1(),yct=Vt(),Cct=wt(),Bct=Mu(),Dct=_He().trim,LHe=$se(),U4=kHe.parseInt,PHe=kHe.Symbol,QHe=PHe&&PHe.iterator,UHe=/^[+-]?0x/i,qct=Cct(UHe.exec),Ict=U4(LHe+"08")!==8||U4(LHe+"0x16")!==22||QHe&&!yct(function(){U4(Object(QHe))});GHe.exports=Ict?function(e,r){var s=Dct(Bct(e));return U4(s,r>>>0||(qct(UHe,s)?16:10))}:U4});var VHe=f(()=>{"use strict";var Rct=nt(),XHe=HHe();Rct({global:!0,forced:parseInt!==XHe},{parseInt:XHe})});var $He=f((tjt,jHe)=>{"use strict";VHe();var wct=ga();jHe.exports=wct.parseInt});var JHe=f((rjt,YHe)=>{"use strict";var Sct=$He();YHe.exports=Sct});var ZHe=f((sjt,KHe)=>{KHe.exports=JHe()});var mW=f((njt,eXe)=>{eXe.exports=Gse()});var sXe=f((ijt,rXe)=>{"use strict";var tXe=b4(),Nct=TypeError;rXe.exports=function(t,e){if(!delete t[e])throw new Nct("Cannot delete property "+tXe(e)+" of "+tXe(t))}});var oXe=f((ojt,iXe)=>{"use strict";var nXe=I4(),vct=Math.floor,Kse=function(t,e){var r=t.length;if(r<8)for(var s=1,n,i;s<r;){for(i=s,n=t[s];i&&e(t[i-1],n)>0;)t[i]=t[--i];i!==s++&&(t[i]=n)}else for(var o=vct(r/2),a=Kse(nXe(t,0,o),e),c=Kse(nXe(t,o),e),u=a.length,p=c.length,l=0,A=0;l<u||A<p;)t[l+A]=l<u&&A<p?e(a[l],c[A])<=0?a[l++]:c[A++]:l<u?a[l++]:c[A++];return t};iXe.exports=Kse});var uXe=f((ajt,cXe)=>{"use strict";var Fct=Jg(),aXe=Fct.match(/firefox\/(\d+)/i);cXe.exports=!!aXe&&+aXe[1]});var lXe=f((cjt,pXe)=>{"use strict";var Tct=Jg();pXe.exports=/MSIE|Trident/.test(Tct)});var fXe=f((ujt,dXe)=>{"use strict";var xct=Jg(),AXe=xct.match(/AppleWebKit\/(\d+)\./);dXe.exports=!!AXe&&+AXe[1]});var yXe=f(()=>{"use strict";var Wct=nt(),OXe=wt(),_ct=ih(),Lct=hu(),hXe=fl(),Pct=sXe(),bXe=Mu(),Zse=Vt(),Qct=oXe(),kct=T4(),MXe=uXe(),Uct=lXe(),mXe=Kg(),gXe=fXe(),fd=[],zXe=OXe(fd.sort),Gct=OXe(fd.push),Hct=Zse(function(){fd.sort(void 0)}),Xct=Zse(function(){fd.sort(null)}),Vct=kct("sort"),EXe=!Zse(function(){if(mXe)return mXe<70;if(!(MXe&&MXe>3)){if(Uct)return!0;if(gXe)return gXe<603;var t="",e,r,s,n;for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:s=3;break;case 68:case 71:s=4;break;default:s=2}for(n=0;n<47;n++)fd.push({k:r+n,v:s})}for(fd.sort(function(i,o){return o.v-i.v}),n=0;n<fd.length;n++)r=fd[n].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),jct=Hct||!Xct||!Vct||!EXe,$ct=function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:bXe(e)>bXe(r)?1:-1}};Wct({target:"Array",proto:!0,forced:jct},{sort:function(e){e!==void 0&&_ct(e);var r=Lct(this);if(EXe)return e===void 0?zXe(r):zXe(r,e);var s=[],n=hXe(r),i,o;for(o=0;o<n;o++)o in r&&Gct(s,r[o]);for(Qct(s,$ct(e)),i=hXe(s),o=0;o<i;)r[o]=s[o++];for(;o<n;)Pct(r,o++);return r}})});var BXe=f((Ajt,CXe)=>{"use strict";yXe();var Yct=ya();CXe.exports=Yct("Array","sort")});var qXe=f((djt,DXe)=>{"use strict";var Jct=yn(),Kct=BXe(),ene=Array.prototype;DXe.exports=function(t){var e=t.sort;return t===ene||Jct(ene,t)&&e===ene.sort?Kct:e}});var RXe=f((fjt,IXe)=>{"use strict";var Zct=qXe();IXe.exports=Zct});var SXe=f((hjt,wXe)=>{wXe.exports=RXe()});var NXe=f(()=>{});var TXe=f((mjt,FXe)=>{"use strict";var eut=N1(),tut=Vt(),vXe=eut.RegExp,rut=!tut(function(){var t=!0;try{vXe(".","d")}catch{t=!1}var e={},r="",s=t?"dgimsy":"gimsy",n=function(c,u){Object.defineProperty(e,c,{get:function(){return r+=u,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};t&&(i.hasIndices="d");for(var o in i)n(o,i[o]);var a=Object.getOwnPropertyDescriptor(vXe.prototype,"flags").get.call(e);return a!==s||r!==s});FXe.exports={correct:rut}});var WXe=f((gjt,xXe)=>{"use strict";var sut=dl();xXe.exports=function(){var t=sut(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}});var PXe=f((zjt,LXe)=>{"use strict";var nut=Eo(),iut=Ps(),out=yn(),_Xe=TXe(),aut=WXe(),cut=RegExp.prototype;LXe.exports=_Xe.correct?function(t){return t.flags}:function(t){return!_Xe.correct&&out(cut,t)&&!iut(t,"flags")?nut(aut,t):t.flags}});var kXe=f((Ojt,QXe)=>{"use strict";NXe();var uut=PXe();QXe.exports=uut});var HXe=f((Ejt,GXe)=>{"use strict";var put=yn(),lut=kXe(),UXe=RegExp.prototype;GXe.exports=function(t){return t===UXe||put(UXe,t)?lut(t):t.flags}});var VXe=f((yjt,XXe)=>{"use strict";var Aut=HXe();XXe.exports=Aut});var $Xe=f((Cjt,jXe)=>{jXe.exports=VXe()});var fVe=f((j4,dVe)=>{"use strict";var Qs=du(),dut=bu();dut(j4,"__esModule",{value:!0});j4.default=void 0;var fut=Qs(Kre()),hut=Qs(ese()),but=Qs(rse()
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,fut.default)(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function Eut(t,e){var r;if(t){if(typeof t=="string")return YXe(t,e);var s=(0,Co.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return(0,mut.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return YXe(t,e)}}function YXe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var dt="xregexp",fh={astral:!1,namespacing:!1},jt={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},mu={},G4={},uz={},tne=[],pz="default",JXe="class",yut={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},Cut=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,But=jt.exec.call(/()??/,"")[1]===void 0,Dut=(0,dh.default)(/x/)!==void 0,qut={},rVe=qut.toString;function sne(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),s=".a".replace(new RegExp("a",r),".")==="..";s&&(e=!1)}}catch{e=!1}return e}var sVe=sne("u"),nne=sne("y"),nVe={g:!0,i:!0,m:!0,u:sVe,y:nne};function iVe(t,e,r,s,n){var i;if(t[dt]={captureNames:e},n)return t;if(t.__proto__)t.__proto__=ae.prototype;else for(var o in ae.prototype)t[o]=ae.prototype[o];return t[dt].source=r,t[dt].flags=s&&(0,Out.default)(i=s.split("")).call(i).join(""),t}function H4(t){return jt.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}function bh(t,e){var r;if(!ae.isRegExp(t))throw new TypeError("Type RegExp expected");var s=t[dt]||{},n=Iut(t),i="",o="",a=null,c=null;return e=e||{},e.removeG&&(o+="g"),e.removeY&&(o+="y"),o&&(n=jt.replace.call(n,new RegExp("[".concat(o,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(n=H4(n+i)),e.isInternalOnly||(s.source!==void 0&&(a=s.source),(0,dh.default)(s)!=null&&(c=i?H4((0,dh.default)(s)+i):(0,dh.default)(s))),t=iVe(new RegExp(e.source||t.source,n),Rut(t)?(0,Co.default)(r=s.captureNames).call(r,0):null,a,c,e.isInternalOnly),t}function oVe(t){return(0,tVe.default)(t,16)}function aVe(t,e,r){return t.input[t.index-1]==="("||t.input[t.index+t[0].length]===")"||t.input[t.index-1]==="|"||t.input[t.index+t[0].length]==="|"||t.index<1||t.index+t[0].length>=t.input.length||jt.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||wut(t.input,t.index+t[0].length,r)?"":"(?:)"}function Iut(t){return Dut?(0,dh.default)(t):jt.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}function Rut(t){return!!(t[dt]&&t[dt].captureNames)}function cVe(t){return(0,tVe.default)(t,10).toString(16)}function wut(t,e,r){var s="\\(\\?#[^)]*\\)",n="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return jt.test.call((0,hh.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,Co.default)(t).call(t,e))}function ine(t,e){return rVe.call(t)==="[object ".concat(e,"]")}function uVe(t){for(;t.length<4;)t="0".concat(t);return t}function Sut(t,e){if(H4(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=jt.replace.call(t,/^\(\?([\w$]+)\)/,function(i,o){if(jt.test.call(/[gy]/,o))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=H4(e+o),""});var r=X4(e),s;try{for(r.s();!(s=r.n()).done;){var n=s.value;if(!nVe[n])throw new SyntaxError("Unknown regex flag ".concat(n))}}catch(i){r.e(i)}finally{r.f()}return{pattern:t,flags:e}}function pVe(t){var e={};return ine(t,"String")?((0,rne.default)(ae).call(ae,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}function KXe(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be a single character A-Za-z0-9_$");nVe[t]=!0}function Nut(t,e,r,s,n){for(var i=tne.length,o=t[r],a=null,c,u;i--;)if(u=tne[i],!(u.leadChar&&u.leadChar!==o||u.scope!==s&&u.scope!=="all"||u.flag&&!(0,hh.default)(e).call(e,u.flag))&&(c=ae.exec(t,u.regex,r,"sticky"),c)){a={matchLength:c[0].length,output:u.handler.call(n,c,s,e),reparse:u.reparse};break}return a}function lVe(t){fh.astral=t}function AVe(t){fh.namespacing=t}function V4(t){if(t==null)throw new TypeError("Cannot convert null or undefined to object");return t}function ae(t,e){if(ae.isRegExp(t)){if(e!==void 0)throw new TypeError("Cannot supply flags when copying a RegExp");return bh(t)}if(t=t===void 0?"":String(t),e=e===void 0?"":String(e),ae.isInstalled("astral")&&!(0,hh.default)(e).call(e,"A")&&(e+="A"),uz[t]||(uz[t]={}),!uz[t][e]){for(var r={hasNamedCapture:!1,captureNames:[]},s=pz,n="",i=0,o,a=Sut(t,e),c=a.pattern,u=(0,dh.default)(a);i
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,dpt.default)(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function Ept(t,e){var r;if(t){if(typeof t=="string")return YVe(t,e);var s=(0,mpt.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return(0,Mpt.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return YVe(t,e)}}function YVe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var ypt=function(e){var r={},s=e._dec,n=e._hex,i=e._pad4;function o(A){return A.replace(/[- _]+/g,"").toLowerCase()}function a(A){var h=/^\\[xu](.+)/.exec(A);return h?s(h[1]):A.charCodeAt(A[0]==="\\"?1:0)}function c(A){var h="",M=-1;return(0,zpt.default)(e).call(e,A,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(g){var y=a(g[1]);y>M+1&&(h+="\\u".concat(i(n(M+1))),y>M+2&&(h+="-\\u".concat(i(n(y-1))))),M=a(g[2]||g[1])}),M<65535&&(h+="\\u".concat(i(n(M+1))),M<65534&&(h+="-\\uFFFF")),h}function u(A){var h="b!";return r[A][h]||(r[A][h]=c(r[A].bmp))}function p(A,h){var M=r[A],g="";if(M.bmp&&!M.isBmpLast){var y;g=(0,une.default)(y="[".concat(M.bmp,"]")).call(y,M.astral?"|":"")}if(M.astral&&(g+=M.astral),M.isBmpLast&&M.bmp){var O;g+=(0,une.default)(O="".concat(M.astral?"|":"","[")).call(O,M.bmp,"]")}return h?"(?:(?!".concat(g,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(g,")")}function l(A,h){var M=h?"a!":"a=";return r[A][M]||(r[A][M]=p(A,h))}e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(A,h,M){var g="Invalid double negation ",y="Unknown Unicode token ",O="Unicode token missing data ",B="Astral mode required for Unicode token ",I="Astral mode does not support Unicode tokens within character classes",R=A[1]==="P"||!!A[2],N=(0,gpt.default)(M).call(M,"A"),T=o(A[4]||A[3]),W=r[T];if(A[1]==="P"&&A[2])throw new SyntaxError(g+A[0]);if(!r.hasOwnProperty(T))throw new SyntaxError(y+A[0]);if(W.inverseOf){if(T=o(W.inverseOf),!r.hasOwnProperty(T)){var $;throw new ReferenceError((0,une.default)($="".concat(O+A[0]," -> ")).call($,W.inverseOf))}W=r[T],R=!R}if(!(W.bmp||N))throw new SyntaxError(B+A[0]);if(N){if(h==="class")throw new SyntaxError(I);return l(T,R)}return h==="class"?R?u(T):W.bmp:"".concat((R?"[^":"[")+W.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(A){var h="Unicode token requires name",M="Unicode token has no character data ",g=Opt(A),y;try{for(g.s();!(y=g.n()).done;){var O=y.value;if(!O.name)throw new Error(h);if(!(O.inverseOf||O.bmp||O.astral))throw new Error(M+O.name);r[o(O.name)]=O,O.alias&&(r[o(O.alias)]=O)}}catch(B){g.e(B)}finally{g.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(A){var h=o(A);return r[h]}};K4.default=ypt;JVe.exports=K4.default});var eje=f((Pjt,ZVe)=>{ZVe.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",bmp:"\uFE70-\uFEFF"},{name:"InArabic_Supplement",bmp:"\u0750-\u077F"},{name:"InArmenian",bmp:"\u0530-\u058F"},{name:"InArrows",bmp:"\u2190-\u21FF"},{name:"InAvestan",astral:"\uD802[\uDF00-\uDF3F]"},{name:"InBalinese",bmp:"\u1B00-\u1B7F"},{name:"InBamum",bmp:"\uA6A0-\uA6FF"},{name:"InBamum_Supplement",astral:"\uD81A[\uDC00-\uDE3F]"},{name:"InBasic_Latin",bmp:"\0-\x7F"},{name:"InBassa_Vah",astral:"\uD81A[\uDED0-\uDEFF]"},{name:"InBatak",bmp:"\u1BC0-\u1BFF"},{name:"InBengali",bmp:"\u0980-\u09FF"},{name:"InBhaiksuki",astral:"\uD807[\uDC00-\uDC6F]"},{name:"InBlock_Elements",bmp:"\u2580-\u259F"},{name:"InBopomofo",bmp:"\u3100-\u312F"},{name:"InBopomofo_Extended",bmp:"\u31A0-\u31BF"},{name:"InBox_Drawing",bmp:"\u2500-\u257F"},{name:"InBrahmi",astral:"\uD804[\uDC00-\uDC7F]"},{name:"InBraille_Patterns",bmp:"\u2800-\u28FF"},{name:"InBuginese",bmp:"\u1A00-\u1A1F"},{name:"InBuhid",bmp:"\u1740-\u175F"},{name:"InByzantine_Musical_Symbols",astral:"\uD834[\uDC00-\uDCFF]"},{name:"InCJK_Compatibility",bmp:"\u3300-\u33FF"},{name:"InCJK_Compatibility_Forms",bmp:"\uFE30-\uFE4F"},{name:"InCJK_Compatibility_Ideographs",bmp:"\uF900-\uFAFF"},{name:"InCJK_Compatibil
Line truncated
|
|
|
|
|
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}function R2e(t){process.exitCode=dQ.Failure,Sl0(t)}function P(t){jl("debug",{},t)}function Sl0(t,e={}){jl("error",oQ(e),t instanceof Error?t.toString():t)}function Ri(t,e={}){jl("warning",oQ(e),t instanceof Error?t.toString():t)}function G(t){process.stdout.write(t+D2e.EOL)}function Nl0(t){cQ("group",t)}function vl0(){cQ("endgroup")}function $l(t,e){return wl0(this,void 0,void 0,function*(){Nl0(t);let r;try{r=yield e()}finally{vl0()}return r})}function Gq(t,e){if(process.env.GITHUB_STATE||"")return uQ("STATE",O2e(t,e));jl("save-state",{name:t},Vl(e))}function w2e(t){return process.env[`STATE_${t}`]||""}var Xw=F(require("fs"),1),pV=F(require("os"),1),lV=F(require("path"),1);var TQ=F(require("crypto"),1),Sr=F(require("fs"),1);var R20=F(vQ(),1);var iI=F(require("os"),1),Go=F(require("path"),1);var Ni=F(vQ(),1),zhe=F(require("stream"),1),Ohe=F(require("util"),1),xQ=require("assert");var ghe=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},sI=class{constructor(e,r,s){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(s),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,r){return ghe(this,void 0,void 0,function*(){let s=1;for(;s<this.maxAttempts;){try{return yield e()}catch(i){if(r&&!r(i))throw i;ve(i.message)}let n=this.getSleepAmount();ve(`Waiting ${n} seconds before trying again`),yield this.sleep(n),s++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return ghe(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e*1e3))})}};var Qa=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},nI=class extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}},Ehe=process.platform==="win32",LMt=process.platform==="darwin",S20="actions/tool-cache";function vi(t,e,r,s){return Qa(this,void 0,void 0,function*(){e=e||Go.join(Ihe(),TQ.randomUUID()),yield Uu(Go.dirname(e)),_(`Downloading ${t}`),_(`Destination ${e}`);let n=3,i=FQ("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=FQ("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new sI(n,i,o).execute(()=>Qa(this,void 0,void 0,function*(){return yield N20(t,e||"",r,s)}),c=>!(c instanceof nI&&c.httpStatusCode&&c.httpStatusCode<500&&c.httpStatusCode!==408&&c.httpStatusCode!==429))})}function N20(t,e,r,s){return Qa(this,void 0,void 0,function*(){if(Sr.existsSync(e))throw new Error(`Destination file path ${e} already exists`);let n=new qi(S20,[],{allowRetries:!1});r&&(_("set auth"),s===void 0&&(s={}),s.authorization=r);let i=yield n.get(t,s);if(i.message.statusCode!==200){let p=new nI(i.message.statusCode);throw _(`Failed to download from "${t}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),p}let o=Ohe.promisify(zhe.pipeline),c=FQ("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>i.message)(),u=!1;try{return yield o(c,Sr.createWriteStream(e)),_("download complete"),u=!0,e}finally{if(!u){_("download failed");try{yield xq(e)}catch(p){_(`Failed to delete '${e}'. ${p.message}`)}}}})}function yhe(t,e){return Qa(this,arguments,void 0,function*(r,s,n="xz"){if(!r)throw new Error("parameter 'file' is required");s=yield Dhe(s),_("Checking tar --version");let i="";yield Pn("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:p=>i+=p.toString(),stderr:p=>i+=p.toString()}}),_(i.trim());let o=i.toUpperCase().includes("GNU TAR"),a;n instanceof Array?a=n:a=[n],Ii()&&!n.includes("v")&&a.push("-v");let c=s,u=r;return Ehe&&o&&(a.push("--force-local"),c=s.replace(/\\/g,"/"),u=r.replace(/\\/g,"/")),o&&(a.push("--warning=no-unknown-keyword"),a.push("--overwrite")),a.push("-C",c,"-f",u),yield Pn("tar",a),s})}function Che(t,e){return Qa(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'file' is required");return e=yield Dhe(e),Ehe?yield v20(t,e):yield F20(t,e),e})}function v20(t,e){return Qa(this,void 0,void 0,function*(){let r=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),s=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=yield hr("pwsh",!1);if(n){let o=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ;","try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch {Line truncated
|
|
|
|
|
`,Z20=/\u2014 (\S+) (\S+)\n/g;function ed0(t,e){let r=t.inclusionProof,n=EP.fromString(r.checkpoint.envelope),o=hD.fromString(n.note);if(!td0(n,e))throw new dd.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return o}s(ed0,"verifyCheckpoint");function td0(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let o=e.find(i=>Pbe.crypto.bufferEqual(i.logID.subarray(0,4),n.keyHint)&&i.baseURL.includes(n.name));return o?Pbe.crypto.verify(r,o.publicKey,n.signature):!1})}s(td0,"verifySignedNote");var EP=class t{static{s(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(OP))throw new dd.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(OP),n=e.slice(0,r+1),i=e.slice(r+OP.length).matchAll(Z20),a=Array.from(i,c=>{let[,u,p]=c,A=Buffer.from(p,"base64");if(A.length<5)throw new dd.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:u,keyHint:A.subarray(0,4),signature:A.subarray(4)}});if(a.length===0)throw new dd.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},hD=class t{static{s(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,o){this.origin=e,this.logSize=r,this.logHash=n,this.rest=o}static fromString(e){let r=e.trimEnd().split(`
|
|
|
|
|
`);if(r.length<3)throw new dd.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],o;try{o=BigInt(r[1])}catch{throw new dd.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint log size"})}let i=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,o,i,a)}};jm.LogCheckpoint=hD});var Ube=m(BP=>{"use strict";Object.defineProperty(BP,"__esModule",{value:!0});BP.verifyMerkleInclusion=od0;var yP=Fo(),zD=It(),rd0=Buffer.from([0]),nd0=Buffer.from([1]);function od0(t,e){let r=t.inclusionProof,n;try{n=BigInt(r.logIndex)}catch{throw new zD.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid inclusion proof log index"})}let o=BigInt(e.logSize);if(n<0n||n>=o)throw new zD.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${n}`});let{inner:i,border:a}=id0(n,o);if(r.hashes.length!==i+a)throw new zD.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,i),u=r.hashes.slice(i),p=Ad0(t.canonicalizedBody),A=ad0(sd0(p,c,n),u);if(!yP.crypto.bufferEqual(A,e.logHash))throw new zD.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}s(od0,"verifyMerkleInclusion");function id0(t,e){let r=cd0(t,e),n=ud0(t>>BigInt(r));return{inner:r,border:n}}s(id0,"decompInclProof");function sd0(t,e,r){return e.reduce((n,o,i)=>r>>BigInt(i)&BigInt(1)?CP(o,n):CP(n,o),t)}s(sd0,"chainInner");function ad0(t,e){return e.reduce((r,n)=>CP(n,r),t)}s(ad0,"chainBorderRight");function cd0(t,e){return pd0(t^e-BigInt(1))}s(cd0,"innerProofSize");function ud0(t){return t.toString(2).split("1").length-1}s(ud0,"onesCount");function pd0(t){return t===0n?0:t.toString(2).length}s(pd0,"bitLength");function CP(t,e){return yP.crypto.digest("sha256",nd0,t,e)}s(CP,"hashChildren");function Ad0(t){return yP.crypto.digest("sha256",rd0,t)}s(Ad0,"hashLeaf")});var Hbe=m(DP=>{"use strict";Object.defineProperty(DP,"__esModule",{value:!0});DP.verifyTLogSET=bd0;var Gbe=Fo(),ld0=It(),dd0=ud();function bd0(t,e){if(!(0,dd0.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(o=>{let i=fd0(t),a=Buffer.from(Gbe.json.canonicalize(i),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return Gbe.crypto.verify(a,o.publicKey,c)}))throw new ld0.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}s(bd0,"verifyTLogSET");function fd0(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:o}=t;return{body:o.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}s(fd0,"toVerificationPayload")});var Vbe=m(OD=>{"use strict";Object.defineProperty(OD,"__esModule",{value:!0});OD.verifyTLogBody=gd0;OD.verifyTLogInclusion=Od0;var Xbe=vbe(),gD=It(),qP=Lbe(),IP=_be(),Md0=Qbe(),md0=kbe(),hd0=Ube(),zd0=Hbe();function gd0(t,e){let{kind:r,version:n}=t.kindVersion,o;try{o=JSON.parse(t.canonicalizedBody.toString("utf8"))}catch{throw new gD.VerificationError({code:"TLOG_BODY_ERROR",message:"invalid canonicalized body"})}if(r!==o.kind||n!==o.apiVersion)throw new gD.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${n}, received: ${o.kind}/${o.apiVersion}`});switch(r){case"dsse":if(n==qP.DSSE_API_VERSION_V1)return(0,qP.verifyDSSETLogBody)(o,e);{let i=Xbe.Entry.fromJSON(o);return(0,qP.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,Md0.verifyIntotoTLogBody)(o,e);case"hashedrekord":if(n==IP.HASHEDREKORD_API_VERSION_V1)return(0,IP.verifyHashedRekordTLogBody)(o,e);{let i=Xbe.Entry.fromJSON(o);return(0,IP.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new gD.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}s(gd0,"verifyTLogBody");function Od0(t,e){let r=!1;if(Ed0(t)&&((0,zd0.verifyTLogSET)(t,e),r=!0),Cd0(t)){let n=(0,md0.verifyCheckpoint)(t,e);(0,hd0.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new gD.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}s(Od0,"verifyTLogInclusion");function Ed0(t){return t.inclusionPromise!==void 0}s(Ed0,"isTLogEntryWithInclusionPromise");function Cd0(t){return t.inclusionProof!==void 0}s(Cd0,"isTLogEntryWithInclusionProof")});var jbe=m(ED=>{"use strict";Object.defineProperty(ED,"__esModule",{value:!0});ED.Verifier=void 0;var yd0=require("util"),Gp=It(),Jbe=Bbe(),RP=Dbe(),Ybe=Rbe(),$be=Vbe(),wP=class{static{s(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),o=this.verifySigningKey(e,n);return this.verifyTLogs(e),this.verifySignature(e,o),r&&this.verifyPolicy(r,o.identity||{}),o}verifyTimestamps(e){let r=[];for(let n of e.timestamps)switch(n.$case){case"time
Line truncated
|
|
|
|
|
[`+I+"] ";for(F in arguments[0])i(arguments[0],F)&&(y+=F+": "+arguments[0][F]+", ");y=y.slice(0,-2)}else y=arguments[I];O.push(y)}_(d+`
|
|
|
|
|
Arguments: `+Array.prototype.slice.call(O).join("")+`
|
|
|
|
|
`+new Error().stack),h=!1}return f.apply(this,arguments)},f)}s(ae,"deprecate");var Se={};function xe(d,f){e.deprecationHandler!=null&&e.deprecationHandler(d,f),Se[d]||(_(f),Se[d]=!0)}s(xe,"deprecateSimple"),e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function Ne(d){return typeof Function<"u"&&d instanceof Function||Object.prototype.toString.call(d)==="[object Function]"}s(Ne,"isFunction");function Ce(d){var f,h;for(h in d)i(d,h)&&(f=d[h],Ne(f)?this[h]=f:this["_"+h]=f);this._config=d,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}s(Ce,"set");function we(d,f){var h=l({},d),O;for(O in f)i(f,O)&&(o(d[O])&&o(f[O])?(h[O]={},l(h[O],d[O]),l(h[O],f[O])):f[O]!=null?h[O]=f[O]:delete h[O]);for(O in d)i(d,O)&&!i(f,O)&&o(d[O])&&(h[O]=l({},h[O]));return h}s(we,"mergeConfigs");function k(d){d!=null&&this.set(d)}s(k,"Locale");var Te;Object.keys?Te=Object.keys:Te=s(function(d){var f,h=[];for(f in d)i(d,f)&&h.push(f);return h},"keys");var T={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function j(d,f,h){var O=this._calendar[d]||this._calendar.sameElse;return Ne(O)?O.call(f,h):O}s(j,"calendar");function $e(d,f,h){var O=""+Math.abs(d),y=f-O.length,I=d>=0;return(I?h?"+":"":"-")+Math.pow(10,Math.max(0,y)).toString().substr(1)+O}s($e,"zeroFill");var m1=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ze=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I0={},je={};function X(d,f,h,O){var y=O;typeof O=="string"&&(y=s(function(){return this[O]()},"func")),d&&(je[d]=y),f&&(je[f[0]]=function(){return $e(y.apply(this,arguments),f[1],f[2])}),h&&(je[h]=function(){return this.localeData().ordinal(y.apply(this,arguments),d)})}s(X,"addFormatToken");function Rt(d){return d.match(/\[[\s\S]/)?d.replace(/^\[|\]$/g,""):d.replace(/\\/g,"")}s(Rt,"removeFormattingTokens");function Nt(d){var f=d.match(m1),h,O;for(h=0,O=f.length;h<O;h++)je[f[h]]?f[h]=je[f[h]]:f[h]=Rt(f[h]);return function(y){var I="",F;for(F=0;F<O;F++)I+=Ne(f[F])?f[F].call(y,d):f[F];return I}}s(Nt,"makeFormatFunction");function m0(d,f){return d.isValid()?(f=er(f,d.localeData()),I0[f]=I0[f]||Nt(f),I0[f](d)):d.localeData().invalidDate()}s(m0,"formatMoment");function er(d,f){var h=5;function O(y){return f.longDateFormat(y)||y}for(s(O,"replaceLongDateFormatTokens"),ze.lastIndex=0;h>=0&&ze.test(d);)d=d.replace(ze,O),ze.lastIndex=0,h-=1;return d}s(er,"expandFormat");var $h={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function jh(d){var f=this._longDateFormat[d],h=this._longDateFormat[d.toUpperCase()];return f||!h?f:(this._longDateFormat[d]=h.match(m1).map(function(O){return O==="MMMM"||O==="MM"||O==="DD"||O==="dddd"?O.slice(1):O}).join(""),this._longDateFormat[d])}s(jh,"longDateFormat");var Tq="Invalid date";function $c(){return this._invalidDate}s($c,"invalidDate");var R="%d",v=/\d{1,2}/;function L(d){return this._ordinal.replace("%d",d)}s(L,"ordinal");var G={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Ie(d,f,h,O){var y=this._relativeTime[h];return Ne(y)?y(d,f,h,O):y.replace(/%d/i,d)}s(Ie,"relativeTime");function n0(d,f){var h=this._relativeTime[d>0?"future":"past"];return Ne(h)?h(f):h.replace(/%s/i,f)}s(n0,"pastFuture");var e1={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ke(d){return typeof d=="string"?e1[d]||e1[d.toLowerCase()]:void 0}s(ke,"normalizeUnits");function R0(d){var f={},h,O;for(O in d)i(d,O)&&(h=ke(O),h&&(f[h]=d[O]));return f}s(R0,"normalizeObjectUnits");var uU={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ABe(d){var f=[],h;for(h in d)i(d,h)&&f.push({unit:h,priority:uU[h]});return f.sort(function(O,y){return O.priority-y.priority}),f}s(ABe
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}s(zE0,"_nonIterableRest");Rh.exports=zE0,Rh.exports.__esModule=!0,Rh.exports.default=Rh.exports});var MEe=m((df1,Nh)=>{var gE0=e3e(),OE0=H3e(),EE0=bEe(),CE0=fEe();function yE0(t,e){return gE0(t)||OE0(t,e)||EE0(t,e)||CE0()}s(yE0,"_slicedToArray");Nh.exports=yE0,Nh.exports.__esModule=!0,Nh.exports.default=Nh.exports});var hEe=m((ff1,mEe)=>{"use strict";var BE0=hq().forEach,DE0=yh(),qE0=DE0("forEach");mEe.exports=qE0?[].forEach:s(function(e){return BE0(this,e,arguments.length>1?arguments[1]:void 0)},"forEach")});var gEe=m(()=>{"use strict";var IE0=F0(),zEe=hEe();IE0({target:"Array",proto:!0,forced:[].forEach!==zEe},{forEach:zEe})});var EEe=m((zf1,OEe)=>{"use strict";gEe();var RE0=Qo();OEe.exports=RE0("Array","forEach")});var yEe=m((gf1,CEe)=>{"use strict";var NE0=EEe();CEe.exports=NE0});var BEe=m(()=>{});var qEe=m((Cf1,DEe)=>{"use strict";var wE0=Sd(),SE0=Kt(),FE0=Ir(),WE0=yEe();BEe();var I7=Array.prototype,xE0={DOMTokenList:!0,NodeList:!0};DEe.exports=function(t){var e=t.forEach;return t===I7||FE0(I7,t)&&e===I7.forEach||SE0(xE0,wE0(t))?WE0:e}});var R7=m((yf1,IEe)=>{IEe.exports=qEe()});var REe=m(()=>{"use strict";var TE0=F0(),vE0=tq().includes,LE0=f1(),_E0=uk(),QE0=LE0(function(){return!Array(1).includes()});TE0({target:"Array",proto:!0,forced:QE0},{includes:s(function(e){return vE0(this,e,arguments.length>1?arguments[1]:void 0)},"includes")});_E0("includes")});var wEe=m((If1,NEe)=>{"use strict";REe();var PE0=Qo();NEe.exports=PE0("Array","includes")});var FEe=m((Rf1,SEe)=>{"use strict";var kE0=pn(),UE0=Oa(),GE0=N1(),HE0=GE0("match");SEe.exports=function(t){var e;return kE0(t)&&((e=t[HE0])!==void 0?!!e:UE0(t)==="RegExp")}});var xEe=m((Nf1,WEe)=>{"use strict";var XE0=FEe(),VE0=TypeError;WEe.exports=function(t){if(XE0(t))throw new VE0("The method doesn't accept regular expressions");return t}});var vEe=m((wf1,TEe)=>{"use strict";var JE0=N1(),YE0=JE0("match");TEe.exports=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[YE0]=!1,"/./"[t](e)}catch{}}return!1}});var _Ee=m(()=>{"use strict";var $E0=F0(),jE0=n1(),KE0=xEe(),ZE0=Hp(),LEe=ps(),eC0=vEe(),tC0=jE0("".indexOf);$E0({target:"String",proto:!0,forced:!eC0("includes")},{includes:s(function(e){return!!~tC0(LEe(ZE0(this)),LEe(KE0(e)),arguments.length>1?arguments[1]:void 0)},"includes")})});var PEe=m((xf1,QEe)=>{"use strict";_Ee();var rC0=Qo();QEe.exports=rC0("String","includes")});var GEe=m((Tf1,UEe)=>{"use strict";var kEe=Ir(),nC0=wEe(),oC0=PEe(),N7=Array.prototype,w7=String.prototype;UEe.exports=function(t){var e=t.includes;return t===N7||kEe(N7,t)&&e===N7.includes?nC0:typeof t=="string"||t===w7||kEe(w7,t)&&e===w7.includes?oC0:e}});var XEe=m((vf1,HEe)=>{"use strict";var iC0=GEe();HEe.exports=iC0});var wh=m((Lf1,VEe)=>{VEe.exports=XEe()});var S7=m((_f1,JEe)=>{"use strict";JEe.exports=`
|
|
|
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var jEe=m((Qf1,$Ee)=>{"use strict";var sC0=n1(),aC0=Hp(),cC0=ps(),W7=S7(),YEe=sC0("".replace),uC0=RegExp("^["+W7+"]+"),pC0=RegExp("(^|[^"+W7+"])["+W7+"]+$"),F7=s(function(t){return function(e){var r=cC0(aC0(e));return t&1&&(r=YEe(r,uC0,"")),t&2&&(r=YEe(r,pC0,"$1")),r}},"createMethod");$Ee.exports={start:F7(1),end:F7(2),trim:F7(3)}});var oCe=m((kf1,nCe)=>{"use strict";var tCe=J1(),AC0=f1(),lC0=n1(),dC0=ps(),bC0=jEe().trim,KEe=S7(),Sh=tCe.parseInt,ZEe=tCe.Symbol,eCe=ZEe&&ZEe.iterator,rCe=/^[+-]?0x/i,fC0=lC0(rCe.exec),MC0=Sh(KEe+"08")!==8||Sh(KEe+"0x16")!==22||eCe&&!AC0(function(){Sh(Object(eCe))});nCe.exports=MC0?s(function(e,r){var n=bC0(dC0(e));return Sh(n,r>>>0||(fC0(rCe,n)?16:10))},"parseInt"):Sh});var sCe=m(()=>{"use strict";var mC0=F0(),iCe=oCe();mC0({global:!0,forced:parseInt!==iCe},{parseInt:iCe})});var cCe=m((Xf1,aCe)=>{"use strict";sCe();var hC0=To();aCe.exports=hC0.parseInt});var pCe=m((Vf1,uCe)=>{"use strict";var zC0=cCe();uCe.exports=zC0});var lCe=m((Jf1,ACe)=>{ACe.exports=pCe()});var qq=m((Yf1,dCe)=>{dCe.exports=q7()});var MCe=m(($f1,fCe)=>{"use strict";var bCe=ih(),gC0=TypeError;fCe.exports=function(t,e){if(!delete t[e])throw new gC0("Cannot delete property "+bCe(e)+" of "+bCe(t))}});var zCe=m((jf1,hCe)=>{"use strict";var mCe=mh(),OC0=Math.floor,x7=s(function(t,e){var r=t.length;if(r<8)for(var n=1,o,i;n<r;){for(i=n,o=t[n];i&&e(t[i-1],o)>0;)t[i]=t[--i];i!==n++&&(t[i]=o)}else for(var a=OC0(r/2),c=x7(mCe(t,0,a),e),u=x7(mCe(t,a),e),p=c.length,A=u.length,l=0,b=0;l<p||b<A;)t[l+b]=l<p&&b<A?e(c[l],u[b])<=0?c[l++]:u[b++]:l<p?c[l++]:u[b++];return t},"sort");hCe.exports=x7});var ECe=m((Zf1,OCe)=>{"use strict";var EC0=yd(),gCe=EC0.match(/firefox\/(\d+)/i);OCe.exports=!!gCe&&+gCe[1]});var yCe=m((eM1,CCe)=>{"use strict";var CC0=yd();CCe.exports=/MSIE|Trident/.test(CC0)});var qCe=m((tM1,DCe)=>{"use strict";var yC0=yd(),BCe=yC0.match(/AppleWebKit\/(\d+)\./);DCe.exports=!!BCe&&+BCe[1]});var TCe=m(()=>{"use strict";var BC0=F0(),WCe=n1(),DC0=Vp(),qC0=cs(),ICe=ya(),IC0=MCe(),RCe=ps(),T7=f1(),RC0=zCe(),NC0=yh(),NCe=ECe(),wC0=yCe(),wCe=Bd(),SCe=qCe(),Xc=[],FCe=WCe(Xc.sort),SC0=WCe(Xc.push),FC0=T7(function(){Xc.sort(void 0)}),WC0=T7(function(){Xc.sort(null)}),xC0=NC0("sort"),xCe=!T7(function(){if(wCe)return wCe<70;if(!(NCe&&NCe>3)){if(wC0)return!0;if(SCe)return SCe<603;var t="",e,r,n,o;for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(o=0;o<47;o++)Xc.push({k:r+o,v:n})}for(Xc.sort(function(i,a){return a.v-i.v}),o=0;o<Xc.length;o++)r=Xc[o].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),TC0=FC0||!WC0||!xC0||!xCe,vC0=s(function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:RCe(e)>RCe(r)?1:-1}},"getSortCompare");BC0({target:"Array",proto:!0,forced:TC0},{sort:s(function(e){e!==void 0&&DC0(e);var r=qC0(this);if(xCe)return e===void 0?FCe(r):FCe(r,e);var n=[],o=ICe(r),i,a;for(a=0;a<o;a++)a in r&&SC0(n,r[a]);for(RC0(n,vC0(e)),i=ICe(n),a=0;a<i;)r[a]=n[a++];for(;a<o;)IC0(r,a++);return r},"sort")})});var LCe=m((iM1,vCe)=>{"use strict";TCe();var LC0=Qo();vCe.exports=LC0("Array","sort")});var QCe=m((sM1,_Ce)=>{"use strict";var _C0=Ir(),QC0=LCe(),v7=Array.prototype;_Ce.exports=function(t){var e=t.sort;return t===v7||_C0(v7,t)&&e===v7.sort?QC0:e}});var kCe=m((aM1,PCe)=>{"use strict";var PC0=QCe();PCe.exports=PC0});var GCe=m((cM1,UCe)=>{UCe.exports=kCe()});var HCe=m(()=>{});var JCe=m((AM1,VCe)=>{"use strict";var kC0=J1(),UC0=f1(),XCe=kC0.RegExp,GC0=!UC0(function(){var t=!0;try{XCe(".","d")}catch{t=!1}var e={},r="",n=t?"dgimsy":"gimsy",o=s(function(u,p){Object.defineProperty(e,u,{get:s(function(){return r+=p,!0},"get")})},"addGetter"),i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};t&&(i.hasIndices="d");for(var a in i)o(a,i[a]);var c=Object.getOwnPropertyDescriptor(XCe.prototype,"flags").get.call(e);return c!==n||r!==n});VCe.exports={correct:GC0}});var $Ce=m((dM1,YCe)=>{"use strict";var HC0=Ca();YCe.exports=function(){var t=HC0(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}});var ZCe=m((bM1,KCe)=>{"use strict";var XC0=ro(),VC0=Kt(),JC0=Ir(),jCe=JCe(),YC0=$Ce(),$C0=RegExp.prototype;KCe.exports=jCe.correct?function(t){return t.flags}:function(t){return!jCe.correct&&JC0($C0,t)&&!VC0(t,"flags")?XC0(YC0,t):t.flags}});var tye=m((fM1,eye)=>{"use strict";HCe();var jC0=ZCe();eye.exports=jC0});var oye=m((MM1,nye)=>{"use strict";var KC0=Ir(),ZC0=tye(),rye=RegExp.prototype;nye.exports=function(t){return t===rye||KC0(rye,t)?ZC0(t):t.flags}});var sye=m((mM1,iye)=>{"use strict";var ey0=oye();iye.exports=ey0});var cye=m((hM1,aye)=>{aye.exports=sye()});var qye=m((vh,Dye)=>{"use strict";var Zt=ss(),ty0=us();ty0(vh,"__esModule",{
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,c;return{s:s(function(){r=(0,ry0.default)(t)},"s"),n:s(function(){var p=r.next();return i=p.done,p},"n"),e:s(function(p){a=!0,c=p},"e"),f:s(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}s(xh,"_createForOfIteratorHelper");function py0(t,e){var r;if(t){if(typeof t=="string")return uye(t,e);var n=(0,oo.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,sy0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uye(t,e)}}s(py0,"_unsupportedIterableToArray");function uye(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}s(uye,"_arrayLikeToArray");var k0="xregexp",rA={astral:!1,namespacing:!1},M1={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},As={},Fh={},Td={},L7=[],vd="default",pye="class",Ay0={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},ly0=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,dy0=M1.exec.call(/()??/,"")[1]===void 0,by0=(0,tA.default)(/x/)!==void 0,fy0={},fye=fy0.toString;function Q7(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),n=".a".replace(new RegExp("a",r),".")==="..";n&&(e=!1)}}catch{e=!1}return e}s(Q7,"hasNativeFlag");var Mye=Q7("u"),P7=Q7("y"),mye={g:!0,i:!0,m:!0,u:Mye,y:P7};function hye(t,e,r,n,o){var i;if(t[k0]={captureNames:e},o)return t;if(t.__proto__)t.__proto__=K.prototype;else for(var a in K.prototype)t[a]=K.prototype[a];return t[k0].source=r,t[k0].flags=n&&(0,uy0.default)(i=n.split("")).call(i).join(""),t}s(hye,"augment");function Wh(t){return M1.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}s(Wh,"clipDuplicates");function oA(t,e){var r;if(!K.isRegExp(t))throw new TypeError("Type RegExp expected");var n=t[k0]||{},o=My0(t),i="",a="",c=null,u=null;return e=e||{},e.removeG&&(a+="g"),e.removeY&&(a+="y"),a&&(o=M1.replace.call(o,new RegExp("[".concat(a,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(o=Wh(o+i)),e.isInternalOnly||(n.source!==void 0&&(c=n.source),(0,tA.default)(n)!=null&&(u=i?Wh((0,tA.default)(n)+i):(0,tA.default)(n))),t=hye(new RegExp(e.source||t.source,o),my0(t)?(0,oo.default)(r=n.captureNames).call(r,0):null,c,u,e.isInternalOnly),t}s(oA,"copyRegex");function zye(t){return(0,bye.default)(t,16)}s(zye,"dec");function gye(t,e,r){return t.input[t.index-1]==="("||t.input[t.index+t[0].length]===")"||t.input[t.index-1]==="|"||t.input[t.index+t[0].length]==="|"||t.index<1||t.index+t[0].length>=t.input.length||M1.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||hy0(t.input,t.index+t[0].length,r)?"":"(?:)"}s(gye,"getContextualTokenSeparator");function My0(t){return by0?(0,tA.default)(t):M1.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}s(My0,"getNativeFlags");function my0(t){return!!(t[k0]&&t[k0].captureNames)}s(my0,"hasNamedCapture");function Oye(t){return(0,bye.default)(t,10).toString(16)}s(Oye,"hex");function hy0(t,e,r){var n="\\(\\?#[^)]*\\)",o="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return M1.test.call((0,nA.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,oo.default)(t).call(t,e))}s(hy0,"isQuantifierNext");function k7(t,e){return fye.call(t)==="[object ".concat(e,"]")}s(k7,"isType");function Eye(t){for(;t.length<4;)t="0".concat(t);return t}s(Eye,"pad4");function zy0(t,e){if(Wh(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=M1.replace.call(t,/^\(\?([\w$]+)\)/,function(i,a){if(M1.test.call(/[gy]/,a))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=Wh(e+a),""});var r=xh(e),n;try{for(r.s();!(n=r.n()).done;){var o=n.value;if(!mye[o])throw new SyntaxError("Unknown regex flag ".concat(o))}}catch(i){r.e(i)}finally{r.f()}return{pattern:t,flags:e}}s(zy0,"prepareFlags");function Cye(t){var e={};return k7(t,"String")?((0,_7.default)(K).call(K,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}s(Cye,"prepareOptions");function Aye(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be a single character A-Za-z0-9_$");mye[t]=!0}s(Aye,"registerFlag");function gy0(t,e,r,n,o){for(var i=L7.length,a=t[r],c=null,u,p;i--;)if(p=L7[i],!(p.leadChar&&p.leadChar!==a||p.scope!==n&&p.scope!=="all"||p.flag&&!(0,nA.default)(e).call(e,p.flag))&&(u=K.exec(t,p.regex,r,"sticky"),u)){c={matchLength:u[0].length,output:p.handler.call(o,u,n,e),reparse:p.reparse};break}return c}s(gy0,"runTokens");function yye(t){rA.astral=t}s(yye,"setAstral");function Bye(t){rA.namespacing=t}s(Bye,"setNamespacing");f
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,c;return{s:s(function(){r=(0,t40.default)(t)},"s"),n:s(function(){var p=r.next();return i=p.done,p},"n"),e:s(function(p){a=!0,c=p},"e"),f:s(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}s(u40,"_createForOfIteratorHelper");function p40(t,e){var r;if(t){if(typeof t=="string")return u4e(t,e);var n=(0,s40.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,i40.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u4e(t,e)}}s(p40,"_unsupportedIterableToArray");function u4e(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}s(u4e,"_arrayLikeToArray");var A40=s(function(e){var r={},n=e._dec,o=e._hex,i=e._pad4;function a(b){return b.replace(/[- _]+/g,"").toLowerCase()}s(a,"normalize");function c(b){var M=/^\\[xu](.+)/.exec(b);return M?n(M[1]):b.charCodeAt(b[0]==="\\"?1:0)}s(c,"charCode");function u(b){var M="",z=-1;return(0,c40.default)(e).call(e,b,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(g){var C=c(g[1]);C>z+1&&(M+="\\u".concat(i(o(z+1))),C>z+2&&(M+="-\\u".concat(i(o(C-1))))),z=c(g[2]||g[1])}),z<65535&&(M+="\\u".concat(i(o(z+1))),z<65534&&(M+="-\\uFFFF")),M}s(u,"invertBmp");function p(b){var M="b!";return r[b][M]||(r[b][M]=u(r[b].bmp))}s(p,"cacheInvertedBmp");function A(b,M){var z=r[b],g="";if(z.bmp&&!z.isBmpLast){var C;g=(0,X7.default)(C="[".concat(z.bmp,"]")).call(C,z.astral?"|":"")}if(z.astral&&(g+=z.astral),z.isBmpLast&&z.bmp){var E;g+=(0,X7.default)(E="".concat(z.astral?"|":"","[")).call(E,z.bmp,"]")}return M?"(?:(?!".concat(g,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(g,")")}s(A,"buildAstral");function l(b,M){var z=M?"a!":"a=";return r[b][z]||(r[b][z]=A(b,M))}s(l,"cacheAstral"),e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(b,M,z){var g="Invalid double negation ",C="Unknown Unicode token ",E="Unicode token missing data ",B="Astral mode required for Unicode token ",D="Astral mode does not support Unicode tokens within character classes",q=b[1]==="P"||!!b[2],x=(0,a40.default)(z).call(z,"A"),W=a(b[4]||b[3]),_=r[W];if(b[1]==="P"&&b[2])throw new SyntaxError(g+b[0]);if(!r.hasOwnProperty(W))throw new SyntaxError(C+b[0]);if(_.inverseOf){if(W=a(_.inverseOf),!r.hasOwnProperty(W)){var ae;throw new ReferenceError((0,X7.default)(ae="".concat(E+b[0]," -> ")).call(ae,_.inverseOf))}_=r[W],q=!q}if(!(_.bmp||x))throw new SyntaxError(B+b[0]);if(x){if(M==="class")throw new SyntaxError(D);return l(W,q)}return M==="class"?q?p(W):_.bmp:"".concat((q?"[^":"[")+_.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(b){var M="Unicode token requires name",z="Unicode token has no character data ",g=u40(b),C;try{for(g.s();!(C=g.n()).done;){var E=C.value;if(!E.name)throw new Error(M);if(!(E.inverseOf||E.bmp||E.astral))throw new Error(z+E.name);r[a(E.name)]=E,E.alias&&(r[a(E.alias)]=E)}}catch(B){g.e(B)}finally{g.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(b){var M=a(b);return r[M]}},"_default");Ph.default=A40;p4e.exports=Ph.default});var d4e=m((kM1,l4e)=>{l4e.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",bmp:"\uFE70-\uFEFF"},{name:"InArabic_Supplement",bmp:"\u0750-\u077F"},{name:"InArmenian",bmp:"\u0530-\u058F"},{name:"InArrows",bmp:"\u2190-\u21FF"},{name:"InAvestan",astral:"\uD802[\uDF00-\uDF3F]"},{name:"InBalinese",bmp:"\u1B00-\u1B7F"},{name:"InBamum",bmp:"\uA6A0-\uA6FF"},{name:"InBamum_Supplement",astral:"\uD81A[\uDC00-\uDE3F]"},{name:"InBasic_Latin",bmp:"\0-\x7F"},{name:"InBassa_Vah",astral:"\uD81A[\uDED0-\uDEFF]"},{name:"InBatak",bmp:"\u1BC0-\u1BFF"},{name:"InBengali",bmp:"\u0980-\u09FF"},{name:"InBhaiksuki",astral:"\uD807[\uDC00-\uDC6F]"},{name:"InBlock_Elements",bmp:"\u2580-\u259F"},{name:"InBopomofo",bmp:"\u3100-\u312F"},{name:"InBopomofo_Extended",bmp:"\u31A0-\u31BF"},{name:"InBox_Drawing",bmp:"\u2500-\u257F"},{name:"InBrahmi",astral:"\uD804[\uDC00-\uDC7F]"},{name:"InBraille_Patterns",bmp:"\u2800-\u28FF"},{name:"InBuginese",bmp:"\u1A00-\u1A1F"},{name:"InBuhid",bmp:"\u1740-\u175F"},{
Line truncated
|
|
|
|
|
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}s(rK,"getBooleanInput");function jN(t,e){if(process.env.GITHUB_OUTPUT||"")return jd("OUTPUT",zz(t,e));process.stdout.write($N.EOL),Uo("set-output",{name:t},ko(e))}s(jN,"setOutput");function nK(t){process.exitCode=YN.Failure,bl(t)}s(nK,"setFailed");function Ls(){return process.env.RUNNER_DEBUG==="1"}s(Ls,"isDebug");function N(t){Uo("debug",{},t)}s(N,"debug");function bl(t,e={}){Uo("error",iI(e),t instanceof Error?t.toString():t)}s(bl,"error");function s0(t,e={}){Uo("warning",iI(e),t instanceof Error?t.toString():t)}s(s0,"warning");function S(t){process.stdout.write(t+$N.EOL)}s(S,"info");function Ru(t){aI("group",t)}s(Ru,"startGroup");function Nu(){aI("endgroup")}s(Nu,"endGroup");function ct(t,e){return FQe(this,void 0,void 0,function*(){Ru(t);let r;try{r=yield e()}finally{Nu()}return r})}s(ct,"group");function gO(t,e){if(process.env.GITHUB_STATE||"")return jd("STATE",zz(t,e));Uo("save-state",{name:t},ko(e))}s(gO,"saveState");function oK(t){return process.env[`STATE_${t}`]||""}s(oK,"getState");var KM=w(require("fs"),1),pL=w(require("os"),1),AL=w(require("path"),1);var sK=w(require("os"),1);function af(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}s(af,"toCommandValue");function aK(t,e,r){let n=new KN(t,e,r);process.stdout.write(n.toString()+sK.EOL)}s(aK,"issueCommand");var iK="::",KN=class{static{s(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=iK+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 o=this.properties[n];o&&(r?r=!1:e+=",",e+=`${n}=${xQe(o)}`)}}return e+=`${iK}${WQe(this.message)}`,e}};function WQe(t){return af(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}s(WQe,"escapeData");function xQe(t){return af(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}s(xQe,"escapeProperty");var AK=w(require("os"),1);var uK=require("os"),cf=require("fs");var ZN=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})},{access:TQe,appendFile:vQe,writeFile:LQe}=cf.promises,cK="GITHUB_STEP_SUMMARY";var ew=class{static{s(this,"Summary")}constructor(){this._buffer=""}filePath(){return ZN(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[cK];if(!e)throw new Error(`Unable to find environment variable for $${cK}. Check if your runtime environment supports job summaries.`);try{yield TQe(e,cf.constants.R_OK|cf.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 o=Object.entries(n).map(([i,a])=>` ${i}="${a}"`).join("");return r?`<${e}${o}>${r}</${e}>`:`<${e}${o}>`}write(e){return ZN(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?LQe:vQe)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return ZN(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(uK.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),o=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(o).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",o=e.map(a=>this.wrap("li",a)).join(""),i=this.wrap(n,o);return this.addRaw(i).addEOL()}addTable(e){let r=e.map(o=>{let i=o.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:u,colspan:p,rowspan:A}=a,l=c?"th":"td",b=Object.assign(Object.assign({},p&&{colspan:p}),A&&{rowspan:A});return this.wrap(l,u,b)}).join("");return this.wrap("tr",i)}).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:o,height:i}=n||{},a=Object.assign(Object.assign({},o&&{width:o}),i&&{height:i}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,o=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",i=this.wrap(o,e);return this.addRaw(i).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}),o=this.wrap("blockquote",e,n);return this.addRaw(o).addEOL()}addLinLine truncated
|
|
|
|
|
`),e=e.replace(/\r/g,`
|
|
|
|
|
`));let n=e.split(`
|
|
|
|
|
`).map(i=>i.trim());for(let i of n)!i||i.startsWith("#")||s.patterns.push(new UO(i));return s.searchPaths.push(...PQ(s.patterns)),s})}static stat(e,r,s){return XQ(this,void 0,void 0,function*(){let n;if(r.followSymbolicLinks)try{n=yield Ub.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){_(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw i}else n=yield Ub.promises.lstat(e.path);if(n.isDirectory()&&r.followSymbolicLinks){let i=yield Ub.promises.realpath(e.path);for(;s.length>=e.level;)s.pop();if(s.some(o=>o===i)){_(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}s.push(i)}return n})}};var df0=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function tbe(t,e){return df0(this,void 0,void 0,function*(){return yield pI.create(t,e)})}var DI=F(require("crypto"),1),Xb=F(require("fs"),1),o2=F(require("path"),1),XMe=F(GMe(),1),VMe=F(require("util"),1);var KO;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(KO||(KO={}));var As;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(As||(As={}));var kn;(function(t){t.GNU="gnu",t.BSD="bsd"})(kn||(kn={}));var CI=2,BI=5e3,Ak=5e3,dk=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,HMe=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,ZO="cache.tar",fk="manifest.txt",$mt=10*Math.pow(1024,3);var Hb=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},pM0=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(i){r[i]=t[i]&&function(o){return new Promise(function(a,c){o=t[i](o),n(a,c,o.done,o.value)})}}function n(i,o,a,c){Promise.resolve(c).then(function(u){i({value:u,done:a})},o)}},lM0="1.0";function e3(){return Hb(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let s;t?s=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?s="/Users":s="/home",e=o2.join(s,"actions","temp")}let r=o2.join(e,DI.randomUUID());return yield Uu(r),r})}function Ua(t){return Xb.statSync(t).size}function hk(t){return Hb(this,void 0,void 0,function*(){var e,r,s,n,i;let o=[],a=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),c=yield tbe(t.join(`
|
|
|
|
|
`),{implicitDescendants:!1});try{for(var u=!0,p=pM0(c.globGenerator()),l;l=yield p.next(),e=l.done,!e;u=!0){n=l.value,u=!1;let h=o2.relative(a,n).replace(new RegExp(`\\${o2.sep}`,"g"),"/");_(`Matched: ${h}`),h===""?o.push("."):o.push(`${h}`)}}catch(A){r={error:A}}finally{try{!u&&!e&&(s=p.return)&&(yield s.call(p))}finally{if(r)throw r.error}}return o})}function t3(t){return Hb(this,void 0,void 0,function*(){return VMe.promisify(Xb.unlink)(t)})}function jMe(t){return Hb(this,arguments,void 0,function*(e,r=[]){let s="";r.push("--version"),_(`Checking ${e} ${r.join(" ")}`);try{yield Pn(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:n=>s+=n.toString(),stderr:n=>s+=n.toString()}})}catch(n){_(n.message)}return s=s.trim(),_(s),s})}function r3(){return Hb(this,void 0,void 0,function*(){let t=yield jMe("zstd",["--quiet"]),e=XMe.clean(t);return _(`zstd version: ${e}`),t===""?As.Gzip:As.ZstdWithoutLong})}function tA(t){return t===As.Gzip?KO.Gzip:KO.Zstd}function $Me(){return Hb(this,void 0,void 0,function*(){return Xb.existsSync(dk)?dk:(yield jMe("tar")).toLowerCase().includes("gnu tar")?hr("tar"):""})}function bk(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}function Vb(t,e,r=!1){let s=t.slice();return e&&s.push(e),process.platform==="win32"&&!r&&s.push("windows-only"),s.push(lM0),DI.createHash("sha256").update(s.join("|")).digest("hex")}function YMe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}var yM=F(require("fs"),1),OEe=require("url");var Ga=class extends Error{constructor(e){super(e),this.name="AbortError"}};var JMe=require("node:os"),KMe=F(require("node:util"),1),ZMe=F(require("node:process"),1);function eme(t,...e){ZMe.default.stderr.write(`${KMe.default.format(t,...e)}${JMe.EOL}`)}var tme=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,sme,Mk=[],mk=[],II=[];tme&&gk(tme);var nme=Object.assign(t=>ime(t),{enable:gk,enabled:zk,disable:AM0,log:eme});function gk(t){sme=t,Mk=[],mk=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?mk.push(r.substring(1)):Mk.push(r);for(let r of II)r.enabled=zk(r.namespace)}function zk(t){if(t.endsWith("*"))return!0;for(let e of mk)if(rme(t,e))return!1;for(let e of Mk)if(rme(t,e))return!0;return!1}function rme(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let A=[],h="";for(let M of e)M==="*"&&h==="*"||(h=M,A.push(M));r=A.join("")}let s=0,n=0,i=r.length,o=t.length,a=-1,c=-1;for(;s<o&&n<i;)if(r[n]==="*"){if(a=n,n++,n===i)return!0;for(;t[s]!==r[n];)if(s++,s===o)return!1;c=s,s++,n++;continue}else if(r[n]===t[s])n++,s++;else if(a>=0){if(n=a+1,s=c+1,s===o)return!1;for(;t[s]!==r[n];)if(s++,s===o)return!1;c=s,s++,n++;continue}else return!1;let u=s===t.length,p=n===r.length,l=n===r.length-1&&r[n]==="*";return u&&(p||l)}function AM0(){let t=sme||"";return gk(""),t}function ime(t){let e=Object.assign(r,{enabled:zk(t),destroy:dM0,log:nme.log,namespace:t,extend:fM0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t} ${s[0]}`),e.log(...s))}return II.push(e),e}function dM0(){let t=II.indexOf(this);return t>=0?(II.splice(t,1),!0):!1}function fM0(t){let e=ime(`${this.namespace}:${t}`);return e.log=this.log,e}var jb=nme;var Ok=["verbose","info","warning","error"],ome={verbose:400,info:300,warning:200,error:100};function ame(t,e){e.log=(...r)=>{t.log(...r)}}function cme(t){return Ok.includes(t)}function RI(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,s,n=jb(t.namespace);n.log=(...p)=>{jb.log(...p)};function i(p){if(p&&!cme(p))throw new Error(`Unknown log level '${p}'. Acceptable values: ${Ok.join(",")}`);s=p;let l=[];for(let A of e)o(A)&&l.push(A.namespace);jb.enable(l.join(","))}r&&(cme(r)?i(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${Ok.join(", ")}.`));function o(p){return!!(s&&ome[p.level]<=ome[s])}function a(p,l){let A=Object.assign(p.extend(l),{level:l});if(ame(p,A),o(A)){let h=jb.disable();jb.enable(h+","+A.namespace)}return e.add(A),A}function c(){return s}function u(p){let l=n.extend(p);return ame(n,l),{error:a(l,"error"),warning:a(l,"warning"),info:a(l,"info"),verbose:a(l,"verbose")}}return{setLogLevel:i,getLogLevel:c,createClientLogger:u,logger:n}}var ume=RI({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"}),hM0=ume.logger;function s3(t){return ume.createClientLogger(t)}function wI(t){return t.toLowerCase()}function*bM0(t){for(let e of t.values())yield[e.name,e.value]}var Ek=class{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(wI(e),{name:e,value:String(r).trim()})}get(e){return this._headersMap.get(wI(e))?.value}has(e){return this._headersMap.has(wI(e))}delete(e){this._headersMap.delete(wI(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let s of this._headersMap.value
Line truncated
|
|
|
|
|
${gM0.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function vI(t){return t instanceof ds?!0:c2(t)&&t.name==="RestError"}function Ks(t,e){return Buffer.from(t,e)}var FI=F(require("node:http"),1),TI=F(require("node:https"),1),Dk=F(require("node:zlib"),1),fme=require("node:stream");var xi=s3("ts-http-runtime");var zM0={};function n3(t){return t&&typeof t.pipe=="function"}function dme(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function hme(t){return t&&typeof t.byteLength=="number"}var xI=class extends fme.Transform{loadedBytes=0;progressCallback;_transform(e,r,s){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),s()}catch(n){s(n)}}constructor(e){super(),this.progressCallback=e}},qk=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ga("The operation was aborted. Request has already been canceled.");s=u=>{u.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",s)}let n;e.timeout>0&&(n=setTimeout(()=>{let u=new Vo;xi.info(`request to '${u.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),o=i?.includes("gzip")||i?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let u=CM0(a);u!==null&&e.headers.set("Content-Length",u)}let c;try{if(a&&e.onUploadProgress){let M=e.onUploadProgress,g=new xI(M);g.on("error",y=>{xi.error("Error in upload progress",y)}),n3(a)?a.pipe(g):g.end(a),a=g}let u=await this.makeRequest(e,r,a);n!==void 0&&clearTimeout(n);let p=OM0(u),A={status:u.statusCode??0,headers:p,request:e};if(e.method==="HEAD")return u.resume(),A;c=o?EM0(u,p):u;let h=e.onDownloadProgress;if(h){let M=new xI(h);M.on("error",g=>{xi.error("Error in download progress",g)}),c.pipe(M),c=M}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(A.status)?A.readableStreamBody=c:A.bodyAsText=await yM0(c),A}finally{if(e.abortSignal&&s){let u=Promise.resolve();n3(a)&&(u=dme(a));let p=Promise.resolve();n3(c)&&(p=dme(c)),Promise.all([u,p]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(l=>{xi.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,s){let n=new URL(e.url),i=n.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:n.hostname,path:`${n.pathname}${n.search}`,port:n.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,u)=>{let p=i?FI.default.request(a,c):TI.default.request(a,c);p.once("error",l=>{u(new ds(l.message,{code:l.code??ds.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new Ga("The operation was aborted. Rejecting from abort signal callback while making request.");p.destroy(l),u(l)}),s&&n3(s)?s.pipe(p):s?typeof s=="string"||Buffer.isBuffer(s)?p.end(s):hme(s)?p.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(xi.error("Unrecognized body type",s),u(new ds("Unrecognized body type"))):p.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?FI.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new FI.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return TI.default.globalAgent;let n=e.tlsSettings??zM0,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(xi.info("No cached TLS Agent exist, creating a new Agent"),i=new TI.default.Agent({keepAlive:!s,...n}),this.cachedHttpsAgents.set(n,i)),i}}};function OM0(t){let e=Un();for(let r of Object.keys(t.headers)){let s=t.headers[r];Array.isArray(s)?s.length>0&&e.set(r,s[0]):s&&e.set(r,s)}return e}function EM0(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let s=Dk.default.createGunzip();return t.pipe(s),s}else if(r==="deflate"){let s=Dk.default.createInflate();return t.pipe(s),s}return t}function yM0(t){return new Promise((e,r)=>{let s=[];t.on("data",n=>{Buffer.isBuffer(n)?s.push(n):s.push(Buffer.from(n))}),t.on("end",()=>{e(Buffer.concat(s).toString("utf8"))}),t.on("error",n=>{n&&n?.name==="AbortError"?r(n):r(new ds(`Error reading response as text: ${n.message}`,{code:ds.PARSE_ERROR}))})})}function CM0(t){return t?Buffer.isBuffer(t)?t.length:n3(t)?null:hme(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function bme(){return new qk}function WI(){return bme()}var Ik="logPolicy";function _I(t={}){let e=t.logger??xi.info,r=new Vo({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additional
Line truncated
|
|
|
|
|
`;return e}function rg0(t){return t instanceof Uint8Array?t.byteLength:iR(t)?t.size===-1?void 0:t.size:void 0}function sg0(t){let e=0;for(let r of t){let s=rg0(r);if(s===void 0)return;e+=s}return e}async function ng0(t,e,r){let s=[Ks(`--${r}`,"utf-8"),...e.flatMap(i=>[Ks(`\r
|
|
|
|
|
`,"utf-8"),Ks(tg0(i.headers),"utf-8"),Ks(`\r
|
|
|
|
|
`,"utf-8"),i.body,Ks(`\r
|
|
|
|
|
--${r}`,"utf-8")]),Ks(`--\r
|
|
|
|
|
`));let o=e.split(`
|
|
|
|
|
`).map(i=>i.trim());for(let i of o)!i||i.startsWith("#")||n.patterns.push(new Ef(i));return n.searchPaths.push(...Ww(n.patterns)),n})}static stat(e,r,n){return Pw(this,void 0,void 0,function*(){let o;if(r.followSymbolicLinks)try{o=yield gl.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){yn(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw i}else o=yield gl.promises.lstat(e.path);if(o.isDirectory()&&r.followSymbolicLinks){let i=yield gl.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===i)){yn(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return o})}};var q7e=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})};function Gee(t,e){return q7e(this,void 0,void 0,function*(){return yield QO.create(t,e)})}s(Gee,"create");var n3=w(require("crypto"),1),yl=w(require("fs"),1),Wu=w(require("path"),1),v1e=w(x1e(),1),L1e=w(require("util"),1);var Rf;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Rf||(Rf={}));var Qt;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Qt||(Qt={}));var Hr;(function(t){t.GNU="gnu",t.BSD="bsd"})(Hr||(Hr={}));var e3=2,t3=5e3,c6=5e3,u6=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,T1e=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,Nf="cache.tar",p6="manifest.txt",hF0=10*Math.pow(1024,3),r3="cache read denied:";var Cl=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})},WGe=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(i){r[i]=t[i]&&function(a){return new Promise(function(c,u){a=t[i](a),o(c,u,a.done,a.value)})}}function o(i,a,c,u){Promise.resolve(u).then(function(p){i({value:p,done:c})},a)}},xGe="1.0";function wf(){return Cl(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=Wu.join(n,"actions","temp")}let r=Wu.join(e,n3.randomUUID());return yield vs(r),r})}s(wf,"createTempDirectory");function si(t){return yl.statSync(t).size}s(si,"getArchiveFileSizeInBytes");function A6(t){return Cl(this,void 0,void 0,function*(){var e,r,n,o,i;let a=[],c=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),u=yield Gee(t.join(`
|
|
|
|
|
`),{implicitDescendants:!1});try{for(var p=!0,A=WGe(u.globGenerator()),l;l=yield A.next(),e=l.done,!e;p=!0){o=l.value,p=!1;let M=Wu.relative(c,o).replace(new RegExp(`\\${Wu.sep}`,"g"),"/");N(`Matched: ${M}`),M===""?a.push("."):a.push(`${M}`)}}catch(b){r={error:b}}finally{try{!p&&!e&&(n=A.return)&&(yield n.call(A))}finally{if(r)throw r.error}}return a})}s(A6,"resolvePaths");function Sf(t){return Cl(this,void 0,void 0,function*(){return L1e.promisify(yl.unlink)(t)})}s(Sf,"unlinkFile");function _1e(t){return Cl(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),N(`Checking ${e} ${r.join(" ")}`);try{yield kr(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:s(o=>n+=o.toString(),"stdout"),stderr:s(o=>n+=o.toString(),"stderr")}})}catch(o){N(o.message)}return n=n.trim(),N(n),n})}s(_1e,"getVersion");function Ff(){return Cl(this,void 0,void 0,function*(){let t=yield _1e("zstd",["--quiet"]),e=v1e.clean(t);return N(`zstd version: ${e}`),t===""?Qt.Gzip:Qt.ZstdWithoutLong})}s(Ff,"getCompressionMethod");function oc(t){return t===Qt.Gzip?Rf.Gzip:Rf.Zstd}s(oc,"getCacheFileName");function Q1e(){return Cl(this,void 0,void 0,function*(){return yl.existsSync(u6)?u6:(yield _1e("tar")).toLowerCase().includes("gnu tar")?at("tar"):""})}s(Q1e,"getGnuTarPathOnWindows");function l6(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}s(l6,"assertDefined");function Bl(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(xGe),n3.createHash("sha256").update(n.join("|")).digest("hex")}s(Bl,"getCacheVersion");function P1e(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}s(P1e,"getRuntimeToken");var xf=w(require("http"),1),f6=w(require("https"),1);function d6(t){let e=t.protocol==="https:";if(TGe(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 i3(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new i3(`http://${r}`)}else return}s(d6,"getProxyUrl");function TGe(t){if(!t.hostname)return!1;let e=t.hostname;if(vGe(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 o=[t.hostname.toUpperCase()];typeof n=="number"&&o.push(`${o[0]}:${n}`);for(let i of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(i==="*"||o.some(a=>a===i||a.endsWith(`.${i}`)||i.startsWith(".")&&a.endsWith(`${i}`)))return!0;return!1}s(TGe,"checkBypass");function vGe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}s(vGe,"isLoopbackAddress");var i3=class extends URL{static{s(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 ic=w(Kd(),1),k1e=w(Al(),1);var E1=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})},i1;(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"})(i1||(i1={}));var Pt;(function(t){t.Accept="accept",t.ContentType="content-type"})(Pt||(Pt={}));var ks;(function(t){t.ApplicationJson="application/json"})(ks||(ks={}));var _Ge=[i1.MovedPermanently,i1.ResourceMoved,i1.SeeOther,i1.TemporaryRedirect,i1.PermanentRedirect],QGe=[i1.BadGateway,i1.ServiceUnavailable,i1.GatewayTimeout],PGe=["OPTIONS","GET","DELETE","HEAD"],kGe=10,UGe=5,ai=class t extends Error{static{s(this,"HttpClientError")}const
Line truncated
|
|
|
|
|
${KGe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function A3(t){return t instanceof kt?!0:Tu(t)&&t.name==="RestError"}s(A3,"isRestError");function ar(t,e){return Buffer.from(t,e)}s(ar,"stringToUint8Array");var l3=w(require("node:http"),1),d3=w(require("node:https"),1),B6=w(require("node:zlib"),1),ste=require("node:stream");var qn=Tf("ts-http-runtime");var ZGe={};function vf(t){return t&&typeof t.pipe=="function"}s(vf,"isReadableStream");function ite(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=s(()=>{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)})}s(ite,"isStreamComplete");function ate(t){return t&&typeof t.byteLength=="number"}s(ate,"isArrayBuffer");var b3=class extends ste.Transform{static{s(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(o){n(o)}}constructor(e){super(),this.progressCallback=e}},D6=class{static{s(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new ci("The operation was aborted. Request has already been canceled.");n=s(p=>{p.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let o;e.timeout>0&&(o=setTimeout(()=>{let p=new Oo;qn.info(`request to '${p.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),a=i?.includes("gzip")||i?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let p=nHe(c);p!==null&&e.headers.set("Content-Length",p)}let u;try{if(c&&e.onUploadProgress){let z=e.onUploadProgress,g=new b3(z);g.on("error",C=>{qn.error("Error in upload progress",C)}),vf(c)?c.pipe(g):g.end(c),c=g}let p=await this.makeRequest(e,r,c);o!==void 0&&clearTimeout(o);let A=eHe(p),b={status:p.statusCode??0,headers:A,request:e};if(e.method==="HEAD")return p.resume(),b;u=a?tHe(p,A):p;let M=e.onDownloadProgress;if(M){let z=new b3(M);z.on("error",g=>{qn.error("Error in download progress",g)}),u.pipe(z),u=z}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(b.status)?b.readableStreamBody=u:b.bodyAsText=await rHe(u),b}finally{if(e.abortSignal&&n){let p=Promise.resolve();vf(c)&&(p=ite(c));let A=Promise.resolve();vf(u)&&(A=ite(u)),Promise.all([p,A]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{qn.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let o=new URL(e.url),i=o.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,i),hostname:o.hostname,path:`${o.pathname}${o.search}`,port:o.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((u,p)=>{let A=i?l3.default.request(c,u):d3.default.request(c,u);A.once("error",l=>{p(new kt(l.message,{code:l.code??kt.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new ci("The operation was aborted. Rejecting from abort signal callback while making request.");A.destroy(l),p(l)}),n&&vf(n)?n.pipe(A):n?typeof n=="string"||Buffer.isBuffer(n)?A.end(n):ate(n)?A.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(qn.error("Unrecognized body type",n),p(new kt("Unrecognized body type"))):A.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?l3.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new l3.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return d3.default.globalAgent;let o=e.tlsSettings??ZGe,i=this.cachedHttpsAgents.get(o);return i&&i.options.keepAlive===!n||(qn.info("No cached TLS Agent exist, creating a new Agent"),i=new d3.default.Agent({keepAlive:!n,...o}),this.cachedHttpsAgents.set(o,i)),i}}};function eHe(t){let e=Xr();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}s(eHe,"getResponseHeaders");function tHe(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=B6.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=B6.default.createInflate();return t.pipe(n),n}return t}s(tHe,"getDecodedResponseStream");function rHe(t){return new Promise((e,r)=>{let n=[];t.on("data",o=>{Buffer.isBuffer(o)?n.push(o):n.push(Buffer.from(o))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",o=>{o&&o?.name==="AbortError"?r(o):r(new kt(`Error reading response as text: ${o.message}`,{code:kt.PARSE_ERROR}))})})}s(rHe,"streamToText");function nHe(t){return t?Buffer.isBuffer(t)?t.length:
Line truncated
|
|
|
|
|
`;return e}s(WXe,"encodeHeaders");function xXe(t){return t instanceof Uint8Array?t.byteLength:L3(t)?t.size===-1?void 0:t.size:void 0}s(xXe,"getLength");function TXe(t){let e=0;for(let r of t){let n=xXe(r);if(n===void 0)return;e+=n}return e}s(TXe,"getTotalLength");async function vXe(t,e,r){let n=[ar(`--${r}`,"utf-8"),...e.flatMap(i=>[ar(`\r
|
|
|
|
|
`,"utf-8"),ar(WXe(i.headers),"utf-8"),ar(`\r
|
|
|
|
|
`,"utf-8"),i.body,ar(`\r
|
|
|
|
|
--${r}`,"utf-8")]),ar(`--\r
|
|
|
|
|
\r
|
|
|
|
|
`,"utf-8")],n=sg0(s);n&&t.headers.set("Content-Length",n),t.body=await Mge(s)}var c3="multipartPolicy",ig0=70,og0=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function ag0(t){if(t.length>ig0)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!og0.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function aR(){return{name:c3,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,s=t.headers.get("Content-Type")??"multipart/mixed",n=s.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!n)throw new Error(`Got multipart request body, but content-type header was not multipart: ${s}`);let[,i,o]=n;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return r??=o,r?ag0(r):r=eg0(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await ng0(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function cR(){return NI()}var mge=RI({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),N3t=mge.logger;function Va(t){return mge.createClientLogger(t)}var ja=Va("core-rest-pipeline");function Vk(t={}){return _I({logger:ja.info,...t})}var jk=LI;function $k(t={}){return PI(t)}var uR=F(require("node:os"),1),pR=F(require("node:process"),1);function gge(){return"User-Agent"}async function zge(t){if(pR.default&&pR.default.versions){let e=`${uR.default.type()} ${uR.default.release()}; ${uR.default.arch()}`,r=pR.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}var lR="1.22.2";function hg0(t){let e=[];for(let[r,s]of t){let n=s?`${r}/${s}`:r;e.push(n)}return e.join(" ")}function Oge(){return gge()}async function AR(t){let e=new Map;e.set("core-rest-pipeline",lR),await zge(e);let r=hg0(e);return t?`${t} ${r}`:r}var Ege=Oge(),yge="userAgentPolicy";function Yk(t={}){let e=AR(t.userAgentPrefix);return{name:yge,async sendRequest(r,s){return r.headers.has(Ege)||r.headers.set(Ege,await e),s(r)}}}var Vn=class extends Error{constructor(e){super(e),this.name="AbortError"}};function Jk(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,o)=>{function a(){o(new Vn(n??"The operation was aborted."))}function c(){s?.removeEventListener("abort",u)}function u(){r?.(),c(),a()}if(s?.aborted)return a();try{t(p=>{c(),i(p)},p=>{c(),o(p)})}catch(p){o(p)}s?.addEventListener("abort",u)})}var zg0="The delay was aborted.";function u3(t,e){let r,{abortSignal:s,abortErrorMsg:n}=e??{};return Jk(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:s,abortErrorMsg:n??zg0})}function sA(t){if(c2(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}`}}function Cge(t){return c2(t)}function tM(){return a2()}var N0=l2;var Bge=Symbol("rawContent");function Zk(t){return typeof t[Bge]=="function"}function Dge(t){return Zk(t)?t[Bge]():t}var dR=c3;function e7(){let t=aR();return{name:dR,sendRequest:async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)Zk(s.body)&&(s.body=Dge(s.body));return t.sendRequest(e,r)}}}var t7=QI;function r7(){return kI()}function s7(t={}){return HI(t)}function n7(){return XI()}function nA(t){return kk(t)}function i7(t,e){return rR(t,e)}var qge="setClientRequestIdPolicy";function o7(t="x-ms-client-request-id"){return{name:qge,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function a7(t){return sR(t)}function c7(t){return nR(t)}var rM={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Ige(t={}){let e=new u7(t.parentContext);return t.span&&(e=e.setValue(rM.span,t.span)),t.namespace&&(e=e.setValue(rM.namespace,t.namespace)),e}var u7=class t{_contextMap;constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,r){let s=new t(this);return s._contextMap.set(e,r),s}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};var wge=F(Rge(),1),hR=wge.state;function Og0(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}}}function Eg0(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(t,e)=>({span:Og0(),tracingContext:Ige({parentContext:e.tracingContext})}),withContext(t,e,...r){return e(...r)}}}function p3(){return hR.instrumenterImplementation||(hR.instrumenterImplementation=Eg0()),hR.instrumenterImplementation}function l3(t){let{namespace:e,packageName:r,packageVersion:s}=t;function n(u,p,l){let A=p3().startSpan(u,{...l,packageName:r,packageVersion:s,tracingContext:p?.tracingOptions?.tracingContext}),h=A.tracingConte
Line truncated
|
|
|
|
|
`&&t[i]!=="\r";i++)c+=t[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!Gz0(c)){let l;return c.trim().length===0?l="Invalid space after '<'.":l="Tag '"+c+"' is an invalid name.",r1("InvalidTag",l,fs(t,i))}let u=Lz0(t,i);if(u===!1)return r1("InvalidAttr","Attributes for '"+c+"' have open quote.",fs(t,i));let p=u.value;if(i=u.index,p[p.length-1]==="/"){let l=i-p.length;p=p.substring(0,p.length-1);let A=lze(p,e);if(A===!0)s=!0;else return r1(A.err.code,A.err.msg,fs(t,l+A.err.line))}else if(a)if(u.tagClosed){if(p.trim().length>0)return r1("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",fs(t,o));if(r.length===0)return r1("InvalidTag","Closing tag '"+c+"' has not been opened.",fs(t,o));{let l=r.pop();if(c!==l.tagName){let A=fs(t,l.tagStartPos);return r1("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+A.line+", col "+A.col+") instead of closing tag '"+c+"'.",fs(t,o))}r.length==0&&(n=!0)}}else return r1("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",fs(t,i));else{let l=lze(p,e);if(l!==!0)return r1(l.err.code,l.err.msg,fs(t,i-p.length+l.err.line));if(n===!0)return r1("InvalidXml","Multiple possible root nodes found.",fs(t,i));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:o}),s=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=pze(t,i);continue}else if(t[i+1]==="?"){if(i=uze(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=kz0(t,i);if(l==-1)return r1("InvalidChar","char '&' is not expected.",fs(t,i));i=l}else if(n===!0&&!cze(t[i]))return r1("InvalidXml","Extra text at the end",fs(t,i));t[i]==="<"&&i--}}else{if(cze(t[i]))continue;return r1("InvalidChar","char '"+t[i]+"' is not expected.",fs(t,i))}if(s){if(r.length==1)return r1("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",fs(t,r[0].tagStartPos));if(r.length>0)return r1("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return r1("InvalidXml","Start tag expected.",1);return!0}function cze(t){return t===" "||t===" "||t===`
|
|
|
|
|
`||t==="\r"}function uze(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let s=t.substr(r,e-r);if(e>5&&s==="xml")return r1("InvalidXml","XML declaration allowed only at the start of the document.",fs(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function pze(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}var Wz0='"',_z0="'";function Lz0(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===Wz0||t[e]===_z0)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){n=!0;break}r+=t[e]}return s!==""?!1:{value:r,index:e,tagClosed:n}}var Pz0=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function lze(t,e){let r=CR(t,Pz0),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return r1("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",O3(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return r1("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",O3(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return r1("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",O3(r[n]));let i=r[n][2];if(!Uz0(i))return r1("InvalidAttr","Attribute '"+i+"' is an invalid name.",O3(r[n]));if(!Object.prototype.hasOwnProperty.call(s,i))s[i]=1;else return r1("InvalidAttr","Attribute '"+i+"' is repeated.",O3(r[n]))}return!0}function Qz0(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}function kz0(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Qz0(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function r1(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Uz0(t){return q7(t)}function Gz0(t){return q7(t)}function fs(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function O3(t){return t.startIndex+t[1].length}var Aze={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"},dze={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"},fze={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:"\u0125",Hstrok:"\u0126",hstrok:"\u0127",Itilde:"\u0128",itilde:"\u0129",Imacr:"\u012A",imacr:"\u012B",Iogon:"\u012E",iogon:"\u012F",Idot:"\u0130",IJlig:"\u0132",ijlig:"\u0133",Jcirc:"\u0134",jcirc:"\u0135",Kcedil:"\u0136",kcedil:"\u0137",kgreen:"\u0138",Lacute:"\u0139",lacute:"\u013A",Lcedil:"\u013B",lcedil:"\u013C",LcaroLine truncated
|
|
|
|
|
`);let e=new rn("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,i=new C3(n.processEntities),o=t.length;for(let a=0;a<o;a++)if(t[a]==="<"){let u=t.charCodeAt(a+1);if(u===47){let p=aM(t,">",a,"Closing Tag is not closed."),l=t.substring(a+2,p).trim();if(n.removeNSPrefix){let h=l.indexOf(":");h!==-1&&(l=l.substr(h+1))}l=T7(n.transformTagName,l,"",n).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let A=this.matcher.getCurrentTag();if(l&&n.unpairedTagsSet.has(l))throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);A&&n.unpairedTagsSet.has(A)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),s="",a=p}else if(u===63){let p=x7(t,a,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let l=this.buildAttributesMap(p.tagExp,this.matcher,p.tagName,!0);if(l){let A=l[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(A)||1),i.setXmlVersion(Number(A)||1)}if(!(n.ignoreDeclaration&&p.tagName==="?xml"||n.ignorePiTags)){let A=new rn(p.tagName);A.add(n.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&n.ignoreAttributes!==!0&&(A[":@"]=l),this.addChild(r,A,this.readonlyMatcher,a)}a=p.closeIndex+1}else if(u===33&&t.charCodeAt(a+2)===45&&t.charCodeAt(a+3)===45){let p=aM(t,"-->",a+4,"Comment is not closed.");if(n.commentPropName){let l=t.substring(a+4,p-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(n.commentPropName,[{[n.textNodeName]:l}])}a=p}else if(u===33&&t.charCodeAt(a+2)===68){let p=i.readDocType(t,a);this.entityDecoder.addInputEntities(p.entities),a=p.i}else if(u===33&&t.charCodeAt(a+2)===91){let p=aM(t,"]]>",a,"CDATA is not closed.")-2,l=t.substring(a+9,p);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let A=this.parseTextData(l,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);A==null&&(A=""),n.cdataPropName?r.add(n.cdataPropName,[{[n.textNodeName]:l}]):r.add(n.textNodeName,A),a=p+2}else{let p=x7(t,a,n.removeNSPrefix);if(!p){let T=t.substring(Math.max(0,a-50),Math.min(o,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${T}"`)}let l=p.tagName,A=p.rawTagName,h=p.tagExp,M=p.attrExpPresent,g=p.closeIndex;if({tagName:l,tagExp:h}=T7(n.transformTagName,l,h,n),n.strictReservedNames&&(l===n.commentPropName||l===n.cdataPropName||l===n.textNodeName||l===n.attributesGroupName))throw new Error(`Invalid tag name: ${l}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher,!1));let y=r;y&&n.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let O=!1;h.length>0&&h.lastIndexOf("/")===h.length-1&&(O=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),h=l):h=h.substr(0,h.length-1),M=l!==h);let B=null,I={},R;R=dO0(A),l!==e.tagname&&this.matcher.push(l,{},R),l!==h&&M&&(B=this.buildAttributesMap(h,this.matcher,l),B&&(I=AO0(B,n))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=a;if(this.isCurrentNodeStopNode){let T="";if(O)a=p.closeIndex;else if(n.unpairedTagsSet.has(l))a=p.closeIndex;else{let $=this.readStopNodeData(t,A,g+1);if(!$)throw new Error(`Unexpected end of ${A}`);a=$.i,T=$.tagContent}let W=new rn(l);B&&(W[":@"]=B),W.add(n.textNodeName,T),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,W,this.readonlyMatcher,N)}else{if(O){({tagName:l,tagExp:h}=T7(n.transformTagName,l,h,n));let T=new rn(l);B&&(T[":@"]=B),this.addChild(r,T,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(n.unpairedTagsSet.has(l)){let T=new rn(l);B&&(T[":@"]=B),this.addChild(r,T,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=p.closeIndex;continue}else{let T=new rn(l);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),B&&(T[":@"]=B),this.addChild(r,T,this.readonlyMatcher,N),r=T}s="",a=g}}}else s+=t[a];return e.child};function gO0(t,e,r,s){this.options.captureMetaData||(s=void 0);let n=this.options.jPath?r.toString():r,i=this.options.updateTag(e.tagname,n,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,s))}function zO0(t,e,r){let s=this.options.processEntities;if(!s||!s.enabled)return t;if(s.allowedTags){let n=this.options.jPath?r.toString():r;if(!(Array.isArray(s.allowedTags)?s.allowedTags.includes(e):s.allowedTags(e,n)))return t}if(s.tagFilter){let n=this.options.jPath?r.toString():r;if(!s.tagFilter(e,n))return t}return this.entityDecoder.decode(t)}function OO0(t,e,r,s){return t&&(s===void 0&&(s=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,s),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function EO0(){return this.stopNodeExpressionsSet.size===0?!1:this.matcher.matchesAny(this.stopNodeExpressionsSet)}function yO0(t,e,r=">"){Line truncated
|
|
|
|
|
`;function SO0(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(k7(r)==="?xml"){let n=r[":@"];if(n){let i=e.attributeNamePrefix+"version";if(n[i])return n[i]}}return"1.0"}function Fze(t,e,r,s,n){return!r.sanitizeName||M2(t,{xmlVersion:n})?t:r.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()})}function Q7(t,e){let r="";e.format&&(r=wO0);let s=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let o=0;o<e.stopNodes.length;o++){let a=e.stopNodes[o];typeof a=="string"?s.push(new Yn(a)):a instanceof Yn&&s.push(a)}let n=SO0(t,e),i=new Ja;return Tze(t,e,r,i,s,n)}function Tze(t,e,r,s,n,i){let o="",a=!1;if(e.maxNestedTags&&s.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let c=t.toString();return c=P7(c,e),c}return""}for(let c=0;c<t.length;c++){let u=t[c],p=k7(u);if(p===void 0)continue;let A=p===e.textNodeName||p===e.cdataPropName||p===e.commentPropName||p[0]==="?"?p:Fze(p,!1,e,s,i),h=NO0(u[":@"],e);s.push(A,h);let M=FO0(s,n);if(A===e.textNodeName){let I=u[p];M||(I=e.tagValueProcessor(A,I),I=P7(I,e)),a&&(o+=r),o+=I,a=!1,s.pop();continue}else if(A===e.cdataPropName){a&&(o+=r);let I=u[p][0][e.textNodeName],R=SR(I);o+=`<![CDATA[${R}]]>`,a=!1,s.pop();continue}else if(A===e.commentPropName){let I=u[p][0][e.textNodeName],R=wR(I);o+=r+`<!--${R}-->`,a=!0,s.pop();continue}else if(A[0]==="?"){let I=vze(u[":@"],e,M,s,i);o+=(A==="?xml"?"":r)+`<${A}${I}?>`,a=!0,s.pop();continue}let g=r;g!==""&&(g+=e.indentBy);let y=vze(u[":@"],e,M,s,i),O=r+`<${A}${y}`,B;M?B=xze(u[p],e):B=Tze(u[p],e,g,s,n,i),e.unpairedTags.indexOf(A)!==-1?e.suppressUnpairedNode?o+=O+">":o+=O+"/>":(!B||B.length===0)&&e.suppressEmptyNode?o+=O+"/>":B&&B.endsWith(">")?o+=O+`>${B}${r}</${A}>`:(o+=O+">",B&&r!==""&&(B.includes("/>")||B.includes("</"))?o+=r+e.indentBy+B+r:o+=B,o+=`</${A}>`),a=!0,s.pop()}return o}function NO0(t,e){if(!t||e.ignoreAttributes)return null;let r={},s=!1;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=n.startsWith(e.attributeNamePrefix)?n.substr(e.attributeNamePrefix.length):n;r[i]=aA(t[n]),s=!0}return s?r:null}function xze(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let s=0;s<t.length;s++){let n=t[s],i=k7(n);if(i===e.textNodeName)r+=n[i];else if(i===e.cdataPropName)r+=n[i][0][e.textNodeName];else if(i===e.commentPropName)r+=n[i][0][e.textNodeName];else{if(i&&i[0]==="?")continue;if(i){let o=vO0(n[":@"],e),a=xze(n[i],e);!a||a.length===0?r+=`<${i}${o}/>`:r+=`<${i}${o}>${a}</${i}>`}}}return r}function vO0(t,e){let r="";if(t&&!e.ignoreAttributes)for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let n=t[s];n===!0&&e.suppressBooleanAttributes?r+=` ${s.substr(e.attributeNamePrefix.length)}`:r+=` ${s.substr(e.attributeNamePrefix.length)}="${aA(n)}"`}return r}function k7(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let s=e[r];if(Object.prototype.hasOwnProperty.call(t,s)&&s!==":@")return s}}function vze(t,e,r,s,n){let i="";if(t&&!e.ignoreAttributes)for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;let a=o.substr(e.attributeNamePrefix.length),c=r?a:Fze(a,!0,e,s,n),u;r?u=t[o]:(u=e.attributeValueProcessor(o,t[o]),u=P7(u,e)),u===!0&&e.suppressBooleanAttributes?i+=` ${c}`:i+=` ${c}="${aA(u)}"`}return i}function FO0(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}function P7(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){let s=e.entities[r];t=t.replace(s.regex,s.val)}return t}function U7(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}var TO0={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},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 nn(t){if(this.options=Object.assign({},TO0,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&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let r=this.options.stopNodes[e];typeof r=="string"?this.stopNodeExpressions.push(new Yn(r)):r instanceof Yn&&this.stopNodeExpressions.push(r)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignorLine truncated
|
|
|
|
|
`,"utf-8")],o=TXe(n);o&&t.headers.set("Content-Length",o),t.body=await Are(n)}s(vXe,"buildRequestBody");var Qf="multipartPolicy",LXe=70,_Xe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function QXe(t){if(t.length>LXe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!_Xe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}s(QXe,"assertValidBoundary");function Q3(){return{name:Qf,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",o=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!o)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,i,a]=o;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?QXe(r):r=FXe(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await vXe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}s(Q3,"multipartPolicy");function P3(){return p3()}s(P3,"createEmptyPipeline");var lre=a3({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),ML0=lre.logger;function Ai(t){return lre.createClientLogger(t)}s(Ai,"createClientLogger");var li=Ai("core-rest-pipeline");function H6(t={}){return M3({logger:li.info,...t})}s(H6,"logPolicy");var X6=m3;function V6(t={}){return h3(t)}s(V6,"redirectPolicy");var k3=w(require("node:os"),1),U3=w(require("node:process"),1);function dre(){return"User-Agent"}s(dre,"getHeaderName");async function bre(t){if(U3.default&&U3.default.versions){let e=`${k3.default.type()} ${k3.default.release()}; ${k3.default.arch()}`,r=U3.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})`)}}s(bre,"setPlatformSpecificData");var G3="1.22.2";function JXe(t){let e=[];for(let[r,n]of t){let o=n?`${r}/${n}`:r;e.push(o)}return e.join(" ")}s(JXe,"getUserAgentString");function fre(){return dre()}s(fre,"getUserAgentHeaderName");async function H3(t){let e=new Map;e.set("core-rest-pipeline",G3),await bre(e);let r=JXe(e);return t?`${t} ${r}`:r}s(H3,"getUserAgentValue");var Mre=fre(),mre="userAgentPolicy";function J6(t={}){let e=H3(t.userAgentPrefix);return{name:mre,async sendRequest(r,n){return r.headers.has(Mre)||r.headers.set(Mre,await e),n(r)}}}s(J6,"userAgentPolicy");var $r=class extends Error{static{s(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function Y6(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:o}=e??{};return new Promise((i,a)=>{function c(){a(new $r(o??"The operation was aborted."))}s(c,"rejectOnAbort");function u(){n?.removeEventListener("abort",p)}s(u,"removeListeners");function p(){r?.(),u(),c()}if(s(p,"onAbort"),n?.aborted)return c();try{t(A=>{u(),i(A)},A=>{u(),a(A)})}catch(A){a(A)}n?.addEventListener("abort",p)})}s(Y6,"createAbortablePromise");var ZXe="The delay was aborted.";function Pf(t,e){let r,{abortSignal:n,abortErrorMsg:o}=e??{};return Y6(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:s(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:o??ZXe})}s(Pf,"delay");function ac(t){if(Tu(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}`}}s(ac,"getErrorMessage");function hre(t){return Tu(t)}s(hre,"isError");function Wl(){return xu()}s(Wl,"randomUUID");var f0=_u;var zre=Symbol("rawContent");function j6(t){return typeof t[zre]=="function"}s(j6,"hasRawContent");function gre(t){return j6(t)?t[zre]():t}s(gre,"getRawContent");var X3=Qf;function K6(){let t=Q3();return{name:X3,sendRequest:s(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)j6(n.body)&&(n.body=gre(n.body));return t.sendRequest(e,r)},"sendRequest")}}s(K6,"multipartPolicy");var Z6=z3;function eS(){return g3()}s(eS,"decompressResponsePolicy");function tS(t={}){return C3(t)}s(tS,"defaultRetryPolicy");function rS(){return y3()}s(rS,"formDataPolicy");function cc(t){return Q6(t)}s(cc,"getDefaultProxySettings");function nS(t,e){return x3(t,e)}s(nS,"proxyPolicy");var Ore="setClientRequestIdPolicy";function oS(t="x-ms-client-request-id"){return{name:Ore,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}s(oS,"setClientRequestIdPolicy");function iS(t){return T3(t)}s(iS,"agentPolicy");function sS(t){return v3(t)}s(sS,"tlsPolicy");var xl={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Ere(t={}){let e=new aS(t.parentContext);return t.span&&(e=e.setValue(xl.span,t.span)),t.namespace&&(e=e.setValue(xl.namespace,t.namespace)),e}s(Ere,"createTracingContext");var aS=class t{static{s(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e i
Line truncated
|
|
|
|
|
`&&t[i]!=="\r";i++)u+=t[i];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),i--),!CJe(u)){let l;return u.trim().length===0?l="Invalid space after '<'.":l="Tag '"+u+"' is an invalid name.",C1("InvalidTag",l,Ut(t,i))}let p=hJe(t,i);if(p===!1)return C1("InvalidAttr","Attributes for '"+u+"' have open quote.",Ut(t,i));let A=p.value;if(i=p.index,A[A.length-1]==="/"){let l=i-A.length;A=A.substring(0,A.length-1);let b=ine(A,e);if(b===!0)n=!0;else return C1(b.err.code,b.err.msg,Ut(t,l+b.err.line))}else if(c)if(p.tagClosed){if(A.trim().length>0)return C1("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",Ut(t,a));if(r.length===0)return C1("InvalidTag","Closing tag '"+u+"' has not been opened.",Ut(t,a));{let l=r.pop();if(u!==l.tagName){let b=Ut(t,l.tagStartPos);return C1("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+b.line+", col "+b.col+") instead of closing tag '"+u+"'.",Ut(t,a))}r.length==0&&(o=!0)}}else return C1("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",Ut(t,i));else{let l=ine(A,e);if(l!==!0)return C1(l.err.code,l.err.msg,Ut(t,i-A.length+l.err.line));if(o===!0)return C1("InvalidXml","Multiple possible root nodes found.",Ut(t,i));e.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:a}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=one(t,i);continue}else if(t[i+1]==="?"){if(i=nne(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=OJe(t,i);if(l==-1)return C1("InvalidChar","char '&' is not expected.",Ut(t,i));i=l}else if(o===!0&&!rne(t[i]))return C1("InvalidXml","Extra text at the end",Ut(t,i));t[i]==="<"&&i--}}else{if(rne(t[i]))continue;return C1("InvalidChar","char '"+t[i]+"' is not expected.",Ut(t,i))}if(n){if(r.length==1)return C1("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Ut(t,r[0].tagStartPos));if(r.length>0)return C1("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return C1("InvalidXml","Start tag expected.",1);return!0}s(iE,"validate");function rne(t){return t===" "||t===" "||t===`
|
|
|
|
|
`||t==="\r"}s(rne,"isWhiteSpace");function nne(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 C1("InvalidXml","XML declaration allowed only at the start of the document.",Ut(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}s(nne,"readPI");function one(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}s(one,"readCommentAndCDATA");var MJe='"',mJe="'";function hJe(t,e){let r="",n="",o=!1;for(;e<t.length;e++){if(t[e]===MJe||t[e]===mJe)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){o=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:o}}s(hJe,"readAttributeStr");var zJe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function ine(t,e){let r=nE(t,zJe),n={};for(let o=0;o<r.length;o++){if(r[o][1].length===0)return C1("InvalidAttr","Attribute '"+r[o][2]+"' has no space in starting.",Zf(r[o]));if(r[o][3]!==void 0&&r[o][4]===void 0)return C1("InvalidAttr","Attribute '"+r[o][2]+"' is without value.",Zf(r[o]));if(r[o][3]===void 0&&!e.allowBooleanAttributes)return C1("InvalidAttr","boolean attribute '"+r[o][2]+"' is not allowed.",Zf(r[o]));let i=r[o][2];if(!EJe(i))return C1("InvalidAttr","Attribute '"+i+"' is an invalid name.",Zf(r[o]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return C1("InvalidAttr","Attribute '"+i+"' is repeated.",Zf(r[o]))}return!0}s(ine,"validateAttributeString");function gJe(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}s(gJe,"validateNumberAmpersand");function OJe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,gJe(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}s(OJe,"validateAmpersand");function C1(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}s(C1,"getErrorObject");function EJe(t){return BS(t)}s(EJe,"validateAttrName");function CJe(t){return BS(t)}s(CJe,"validateTagName");function Ut(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}s(Ut,"getLineNumberForPosition");function Zf(t){return t.startIndex+t[1].length}s(Zf,"getPositionFromMatch");var sne={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"},ane={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"},cne={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 Ar("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let o=this.options,i=new rM(o.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let p=t.charCodeAt(c+1);if(p===47){let A=Ql(t,">",c,"Closing Tag is not closed."),l=t.substring(c+2,A).trim();if(o.removeNSPrefix){let M=l.indexOf(":");M!==-1&&(l=l.substr(M+1))}l=FS(o.transformTagName,l,"",o).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let b=this.matcher.getCurrentTag();if(l&&o.unpairedTagsSet.has(l))throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);b&&o.unpairedTagsSet.has(b)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=A}else if(p===63){let A=WS(t,c,!1,"?>");if(!A)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let l=this.buildAttributesMap(A.tagExp,this.matcher,A.tagName,!0);if(l){let b=l[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(b)||1),i.setXmlVersion(Number(b)||1)}if(!(o.ignoreDeclaration&&A.tagName==="?xml"||o.ignorePiTags)){let b=new Ar(A.tagName);b.add(o.textNodeName,""),A.tagName!==A.tagExp&&A.attrExpPresent&&o.ignoreAttributes!==!0&&(b[":@"]=l),this.addChild(r,b,this.readonlyMatcher,c)}c=A.closeIndex+1}else if(p===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let A=Ql(t,"-->",c+4,"Comment is not closed.");if(o.commentPropName){let l=t.substring(c+4,A-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(o.commentPropName,[{[o.textNodeName]:l}])}c=A}else if(p===33&&t.charCodeAt(c+2)===68){let A=i.readDocType(t,c);this.entityDecoder.addInputEntities(A.entities),c=A.i}else if(p===33&&t.charCodeAt(c+2)===91){let A=Ql(t,"]]>",c,"CDATA is not closed.")-2,l=t.substring(c+9,A);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let b=this.parseTextData(l,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);b==null&&(b=""),o.cdataPropName?r.add(o.cdataPropName,[{[o.textNodeName]:l}]):r.add(o.textNodeName,b),c=A+2}else{let A=WS(t,c,o.removeNSPrefix);if(!A){let W=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${W}"`)}let l=A.tagName,b=A.rawTagName,M=A.tagExp,z=A.attrExpPresent,g=A.closeIndex;if({tagName:l,tagExp:M}=FS(o.transformTagName,l,M,o),o.strictReservedNames&&(l===o.commentPropName||l===o.cdataPropName||l===o.textNodeName||l===o.attributesGroupName))throw new Error(`Invalid tag name: ${l}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let C=r;C&&o.unpairedTagsSet.has(C.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;M.length>0&&M.lastIndexOf("/")===M.length-1&&(E=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),M=l):M=M.substr(0,M.length-1),z=l!==M);let B=null,D={},q;q=XJe(b),l!==e.tagname&&this.matcher.push(l,{},q),l!==M&&z&&(B=this.buildAttributesMap(M,this.matcher,l),B&&(D=HJe(B,o))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let x=c;if(this.isCurrentNodeStopNode){let W="";if(E)c=A.closeIndex;else if(o.unpairedTagsSet.has(l))c=A.closeIndex;else{let ae=this.readStopNodeData(t,b,g+1);if(!ae)throw new Error(`Unexpected end of ${b}`);c=ae.i,W=ae.tagContent}let _=new Ar(l);B&&(_[":@"]=B),_.add(o.textNodeName,W),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,_,this.readonlyMatcher,x)}else{if(E){({tagName:l,tagExp:M}=FS(o.transformTagName,l,M,o));let W=new Ar(l);B&&(W[":@"]=B),this.addChild(r,W,this.readonlyMatcher,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(o.unpairedTagsSet.has(l)){let W=new Ar(l);B&&(W[":@"]=B),this.addChild(r,W,this.readonlyMatcher,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=A.closeIndex;continue}else{let W=new Ar(l);if(this.tagsNodeStack.length>o.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),B&&(W[":@"]=B),this.addChild(r,W,this.readonlyMatcher,x),r=W}n="",c=g}}}else n+=t[c];return e.child},"parseXml");function KJe(t,e,r,n){this.options.captureMetaData||(n=void 0);let o=this.options.jPath?r.toString():r,i=this.options.updateTag(e.tagname,o,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}s(KJe,"addChild");function ZJe(t,e,r){let n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){let o=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,o)))return t}if(n.tagFilter){let o=this.options.jPath?r.toString():r;if(!n.tagFilter(e,o))return t}return this.entityDecoder.decode(t)}s(ZJe,"replaceEntitiesValue");function eYe(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}s(eYe,"saveTextToParentTag");function tYe(){return this.stopNodeExpressionsLine truncated
|
|
|
|
|
`;function pYe(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(QS(r)==="?xml"){let o=r[":@"];if(o){let i=e.attributeNamePrefix+"version";if(o[i])return o[i]}}return"1.0"}s(pYe,"detectXmlVersionFromArray");function Ine(t,e,r,n,o){return!r.sanitizeName||Gu(t,{xmlVersion:o})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}s(Ine,"resolveTagName");function _S(t,e){let r="";e.format&&(r=uYe);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 Zr(c)):c instanceof Zr&&n.push(c)}let o=pYe(t,e),i=new fi;return Rne(t,e,r,i,n,o)}s(_S,"toXml");function Rne(t,e,r,n,o,i){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 u=t.toString();return u=LS(u,e),u}return""}for(let u=0;u<t.length;u++){let p=t[u],A=QS(p);if(A===void 0)continue;let b=A===e.textNodeName||A===e.cdataPropName||A===e.commentPropName||A[0]==="?"?A:Ine(A,!1,e,n,i),M=AYe(p[":@"],e);n.push(b,M);let z=dYe(n,o);if(b===e.textNodeName){let D=p[A];z||(D=e.tagValueProcessor(b,D),D=LS(D,e)),c&&(a+=r),a+=D,c=!1,n.pop();continue}else if(b===e.cdataPropName){c&&(a+=r);let D=p[A][0][e.textNodeName],q=pE(D);a+=`<![CDATA[${q}]]>`,c=!1,n.pop();continue}else if(b===e.commentPropName){let D=p[A][0][e.textNodeName],q=uE(D);a+=r+`<!--${q}-->`,c=!0,n.pop();continue}else if(b[0]==="?"){let D=qne(p[":@"],e,z,n,i);a+=(b==="?xml"?"":r)+`<${b}${D}?>`,c=!0,n.pop();continue}let g=r;g!==""&&(g+=e.indentBy);let C=qne(p[":@"],e,z,n,i),E=r+`<${b}${C}`,B;z?B=Nne(p[A],e):B=Rne(p[A],e,g,n,o,i),e.unpairedTags.indexOf(b)!==-1?e.suppressUnpairedNode?a+=E+">":a+=E+"/>":(!B||B.length===0)&&e.suppressEmptyNode?a+=E+"/>":B&&B.endsWith(">")?a+=E+`>${B}${r}</${b}>`:(a+=E+">",B&&r!==""&&(B.includes("/>")||B.includes("</"))?a+=r+e.indentBy+B+r:a+=B,a+=`</${b}>`),c=!0,n.pop()}return a}s(Rne,"arrToStr");function AYe(t,e){if(!t||e.ignoreAttributes)return null;let r={},n=!1;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;let i=o.startsWith(e.attributeNamePrefix)?o.substr(e.attributeNamePrefix.length):o;r[i]=Ac(t[o]),n=!0}return n?r:null}s(AYe,"extractAttributeValues");function Nne(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let n=0;n<t.length;n++){let o=t[n],i=QS(o);if(i===e.textNodeName)r+=o[i];else if(i===e.cdataPropName)r+=o[i][0][e.textNodeName];else if(i===e.commentPropName)r+=o[i][0][e.textNodeName];else{if(i&&i[0]==="?")continue;if(i){let a=lYe(o[":@"],e),c=Nne(o[i],e);!c||c.length===0?r+=`<${i}${a}/>`:r+=`<${i}${a}>${c}</${i}>`}}}return r}s(Nne,"getRawContent");function lYe(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let o=t[n];o===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${Ac(o)}"`}return r}s(lYe,"attr_to_str_raw");function QS(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}}s(QS,"propName");function qne(t,e,r,n,o){let i="";if(t&&!e.ignoreAttributes)for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=a.substr(e.attributeNamePrefix.length),u=r?c:Ine(c,!0,e,n,o),p;r?p=t[a]:(p=e.attributeValueProcessor(a,t[a]),p=LS(p,e)),p===!0&&e.suppressBooleanAttributes?i+=` ${u}`:i+=` ${u}="${Ac(p)}"`}return i}s(qne,"attr_to_str");function dYe(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}s(dYe,"checkStopNode");function LS(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}s(LS,"replaceEntitiesValue");function PS(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}s(PS,"getIgnoreAttributesFn");var bYe={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:s(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:s(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 dr(t){if(this.options=Object.assign({},bYe,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="")}function xO0(t,e){let r=t["?xml"];if(r&&typeof r=="object"){if(e.attributesGroupName&&r[e.attributesGroupName]){let n=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(n)return n}let s=r[e.attributeNamePrefix+"version"];if(s)return s}return"1.0"}function G7(t,e,r,s,n){return!r.sanitizeName||M2(t,{xmlVersion:n})?t:r.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()})}nn.prototype.build=function(t){if(this.options.preserveOrder)return Q7(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new Ja,r=xO0(t,this.options);return this.j2x(t,0,e,r).val}};nn.prototype.j2x=function(t,e,r,s){let n="",i="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let o=this.options.jPath?r.toString():r,a=this.checkStopNode(r);for(let c in t){if(!Object.prototype.hasOwnProperty.call(t,c))continue;let p=c===this.options.textNodeName||c===this.options.cdataPropName||c===this.options.commentPropName||this.options.attributesGroupName&&c===this.options.attributesGroupName||this.isAttribute(c)||c[0]==="?"?c:G7(c,!1,this.options,r,s);if(typeof t[c]>"u")this.isAttribute(c)&&(i+="");else if(t[c]===null)this.isAttribute(c)||p===this.options.cdataPropName||p===this.options.commentPropName?i+="":p[0]==="?"?i+=this.indentate(e)+"<"+p+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+p+"/"+this.tagEndChar;else if(t[c]instanceof Date)i+=this.buildTextValNode(t[c],p,"",e,r);else if(typeof t[c]!="object"){let l=this.isAttribute(c);if(l&&!this.ignoreAttributesFn(l,o)){let A=G7(l,!0,this.options,r,s);n+=this.buildAttrPairStr(A,""+t[c],a)}else if(!l)if(c===this.options.textNodeName){let A=this.options.tagValueProcessor(c,""+t[c]);i+=this.replaceEntitiesValue(A)}else{r.push(p);let A=this.checkStopNode(r);if(r.pop(),A){let h=""+t[c];h===""?i+=this.indentate(e)+"<"+p+this.closeTag(p)+this.tagEndChar:i+=this.indentate(e)+"<"+p+">"+h+"</"+p+this.tagEndChar}else i+=this.buildTextValNode(t[c],p,"",e,r)}}else if(Array.isArray(t[c])){let l=t[c].length,A="",h="";for(let M=0;M<l;M++){let g=t[c][M];if(!(typeof g>"u"))if(g===null)p[0]==="?"?i+=this.indentate(e)+"<"+p+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+p+"/"+this.tagEndChar;else if(typeof g=="object")if(this.options.oneListGroup){r.push(p);let y=this.j2x(g,e+1,r,s);r.pop(),A+=y.val,this.options.attributesGroupName&&g.hasOwnProperty(this.options.attributesGroupName)&&(h+=y.attrStr)}else A+=this.processTextOrObjNode(g,p,e,r,s);else if(this.options.oneListGroup){let y=this.options.tagValueProcessor(p,g);y=this.replaceEntitiesValue(y),A+=y}else{r.push(p);let y=this.checkStopNode(r);if(r.pop(),y){let O=""+g;O===""?A+=this.indentate(e)+"<"+p+this.closeTag(p)+this.tagEndChar:A+=this.indentate(e)+"<"+p+">"+O+"</"+p+this.tagEndChar}else A+=this.buildTextValNode(g,p,"",e,r)}}this.options.oneListGroup&&(A=this.buildObjectNode(A,p,h,e)),i+=A}else if(this.options.attributesGroupName&&c===this.options.attributesGroupName){let l=Object.keys(t[c]),A=l.length;for(let h=0;h<A;h++){let M=G7(l[h],!0,this.options,r,s);n+=this.buildAttrPairStr(M,""+t[c][l[h]],a)}}else i+=this.processTextOrObjNode(t[c],p,e,r,s)}return{attrStr:n,val:i}};nn.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+'="'+aA(e)+'"'};function WO0(t,e,r,s,n){let i=this.extractAttributes(t);if(s.push(e,i),this.checkStopNode(s)){let c=this.buildRawContent(t),u=this.buildAttributesForStopNode(t);return s.pop(),this.buildObjectNode(c,e,u,r)}let a=this.j2x(t,r+1,s,n);return s.pop(),e[0]==="?"?this.buildTextValNode("",e,a.attrStr,r,s):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,a.attrStr,r,s):this.buildObjectNode(a.val,e,a.attrStr,r)}nn.prototype.extractAttributes=function(t){if(!t||typeof t!="object")return null;let e={},r=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let s=t[this.options.attributesGroupName];for(let n in s){if(!Object.prototype.hasOwnProperty.call(s,n))continue;let i=n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):n;e[i]=aA(s[n]),r=!0}}else for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let n=this.isAttribute(s);n&&(e[n]=aA(t[s]),r=!0)}return r?e:null};nn.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.options.attributesGroupName)continue;let s=t[r];if(r===this.options.textNodeName)e+=s;else if(Array.isA
Line truncated
|
|
|
|
|
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}s(dr,"Builder");function fYe(t,e){let r=t["?xml"];if(r&&typeof r=="object"){if(e.attributesGroupName&&r[e.attributesGroupName]){let o=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(o)return o}let n=r[e.attributeNamePrefix+"version"];if(n)return n}return"1.0"}s(fYe,"detectXmlVersionFromObj");function kS(t,e,r,n,o){return!r.sanitizeName||Gu(t,{xmlVersion:o})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}s(kS,"resolveTagName");dr.prototype.build=function(t){if(this.options.preserveOrder)return _S(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new fi,r=fYe(t,this.options);return this.j2x(t,0,e,r).val}};dr.prototype.j2x=function(t,e,r,n){let o="",i="";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 u in t){if(!Object.prototype.hasOwnProperty.call(t,u))continue;let A=u===this.options.textNodeName||u===this.options.cdataPropName||u===this.options.commentPropName||this.options.attributesGroupName&&u===this.options.attributesGroupName||this.isAttribute(u)||u[0]==="?"?u:kS(u,!1,this.options,r,n);if(typeof t[u]>"u")this.isAttribute(u)&&(i+="");else if(t[u]===null)this.isAttribute(u)||A===this.options.cdataPropName||A===this.options.commentPropName?i+="":A[0]==="?"?i+=this.indentate(e)+"<"+A+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+A+"/"+this.tagEndChar;else if(t[u]instanceof Date)i+=this.buildTextValNode(t[u],A,"",e,r);else if(typeof t[u]!="object"){let l=this.isAttribute(u);if(l&&!this.ignoreAttributesFn(l,a)){let b=kS(l,!0,this.options,r,n);o+=this.buildAttrPairStr(b,""+t[u],c)}else if(!l)if(u===this.options.textNodeName){let b=this.options.tagValueProcessor(u,""+t[u]);i+=this.replaceEntitiesValue(b)}else{r.push(A);let b=this.checkStopNode(r);if(r.pop(),b){let M=""+t[u];M===""?i+=this.indentate(e)+"<"+A+this.closeTag(A)+this.tagEndChar:i+=this.indentate(e)+"<"+A+">"+M+"</"+A+this.tagEndChar}else i+=this.buildTextValNode(t[u],A,"",e,r)}}else if(Array.isArray(t[u])){let l=t[u].length,b="",M="";for(let z=0;z<l;z++){let g=t[u][z];if(!(typeof g>"u"))if(g===null)A[0]==="?"?i+=this.indentate(e)+"<"+A+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+A+"/"+this.tagEndChar;else if(typeof g=="object")if(this.options.oneListGroup){r.push(A);let C=this.j2x(g,e+1,r,n);r.pop(),b+=C.val,this.options.attributesGroupName&&g.hasOwnProperty(this.options.attributesGroupName)&&(M+=C.attrStr)}else b+=this.processTextOrObjNode(g,A,e,r,n);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor(A,g);C=this.replaceEntitiesValue(C),b+=C}else{r.push(A);let C=this.checkStopNode(r);if(r.pop(),C){let E=""+g;E===""?b+=this.indentate(e)+"<"+A+this.closeTag(A)+this.tagEndChar:b+=this.indentate(e)+"<"+A+">"+E+"</"+A+this.tagEndChar}else b+=this.buildTextValNode(g,A,"",e,r)}}this.options.oneListGroup&&(b=this.buildObjectNode(b,A,M,e)),i+=b}else if(this.options.attributesGroupName&&u===this.options.attributesGroupName){let l=Object.keys(t[u]),b=l.length;for(let M=0;M<b;M++){let z=kS(l[M],!0,this.options,r,n);o+=this.buildAttrPairStr(z,""+t[u][l[M]],c)}}else i+=this.processTextOrObjNode(t[u],A,e,r,n)}return{attrStr:o,val:i}};dr.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+'="'+Ac(e)+'"'};function MYe(t,e,r,n,o){let i=this.extractAttributes(t);if(n.push(e,i),this.checkStopNode(n)){let u=this.buildRawContent(t),p=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(u,e,p,r)}let c=this.j2x(t,r+1,n,o);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)}s(MYe,"processTextOrObjNode");dr.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 o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;let i=o.startsWith(this.options.attributeNamePrefix)?o.substring(this.options.attributeNamePrefix.length):o;e[i]=Ac(n[o]),r=!0}}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let o=this.isAttribute(n);o&&(e[o]=Ac(t[n]),r=!0)}return r?e:null};dr.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),s=this.factory.computeHMACSHA256(r);return e.headers.set(Ue.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${s}`),e}getHeaderValueToSign(e,r){let s=e.headers.get(r);return!s||r===Ue.CONTENT_LENGTH&&s==="0"?"":s}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(n=>n.name.toLowerCase().startsWith(Ue.PREFIX_FOR_STORAGE));r.sort((n,i)=>kR(n.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((n,i,o)=>!(i>0&&n.name.toLowerCase()===o[i-1].name.toLowerCase()));let s="";return r.forEach(n=>{s+=`${n.name.toLowerCase().trimRight()}:${n.value.trimLeft()}
|
|
|
|
|
`}),s}getCanonicalizedResourceString(e){let r=LR(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=PR(e.url),i={};if(n){let o=[];for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)){let c=a.toLowerCase();i[c]=n[a],o.push(c)}o.sort();for(let a of o)s+=`
|
|
|
|
|
${a}:${decodeURIComponent(i[a])}`}return s}};var Tt=class extends z2{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new R3(e,r,this)}computeHMACSHA256(e){return(0,Gze.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var q1=Va("storage-common");var Pi;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Pi||(Pi={}));var uA={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Pi.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},XO0=new Vn("The operation was aborted."),w3=class extends Ka{retryOptions;constructor(e,r,s=uA){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:uA.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):uA.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:uA.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:uA.maxRetryDelayInMs):uA.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:uA.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:uA.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,s){let n=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||s%2===1;i||(n.url=_R(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=cA(n.url,Ju.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(q1.info(`RetryPolicy: =====> Try=${s} ${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(n),!this.shouldRetry(i,s,o))return o;r=r||!i&&o.status===404}catch(a){if(q1.error(`RetryPolicy: Caught error, message: ${a.message}, code: ${a.code}`),!this.shouldRetry(i,s,o,a))throw a}return await this.delay(i,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,n){if(r>=this.retryOptions.maxTries)return q1.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(n){for(let o of i)if(n.name.toUpperCase().includes(o)||n.message.toUpperCase().includes(o)||n.code&&n.code.toString().toUpperCase()===o)return q1.info(`RetryPolicy: Network error ${o} found, will retry.`),!0}if(s||n){let o=s?s.status:n?n.statusCode:0;if(!e&&o===404)return q1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return q1.info(`RetryPolicy: Will retry for status code ${o}.`),!0}if(s&&s?.status>=400){let o=s.headers.get(Ue.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return n?.code==="PARSE_ERROR"&&n?.message.startsWith('Error "Error: Unclosed root tag')?(q1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,s){let n=0;if(e)switch(this.retryOptions.retryPolicyType){case Pi.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Pi.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return q1.info(`RetryPolicy: Delay for ${n}ms`),QR(n,s,XO0)}};var S3=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new w3(e,r,this.retryOptions)}};var VO0="storageBrowserPolicy";function Hze(){return{name:VO0,async sendRequest(t,e){return N0||((t.method==="GET"||t.method==="HEAD")&&(t.url=cA(t.url,Ju.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Ue.COOKIE),t.headers.delete(Ue.CONTENT_LENGTH)),e(t)}}}var jO0="StorageCorrectContentLengthPolicy";function Xze(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Ue.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:jO0,async sendRequest(e,r){return t(e),r(e)}}}var $O0="storageRetryPolicy",uM={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Pi.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},YO0=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],JO0=new Vn("The operation was aborted.");function Vze(t={}){let e=t.retryPolicyType??uM.retryPolicyType,r=t.maxTries??uM.maxTries,s=t.retryDelayInMs??uM.retryDelayInMs,n=t.maxRetryDelayInMs??uM.maxRetryDelayInMs,i=t.secondaryHost??uM.secondaryHost,o=t.tryTimeoutInMs??uM.tryTimeoutInMs;function a({isPrimaryRetry:u,attempt:p,response:l,error:A}){if(p>=r)return q1.info(`RetryPolicy: Attempt(s) ${p} >= maxTries ${r}, no further try.`),!1;if(A){for(let h of YO0)if(A.name.toUpperCase().includes(h)||A.message.toUpperCase().includes(h)||A.code&&A.code.toString().toUpperCase()===h)return
Line truncated
|
|
|
|
|
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(qe.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===qe.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(o=>o.name.toLowerCase().startsWith(qe.PREFIX_FOR_STORAGE));r.sort((o,i)=>OE(o.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((o,i,a)=>!(i>0&&o.name.toLowerCase()===a[i-1].name.toLowerCase()));let n="";return r.forEach(o=>{n+=`${o.name.toLowerCase().trimRight()}:${o.value.trimLeft()}
|
|
|
|
|
`}),n}getCanonicalizedResourceString(e){let r=hE(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let o=zE(e.url),i={};if(o){let a=[];for(let c in o)if(Object.prototype.hasOwnProperty.call(o,c)){let u=c.toLowerCase();i[u]=o[c],a.push(u)}a.sort();for(let c of a)n+=`
|
|
|
|
|
${c}:${decodeURIComponent(i[c])}`}return n}};var s1=class extends Vu{static{s(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new aM(e,r,this)}computeHMACSHA256(e){return(0,Lne.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var P1=Ai("storage-common");var wn;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(wn||(wn={}));var dc={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:wn.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},BYe=new $r("The operation was aborted."),cM=class extends Mi{static{s(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=dc){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:dc.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):dc.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:dc.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:dc.maxRetryDelayInMs):dc.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:dc.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:dc.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let o=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(o.url=mE(o.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(o.url=lc(o.url,Vs.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(P1.info(`RetryPolicy: =====> Try=${n} ${i?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(o),!this.shouldRetry(i,n,a))return a;r=r||!i&&a.status===404}catch(c){if(P1.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(i,n,a,c))throw c}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,o){if(r>=this.retryOptions.maxTries)return P1.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(o){for(let a of i)if(o.name.toUpperCase().includes(a)||o.message.toUpperCase().includes(a)||o.code&&o.code.toString().toUpperCase()===a)return P1.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||o){let a=n?n.status:o?o.statusCode:0;if(!e&&a===404)return P1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return P1.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(qe.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return o?.code==="PARSE_ERROR"&&o?.message.startsWith('Error "Error: Unclosed root tag')?(P1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let o=0;if(e)switch(this.retryOptions.retryPolicyType){case wn.EXPONENTIAL:o=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case wn.FIXED:o=this.retryOptions.retryDelayInMs;break}else o=Math.random()*1e3;return P1.info(`RetryPolicy: Delay for ${o}ms`),gE(o,n,BYe)}};var uM=class{static{s(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new cM(e,r,this.retryOptions)}};var DYe="storageBrowserPolicy";function _ne(){return{name:DYe,async sendRequest(t,e){return f0||((t.method==="GET"||t.method==="HEAD")&&(t.url=lc(t.url,Vs.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(qe.COOKIE),t.headers.delete(qe.CONTENT_LENGTH)),e(t)}}}s(_ne,"storageBrowserPolicy");var qYe="StorageCorrectContentLengthPolicy";function Qne(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(qe.CONTENT_LENGTH,Buffer.byteLength(e.body))}return s(t,"correctContentLength"),{name:qYe,async sendRequest(e,r){return t(e),r(e)}}}s(Qne,"storageCorrectContentLengthPolicy");var IYe="storageRetryPolicy",kl={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:wn.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},RYe=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],NYe=new $r("The operation was aborted.");function Pne(t={}){let e=t.retryPolicyType??kl.retryPolicyType,r=t.maxTries??kl.maxTries,n=t.retryDelayInMs??kl.retryDelayInMs,o=t.maxRetryDelayInMs??kl.maxRetryDelayInMs,i=t.secondaryHost??kl.secondaryHost,a=t.tryTimeoutInMs??kl.tryTimeoutInMs;function c({isPrimaryRetry:p,attempt:A,response:l,error:b}){if(A>=r)return
Line truncated
|
|
|
|
|
`)+`
|
|
|
|
|
`+s(i)+n(i),a=(0,jze.createHmac)("sha256",t.accountKey).update(o,"utf8").digest("base64");i.headers.set(Ue.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(i,o){let a=i.headers.get(o);return!a||o===Ue.CONTENT_LENGTH&&a==="0"?"":a}function s(i){let o=[];for(let[c,u]of i.headers)c.toLowerCase().startsWith(Ue.PREFIX_FOR_STORAGE)&&o.push({name:c,value:u});o.sort((c,u)=>kR(c.name.toLowerCase(),u.name.toLowerCase())),o=o.filter((c,u,p)=>!(u>0&&c.name.toLowerCase()===p[u-1].name.toLowerCase()));let a="";return o.forEach(c=>{a+=`${c.name.toLowerCase().trimRight()}:${c.value.trimLeft()}
|
|
|
|
|
`}),a}function n(i){let o=LR(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=PR(i.url),u={};if(c){let p=[];for(let l in c)if(Object.prototype.hasOwnProperty.call(c,l)){let A=l.toLowerCase();u[A]=c[l],p.push(A)}p.sort();for(let l of p)a+=`
|
|
|
|
|
${l}:${decodeURIComponent(u[l])}`}return a}return{name:KO0,async sendRequest(i,o){return e(i),o(i)}}}var ZO0="storageRequestFailureDetailsParserPolicy";function $ze(){return{name:ZO0,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}}}}var Yze=require("node:crypto"),UR=class{accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,Yze.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var GR="12.31.0",HR="2026-02-06";var XR="https://storage.azure.com/.default",Ku={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var jo="",Y7="*",e30=1*1024*1024;var t30=4*e30;var Jze="AES256",Kze="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Zze=["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"],eOe=["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"],tOe="BlobUsesCustomerSpecifiedEncryption",rOe="BlobDoesNotUseCustomerSpecifiedEncryption",sOe=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Zu(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}var N3=class{factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function s1(t,e={}){t||(t=new gt);let r=new N3([],e);return r._credential=t,r}function r30(t){let e=[s30,nOe,n30,i30,o30,a30,u30];if(t.factories.length){let r=t.factories.filter(s=>!e.some(n=>n(s)));if(r.length){let s=r.some(n=>c30(n));return{wrappedPolicies:B7(r),afterRetry:s}}}}function J7(t){let{httpClient:e,...r}=t.options,s=t._coreHttpClient;s||(s=e?D7(e):j7(),t._coreHttpClient=s);let n=t._corePipeline;if(!n){let i=`azsdk-js-azure-storage-blob/${GR}`,o=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;n=f3({...r,loggingOptions:{additionalAllowedHeaderNames:Zze,additionalAllowedQueryParameters:eOe,logger:vR.info},userAgentOptions:{userAgentPrefix:o},serializationOptions:{stringifyXML:NR,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:X7,serializerOptions:{xml:{xmlCharKey:"#"}}}}),n.removePolicy({phase:"Retry"}),n.removePolicy({name:t7}),n.addPolicy(Xze()),n.addPolicy(Vze(r.retryOptions),{phase:"Retry"}),n.addPolicy($ze()),n.addPolicy(Hze());let a=r30(t);a&&n.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:"Retry"}:void 0);let c=K7(t);jn(c)?n.addPolicy(sM({credential:c,scopes:r.audience??XR
Line truncated
|
|
|
|
|
`),i=e.computeHMACSHA256(n);return{sasQueryParameters:new Zo(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:n}}function sy0(t,e){if(t=R2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ko(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
|
|
|
|
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Zo(t.version,o,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}}function ny0(t,e){if(t=R2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ko(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
|
|
|
|
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Zo(t.version,o,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,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}function iy0(t,e){if(t=R2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?v0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?v0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ko(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Zo(t.version,o,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,e.userDelegationKey),stringToSign:i}}function oy0(t,e){if(t=R2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?v0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?v0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ko(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Zo(t.version,o,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,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}function ay0(t,e){if(t=R2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?v0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?v0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ko(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Zo(t.version,o,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,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}function cy0(t,e){if(t=R2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?v0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?v0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Ko(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Zo(t.version,o,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,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}function I2(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}function R2(t){let e=t.version?t.version:HR;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}var G3=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let s=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=s.container):(this._isContainer=!1,this._containerOrBlobOperation=s.blob),r||(r=tM()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==jo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==jo||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 ye.withSpan("BlobLeaseClient-acquireLease",r,async s=>Ie(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:s.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==jo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==jo||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 ye.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=Ie(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:s.tracingOptions}));return this._leaseId=e,n})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==jo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==jo||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 ye.withSpan("BlobLeaseClient-releaseLease",e,async r=>Ie(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!==jo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==jo||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 ye.withSpan("BlobLeaseClient-renewLease",e,async r=>this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.ab
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"}};OM.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var v2=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
|
|
|
|
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};v2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var eE=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var mC0=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},QH=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),s=Date.now()-this.startTime,n=(e/(1024*1024)/(s/1e3)).toFixed(1);ve(`Sent ${e} of ${this.contentLength} (${r}%), ${n} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function aEe(t,e,r){return mC0(this,void 0,void 0,function*(){var s;let n=new op(t),i=n.getBlockBlobClient(),o=new QH((s=r?.archiveSizeBytes)!==null&&s!==void 0?s:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),_(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let c=yield i.uploadFile(e,a);if(c._response.status>=400)throw new Y5(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw t1(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}var uEe=F(require("buffer"),1),Mc=F(require("fs"),1),pEe=F(require("stream"),1),lEe=F(require("util"),1);var J5=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function K5(t){return t?t>=200&&t<300:!1}function gC0(t){return t?t>=500:!0}function zC0(t){return t?[vt.BadGateway,vt.ServiceUnavailable,vt.GatewayTimeout].includes(t):!1}function OC0(t){return J5(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function cEe(t,e,r){return J5(this,arguments,void 0,function*(s,n,i,o=CI,a=BI,c=void 0){let u="",p=1;for(;p<=o;){let l,A,h=!1;try{l=yield n()}catch(M){c&&(l=c(M)),h=!0,u=M.message}if(l&&(A=i(l),!gC0(A)))return l;if(A&&(h=zC0(A),u=`Cache service responded with ${A}`),_(`${s} - Attempt ${p} of ${o} failed with error: ${u}`),!h){_(`${s} - Error is not retryable`);break}yield OC0(a),p++}throw Error(`${s} failed: ${u}`)})}function tE(t,e){return J5(this,arguments,void 0,function*(r,s,n=CI,i=BI){return yield cEe(r,s,o=>o.statusCode,n,i,o=>{if(o instanceof xa)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function EM(t,e){return J5(this,arguments,void 0,function*(r,s,n=CI,i=BI){return yield cEe(r,s,o=>o.message.statusCode,n,i)})}var Hi=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function EC0(t,e){return Hi(this,void 0,void 0,function*(){yield lEe.promisify(pEe.pipeline)(t.message,e)})}var Z5=class{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,_(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.segmentOffset+this.receivedBytes,r=(100*(e/this.contentLength)).toFixed(1),s=Date.now()-this.startTime,n=(e/(1024*1024)/(s/1e3)).toFixed(1);ve(`Received ${e} of ${this.contentLength} (${r}%), ${n} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(
Line truncated
|
|
|
|
|
Other caches with similar key:`);for(let a of i?.artifactCaches||[])_(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function HH(t,e,r){return an(this,void 0,void 0,function*(){let s=new OEe.URL(t),n=hEe(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield dEe(t,e,n):n.concurrentBlobDownloads?yield AEe(t,e,n):yield ew(t,e):yield ew(t,e)})}function yEe(t,e,r){return an(this,void 0,void 0,function*(){let s=GH(),n=Vb(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield tE("reserveCache",()=>an(this,void 0,void 0,function*(){return s.postJson(sE("caches"),i)}))})}function zEe(t,e){return`bytes ${t}-${e}/*`}function wC0(t,e,r,s,n){return an(this,void 0,void 0,function*(){_(`Uploading chunk of size ${n-s+1} bytes at offset ${s} with content range: ${zEe(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":zEe(s,n)},o=yield EM(`uploadChunk (start: ${s}, end: ${n})`,()=>an(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!K5(o.message.statusCode))throw new Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function SC0(t,e,r,s){return an(this,void 0,void 0,function*(){let n=Ua(r),i=sE(`caches/${e.toString()}`),o=yM.openSync(r,"r"),a=kH(s),c=bk("uploadConcurrency",a.uploadConcurrency),u=bk("uploadChunkSize",a.uploadChunkSize),p=[...new Array(c).keys()];_("Awaiting all uploads");let l=0;try{yield Promise.all(p.map(()=>an(this,void 0,void 0,function*(){for(;l<n;){let A=Math.min(n-l,u),h=l,M=l+A-1;l+=u,yield wC0(t,i,()=>yM.createReadStream(r,{fd:o,start:h,end:M,autoClose:!1}).on("error",g=>{throw new Error(`Cache upload failed because file read failed with ${g.message}`)}),h,M)}})))}finally{yM.closeSync(o)}})}function NC0(t,e,r){return an(this,void 0,void 0,function*(){let s={size:r};return yield tE("commitCache",()=>an(this,void 0,void 0,function*(){return t.postJson(sE(`caches/${e.toString()}`),s)}))})}function XH(t,e,r,s){return an(this,void 0,void 0,function*(){if(kH(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield aEe(r,e,s)}else{let i=GH();_("Upload cache"),yield SC0(i,t,e,s),_("Commiting cache");let o=Ua(e);ve(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);let a=yield NC0(i,t,o);if(!K5(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);ve("Cache saved successfully")}})}var Mye=F(pye(),1),o1=F(i1(),1),Zn=F(i1(),1),_2=F(i1(),1),L2=F(i1(),1),P2=F(i1(),1);var PX=F(i1(),1),QX=F(i1(),1),fye=F(i1(),1),hye=F(i1(),1),bye=F(i1(),1);var WX=F(i1(),1),_X=F(i1(),1),lye=F(i1(),1),Aye=F(i1(),1),dye=F(i1(),1),LX=class extends dye.MessageType{constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,Aye.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,lye.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let u=s.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);let p=e.skip(c);u!==!1&&(u===!0?_X.UnknownFieldHandler.onRead:u)(this.typeName,i,a,c,p)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,WX.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,WX.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?_X.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},Qw=new LX;var kX=class extends bye.MessageType{constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:()=>Qw}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,hye.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,fye.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.repositoryId=e.int64().toString();break;case 2:i.scope.push(Qw.internalBinaryRead(e,e.uint32(),s));break;default:let u=s.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);let p=e.skip(c);u!==!1&&(u===!0?QX.UnknownFieldHandler.onRead:u)(this.typeName,i,a,c,p)}}return i}internalBinaryWrite(e,r,s){e.repositoryId!=="0"&&r.tag(1,PX.WireType.Varint).int64(e.repositoryId);for(let i=0;i<e.scope.length;i++)Qw.internalBinaryWrite(e.scope[i],r.tag(2,PX.WireType.LengthDelimited).fork(),s).join();let n=s.writeUnknownFields;return n!==!1&&(n==!0?QX.UnknownFieldHandler.onWrite:n)(this.ty
Line truncated
|
|
|
|
|
`));let s=yield sV(r,"create");yield nV(s,t)})}var PM=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},ra=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},LM=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},Hw=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Oye(t){if(!t||t.length===0)throw new ra("Path Validation Error: At least one directory or file path is required")}function aV(t){if(t.length>512)throw new ra(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new ra(`Key Validation Error: ${t} cannot contain commas.`)}function cV(){return rE()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function Eye(t,e,r,s){return PM(this,arguments,void 0,function*(n,i,o,a,c=!1){let u=rE();return _(`Cache service version: ${u}`),Oye(n),u==="v2"?yield VB0(n,i,o,a,c):yield XB0(n,i,o,a,c)})}function XB0(t,e,r,s){return PM(this,arguments,void 0,function*(n,i,o,a,c=!1){o=o||[];let u=[i,...o];if(_("Resolved Keys:"),_(JSON.stringify(u)),u.length>10)throw new ra("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of u)aV(A);let p=yield r3(),l="";try{let A=yield EEe(u,n,{compressionMethod:p,enableCrossOsArchive:c});if(!A?.archiveLocation)return;if(a?.lookupOnly)return ve("Lookup only - skipping download"),A.cacheKey;l=gE.join(yield e3(),tA(p)),_(`Archive Path: ${l}`),yield HH(A.archiveLocation,l,a),Ii()&&(yield mE(l,p));let h=Ua(l);return ve(`Cache Size: ~${Math.round(h/(1024*1024))} MB (${h} B)`),yield iV(l,p),ve("Cache restored successfully"),A.cacheKey}catch(A){let h=A;if(h.name===ra.name)throw A;h instanceof xa&&typeof h.statusCode=="number"&&h.statusCode>=500?wO(`Failed to restore: ${A.message}`):t1(`Failed to restore: ${A.message}`)}finally{try{yield t3(l)}catch(A){_(`Failed to delete archive: ${A}`)}}})}function VB0(t,e,r,s){return PM(this,arguments,void 0,function*(n,i,o,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let u=[i,...o];if(_("Resolved Keys:"),_(JSON.stringify(u)),u.length>10)throw new ra("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of u)aV(l);let p="";try{let l=rV(),A=yield r3(),h={key:i,restoreKeys:o,version:Vb(n,A,c)},M=yield l.GetCacheEntryDownloadURL(h);if(!M.ok){_(`Cache not found for version ${h.version} of keys: ${u.join(", ")}`);return}if(h.key!==M.matchedKey?ve(`Cache hit for restore-key: ${M.matchedKey}`):ve(`Cache hit for: ${M.matchedKey}`),a?.lookupOnly)return ve("Lookup only - skipping download"),M.matchedKey;p=gE.join(yield e3(),tA(A)),_(`Archive path: ${p}`),_(`Starting download of archive to: ${p}`),yield HH(M.signedDownloadUrl,p,a);let y=Ua(p);return ve(`Cache Size: ~${Math.round(y/(1024*1024))} MB (${y} B)`),Ii()&&(yield mE(p,A)),yield iV(p,A),ve("Cache restored successfully"),M.matchedKey}catch(l){let A=l;if(A.name===ra.name)throw l;A instanceof xa&&typeof A.statusCode=="number"&&A.statusCode>=500?wO(`Failed to restore: ${l.message}`):t1(`Failed to restore: ${l.message}`)}finally{try{p&&(yield t3(p))}catch(l){_(`Failed to delete archive: ${l}`)}}})}function uV(t,e,r){return PM(this,arguments,void 0,function*(s,n,i,o=!1){let a=rE();return _(`Cache service version: ${a}`),Oye(s),aV(n),a==="v2"?yield $B0(s,n,i,o):yield jB0(s,n,i,o)})}function jB0(t,e,r){return PM(this,arguments,void 0,function*(s,n,i,o=!1){var a,c,u,p,l;let A=yield r3(),h=-1,M=yield hk(s);if(_("Cache Paths:"),_(`${JSON.stringify(M)}`),M.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let g=yield e3(),y=gE.join(g,tA(A));_(`Archive Path: ${y}`);try{yield oV(g,M,A),Ii()&&(yield mE(y,A));let O=10*1024*1024*1024,B=Ua(y);if(_(`File Size: ${B}`),B>O&&!UH())throw new Error(`Cache size of ~${Math.round(B/(1024*1024))} MB (${B} B) is over the 10GB limit, not saving cache.`);_("Reserving Cache");let I=yield yEe(n,s,{compressionMethod:A,enableCrossOsArchive:o,cacheSize:B});if(!((a=I?.result)===null||a===void 0)&&a.cacheId)h=(c=I?.result)===null||c===void 0?void 0:c.cacheId;else throw I?.statusCode===400?new Error((p=(u=I?.error)===null||u===void 0?void 0:u.message)!==null&&p!==void 0?p:`Cache size of ~${Math.round(B/(1024*1024))} MB (${B} B) is over the data cap limit, not saving cache.`):new LM(`Unable to reserve cache with key ${n}, another job may be creating this cache. More details: ${(l=I?.error)===null||l===void 0?void 0:l.message}`);_(`Saving Cache (ID: ${h})`),yield XH(h,y,"",i)}catch(O){let B=O;if(B.name===ra.name)throw O;B.name==
Line truncated
|
|
|
|
|
`+n(i)+o(i),c=(0,kne.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");i.headers.set(qe.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}s(e,"signRequest");function r(i,a){let c=i.headers.get(a);return!c||a===qe.CONTENT_LENGTH&&c==="0"?"":c}s(r,"getHeaderValueToSign");function n(i){let a=[];for(let[u,p]of i.headers)u.toLowerCase().startsWith(qe.PREFIX_FOR_STORAGE)&&a.push({name:u,value:p});a.sort((u,p)=>OE(u.name.toLowerCase(),p.name.toLowerCase())),a=a.filter((u,p,A)=>!(p>0&&u.name.toLowerCase()===A[p-1].name.toLowerCase()));let c="";return a.forEach(u=>{c+=`${u.name.toLowerCase().trimRight()}:${u.value.trimLeft()}
|
|
|
|
|
`}),c}s(n,"getCanonicalizedHeadersString");function o(i){let a=hE(i.url)||"/",c="";c+=`/${t.accountName}${a}`;let u=zE(i.url),p={};if(u){let A=[];for(let l in u)if(Object.prototype.hasOwnProperty.call(u,l)){let b=l.toLowerCase();p[b]=u[l],A.push(b)}A.sort();for(let l of A)c+=`
|
|
|
|
|
${l}:${decodeURIComponent(p[l])}`}return c}return s(o,"getCanonicalizedResourceString"),{name:wYe,async sendRequest(i,a){return e(i),a(i)}}}s(VS,"storageSharedKeyCredentialPolicy");var SYe="storageRequestFailureDetailsParserPolicy";function Une(){return{name:SYe,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}}}}s(Une,"storageRequestFailureDetailsParserPolicy");var Gne=require("node:crypto");var EE=class{static{s(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,Gne.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var CE="12.31.0",yE="2026-02-06";var BE="https://storage.azure.com/.default",Js={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var Eo="",JS="*",FYe=1*1024*1024;var WYe=4*FYe;var Hne="AES256",Xne="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Vne=["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"],Jne=["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"],Yne="BlobUsesCustomerSpecifiedEncryption",$ne="BlobDoesNotUseCustomerSpecifiedEncryption",jne=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Ys(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}s(Ys,"isPipelineLike");var pM=class{static{s(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function y1(t,e={}){t||(t=new V0);let r=new pM([],e);return r._credential=t,r}s(y1,"newPipeline");function xYe(t){let e=[TYe,Kne,vYe,LYe,_Ye,QYe,kYe];if(t.factories.length){let r=t.factories.filter(n=>!e.some(o=>o(n)));if(r.length){let n=r.some(o=>PYe(o));return{wrappedPolicies:CS(r),afterRetry:n}}}}s(xYe,"processDownlevelPipeline");function YS(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?yS(e):XS(),t._coreHttpClient=n);let o=t._corePipeline;if(!o){let i=`azsdk-js-azure-storage-blob/${CE}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;o=Xf({...r,loggingOptions:{additionalAllowedHeaderNames:Vne,additionalAllowedQueryParameters:Jne,logger:lE.info},userAgentOptions:{userAgentPrefix:a},serializationOptions:{stringifyXML:AE,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:GS,serializerOptions:{xml:{xmlCharKey:"#"}}}}),o.removePolicy({phase:"Retry"}),o.removePolicy({name:Z6}),o.addPolicy(Qne()),o.addPolicy(Pne(r.retryOptions),{phase:"R
Line truncated
|
|
|
|
|
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:new qo(t.version,i,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:o}}s(xje,"generateBlobSASQueryParameters20150405");function Tje(t,e){if(t=rp(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 o;t.permissions&&(t.blobName?o=Fi.parse(t.permissions.toString()).toString():o=Wi.parse(t.permissions.toString()).toString());let i=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",tp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Do(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(i);return{sasQueryParameters:new qo(t.version,a,o,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}}s(Tje,"generateBlobSASQueryParameters20181109");function vje(t,e){if(t=rp(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 o;t.permissions&&(t.blobName?o=Fi.parse(t.permissions.toString()).toString():o=Wi.parse(t.permissions.toString()).toString());let i=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",tp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Do(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(i);return{sasQueryParameters:new qo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}s(vje,"generateBlobSASQueryParameters20201206");function Lje(t,e){if(t=rp(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 o;t.permissions&&(t.blobName?o=Fi.parse(t.permissions.toString()).toString():o=Wi.parse(t.permissions.toString()).toString());let i=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",tp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Do(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new qo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}s(Lje,"generateBlobSASQueryParametersUDK20181109");function _je(t,e){if(t=rp(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 o;t.permissions&&(t.blobName?o=Fi.parse(t.permissions.toString()).toString():o=Wi.parse(t.permissions.toString()).toString());let i=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",tp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Do(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new qo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}s(_je,"generateBlobSASQueryParametersUDK20200210");function Qje(t,e){if(t=rp(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 o;t.permissions&&(t.blobName?o=Fi.parse(t.permissions.toString()).toString():o=Wi.parse(t.permissions.toString()).toString());let i=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",tp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Do(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(i);return{sasQueryParameters:new qo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}s(Qje,"generateBlobSASQueryParametersUDK20201206");function Pje(t,e){if(t=rp(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 o;t.permissions&&(t.blobName?o=Fi.parse(t.permissions.toString()).toString():o=Wi.parse(t.permissions.toString()).toString());let i=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",tp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Do(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(i);return{sasQueryParameters:new qo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}s(Pje,"generateBlobSASQueryParametersUDK20250705");function tp(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}s(tp,"getCanonicalName");function rp(t){let e=t.version?t.version:yE;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}s(rp,"SASSignatureValuesSanityCheckAndAutofill");var EM=class{static{s(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=Wl()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Eo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Eo||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 Ae.withSpan("BlobLeaseClient-acquireLease",r,async n=>be(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!==Eo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Eo||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 Ae.withSpan("BlobLeaseClient-changeLease",r,async n=>{let o=be(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,o})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Eo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Eo||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 Ae.withSpan("BlobLeaseClient-releaseLease",e,async r=>be(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!==Eo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Eo||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"}};e2.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var sp=class extends Error{static{s(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"}};sp.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var SM=class extends Error{static{s(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var jKe=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})},_T=class{static{s(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,o=(e/(1024*1024)/(n/1e3)).toFixed(1);S(`Sent ${e} of ${this.contentLength} (${r}%), ${o} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=s(()=>{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 tse(t,e,r){return jKe(this,void 0,void 0,function*(){var n;let o=new ra(t),i=o.getBlockBlobClient(),a=new _T((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(),N(`BlobClient: ${o.name}:${o.accountName}:${o.containerName}`);let u=yield i.uploadFile(e,c);if(u._response.status>=400)throw new RC(`uploadCacheArchiveSDK: upload failed with status code ${u._response.status}`);return u}catch(u){throw s0(`uploadCacheArchiveSDK: internal error uploading cache archive: ${u.message}`),u}finally{a.stopDisplayTimer()}})}s(tse,"uploadCacheArchiveSDK");var nse=w(require("buffer"),1),xi=w(require("fs"),1),ose=w(require("stream"),1),ise=w(require("util"),1);var NC=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})};function wC(t){return t?t>=200&&t<300:!1}s(wC,"isSuccessStatusCode");function KKe(t){return t?t>=500:!0}s(KKe,"isServerErrorStatusCode");function ZKe(t){return t?[i1.BadGateway,i1.ServiceUnavailable,i1.GatewayTimeout].includes(t):!1}s(ZKe,"isRetryableStatusCode");function eZe(t){return NC(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}s(eZe,"sleep");function rse(t,e,r){return NC(this,arguments,void 0,function*(n,o,i,a=e3,c=t3,u=void 0){let p="",A=1;for(;A<=a;){let l,b,M=!1;try{l=yield o()}catch(z){u&&(l=u(z)),M=!0,p=z.message}if(l&&(b=i(l),!KKe(b)))return l;if(b&&(M=ZKe(b),p=`Cache service responded with ${b}`),N(`${n} - Attempt ${A} of ${a} failed with error: ${p}`),!M){N(`${n} - Error is not retryable`);break}yield eZe(c),A++}throw Error(`${n} failed: ${p}`)})}s(rse,"retry");function FM(t,e){return NC(this,arguments,void 0,function*(r,n,o=e3,i=t3){return yield rse(r,n,a=>a.statusCode,o,i,a=>{if(a instanceof ai)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}s(FM,"retryTypedResponse");function t2(t,e){return NC(this,arguments,void 0,function*(r,n,o=e3,i=t3){return yield rse(r,n,a=>a.message.statusCode,o,i)})}s(t2,"retryHttpClientResponse");var Tn=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})};function tZe(t,e){return Tn(this,void 0,void 0,function*(){yield ise.promisify(ose.pipeline)(t.message,e)})}s(tZe,"pipeResponseToStream");var SC=class{static{s(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,N(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){th
Line truncated
|
|
|
|
|
Other caches with similar key:`);for(let c of i?.artifactCaches||[])N(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}s(cZe,"printCachesListForDiagnostics");function GT(t,e,r){return fr(this,void 0,void 0,function*(){let n=new hse.URL(t),o=use(r);n.hostname.endsWith(".blob.core.windows.net")?o.useAzureSdk?yield ase(t,e,o):o.concurrentBlobDownloads?yield sse(t,e,o):yield FC(t,e):yield FC(t,e)})}s(GT,"downloadCache");function gse(t,e,r){return fr(this,void 0,void 0,function*(){let n=UT(),o=Bl(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:o,cacheSize:r?.cacheSize};return yield FM("reserveCache",()=>fr(this,void 0,void 0,function*(){return n.postJson(xM("caches"),i)}))})}s(gse,"reserveCache");function mse(t,e){return`bytes ${t}-${e}/*`}s(mse,"getContentRange");function uZe(t,e,r,n,o){return fr(this,void 0,void 0,function*(){N(`Uploading chunk of size ${o-n+1} bytes at offset ${n} with content range: ${mse(n,o)}`);let i={"Content-Type":"application/octet-stream","Content-Range":mse(n,o)},a=yield t2(`uploadChunk (start: ${n}, end: ${o})`,()=>fr(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!wC(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}s(uZe,"uploadChunk");function pZe(t,e,r,n){return fr(this,void 0,void 0,function*(){let o=si(r),i=xM(`caches/${e.toString()}`),a=r2.openSync(r,"r"),c=QT(n),u=l6("uploadConcurrency",c.uploadConcurrency),p=l6("uploadChunkSize",c.uploadChunkSize),A=[...new Array(u).keys()];N("Awaiting all uploads");let l=0;try{yield Promise.all(A.map(()=>fr(this,void 0,void 0,function*(){for(;l<o;){let b=Math.min(o-l,p),M=l,z=l+b-1;l+=p,yield uZe(t,i,()=>r2.createReadStream(r,{fd:a,start:M,end:z,autoClose:!1}).on("error",g=>{throw new Error(`Cache upload failed because file read failed with ${g.message}`)}),M,z)}})))}finally{r2.closeSync(a)}})}s(pZe,"uploadFile");function AZe(t,e,r){return fr(this,void 0,void 0,function*(){let n={size:r};return yield FM("commitCache",()=>fr(this,void 0,void 0,function*(){return t.postJson(xM(`caches/${e.toString()}`),n)}))})}s(AZe,"commitCache");function HT(t,e,r,n){return fr(this,void 0,void 0,function*(){if(QT(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield tse(r,e,n)}else{let i=UT();N("Upload cache"),yield pZe(i,t,e,n),N("Commiting cache");let a=si(e);S(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield AZe(i,t,a);if(!wC(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);S("Cache saved successfully")}})}s(HT,"saveCache");var bae=w(aae(),1),q1=w(D1(),1),rn=w(D1(),1),Ap=w(D1(),1),lp=w(D1(),1),dp=w(D1(),1);var _v=w(D1(),1),Qv=w(D1(),1),Aae=w(D1(),1),lae=w(D1(),1),dae=w(D1(),1);var Tv=w(D1(),1),vv=w(D1(),1),cae=w(D1(),1),uae=w(D1(),1),pae=w(D1(),1);var Lv=class extends pae.MessageType{static{s(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,uae.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,cae.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,o){let i=o??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,u]=e.tag();switch(c){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let p=n.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let A=e.skip(u);p!==!1&&(p===!0?vv.UnknownFieldHandler.onRead:p)(this.typeName,i,c,u,A)}}return i}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,Tv.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,Tv.WireType.Varint).int64(e.permission);let o=n.writeUnknownFields;return o!==!1&&(o==!0?vv.UnknownFieldHandler.onWrite:o)(this.typeName,e,r),r}},gy=new Lv;var Pv=class extends dae.MessageType{static{s(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:s(()=>gy,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,lae.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Aae.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,o){let i=o??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,u]=e.tag();switch(c){case 1:i.repositoryId=e.int64().toString();break;case 2:i.scope.push(gy.internalBinaryRead(e,e.uint32(),n));break;default:let p=n.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let A=e.skip(u);p!==!1&&(p===!0?Qv.UnknownFieldHandler.onRead:p)(this.typeName,i,c,u,A)}}return i}internalBinaryWrite(e,r,n){e.repositoryId!==
Line truncated
|
|
|
|
|
`));let n=yield rL(r,"create");yield nL(n,t)})}s(iL,"createTar");var h2=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})},No=class t extends Error{static{s(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},bp=class t extends Error{static{s(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},sL="cache write denied:",yy=class t extends bp{static{s(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},hae=r3,By=class t extends Error{static{s(this,"CacheReadDeniedError")}constructor(e){super(e),this.name="CacheReadDeniedError",Object.setPrototypeOf(this,t.prototype)}},Dy=class t extends Error{static{s(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function zae(t){if(!t||t.length===0)throw new No("Path Validation Error: At least one directory or file path is required")}s(zae,"checkPaths");function aL(t){if(t.length>512)throw new No(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new No(`Key Validation Error: ${t} cannot contain commas.`)}s(aL,"checkKey");function cL(){return WM()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}s(cL,"isFeatureAvailable");function gae(t,e,r,n){return h2(this,arguments,void 0,function*(o,i,a,c,u=!1){let p=WM();N(`Cache service version: ${p}`),zae(o);let A=kT();if(!Ase(A)){S(`Cache restore skipped: the effective cache-mode '${A}' does not permit reads.`),N(`Skipped restore for paths [${o.join(", ")}] with primary key '${i}'.`);return}return p==="v2"?yield D00(o,i,a,c,u):yield B00(o,i,a,c,u)})}s(gae,"restoreCache");function B00(t,e,r,n){return h2(this,arguments,void 0,function*(o,i,a,c,u=!1){var p;a=a||[];let A=[i,...a];if(N("Resolved Keys:"),N(JSON.stringify(A)),A.length>10)throw new No("Key Validation Error: Keys are limited to a maximum of 10.");for(let M of A)aL(M);let l=yield Ff(),b="";try{let M;try{M=yield zse(A,o,{compressionMethod:l,enableCrossOsArchive:u})}catch(g){let C=(p=g?.message)!==null&&p!==void 0?p:"";throw C.includes(hae)?new By(C):g}if(!M?.archiveLocation)return;if(c?.lookupOnly)return S("Lookup only - skipping download"),M.cacheKey;b=jM.join(yield wf(),oc(l)),N(`Archive Path: ${b}`),yield GT(M.archiveLocation,b,c),Ls()&&(yield $M(b,l));let z=si(b);return S(`Cache Size: ~${Math.round(z/(1024*1024))} MB (${z} B)`),yield oL(b,l),S("Cache restored successfully"),M.cacheKey}catch(M){let z=M;if(z.name===No.name)throw M;z instanceof ai&&typeof z.statusCode=="number"&&z.statusCode>=500?bl(`Failed to restore: ${M.message}`):s0(`Failed to restore: ${M.message}`)}finally{try{yield Sf(b)}catch(M){N(`Failed to delete archive: ${M}`)}}})}s(B00,"restoreCacheV1");function D00(t,e,r,n){return h2(this,arguments,void 0,function*(o,i,a,c,u=!1){var p;c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let A=[i,...a];if(N("Resolved Keys:"),N(JSON.stringify(A)),A.length>10)throw new No("Key Validation Error: Keys are limited to a maximum of 10.");for(let b of A)aL(b);let l="";try{let b=tL(),M=yield Ff(),z={key:i,restoreKeys:a,version:Bl(o,M,u)},g;try{g=yield b.GetCacheEntryDownloadURL(z)}catch(B){let D=(p=B?.message)!==null&&p!==void 0?p:"";throw D.includes(hae)?new By(D):B}if(!g.ok){N(`Cache not found for version ${z.version} of keys: ${A.join(", ")}`);return}if(z.key!==g.matchedKey?S(`Cache hit for restore-key: ${g.matchedKey}`):S(`Cache hit for: ${g.matchedKey}`),c?.lookupOnly)return S("Lookup only - skipping download"),g.matchedKey;l=jM.join(yield wf(),oc(M)),N(`Archive path: ${l}`),N(`Starting download of archive to: ${l}`),yield GT(g.signedDownloadUrl,l,c);let E=si(l);return S(`Cache Size: ~${Math.round(E/(1024*1024))} MB (${E} B)`),Ls()&&(yield $M(l,M)),yield oL(l,M),S("Cache restored successfully"),g.matchedKey}catch(b){let M=b;if(M.name===No.name)throw b;M instanceof ai&&typeof M.statusCode=="number"&&M.statusCode>=500?bl(`Failed to restore: ${b.message}`):s0(`Failed to restore: ${b.message}`)}finally{try{l&&(yield Sf(l))}catch(b){N(`Failed to delete archive: ${b}`)}}})}s(D00,"restoreCacheV2");function uL(t,e,r){return h2(this,arguments,void 0,function*(n,o,i,a=!1){let c=WM();N(`Cache service version: ${c}`),zae(n),aL(o);let u=kT();return lse(u)?c==="v2"?yield I00(n,o,i,a):yield q00(n,o,i,a):(S(`Cache save skipped: the effective cache-mode '${u}' does not permit writes.`),N(`Skipped save for paths [${n.join(", ")}] with key '${o}'.`),-1)})}s(uL,"saveCache");function q00(t,e,r){return h2(this,arguments,void
Line truncated
|
|
|
|
|
`+t.errors.map(e=>` - ${e.message}`).join(`
|
|
|
|
|
`)}var GD0=class extends Error{constructor(t,e,r){super(UD0(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},HD0=["method","baseUrl","url","headers","request","query","mediaType","operationName"],XD0=["query","method","url"],uCe=/\/api\/v3\/?$/;function VD0(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 o in r)if(XD0.includes(o))return Promise.reject(new Error(`[@octokit/graphql] "${o}" cannot be used as variable name`))}let s=typeof e=="string"?Object.assign({query:e},r):e,n=Object.keys(s).reduce((o,a)=>HD0.includes(a)?(o[a]=s[a],o):(o.variables||(o.variables={}),o.variables[a]=s[a],o),{}),i=s.baseUrl||t.endpoint.DEFAULTS.baseUrl;return uCe.test(i)&&(n.url=i.replace(uCe,"/api/graphql")),t(n).then(o=>{if(o.data.errors){let a={};for(let c of Object.keys(o.headers))a[c]=o.headers[c];throw new GD0(n,a,o.data)}return o.data.data})}function EV(t,e){let r=t.defaults(e);return Object.assign((n,i)=>VD0(r,n,i),{defaults:EV.bind(null,r),endpoint:r.endpoint})}var Vvt=EV(yE,{headers:{"user-agent":`octokit-graphql.js/${kD0} ${mA()}`},method:"POST",url:"/graphql"});function pCe(t){return EV(t,{method:"POST",url:"/graphql"})}var yV="(?:[a-zA-Z0-9_-]+)",lCe="\\.",ACe=new RegExp(`^${yV}${lCe}${yV}${lCe}${yV}$`),jD0=ACe.test.bind(ACe);async function $D0(t){let e=jD0(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),s=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":s?"user-to-server":"oauth"}}function YD0(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function JD0(t,e,r,s){let n=e.endpoint.merge(r,s);return n.headers.authorization=YD0(t),e(n)}var dCe=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($D0.bind(null,e),{hook:JD0.bind(null,e)})};var CV="7.0.6";var fCe=()=>{},KD0=console.warn.bind(console),ZD0=console.error.bind(console);function eq0(t={}){return typeof t.debug!="function"&&(t.debug=fCe),typeof t.info!="function"&&(t.info=fCe),typeof t.warn!="function"&&(t.warn=KD0),typeof t.error!="function"&&(t.error=ZD0),t}var hCe=`octokit-core.js/${CV} ${mA()}`,nS=class{static VERSION=CV;static defaults(e){return class extends this{constructor(...s){let n=s[0]||{};if(typeof e=="function"){super(e(n));return}super(Object.assign({},e,n,n.userAgent&&e.userAgent?{userAgent:`${n.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static plugins=r.concat(e.filter(n=>!r.includes(n)))}}constructor(e={}){let r=new kye.Collection,s={baseUrl:yE.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(s.headers["user-agent"]=e.userAgent?`${e.userAgent} ${hCe}`:hCe,e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=yE.defaults(s),this.graphql=pCe(this.request).defaults(s),this.log=eq0(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...o}=e,a=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:o},e.auth));r.wrap("request",a.hook),this.auth=a}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=dCe(e.auth);r.wrap("request",i.hook),this.auth=i}let n=this.constructor;for(let i=0;i<n.plugins.length;++i)Object.assign(this,n.plugins[i](this,e))}request;graphql;log;hook;auth};var BV="17.0.0";var tq0={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"],createHostedRunnerForOrg:["POST /orgs/{org}/actions/hosted-runners"],createOrUpdateEnvironmentSecret:["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createOrgVaria
Line truncated
|
|
|
|
|
`,o).length:l,u?(a===null?0:a.length)+c.length:0,u?c.length+l:0);return A<h},parse:function(s,n,i,o){let{bom:a,comment_no_infix:c,encoding:u,from_line:p,ltrim:l,max_record_size:A,raw:h,relax_quotes:M,rtrim:g,skip_empty_lines:y,to:O,to_line:B}=this.options,{comment:I,escape:R,quote:N,record_delimiter:T}=this.options,{bomSkipped:W,previousBuf:$,rawBuffer:ge,escapeIsQuote:Fe}=this.state,Z;if($===void 0)if(s===void 0){o();return}else Z=s;else $!==void 0&&s===void 0?Z=$:Z=Buffer.concat([$,s]);if(W===!1)if(a===!1)this.state.bomSkipped=!0;else if(Z.length<3){if(n===!1){this.state.previousBuf=Z;return}}else{for(let Ne in nm)if(nm[Ne].compare(Z,0,nm[Ne].length)===0){let Ge=nm[Ne].length;this.state.bufBytesStart+=Ge,Z=Z.slice(Ge);let C0=r$({...this.original_options,encoding:Ne});for(let M0 in C0)this.options[M0]=C0[M0];({comment:I,escape:R,quote:N}=this.options);break}this.state.bomSkipped=!0}let we=Z.length,J;for(J=0;J<we&&!this.__needMoreData(J,we,n);J++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),B!==-1&&this.info.lines>B){this.state.stop=!0,o();return}this.state.quoting===!1&&T.length===0&&this.__autoDiscoverRecordDelimiter(Z,J)&&(T=this.options.record_delimiter);let Ne=Z[J];if(h===!0&&ge.append(Ne),(Ne===LN0||Ne===PN0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(R!==null&&this.state.quoting===!0&&this.__isEscape(Z,J,Ne)&&J+R.length<we)if(Fe){if(this.__isQuote(Z,J+R.length)){this.state.escaping=!0,J+=R.length-1;continue}}else{this.state.escaping=!0,J+=R.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(Z,J))if(this.state.quoting===!0){let M0=Z[J+N.length],P0=g&&this.__isCharTrimable(Z,J+N.length),Dt=I!==null&&this.__compareBytes(I,Z,J+N.length,M0),V0=this.__isDelimiter(Z,J+N.length,M0),Ar=T.length===0?this.__autoDiscoverRecordDelimiter(Z,J+N.length):this.__isRecordDelimiter(M0,Z,J+N.length);if(R!==null&&this.__isEscape(Z,J,Ne)&&this.__isQuote(Z,J+R.length))J+=R.length-1;else if(!M0||V0||Ar||Dt||P0){this.state.quoting=!1,this.state.wasQuoting=!0,J+=N.length-1;continue}else if(M===!1){let $t=this.__error(new y0("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(M0)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if($t!==void 0)return $t}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(N),J+=N.length-1}else if(this.state.field.length!==0){if(M===!1){let M0=this.__infoField(),P0=Object.keys(nm).map(V0=>nm[V0].equals(this.state.field.toString())?V0:!1).filter(Boolean)[0],Dt=this.__error(new y0("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(M0.column)} at line ${M0.lines}, value is ${JSON.stringify(this.state.field.toString(u))}`,P0?`(${P0} bom)`:void 0],this.options,M0,{field:this.state.field}));if(Dt!==void 0)return Dt}}else{this.state.quoting=!0,J+=N.length-1;continue}if(this.state.quoting===!1){let M0=this.__isRecordDelimiter(Ne,Z,J);if(M0!==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)>=p){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),J+=M0-1;continue}if(y===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,J+=M0-1;continue}this.info.bytes=this.state.bufBytesStart+J;let V0=this.__onField();if(V0!==void 0)return V0;this.info.bytes=this.state.bufBytesStart+J+M0;let Ar=this.__onRecord(i);if(Ar!==void 0)return Ar;if(O!==-1&&this.info.records>=O){this.state.stop=!0,o();return}}this.state.commenting=!1,J+=M0-1;continue}if(this.state.commenting)continue;if(I!==null&&(c===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(I,Z,J,Ne)!==0){this.state.commenting=!0;continue}let P0=this.__isDelimiter(Z,J,Ne);if(P0!==0){this.info.bytes=this.state.bufBytesStart+J;let Dt=this.__onField();if(Dt!==void 0)return Dt;J+=P0-1;continue}}}if(this.state.commenting===!1&&A!==0&&this.state.record_length+this.state.field.length>A)return this.__error(new y0("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${A}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let Ge=l===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(Z,J),C0=g===!1||this.state.wasQuoting===!1;if(Ge===!0&&C0===!0)this.state.field.append(Ne);else{if(g===!0&&!this.__isCharTrimable(Z,J))return this.__error(new y0("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));Ge===!1&&(J+=this.__isCharTrimable(Z,J)-1);continue}}if(n===!0)if(t
Line truncated
|
|
|
|
|
`)}s(E10,"_buildMessageForResponseErrors");var C10=class extends Error{static{s(this,"GraphqlResponseError")}constructor(t,e,r){super(E10(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},y10=["method","baseUrl","url","headers","request","query","mediaType","operationName"],B10=["query","method","url"],ace=/\/api\/v3\/?$/;function D10(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(B10.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,o=Object.keys(n).reduce((a,c)=>y10.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),i=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return ace.test(i)&&(o.url=i.replace(ace,"/api/graphql")),t(o).then(a=>{if(a.data.errors){let c={};for(let u of Object.keys(a.headers))c[u]=a.headers[u];throw new C10(o,c,a.data)}return a.data.data})}s(D10,"graphql");function EL(t,e){let r=t.defaults(e);return Object.assign(s((o,i)=>D10(r,o,i),"newApi"),{defaults:EL.bind(null,r),endpoint:r.endpoint})}s(EL,"withDefaults");var $e1=EL(rm,{headers:{"user-agent":`octokit-graphql.js/${O10} ${Ec()}`},method:"POST",url:"/graphql"});function cce(t){return EL(t,{method:"POST",url:"/graphql"})}s(cce,"withCustomRequest");var CL="(?:[a-zA-Z0-9_-]+)",uce="\\.",pce=new RegExp(`^${CL}${uce}${CL}${uce}${CL}$`),q10=pce.test.bind(pce);async function I10(t){let e=q10(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"}}s(I10,"auth");function R10(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}s(R10,"withAuthorizationPrefix");async function N10(t,e,r,n){let o=e.endpoint.merge(r,n);return o.headers.authorization=R10(t),e(o)}s(N10,"hook");var Ace=s(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(I10.bind(null,e),{hook:N10.bind(null,e)})},"createTokenAuth2");var yL="7.0.6";var lce=s(()=>{},"noop"),w10=console.warn.bind(console),S10=console.error.bind(console);function F10(t={}){return typeof t.debug!="function"&&(t.debug=lce),typeof t.info!="function"&&(t.info=lce),typeof t.warn!="function"&&(t.warn=w10),typeof t.error!="function"&&(t.error=S10),t}s(F10,"createLogger");var dce=`octokit-core.js/${yL} ${Ec()}`,Ly=class{static{s(this,"Octokit")}static VERSION=yL;static defaults(e){return class extends this{static{s(this,"OctokitWithDefaults")}constructor(...n){let o=n[0]||{};if(typeof e=="function"){super(e(o));return}super(Object.assign({},e,o,o.userAgent&&e.userAgent?{userAgent:`${o.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{s(this,"NewOctokit")}static plugins=r.concat(e.filter(o=>!r.includes(o)))}}constructor(e={}){let r=new Qae.Collection,n={baseUrl:rm.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} ${dce}`:dce,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=rm.defaults(n),this.graphql=cce(this.request).defaults(n),this.log=F10(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...a}=e,c=i(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 i=Ace(e.auth);r.wrap("request",i.hook),this.auth=i}let o=this.constructor;for(let i=0;i<o.plugins.length;++i)Object.assign(this,o.plugins[i](this,e))}request;graphql;log;hook;auth};var BL="17.0.0";var W10={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
|
|
|
|
|
`,a).length:l,p?(c===null?0:c.length)+u.length:0,p?u.length+l:0);return b<M},"__needMoreData"),parse:s(function(n,o,i,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:A,from_line:l,ltrim:b,max_record_size:M,raw:z,relax_quotes:g,rtrim:C,skip_empty_lines:E,to:B,to_line:D}=this.options,{comment:q,escape:x,quote:W,record_delimiter:_}=this.options,{bomSkipped:ae,delimiterDiscovered:Se,delimiterBufPrevious:xe,rawBuffer:Ne,escapeIsQuote:Ce}=this.state;if(!Se&&p){let j;if(xe===void 0?j=n:xe!==void 0&&n===void 0?j=xe:j=Buffer.concat([xe,n]),n=void 0,o||j.length>p.size)this.options.delimiter=[Buffer.from(Fle(j,this.options.delimiter_auto))],this.state.previousBuf=j,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=j;return}}let{previousBuf:we}=this.state,k;if(we===void 0)if(n===void 0){a();return}else k=n;else we!==void 0&&n===void 0?k=we:k=Buffer.concat([we,n]);if(ae===!1)if(c===!1)this.state.bomSkipped=!0;else if(k.length<3){if(o===!1){this.state.previousBuf=k;return}}else{for(let j in v2)if(v2[j].compare(k,0,v2[j].length)===0){let $e=v2[j].length;this.state.bufBytesStart+=$e,k=k.slice($e);let m1=T2({...this.original_options,encoding:j});for(let ze in m1)this.options[ze]=m1[ze];({comment:q,escape:x,quote:W}=this.options);break}this.state.bomSkipped=!0}let Te=k.length,T;for(T=0;T<Te&&!this.__needMoreData(T,Te,o);T++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),D!==-1&&this.info.lines>D){this.state.stop=!0,a();return}this.state.quoting===!1&&_.length===0&&this.__autoDiscoverRecordDelimiter(k,T)&&(_=this.options.record_delimiter);let j=k[T];if(z===!0&&Ne.append(j),(j===ga0||j===Oa0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(x!==null&&this.state.quoting===!0&&this.__isEscape(k,T,j)&&T+x.length<Te)if(Ce){if(this.__isQuote(k,T+x.length)){this.state.escaping=!0,T+=x.length-1;continue}}else{this.state.escaping=!0,T+=x.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(k,T))if(this.state.quoting===!0){let ze=k[T+W.length],I0=C&&this.__isCharTrimable(k,T+W.length),je=q!==null&&this.__compareBytes(q,k,T+W.length,ze),X=this.__isDelimiter(k,T+W.length,ze),Rt=_.length===0?this.__autoDiscoverRecordDelimiter(k,T+W.length):this.__isRecordDelimiter(ze,k,T+W.length);if(x!==null&&this.__isEscape(k,T,j)&&this.__isQuote(k,T+x.length))T+=x.length-1;else if(!ze||X||Rt||je||I0){this.state.quoting=!1,this.state.wasQuoting=!0,T+=W.length-1;continue}else if(g===!1){let Nt=this.__error(new Je("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(ze)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Nt!==void 0)return Nt}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(W),T+=W.length-1}else if(this.state.field.length!==0){if(g===!1){let ze=this.__infoField(),I0=Object.keys(v2).map(X=>v2[X].equals(this.state.field.toString())?X:!1).filter(Boolean)[0],je=this.__error(new Je("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(ze.column)} at line ${ze.lines}, value is ${JSON.stringify(this.state.field.toString(A))}`,I0?`(${I0} bom)`:void 0],this.options,ze,{field:this.state.field}));if(je!==void 0)return je}}else{this.state.quoting=!0,T+=W.length-1;continue}if(this.state.quoting===!1){let ze=this.__isRecordDelimiter(j,k,T);if(ze!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),T+=ze-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,T+=ze-1;continue}this.info.bytes=this.state.bufBytesStart+T;let X=this.__onField();if(X!==void 0)return X;this.info.bytes=this.state.bufBytesStart+T+ze;let Rt=this.__onRecord(i);if(Rt!==void 0)return Rt;if(B!==-1&&this.info.records>=B){this.state.stop=!0,a();return}}this.state.commenting=!1,T+=ze-1;continue}if(this.state.commenting)continue;if(q!==null&&(u===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(q,k,T,j)!==0){this.state.commenting=!0;continue}let I0=this.__isDelimiter(k,T,j);if(I0!==0){this.info.bytes=this.state.bufBytesStart+T;let je=this.__onField();if(je!==void 0)return je;T+=I0-1;continue}}}if(this.state.commenting===!1&&M!==0&&this.state.record_length+this.state.field.length>M)return this.__error(new Je("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${M}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let $e=b===!1||this.state.quoting===!0||this.state.field.length!==0||!thi
Line truncated
|
|
|
|
|
`,i),Buffer.from(`
|
|
|
|
|
`,i),Buffer.from("\r",i)];e:for(let a=0;a<o.length;a++){let c=o[a].length;for(let u=0;u<c;u++)if(o[a][u]!==s[n+u])continue e;return this.options.record_delimiter.push(o[a]),this.state.recordDelimiterMaxLength=o[a].length,o[a].length}return 0},__error:function(s){let{encoding:n,raw:i,skip_records_with_error:o}=this.options,a=typeof s=="string"?new Error(s):s;if(o){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(a,i?this.state.rawBuffer.toString(n):void 0)}catch(c){return c}return}else return a},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:s,raw:n,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:s===!0,index:this.state.record.length,raw:n?this.state.rawBuffer.toString(i):void 0}},__infoField:function(){let{columns:s}=this.options,n=Array.isArray(s),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:n===!0?s.length>this.state.record.length?s[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var O1=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?{}:[],s=Iqe(e),n=a=>{s.options.objname===void 0?r.push(a):r[a[0]]=a[1]},i=()=>{},o=s.parse(t,!0,n,i);if(o!==void 0)throw o;return r};var q0=class t{static getInputList(e,r){return this.getList(xb(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let s=[];if(e=="")return s;let n=O1(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let i of n)i.length==1?r?.ignoreComma?s.push(i[0]):s.push(...i[0].split(",")):r?.ignoreComma?s.push(i.join(",")):s.push(...i);return s.filter(i=>i).map(i=>r?.trimWhitespace===!1?i:i.trim())}static getInputNumber(e){let r=xb(e);if(r)return parseInt(r)}static async asyncForEach(e,r){for(let s=0;s<e.length;s++)await r(e[s],s,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 s=await hr("powershell",!0),n=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=[];if(r)for(let o in r)i.push(`-${o} '${r[o].replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`);return{command:`"${s}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${n}' ${i.join(" ")}`]}}static isDirectory(e){try{return Rqe.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 s=e.lastIndexOf(r);return s===-1||s+r.length!==e.length?e:e.substring(0,s)}static sleep(e){return new Promise(r=>setTimeout(r,e*1e3))}static hash(e){return s$.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,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,n)).toFixed(2))+" "+s[n]}static generateRandomString(e=10){return s$.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,s){return wqe.default.compile(e,r)(s)}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 s=HE.default.resolve(e);return HE.default.resolve(r).startsWith(s.endsWith(HE.default.sep)?s:`${s}${HE.default.sep}`)}static formatDuration(e){if(e===0)return"0s";let r=Math.floor(e/1e9),s=Math.floor(r/3600),n=Math.floor(r%3600/60),i=r%60,o=[];return s&&o.push(`${s}h`),n&&o.push(`${n}m`),(i||o.length===0)&&o.push(`${i}s`),o.join("")}};var xr=class t{static get configDir(){return process.env.DOCKER_CONFIG||XE.default.join(Sqe.default.homedir(),".docker")}static configFile(){let e=XE.default.join(t.configDir,"config.json");if(n$.default.existsSync(e))return JSON.parse(n$.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await hr("docker",!0).then(e=>(P(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(P(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0}catch{return!1}}static async exec(e,r){return Le.exec("docker",e,t.execOptions(r))}static async getExecOutput(e,r){return Le.getExecOutput("docker",e,t.execOptions(r))}static execOptions(e){return e||(e={}),e.
Line truncated
|
|
|
|
|
More info: ${c.url}`);let h=c.range&&c.range.length>0?c.range[0]?.start.line:void 0,M=!1;for(let g of o)if(g.remote||g.path.endsWith(u)&&g.content===p){a.push({title:l,message:A,file:g.path,startLine:h}),M=!0;break}M||P(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${u}: ${l}`)}return a}};var J2=F(require("fs"),1),i$=F(require("path"),1);var aN=class t{buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new tt,this.iidFilename=`build-iidfile-${q0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${q0.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),s=e?.attrs||{},n=Object.entries(s).filter(([h])=>!r.has(h)),i=q0.parseBoolOrDefault(s["fetch-by-commit"]),o=e?.ref||s.ref||ms.ref;o.startsWith("refs/")?o.startsWith("refs/pull/")&&q0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(o=o.replace(/\/merge$/g,"/head")):o=`refs/heads/${o}`;let a=`${D0.serverURL}/${ms.repo.owner}/${ms.repo.repo}.git`,c=e?.checksum||s.checksum,u=e?.subdir||s.subdir,p=e?.format;if(!p){if(p="fragment",n.length>0)p="query";else if(q0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(p="query")}catch{}}let l=ms.sha||o;o.startsWith("refs/pull/")&&o.endsWith("/head")&&(l=typeof ms.payload.pull_request?.head?.sha=="string"?ms.payload.pull_request.head.sha:o);let A=c||l;if(p==="query"){let h=[`ref=${i||c?o:A}`],M=i?A:c;M&&h.push(`checksum=${M}`),u&&u!=="."&&h.push(`subdir=${u}`);for(let[g,y]of n)h.push(`${g}=${y}`);return`${a}?${h.join("&")}`}return`${a}#${A}${u&&u!=="."?`:${u}`:""}`}getImageIDFilePath(){return i$.default.join(E0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(J2.default.existsSync(e))return J2.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return i$.default.join(E0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!J2.default.existsSync(e))return;let r=J2.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,s]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${s}`}static resolveSecretFile(e){let[r,s]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${s}`}static resolveSecretEnv(e){let[r,s]=t.parseSecretKvp(e);return`id=${r},env=${s}`}static resolveSecret(e,r){let[s,n]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!J2.default.existsSync(n))throw new Error(`secret file ${n} not found`);return[s,n]}let i=E0.tmpName({tmpdir:E0.tmpDir()});return J2.default.writeFileSync(i,n),[s,i]}static getProvenanceInput(e){let r=xb(e);if(!r)return r;try{return I2e(e)?`builder-id=${D0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${D0.workflowRunURL(!0)}`;let r=O1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of r)if(s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${D0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let s="registry",n="",i="",o=O1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let a of o){let c=a.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());c[0]==="type"?s=c[1]:c[0]==="repository"?n=c[1]:c[0]==="ghtoken"&&(i=c[1])}return s==="gha"&&(n||(e=`${e},repository=${D0.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}static hasDockerExporter(e,r){return r||t.hasExporterType("docker",e)}static hasExporterType(e,r){let s=O1(r.join(`
|
|
|
|
|
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s){if(n.length==1&&!n[0].startsWith("type="))return e=="local";for(let[i,o]of n.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0}return!1}static hasAttestationType(e,r){let s=O1(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s)for(let[i,o]of n.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0;return!1}static resolveAttestationAttrs(e){let r=O1(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let n of r)for(let i of n)try{let o=q0.parseBool(i);s.push(`disabled=${!o}`)}catch{s.push(i)}return s.join(",")}static hasGitAuthTokenSecret(e,r){for(let s of e){if(r&&s.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(s.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let s=e.indexOf("="),n=e.substring(0,s),i=e.substring(s+1);if(n.length==0||i.length==0)throw new Error(`${e} is not a valid secret`);return r&&SO(i),[n,i]}};var o$=F(require("fs"),1),vqe=F(require("path"),1);var cN=class t{buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new tt,this.metadataFilename=`bake-metadata-${q0.generateRandomString()}.json`}getMetadataFilePath(){return vqe.default.join(E0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!o$.default.existsSync(e))return;let r=o$.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let s in e)"buildx.build.ref"in e[s]&&r.push(e[s]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let s=["bake"],n,i=[],o=[...e.files||[],e.source];if(o){for(let c of o.map(u=>u?u.trim():""))if(c.length!=0){if(!q0.isValidRef(c)){i.push(c);continue}if(n)throw new Error("Only one remote bake definition can be defined");n=c}}n&&s.push(n);for(let c of i)s.push("--file",c);if(e.overrides)for(let c of e.overrides)s.push("--set",c);if(e.vars)for(let c of e.vars)s.push("--var",c);if(e.allow)for(let c of e.allow)s.push("--allow",c);e.call&&s.push("--call",e.call),e.load&&s.push("--load"),e.noCache&&s.push("--no-cache"),e.provenance&&s.push("--provenance",e.provenance),e.push&&s.push("--push"),e.sbom&&s.push("--sbom",e.sbom);let a=await this.buildx.getCommand([...s,"--print",...e.targets||[]]);return await Le.getExecOutput(a.command,a.args,r).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(`cannot parse bake definitions: ${c.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(c.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let s in r.target){let n=r.target[s];n.attest&&Array.isArray(n.attest)&&(n.attest=n.attest.map(i=>t.parseAttestEntry(i))),n["cache-from"]&&Array.isArray(n["cache-from"])&&(n["cache-from"]=n["cache-from"].map(i=>t.parseCacheEntry(i))),n["cache-to"]&&Array.isArray(n["cache-to"])&&(n["cache-to"]=n["cache-to"].map(i=>t.parseCacheEntry(i))),n.output&&Array.isArray(n.output)&&(n.output=n.output.map(i=>t.parseExportEntry(i))),n.secret&&Array.isArray(n.secret)&&(n.secret=n.secret.map(i=>t.parseSecretEntry(i))),n.ssh&&Array.isArray(n.ssh)&&(n.ssh=n.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},s=O1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let[i,o]=n.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());switch(i){case"type":r.type=o;break;case"disabled":r.disabled=q0.parseBool(o);break;default:r[i]=o}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=O1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(s.length===1&&!s[0].includes("="))return r.type="registry",r.ref=s[0],r;for(let n of s){let[i,o]=n.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());i==="type"?r.type=o:r[i]=o}return r}static parseExportEntry(e){if(typeof e!="string")return e;let r={type:""},s=O1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(s.length===1&&s[0]===e&&!e.startsWith("type="))return e!=="-"?(r.type="local",r.dest=e,r):(r.type="tar",r.dest=e,r);for(let n of s){let[i,o]=n.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());i==="type"?r.type=o:r[i]=o}return r}static parseSecretEntry(e){if(typeof e!="string")return e;let r={},s=O1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0],n="";for(let i of s){let[o,a]=i.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(o){case"type":n=a;break;case"id":r.id=a;break;case"source":case"src":r.src=a;break;case"env":r.env=a;break}}return n==="env"&&!r.env&&(r.env=r.src,r.src=void 0),r}static parseSSHEntry(e){if(typeof e!="string")return e;let r={},[s,n]=e.split("=",2);return r.id=s,n&&(r.paths=n.split(",
Line truncated
|
|
|
|
|
`)[0])}static async isHeadDetached(){return await t.exec(["branch","--show-current"]).then(e=>e.length==0)}static async getDetachedRef(){let e=await t.exec(["show","-s","--pretty=%D"]);P(`detached HEAD ref: ${e}`);let r=e.replace(/^grafted, /,"").trim();if(r==="HEAD")return await t.inferRefFromHead();let s=r.match(/^HEAD, (.*)$/);if(!s||!s[1])throw new Error(`Cannot find detached HEAD ref in "${e}"`);let n=s[1].trim();if(n.startsWith("tag: "))return`refs/tags/${n.split(":")[1].trim()}`;if(n.match(/^pull\/\d+\/(head|merge)$/))return`refs/${n}`;let o=n.match(/^[^/]+\/[^/]+, (.+)$/);if(o)return`refs/heads/${o[1].trim()}`;let a=n.match(/^[^/]+\/(.+)$/);if(a)return`refs/heads/${a[1].trim()}`;throw new Error(`Unsupported detached HEAD ref in "${e}"`)}static async exec(e=[]){return await Le.getExecOutput("git",e,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr);return r.stdout.trim()})}static async inferRefFromHead(){let e=await t.findContainingRef("refs/heads/");if(e)return e;let r=await t.findContainingRef("refs/remotes/");if(r){let i=r.match(/^refs\/remotes\/[^/]+\/(.+)$/);return i?`refs/heads/${i[1]}`:r}let s=await t.exec(["tag","--contains","HEAD"]),[n]=s.split(`
|
|
|
|
|
`).map(i=>i.trim()).filter(i=>i.length>0);if(n)return`refs/tags/${n}`;throw new Error("Cannot infer ref from detached HEAD")}static async findContainingRef(e){let r=await t.exec(["for-each-ref","--format=%(refname)","--contains","HEAD","--sort=-committerdate",e]),[s]=r.split(`
|
|
|
|
|
`).map(n=>n.trim()).filter(n=>n.length>0);return s}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var XLe=require("crypto"),uu=F(require("fs"),1),ud=F(require("path"),1);var c4=F(jE(),1),pu=F(vxe(),1),VLe=F(Yte(),1),Ug=F(LLe(),1);var $1e=F(jE(),1);var QLe=F(sa(),1);var PLe="application/vnd.oci.empty.v1+json";var al=class{binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await Le.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(P(`Cosign.isAvailable cmd err: ${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(P(`Cosign.isAvailable error: ${r}`),!1));return P(`Cosign.isAvailable: ${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Le.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 Le.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let s=r??await this.version();if(!s)return P("Cosign.versionSatisfies false: undefined version"),!1;let n=QLe.satisfies(s,e)||/^[0-9a-f]{7}$/.exec(s)!==null;return P(`Cosign.versionSatisfies ${s} statisfies ${e}: ${n}`),n}static parseCommandOutput(e){let r,s,n,i;for(let o of e.split(/\r?\n/)){let a=o.trim();if(!a.startsWith("{")||!a.endsWith("}"))continue;let c;try{c=JSON.parse(a)}catch{continue}if(c&&Array.isArray(c.errors)&&c.errors.length>0&&(i=c.errors),!r&&c&&Array.isArray(c.manifests)&&c.manifests.length>0){let u=c.manifests[0];u?.artifactType===$1e.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===PLe&&typeof u.digest=="string"&&(s=u.digest)}if(!n&&c&&c.mediaType===$1e.BUNDLE_V03_MEDIA_TYPE&&(n=c),n&&(r||s)){i=void 0;break}}return{bundle:n,signatureManifestDigest:r||s,errors:i}}};var Y1e=F(require("fs"),1);var fx=class t{buildx;constructor(e){this.buildx=e?.buildx||new tt}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 s=r.manifests.filter(o=>o.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return s;let n=e.platform,i=new Map;for(let o of r.manifests)o.digest&&i.set(o.digest,o);return s.filter(o=>{let a=o.annotations?.["vnd.docker.reference.digest"];if(!a)return!1;let c=i.get(a);return c?c.platform?.os===n.os&&c.platform?.architecture===n.architecture&&(c.platform?.variant??"")===(n.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],s=E0.tmpName({tmpdir:E0.tmpDir(),template:"imagetools-metadata-XXXXXX"}),n=[],i=[];for(let a of e.sources){if(a.startsWith("cwd://")){let c=a.substring(6);c.length>0&&n.push(c);continue}i.push(a)}if(e.tags)for(let a of e.tags)r.push("--tag",a);if(e.platforms)for(let a of e.platforms)r.push("--platform",a);if(e.annotations)for(let a of e.annotations)r.push("--annotation",a);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",s);for(let a of n)r.push("--file",a);for(let a of i)r.push(a);let o=await this.getCreateCommand(r);if(e.skipExec){G(`[command]${o.command} ${o.args.join(" ")}`),G("Skipped create command");return}return await Le.getExecOutput(o.command,o.args,{ignoreReturnCode:!0,silent:e.silent}).then(a=>{if(a.stderr.length>0&&a.exitCode!=0)throw new Error(a.stderr.trim());if(!e.dryRun){if(!Y1e.default.existsSync(s))return;let c=Y1e.default.readFileSync(s,{encoding:"utf-8"}).trim();if(c===""||c==="null")return;let u=JSON.parse(c),p=u["containerimage.descriptor"];return p?{digest:u["containerimage.digest"]||p.digest,descriptor:p,imageNames:u["image.name"]?u["image.name"].split(",").map(l=>l.trim()):[]}:void 0}})}async inspect(e,r,s){let n=await this.getInspectCommand([e.name,"--format",r]);if(!e.retryOnManifestUnknown)return await this.execInspect(n.command,n.args,s);let i=e.retryLimit??15,o;for(let a=0;a<i;a++)try{return await this.execInspect(n.command,n.args,s)}catch(c){if(o=c,!t.isManifest
Line truncated
|
|
|
|
|
${o.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,a)*100))}throw o??new Error(`ImageTools inspect command failed for ${e.name}`)}async execInspect(e,r,s){return await Le.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.stderr.length>0&&n.exitCode!=0)throw new Error(n.stderr.trim());return s(JSON.parse(n.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(e)}};var kLe="application/vnd.in-toto+json";var ULe="https://fulcio.sigstore.dev",GLe="https://rekor.sigstore.dev",HLe="https://timestamp.sigstore.dev",rh="https://search.sigstore.dev";var xZ0="slsaprovenance1",pd=class t{cosign;imageTools;constructor(e){this.cosign=e?.cosign||new al,this.imageTools=e?.imageTools||new fx}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let s=this.signingEndpoints(e.noTransparencyLog);G(`Using Sigstore signing endpoint: ${s.fulcioURL}`);let n=t.noTransparencyLog(e.noTransparencyLog),i=[];await this.cosign.versionSatisfies(">=3.0.4")?await $l("Creating Sigstore protobuf signing config",async()=>{let o=E0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:E0.tmpDir()}),a=["signing-config","create","--with-default-services=true",`--out=${o}`];n&&a.push("--no-default-rekor=true"),await Le.exec(this.cosign.binPath,a,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),G(JSON.stringify(JSON.parse(uu.default.readFileSync(o,{encoding:"utf-8"})),null,2)),i.push(`--signing-config=${o}`)}):(i.push("--use-signing-config"),n&&i.push("--tlog-upload=false"));for(let o of e.imageNames){let a=await this.imageTools.attestationDigests({name:`${o}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let c of a){let u=`${o}@${c}`;await $l(`Signing attestation manifest ${u}`,async()=>{let p=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...i];G(`[command]${this.cosign.binPath} ${[...p,u].join(" ")}`);let l=await Le.getExecOutput(this.cosign.binPath,["--verbose",...p,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),A=al.parseCommandOutput(l.stderr.trim());if(l.exitCode!=0)if(A.errors&&A.errors.length>0){let M=A.errors.map(g=>`- [${g.code}] ${g.message} : ${g.detail}`).join(`
|
|
|
|
|
`,i),Buffer.from("\r",i)];e:for(let c=0;c<a.length;c++){let u=a[c].length;for(let p=0;p<u;p++)if(a[c][p]!==n[o+p])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:s(function(n){let{encoding:o,raw:i,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,i?this.state.rawBuffer.toString(o):void 0)}catch(u){return u}return}else return c},"__error"),__infoDataSet:s(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:s(function(){let{columns:n,raw:o,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:o?this.state.rawBuffer.toString(i):void 0}},"__infoRecord"),__infoField:s(function(){let{columns:n}=this.options,o=Array.isArray(n),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:o===!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 cn=s(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=k4(e),o=s(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),i=s(()=>{},"close"),a=n.parse(t,!0,o,i);if(a!==void 0)throw a;return r},"parse");var l0=class t{static{s(this,"Util")}static getInputList(e,r){return this.getList(Ur(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let n=[];if(e=="")return n;let o=cn(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let i of o)i.length==1?r?.ignoreComma?n.push(i[0]):n.push(...i[0].split(",")):r?.ignoreComma?n.push(i.join(",")):n.push(...i);return n.filter(i=>i).map(i=>r?.trimWhitespace===!1?i:i.trim())}static getInputNumber(e){let r=Ur(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 at("powershell",!0),o=e.replace(/'/g,"''"),i=[];if(r)for(let a in r)i.push(`-${a} '${r[a].replace(/'/g,"''")}'`);return{command:`"${n}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-EncodedCommand",Buffer.from(`& '${o}' ${i.join(" ")}`,"utf16le").toString("base64")]}}static isDirectory(e){try{return xle.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 nQ.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"],o=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+n[o]}static generateRandomString(e=10){return nQ.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,n){return Tle.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=Bm.default.resolve(e);return Bm.default.resolve(r).startsWith(n.endsWith(Bm.default.sep)?n:`${n}${Bm.default.sep}`)}static formatDuration(e){if(e===0)return"0s";let r=Math.floor(e/1e9),n=Math.floor(r/3600),o=Math.floor(r%3600/60),i=r%60,a=[];return n&&a.push(`${n}h`),o&&a.push(`${o}m`),(i||a.length===0)&&a.push(`${i}s`),a.join("")}};var Bt=class t{static{s(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||Dm.default.join(vle.default.homedir(),".docker")}static configFile(){let e=Dm.default.join(t.configDir,"config.json");if(oQ.default.existsSync(e))return JSON.parse(oQ.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await at("docker",!0).then(e=>(N(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(N(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0
Line truncated
|
|
|
|
|
${n}`)},"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 O0=class t{static{s(this,"Buildx")}_version;_versionOnce;_standalone;static containerNamePrefix="buildx_buildkit_";constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}static get configDir(){return process.env.BUILDX_CONFIG||gr.default.join(Bt.configDir,"buildx")}static get refsDir(){return gr.default.join(t.configDir,"refs")}static get refsGroupDir(){return gr.default.join(t.refsDir,"__group__")}static get certsDir(){return gr.default.join(t.configDir,"certs")}async isStandalone(){let e=this._standalone??!await Bt.isAvailable();return N(`Buildx.isStandalone: ${e}`),e}async getCommand(e){let r=await this.isStandalone();return{command:r?"buildx":"docker",args:r?e:["buildx",...e]}}async isAvailable(){let e=await this.getCommand([]),r=await Ee.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(n=>n.stderr.length>0&&n.exitCode!=0?(N(`Buildx.isAvailable cmd err: ${n.stderr.trim()}`),!1):n.exitCode==0).catch(n=>(N(`Buildx.isAvailable error: ${n}`),!1));return N(`Buildx.isAvailable: ${r}`),r}async version(){if(this._versionOnce)return this._version;this._versionOnce=!0;let e=await this.getCommand(["version"]);return this._version=await Ee.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 Ee.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 buildx version");return r[1]}static getErrorMessage(e){let r=(0,Qle.stripVTControlCharacters)(e).split(/[\r\n]/),n="";for(let o=r.length-1;o>=0;o--){let i=r[o].trim();if(i.startsWith("ERROR:"))return i.slice(6).trim()||"unknown error";n||=i}return n||"unknown error"}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return N("Buildx.versionSatisfies false: undefined version"),!1;let o=Ple.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return N(`Buildx.versionSatisfies ${n} statisfies ${e}: ${o}`),o}static resolveCertsDriverOpts(e,r,n){let o;try{o=new URL(r)}catch{return[]}if(o.protocol!="tcp:")return[];let i=[];if(Object.keys(n).length==0)return i;let a=o.hostname;if(o.port.length>0&&(a+=`-${o.port}`),n.cacert!==void 0){let c=gr.default.join(t.certsDir,`cacert_${a}.pem`);Vn.default.writeFileSync(c,n.cacert),i.push(`cacert=${c}`)}if(n.cert!==void 0){let c=gr.default.join(t.certsDir,`cert_${a}.pem`);Vn.default.writeFileSync(c,n.cert),i.push(`cert=${c}`)}if(n.key!==void 0){let c=gr.default.join(t.certsDir,`key_${a}.pem`);Vn.default.writeFileSync(c,n.key),i.push(`key=${c}`)}return e!="remote"?[]:i}static localState(e,r){let[n,o,i]=e.split("/");if(!n||!o||!i)throw new Error(`Invalid build reference: ${e}`);let a=gr.default.join(r||t.refsDir,n,o,i);if(!Vn.default.existsSync(a))throw new Error(`Local state not found in ${a}`);return t.fixLocalState(JSON.parse(Vn.default.readFileSync(a,"utf8")))}static fixLocalState(e){let r=s(function(a){let c=a.match(/(.*)(https?:\/{1,2}\S+|ssh:\/{1,2}\S+|git:\/{1,2}\S+)/i);if(c&&c.length==3){let u=c[1],p=c[2];return p.startsWith("https:/")&&!p.startsWith("https://")&&(p=p.replace("https:/","https://")),p.startsWith("http:/")&&!p.startsWith("http://")&&(p=p.replace("http:/","http://")),p.startsWith("ssh:/")&&!p.startsWith("ssh://")&&(p=p.replace("ssh:/","ssh://")),p.startsWith("git:/")&&!p.startsWith("git://")&&(p=p.replace("git:/","git://")),[p,u,!0]}return[a,"",!1]},"fnTrimToValidContext"),[n,o,i]=r(e.LocalPath);return i&&(e.LocalPath=n,e.DockerfilePath.indexOf(o)===0&&(e.DockerfilePath=e.DockerfilePath.substring(o.length))),e.LocalPath=e.LocalPath.endsWith("/-")?"-":e.LocalPath,e.DockerfilePath=e.DockerfilePath.endsWith("/-")?"-":e.DockerfilePath,e}static refs(e,r={}){let{dir:n,builderName:o,nodeName:i,since:a}=e,c=gr.default.resolve(n);if(e.builderName&&(c=gr.default.join(c,e.builderName)),e.nodeName&&(c=gr.default.join(c,e.nodeName)),!Vn.default.existsSync(c))return r;let u=Vn.default.readdirSync(c);for(let p of u){let A=gr.default.join(c,p),l=Vn.default.statSync(A);if(l.isDirectory()){let b={...e};if(o)i||(b.nodeName=p);else{if(p==="__group__")continue;b.builderName=p}t.refs(b,r)}else{if(a&&l.mtime<a)continue;let b=t.fixLocalState(JSON.parse(Vn.default.readFileSync(A,"utf8"))),M=`${o}/${i}/${p}`;r[M]=b}}return r}static async convertWarningsToGitHubAnnotations(e,r,n){if(e.length===0)return;let o=s(function(u){try{return t4.parseURL(u)}catch{}},"fnGitURL"),i=s(function
Line truncated
|
|
|
|
|
More info: ${u.url}`);let M=u.range&&u.range.length>0?u.range[0]?.start.line:void 0,z=!1;for(let g of a)if(g.remote||g.path.endsWith(p)&&g.content===A){c.push({title:l,message:b,file:g.path,startLine:M}),z=!0;break}z||N(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${p}: ${l}`)}return c}};var Dp=w(require("fs"),1),iQ=w(require("path"),1);var U4=class t{static{s(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new O0,this.iidFilename=`build-iidfile-${l0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${l0.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),n=e?.attrs||{},o=Object.entries(n).filter(([M])=>!r.has(M)),i=l0.parseBoolOrDefault(n["fetch-by-commit"]),a=e?.ref||n.ref||Vt.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&l0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${A0.serverURL}/${Vt.repo.owner}/${Vt.repo.repo}.git`,u=e?.checksum||n.checksum,p=e?.subdir||n.subdir,A=e?.format;if(!A){if(A="fragment",o.length>0)A="query";else if(l0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(A="query")}catch{}}let l=Vt.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(l=typeof Vt.payload.pull_request?.head?.sha=="string"?Vt.payload.pull_request.head.sha:a);let b=u||l;if(A==="query"){let M=[`ref=${i||u?a:b}`],z=i?b:u;z&&M.push(`checksum=${z}`),p&&p!=="."&&M.push(`subdir=${p}`);for(let[g,C]of o)M.push(`${g}=${C}`);return`${c}?${M.join("&")}`}return`${c}#${b}${p&&p!=="."?`:${p}`:""}`}getImageIDFilePath(){return iQ.default.join(u0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(Dp.default.existsSync(e))return Dp.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return iQ.default.join(u0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!Dp.default.existsSync(e))return;let r=Dp.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}static resolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}static resolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}static resolveSecret(e,r){let[n,o]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!Dp.default.existsSync(o))throw new Error(`secret file ${o} not found`);return[n,o]}let i=u0.tmpName({tmpdir:u0.tmpDir()});return Dp.default.writeFileSync(i,o),[n,i]}static getProvenanceInput(e){let r=Ur(e);if(!r)return r;try{return rK(e)?`builder-id=${A0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${A0.workflowRunURL(!0)}`;let r=cn(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of r)if(n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${A0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let n="registry",o="",i="",a=cn(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let u=c.toString().split(/(?<=^[^=]+?)=/).map(p=>p.trim());u[0]==="type"?n=u[1]:u[0]==="repository"?o=u[1]:u[0]==="ghtoken"&&(i=u[1])}return n==="gha"&&(o||(e=`${e},repository=${A0.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}static hasDockerExporter(e,r){return r||t.hasExporterType("docker",e)}static hasExporterType(e,r){let n=cn(r.join(`
|
|
|
|
|
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n){if(o.length==1&&!o[0].startsWith("type="))return e=="local";for(let[i,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let n=cn(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n)for(let[i,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=cn(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let o of r)for(let i of o)try{let a=l0.parseBool(i);n.push(`disabled=${!a}`)}catch{n.push(i)}return n.join(",")}static hasGitAuthTokenSecret(e,r){for(let n of e){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let n=e.indexOf("="),o=e.substring(0,n),i=e.substring(n+1);if(o.length==0||i.length==0)throw new Error(`${e} is not a valid secret`);return r&&ei(i),[o,i]}};var sQ=w(require("fs"),1),kle=w(require("path"),1);var G4=class t{static{s(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new O0,this.metadataFilename=`bake-metadata-${l0.generateRandomString()}.json`}getMetadataFilePath(){return kle.default.join(u0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!sQ.default.existsSync(e))return;let r=sQ.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"],o,i=[],a=[...e.files||[],e.source];if(a){for(let u of a.map(p=>p?p.trim():""))if(u.length!=0){if(!l0.isValidRef(u)){i.push(u);continue}if(o)throw new Error("Only one remote bake definition can be defined");o=u}}o&&n.push(o);for(let u of i)n.push("--file",u);if(e.overrides)for(let u of e.overrides)n.push("--set",u);if(e.vars)for(let u of e.vars)n.push("--var",u);if(e.allow)for(let u of e.allow)n.push("--allow",u);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 Ee.getExecOutput(c.command,c.args,r).then(u=>{if(u.stderr.length>0&&u.exitCode!=0)throw new Error(`cannot parse bake definitions: ${O0.getErrorMessage(u.stderr)}`);return t.parseDefinition(u.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let n in r.target){let o=r.target[n];o.attest&&Array.isArray(o.attest)&&(o.attest=o.attest.map(i=>t.parseAttestEntry(i))),o["cache-from"]&&Array.isArray(o["cache-from"])&&(o["cache-from"]=o["cache-from"].map(i=>t.parseCacheEntry(i))),o["cache-to"]&&Array.isArray(o["cache-to"])&&(o["cache-to"]=o["cache-to"].map(i=>t.parseCacheEntry(i))),o.output&&Array.isArray(o.output)&&(o.output=o.output.map(i=>t.parseExportEntry(i))),o.secret&&Array.isArray(o.secret)&&(o.secret=o.secret.map(i=>t.parseSecretEntry(i))),o.ssh&&Array.isArray(o.ssh)&&(o.ssh=o.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=cn(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let[i,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(i){case"type":r.type=a;break;case"disabled":r.disabled=l0.parseBool(a);break;default:r[i]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=cn(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let o of n){let[i,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());i==="type"?r.type=a:r[i]=a}return r}static parseExportEntry(e){if(typeof e!="string")return e;let r={type:""},n=cn(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 o of n){let[i,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());i==="type"?r.type=a:r[i]=a}return r}static parseSecretEntry(e){if(typeof e!="string")return e;let r={},n=cn(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0],o="";for(let i of n){let[a,c]=i.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());switch(a){case"type":o=c;break;case"id":r.id=c;break;case"source":case"src":r.src=c;break;case"env":r.env=c;break}}return o==="env"&&!r.env&&(r.env=r.src,r.src=void 0),r}static parseSSHEntry(e){if(typeof e!="string")return e;let r={},[n,o]=e.split("=",2);return r.id=n,o&&(r.paths=o.split(",")),r}
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);N(`detached HEAD ref: ${r}`);let n=r.replace(/^grafted, /,"").trim();if(n==="HEAD")return await t.inferRefFromHead(e);let o=n.match(/^HEAD, (.*)$/);if(!o||!o[1])throw new Error(`Cannot find detached HEAD ref in "${r}"`);let i=o[1].trim();if(i.startsWith("tag: "))return await t.findDetachedTagRef(i,r,e);if(i.match(/^pull\/\d+\/(head|merge)$/))return`refs/${i}`;let c=i.match(/^[^/]+\/[^/]+, (.+)$/);if(c)return`refs/heads/${c[1].trim()}`;let u=i.match(/^[^/]+\/(.+)$/);if(u)return`refs/heads/${u[1].trim()}`;throw new Error(`Unsupported detached HEAD ref in "${r}"`)}static async exec(e=[],r){return await Ee.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 o=await t.exec(["tag","--contains","HEAD"],e),[i]=o.split(`
|
|
|
|
|
`).map(a=>a.trim()).filter(a=>a.length>0);return i?`refs/tags/${i}`:""}static async findDetachedTagRef(e,r,n){let i=(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 i){let c=`tag: ${a.slice(10)}`;if(e===c||e.startsWith(`${c}, `))return a}if(i.length===1)return i[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),[o]=n.split(`
|
|
|
|
|
`).map(i=>i.trim()).filter(i=>i.length>0);return o}static async commitDate(e,r){return new Date(await t.exec(["show","-s",'--format="%ci"',e],r))}};var ofe=require("crypto"),rs=w(require("fs"),1),ns=w(require("path"),1);var fd=w(bQ(),1),ife=w(R8(),1),Md=w(Zbe(),1);var tfe=require("util");var SP=w(bQ(),1);var rfe=w(Un(),1);var efe="application/vnd.oci.empty.v1+json";var Dr=class{static{s(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await Ee.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(N(`Cosign.isAvailable cmd err: ${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(N(`Cosign.isAvailable error: ${r}`),!1));return N(`Cosign.isAvailable: ${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Ee.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 Ee.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}static getErrorMessage(e){let r=(0,tfe.stripVTControlCharacters)(e).split(/[\r\n]/);for(let n=r.length-1;n>=0;n--){let o=r[n].trim();if(o)return o}return"unknown error"}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return N("Cosign.versionSatisfies false: undefined version"),!1;let o=rfe.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return N(`Cosign.versionSatisfies ${n} statisfies ${e}: ${o}`),o}static parseCommandOutput(e){let r,n,o,i;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let u;try{u=JSON.parse(c)}catch{continue}if(u&&Array.isArray(u.errors)&&u.errors.length>0&&(i=u.errors),!r&&u&&Array.isArray(u.manifests)&&u.manifests.length>0){let p=u.manifests[0];p?.artifactType===SP.BUNDLE_V03_MEDIA_TYPE&&typeof p.digest=="string"?r=p.digest:p?.artifactType===efe&&typeof p.digest=="string"&&(n=p.digest)}if(!o&&u&&u.mediaType===SP.BUNDLE_V03_MEDIA_TYPE&&(o=u),o&&(r||n)){i=void 0;break}}return{bundle:o,signatureManifestDigest:r||n,errors:i}}};var FP=w(require("fs"),1);var CD=class t{static{s(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new O0}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 o=e.platform,i=new Map;for(let a of r.manifests)a.digest&&i.set(a.digest,a);return n.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let u=i.get(c);return u?u.platform?.os===o.os&&u.platform?.architecture===o.architecture&&(u.platform?.variant??"")===(o.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],n=u0.tmpName({tmpdir:u0.tmpDir(),template:"imagetools-metadata-XXXXXX"}),o=[],i=[];for(let c of e.sources){if(c.startsWith("cwd://")){let u=c.substring(6);u.length>0&&o.push(u);continue}i.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 o)r.push("--file",c);for(let c of i)r.push(c);let a=await this.getCreateCommand(r);if(e.skipExec){S(`[command]${a.command} ${a.args.join(" ")}`),S("Skipped create command");return}return await Ee.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(!FP.default.existsSync(n))return;let u=FP.default.readFileSync(n,{encoding:"utf-8"}).trim();if(u===""||u==="null")return;let p=JSON.parse(u),A=p["containerimage.descriptor"];return A?{digest:p["containerimage.digest"]||A.digest,descriptor:A,imageNames:p["image.name"]?p["image.name"].split(",").map(l=>l.trim()):[]}:void 0}})}async inspect(e,r,n){let o=await this.getInspectCommand([e
Line truncated
|
|
|
|
|
${a.message}`),await new Promise(p=>setTimeout(p,Math.pow(2,c)*100))}throw a??new Error(`ImageTools inspect command failed for ${e.name}`)}async execInspect(e,r,n){return await Ee.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(o=>{if(o.stderr.length>0&&o.exitCode!=0)throw new Error(o.stderr.trim());return n(JSON.parse(o.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown)/i.test(e)||/:\s*not found$/i.test(e)}};var bd="https://search.sigstore.dev";var nfe="slsaprovenance1",kc=class t{static{s(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Dr,this.imageTools=e?.imageTools||new CD}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},o=await this.cosignSigningConfigArgs(n);for(let i of e.imageNames){let a=await this.imageTools.attestationDigests({name:`${i}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let c of a){let u=`${i}@${c}`;await ct(`Signing attestation manifest ${u}`,async()=>{let p=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1",...await this.bundleFormatArgs(),...o];S(`[command]${this.cosign.binPath} ${[...p,u].join(" ")}`);let A=await Ee.getExecOutput(this.cosign.binPath,["--verbose",...p,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),l=Dr.parseCommandOutput(A.stderr.trim());if(A.exitCode!=0)if(l.errors&&l.errors.length>0){let M=l.errors.map(z=>`- [${z.code}] ${z.message} : ${z.detail}`).join(`
|
|
|
|
|
`);throw new Error(`Cosign sign command failed with errors:
|
|
|
|
|
${M}`)}else throw new Error(`Cosign sign command failed with: ${l.stderr.trim().split(/\r?\n/).filter(M=>M.length>0).pop()??"unknown error"}`);let h=t.parseBundle((0,c4.bundleFromJSON)(A.bundle));h.tlogID&&G(`Uploaded to Rekor transparency log: ${rh}?logIndex=${h.tlogID}`),G(`Signature manifest pushed: https://oci.dag.dev/?referrers=${u}`),r[u]={...h,imageName:o}})}}}catch(s){throw new Error(`Signing BuildKit attestation manifests failed: ${s.message}`)}return r}async verifySignedManifests(e,r){let s={};for(let[n,i]of Object.entries(e))await $l(`Verifying signature of ${n}`,async()=>{let o=await this.verifyImageAttestation(n,{certificateIdentityRegexp:r.certificateIdentityRegexp,noTransparencyLog:r.noTransparencyLog||!i.tlogID,retryOnManifestUnknown:r.retryOnManifestUnknown});G(`Signature manifest verified: https://oci.dag.dev/?image=${i.imageName}@${o.signatureManifestDigest}`),s[n]=o});return s}async verifyImageAttestations(e,r){let s={},n=await this.imageTools.attestationDigests({name:e,platform:r.platform,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});if(n.length===0)throw new Error(`No attestation manifests found for ${e}`);let i=e.split(":",1)[0];for(let o of n){let a=`${i}@${o}`,c=await this.verifyImageAttestation(a,r);G(`Signature manifest verified: https://oci.dag.dev/?image=${i}@${c.signatureManifestDigest}`),s[a]=c}return s}async verifyImageAttestation(e,r){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed manifests");let s=["verify","--experimental-oci11","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp];if(r.noTransparencyLog&&s.push("--use-signed-timestamps","--insecure-ignore-tlog"),!r.retryOnManifestUnknown){G(`[command]${this.cosign.binPath} ${[...s,e].join(" ")}`);let o=await Le.getExecOutput(this.cosign.binPath,["--verbose",...s,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})});if(o.exitCode!==0)throw new Error(`Cosign verify command failed with: ${o.stderr.trim().split(/\r?\n/).filter(c=>c.length>0).pop()??"unknown error"}`);let a=al.parseCommandOutput(o.stderr.trim());return{cosignArgs:s,signatureManifestDigest:a.signatureManifestDigest}}let n=r.retryLimit??15,i;G(`[command]${this.cosign.binPath} ${[...s,e].join(" ")}`);for(let o=0;o<n;o++){let a=await Le.getExecOutput(this.cosign.binPath,["--verbose",...s,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),c=al.parseCommandOutput(a.stderr.trim());if(a.exitCode===0)return{cosignArgs:s,signatureManifestDigest:c.signatureManifestDigest};if(c.errors&&c.errors.length>0){let u=c.errors.map(p=>`- [${p.code}] ${p.message} : ${p.detail}`).join(`
|
|
|
|
|
${M}`)}else throw new Error(`Cosign sign command failed with: ${Dr.getErrorMessage(A.stderr)}`);let b=t.parseBundle((0,fd.bundleFromJSON)(l.bundle));b.tlogID&&await this.logTransparencyUpload(b.tlogID,n),S(`Signature manifest pushed: https://oci.dag.dev/?referrers=${u}`),r[u]={...b,imageName:i}})}}}catch(n){throw new Error(`Signing BuildKit attestation manifests failed: ${n.message}`)}return r}async verifySignedManifests(e,r){let n={};for(let[o,i]of Object.entries(e))await ct(`Verifying signature of ${o}`,async()=>{let a=await this.verifyImageAttestation(o,{certificateIdentityRegexp:r.certificateIdentityRegexp,noTransparencyLog:r.noTransparencyLog||!i.tlogID,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});S(`Signature manifest verified: https://oci.dag.dev/?image=${i.imageName}@${a.signatureManifestDigest}`),n[o]=a});return n}async verifyImageAttestations(e,r){let n={},o=await this.imageTools.attestationDigests({name:e,platform:r.platform,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});if(o.length===0)throw new Error(`No attestation manifests found for ${e}`);let i=e.split(":",1)[0];for(let a of o){let c=`${i}@${a}`,u=await this.verifyImageAttestation(c,r);S(`Signature manifest verified: https://oci.dag.dev/?image=${i}@${u.signatureManifestDigest}`),n[c]=u}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){S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);let a=await Ee.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: ${Dr.getErrorMessage(a.stderr)}`);let c=Dr.parseCommandOutput(a.stderr.trim());return{cosignArgs:n,signatureManifestDigest:c.signatureManifestDigest}}let o=r.retryLimit??15,i;S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);for(let a=0;a<o;a++){let c=await Ee.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),u=Dr.parseCommandOutput(c.stderr.trim());if(c.exitCode===0)return{cosignArgs:n,signatureManifestDigest:u.signatureManifestDigest};if(u.errors&&u.errors.length>0){let p=u.errors.map(A=>`- [${A.code}] ${A.message} : ${A.detail}`).join(`
|
|
|
|
|
`);if(i=new Error(`Cosign verify command failed with errors:
|
|
|
|
|
${u}`),c.errors.some(p=>p.code==="MANIFEST_UNKNOWN"))G(`Cosign verify command failed with MANIFEST_UNKNOWN, retrying attempt ${o+1}/${n}...
|
|
|
|
|
${u}`),await new Promise(p=>setTimeout(p,Math.pow(2,o)*100));else throw i}else throw new Error(`Cosign verify command failed with: ${a.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`)}throw i}async signProvenanceBlobs(e){let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let s=this.signingEndpoints(e.noTransparencyLog);G(`Using Sigstore signing endpoint: ${s.fulcioURL}`);let n=t.getProvenanceBlobs(e);for(let i of Object.keys(n))await $l(`Signing ${i}`,async()=>{let o=n[i],a=ud.default.join(ud.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),c=t.getProvenanceSubjects(o);if(c.length===0){Ri(`No subjects found in provenance ${i}, skip signing.`);return}let u=await t.signPayload({data:o,type:kLe},s),p=t.parseBundle(u);G("Provenance blob signed for:");for(let l of c){let[A,h]=Object.entries(l.digest)[0]||[];G(` - ${l.name} (${A}:${h})`)}p.tlogID&&G(`Attestation signature uploaded to Rekor transparency log: ${rh}?logIndex=${p.tlogID}`),G(`Writing Sigstore bundle to: ${a}`),uu.default.writeFileSync(a,JSON.stringify(p.payload,null,2),{encoding:"utf-8"}),r[i]={...p,bundlePath:a,subjects:c}})}catch(s){throw new Error(`Signing BuildKit provenance blobs failed: ${s.message}`)}return r}async verifySignedArtifacts(e,r){let s={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[n,i]of Object.entries(e)){let o=ud.default.dirname(n);await $l(`Verifying signature bundle ${i.bundlePath}`,async()=>{for(let a of i.subjects){let c=ud.default.join(o,a.name);G(`Verifying signed artifact ${c}`);let u=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??xZ0];(r.noTransparencyLog||!i.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let p=await Le.getExecOutput(this.cosign.binPath,[...u,"--bundle",i.bundlePath,c],{ignoreReturnCode:!0});if(p.stderr.length>0&&p.exitCode!=0)throw new Error(p.stderr);s[c]={bundlePath:i.bundlePath,cosignArgs:u}}})}return s}async verifyArtifact(e,r,s){G("Verifying keyless verification bundle signature");let n=JSON.parse(uu.default.readFileSync(r,"utf-8")),i=(0,c4.bundleFromJSON)(n);G("Fetching Sigstore TUF trusted root metadata");let o=await VLe.getTrustedRoot(),a=(0,Ug.toTrustMaterial)(o);try{G("Verifying artifact signature");let c=(0,Ug.toSignedEntity)(i,uu.default.readFileSync(e)),u=t.parseCertificate(i),p=i.verificationMaterial.tlogEntries,l=p.length>0?p[0].logIndex:void 0;if(s?.subjectAlternativeName&&s?.subjectAlternativeName instanceof RegExp){let M=u.subjectAltName?.replace(/^uri:/i,"");if(M){if(!M.match(s.subjectAlternativeName))throw new Error(`Signing certificate subjectAlternativeName "${M}" does not match expected pattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let h=new Ug.Verifier(a).verify(c,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return P(`Sigstore.verifyArtifact signer: ${JSON.stringify(h)}`),{payload:n,certificate:u.toString(),tlogID:l}}catch(c){throw new Error(`Failed to verify artifact signature: ${c}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),G(`Upload to transparency log: ${e?"disabled":"enabled"}`),{fulcioURL:ULe,rekorURL:e?void 0:GLe,tsaServerURL:HLe}}static noTransparencyLog(e){return e??D0.context.payload.repository?.private}static getProvenanceBlobs(e){let r=ud.default.join(e.localExportDir,"provenance.json");if(uu.default.existsSync(r))return{[r]:uu.default.readFileSync(r)};let s=uu.default.readdirSync(e.localExportDir,{withFileTypes:!0}),n=s.filter(i=>i.isDirectory());if(n.length>0&&n.length===s.length&&n.every(i=>uu.default.existsSync(ud.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let o of n){let a=ud.default.join(e.localExportDir,o.name,"provenance.json");i[a]=uu.default.readFileSync(a)}return i}throw new Error(`No valid provenance.json found in ${e.localExportDir}`)}static getProvenanceSubjects(e){return JSON.parse(e.toString()).subject.map(s=>({name:s.name,digest:s.digest}))}static async signPayload(e,r,s,n){let i=[],o=new pu.FulcioSigner({identityProvider:new pu.CIContextProvider("sigstore"),fulcioBaseURL:r.fulcioURL,timeout:s,retry:n});return r.rekorURL&&i.push(new pu.RekorWitness({rekorBaseURL:r.rekorURL,fetchOnConflict:!0,timeout:s,retry:n})),r.tsaServerURL&&i.push(new pu.TSAWitness({tsaBaseURL:r.tsaServerURL,timeout:s,retry:n})),new pu.DSSEBundleBuilder({signer:o,witnesses:i}).create(e)}static parseBundle(e){let r=t.parseCertificate(e),s=e.verificationMaterial.tlogEntries,n=s.length>0?s[0].logIndex:void 0;return{payload:(0,c4.bundleToJSON)(e),certificate:r.toString(),tlogID:n}}
Line truncated
|
|
|
|
|
`)){let[u,...p]=c.split(":"),l=u.toLowerCase(),A=p.map(h=>h.trim()).join(":");if(u.length!=0)switch(!0){case l=="name":s=void 0,r.name==null?r.name=A:(i&&n.gcPolicy&&(n.gcPolicy.push(i),i=void 0),n.name&&r.nodes.push(n),n={name:A});break;case l=="driver":s=void 0,r.driver=A;break;case l=="last activity":s=void 0,r.lastActivity=new Date(A);break;case l=="endpoint":s=void 0,n.endpoint=A;break;case l=="driver options":s=void 0,n["driver-opts"]=(A.match(/([a-zA-Z0-9_.]+)="([^"]*)"/g)||[]).map(h=>h.replace(/^(.*)="(.*)"$/g,"$1=$2"));break;case l=="status":s=void 0,n.status=A;break;case l=="buildkit daemon flags":case l=="flags":s=void 0,n["buildkitd-flags"]=A;break;case l=="buildkit version":case l=="buildkit":s=void 0,n.buildkit=A;break;case l=="platforms":{if(s=void 0,!A)break;let h=[];if(A.includes("*"))for(let M of A.split(", "))M.includes("*")&&h.push(M.replace(/\*/g,""));else h=A.split(", ");n.platforms=h.join(",");break}case l=="features":s="features",n.features={};break;case l=="labels":s="label",n.labels={};break;case l=="devices":s="devices",n.devices=n.devices||[];break;case l.startsWith("gc policy rule#"):s="gcpolicy",n.gcPolicy&&i&&(n.gcPolicy.push(i),i=void 0);break;case l.startsWith("file#"):s="file",a=u.split("#")[1],n.files=n.files||{},n.files[a]="";break;default:switch(s&&s!=="devices"&&n.devices&&o&&(n.devices.push(o),o=void 0),s||""){case"features":{n.features=n.features||{},n.features[u.trim()]=!!A;break}case"label":{n.labels=n.labels||{},n.labels[u.trim()]=A;break}case"devices":{switch(l.trim()){case"name":{n.devices&&o&&n.devices.push(o),o={},o.name=A;break}case"on-demand":{o&&A&&(o.onDemand=A=="true");break}case"automatically allowed":{o&&A&&(o.autoAllow=A=="true");break}case"annotations":{o&&(o.annotations=o.annotations||{});break}default:o&&o.annotations&&(o.annotations[u.trim()]=A)}break}case"gcpolicy":{switch(n.gcPolicy=n.gcPolicy||[],i=i||{},l.trim()){case"all":{i.all=A=="true";break}case"filters":{A&&(i.filter=A.split(","));break}case"keep duration":{i.keepDuration=A;break}case"keep bytes":{i.keepBytes=A;break}case"reserved space":{i.reservedSpace=A;break}case"max used space":{i.maxUsedSpace=A;break}case"min free space":{i.minFreeSpace=A;break}}break}case"file":{a&&n.files&&(n.files[a].length>0&&(n.files[a]+=`
|
|
|
|
|
`),n.files[a]+=c.replace(/^\s>\s?/,""));break}}}}return o&&n.devices&&n.devices.push(o),i&&n.gcPolicy&&n.gcPolicy.push(i),n.name&&r.nodes.push(n),r}};var jLe=F(sa(),1);var bx=F(require("fs"),1);var Mx=class{resolveFromString(e){return this.resolve(e,!1)}resolveFromFile(e){return this.resolve(e,!0)}resolve(e,r){if(r){if(!bx.default.existsSync(e))throw new Error(`config file ${e} not found`);e=bx.default.readFileSync(e,{encoding:"utf-8"})}let s=E0.tmpName({tmpdir:E0.tmpDir()});return bx.default.writeFileSync(s,e),s}};var mx=class{buildx;config;constructor(e){this.config=new Mx,this.buildx=e?.buildx||new tt}async getVersion(e){if(!e.buildkit&&e.name)try{return await this.getVersionWithinImage(e.name)}catch(r){Ri(r)}return e.buildkit}async getVersionWithinImage(e){return P(`BuildKit.getVersionWithinImage nodeName: ${e}`),xr.getExecOutput(["inspect","--format","{{.Config.Image}}",`${tt.containerNamePrefix}${e}`],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.exitCode==0&&r.stdout.length>0)return P(`BuildKit.getVersionWithinImage image: ${r.stdout.trim()}`),xr.getExecOutput(["run","--rm",r.stdout.trim(),"--version"],{ignoreReturnCode:!0,silent:!0}).then(s=>{if(s.exitCode==0&&s.stdout.length>0)return`${r.stdout.trim()} => ${s.stdout.trim()}`;if(s.stderr.length>0)throw new Error(r.stderr.trim());return s.stdout.trim()});if(r.stderr.length>0)throw new Error(r.stderr.trim());return r.stdout.trim()})}async versionSatisfies(e,r,s){s||(s=await new Hg({buildx:this.buildx}).inspect(e));for(let n of s.nodes){let i=n.buildkit;if(P(`BuildKit.versionSatisfies ${i}: ${r}`),!i)try{i=await this.getVersionWithinImage(n.name||"")}catch{return P(`BuildKit.versionSatisfies ${n.name}: can't get version`),!1}if(P(`BuildKit.versionSatisfies ${n.name}: version ${i}`),s.driver=="docker"&&!i.endsWith("-moby")||!jLe.satisfies(i.replace(/-moby$/,""),r))return!1}return!0}};var gx=class t{_version;_versionOnce;_standalone;constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}async isStandalone(){let e=this._standalone??!await xr.isAvailable();return P(`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 Le.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(s=>s.stderr.length>0&&s.exitCode!=0?(P(`Compose.isAvailable cmd err: ${s.stderr.trim()}`),!1):s.exitCode==0).catch(s=>(P(`Compose.isAvailable error: ${s}`),!1));return P(`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 Le.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 Le.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 ul=F(require("fs"),1),Au=F(require("os"),1),Xg=F(require("path"),1);var Ox=F(sa(),1),K1e=F(require("util"),1);var zx=class t{standalone;githubToken;constructor(e){this.standalone=e?.standalone,this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN}async download(e,r){let s=await t.getDownloadVersion(e);P(`Install.download version: ${s.version}`);let n=await t.getRelease(s,this.githubToken);P(`Install.download release tag name: ${n.tag_name}`);let i=await this.vspec(n.tag_name);P(`Install.download vspec: ${i}`);let o=Ox.clean(i)||"";if(!Ox.valid(o))throw new Error(`Invalid Compose version "${i}".`);let a=new U1({htcName:s.key!="official"?`compose-dl-bin-${s.key}`:"compose-dl-bin",htcVersion:i,baseCacheDir:Xg.default.join(Au.default.homedir(),".bin","docker-compose"),cacheFile:Au.default.platform()=="win32"?"docker-compose.exe":"docker-compose",ghaNoCache:r}),c=await a.find();if(c)return G(`Compose binary found in ${c}`),c;let u=K1e.format(s.downloadURL,i,this.filename());G(`Downloading ${u}`);let p=await vi(u,void 0,this.githubToken);P(`Install.download htcDownloadPath: ${p}`);let l=await a.save(p);return G(`Cached to ${l}`),l}async installStandalone(e,r){G("Standalone mode"),r=r||E0.tmpDir();let s=Xg.default.join(r,"compose-bin-standalone");ul.default.existsSync(s)||ul.default.mkdirSync(s,{recursive:!0});let n=Au.default.platform()=="win32"?"compose.exe":"compose",i=Xg.default.join(s,n);return ul.default.copyFileSync(e,i),G("Fixing perms"),ul.default.chmodSync(i,"0755"),La(s),G("Added Compose to PATH"),G(`Binary path: ${i}`),i}async installPlugin(e,r){G("Docker plugin mode"),r=r||xr.configDir;let s=Xg.default.join(r,"cli-plugins");ul.default.existsSync(s)||ul.default.mkdirSync(s,{recursive:!0});let n=Au.default.platform()=="win32"?"docker-compose.exe":"docker-compose",i=Xg.default.join(s,n);return ul.defaul
Line truncated
|
|
|
|
|
${p}`),u.errors.some(A=>A.code==="MANIFEST_UNKNOWN"))S(`Cosign verify command failed with MANIFEST_UNKNOWN, retrying attempt ${a+1}/${o}...
|
|
|
|
|
${p}`),await new Promise(A=>setTimeout(A,Math.pow(2,a)*100));else throw i}else throw new Error(`Cosign verify command failed with: ${Dr.getErrorMessage(c.stderr)}`)}throw i}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},o=await this.cosignSigningConfigArgs(n),i=t.getProvenanceBlobs(e);for(let a of Object.keys(i))await ct(`Signing ${a}`,async()=>{let c=i[a],u=ns.default.join(ns.default.dirname(a),`${e.name??"provenance"}.sigstore.json`),p=t.getProvenanceSubjects(c);if(p.length===0){s0(`No subjects found in provenance ${a}, skip signing.`);return}let A=ns.default.join(ns.default.dirname(a),p[0].name),l=["attest-blob","--yes","--oidc-provider","github-actions",...await this.bundleFormatArgs(),"--statement",a,"--type",nfe,"--bundle",u,...o];S(`[command]${this.cosign.binPath} ${[...l,A].join(" ")}`);let b=await Ee.getExecOutput(this.cosign.binPath,["--verbose",...l,A],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),M=Dr.parseCommandOutput(b.stderr.trim());if(b.exitCode!=0)if(M.errors&&M.errors.length>0){let g=M.errors.map(C=>`- [${C.code}] ${C.message} : ${C.detail}`).join(`
|
|
|
|
|
`);throw new Error(`Cosign attest-blob command failed with errors:
|
|
|
|
|
${g}`)}else throw new Error(`Cosign attest-blob command failed with: ${Dr.getErrorMessage(b.stderr)}`);let z=t.parseBundle((0,fd.bundleFromJSON)(JSON.parse(rs.default.readFileSync(u,{encoding:"utf-8"}))));S("Provenance blob signed for:");for(let g of p){let[C,E]=Object.entries(g.digest)[0]||[];S(` - ${g.name} (${C}:${E})`)}z.tlogID&&await this.logTransparencyUpload(z.tlogID,n),S(`Sigstore bundle written to: ${u}`),r[a]={...z,bundlePath:u,subjects:p}})}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[o,i]of Object.entries(e)){let a=ns.default.dirname(o);await ct(`Verifying signature bundle ${i.bundlePath}`,async()=>{for(let c of i.subjects){let u=ns.default.join(a,c.name);S(`Verifying signed artifact ${u}`);let p=["verify-blob-attestation",...await this.bundleFormatArgs(),"--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??nfe];(r.noTransparencyLog||!i.tlogID)&&p.push("--use-signed-timestamps","--insecure-ignore-tlog");let A=await Ee.getExecOutput(this.cosign.binPath,[...p,"--bundle",i.bundlePath,u],{ignoreReturnCode:!0});if(A.stderr.length>0&&A.exitCode!=0)throw new Error(A.stderr);n[u]={bundlePath:i.bundlePath,cosignArgs:p}}})}return n}async verifyArtifact(e,r,n){S("Verifying keyless verification bundle signature");let o=JSON.parse(rs.default.readFileSync(r,"utf-8")),i=(0,fd.bundleFromJSON)(o);S("Fetching Sigstore TUF trusted root metadata");let a=await ife.getTrustedRoot({retry:{retries:5}}),c=(0,Md.toTrustMaterial)(a);try{S("Verifying artifact signature");let u=(0,Md.toSignedEntity)(i,rs.default.readFileSync(e)),p=t.parseCertificate(i),A=i.verificationMaterial.tlogEntries,l=A.length>0?A[0].logIndex:void 0,M=new Md.Verifier(c).verify(u,{subjectAlternativeName:n?.subjectAlternativeName,extensions:n?.issuer?{issuer:n.issuer}:void 0});return N(`Sigstore.verifyArtifact signer: ${JSON.stringify(M)}`),{payload:o,certificate:p.toString(),tlogID:l}}catch(u){throw new Error(`Failed to verify artifact signature: ${u}`)}}static noTransparencyLog(e){return e??A0.context.payload.repository?.private??!1}async cosignSigningConfigArgs(e){let r=[],n=t.noTransparencyLog(e.noTransparencyLog);if(S(`Upload to transparency log: ${n?"disabled":"enabled"}`),await this.cosign.versionSatisfies(">=3.0.4")){let o=await this.useRekorV2(e);await ct("Creating Sigstore protobuf signing config",async()=>{let i=u0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:u0.tmpDir()}),a=["signing-config","create",o?"--with-default-rekor-v2=true":"--with-default-services=true",`--out=${i}`];n&&a.push("--no-default-rekor=true"),await Ee.exec(this.cosign.binPath,a,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),S(JSON.stringify(JSON.parse(rs.default.readFileSync(i,{encoding:"utf-8"})),null,2)),r.push(`--signing-config=${i}`)})}else r.push("--use-signing-config"),n&&r.push("--tlog-upload=false");return r}async logTransparencyUpload(e,r){if(await this.useRekorV2(r)){S(`Attestation signature uploaded to Rekor v2 transparency log with index ${e}`);return}S(`Attestation signature uploaded to Rekor transparency log: ${bd}?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=ns.default.join(e.localExportDir,"provenance.json");if(rs.default.existsSync(r))return{[r]:rs.default.readFileSync(r)};let n=rs.default.readdirSync(e.localExportDir,{withFileTypes:!0}),o=n.filter(i=>i.isDirectory());if(o.length>0&&o.length===n.length&&o.every(i=>rs.default.existsSync(ns.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let a of o){let c=ns.default.join(e.localExportDir,a.name,"provenance.json");i[c]=rs.default.readFileSync(c)}return i}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,o=n.length>0?n[0].logIndex:void 0;return{payload:(0,fd.bundleToJSON)(e),certificate:r.toString(),tlogID:o}}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 ofe.X509Certificate(r)}async bundleFormatArgs(){return await this.cosign.versionSatisfies(">=3.1.1")?[]:["--new-bundle-format"]}};var yD=class t{static{s(this,"Install")}standalone;githubToken;sigstore;constructor(e){this.standalone=e?.standalone,this.githubToke
Line truncated
|
|
|
|
|
`)){let[p,...A]=u.split(":"),l=p.toLowerCase(),b=A.map(M=>M.trim()).join(":");if(p.length!=0)switch(!0){case l=="name":n=void 0,r.name==null?r.name=b:(i&&o.gcPolicy&&(o.gcPolicy.push(i),i=void 0),o.name&&r.nodes.push(o),o={name:b});break;case l=="driver":n=void 0,r.driver=b;break;case l=="last activity":n=void 0,r.lastActivity=new Date(b);break;case l=="endpoint":n=void 0,o.endpoint=b;break;case l=="driver options":n=void 0,o["driver-opts"]=(b.match(/([a-zA-Z0-9_.]+)="([^"]*)"/g)||[]).map(M=>M.replace(/^(.*)="(.*)"$/g,"$1=$2"));break;case l=="status":n=void 0,o.status=b;break;case l=="buildkit daemon flags":case l=="flags":n=void 0,o["buildkitd-flags"]=b;break;case l=="buildkit version":case l=="buildkit":n=void 0,o.buildkit=b;break;case l=="platforms":{if(n=void 0,!b)break;let M=[];if(b.includes("*"))for(let z of b.split(", "))z.includes("*")&&M.push(z.replace(/\*/g,""));else M=b.split(", ");o.platforms=M.join(",");break}case l=="features":n="features",o.features={};break;case l=="labels":n="label",o.labels={};break;case l=="devices":n="devices",o.devices=o.devices||[];break;case l.startsWith("gc policy rule#"):n="gcpolicy",o.gcPolicy&&i&&(o.gcPolicy.push(i),i=void 0);break;case l.startsWith("file#"):n="file",c=p.split("#")[1],o.files=o.files||{},o.files[c]="";break;default:switch(n&&n!=="devices"&&o.devices&&a&&(o.devices.push(a),a=void 0),n||""){case"features":{o.features=o.features||{},o.features[p.trim()]=!!b;break}case"label":{o.labels=o.labels||{},o.labels[p.trim()]=b;break}case"devices":{switch(l.trim()){case"name":{o.devices&&a&&o.devices.push(a),a={},a.name=b;break}case"on-demand":{a&&b&&(a.onDemand=b=="true");break}case"automatically allowed":{a&&b&&(a.autoAllow=b=="true");break}case"annotations":{a&&(a.annotations=a.annotations||{});break}default:a&&a.annotations&&(a.annotations[p.trim()]=b)}break}case"gcpolicy":{switch(o.gcPolicy=o.gcPolicy||[],i=i||{},l.trim()){case"all":{i.all=b=="true";break}case"filters":{b&&(i.filter=b.split(","));break}case"keep duration":{i.keepDuration=b;break}case"keep bytes":{i.keepBytes=b;break}case"reserved space":{i.reservedSpace=b;break}case"max used space":{i.maxUsedSpace=b;break}case"min free space":{i.minFreeSpace=b;break}}break}case"file":{c&&o.files&&(o.files[c].length>0&&(o.files[c]+=`
|
|
|
|
|
`),o.files[c]+=u.replace(/^\s>\s?/,""));break}}}}return a&&o.devices&&o.devices.push(a),i&&o.gcPolicy&&o.gcPolicy.push(i),o.name&&r.nodes.push(o),r}};var sfe=w(Un(),1);var BD=w(require("fs"),1);var DD=class{static{s(this,"Config")}resolveFromString(e){return this.resolve(e,!1)}resolveFromFile(e){return this.resolve(e,!0)}resolve(e,r){if(r){if(!BD.default.existsSync(e))throw new Error(`config file ${e} not found`);e=BD.default.readFileSync(e,{encoding:"utf-8"})}let n=u0.tmpName({tmpdir:u0.tmpDir()});return BD.default.writeFileSync(n,e),n}};var qD=class{static{s(this,"BuildKit")}buildx;config;constructor(e){this.config=new DD,this.buildx=e?.buildx||new O0}async getVersion(e){if(!e.buildkit&&e.name)try{return await this.getVersionWithinImage(e.name)}catch(r){s0(r)}return e.buildkit}async getVersionWithinImage(e){return N(`BuildKit.getVersionWithinImage nodeName: ${e}`),Bt.getExecOutput(["inspect","--format","{{.Config.Image}}",`${O0.containerNamePrefix}${e}`],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.exitCode==0&&r.stdout.length>0)return N(`BuildKit.getVersionWithinImage image: ${r.stdout.trim()}`),Bt.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 hd({buildx:this.buildx}).inspect(e));for(let o of n.nodes){let i=o.buildkit;if(N(`BuildKit.versionSatisfies ${i}: ${r}`),!i)try{i=await this.getVersionWithinImage(o.name||"")}catch{return N(`BuildKit.versionSatisfies ${o.name}: can't get version`),!1}if(N(`BuildKit.versionSatisfies ${o.name}: version ${i}`),n.driver=="docker"&&!i.endsWith("-moby")||!sfe.satisfies(i.replace(/-moby$/,""),r))return!1}return!0}};var ID=class t{static{s(this,"Compose")}_version;_versionOnce;_standalone;constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}async isStandalone(){let e=this._standalone??!await Bt.isAvailable();return N(`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 Ee.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(n=>n.stderr.length>0&&n.exitCode!=0?(N(`Compose.isAvailable cmd err: ${n.stderr.trim()}`),!1):n.exitCode==0).catch(n=>(N(`Compose.isAvailable error: ${n}`),!1));return N(`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 Ee.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 Ee.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 za=w(require("fs"),1),is=w(require("os"),1),zd=w(require("path"),1);var ND=w(Un(),1),xP=w(require("util"),1);var RD=class t{static{s(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);N(`Install.download version: ${n.version}`);let o=await t.getRelease(n,this.githubToken);N(`Install.download release tag name: ${o.tag_name}`);let i=await this.vspec(o.tag_name);N(`Install.download vspec: ${i}`);let a=ND.clean(i)||"";if(!ND.valid(a))throw new Error(`Invalid Compose version "${i}".`);let c=new nt({htcName:n.key!="official"?`compose-dl-bin-${n.key}`:"compose-dl-bin",htcVersion:i,baseCacheDir:zd.default.join(is.default.homedir(),".bin","docker-compose"),cacheFile:is.default.platform()=="win32"?"docker-compose.exe":"docker-compose",ghaNoCache:r}),u=await c.find();if(u)return S(`Compose binary found in ${u}`),u;let p=xP.format(n.downloadURL,i,this.filename());S(`Downloading ${p}`);let A=await Cn(p,void 0,this.githubToken);N(`Install.download htcDownloadPath: ${A}`);let l=await c.save(A);return S(`Cached to ${l}`),l}async installStandalone(e,r){S("Standalone mode"),r=r||u0.tmpDir();let n=zd.default.join(r,"compose-bin-standalone");za.default.existsSync(n)||za.default.mkdirSync(n,{recursive:!0});let o=is.default.platform()=="win32"?"compose.exe":"compose",i=zd.default.join(n,o);return za.default.copyFileSync(e,i),S("Fixing perms"),za.default.chmodSync(i,"0755"),ri(n),S("Added Compose to PATH"),S(`Binary path: ${i}`),i}async installPlugin(e,r){S("Docker plugin mode"),r=r||Bt.configDir;let n=zd.default.join(r,"cli-plugins");za.default.existsSync(n)||za.default.mkdirSync(n,{recursive:!0});let o=is.default
Line truncated
|
|
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
|
|
|
|
|
ARG GO_VERSION="1.24"
|
|
|
|
@@ -234,10 +208,13 @@ EOT
|
|
|
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
|
COPY --from=builder /out /
|
|
|
|
|
`;var Ex=class t{githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||new tt,this.sigstore=e?.sigstore||new pd}async download(e){let r=await t.getDownloadVersion(e.version);P(`Install.download version: ${r.version}`);let s=await t.getRelease(r,this.githubToken);P(`Install.download release tag name: ${s.tag_name}`);let n=await this.vspec(s.tag_name);P(`Install.download vspec: ${n}`);let i=jg.clean(n)||"";if(!jg.valid(i))throw new Error(`Invalid Cosign version "${n}".`);let o=new U1({htcName:"cosign-dl-bin",htcVersion:n,baseCacheDir:Vg.default.join(Ma.default.homedir(),".bin"),cacheFile:Ma.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),a=await o.find();if(a)return G(`Cosign binary found in ${a}`),a;let c=Z1e.format(r.downloadURL,n,this.filename());G(`Downloading ${c}`);let u=await vi(c,void 0,this.githubToken);P(`Install.download htcDownloadPath: ${u}`),e.verifySignature&&jg.satisfies(n,">=3.0.1")&&await this.verifySignature(u,c);let p=await o.save(u,e.skipState);return G(`Cached to ${p}`),p}async build(e,r,s){let n=await this.vspec(e);P(`Install.build vspec: ${n}`);let i=new U1({htcName:"cosign-build-bin",htcVersion:n,baseCacheDir:Vg.default.join(Ma.default.homedir(),".bin"),cacheFile:Ma.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),o=await i.find();if(o)return G(`Cosign binary found in ${o}`),o;let a=Vg.default.join(E0.tmpDir(),"cosign-build-cache"),c=await this.buildCommand(e,a),u=await Le.getExecOutput(c.command,c.args,{ignoreReturnCode:!0,input:Buffer.from($Le)}).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)throw new Error(`build failed with: ${l.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return`${a}/cosign`}),p=await i.save(u,s);return G(`Cached to ${p}`),p}async install(e,r){r=r||E0.tmpDir();let s=Vg.default.join(r,"cosign-bin");u4.default.existsSync(s)||u4.default.mkdirSync(s,{recursive:!0});let n=Ma.default.platform()=="win32"?"cosign.exe":"cosign",i=Vg.default.join(s,n);return u4.default.copyFileSync(e,i),G("Fixing perms"),u4.default.chmodSync(i,"0755"),La(s),G("Added Cosign to PATH"),G(`Binary path: ${i}`),i}async buildCommand(e,r){let s=await new tt({standalone:!0}).isAvailable(),n=await new tt({standalone:!1}).isAvailable(),i=!1;if(await this.buildx.isStandalone()&&s)P("Install.buildCommand: Buildx standalone found, build with it"),i=!0;else if(!await this.buildx.isStandalone()&&n)P("Install.buildCommand: Buildx plugin found, build with it"),i=!1;else if(s)P("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),i=!0;else if(n)P("Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it"),i=!1;else throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${e}`);let o=["build","--platform","local","--build-arg","BUILDKIT_CONTEXT_KEEP_GIT_DIR=1","--output",`type=local,dest=${r}`];return process.env.GIT_AUTH_TOKEN&&o.push("--secret","id=GIT_AUTH_TOKEN"),o.push("-f-",e),await new tt({standalone:i}).getCommand(o)}async verifySignature(e,r){let s=`${r}.sigstore.json`;G(`Downloading keyless verification bundle at ${s}`);let n=await vi(s,void 0,this.githubToken);P(`Install.verifySignature bundlePath: ${n}`);let i=await this.sigstore.verifyArtifact(e,n,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});G(`Cosign binary signature verified! ${i.tlogID?`${rh}?logIndex=${i.tlogID}`:""}`)}filename(){let e;switch(Ma.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=Ma.default.arch();break}}let r=Ma.default.platform()=="win32"?"windows":Ma.default.platform(),s=Ma.default.platform()=="win32"?".exe":"";return Z1e.format("cosign-%s-%s%s",r,e,s)}async vspec(e){if(!q0.isValidRef(e)){let u=e.replace(/^v+|v+$/g,"");return G(`Use ${u} version spec cache key for ${e}`),u}let[r,s]=e.split("#");s.length==0&&(s="master");let n;s.match(/^[0-9a-fA-F]{40}$/)?n=s:n=await hp.remoteSha(r,s,process.env.GIT_AUTH_TOKEN);let[i,o]=r.substring(19).split("/"),a=`${i}/${q0.trimSuffix(o,".git")}/${n}`,c=q0.hash(a);return G(`Use ${c} version spec cache key for ${a}`),c}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 n=await new D0({token:r}).releases("Cosign",e.contentOpts);if(!n[e.version])throw new Error(`Cannot find Cosign release ${e.version} in releases JSON`);return n[e.version]}};var YLe=F(sa(),1);var yx=class{binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"regctl",this._version="",this._versionOnce=!1}async blobGet(e){return await Le.getExecOutput(this.binPath,["blob","get",e.repository,e.digest],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitC
Line truncated
|
|
|
|
|
`,sepLabels:Zd("sep-labels",{trimWhitespace:!1})||`
|
|
|
|
|
`,sepAnnotations:Zd("sep-annotations",{trimWhitespace:!1})||`
|
|
|
|
|
`,bakeTarget:Zd("bake-target")||"docker-metadata-action",githubToken:Zd("github-token")}}async function ZLe(t,e){switch(t){case"workflow":return await WZ0(e);case"git":return await _Z0();default:throw new Error(`Invalid context source: ${t}`)}}async function WZ0(t){let e=D0.context;return/pull_request_target/.test(e.eventName)&&(e.ref=`refs/pull/${e.payload.number}/merge`),/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA||"")&&(/pull_request/.test(e.eventName)||/pull_request_target/.test(e.eventName))&&e.payload?.pull_request?.head?.sha!=null&&(e.sha=e.payload.pull_request.head.sha),{commitDate:await LZ0(e.sha,t),...e}}async function _Z0(){let t=await hp.context();return{commitDate:await hp.commitDate(t.sha),...t}}async function LZ0(t,e){let r=D0.context.payload;if(r.commits){let s=r.commits.find(n=>n.id===t)?.timestamp;if(s)return new Date(s)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let s=await e.github.octokit.rest.repos.getCommit({owner:D0.context.repo.owner,repo:D0.context.repo.repo,ref:t});if(s.data.commit.committer?.date)return new Date(s.data.commit.committer.date);throw new Error("Committer date not found")}catch(s){return _(`Failed to get commit date from GitHub API: ${s.message}`),new Date}}var ml=F(Zj(),1),FYe=F(require("fs"),1),TYe=F(require("path"),1),AB=F(i8e(),1),mi=F(Pje(),1),dz=F(RYe(),1);function SYe(t){let e=[];if(t.length==1){let r=!1,s=O1(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let i=n.toString().split("=").map(o=>o.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return wYe(e)}e=[];for(let r of t){let s={name:"",enable:!0},n=O1(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of n){let o=i.toString().split("=").map(a=>a.trim());if(o.length==1)s.name=o[0];else{let a=o[0].toLowerCase(),c=o[1];switch(a){case"name":{s.name=c;break}case"enable":{if(!["true","false"].includes(c))throw new Error(`Invalid enable attribute value: ${r}`);s.enable=/true/i.test(c);break}default:throw new Error(`Unknown image attribute: ${r}`)}}}if(s.name.length==0)throw new Error(`Image name attribute empty: ${r}`);e.push(s)}return wYe(e)}function wYe(t){e2("Processing images input");for(let e of t)ve(`name=${e.name},enable=${e.enable}`);return t2(),t}var kne=(c=>(c.Schedule="schedule",c.Semver="semver",c.Pep440="pep440",c.Match="match",c.Edge="edge",c.Ref="ref",c.Raw="raw",c.Sha="sha",c))(kne||{}),FW=(s=>(s.Branch="branch",s.Tag="tag",s.PR="pr",s))(FW||{}),TW=(r=>(r.Short="short",r.Long="long",r))(TW||{}),Qne=class{type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},D2t={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function NYe(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let s of t)e.push(q2t(s));let r=e.sort((s,n)=>Number(s.attrs.priority)<Number(n.attrs.priority)?1:Number(s.attrs.priority)>Number(n.attrs.priority)?-1:0);e2("Processing tags input");for(let s of r)ve(s.toString());return t2(),r}function q2t(t){let e=O1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new Qne;for(let s of e){let n=s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim());if(n.length==1)r.attrs.value=n[0];else{let i=n[0].toLowerCase(),o=n[1];switch(i){case"type":{if(!Object.values(kne).includes(o))throw new Error(`Unknown tag type attribute: ${o}`);r.type=o;break}default:{r.attrs[i]=o;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing pattern attribute for ${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value=""),Object.prototype.hasOwnProperty.call(r.attrs,"match")||(r.attrs.match="");break}case"match":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing pattern attribute for ${t}`);if(Object.prototype.hasOwnProperty.call(r.attrs,"group")||(r.attrs.group="0"),isNaN(+r.attrs.group))throw new Error(`Invalid match group for ${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value="");break}case"edge":{Object.prototype.hasOwnProperty.call(r.attrs,"branch")||(r.attrs.branch="");break}case"ref":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"event"))throw new Error(`Missing event attribute for ${t}`);if(!Object.keys(FW).map(s=>FW[s]).includes(r.attrs.event))throw new Error(`Invalid event for ${t}`);r.attrs.event=="pr"&&!Object.prototype.hasOwnProperty.call(r.attrs,"prefix")&&(r.attrs.prefix="pr-");break}case"raw":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"value"))throw new Error(`Missing value attribute for ${t}`);break}case"sha":{if(Object.prototype.hasOwnProperty.call(r.attrs,"prefix")||(r.attrs.prefix="sha-"),O
Line truncated
|
|
|
|
|
`;var wD=class t{static{s(this,"Install")}githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||new O0,this.sigstore=e?.sigstore||new kc}async download(e){let r=await t.getDownloadVersion(e.version);N(`Install.download version: ${r.version}`);let n=await t.getRelease(r,this.githubToken);N(`Install.download release tag name: ${n.tag_name}`);let o=await this.vspec(n.tag_name);N(`Install.download vspec: ${o}`);let i=Od.clean(o)||"";if(!Od.valid(i))throw new Error(`Invalid Cosign version "${o}".`);let a=new nt({htcName:"cosign-dl-bin",htcVersion:o,baseCacheDir:gd.default.join(Wo.default.homedir(),".bin"),cacheFile:Wo.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),c=await a.find();if(c)return S(`Cosign binary found in ${c}`),c;let u=TP.format(r.downloadURL,o,this.filename());S(`Downloading ${u}`);let p=await Cn(u,void 0,this.githubToken);N(`Install.download htcDownloadPath: ${p}`),e.verifySignature&&Od.satisfies(o,">=3.0.1")&&await this.verifySignature(p,u);let A=await a.save(p,e.skipState);return S(`Cached to ${A}`),A}async build(e,r,n){let o=await this.vspec(e);N(`Install.build vspec: ${o}`);let i=new nt({htcName:"cosign-build-bin",htcVersion:o,baseCacheDir:gd.default.join(Wo.default.homedir(),".bin"),cacheFile:Wo.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),a=await i.find();if(a)return S(`Cosign binary found in ${a}`),a;let c=gd.default.join(u0.tmpDir(),"cosign-build-cache"),u=await this.buildCommand(e,c),p=await Ee.getExecOutput(u.command,u.args,{ignoreReturnCode:!0,input:Buffer.from(afe)}).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)throw new Error(`build failed with: ${O0.getErrorMessage(l.stderr)}`);return`${c}/cosign`}),A=await i.save(p,n);return S(`Cached to ${A}`),A}async install(e,r){r=r||u0.tmpDir();let n=gd.default.join(r,"cosign-bin");Km.default.existsSync(n)||Km.default.mkdirSync(n,{recursive:!0});let o=Wo.default.platform()=="win32"?"cosign.exe":"cosign",i=gd.default.join(n,o);return Km.default.copyFileSync(e,i),S("Fixing perms"),Km.default.chmodSync(i,"0755"),ri(n),S("Added Cosign to PATH"),S(`Binary path: ${i}`),i}async buildCommand(e,r){let n=await new O0({standalone:!0}).isAvailable(),o=await new O0({standalone:!1}).isAvailable(),i=!1;if(await this.buildx.isStandalone()&&n)N("Install.buildCommand: Buildx standalone found, build with it"),i=!0;else if(!await this.buildx.isStandalone()&&o)N("Install.buildCommand: Buildx plugin found, build with it"),i=!1;else if(n)N("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),i=!0;else if(o)N("Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it"),i=!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 O0({standalone:i}).getCommand(a)}async verifySignature(e,r){let n=`${r}.sigstore.json`;S(`Downloading keyless verification bundle at ${n}`);let o=await Cn(n,void 0,this.githubToken);N(`Install.verifySignature bundlePath: ${o}`);let i=await this.sigstore.verifyArtifact(e,o,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});S(`Cosign binary signature verified! ${i.tlogID?`${bd}?logIndex=${i.tlogID}`:""}`)}filename(){let e;switch(Wo.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=Wo.default.arch();break}}let r=Wo.default.platform()=="win32"?"windows":Wo.default.platform(),n=Wo.default.platform()=="win32"?".exe":"";return TP.format("cosign-%s-%s%s",r,e,n)}async vspec(e){if(!l0.isValidRef(e)){let p=e.replace(/^v+|v+$/g,"");return S(`Use ${p} version spec cache key for ${e}`),p}let[r,n]=e.split("#");n.length==0&&(n="master");let o;n.match(/^[0-9a-fA-F]{40}$/)?o=n:o=await Aa.remoteSha(r,n,process.env.GIT_AUTH_TOKEN);let[i,a]=r.substring(19).split("/"),c=`${i}/${l0.trimSuffix(a,".git")}/${o}`,u=l0.hash(c);return S(`Use ${u} version spec cache key for ${c}`),u}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 o=await new A0({token:r}).releases("Cosign",e.contentOpts);if(!o[e.version])throw new Error(`Cannot find Cosign release ${e.version} in releases JSON`);return o[e.version]}};var cfe=w(Un(),1);var SD=class{static{s(this,"Regctl")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"regctl",this._version="",this._versionOnce=!1}async blobGet(e){return await Ee.getExecOutput(this.binPath,["blob","get",e.repository,e.digest],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stder
Line truncated
|
|
|
|
|
`,sepLabels:Ur("sep-labels",{trimWhitespace:!1})||`
|
|
|
|
|
`,sepAnnotations:Ur("sep-annotations",{trimWhitespace:!1})||`
|
|
|
|
|
`,bakeTarget:Ur("bake-target")||"docker-metadata-action",githubToken:Ur("github-token")}}s(Afe,"getInputs");async function lfe(t,e){if(t.startsWith("git:"))return await pfe(t.slice(4));switch(t){case"workflow":return await Id0(e);case"git":return await pfe();default:throw new Error(`Invalid context source: ${t}`)}}s(lfe,"getContext");async function Id0(t){let e=A0.context;return/pull_request_target/.test(e.eventName)&&(e.ref=`refs/pull/${e.payload.number}/merge`),/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA||"")&&(/pull_request/.test(e.eventName)||/pull_request_target/.test(e.eventName))&&e.payload?.pull_request?.head?.sha!=null&&(e.sha=e.payload.pull_request.head.sha),{commitDate:await Rd0(e.sha,t),...e}}s(Id0,"getContextFromWorkflow");async function pfe(t){let e=await Aa.context(t);return{commitDate:await Aa.commitDate(e.sha,t),...e}}s(pfe,"getContextFromGit");async function Rd0(t,e){let r=A0.context.payload;if(r.commits){let n=r.commits.find(o=>o.id===t)?.timestamp;if(n)return new Date(n)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let n=await e.github.octokit.rest.repos.getCommit({owner:A0.context.repo.owner,repo:A0.context.repo.repo,ref:t});if(n.data.commit.committer?.date)return new Date(n.data.commit.committer.date);throw new Error("Committer date not found")}catch(n){return N(`Failed to get commit date from GitHub API: ${n.message}`),new Date}}s(Rd0,"getCommitDateFromWorkflow");var Ia=w(eQ(),1),cBe=w(require("fs"),1),uBe=w(require("path"),1),Yh=w(hfe(),1),An=w(Z4e(),1),Pd=w(Un(),1);var Ye=class t extends Error{static{s(this,"CsvError")}constructor(e,r,n,...o){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let i of o)for(let a in i){let c=i[a];this[a]=Buffer.isBuffer(c)?c.toString(n.encoding):c==null?c:JSON.parse(JSON.stringify(c))}}};var Jh=s(function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},"is_object");var wq=s(function(t){let e=[];for(let r=0,n=t.length;r<n;r++){let o=t[r];if(o==null||o===!1)e[r]={disabled:!0};else if(typeof o=="string"||typeof o=="number")e[r]={name:`${o}`};else if(Jh(o)){if(typeof o.name!="string")throw new Ye("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${r}`,"when column is an object literal"]);e[r]=o}else throw new Ye("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(o)} at position ${r}`])}return e},"normalize_columns_array");var iU=class{static{s(this,"ResizeableBuffer")}constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let r=this.length+e.length;if(r>=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},sU=iU;var eBe=s(function(t){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((n,o)=>{let i=Buffer.from(String.fromCharCode(o),t.encoding);return o!==63&&i.length===1&&i[0]===63||n.push(i),n},[]),r=new Uint8Array(256);for(let n of e)r[n[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new sU(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter?t.delimiter.map(n=>n.length):[],t.delimiter_auto?1:0,t.quote!==null?t.quote.length:0,...e.map(n=>n.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new sU(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:t.record_delimiter.length===0?0:Math.max(...t.record_delimiter.map(n=>n.length)),trimChars:[Buffer.from(" ",t.encoding)[0],Buffer.from(" ",t.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:r}},"init_state");var tBe=s(function(t){return t.replace(/([A-Z])/g,function(e,r){return"_"+r.toLowerCase()})},"underscore");var _d=s(function(t){let e={};for(let n in t)e[tBe(n)]=t[n];if(e.encoding===void 0||e.encodi
Line truncated
|
|
|
|
|
`,a).length:l,p?(c===null?0:c.length)+u.length:0,p?u.length+l:0);return b<M},"__needMoreData"),parse:s(function(n,o,i,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:A,from_line:l,ltrim:b,max_record_size:M,raw:z,relax_quotes:g,rtrim:C,skip_empty_lines:E,to:B,to_line:D}=this.options,{comment:q,escape:x,quote:W,record_delimiter:_}=this.options,{bomSkipped:ae,delimiterDiscovered:Se,delimiterBufPrevious:xe,rawBuffer:Ne,escapeIsQuote:Ce}=this.state;if(!Se&&p){let j;if(xe===void 0?j=n:xe!==void 0&&n===void 0?j=xe:j=Buffer.concat([xe,n]),n=void 0,o||j.length>p.size)this.options.delimiter=[Buffer.from(rBe(j,this.options.delimiter_auto))],this.state.previousBuf=j,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=j;return}}let{previousBuf:we}=this.state,k;if(we===void 0)if(n===void 0){a();return}else k=n;else we!==void 0&&n===void 0?k=we:k=Buffer.concat([we,n]);if(ae===!1)if(c===!1)this.state.bomSkipped=!0;else if(k.length<3){if(o===!1){this.state.previousBuf=k;return}}else{for(let j in Qd)if(Qd[j].compare(k,0,Qd[j].length)===0){let $e=Qd[j].length;this.state.bufBytesStart+=$e,k=k.slice($e);let m1=_d({...this.original_options,encoding:j});for(let ze in m1)this.options[ze]=m1[ze];({comment:q,escape:x,quote:W}=this.options);break}this.state.bomSkipped=!0}let Te=k.length,T;for(T=0;T<Te&&!this.__needMoreData(T,Te,o);T++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),D!==-1&&this.info.lines>D){this.state.stop=!0,a();return}this.state.quoting===!1&&_.length===0&&this.__autoDiscoverRecordDelimiter(k,T)&&(_=this.options.record_delimiter);let j=k[T];if(z===!0&&Ne.append(j),(j===zB0||j===gB0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(x!==null&&this.state.quoting===!0&&this.__isEscape(k,T,j)&&T+x.length<Te)if(Ce){if(this.__isQuote(k,T+x.length)){this.state.escaping=!0,T+=x.length-1;continue}}else{this.state.escaping=!0,T+=x.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(k,T))if(this.state.quoting===!0){let ze=k[T+W.length],I0=C&&this.__isCharTrimable(k,T+W.length),je=q!==null&&this.__compareBytes(q,k,T+W.length,ze),X=this.__isDelimiter(k,T+W.length,ze),Rt=_.length===0?this.__autoDiscoverRecordDelimiter(k,T+W.length):this.__isRecordDelimiter(ze,k,T+W.length);if(x!==null&&this.__isEscape(k,T,j)&&this.__isQuote(k,T+x.length))T+=x.length-1;else if(!ze||X||Rt||je||I0){this.state.quoting=!1,this.state.wasQuoting=!0,T+=W.length-1;continue}else if(g===!1){let Nt=this.__error(new Ye("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(ze)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Nt!==void 0)return Nt}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(W),T+=W.length-1}else if(this.state.field.length!==0){if(g===!1){let ze=this.__infoField(),I0=Object.keys(Qd).map(X=>Qd[X].equals(this.state.field.toString())?X:!1).filter(Boolean)[0],je=this.__error(new Ye("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(ze.column)} at line ${ze.lines}, value is ${JSON.stringify(this.state.field.toString(A))}`,I0?`(${I0} bom)`:void 0],this.options,ze,{field:this.state.field}));if(je!==void 0)return je}}else{this.state.quoting=!0,T+=W.length-1;continue}if(this.state.quoting===!1){let ze=this.__isRecordDelimiter(j,k,T);if(ze!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),T+=ze-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,T+=ze-1;continue}this.info.bytes=this.state.bufBytesStart+T;let X=this.__onField();if(X!==void 0)return X;this.info.bytes=this.state.bufBytesStart+T+ze;let Rt=this.__onRecord(i);if(Rt!==void 0)return Rt;if(B!==-1&&this.info.records>=B){this.state.stop=!0,a();return}}this.state.commenting=!1,T+=ze-1;continue}if(this.state.commenting)continue;if(q!==null&&(u===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(q,k,T,j)!==0){this.state.commenting=!0;continue}let I0=this.__isDelimiter(k,T,j);if(I0!==0){this.info.bytes=this.state.bufBytesStart+T;let je=this.__onField();if(je!==void 0)return je;T+=I0-1;continue}}}if(this.state.commenting===!1&&M!==0&&this.state.record_length+this.state.field.length>M)return this.__error(new Ye("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${M}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let $e=b===!1||this.state.quoting===!0||this.state.field.length!==0||!thi
Line truncated
|
|
|
|
|
`,i),Buffer.from(`
|
|
|
|
|
`,i),Buffer.from("\r",i)];e:for(let c=0;c<a.length;c++){let u=a[c].length;for(let p=0;p<u;p++)if(a[c][p]!==n[o+p])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:s(function(n){let{encoding:o,raw:i,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,i?this.state.rawBuffer.toString(o):void 0)}catch(u){return u}return}else return c},"__error"),__infoDataSet:s(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:s(function(){let{columns:n,raw:o,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:o?this.state.rawBuffer.toString(i):void 0}},"__infoRecord"),__infoField:s(function(){let{columns:n}=this.options,o=Array.isArray(n),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:o===!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 iA=s(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=Sq(e),o=s(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),i=s(()=>{},"close"),a=n.parse(t,!0,o,i);if(a!==void 0)throw a;return r},"parse");function iBe(t){let e=[];if(t.length==1){let r=!1,n=iA(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let i=o.toString().split("=").map(a=>a.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return oBe(e)}e=[];for(let r of t){let n={name:"",enable:!0},o=iA(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of o){let a=i.toString().split("=").map(c=>c.trim());if(a.length==1)n.name=a[0];else{let c=a[0].toLowerCase(),u=a[1];switch(c){case"name":{n.name=u;break}case"enable":{if(!["true","false"].includes(u))throw new Error(`Invalid enable attribute value: ${r}`);n.enable=/true/i.test(u);break}default:throw new Error(`Unknown image attribute: ${r}`)}}}if(n.name.length==0)throw new Error(`Image name attribute empty: ${r}`);e.push(n)}return oBe(e)}s(iBe,"Transform");function oBe(t){Ru("Processing images input");for(let e of t)S(`name=${e.name},enable=${e.enable}`);return Nu(),t}s(oBe,"output");var cU=(u=>(u.Schedule="schedule",u.Semver="semver",u.Pep440="pep440",u.Match="match",u.Edge="edge",u.Ref="ref",u.Raw="raw",u.Sha="sha",u))(cU||{}),Fq=(n=>(n.Branch="branch",n.Tag="tag",n.PR="pr",n))(Fq||{}),Wq=(r=>(r.Short="short",r.Long="long",r))(Wq||{}),aU=class{static{s(this,"Tag")}type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},EB0={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function sBe(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let n of t)e.push(CB0(n));let r=e.sort((n,o)=>Number(n.attrs.priority)<Number(o.attrs.priority)?1:Number(n.attrs.priority)>Number(o.attrs.priority)?-1:0);Ru("Processing tags input");for(let n of r)S(n.toString());return Nu(),r}s(sBe,"Transform");function CB0(t){let e=iA(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new aU;for(let n of e){let o=n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim());if(o.length==1)r.attrs.value=o[0];else{let i=o[0].toLowerCase(),a=o[1];switch(i){case"type":{if(!Object.values(cU).includes(a))throw new Error(`Unknown tag type attribute: ${a}`);r.type=a;break}default:{r.attrs[i]=a;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing pattern attribute for ${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value=""),Object.prototype.hasOwnProperty.call(r.attrs,"match")||(r.attrs.match="");break}case"match":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing pattern attribute for ${t}`);if(Object.prototype.hasOwnProperty.call(r.attrs,"group")||(r.attrs.group="0"),isNaN(+r.attrs.group))throw new Error(`Invalid match group for ${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value="");break}case"edge":{Object.prototype.hasOwnProperty.call(r.attrs,"branch")||(r.attrs.branch="");break}case"ref":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"event"))throw new Error(`Missing event attribute for ${t}`);if(!Object.keys(Fq).map(n=>Fq[n]).includes(r.attrs.event))throw new Error(`Invalid event for ${t}`);r.attrs.event=="pr"&&!Object.prototype.hasOwnProperty.call(r.attrs,"prefix")&&(r.attrs.prefix="pr-");break}case"
Line truncated
|
|
|
|
|
/*! Bundled license information:
|
|
|
|
|
|
|
|
|
|
undici/lib/web/fetch/body.js:
|
|
|
|
@@ -255,44 +232,6 @@ tmp/lib/tmp.js:
|
|
|
|
|
* MIT Licensed
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
negotiator/index.js:
|
|
|
|
|
(*!
|
|
|
|
|
* negotiator
|
|
|
|
|
* Copyright(c) 2012 Federico Romero
|
|
|
|
|
* Copyright(c) 2012-2014 Isaac Z. Schlueter
|
|
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
|
|
* MIT Licensed
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
imurmurhash/imurmurhash.js:
|
|
|
|
|
(**
|
|
|
|
|
* @preserve
|
|
|
|
|
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
|
|
|
*
|
|
|
|
|
* @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
|
|
|
|
|
* @see http://github.com/homebrewing/brauhaus-diff
|
|
|
|
|
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
|
|
|
|
* @see http://github.com/garycourt/murmurhash-js
|
|
|
|
|
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
|
|
|
* @see http://sites.google.com/site/murmurhash/
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
make-fetch-happen/lib/fetch.js:
|
|
|
|
|
make-fetch-happen/lib/fetch.js:
|
|
|
|
|
(**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright (c) 2010-2012 Mikeal Rogers
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
|
* software distributed under the License is distributed on an "AS
|
|
|
|
|
* IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
|
|
|
* express or implied. See the License for the specific language
|
|
|
|
|
* governing permissions and limitations under the License.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
moment/moment.js:
|
|
|
|
|
(*! moment.js *)
|
|
|
|
|
(*! version : 2.30.1 *)
|
|
|
|
@@ -302,7 +241,7 @@ moment/moment.js:
|
|
|
|
|
|
|
|
|
|
moment-timezone/moment-timezone.js:
|
|
|
|
|
(*! moment-timezone.js *)
|
|
|
|
|
(*! version : 0.6.1 *)
|
|
|
|
|
(*! version : 0.6.3 *)
|
|
|
|
|
(*! Copyright (c) JS Foundation and other contributors *)
|
|
|
|
|
(*! license : MIT *)
|
|
|
|
|
(*! github.com/moment/moment-timezone *)
|
|
|
|
|