preserve names in esbuild bundle
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
3 files changed
+146
-146
No files matched your search
+143
-143
@@ -1,196 +1,196 @@
|
||||
var Oje=Object.create;var cW=Object.defineProperty;var Eje=Object.getOwnPropertyDescriptor;var yje=Object.getOwnPropertyNames;var Cje=Object.getPrototypeOf,Bje=Object.prototype.hasOwnProperty;var Dje=(t,e)=>()=>(t&&(e=t(t=0)),e);var f=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Wse=(t,e)=>{for(var r in e)cW(t,r,{get:e[r],enumerable:!0})},qje=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of yje(e))!Bje.call(t,n)&&n!==r&&cW(t,n,{get:()=>e[n],enumerable:!(s=Eje(e,n))||s.enumerable});return t};var T=(t,e,r)=>(r=t!=null?Oje(Cje(t)):{},qje(e||!t||!t.__esModule?cW(r,"default",{value:t,enumerable:!0}):r,t));var Gse=f(Ah=>{"use strict";var $st=require("net"),vje=require("tls"),dW=require("http"),Pse=require("https"),Fje=require("events"),Yst=require("assert"),Tje=require("util");Ah.httpOverHttp=xje;Ah.httpsOverHttp=Wje;Ah.httpOverHttps=_je;Ah.httpsOverHttps=Lje;function xje(t){var e=new cu(t);return e.request=dW.request,e}function Wje(t){var e=new cu(t);return e.request=dW.request,e.createSocket=kse,e.defaultPort=443,e}function _je(t){var e=new cu(t);return e.request=Pse.request,e}function Lje(t){var e=new cu(t);return e.request=Pse.request,e.createSocket=kse,e.defaultPort=443,e}function cu(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||dW.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(s,n,i,o){for(var a=Use(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)})}Tje.inherits(cu,Fje.EventEmitter);cu.prototype.addRequest=function(e,r,s,n){var i=this,o=fW({request:e},i.options,Use(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)}})};cu.prototype.createSocket=function(e,r){var s=this,n={};s.sockets.push(n);var i=fW({},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")),al("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){al("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){al("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 al("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=A,r(A)}function p(l){o.removeAllListeners(),al(`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)}};cu.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 kse(t,e){var r=this;cu.prototype.createSocket.call(r,t,function(s){var n=t.request.getHeader("host"),i=fW({},r.options,{socket:s,servername:n?n.replace(/:.*$/,""):t.host}),o=vje.connect(0,i);r.sockets[r.sockets.indexOf(s)]=o,e(o)})}function Use(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function fW(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 al;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?al=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)}:al=function(){};Ah.debug=al});var tz=f((Kst,Hse)=>{Hse.exports=Gse()});var ut=f((Zst,Xse)=>{Xse.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 m0=f((ent,Mne)=>{"use strict";var Vse=Symbol.for("undici.error.UND_ERR"),pt=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[Vse]===!0}[Vse]=!0},jse=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),hW=class extends pt{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[jse]===!0}[jse]=!0},$se=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),bW=class extends pt{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[$se]===!0}[$se]=!0},Yse=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),MW=class extends pt{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[Yse]===!0}[Yse]=!0},Jse=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),mW=class extends pt{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[Jse]===!0}[Jse]=!0},Kse=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),gW=class extends pt{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 tJe(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(LYe.has(o)){n=o;break}}n!==""&&(t.referrerPolicy=n)}function rJe(){return"allowed"}function sJe(){return"success"}function nJe(){return"success"}function iJe(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function oJe(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&&p_(t.origin)&&!p_(pz(t))&&(e=null);break;case"same-origin":IB(t,pz(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function Eh(t,e){return t}function aJe(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:Eh(t.domainLookupStartTime,r),domainLookupEndTime:Eh(t.domainLookupEndTime,r),connectionStartTime:Eh(t.connectionStartTime,r),connectionEndTime:Eh(t.connectionEndTime,r),secureConnectionStartTime:Eh(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function cJe(t){return Eh(GYe.now(),t)}function uJe(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 Nie(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function pJe(t){return{referrerPolicy:t.referrerPolicy}}function lJe(t){let e=t.referrerPolicy;ud(e);let r=null;if(t.referrer==="client"){let a=Die();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let s=u_(r),n=u_(r,!0);s.toString().length>4096&&(s=n);let i=IB(t,s),o=uz(s)&&!uz(t.url);switch(e){case"origin":return n??u_(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=pz(t);return IB(s,a)?s:uz(s)&&!uz(a)?"no-referrer":n}default:return o?"no-referrer":n}}function u_(t,e){return ud(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 uz(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 AJe(t,e){if(qB===void 0)return!0;let r=vie(e);if(r==="no metadata"||r.length===0)return!0;let s=fJe(r),n=hJe(r,s);for(let i of n){let o=i.algo,a=i.hash,c=qB.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)),bJe(c,a))return!0}return!1}var dJe=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function vie(t){let e=[],r=!0;for(let s of t.split(" ")){r=!1;let n=dJe.exec(s);if(n===null||n.groups===void 0||n.groups.algo===void 0)continue;let i=n.groups.algo.toLowerCase();Iie.includes(i)&&e.push(n.groups)}return r===!0?"no metadata":e}function fJe(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 hJe(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 bJe(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 MJe(t){}function IB(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function mJe(){let t,e;return{promise:new Promise((s,n)=>{t=s,e=n}),resolve:t,reject:e}}function gJe(t){return t.controller.state==="aborted"}function zJe(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function OJe(t){return VYe[t.toLowerCase()]??t}function EJe(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return ud(typeof e=="string"),e}var yJe=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Fie(t,e,r=0,s=1){class n{
Line truncated
|
||||
`);function ZJe(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function eKe(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 tKe(t,e){wB(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&&SB(t,JJe,i)||i.position===t.length-4&&SB(t,KJe,i))return n;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let a=rKe(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",ZJe(p)||(p=""),h=new $Je([A],u,{type:p})):h=GJe(Buffer.from(A)),wB(Xie(c)),wB(typeof h=="string"&&Xie(h)||XJe(h)),n.push(VJe(c,h,u))}}function rKe(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=Ch(a=>a!==10&&a!==13&&a!==58,t,e);if(o=M_(o,!0,!0,a=>a===9||a===32),!HJe.test(o.toString())||t[e.position]!==58)return"failure";switch(e.position++,Ch(a=>a===32||a===9,t,e),UJe(o)){case"content-disposition":{if(r=s=null,!SB(t,YJe,e)||(e.position+=17,r=$ie(t,e),r===null))return"failure";if(SB(t,jie,e)){let a=e.position+jie.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,s=$ie(t,e),s===null))return"failure"}break}case"content-type":{let a=Ch(c=>c!==10&&c!==13,t,e);a=M_(a,!1,!0,c=>c===9||c===32),n=Vie(a);break}case"content-transfer-encoding":{let a=Ch(c=>c!==10&&c!==13,t,e);a=M_(a,!1,!0,c=>c===9||c===32),i=Vie(a);break}default:Ch(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function $ie(t,e){wB(t[e.position-1]===34);let r=Ch(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 Ch(t,e,r){let s=r.position;for(;s<e.length&&t(e[s]);)++s;return e.subarray(r.position,r.position=s)}function M_(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 SB(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}Yie.exports={multipartFormDataParser:tKe,validateBoundary:eKe}});var qh=f((Bnt,aoe)=>{"use strict";var dz=t0(),{ReadableStreamFrom:sKe,isBlobLike:Kie,isReadableStreamLike:nKe,readableStreamClose:iKe,createDeferredPromise:oKe,fullyReadBody:aKe,extractMimeType:cKe,utf8DecodeBytes:toe}=Mn(),{FormData:Zie}=Az(),{kState:Dh}=cl(),{webidl:uKe}=or(),{Blob:pKe}=require("node:buffer"),m_=require("node:assert"),{isErrored:roe,isDisturbed:lKe}=require("node:stream"),{isArrayBuffer:AKe}=require("node:util/types"),{serializeAMimeType:dKe}=Ss(),{multipartFormDataParser:fKe}=Jie(),g_;try{let t=require("node:crypto");g_=e=>t.randomInt(0,e)}catch{g_=t=>Math.floor(Math.random(t))}var NB=new TextEncoder;function hKe(){}var soe=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,noe;soe&&(noe=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!lKe(e)&&!roe(e)&&e.cancel("Response object has been garbage collected").catch(hKe)}));function ioe(t,e=!1){let r=null;t instanceof ReadableStream?r=t:Kie(t)?r=t.stream():r=new ReadableStream({async pull(c){let u=typeof n=="string"?NB.encode(n):n;u.byteLength&&c.enqueue(u),queueMicrotask(()=>iKe(c))},start(){},type:"bytes"}),m_(nKe(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(AKe(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(dz.isFormDataLike(t)){let c=`----formdata-undici-0${`${g_(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=NB.encode(u+`; name="${p(l(y))}"\r
|
||||
var Eje=Object.create;var iB=Object.defineProperty;var yje=Object.getOwnPropertyDescriptor;var Cje=Object.getOwnPropertyNames;var Bje=Object.getPrototypeOf,Dje=Object.prototype.hasOwnProperty;var o=(t,e)=>iB(t,"name",{value:e,configurable:!0});var qje=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_se=(t,e)=>{for(var r in e)iB(t,r,{get:e[r],enumerable:!0})},Ije=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Cje(e))!Dje.call(t,n)&&n!==r&&iB(t,n,{get:()=>e[n],enumerable:!(s=yje(e,n))||s.enumerable});return t};var x=(t,e,r)=>(r=t!=null?Eje(Bje(t)):{},Ije(e||!t||!t.__esModule?iB(r,"default",{value:t,enumerable:!0}):r,t));var Hse=h(dh=>{"use strict";var ent=require("net"),Fje=require("tls"),fW=require("http"),kse=require("https"),Tje=require("events"),tnt=require("assert"),xje=require("util");dh.httpOverHttp=Wje;dh.httpsOverHttp=_je;dh.httpOverHttps=Lje;dh.httpsOverHttps=Qje;function Wje(t){var e=new uu(t);return e.request=fW.request,e}o(Wje,"httpOverHttp");function _je(t){var e=new uu(t);return e.request=fW.request,e.createSocket=Use,e.defaultPort=443,e}o(_je,"httpsOverHttp");function Lje(t){var e=new uu(t);return e.request=kse.request,e}o(Lje,"httpOverHttps");function Qje(t){var e=new uu(t);return e.request=kse.request,e.createSocket=Use,e.defaultPort=443,e}o(Qje,"httpsOverHttps");function uu(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||fW.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(s,n,i,a){for(var c=Gse(n,i,a),u=0,p=e.requests.length;u<p;++u){var l=e.requests[u];if(l.host===c.host&&l.port===c.port){e.requests.splice(u,1),l.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)},"onFree"))}o(uu,"TunnelingAgent");xje.inherits(uu,Tje.EventEmitter);uu.prototype.addRequest=o(function(e,r,s,n){var i=this,a=hW({request:e},i.options,Gse(r,s,n));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)}o(u,"onFree");function p(l){i.removeSocket(c),c.removeListener("free",u),c.removeListener("close",p),c.removeListener("agentRemove",p)}o(p,"onCloseOrRemove")})},"addRequest");uu.prototype.createSocket=o(function(e,r){var s=this,n={};s.sockets.push(n);var i=hW({},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")),cl("making CONNECT request");var a=s.request(i);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",u),a.once("connect",p),a.once("error",l),a.end();function c(A){A.upgrade=!0}o(c,"onResponse");function u(A,d,b){process.nextTick(function(){p(A,d,b)})}o(u,"onUpgrade");function p(A,d,b){if(a.removeAllListeners(),d.removeAllListeners(),A.statusCode!==200){cl("tunneling socket could not be established, statusCode=%d",A.statusCode),d.destroy();var m=new Error("tunneling socket could not be established, statusCode="+A.statusCode);m.code="ECONNRESET",e.request.emit("error",m),s.removeSocket(n);return}if(b.length>0){cl("got illegal response body from proxy"),d.destroy();var m=new Error("got illegal response body from proxy");m.code="ECONNRESET",e.request.emit("error",m),s.removeSocket(n);return}return cl("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=d,r(d)}o(p,"onConnect");function l(A){a.removeAllListeners(),cl(`tunneling socket could not be established, cause=%s
|
||||
`,A.message,A.stack);var d=new Error("tunneling socket could not be established, cause="+A.message);d.code="ECONNRESET",e.request.emit("error",d),s.removeSocket(n)}o(l,"onError")},"createSocket");uu.prototype.removeSocket=o(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)})}},"removeSocket");function Use(t,e){var r=this;uu.prototype.createSocket.call(r,t,function(s){var n=t.request.getHeader("host"),i=hW({},r.options,{socket:s,servername:n?n.replace(/:.*$/,""):t.host}),a=Fje.connect(0,i);r.sockets[r.sockets.indexOf(s)]=a,e(a)})}o(Use,"createSecureSocket");function Gse(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}o(Gse,"toOptions");function hW(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,a=n.length;i<a;++i){var c=n[i];s[c]!==void 0&&(t[c]=s[c])}}return t}o(hW,"mergeOptions");var cl;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?cl=o(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):cl=o(function(){},"debug");dh.debug=cl});var rz=h((nnt,Xse)=>{Xse.exports=Hse()});var pt=h((int,Vse)=>{Vse.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 g0=h((ont,mne)=>{"use strict";var jse=Symbol.for("undici.error.UND_ERR"),lt=class extends Error{static{o(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[jse]===!0}[jse]=!0},$se=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),bW=class extends lt{static{o(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[$se]===!0}[$se]=!0},Yse=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),MW=class extends lt{static{o(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Yse]===!0}[Yse]=!0},Jse=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),mW=class extends lt{static{o(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[Jse]===!0}[Jse]=!0},Kse=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),gW=class extends lt{static{o(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}o(Nie,"isValidHeaderValue");function rJe(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 a=s[i-1].trim();if(QYe.has(a)){n=a;break}}n!==""&&(t.referrerPolicy=n)}o(rJe,"setRequestReferrerPolicyOnRedirect");function sJe(){return"allowed"}o(sJe,"crossOriginResourcePolicyCheck");function nJe(){return"success"}o(nJe,"corsCheck");function iJe(){return"success"}o(iJe,"TAOCheck");function oJe(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}o(oJe,"appendFetchMetadata");function aJe(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&&l_(t.origin)&&!l_(lz(t))&&(e=null);break;case"same-origin":wB(t,lz(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}o(aJe,"appendRequestOriginHeader");function yh(t,e){return t}o(yh,"coarsenTime");function cJe(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:yh(t.domainLookupStartTime,r),domainLookupEndTime:yh(t.domainLookupEndTime,r),connectionStartTime:yh(t.connectionStartTime,r),connectionEndTime:yh(t.connectionEndTime,r),secureConnectionStartTime:yh(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}o(cJe,"clampAndCoarsenConnectionTimingInfo");function uJe(t){return yh(HYe.now(),t)}o(uJe,"coarsenedSharedCurrentTime");function pJe(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}o(pJe,"createOpaqueTimingInfo");function vie(){return{referrerPolicy:"strict-origin-when-cross-origin"}}o(vie,"makePolicyContainer");function lJe(t){return{referrerPolicy:t.referrerPolicy}}o(lJe,"clonePolicyContainer");function AJe(t){let e=t.referrerPolicy;pd(e);let r=null;if(t.referrer==="client"){let c=qie();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let s=p_(r),n=p_(r,!0);s.toString().length>4096&&(s=n);let i=wB(t,s),a=pz(s)&&!pz(t.url);switch(e){case"origin":return n??p_(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 c=lz(t);return wB(s,c)?s:pz(s)&&!pz(c)?"no-referrer":n}default:return a?"no-referrer":n}}o(AJe,"determineRequestsReferrer");function p_(t,e){return pd(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}o(p_,"stripURLForReferrer");function pz(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"))}}o(pz,"isURLPotentiallyTrustworthy");function dJe(t,e){if(RB===void 0)return!0;let r=Fie(e);if(r==="no metadata"||r.length===0)return!0;let s=hJe(r),n=bJe(r,s);for(let i of n){let a=i.algo,c=i.hash,u=RB.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)),MJe(u,c))return!0}return!1}o(dJe,"bytesMatch");var fJe=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function Fie(t){let e=[],r=!0;for(let s of t.split(" ")){r=!1;let n=fJe.exec(s);if(n===null||n.groups===void 0||n.groups.algo===void 0)continue;let i=n.groups.algo.toLowerCase();Rie.includes(i)&&e.push(n.groups)}return r===!0?"no metadata":e}o(Fie,"parseMetadata");function hJe(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}o(hJe,"getStrongestMetadata");function bJe(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}o(bJe,"filterMetadataListByAlgorithm");function MJe(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}o(MJe,"compareBase64Mixed");function mJe(t){}o(mJe,"tryUpgr
Line truncated
|
||||
`);function eKe(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}o(eKe,"isAsciiString");function tKe(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}o(tKe,"validateBoundary");function rKe(t,e){NB(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 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+s.length).equals(s))i.position+=s.length;else return"failure";if(i.position===t.length-2&&vB(t,KJe,i)||i.position===t.length-4&&vB(t,ZJe,i))return n;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let c=sKe(t,i);if(c==="failure")return"failure";let{name:u,filename:p,contentType:l,encoding:A}=c;i.position+=2;let d;{let m=t.indexOf(s.subarray(2),i.position);if(m===-1)return"failure";d=t.subarray(i.position,m-4),i.position+=d.length,A==="base64"&&(d=Buffer.from(d.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let b;p!==null?(l??="text/plain",eKe(l)||(l=""),b=new YJe([d],p,{type:l})):b=HJe(Buffer.from(d)),NB(Vie(u)),NB(typeof b=="string"&&Vie(b)||VJe(b)),n.push(jJe(u,b,p))}}o(rKe,"multipartFormDataParser");function sKe(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 a=Bh(c=>c!==10&&c!==13&&c!==58,t,e);if(a=m_(a,!0,!0,c=>c===9||c===32),!XJe.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,Bh(c=>c===32||c===9,t,e),GJe(a)){case"content-disposition":{if(r=s=null,!vB(t,JJe,e)||(e.position+=17,r=Yie(t,e),r===null))return"failure";if(vB(t,$ie,e)){let c=e.position+$ie.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,s=Yie(t,e),s===null))return"failure"}break}case"content-type":{let c=Bh(u=>u!==10&&u!==13,t,e);c=m_(c,!1,!0,u=>u===9||u===32),n=jie(c);break}case"content-transfer-encoding":{let c=Bh(u=>u!==10&&u!==13,t,e);c=m_(c,!1,!0,u=>u===9||u===32),i=jie(c);break}default:Bh(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}o(sKe,"parseMultipartFormDataHeaders");function Yie(t,e){NB(t[e.position-1]===34);let r=Bh(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)}o(Yie,"parseMultipartFormDataName");function Bh(t,e,r){let s=r.position;for(;s<e.length&&t(e[s]);)++s;return e.subarray(r.position,r.position=s)}o(Bh,"collectASequenceOfBytes");function m_(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)}o(m_,"removeChars");function vB(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}o(vB,"bufferStartsWith");Jie.exports={multipartFormDataParser:rKe,validateBoundary:tKe}});var Ih=h((Xnt,coe)=>{"use strict";var fz=r0(),{ReadableStreamFrom:nKe,isBlobLike:Zie,isReadableStreamLike:iKe,readableStreamClose:oKe,createDeferredPromise:aKe,fullyReadBody:cKe,extractMimeType:uKe,utf8DecodeBytes:roe}=mn(),{FormData:eoe}=dz(),{kState:qh}=ul(),{webidl:pKe}=ar(),{Blob:lKe}=require("node:buffer"),g_=require("node:assert"),{isErrored:soe,isDisturbed:AKe}=require("node:stream"),{isArrayBuffer:dKe}=require("node:util/types"),{serializeAMimeType:fKe}=Ns(),{multipartFormDataParser:hKe}=Kie(),z_;try{let t=require("node:crypto");z_=o(e=>t.randomInt(0,e),"random")}catch{z_=o(t=>Math.floor(Math.random(t)),"random")}var FB=new TextEncoder;function bKe(){}o(bKe,"noop");var noe=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,ioe;noe&&(ioe=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!AKe(e)&&!soe(e)&&e.cancel("Response object has been garbage collected").catch(bKe)}));function ooe(t,e=!1){let r=null;t instanceof ReadableStream?r=t:Zie(t)?r=t.stream():r=new ReadableStream({async pull(u){let p=typeof n=="string"?FB.encode(n):n;p.byteLength&&u.enqueue(p),queueMicrotask(()=>oKe(u))},start(){},type:"bytes"}),g_(iKe(r));let s=null,n=null,i=null,a=null;if(typeof t=="string")n=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)n=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(dKe(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(fz.isFormDataLike(t)){let u=`----formdata-undici-0${`${z_(1e11)}`.padStart(11,"0")}`,p=`--${u}\r
|
||||
Content-Disposition: form-data`;let l=o(C=>C.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),A=o(C=>C.replace(/\r?\n|\r/g,`\r
|
||||
`),"normalizeLinefeeds"),d=[],b=new Uint8Array([13,10]);i=0;let m=!1;for(let[C,E]of t)if(typeof E=="string"){let D=FB.encode(p+`; name="${l(A(C))}"\r
|
||||
\r
|
||||
${l(O)}\r
|
||||
`);A.push(B),i+=B.byteLength}else{let B=NB.encode(`${u}; name="${p(l(y))}"`+(O.name?`; filename="${p(O.name)}"`:"")+`\r
|
||||
Content-Type: ${O.type||"application/octet-stream"}\r
|
||||
${A(E)}\r
|
||||
`);d.push(D),i+=D.byteLength}else{let D=FB.encode(`${p}; name="${l(A(C))}"`+(E.name?`; filename="${l(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=NB.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(Kie(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(dz.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:sKe(t)}if((typeof n=="string"||dz.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(!roe(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 bKe(t,e=!1){return t instanceof ReadableStream&&(m_(!dz.isDisturbed(t),"The body has already been consumed."),m_(!t.locked,"The stream is locked.")),ioe(t,e)}function MKe(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function mKe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function gKe(t){return{blob(){return Bh(this,r=>{let s=eoe(this);return s===null?s="":s&&(s=dKe(s)),new pKe([r],{type:s})},t)},arrayBuffer(){return Bh(this,r=>new Uint8Array(r).buffer,t)},text(){return Bh(this,toe,t)},json(){return Bh(this,OKe,t)},formData(){return Bh(this,r=>{let s=eoe(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=fKe(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Zie;return i[Dh]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new Zie;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 Bh(this,r=>new Uint8Array(r),t)}}}function zKe(t){Object.assign(t.prototype,gKe(t))}async function Bh(t,e,r){if(uKe.brandCheck(t,r),ooe(t))throw new TypeError("Body is unusable: Body has already been read");mKe(t[Dh]);let s=oKe(),n=o=>s.reject(o),i=o=>{try{s.resolve(e(o))}catch(a){n(a)}};return t[Dh].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await aKe(t[Dh].body,i,n),s.promise)}function ooe(t){let e=t[Dh].body;return e!=null&&(e.stream.locked||dz.isDisturbed(e.stream))}function OKe(t){return JSON.parse(toe(t))}function eoe(t){let e=t[Dh].headersList,r=cKe(e);return r==="failure"?null:r}aoe.exports={extractBody:ioe,safelyExtractBody:bKe,cloneBody:MKe,mixinBody:zKe,streamRegistry:noe,hasFinalizationRegistry:soe,bodyUnusable:ooe}});var moe=f((Dnt,Moe)=>{"use strict";var Re=require("node:assert"),Qe=t0(),{channels:coe}=fh(),z_=t_(),{RequestContentLengthMismatchError:pd,ResponseContentLengthMismatchError:EKe,RequestAbortedError:foe,HeadersTimeoutError:yKe,HeadersOverflowError:CKe,SocketError:_B,InformationalError:Ih,BodyTimeoutError:BKe,HTTPParserError:DKe,ResponseExceededMaxSizeError:qKe}=m0(),{kUrl:hoe,kReset:Ns,kClient:C_,kParser:Bt,kBlocking:bz,kRunning:Mr,kPending:IKe,kSize:uoe,kWriting:pl,kQueue:bo,kNoRef:fz,kKeepAliveDefaultTimeout:RKe,kHostHeader:wKe,kPendingIdx:SKe,kRunningIdx:ci,kError:ui,kPipelining:xB,kSocket:Rh,kKeepAliveTimeoutValue:LB,kMaxHeadersSize:O_,kKeepAliveMaxTimeout:NKe,kKeepAliveTimeoutThreshold:vKe,kHeadersTimeout:FKe,kBodyTimeout:TKe,kStrictContentLength:B_,kMaxRequests:poe,kCounter:xKe,kMaxResponseSize:WKe,kOnError:_Ke,kResume:ul,kHTTPContext:boe}=ut(),la=nie(),LKe=Buffer.alloc(0),vB=Buffer[Symbol.species],FB=Qe.addListener,QKe=Qe.removeAllListeners,E_;async function PKe(){let t=process.env.JEST_WORKER_ID?n_():void 0,e;try{e=await WebAssembly.compile(aie())}catch{e=await WebAssembly.compile(t||n_())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,n)=>0,wasm_on_status:(r,s,n)=>{Re(M1.ptr===r);let i=s-da+Aa.byteOffset;return M1.onStatus(new vB(Aa.buffer,i,n))||0},wasm_on_message_begin:r=>(Re(M1.ptr===r),M1.onMessageBegin()||0),wasm_on_header_field:(r,s,n)=>{Re(M1.ptr===r);let i=s-da+Aa.byteOffset;return M1.onHeaderField(new vB(Aa.buffer,i,n))||0},wasm_on_header_value:(r,s,n)=>{Re(M1.ptr===r);let i=s-da+Aa.byteOffset;return M1.onHeaderValue(new vB(Aa.buffer,i,n))||0},wasm_on_headers_complete:(r,s,n,i)=>(Re(M1.ptr===r),M1.onHeadersComplete(s,!!n,!!i)||0),wasm_on_body:(r,s,n)=>{Re(M1.ptr===r);let i=s-da+Aa.byteOffset;return M1.onBody(new vB(Aa.buffer,i,n))||0},wasm_on_message_complete:r=>(Re(M1.ptr===r),M1.onMessageComplete()||0)}})}var y_=null,D_=PKe();D_.catch();var M1=null,Aa=null,TB=0,da=null,kKe=0,hz=1,wh=2|hz,WB=4|hz,q_=8|kKe,I_=class{constructor(e,r,{exports:s}){Re(Number.isFinite(e[O_])&&e[O_]>0),this.llhttp=s,this.ptr=this.llhttp.llhttp_alloc(la.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[wKe],i?g+=`connection: upgrade\r
|
||||
`);d.push(D,E,b),typeof E.size=="number"?i+=D.byteLength+E.size+b.byteLength:m=!0}let z=FB.encode(`--${u}--\r
|
||||
`);d.push(z),i+=z.byteLength,m&&(i=null),n=t,s=o(async function*(){for(let C of d)C.stream?yield*C.stream():yield C},"action"),a=`multipart/form-data; boundary=${u}`}else if(Zie(t))n=t,i=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(fz.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:nKe(t)}if((typeof n=="string"||fz.isBuffer(n))&&(i=Buffer.byteLength(n)),s!=null){let u;r=new ReadableStream({async start(){u=s(t)[Symbol.asyncIterator]()},async pull(p){let{value:l,done:A}=await u.next();if(A)queueMicrotask(()=>{p.close(),p.byobRequest?.respond(0)});else if(!soe(r)){let d=new Uint8Array(l);d.byteLength&&p.enqueue(d)}return p.desiredSize>0},async cancel(p){await u.return()},type:"bytes"})}return[{stream:r,source:n,length:i},a]}o(ooe,"extractBody");function MKe(t,e=!1){return t instanceof ReadableStream&&(g_(!fz.isDisturbed(t),"The body has already been consumed."),g_(!t.locked,"The stream is locked.")),ooe(t,e)}o(MKe,"safelyExtractBody");function mKe(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}o(mKe,"cloneBody");function gKe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(gKe,"throwIfAborted");function zKe(t){return{blob(){return Dh(this,r=>{let s=toe(this);return s===null?s="":s&&(s=fKe(s)),new lKe([r],{type:s})},t)},arrayBuffer(){return Dh(this,r=>new Uint8Array(r).buffer,t)},text(){return Dh(this,roe,t)},json(){return Dh(this,EKe,t)},formData(){return Dh(this,r=>{let s=toe(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=hKe(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new eoe;return i[qh]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new eoe;for(let[a,c]of n)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 Dh(this,r=>new Uint8Array(r),t)}}}o(zKe,"bodyMixinMethods");function OKe(t){Object.assign(t.prototype,zKe(t))}o(OKe,"mixinBody");async function Dh(t,e,r){if(pKe.brandCheck(t,r),aoe(t))throw new TypeError("Body is unusable: Body has already been read");gKe(t[qh]);let s=aKe(),n=o(a=>s.reject(a),"errorSteps"),i=o(a=>{try{s.resolve(e(a))}catch(c){n(c)}},"successSteps");return t[qh].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await cKe(t[qh].body,i,n),s.promise)}o(Dh,"consumeBody");function aoe(t){let e=t[qh].body;return e!=null&&(e.stream.locked||fz.isDisturbed(e.stream))}o(aoe,"bodyUnusable");function EKe(t){return JSON.parse(roe(t))}o(EKe,"parseJSONFromBytes");function toe(t){let e=t[qh].headersList,r=uKe(e);return r==="failure"?null:r}o(toe,"bodyMimeType");coe.exports={extractBody:ooe,safelyExtractBody:MKe,cloneBody:mKe,mixinBody:OKe,streamRegistry:ioe,hasFinalizationRegistry:noe,bodyUnusable:aoe}});var goe=h((jnt,moe)=>{"use strict";var we=require("node:assert"),Pe=r0(),{channels:uoe}=hh(),O_=r_(),{RequestContentLengthMismatchError:ld,ResponseContentLengthMismatchError:yKe,RequestAbortedError:hoe,HeadersTimeoutError:CKe,HeadersOverflowError:BKe,SocketError:QB,InformationalError:Rh,BodyTimeoutError:DKe,HTTPParserError:qKe,ResponseExceededMaxSizeError:IKe}=g0(),{kUrl:boe,kReset:vs,kClient:B_,kParser:Dt,kBlocking:Mz,kRunning:mr,kPending:RKe,kSize:poe,kWriting:ll,kQueue:Mo,kNoRef:hz,kKeepAliveDefaultTimeout:wKe,kHostHeader:SKe,kPendingIdx:NKe,kRunningIdx:ui,kError:pi,kPipelining:_B,kSocket:wh,kKeepAliveTimeoutValue:PB,kMaxHeadersSize:E_,kKeepAliveMaxTimeout:vKe,kKeepAliveTimeoutThreshold:FKe,kHeadersTimeout:TKe,kBodyTimeout:xKe,kStrictContentLength:D_,kMaxRequests:loe,kCounter:WKe,kMaxResponseSize:_Ke,kOnError:LKe,kResume:pl,kHTTPContext:Moe}=pt(),Aa=iie(),QKe=Buffer.alloc(0),TB=Buffer[Symbol.species],xB=Pe.addListener,PKe=Pe.removeAllListeners,y_;async function kKe(){let t=process.env.JEST_WORKER_ID?i_():void 0,e;try{e=await WebAssembly.compile(cie())}catch{e=await WebAssembly.compile(t||i_())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:o((r,s,n)=>0,"wasm_on_url"),wasm_on_status:o((r,s,n)=>{we(m1.ptr===r);let i=s-fa+da.byteOffset;return m1.onStatus(new TB(da.buffer,i,n))||0},"wasm_on_status"),wasm_on_message_begin:o(r=>(we(m1.ptr===r),m1.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:o((r,s,n)=>{we(m1.ptr===r);let i=s-fa+da.byteOffset;return m1.onHeaderField(new TB(da.buffer,i,n))||0},"wasm_on_header_field"),wasm_on_header_value:o((r,s,n)=>{we(m1.ptr===r);let i=s-fa+da.byteOffset;return m1.onHeaderValue(new TB(da.buffer,i,n))||0},"wasm_on_header_value"),wasm_on_headers_complete:o((r,s,n,i)=>(we(m1.ptr===r),m1.onHeadersComplete(s,!!n,!!i)||0),"wasm_on_headers_complete"),wasm_on_body:o((r,s,n)=>{we(m1.ptr===r);let i=s-fa+da.byteOffset;return m1.onBody(new TB(da.buffer,i,n))||0},"wasm_on_body"),wasm_on_message_complete:o(r=>(we(m1.
Line truncated
|
||||
`;if(typeof n=="string"?z+=`host: ${n}\r
|
||||
`:z+=t[SKe],i?z+=`connection: upgrade\r
|
||||
upgrade: ${i}\r
|
||||
`:t[xB]&&!h[Ns]?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 coe.sendHeaders.hasSubscribers&&coe.sendHeaders.publish({request:e,headers:g,socket:h}),!c||A===0?Aoe(M,null,t,e,h,p,g,l):Qe.isBuffer(c)?Aoe(M,c,t,e,h,p,g,l):Qe.isBlobLike(c)?typeof c.stream=="function"?doe(M,c.stream(),t,e,h,p,g,l):jKe(M,c,t,e,h,p,g,l):Qe.isStream(c)?VKe(M,c,t,e,h,p,g,l):Qe.isIterable(c)?doe(M,c,t,e,h,p,g,l):Re(!1),!0}function VKe(t,e,r,s,n,i,o,a){Re(i!==0||r[Mr]===0,"stream body cannot be pipelined");let c=!1,u=new QB({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){Qe.destroy(this,g)}},l=function(){c||e.resume&&e.resume()},A=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!c){let M=new foe;queueMicrotask(()=>h(M))}},h=function(M){if(!c){if(c=!0,Re(n.destroyed||n[pl]&&r[Mr]<=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")?Qe.destroy(e,M):Qe.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 Aoe(t,e,r,s,n,i,o,a){try{e?Qe.isBuffer(e)&&(Re(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${o}content-length: ${i}\r
|
||||
`:t[_B]&&!b[vs]?z+=`connection: keep-alive\r
|
||||
`:z+=`connection: close\r
|
||||
`,Array.isArray(p))for(let C=0;C<p.length;C+=2){let E=p[C+0],D=p[C+1];if(Array.isArray(D))for(let R=0;R<D.length;R++)z+=`${E}: ${D[R]}\r
|
||||
`;else z+=`${E}: ${D}\r
|
||||
`}return uoe.sendHeaders.hasSubscribers&&uoe.sendHeaders.publish({request:e,headers:z,socket:b}),!u||d===0?doe(m,null,t,e,b,l,z,A):Pe.isBuffer(u)?doe(m,u,t,e,b,l,z,A):Pe.isBlobLike(u)?typeof u.stream=="function"?foe(m,u.stream(),t,e,b,l,z,A):$Ke(m,u,t,e,b,l,z,A):Pe.isStream(u)?jKe(m,u,t,e,b,l,z,A):Pe.isIterable(u)?foe(m,u,t,e,b,l,z,A):we(!1),!0}o(VKe,"writeH1");function jKe(t,e,r,s,n,i,a,c){we(i!==0||r[mr]===0,"stream body cannot be pipelined");let u=!1,p=new kB({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:c,header:a}),l=o(function(m){if(!u)try{!p.write(m)&&this.pause&&this.pause()}catch(z){Pe.destroy(this,z)}},"onData"),A=o(function(){u||e.resume&&e.resume()},"onDrain"),d=o(function(){if(queueMicrotask(()=>{e.removeListener("error",b)}),!u){let m=new hoe;queueMicrotask(()=>b(m))}},"onClose"),b=o(function(m){if(!u){if(u=!0,we(n.destroyed||n[ll]&&r[mr]<=1),n.off("drain",A).off("error",b),e.removeListener("data",l).removeListener("end",b).removeListener("close",d),!m)try{p.end()}catch(z){m=z}p.destroy(m),m&&(m.code!=="UND_ERR_INFO"||m.message!=="reset")?Pe.destroy(e,m):Pe.destroy(e)}},"onFinished");e.on("data",l).on("end",b).on("error",b).on("close",d),e.resume&&e.resume(),n.on("drain",A).on("error",b),e.errorEmitted??e.errored?setImmediate(()=>b(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>b(null)),(e.closeEmitted??e.closed)&&setImmediate(d)}o(jKe,"writeStream");function doe(t,e,r,s,n,i,a,c){try{e?Pe.isBuffer(e)&&(we(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${a}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),n.write(e),n.uncork(),s.onBodySent(e),!a&&s.reset!==!1&&(n[Ns]=!0)):i===0?n.write(`${o}content-length: 0\r
|
||||
`,"latin1"),n.write(e),n.uncork(),s.onBodySent(e),!c&&s.reset!==!1&&(n[vs]=!0)):i===0?n.write(`${a}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(Re(i===null,"no body must not have content length"),n.write(`${o}\r
|
||||
`,"latin1")),s.onRequestSent(),r[ul]()}catch(c){t(c)}}async function jKe(t,e,r,s,n,i,o,a){Re(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new pd;let c=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${o}content-length: ${i}\r
|
||||
`,"latin1"):(we(i===null,"no body must not have content length"),n.write(`${a}\r
|
||||
`,"latin1")),s.onRequestSent(),r[pl]()}catch(u){t(u)}}o(doe,"writeBuffer");async function $Ke(t,e,r,s,n,i,a,c){we(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new ld;let u=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${a}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),n.write(c),n.uncork(),s.onBodySent(c),s.onRequestSent(),!a&&s.reset!==!1&&(n[Ns]=!0),r[ul]()}catch(c){t(c)}}async function doe(t,e,r,s,n,i,o,a){Re(i!==0||r[Mr]===0,"iterator body cannot be pipelined");let c=null;function u(){if(c){let A=c;c=null,A()}}let p=()=>new Promise((A,h)=>{Re(c===null),n[ui]?h(n[ui]):c=A});n.on("close",u).on("drain",u);let l=new QB({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let A of e){if(n[ui])throw n[ui];l.write(A)||await p()}l.end()}catch(A){l.destroy(A)}finally{n.off("close",u).off("drain",u)}}var QB=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[pl]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[ui])throw r[ui];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(n!==null&&o+u>n){if(i[B_])throw new pd;process.emitWarning(new pd)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[Ns]=!0),n===null?r.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${c}content-length: ${n}\r
|
||||
`,"latin1"),n.write(u),n.uncork(),s.onBodySent(u),s.onRequestSent(),!c&&s.reset!==!1&&(n[vs]=!0),r[pl]()}catch(u){t(u)}}o($Ke,"writeBlob");async function foe(t,e,r,s,n,i,a,c){we(i!==0||r[mr]===0,"iterator body cannot be pipelined");let u=null;function p(){if(u){let d=u;u=null,d()}}o(p,"onDrain");let l=o(()=>new Promise((d,b)=>{we(u===null),n[pi]?b(n[pi]):u=d}),"waitForDrain");n.on("close",p).on("drain",p);let A=new kB({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:c,header:a});try{for await(let d of e){if(n[pi])throw n[pi];A.write(d)||await l()}A.end()}catch(d){A.destroy(d)}finally{n.off("close",p).off("drain",p)}}o(foe,"writeIterable");var kB=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:s,contentLength:n,client:i,expectsPayload:a,header:c}){this.socket=r,this.request=s,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[ll]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:a,expectsPayload:c,header:u}=this;if(r[pi])throw r[pi];if(r.destroyed)return!1;let p=Buffer.byteLength(e);if(!p)return!0;if(n!==null&&a+p>n){if(i[D_])throw new ld;process.emitWarning(new ld)}r.cork(),a===0&&(!c&&s.reset!==!1&&(r[vs]=!0),n===null?r.write(`${u}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${u}content-length: ${n}\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[Bt].timeout&&r[Bt].timeoutType===wh&&r[Bt].timeout.refresh&&r[Bt].timeout.refresh(),p}end(){let{socket:e,contentLength:r,client:s,bytesWritten:n,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[pl]=!1,e[ui])throw e[ui];if(!e.destroyed){if(n===0?i?e.write(`${o}content-length: 0\r
|
||||
${p.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=p;let l=r.write(e);return r.uncork(),s.onBodySent(e),l||r[Dt].timeout&&r[Dt].timeoutType===Sh&&r[Dt].timeout.refresh&&r[Dt].timeout.refresh(),l}end(){let{socket:e,contentLength:r,client:s,bytesWritten:n,expectsPayload:i,header:a,request:c}=this;if(c.onRequestSent(),e[ll]=!1,e[pi])throw e[pi];if(!e.destroyed){if(n===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[B_])throw new pd;process.emitWarning(new pd)}e[Bt].timeout&&e[Bt].timeoutType===wh&&e[Bt].timeout.refresh&&e[Bt].timeout.refresh(),s[ul]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[pl]=!1,e&&(Re(s[Mr]<=1,"pipeline should only contain this request"),n(e))}};Moe.exports=UKe});var Doe=f((qnt,Boe)=>{"use strict";var pi=require("node:assert"),{pipeline:$Ke}=require("node:stream"),i0=t0(),{RequestContentLengthMismatchError:R_,RequestAbortedError:goe,SocketError:Mz,InformationalError:w_}=m0(),{kUrl:PB,kReset:UB,kClient:Sh,kRunning:GB,kPending:YKe,kQueue:ll,kPendingIdx:S_,kRunningIdx:Mo,kError:go,kSocket:I1,kStrictContentLength:JKe,kOnError:N_,kMaxConcurrentStreams:Coe,kHTTP2Session:mo,kResume:Al,kSize:KKe,kHTTPContext:ZKe}=ut(),fu=Symbol("open streams"),zoe,Ooe=!1,kB;try{kB=require("node:http2")}catch{kB={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:eZe,HTTP2_HEADER_METHOD:tZe,HTTP2_HEADER_PATH:rZe,HTTP2_HEADER_SCHEME:sZe,HTTP2_HEADER_CONTENT_LENGTH:nZe,HTTP2_HEADER_EXPECT:iZe,HTTP2_HEADER_STATUS:oZe}}=kB;function aZe(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 cZe(t,e){t[I1]=e,Ooe||(Ooe=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=kB.connect(t[PB],{createConnection:()=>e,peerMaxConcurrentStreams:t[Coe]});r[fu]=0,r[Sh]=t,r[I1]=e,i0.addListener(r,"error",pZe),i0.addListener(r,"frameError",lZe),i0.addListener(r,"end",AZe),i0.addListener(r,"goaway",dZe),i0.addListener(r,"close",function(){let{[Sh]:n}=this,{[I1]:i}=n,o=this[I1][go]||this[go]||new Mz("closed",i0.getSocketInfo(i));if(n[mo]=null,n.destroyed){pi(n[YKe]===0);let a=n[ll].splice(n[Mo]);for(let c=0;c<a.length;c++){let u=a[c];i0.errorRequest(n,u,o)}}}),r.unref(),t[mo]=r,e[mo]=r,i0.addListener(e,"error",function(n){pi(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[go]=n,this[Sh][N_](n)}),i0.addListener(e,"end",function(){i0.destroy(this,new Mz("other side closed",i0.getSocketInfo(this)))}),i0.addListener(e,"close",function(){let n=this[go]||new Mz("closed",i0.getSocketInfo(this));t[I1]=null,this[mo]!=null&&this[mo].destroy(n),t[S_]=t[Mo],pi(t[GB]===0),t.emit("disconnect",t[PB],[t],n),t[Al]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return hZe(t,...n)},resume(){uZe(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function uZe(t){let e=t[I1];e?.destroyed===!1&&(t[KKe]===0&&t[Coe]===0?(e.unref(),t[mo].unref()):(e.ref(),t[mo].ref()))}function pZe(t){pi(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[I1][go]=t,this[Sh][N_](t)}function lZe(t,e,r){if(r===0){let s=new w_(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[I1][go]=s,this[Sh][N_](s)}}function AZe(){let t=new Mz("other side closed",i0.getSocketInfo(this[I1]));this.destroy(t),i0.destroy(this[I1],t)}function dZe(t){let e=this[go]||new Mz(`HTTP/2: "GOAWAY" frame received with code ${t}`,i0.getSocketInfo(this)),r=this[Sh];if(r[I1]=null,r[ZKe]=null,this[mo]!=null&&(this[mo].destroy(e),this[mo]=null),i0.destroy(this[I1],e),r[Mo]<r[ll].length){let s=r[ll][r[Mo]];r[ll][r[Mo]++]=null,i0.errorRequest(r,s,e),r[S_]=r[Mo]}pi(r[GB]===0),r.emit("disconnect",r[PB],[r],e),r[Al]()}function fZe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function hZe(t,e){let r=t[mo],{method:s,path:n,host:i,upgrade:o,expectContinue:a,signal:c,headers:u}=e,{body:p}=e;if(o)return i0.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],x=u[R+1];if(Array.isArray(x))for(let L=0;L<x.length;L++)l[N]?l[N]+=`,${x[L]}`:l[N]=x[L];else l[N]=x}let A,{hostname:h,port:M}=t[PB];l[eZe]=i||`${h}${M?`:${M}`:""}`,l[tZe]=s;let g=R=>{e.aborted||e.completed||(R=R||new goe,i0.errorRequest(t,e,R),A!=null&&i0.destroy(A,R),i0.destroy(p,R),t[ll][t[Mo]++]=null,t[Al]())};try{e.onConnect(g)}catch(R){i0.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[ll][t[Mo]++]=null):A.once("ready",()=>{e.onUpgrade(null,null,A),++r[fu],t[ll][t[Mo]++]=null}),A.once("close",()=>{r[fu]-=1,r[fu]===0&&r.unref()}),!0;l[rZe]=n,l[sZe]="https";let y=s==="PUT"||s==="POST"||s==="PATCH";p&&typeof p.read=="function"&&p.read(0);let O=i0.bodyLength(p);if(i0.isFormDataLike(p)){zoe??=qh().extractBody;let[R,N]=zoe(p);l["content-type"]=N,p=R.stream,O=R.length}if(O==null&&(O=e.contentLength),(O===0||!y)&&(O=null),fZe(s)&&O>0&&e.contentLength!=null&&e.contentLength!==O){if(t[JKe])return i0.errorRequest(t,e,new R_),!1;process.emitWarning(new R_)}O!=null&&(pi(p,"no body must not have content length"),l[nZe]=`${O}`),r.ref();let B=s==="GET"||s==="HEAD"||p===null;return a?(l[iZe]="100-continue",A=r.request(l,{endStream:B,signa
Line truncated
|
||||
`,this[PZe]=c??3e5,this[QZe]=n??3e5,this[kZe]=B??!0,this[UZe]=R,this[x_]=x,this[fl]=null,this[jZe]=j>-1?j:-1,this[YZe]=K??100,this[Ht]=null,this[zo]=[],this[bu]=0,this[Oo]=0,this[Oz]=qe=>__(this,qe),this[$Ze]=qe=>_oe(this,qe)}get pipelining(){return this[jB]}set pipelining(e){this[jB]=e,this[Oz](!0)}get[Cz](){return this[zo].length-this[Oo]}get[yz](){return this[Oo]-this[bu]}get[Ez](){return this[zo].length-this[bu]}get[vZe](){return!!this[Ht]&&!this[vh]&&!this[Ht].destroyed}get[T_](){return!!(this[Ht]?.busy(null)||this[Ez]>=(Woe(this)||1)||this[Cz]>0)}[NZe](e){Loe(this),this.once("connect",e)}[VZe](e,r){let s=e.origin||this[ha].origin,n=new DZe(s,e,r);return this[zo].push(n),this[Ad]||(ld.bodyLength(n.body)==null&&ld.isIterable(n.body)?(this[Ad]=1,queueMicrotask(()=>__(this))):this[Oz](!0)),this[Ad]&&this[hl]!==2&&this[T_]&&(this[hl]=2),this[hl]<2}async[HZe](){return new Promise(e=>{this[Ez]?this[fl]=e:e(null)})}async[XZe](e){return new Promise(r=>{let s=this[zo].splice(this[Oo]);for(let i=0;i<s.length;i++){let o=s[i];ld.errorRequest(this,o,e)}let n=()=>{this[fl]&&(this[fl](),this[fl]=null),r(null)};this[Ht]?(this[Ht].destroy(e,n),this[Ht]=null):queueMicrotask(n),this[Oz]()})}},ZZe=VB();function _oe(t,e){if(t[yz]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){hu(t[Oo]===t[bu]);let r=t[zo].splice(t[bu]);for(let s=0;s<r.length;s++){let n=r[s];ld.errorRequest(t,n,e)}hu(t[Ez]===0)}}async function Loe(t){hu(!t[vh]),hu(!t[Ht]);let{host:e,hostname:r,protocol:s,port:n}=t[ha];if(r[0]==="["){let i=r.indexOf("]");hu(i!==-1);let o=r.substring(1,i);hu(xoe.isIP(o)),r=o}t[vh]=!0,Nh.beforeConnect.hasSubscribers&&Nh.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Ht]?.version,servername:t[dl],localAddress:t[zz]},connector:t[gz]});try{let i=await new Promise((o,a)=>{t[gz]({host:e,hostname:r,protocol:s,port:n,servername:t[dl],localAddress:t[zz]},(c,u)=>{c?a(c):o(u)})});if(t.destroyed){ld.destroy(i.on("error",Foe),new RZe);return}hu(i);try{t[Ht]=i.alpnProtocol==="h2"?await KZe(t,i):await JZe(t,i)}catch(o){throw i.destroy().on("error",Foe),o}t[vh]=!1,i[GZe]=0,i[x_]=t[x_],i[SZe]=t,i[TZe]=null,Nh.connected.hasSubscribers&&Nh.connected.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Ht]?.version,servername:t[dl],localAddress:t[zz]},connector:t[gz],socket:i}),t.emit("connect",t[ha],[t])}catch(i){if(t.destroyed)return;if(t[vh]=!1,Nh.connectError.hasSubscribers&&Nh.connectError.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Ht]?.version,servername:t[dl],localAddress:t[zz]},connector:t[gz],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(hu(t[yz]===0);t[Cz]>0&&t[zo][t[Oo]].servername===t[dl];){let o=t[zo][t[Oo]++];ld.errorRequest(t,o,i)}else _oe(t,i);t.emit("connectionError",t[ha],[t],i)}t[Oz]()}function Toe(t){t[hl]=0,t.emit("drain",t[ha],[t])}function __(t,e){t[Ad]!==2&&(t[Ad]=2,ee0(t,e),t[Ad]=0,t[bu]>256&&(t[zo].splice(0,t[bu]),t[Oo]-=t[bu],t[bu]=0))}function ee0(t,e){for(;;){if(t.destroyed){hu(t[Cz]===0);return}if(t[fl]&&!t[Ez]){t[fl](),t[fl]=null;return}if(t[Ht]&&t[Ht].resume(),t[T_])t[hl]=2;else if(t[hl]===2){e?(t[hl]=1,queueMicrotask(()=>Toe(t))):Toe(t);continue}if(t[Cz]===0||t[yz]>=(Woe(t)||1))return;let r=t[zo][t[Oo]];if(t[ha].protocol==="https:"&&t[dl]!==r.servername){if(t[yz]>0)return;t[dl]=r.servername,t[Ht]?.destroy(new IZe("servername changed"),()=>{t[Ht]=null,__(t)})}if(t[vh])return;if(!t[Ht]){Loe(t);return}if(t[Ht].destroyed||t[Ht].busy(r))return;!r.aborted&&t[Ht].write(r)?t[Oo]++:t[zo].splice(t[Oo],1)}}Qoe.exports=W_});var L_=f((Nnt,Poe)=>{"use strict";var $B=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)}};Poe.exports=class{constructor(){this.head=this.tail=new $B}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new $B),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Uoe=f((vnt,koe)=>{var{kFree:te0,kConnected:re0,kPending:se0,kQueued:ne0,kRunning:ie0,kSize:oe0}=ut(),dd=Symbol("pool"),Q_=class{constructor(e){this[dd]=e}get connected(){return this[dd][re0]}get free(){return this[dd][te0]}get pending(){return this[dd][se0]}get queued(){return this[dd][ne0]}get running(){return this[dd][ie0]}get size(){return this[dd][oe0]}};koe.exports=Q_});var X_=f((Fnt,Zoe)=>{"use strict";var ae0=mh(),ce0=L_(),{kConnected:P_,kSize:Goe,kRunning:Hoe,kPending:Xoe,kQueued:Bz,kBusy:ue0,kFree:pe0,kUrl:le0,kClose:Ae0,kDestroy:de0,kDispatch:fe0}=ut(),he0=Uoe(),vs=Symbol("clients"),jr=Symbol("needDrain"),Dz=Symbol("queue"),k_=Symbol("closed resolve"),U_=Symbol("onDrain"),Voe=Symbol("onConnect"),joe=Symbol("onDisconnect"),$oe=Symbol("onCo
Line truncated
|
||||
`,"latin1"),r!==null&&n!==r){if(s[D_])throw new ld;process.emitWarning(new ld)}e[Dt].timeout&&e[Dt].timeoutType===Sh&&e[Dt].timeout.refresh&&e[Dt].timeout.refresh(),s[pl]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[ll]=!1,e&&(we(s[mr]<=1,"pipeline should only contain this request"),n(e))}};moe.exports=GKe});var qoe=h((Ynt,Doe)=>{"use strict";var li=require("node:assert"),{pipeline:YKe}=require("node:stream"),o0=r0(),{RequestContentLengthMismatchError:w_,RequestAbortedError:zoe,SocketError:mz,InformationalError:S_}=g0(),{kUrl:UB,kReset:HB,kClient:Nh,kRunning:XB,kPending:JKe,kQueue:Al,kPendingIdx:N_,kRunningIdx:mo,kError:zo,kSocket:R1,kStrictContentLength:KKe,kOnError:v_,kMaxConcurrentStreams:Boe,kHTTP2Session:go,kResume:dl,kSize:ZKe,kHTTPContext:eZe}=pt(),hu=Symbol("open streams"),Ooe,Eoe=!1,GB;try{GB=require("node:http2")}catch{GB={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:tZe,HTTP2_HEADER_METHOD:rZe,HTTP2_HEADER_PATH:sZe,HTTP2_HEADER_SCHEME:nZe,HTTP2_HEADER_CONTENT_LENGTH:iZe,HTTP2_HEADER_EXPECT:oZe,HTTP2_HEADER_STATUS:aZe}}=GB;function cZe(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}o(cZe,"parseH2Headers");async function uZe(t,e){t[R1]=e,Eoe||(Eoe=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=GB.connect(t[UB],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[Boe]});r[hu]=0,r[Nh]=t,r[R1]=e,o0.addListener(r,"error",lZe),o0.addListener(r,"frameError",AZe),o0.addListener(r,"end",dZe),o0.addListener(r,"goaway",fZe),o0.addListener(r,"close",function(){let{[Nh]:n}=this,{[R1]:i}=n,a=this[R1][zo]||this[zo]||new mz("closed",o0.getSocketInfo(i));if(n[go]=null,n.destroyed){li(n[JKe]===0);let c=n[Al].splice(n[mo]);for(let u=0;u<c.length;u++){let p=c[u];o0.errorRequest(n,p,a)}}}),r.unref(),t[go]=r,e[go]=r,o0.addListener(e,"error",function(n){li(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[zo]=n,this[Nh][v_](n)}),o0.addListener(e,"end",function(){o0.destroy(this,new mz("other side closed",o0.getSocketInfo(this)))}),o0.addListener(e,"close",function(){let n=this[zo]||new mz("closed",o0.getSocketInfo(this));t[R1]=null,this[go]!=null&&this[go].destroy(n),t[N_]=t[mo],li(t[XB]===0),t.emit("disconnect",t[UB],[t],n),t[dl]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return bZe(t,...n)},resume(){pZe(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}o(uZe,"connectH2");function pZe(t){let e=t[R1];e?.destroyed===!1&&(t[ZKe]===0&&t[Boe]===0?(e.unref(),t[go].unref()):(e.ref(),t[go].ref()))}o(pZe,"resumeH2");function lZe(t){li(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[R1][zo]=t,this[Nh][v_](t)}o(lZe,"onHttp2SessionError");function AZe(t,e,r){if(r===0){let s=new S_(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[R1][zo]=s,this[Nh][v_](s)}}o(AZe,"onHttp2FrameError");function dZe(){let t=new mz("other side closed",o0.getSocketInfo(this[R1]));this.destroy(t),o0.destroy(this[R1],t)}o(dZe,"onHttp2SessionEnd");function fZe(t){let e=this[zo]||new mz(`HTTP/2: "GOAWAY" frame received with code ${t}`,o0.getSocketInfo(this)),r=this[Nh];if(r[R1]=null,r[eZe]=null,this[go]!=null&&(this[go].destroy(e),this[go]=null),o0.destroy(this[R1],e),r[mo]<r[Al].length){let s=r[Al][r[mo]];r[Al][r[mo]++]=null,o0.errorRequest(r,s,e),r[N_]=r[mo]}li(r[XB]===0),r.emit("disconnect",r[UB],[r],e),r[dl]()}o(fZe,"onHTTP2GoAway");function hZe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(hZe,"shouldSendContentLength");function bZe(t,e){let r=t[go],{method:s,path:n,host:i,upgrade:a,expectContinue:c,signal:u,headers:p}=e,{body:l}=e;if(a)return o0.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let A={};for(let w=0;w<p.length;w+=2){let v=p[w+0],W=p[w+1];if(Array.isArray(W))for(let Q=0;Q<W.length;Q++)A[v]?A[v]+=`,${W[Q]}`:A[v]=W[Q];else A[v]=W}let d,{hostname:b,port:m}=t[UB];A[tZe]=i||`${b}${m?`:${m}`:""}`,A[rZe]=s;let z=o(w=>{e.aborted||e.completed||(w=w||new zoe,o0.errorRequest(t,e,w),d!=null&&o0.destroy(d,w),o0.destroy(l,w),t[Al][t[mo]++]=null,t[dl]())},"abort");try{e.onConnect(z)}catch(w){o0.errorRequest(t,e,w)}if(e.aborted)return!1;if(s==="CONNECT")return r.ref(),d=r.request(A,{endStream:!1,signal:u}),d.id&&!d.pending?(e.onUpgrade(null,null,d),++r[hu],t[Al][t[mo]++]=null):d.once("ready",()=>{e.onUpgrade(null,null,d),++r[hu],t[Al][t[mo]++]=null}),d.once("close",()=>{r[hu]-=1,r[hu]===0&&r.unref()}),!0;A[sZe]=n,A[nZe]="https";let C=s==="PUT"||s==="POST"||s==="PATCH";l&&typeof l.read=="function"&&l.read(0);let E=o0.bodyLength(l);if(o0.isFormDataLike(l)){Ooe??=Ih().extractBody;let[w,v]=Ooe(l);A["content-type"]=v,l=w.stream,E=w.length}if(E==null&&(E=e.contentLength),(E===0||!C)&&(E=null),hZe(s)&&E>0&&e.contentLength!=null&&e.contentLength!==E){if(t[KKe])return o0.err
Line truncated
|
||||
`,this[kZe]=u??3e5,this[PZe]=n??3e5,this[UZe]=D??!0,this[GZe]=w,this[W_]=W,this[hl]=null,this[$Ze]=$>-1?$:-1,this[JZe]=Z??100,this[Xt]=null,this[Oo]=[],this[Mu]=0,this[Eo]=0,this[Ez]=Ie=>L_(this,Ie),this[YZe]=Ie=>Loe(this,Ie)}get pipelining(){return this[YB]}set pipelining(e){this[YB]=e,this[Ez](!0)}get[Bz](){return this[Oo].length-this[Eo]}get[Cz](){return this[Eo]-this[Mu]}get[yz](){return this[Oo].length-this[Mu]}get[FZe](){return!!this[Xt]&&!this[Fh]&&!this[Xt].destroyed}get[x_](){return!!(this[Xt]?.busy(null)||this[yz]>=(_oe(this)||1)||this[Bz]>0)}[vZe](e){Qoe(this),this.once("connect",e)}[jZe](e,r){let s=e.origin||this[ba].origin,n=new qZe(s,e,r);return this[Oo].push(n),this[dd]||(Ad.bodyLength(n.body)==null&&Ad.isIterable(n.body)?(this[dd]=1,queueMicrotask(()=>L_(this))):this[Ez](!0)),this[dd]&&this[bl]!==2&&this[x_]&&(this[bl]=2),this[bl]<2}async[XZe](){return new Promise(e=>{this[yz]?this[hl]=e:e(null)})}async[VZe](e){return new Promise(r=>{let s=this[Oo].splice(this[Eo]);for(let i=0;i<s.length;i++){let a=s[i];Ad.errorRequest(this,a,e)}let n=o(()=>{this[hl]&&(this[hl](),this[hl]=null),r(null)},"callback");this[Xt]?(this[Xt].destroy(e,n),this[Xt]=null):queueMicrotask(n),this[Ez]()})}},ee0=$B();function Loe(t,e){if(t[Cz]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){bu(t[Eo]===t[Mu]);let r=t[Oo].splice(t[Mu]);for(let s=0;s<r.length;s++){let n=r[s];Ad.errorRequest(t,n,e)}bu(t[yz]===0)}}o(Loe,"onError");async function Qoe(t){bu(!t[Fh]),bu(!t[Xt]);let{host:e,hostname:r,protocol:s,port:n}=t[ba];if(r[0]==="["){let i=r.indexOf("]");bu(i!==-1);let a=r.substring(1,i);bu(Woe.isIP(a)),r=a}t[Fh]=!0,vh.beforeConnect.hasSubscribers&&vh.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Xt]?.version,servername:t[fl],localAddress:t[Oz]},connector:t[zz]});try{let i=await new Promise((a,c)=>{t[zz]({host:e,hostname:r,protocol:s,port:n,servername:t[fl],localAddress:t[Oz]},(u,p)=>{u?c(u):a(p)})});if(t.destroyed){Ad.destroy(i.on("error",Toe),new wZe);return}bu(i);try{t[Xt]=i.alpnProtocol==="h2"?await ZZe(t,i):await KZe(t,i)}catch(a){throw i.destroy().on("error",Toe),a}t[Fh]=!1,i[HZe]=0,i[W_]=t[W_],i[NZe]=t,i[xZe]=null,vh.connected.hasSubscribers&&vh.connected.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Xt]?.version,servername:t[fl],localAddress:t[Oz]},connector:t[zz],socket:i}),t.emit("connect",t[ba],[t])}catch(i){if(t.destroyed)return;if(t[Fh]=!1,vh.connectError.hasSubscribers&&vh.connectError.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Xt]?.version,servername:t[fl],localAddress:t[Oz]},connector:t[zz],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(bu(t[Cz]===0);t[Bz]>0&&t[Oo][t[Eo]].servername===t[fl];){let a=t[Oo][t[Eo]++];Ad.errorRequest(t,a,i)}else Loe(t,i);t.emit("connectionError",t[ba],[t],i)}t[Ez]()}o(Qoe,"connect");function xoe(t){t[bl]=0,t.emit("drain",t[ba],[t])}o(xoe,"emitDrain");function L_(t,e){t[dd]!==2&&(t[dd]=2,te0(t,e),t[dd]=0,t[Mu]>256&&(t[Oo].splice(0,t[Mu]),t[Eo]-=t[Mu],t[Mu]=0))}o(L_,"resume");function te0(t,e){for(;;){if(t.destroyed){bu(t[Bz]===0);return}if(t[hl]&&!t[yz]){t[hl](),t[hl]=null;return}if(t[Xt]&&t[Xt].resume(),t[x_])t[bl]=2;else if(t[bl]===2){e?(t[bl]=1,queueMicrotask(()=>xoe(t))):xoe(t);continue}if(t[Bz]===0||t[Cz]>=(_oe(t)||1))return;let r=t[Oo][t[Eo]];if(t[ba].protocol==="https:"&&t[fl]!==r.servername){if(t[Cz]>0)return;t[fl]=r.servername,t[Xt]?.destroy(new RZe("servername changed"),()=>{t[Xt]=null,L_(t)})}if(t[Fh])return;if(!t[Xt]){Qoe(t);return}if(t[Xt].destroyed||t[Xt].busy(r))return;!r.aborted&&t[Xt].write(r)?t[Eo]++:t[Oo].splice(t[Eo],1)}}o(te0,"_resume");Poe.exports=__});var Q_=h((iit,koe)=>{"use strict";var JB=class{static{o(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};koe.exports=class{static{o(this,"FixedQueue")}constructor(){this.head=this.tail=new JB}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new JB),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Goe=h((ait,Uoe)=>{var{kFree:re0,kConnected:se0,kPending:ne0,kQueued:ie0,kRunning:oe0,kSize:ae0}=pt(),fd=Symbol("pool"),P_=class{static{o(this,"PoolStats")}constructor(e){this[fd]=e}get connected(){return this[fd][se0]}get free(){return this[fd][re0]}get pending(){return this[fd][ne0]}get queued(){return this[fd][ie0]}get running(){return this[fd][oe0]}get size(){return this[fd][ae0]}};Uoe.exports=P_});var V_=h((uit,eae)=>{"use strict";var ce0=gh(),ue0=Q_(),{kConnected:k_,kSize:Hoe,kRunning:Xoe,kPending:Voe,kQueued:Dz,kBusy:pe0,kFree:le0,kUrl:Ae0,kClose:de0,kDestroy:fe0,kDispatch:he0}=pt(
Line truncated
|
||||
${s.count} ${s.noun} ${s.is} pending:
|
||||
|
||||
${e.format(r)}
|
||||
`.trim())}};iue.exports=XL});var dD=f((cit,pue)=>{"use strict";var aue=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Pt0}=m0(),kt0=xh();uue()===void 0&&cue(new kt0);function cue(t){if(!t||typeof t.dispatch!="function")throw new Pt0("Argument agent must implement Agent");Object.defineProperty(globalThis,aue,{value:t,writable:!0,enumerable:!1,configurable:!1})}function uue(){return globalThis[aue]}pue.exports={setGlobalDispatcher:cue,getGlobalDispatcher:uue}});var fD=f((pit,lue)=>{"use strict";lue.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 due=f((lit,Aue)=>{"use strict";var Ut0=XB();Aue.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 Ut0(r,o,n,i);return r(a,c)}}});var hue=f((Ait,fue)=>{"use strict";var Gt0=sD();fue.exports=t=>e=>function(s,n){return e(s,new Gt0({...s,retryOptions:{...t,...s.retryOptions}},{handler:n,dispatch:e}))}});var Mue=f((dit,bue)=>{"use strict";var Ht0=t0(),{InvalidArgumentError:Xt0,RequestAbortedError:Vt0}=m0(),jt0=fD(),VL=class extends jt0{#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 Xt0("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=Ht0.parseHeaders(r)["content-length"];if(o!=null&&o>this.#e)throw new Vt0(`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 $t0({maxSize:t}={maxSize:1024*1024}){return e=>function(s,n){let{dumpMaxSize:i=t}=s,o=new VL({maxSize:i},n);return e(s,o)}}bue.exports=$t0});var zue=f((fit,gue)=>{"use strict";var{isIP:Yt0}=require("node:net"),{lookup:Jt0}=require("node:dns"),Kt0=fD(),{InvalidArgumentError:Xh,InformationalError:Zt0}=m0(),mue=Math.pow(2,31)-1,jL=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 Zt0("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){Jt0(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===mue?(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===mue?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 $L(this,e,r)}},$L=class extends Kt0{#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":Zle(i)&&(r[n]=i);break;case"id":eAe(i)&&(r[n]=i);break;case"event":i.length>0&&(r[n]=i);break}}processEvent(e){e.retry&&Zle(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&eAe(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}}};tAe.exports={EventSourceStream:T8}});var pAe=f((Hit,uAe)=>{"use strict";var{pipeline:ci0}=require("node:stream"),{fetching:ui0}=Lz(),{makeRequest:pi0}=$h(),{webidl:Ou}=or(),{EventSourceStream:li0}=rAe(),{parseMIMEType:Ai0}=Ss(),{createFastMessageEvent:di0}=tb(),{isNetworkError:sAe}=Wz(),{delay:fi0}=v8(),{kEnumerableProperty:Id}=t0(),{environmentSettingsObject:nAe}=Mn(),iAe=!1,oAe=3e3,Kz=0,aAe=1,Zz=2,hi0="anonymous",bi0="use-credentials",ob=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#s=!1;#r=Kz;#n=null;#i=null;#c;#a;constructor(e,r={}){super(),Ou.util.markAsUncloneable(this);let s="EventSource constructor";Ou.argumentLengthCheck(arguments,1,s),iAe||(iAe=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Ou.converters.USVString(e,s,"url"),r=Ou.converters.EventSourceInitDict(r,s,"eventSourceInitDict"),this.#c=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:oAe};let n=nAe,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=hi0;r.withCredentials&&(o=bi0,this.#s=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=nAe.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=pi0(a),this.#o()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#s}#o(){if(this.#r===Zz)return;this.#r=Kz;let e={request:this.#n,dispatcher:this.#c},r=s=>{sAe(s)&&(this.dispatchEvent(new Event("error")),this.close()),this.#l()};e.processResponseEndOfBody=r,e.processResponse=s=>{if(sAe(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?Ai0(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=aAe,this.dispatchEvent(new Event("open")),this.#a.origin=s.urlList[s.urlList.length-1].origin;let a=new li0({eventSourceSettings:this.#a,push:c=>{this.dispatchEvent(di0(c.type,c.options))}});ci0(s.body.stream,a,c=>{c?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=ui0(e)}async#l(){this.#r!==Zz&&(this.#r=Kz,this.dispatchEvent(new Event("error")),await fi0(this.#a.reconnectionTime),this.#r===Kz&&(this.#a.lastEventId.length&&this.#n.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#o()))}close(){Ou.brandCheck(this,t),this.#r!==Zz&&(this.#r=Zz,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}},cAe={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Kz,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:aAe,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Zz,writable:!1}};Object.defineProperties(ob,cAe);Object.defineProperties(ob.prototype,cAe);Object.defineProperties(ob.prototype,{close:Id,onerror:Id,onmessage:Id,onopen:Id,readyState:Id,url:Id,withCredentials:Id});Ou.converters.EventSourceInitDict=Ou.dictionaryConverter([{key:"withCredentials",converter:Ou.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Ou.converters.any}]);uAe.exports={EventSource:ob,defaultReconnectionTime:oAe}});var cb=f((Xit,Se)=>{"use strict";var Mi0=Fh(),lAe=sz(),mi0=Th(),gi0=cae(),zi0=xh(),Oi0=iL(),Ei0=Nae(),yi0=_ae(),AAe=m0(),tq=t0(),{InvalidArgumentError:eq}=AAe,ab=Cce(),Ci0=iz(),Bi0=QL(),Di0=oue(),qi0=UL(),Ii0=qL(),Ri0=sD(),{getGlobalDispatcher:dAe,setGlobalDispatcher:wi0}=dD(),Si0=fD(),Ni0=XB(),vi0=VB();Object.assign(lAe.prototype,ab);Se.exports.Dispatcher=lAe;Se.exports.Client=Mi0;Se.exports.Pool=mi0;Se.exports.BalancedPool=gi0;Se.exports.Agent=zi0;Se.exports.ProxyAgent=Oi0;Se.exports.EnvHttpProxyAgent=Ei0;Se.e
Line truncated
|
||||
%s`,N,N,B,s);var x=B.type==="*"?QQ:B.type==="?"?LQ:"\\"+B.type;n=!0,s=s.slice(0,B.reStart)+x+"\\("+N}M(),i&&(s+="\\\\");var L=!1;switch(s.charAt(0)){case"[":case".":case"(":L=!0}for(var j=a.length-1;j>-1;j--){var fe=a[j],Ie=s.slice(0,fe.reStart),K=s.slice(fe.reStart,fe.reEnd-8),Be=s.slice(fe.reEnd-8,fe.reEnd),Y=s.slice(fe.reEnd);Be+=Y;var qe=Ie.split("(").length-1,_e=Y;for(g=0;g<qe;g++)_e=_e.replace(/\)[+*?]?/,"");Y=_e;var M0="";Y===""&&e!==Bq&&(M0="$");var p0=Ie+K+Y+M0+Be;s=p0}if(s!==""&&n&&(s="(?=.)"+s),L&&(s=A+s),e===Bq)return[s,n];if(!n)return $u0(t);var F0=r.nocase?"i":"";try{var gt=new RegExp("^"+s+"$",F0)}catch{return new RegExp("$.")}return gt._glob=t,gt._src=s,gt}In.makeRe=function(t,e){return new ur(t,e||{}).makeRe()};ur.prototype.makeRe=ju0;function ju0(){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?QQ:e.dot?Qu0:Pu0,s=e.nocase?"i":"",n=t.map(function(i){return i.map(function(o){return o===PQ?r:typeof o=="string"?Yu0(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}In.match=function(t,e,r){r=r||{};var s=new ur(e,r);return t=t.filter(function(n){return s.match(n)}),s.options.nonull&&!t.length&&t.push(e),t};ur.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;OO.sep!=="/"&&(e=e.split(OO.sep).join("/")),e=e.split(mfe),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};ur.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===PQ){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 $u0(t){return t.replace(/\\(.)/g,"$1")}function Yu0(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var gb=f((Xct,Bfe)=>{"use strict";var np0="2.0.0",ip0=Number.MAX_SAFE_INTEGER||9007199254740991,op0=16,ap0=250,cp0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Bfe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:op0,MAX_SAFE_BUILD_LENGTH:ap0,MAX_SAFE_INTEGER:ip0,RELEASE_TYPES:cp0,SEMVER_SPEC_VERSION:np0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var CO=f((Vct,Dfe)=>{"use strict";var up0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Dfe.exports=up0});var zb=f((Ca,qfe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:UQ,MAX_SAFE_BUILD_LENGTH:pp0,MAX_LENGTH:lp0}=gb(),Ap0=CO();Ca=qfe.exports={};var dp0=Ca.re=[],fp0=Ca.safeRe=[],pe=Ca.src=[],hp0=Ca.safeSrc=[],le=Ca.t={},bp0=0,GQ="[a-zA-Z0-9-]",Mp0=[["\\s",1],["\\d",lp0],[GQ,pp0]],mp0=t=>{for(let[e,r]of Mp0)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Xe=(t,e,r)=>{let s=mp0(e),n=bp0++;Ap0(t,n,e),le[t]=n,pe[n]=e,hp0[n]=s,dp0[n]=new RegExp(e,r?"g":void 0),fp0[n]=new RegExp(s,r?"g":void 0)};Xe("NUMERICIDENTIFIER","0|[1-9]\\d*");Xe("NUMERICIDENTIFIERLOOSE","\\d+");Xe("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${GQ}*`);Xe("MAINVERSION",`(${pe[le.NUMERICIDENTIFIER]})\\.(${pe[le.NUMERICIDENTIFIER]})\\.(${pe[le.NUMERICIDENTIFIER]})`);Xe("MAINVERSIONLOOSE",`(${pe[le.NUMERICIDENTIFIERLOOSE]})\\.(${pe[le.NUMERICIDENTIFIERLOOSE]})\\.(${pe[le.NUMERICIDENTIFIERLOOSE]})`);Xe("PRERELEASEIDENTIFIER",`(?:${pe[le.NONNUMERICIDENTIFIER]}|${pe[le.NUMERICIDENTIFIER]})`);Xe("PRERELEASEIDENTIFIERLOOSE",`(?:${pe[le.NONNUMERICIDENTIFIER]}|${pe[le.NUMERICIDENTIFIERLOOSE]})`);Xe("PRERELEASE",`(?:-(${pe[le.PRERELEASEIDENTIFIER]}(?:\\.${pe[le.PRERELEASEIDENTIFIER]})*))`);Xe("PRERELEASELOOSE",`(?:-?(${pe[le.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${pe[le.PRERELEASEIDENTIFIERLOOSE]})*))`);Xe("BUILDIDENTIFIER",`${GQ}+`);Xe("BUILD",`(?:\\+(${pe[le.BUILDIDENTIFIER]}(?:\\.${pe[le.BUILDIDENTIFIER]})*))`);Xe("FULLPLAIN",`v?${pe[le.MAINVERSION]}${pe[le.PRERELEASE]}?${pe[le.BUILD]}?`);Xe("FULL",`^${pe[le.FULLPLAIN]}$`);Xe("LOOSEPLAIN",`[v=\\s]*${pe[le.MAINVERSIONLOOSE]}${pe[le.PRERELEASELOOSE]}?${pe[le.BUILD]}?`);Xe("LOOSE",`^${pe[le.LOOSEPLAIN]}$`);Xe("GTLT","((?:<|>)?=?)");Xe("XRANGEIDENTIFIERLOOSE",`${pe[le.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Xe("XRANGEIDENTIFIER",`${pe[le.NUMERICIDENTIFIER]}|x|X|\\*`);Xe("XRANGEPLAIN",`[v=\\s]*(${pe[le.XRANGEIDENTIFIER]})(?:\\.(${pe[le.XRANGEIDENTIFIER]})(?:\\.(${pe[le.XRANGEIDENTIFIER]})(?:${pe[le.PRERELEASE]})?${pe[le.BUILD]}?)?)?`);Xe("XRANGEPLAINLOOSE",`[v=\\s]*(${pe[le.XRANGEIDENTIFIERLOOSE]})(?:\\.(${pe[le.XRANGEIDENTIFIERLOOSE]})(?:\\.(${pe[le.XRANGEIDENTIFIERLOOSE]})(?:${pe[le.PRERELEASELOOSE]})?${pe[le.BUILD]}?)?)?`);Xe("XRANGE",`^${pe[le.GTLT]}\\s*${pe[le.XRANGEPLAIN]}$`);Xe("XRANGELOOSE",`^${pe[le.GTLT]}\\s*${pe[le.XRANGEPLAINLOOSE]}$`);Xe("COERCEPLAIN",`(^|[^\\d])(\\d{1,${UQ}})(?:\\.(\\d{1,${UQ}}))?(?:\\.(\\d{1,${UQ}}))?`);Xe("COERCE",`${pe[le.COERCEPLAIN]}(?:$|[^\\d])`);Xe("COERCEFULL",pe[le.COERCEPLAIN]+`(?:${pe[le.PRERELEASE]})?(?:${pe[le.BUILD]})?(?:$|[^\\d])`);Xe("COERCERTL",pe[le.COERCE],!0);Xe("COERCERTLFULL",pe[le.COERCEFULL],!0);Xe("LONETILDE","(?:~>?)");Xe("TILDETRIM",`(\\s*)${pe[le.LONETILDE]}\\s+`,!0);Ca.tildeTrimReplace="$1~";Xe("TILDE",`^${pe[le.LONETILDE]}${pe[le.XRANGEPLAIN]}$`);Xe("TILDELOOSE",`^${pe[le.LONETILDE]}${pe[le.XRANGEPLAINLOOSE]}$`);Xe("LONECARET","(?:\\^)");Xe("CARETTRIM",`(\\s*)${pe[le.LONECARET]}\\s+`,!0);Ca.caretTrimReplace="$1^";Xe("CARET",`^${pe[le.LONECARET]}${pe[le.XRANGEPLAIN]}$`);Xe("CARETLOOSE",`^${pe[le.LONECARET]}${pe[le.XRANGEPLAINLOOSE]}$`);Xe("COMPARATORLOOSE",`^${pe[le.GTLT]}\\s*(${pe[le.LOOSEPLAIN]})$|^$`);Xe("COMPARATOR",`^${pe[le.GTLT]}\\s*(${pe[le.FULLPLAIN]})$|^$`);Xe("COMPARATORTRIM",`(\\s*)${pe[le.GTLT]}\\s*(${pe[le.LOOSEPLAIN]}|${pe[le.XRANGEPLAIN]})`,!0);Ca.comparatorTrimReplace="$1$2$3";Xe("HYPHENRANGE",`^\\s*(${pe[le.XRANGEPLAIN]})\\s+-\\s+(${pe[le.XRANGEPLAIN]})\\s*$`);Xe("HYPHENRANGELOOSE",`^\\s*(${pe[le.XRANGEPLAINLOOSE]})\\s+-\\s+(${pe[le.XRANGEPLAINLOOSE]})\\s*$`);Xe("STAR","(<|>)?=?\\s*\\*");Xe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Xe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Rq=f((jct,Ife)=>{"use strict";var gp0=Object.freeze({loose:!0}),zp0=Object.freeze({}),Op0=t=>t?typeof t!="object"?gp0:t:zp0;Ife.exports=Op0});var HQ=f(($ct,Sfe)=>{"use strict";var Rfe=/^[0-9]+$/,wfe=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Rfe.test(t),s=Rfe.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Ep0=(t,e)=>wfe(e
Line truncated
|
||||
`.trim())}};oue.exports=VL});var hD=h((aot,lue)=>{"use strict";var cue=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:kt0}=g0(),Ut0=Wh();pue()===void 0&&uue(new Ut0);function uue(t){if(!t||typeof t.dispatch!="function")throw new kt0("Argument agent must implement Agent");Object.defineProperty(globalThis,cue,{value:t,writable:!0,enumerable:!1,configurable:!1})}o(uue,"setGlobalDispatcher");function pue(){return globalThis[cue]}o(pue,"getGlobalDispatcher");lue.exports={setGlobalDispatcher:uue,getGlobalDispatcher:pue}});var bD=h((pot,Aue)=>{"use strict";Aue.exports=class{static{o(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var fue=h((Aot,due)=>{"use strict";var Gt0=jB();due.exports=t=>{let e=t?.maxRedirections;return r=>o(function(n,i){let{maxRedirections:a=e,...c}=n;if(!a)return r(n,i);let u=new Gt0(r,a,n,i);return r(c,u)},"redirectInterceptor")}});var bue=h((fot,hue)=>{"use strict";var Ht0=iD();hue.exports=t=>e=>o(function(s,n){return e(s,new Ht0({...s,retryOptions:{...t,...s.retryOptions}},{handler:n,dispatch:e}))},"retryInterceptor")});var mue=h((bot,Mue)=>{"use strict";var Xt0=r0(),{InvalidArgumentError:Vt0,RequestAbortedError:jt0}=g0(),$t0=bD(),jL=class extends $t0{static{o(this,"DumpHandler")}#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 Vt0("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 a=Xt0.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new jt0(`Response size (${a}) 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 Yt0({maxSize:t}={maxSize:1024*1024}){return e=>o(function(s,n){let{dumpMaxSize:i=t}=s,a=new jL({maxSize:i},n);return e(s,a)},"Intercept")}o(Yt0,"createDumpInterceptor");Mue.exports=Yt0});var Oue=h((mot,zue)=>{"use strict";var{isIP:Jt0}=require("node:net"),{lookup:Kt0}=require("node:dns"),Zt0=bD(),{InvalidArgumentError:Vh,InformationalError:e10}=g0(),gue=Math.pow(2,31)-1,$L=class{static{o(this,"DNSInstance")}#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,(a,c)=>{if(a||c==null||c.length===0){s(a??new e10("No DNS entries found"));return}this.setRecords(e,c);let u=this.#s.get(e.hostname),p=this.pick(e,u,i.affinity),l;typeof p.port=="number"?l=`:${p.port}`:e.port!==""?l=`:${e.port}`:l="",s(null,`${e.protocol}//${p.family===6?`[${p.address}]`:p.address}${l}`)});else{let a=this.pick(e,n,i.affinity);if(a==null){this.#s.delete(e.hostname),this.runLookup(e,r,s);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",s(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#r(e,r,s){Kt0(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(n,i)=>{if(n)return s(n);let a=new Map;for(let c of i)a.set(`${c.address}:${c.family}`,c);s(null,a.values())})}#n(e,r,s){let n=null,{records:i,offset:a}=r,c;if(this.dualStack?(s==null&&(a==null||a===gue?(r.offset=0,s=4):(r.offset++,s=(r.offset&1)===1?6:4)),i[s]!=null&&i[s].ips.length>0?c=i[s]:c=i[s===4?6:4]):c=i[s],c==null||c.ips.length===0)return n;c.offset==null||c.offset===gue?c.offset=0:c.offset++;let u=c.offset%c.ips.length;return n=c.ips[u]??null,n==null?n:Date.now()-n.timestamp>n.ttl?(c.ips.splice(u,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 a=n.records[i.family]??{ips:[]};a.ips.push(i),n.records[i.family]=a}this.#s.set(e.hostname,n)}getHandler(e,r){return new YL(this,e,r)}},YL=class extends Zt0{static{o(this,"DNSDispatchHan
Line truncated
|
||||
${i}`;break;case"retry":eAe(i)&&(r[n]=i);break;case"id":tAe(i)&&(r[n]=i);break;case"event":i.length>0&&(r[n]=i);break}}processEvent(e){e.retry&&eAe(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&tAe(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}}};rAe.exports={EventSourceStream:x8}});var lAe=h((Oat,pAe)=>{"use strict";var{pipeline:ui0}=require("node:stream"),{fetching:pi0}=Qz(),{makeRequest:li0}=Yh(),{webidl:Eu}=ar(),{EventSourceStream:Ai0}=sAe(),{parseMIMEType:di0}=Ns(),{createFastMessageEvent:fi0}=rb(),{isNetworkError:nAe}=_z(),{delay:hi0}=F8(),{kEnumerableProperty:Rd}=r0(),{environmentSettingsObject:iAe}=mn(),oAe=!1,aAe=3e3,Zz=0,cAe=1,eO=2,bi0="anonymous",Mi0="use-credentials",ab=class t extends EventTarget{static{o(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#s=!1;#r=Zz;#n=null;#i=null;#c;#a;constructor(e,r={}){super(),Eu.util.markAsUncloneable(this);let s="EventSource constructor";Eu.argumentLengthCheck(arguments,1,s),oAe||(oAe=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Eu.converters.USVString(e,s,"url"),r=Eu.converters.EventSourceInitDict(r,s,"eventSourceInitDict"),this.#c=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:aAe};let n=iAe,i;try{i=new URL(e,n.settingsObject.baseUrl),this.#a.origin=i.origin}catch(u){throw new DOMException(u,"SyntaxError")}this.#t=i.href;let a=bi0;r.withCredentials&&(a=Mi0,this.#s=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=iAe.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#n=li0(c),this.#o()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#s}#o(){if(this.#r===eO)return;this.#r=Zz;let e={request:this.#n,dispatcher:this.#c},r=o(s=>{nAe(s)&&(this.dispatchEvent(new Event("error")),this.close()),this.#l()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=s=>{if(nAe(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?di0(n):"failure",a=i!=="failure"&&i.essence==="text/event-stream";if(s.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=cAe,this.dispatchEvent(new Event("open")),this.#a.origin=s.urlList[s.urlList.length-1].origin;let c=new Ai0({eventSourceSettings:this.#a,push:o(u=>{this.dispatchEvent(fi0(u.type,u.options))},"push")});ui0(s.body.stream,c,u=>{u?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=pi0(e)}async#l(){this.#r!==eO&&(this.#r=Zz,this.dispatchEvent(new Event("error")),await hi0(this.#a.reconnectionTime),this.#r===Zz&&(this.#a.lastEventId.length&&this.#n.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#o()))}close(){Eu.brandCheck(this,t),this.#r!==eO&&(this.#r=eO,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}},uAe={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Zz,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:cAe,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:eO,writable:!1}};Object.defineProperties(ab,uAe);Object.defineProperties(ab.prototype,uAe);Object.defineProperties(ab.prototype,{close:Rd,onerror:Rd,onmessage:Rd,onopen:Rd,readyState:Rd,url:Rd,withCredentials:Rd});Eu.converters.EventSourceInitDict=Eu.dictionaryConverter([{key:"withCredentials",converter:Eu.converters.boolean,defaultValue:o(()=>!1,"defaultValue")},{key:"dispatcher",converter:Eu.converters.any}]);pAe.exports={EventSource:ab,defaultReconnectionTime:aAe}});var ub=h((yat,Ne)=>{"use strict";var mi0=Th(),AAe=nz(),gi0=xh(),zi0=uae(),Oi0=Wh(),Ei0=oL(),yi0=vae(),Ci0=Lae(),dAe=g0(),sq=r0(),{InvalidArgumentError:rq}=dAe,cb=Bce(),Bi0=oz(),Di0=PL(),qi0=aue(),Ii0=GL(),Ri0=IL(),wi0=iD(),{getGlobalDispatcher:fAe,setGlobalDispatcher:Si0}=hD(),Ni0=bD(),vi0=jB(),Fi0=$B();Object.assign(AAe.prototype,cb);Ne.exports.Dispatcher=AAe;Ne.exports.Client=mi0;Ne.exports.Pool=gi0;Ne.exports.BalancedPoo
Line truncated
|
||||
%s`,v,v,D,s);var W=D.type==="*"?PQ:D.type==="?"?QQ:"\\"+D.type;n=!0,s=s.slice(0,D.reStart)+W+"\\("+v}m(),i&&(s+="\\\\");var Q=!1;switch(s.charAt(0)){case"[":case".":case"(":Q=!0}for(var $=c.length-1;$>-1;$--){var he=c[$],Re=s.slice(0,he.reStart),Z=s.slice(he.reStart,he.reEnd-8),De=s.slice(he.reEnd-8,he.reEnd),J=s.slice(he.reEnd);De+=J;var Ie=Re.split("(").length-1,Le=J;for(z=0;z<Ie;z++)Le=Le.replace(/\)[+*?]?/,"");J=Le;var m0="";J===""&&e!==qq&&(m0="$");var l0=Re+Z+J+m0+De;s=l0}if(s!==""&&n&&(s="(?=.)"+s),Q&&(s=d+s),e===qq)return[s,n];if(!n)return Yu0(t);var T0=r.nocase?"i":"";try{var zt=new RegExp("^"+s+"$",T0)}catch{return new RegExp("$.")}return zt._glob=t,zt._src=s,zt}o(ju0,"parse");Rn.makeRe=function(t,e){return new pr(t,e||{}).makeRe()};pr.prototype.makeRe=$u0;function $u0(){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?PQ:e.dot?Pu0:ku0,s=e.nocase?"i":"",n=t.map(function(i){return i.map(function(a){return a===kQ?r:typeof a=="string"?Ju0(a):a._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,s)}catch{this.regexp=!1}return this.regexp}o($u0,"makeRe");Rn.match=function(t,e,r){r=r||{};var s=new pr(e,r);return t=t.filter(function(n){return s.match(n)}),s.options.nonull&&!t.length&&t.push(e),t};pr.prototype.match=o(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;EO.sep!=="/"&&(e=e.split(EO.sep).join("/")),e=e.split(gfe),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,a;for(a=e.length-1;a>=0&&(i=e[a],!i);a--);for(a=0;a<n.length;a++){var c=n[a],u=e;s.matchBase&&c.length===1&&(u=[i]);var p=this.matchOne(u,c,r);if(p)return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate},"match");pr.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,a=t.length,c=e.length;n<a&&i<c;n++,i++){this.debug("matchOne loop");var u=e[i],p=t[n];if(this.debug(e,u,p),u===!1)return!1;if(u===kQ){this.debug("GLOBSTAR",[e,u,p]);var l=n,A=i+1;if(A===c){for(this.debug("** at the end");n<a;n++)if(t[n]==="."||t[n]===".."||!s.dot&&t[n].charAt(0)===".")return!1;return!0}for(;l<a;){var d=t[l];if(this.debug(`
|
||||
globstar while`,t,l,e,A,d),this.matchOne(t.slice(l),e.slice(A),r))return this.debug("globstar found match!",l,a,d),!0;if(d==="."||d===".."||!s.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,l,e,A);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(r&&(this.debug(`
|
||||
>>> no match, partial?`,t,l,e,A),l===a))}var b;if(typeof u=="string"?(b=p===u,this.debug("string match",u,p,b)):(b=p.match(u),this.debug("pattern match",u,p,b)),!b)return!1}if(n===a&&i===c)return!0;if(n===a)return r;if(i===c)return n===a-1&&t[n]==="";throw new Error("wtf?")};function Yu0(t){return t.replace(/\\(.)/g,"$1")}o(Yu0,"globUnescape");function Ju0(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(Ju0,"regExpEscape")});var zb=h((Zlt,Dfe)=>{"use strict";var ip0="2.0.0",op0=Number.MAX_SAFE_INTEGER||9007199254740991,ap0=16,cp0=250,up0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Dfe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:ap0,MAX_SAFE_BUILD_LENGTH:cp0,MAX_SAFE_INTEGER:op0,RELEASE_TYPES:up0,SEMVER_SPEC_VERSION:ip0,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var BO=h((eAt,qfe)=>{"use strict";var pp0=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};qfe.exports=pp0});var Ob=h((Ba,Ife)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:GQ,MAX_SAFE_BUILD_LENGTH:lp0,MAX_LENGTH:Ap0}=zb(),dp0=BO();Ba=Ife.exports={};var fp0=Ba.re=[],hp0=Ba.safeRe=[],le=Ba.src=[],bp0=Ba.safeSrc=[],Ae=Ba.t={},Mp0=0,HQ="[a-zA-Z0-9-]",mp0=[["\\s",1],["\\d",Ap0],[HQ,lp0]],gp0=o(t=>{for(let[e,r]of mp0)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),Ve=o((t,e,r)=>{let s=gp0(e),n=Mp0++;dp0(t,n,e),Ae[t]=n,le[n]=e,bp0[n]=s,fp0[n]=new RegExp(e,r?"g":void 0),hp0[n]=new RegExp(s,r?"g":void 0)},"createToken");Ve("NUMERICIDENTIFIER","0|[1-9]\\d*");Ve("NUMERICIDENTIFIERLOOSE","\\d+");Ve("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${HQ}*`);Ve("MAINVERSION",`(${le[Ae.NUMERICIDENTIFIER]})\\.(${le[Ae.NUMERICIDENTIFIER]})\\.(${le[Ae.NUMERICIDENTIFIER]})`);Ve("MAINVERSIONLOOSE",`(${le[Ae.NUMERICIDENTIFIERLOOSE]})\\.(${le[Ae.NUMERICIDENTIFIERLOOSE]})\\.(${le[Ae.NUMERICIDENTIFIERLOOSE]})`);Ve("PRERELEASEIDENTIFIER",`(?:${le[Ae.NONNUMERICIDENTIFIER]}|${le[Ae.NUMERICIDENTIFIER]})`);Ve("PRERELEASEIDENTIFIERLOOSE",`(?:${le[Ae.NONNUMERICIDENTIFIER]}|${le[Ae.NUMERICIDENTIFIERLOOSE]})`);Ve("PRERELEASE",`(?:-(${le[Ae.PRERELEASEIDENTIFIER]}(?:\\.${le[Ae.PRERELEASEIDENTIFIER]})*))`);Ve("PRERELEASELOOSE",`(?:-?(${le[Ae.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${le[Ae.PRERELEASEIDENTIFIERLOOSE]})*))`);Ve("BUILDIDENTIFIER",`${HQ}+`);Ve("BUILD",`(?:\\+(${le[Ae.BUILDIDENTIFIER]}(?:\\.${le[Ae.BUILDIDENTIFIER]})*))`);Ve("FULLPLAIN",`v?${le[Ae.MAINVERSION]}${le[Ae.PRERELEASE]}?${le[Ae.BUILD]}?`);Ve("FULL",`^${le[Ae.FULLPLAIN]}$`);Ve("LOOSEPLAIN",`[v=\\s]*${le[Ae.MAINVERSIONLOOSE]}${le[Ae.PRERELEASELOOSE]}?${le[Ae.BUILD]}?`);Ve("LOOSE",`^${le[Ae.LOOSEPLAIN]}$`);Ve("GTLT","((?:<|>)?=?)");Ve("XRANGEIDENTIFIERLOOSE",`${le[Ae.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ve("XRANGEIDENTIFIER",`${le[Ae.NUMERICIDENTIFIER]}|x|X|\\*`);Ve("XRANGEPLAIN",`[v=\\s]*(${le[Ae.XRANGEIDENTIFIER]})(?:\\.(${le[Ae.XRANGEIDENTIFIER]})(?:\\.(${le[Ae.XRANGEIDENTIFIER]})(?:${le[Ae.PRERELEASE]})?${le[Ae.BUILD]}?)?)?`);Ve("XRANGEPLAINLOOSE",`[v=\\s]*(${le[Ae.XRANGEIDENTIFIERLOOSE]})(?:\\.(${le[Ae.XRANGEIDENTIFIERLOOSE]})(?:\\.(${le[Ae.XRANGEIDENTIFIERLOOSE]})(?:${le[Ae.PRERELEASELOOSE]})?${le[Ae.BUILD]}?)?)?`);Ve("XRANGE",`^${le[Ae.GTLT]}\\s*${le[Ae.XRANGEPLAIN]}$`);Ve("XRANGELOOSE",`^${le[Ae.GTLT]}\\s*${le[Ae.XRANGEPLAINLOOSE]}$`);Ve("COERCEPLAIN",`(^|[^\\d])(\\d{1,${GQ}})(?:\\.(\\d{1,${GQ}}))?(?:\\.(\\d{1,${GQ}}))?`);Ve("COERCE",`${le[Ae.COERCEPLAIN]}(?:$|[^\\d])`);Ve("COERCEFULL",le[Ae.COERCEPLAIN]+`(?:${le[Ae.PRERELEASE]})?(?:${le[Ae.BUILD]})?(?:$|[^\\d])`);Ve("COERCERTL",le[Ae.COERCE],!0);Ve("COERCERTLFULL",le[Ae.COERCEFULL],!0);Ve("LONETILDE","(?:~>?)");Ve("TILDETRIM",`(\\s*)${le[Ae.LONETILDE]}\\s+`,!0);Ba.tildeTrimReplace="$1~";Ve("TILDE",`^${le[Ae.LONETILDE]}${le[Ae.XRANGEPLAIN]}$`);Ve("TILDELOOSE",`^${le[Ae.LONETILDE]}${le[Ae.XRANGEPLAINLOOSE]}$`);Ve("LONECARET","(?:\\^)");Ve("CARETTRIM",`(\\s*)${le[Ae.LONECARET]}\\s+`,!0);Ba.caretTrimReplace="$1^";Ve("CARET",`^${le[Ae.LONECARET]}${le[Ae.XRANGEPLAIN]}$`);Ve("CARETLOOSE",`^${le[Ae.LONECARET]}${le[Ae.XRANGEPLAINLOOSE]}$`);Ve("COMPARATORLOOSE",`^${le[Ae.GTLT]}\\s*(${le[Ae.LOOSEPLAIN]})$|^$`);Ve("COMPARATOR",`^${le[Ae.GTLT]}\\s*(${le[Ae.FULLPLAIN]})$|^$`);Ve("COMPARATORTRIM",`(\\s*)${le[Ae.GTLT]}\\s*(${le[Ae.LOOSEPLAIN]}|${le[Ae.XRANGEPLAIN]})`,!0);Ba.comparatorTrimReplace="$1$2$3";Ve("HYPHENRANGE",`^\\s*(${le[Ae.XRANGEPLAIN]})\\s+-\\s+(${le[Ae.XRANGEPLAIN]})\\s*$`);Ve("HYPHENRANGELOOSE",`^\\s*(${le[Ae.XRANGEPLAINLOOSE]})\\s+-\\s+(${le[Ae.XRANGEPLAINLOOSE]})\\s*$`);Ve("STAR","(<|>)?=?\\s*\\*");Ve("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ve("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Sq=h((rAt,Rfe)=>{"use strict";var zp0=Object.freeze({loose:!0}),Op0=Object.freeze({}),Ep0=o(t=>t?typeof t!="object"?zp0:t:Op0,"parseOptions");Rfe.exports=Ep0});var XQ=h((nAt,Nfe)=>{"use strict";var wfe=/^[0-9]+$/,Sfe=o((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=wfe
Line truncated
|
||||
`).join(`
|
||||
`+i),t.push(n+"m+"+fI.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=a20()+e+" "+t[0]}function a20(){return Ar.inspectOpts.hideDate?"":new Date().toISOString()+" "}function c20(...t){return process.stderr.write(dI.format(...t)+`
|
||||
`)}function u20(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function p20(){return process.env.DEBUG}function l20(t){t.inspectOpts={};let e=Object.keys(Ar.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Ar.inspectOpts[e[r]]}fI.exports=vP()(Ar);var{formatters:uMe}=fI.exports;uMe.o=function(t){return this.inspectOpts.colors=this.useColors,dI.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};uMe.O=function(t){return this.inspectOpts.colors=this.useColors,dI.inspect(t,this.inspectOpts)}});var Gd=f((Alt,WP)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?WP.exports=nMe():WP.exports=pMe()});var dMe=f(_s=>{"use strict";var A20=_s&&_s.__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]})),d20=_s&&_s.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),lMe=_s&&_s.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&A20(e,t,r);return d20(e,t),e};Object.defineProperty(_s,"__esModule",{value:!0});_s.req=_s.json=_s.toBuffer=void 0;var f20=lMe(require("http")),h20=lMe(require("https"));async function AMe(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}_s.toBuffer=AMe;async function b20(t){let r=(await AMe(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=` (input: ${r})`,n}}_s.json=b20;function M20(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?h20:f20).request(t,e),n=new Promise((i,o)=>{s.once("response",i).once("error",o).end()});return s.then=n.then.bind(n),s}_s.req=M20});var MMe=f(vn=>{"use strict";var hMe=vn&&vn.__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]})),m20=vn&&vn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bMe=vn&&vn.__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)&&hMe(e,t,r);return m20(e,t),e},g20=vn&&vn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&hMe(e,t,r)};Object.defineProperty(vn,"__esModule",{value:!0});vn.Agent=void 0;var z20=bMe(require("net")),fMe=bMe(require("http")),O20=require("https");g20(dMe(),vn);var Ia=Symbol("AgentBaseInternalState"),_P=class extends fMe.Agent{constructor(e){super(e),this[Ia]={}}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 z20.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)?O20.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 fMe.Agent)try{return a.addRequest(e,n)}catch(c){return s(c)}this[Ia].currentSocket=a,super.createSocket(e,r,s)},a=>{this.decrementSockets(i,o),s(a)})}createConnection(){let e=this[Ia].currentSocket;if(this[Ia].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Ia].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Ia]&&(this[Ia].defaultPort=e)}get protocol(){return this[Ia].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Ia]&&(this[Ia].protocol=e)}};vn.Agent=_P});var mMe=f(wb=>{"use strict";var E20=wb&&wb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wb,"__esModule",{value:!0});wb.parseProxyResponse=void 0;var y20=E20(Gd()),hI=(0,y20.default)("https-proxy-agent:parse-proxy-response");function C20(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(),hI("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){o(),hI("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(n+"m+"+bI.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=c20()+e+" "+t[0]}o(a20,"formatArgs");function c20(){return dr.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(c20,"getDate");function u20(...t){return process.stderr.write(hI.format(...t)+`
|
||||
`)}o(u20,"log");function p20(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(p20,"save");function l20(){return process.env.DEBUG}o(l20,"load");function A20(t){t.inspectOpts={};let e=Object.keys(dr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=dr.inspectOpts[e[r]]}o(A20,"init");bI.exports=FP()(dr);var{formatters:pMe}=bI.exports;pMe.o=function(t){return this.inspectOpts.colors=this.useColors,hI.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};pMe.O=function(t){return this.inspectOpts.colors=this.useColors,hI.inspect(t,this.inspectOpts)}});var Hd=h((Hft,_P)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?_P.exports=iMe():_P.exports=lMe()});var fMe=h(Ls=>{"use strict";var d20=Ls&&Ls.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),f20=Ls&&Ls.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),AMe=Ls&&Ls.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&d20(e,t,r);return f20(e,t),e};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.req=Ls.json=Ls.toBuffer=void 0;var h20=AMe(require("http")),b20=AMe(require("https"));async function dMe(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}o(dMe,"toBuffer");Ls.toBuffer=dMe;async function M20(t){let r=(await dMe(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=` (input: ${r})`,n}}o(M20,"json");Ls.json=M20;function m20(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?b20:h20).request(t,e),n=new Promise((i,a)=>{s.once("response",i).once("error",a).end()});return s.then=n.then.bind(n),s}o(m20,"req");Ls.req=m20});var mMe=h(Fn=>{"use strict";var bMe=Fn&&Fn.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),g20=Fn&&Fn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),MMe=Fn&&Fn.__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)&&bMe(e,t,r);return g20(e,t),e},z20=Fn&&Fn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bMe(e,t,r)};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.Agent=void 0;var O20=MMe(require("net")),hMe=MMe(require("http")),E20=require("https");z20(fMe(),Fn);var Ra=Symbol("AgentBaseInternalState"),LP=class extends hMe.Agent{static{o(this,"Agent")}constructor(e){super(e),this[Ra]={}}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 O20.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)?E20.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,s){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(n),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,n)).then(c=>{if(this.decrementSockets(i,a),c instanceof hMe.Agent)try{return c.addRequest(e,n)}catch(u){return s(u)}this[Ra].currentSocket=c,super.createSocket(e,r,s)},c=>{this.decrementSockets(i,a),s(c)})}createConnection(){let e=this[Ra].currentSocket;if(this[Ra].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Ra].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Ra]&&(this[Ra].defaultPort=e)}get protocol(){return this[Ra].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Ra]&&(this[Ra].protocol=e)}};Fn.Agent=LP});var gMe=h(Sb=>{"use strict";var y20=Sb&&Sb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sb,"__esModule",{value:!0});Sb.parseProxyResponse=void 0;var C20=y20(Hd()),MI=(0,C20.default)("https-proxy-agent:parse-proxy-response");function B20(t){return new Promise((e,r)=>{let s=0,n=[];function i(){let l=t.read();l?p(l):t.once("readable",i)}o(i,"read");function a(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",i)}o(a,"cleanup");function c(){a(),MI("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function u(l){a(),MI("onerror %o",l),r(l)}o(u,"onerror");function p(l){n.push(l),s+=l.length;let A=Buffer.concat(n,s),d=A.indexOf(`\r
|
||||
\r
|
||||
`);if(A===-1){hI("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(),x=I.slice(R+1).trimStart(),L=B[N];typeof L=="string"?B[N]=[L,x]:Array.isArray(L)?L.push(x):B[N]=x}hI("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()})}wb.parseProxyResponse=C20});var CMe=f(Ci=>{"use strict";var B20=Ci&&Ci.__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]})),D20=Ci&&Ci.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),EMe=Ci&&Ci.__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)&&B20(e,t,r);return D20(e,t),e},yMe=Ci&&Ci.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ci,"__esModule",{value:!0});Ci.HttpsProxyAgent=void 0;var bI=EMe(require("net")),gMe=EMe(require("tls")),q20=yMe(require("assert")),I20=yMe(Gd()),R20=MMe(),w20=require("url"),S20=mMe(),LO=(0,I20.default)("https-proxy-agent"),zMe=t=>t.servername===void 0&&t.host&&!bI.isIP(t.host)?{...t,servername:t.host}:t,MI=class extends R20.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new w20.URL(e):e,this.proxyHeaders=r?.headers??{},LO("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?OMe(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:"?(LO("Creating `tls.Socket`: %o",this.connectOpts),n=gMe.connect(zMe(this.connectOpts))):(LO("Creating `net.Socket`: %o",this.connectOpts),n=bI.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=bI.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,S20.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",N20),r.secureEndpoint?(LO("Upgrading socket connection to TLS"),gMe.connect({...OMe(zMe(r),"host","path","port"),socket:n})):n;n.destroy();let l=new bI.Socket({writable:!1});return l.readable=!0,e.once("socket",A=>{LO("Replaying proxy buffer for failed request"),(0,q20.default)(A.listenerCount("data")>0),A.push(p),A.push(null)}),l}};MI.protocols=["http","https"];Ci.HttpsProxyAgent=MI;function N20(t){t.resume()}function OMe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var qMe=f(Ls=>{"use strict";var v20=Ls&&Ls.__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]})),F20=Ls&&Ls.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),BMe=Ls&&Ls.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&v20(e,t,r);return F20(e,t),e};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.req=Ls.json=Ls.toBuffer=void 0;var T20=BMe(require("http")),x20=BMe(require("https"));async function DMe(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}Ls.toBuffer=DMe;async function W20(t){let r=(await DMe(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=` (input: ${r})`,n}}Ls.json=W20;function _20(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?x20:T20).request(t,e),n=new Promise((i,o)=>{s.once("response",i).once("error",o).end()});return s.then=n.then.bind(n),s}Ls.req=_20});var QO=f(Fn=>{"use strict";var RMe=Fn&&Fn.__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]})),L20=Fn&&Fn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wMe=Fn&&Fn.__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)&&RMe(e,t,r);return L20(e,t),e},Q20=Fn&&Fn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&RMe(e,t,r)};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.Agent=void 0;var P20=wMe(require("net")),IMe=wMe(require("http")),k20=require("https");Q20(qMe(),Fn);var Ra=Symbol("AgentBaseInternalState"),LP=class extends IMe.Agent{constructor(e){super(e),this[Ra]={}}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 P20.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))?k20.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 IMe.Agent)return a.addRequest(e,n);this[Ra].currentSocket=a,super.createSocket(e,r,s)},a=>{this.decrementSockets(i,o),s(a)})}createConnection(){let e=this[Ra].currentSocket;if(this[Ra].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Ra].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Ra]&&(this[Ra].defaultPort=e)}get protocol(){return this[Ra].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Ra]&&(this[Ra].protocol=e)}};Fn.Agent=LP});var QP=f(Bi=>{"use strict";var U20=Bi&&Bi.__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]})),G20=Bi&&Bi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),NMe=Bi&&Bi.__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)&&U20(e,t,r);return G20(e,t),e},H20=Bi&&Bi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.HttpProxyAgent=void 0;var X20=NMe(require("net")),V20=NMe(require("tls")),j20=H20(Gd()),$20=require("events"),Y20=QO(),SMe=require("url"),Sb=(0,j20.default)("http-proxy-agent"),mI=class extends Y20.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new SMe.URL(e):e,this.proxyHeaders=r?.headers??{},Sb("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?J20(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 SMe.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;Sb("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Sb("Patching connection write() output buffer with updated header"),s=e.outputData[0].data,n=s.indexOf(`\r
|
||||
`);if(d===-1){MI("have not received end of HTTP headers yet..."),i();return}let b=A.slice(0,d).toString("ascii").split(`\r
|
||||
`),m=b.shift();if(!m)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let z=m.split(" "),C=+z[1],E=z.slice(2).join(" "),D={};for(let R of b){if(!R)continue;let w=R.indexOf(":");if(w===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${R}"`));let v=R.slice(0,w).toLowerCase(),W=R.slice(w+1).trimStart(),Q=D[v];typeof Q=="string"?D[v]=[Q,W]:Array.isArray(Q)?Q.push(W):D[v]=W}MI("got proxy server response: %o %o",m,D),a(),e({connect:{statusCode:C,statusText:E,headers:D},buffered:A})}o(p,"ondata"),t.on("error",u),t.on("end",c),i()})}o(B20,"parseProxyResponse");Sb.parseProxyResponse=B20});var BMe=h(Bi=>{"use strict";var D20=Bi&&Bi.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),q20=Bi&&Bi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),yMe=Bi&&Bi.__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)&&D20(e,t,r);return q20(e,t),e},CMe=Bi&&Bi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.HttpsProxyAgent=void 0;var mI=yMe(require("net")),zMe=yMe(require("tls")),I20=CMe(require("assert")),R20=CMe(Hd()),w20=mMe(),S20=require("url"),N20=gMe(),QO=(0,R20.default)("https-proxy-agent"),OMe=o(t=>t.servername===void 0&&t.host&&!mI.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),gI=class extends w20.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new S20.URL(e):e,this.proxyHeaders=r?.headers??{},QO("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?EMe(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:"?(QO("Creating `tls.Socket`: %o",this.connectOpts),n=zMe.connect(OMe(this.connectOpts))):(QO("Creating `net.Socket`: %o",this.connectOpts),n=mI.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=mI.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
||||
`;if(s.username||s.password){let d=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}i.Host=`${a}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))c+=`${d}: ${i[d]}\r
|
||||
`;let u=(0,N20.parseProxyResponse)(n);n.write(`${c}\r
|
||||
`);let{connect:p,buffered:l}=await u;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",v20),r.secureEndpoint?(QO("Upgrading socket connection to TLS"),zMe.connect({...EMe(OMe(r),"host","path","port"),socket:n})):n;n.destroy();let A=new mI.Socket({writable:!1});return A.readable=!0,e.once("socket",d=>{QO("Replaying proxy buffer for failed request"),(0,I20.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),A}};gI.protocols=["http","https"];Bi.HttpsProxyAgent=gI;function v20(t){t.resume()}o(v20,"resume");function EMe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(EMe,"omit")});var IMe=h(Qs=>{"use strict";var F20=Qs&&Qs.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),T20=Qs&&Qs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),DMe=Qs&&Qs.__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)&&F20(e,t,r);return T20(e,t),e};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.req=Qs.json=Qs.toBuffer=void 0;var x20=DMe(require("http")),W20=DMe(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)}o(qMe,"toBuffer");Qs.toBuffer=qMe;async function _20(t){let r=(await qMe(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=` (input: ${r})`,n}}o(_20,"json");Qs.json=_20;function L20(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?W20:x20).request(t,e),n=new Promise((i,a)=>{s.once("response",i).once("error",a).end()});return s.then=n.then.bind(n),s}o(L20,"req");Qs.req=L20});var PO=h(Tn=>{"use strict";var wMe=Tn&&Tn.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Q20=Tn&&Tn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),SMe=Tn&&Tn.__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)&&wMe(e,t,r);return Q20(e,t),e},P20=Tn&&Tn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&wMe(e,t,r)};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.Agent=void 0;var k20=SMe(require("net")),RMe=SMe(require("http")),U20=require("https");P20(IMe(),Tn);var wa=Symbol("AgentBaseInternalState"),QP=class extends RMe.Agent{static{o(this,"Agent")}constructor(e){super(e),this[wa]={}}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 k20.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))?U20.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,s){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(n),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,n)).then(c=>{if(this.decrementSockets(i,a),c instanceof RMe.Agent)return c.addRequest(e,n);this[wa].currentSocket=c,super.createSocket(e,r,s)},c=>{this.decrementSockets(i,a),s(c)})}createConnection(){let e=this[wa].currentSocket;if(this[wa].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[wa].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[wa]&&(this[wa].defaultPort=e)}get protocol(){return this[wa].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[wa]&&(this[wa].protocol=e)}};Tn.Agent=QP});var PP=h(Di=>{"use strict";var G20=Di&&Di.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),H20=Di&&Di.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vMe=Di&&Di.__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)&&G20(e,t,r);return H20(e,t),e},X20=Di&&Di.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Di,"__esModule",{value:!0});Di.HttpProxyAgent=void 0;var V20=vMe(require("net")),j20=vMe(require("tls")),$20=X20(Hd()),Y20=require("events"),J20=PO(),NMe=require("url"),Nb=(0,$20.default)("http-proxy-agent"),zI=class extends J20.Agent{static{o(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new NMe.URL(e):e,this.proxyHeaders=r?.headers??{},Nb("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?K20(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",a=`${n}//${i}`,c=new NMe.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(s.username||s.password){let p=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.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 l=u[p];l&&e.setHeader(p,l)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let s,n;Nb("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Nb("Patching connection write() output buffer with updated header"),s=e.outputData[0].data,n=s.indexOf(`\r
|
||||
\r
|
||||
`)+4,e.outputData[0].data=e._header+s.substring(n),Sb("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(Sb("Creating `tls.Socket`: %o",this.connectOpts),i=V20.connect(this.connectOpts)):(Sb("Creating `net.Socket`: %o",this.connectOpts),i=X20.connect(this.connectOpts)),await(0,$20.once)(i,"connect"),i}};mI.protocols=["http","https"];Bi.HttpProxyAgent=mI;function J20(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var eme=f(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});NI.state=void 0;NI.state={instrumenterImplementation:void 0}});var Mme=f(WI=>{"use strict";Object.defineProperty(WI,"__esModule",{value:!0});WI.state=void 0;WI.state={operationRequestMap:new WeakMap}});var $ze=f($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:!0});var Mg0=require("os"),mg0=require("util");function gg0(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var zg0=gg0(mg0);function Og0(t,...e){process.stderr.write(`${zg0.default.format(t,...e)}${Mg0.EOL}`)}var Lze=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Pze,mG=[],gG=[],rR=[];Lze&&zG(Lze);var kze=Object.assign(t=>Uze(t),{enable:zG,enabled:OG,disable:Eg0,log:Og0});function zG(t){Pze=t,mG=[],gG=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?gG.push(new RegExp(`^${s.substr(1)}$`)):mG.push(new RegExp(`^${s}$`));for(let s of rR)s.enabled=OG(s.namespace)}function OG(t){if(t.endsWith("*"))return!0;for(let e of gG)if(e.test(t))return!1;for(let e of mG)if(e.test(t))return!0;return!1}function Eg0(){let t=Pze||"";return zG(""),t}function Uze(t){let e=Object.assign(r,{enabled:OG(t),destroy:yg0,log:kze.log,namespace:t,extend:Cg0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t} ${s[0]}`),e.log(...s))}return rR.push(e),e}function yg0(){let t=rR.indexOf(this);return t>=0?(rR.splice(t,1),!0):!1}function Cg0(t){let e=Uze(`${this.namespace}:${t}`);return e.log=this.log,e}var q3=kze,Gze=new Set,eR=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,sR,nR=q3("azure");nR.log=(...t)=>{q3.log(...t)};var EG=["verbose","info","warning","error"];eR&&(jze(eR)?Hze(eR):console.error(`AZURE_LOG_LEVEL set to unknown log level '${eR}'; logging is not enabled. Acceptable values: ${EG.join(", ")}.`));function Hze(t){if(t&&!jze(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${EG.join(",")}`);sR=t;let e=[];for(let r of Gze)Vze(r)&&e.push(r.namespace);q3.enable(e.join(","))}function Bg0(){return sR}var Qze={verbose:400,info:300,warning:200,error:100};function Dg0(t){let e=nR.extend(t);return Xze(nR,e),{error:tR(e,"error"),warning:tR(e,"warning"),info:tR(e,"info"),verbose:tR(e,"verbose")}}function Xze(t,e){e.log=(...r)=>{t.log(...r)}}function tR(t,e){let r=Object.assign(t.extend(e),{level:e});if(Xze(t,r),Vze(r)){let s=q3.disable();q3.enable(s+","+r.namespace)}return Gze.add(r),r}function Vze(t){return!!(sR&&Qze[t.level]<=Qze[sR])}function jze(t){return EG.includes(t)}$b.AzureLogger=nR;$b.createClientLogger=Dg0;$b.getLogLevel=Bg0;$b.setLogLevel=Hze});var BG=f(R3=>{"use strict";Object.defineProperty(R3,"__esModule",{value:!0});var Yb=new WeakMap,iR=new WeakMap,I3=class t{constructor(){this.onabort=null,Yb.set(this,[]),iR.set(this,!1)}get aborted(){if(!iR.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return iR.get(this)}static get none(){return new t}addEventListener(e,r){if(!Yb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Yb.get(this).push(r)}removeEventListener(e,r){if(!Yb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=Yb.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 Yze(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=Yb.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),iR.set(t,!0)}var yG=class extends Error{constructor(e){super(e),this.name="AbortError"}},CG=class{constructor(e){if(this._signal=new I3,!!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(){Yze(this._signal)}static timeout(e){let r=new I3,s=setTimeout(Yze,e,r);return typeof s.unref=="function"&&s.unref(),r}};R3.AbortController=CG;R3.AbortError=yG;R3.AbortSignal=I3});var tOe=f(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});var qg0=BG(),NG=require("crypto");function Jze(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,o)=>{function a(){o(new qg0.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 Ig0="The delay was
Line truncated
|
||||
`)+4,e.outputData[0].data=e._header+s.substring(n),Nb("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(Nb("Creating `tls.Socket`: %o",this.connectOpts),i=j20.connect(this.connectOpts)):(Nb("Creating `net.Socket`: %o",this.connectOpts),i=V20.connect(this.connectOpts)),await(0,Y20.once)(i,"connect"),i}};zI.protocols=["http","https"];Di.HttpProxyAgent=zI;function K20(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(K20,"omit")});var tme=h(FI=>{"use strict";Object.defineProperty(FI,"__esModule",{value:!0});FI.state=void 0;FI.state={instrumenterImplementation:void 0}});var mme=h(LI=>{"use strict";Object.defineProperty(LI,"__esModule",{value:!0});LI.state=void 0;LI.state={operationRequestMap:new WeakMap}});var Yze=h(Yb=>{"use strict";Object.defineProperty(Yb,"__esModule",{value:!0});var mg0=require("os"),gg0=require("util");function zg0(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}o(zg0,"_interopDefaultLegacy");var Og0=zg0(gg0);function Eg0(t,...e){process.stderr.write(`${Og0.default.format(t,...e)}${mg0.EOL}`)}o(Eg0,"log");var Qze=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,kze,gG=[],zG=[],nR=[];Qze&&OG(Qze);var Uze=Object.assign(t=>Gze(t),{enable:OG,enabled:EG,disable:yg0,log:Eg0});function OG(t){kze=t,gG=[],zG=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?zG.push(new RegExp(`^${s.substr(1)}$`)):gG.push(new RegExp(`^${s}$`));for(let s of nR)s.enabled=EG(s.namespace)}o(OG,"enable");function EG(t){if(t.endsWith("*"))return!0;for(let e of zG)if(e.test(t))return!1;for(let e of gG)if(e.test(t))return!0;return!1}o(EG,"enabled");function yg0(){let t=kze||"";return OG(""),t}o(yg0,"disable");function Gze(t){let e=Object.assign(r,{enabled:EG(t),destroy:Cg0,log:Uze.log,namespace:t,extend:Bg0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t} ${s[0]}`),e.log(...s))}return o(r,"debug"),nR.push(e),e}o(Gze,"createDebugger");function Cg0(){let t=nR.indexOf(this);return t>=0?(nR.splice(t,1),!0):!1}o(Cg0,"destroy");function Bg0(t){let e=Gze(`${this.namespace}:${t}`);return e.log=this.log,e}o(Bg0,"extend");var I3=Uze,Hze=new Set,rR=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,iR,oR=I3("azure");oR.log=(...t)=>{I3.log(...t)};var yG=["verbose","info","warning","error"];rR&&($ze(rR)?Xze(rR):console.error(`AZURE_LOG_LEVEL set to unknown log level '${rR}'; logging is not enabled. Acceptable values: ${yG.join(", ")}.`));function Xze(t){if(t&&!$ze(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${yG.join(",")}`);iR=t;let e=[];for(let r of Hze)jze(r)&&e.push(r.namespace);I3.enable(e.join(","))}o(Xze,"setLogLevel");function Dg0(){return iR}o(Dg0,"getLogLevel");var Pze={verbose:400,info:300,warning:200,error:100};function qg0(t){let e=oR.extend(t);return Vze(oR,e),{error:sR(e,"error"),warning:sR(e,"warning"),info:sR(e,"info"),verbose:sR(e,"verbose")}}o(qg0,"createClientLogger");function Vze(t,e){e.log=(...r)=>{t.log(...r)}}o(Vze,"patchLogMethod");function sR(t,e){let r=Object.assign(t.extend(e),{level:e});if(Vze(t,r),jze(r)){let s=I3.disable();I3.enable(s+","+r.namespace)}return Hze.add(r),r}o(sR,"createLogger");function jze(t){return!!(iR&&Pze[t.level]<=Pze[iR])}o(jze,"shouldEnable");function $ze(t){return yG.includes(t)}o($ze,"isAzureLogLevel");Yb.AzureLogger=oR;Yb.createClientLogger=qg0;Yb.getLogLevel=Dg0;Yb.setLogLevel=Xze});var DG=h(w3=>{"use strict";Object.defineProperty(w3,"__esModule",{value:!0});var Jb=new WeakMap,aR=new WeakMap,R3=class t{static{o(this,"AbortSignal")}constructor(){this.onabort=null,Jb.set(this,[]),aR.set(this,!1)}get aborted(){if(!aR.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return aR.get(this)}static get none(){return new t}addEventListener(e,r){if(!Jb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Jb.get(this).push(r)}removeEventListener(e,r){if(!Jb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=Jb.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 Jze(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=Jb.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),aR.set(t,!0)}o(Jze,"abortSignal");var CG=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},BG=class{static{o(this,"AbortController")}constructor(e){if(this._signal=new R3,!!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(){Jze(this._signal)}static timeout(e){let r=new R3,s=setTimeout(Jze,e,r);return typeof s.unref=="function"&&s.unref(),r}};w3.AbortController=BG;w3.AbortError=CG;w3.AbortSignal=R3});var rOe=h(Nt=>{"use strict";Object.defineP
Line truncated
|
||||
Polling from: ${r.config.operationLocation}
|
||||
Operation status: ${p}
|
||||
Polling status: ${iOe.includes(p)?"Stopped":"Running"}`),p==="succeeded"){let l=o(u,r);if(l!==void 0)return{response:await e(l).catch(sOe({state:r,stateProxy:s,isOperationError:a})),status:p}}return{response:u,status:p}}async function uOe(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 rz0({poll:e,getOperationStatus:i,state:r,stateProxy:s,operationLocation:O,getResourceLocation:o,isOperationError:c,options:n});if(aOe({status:I,response:B,state:r,stateProxy:s,isDone:g,processResult:l,getError:A,setErrorAsResult:y}),!iOe.includes(I)){let R=p?.(B);R&&M(R);let N=a?.(B,r);if(N!==void 0){let x=O!==N;r.config.operationLocation=N,u?.(N,x)}else u?.(O,!1)}h?.(r,B)}}function pOe(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}function lOe(t){return t.headers.location}function AOe(t){return t.headers["operation-location"]}function dOe(t){return t.headers["azure-asyncoperation"]}function sz0(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 fOe(t){let{rawResponse:e,requestMethod:r,requestPath:s,resourceLocationConfig:n}=t,i=AOe(e),o=dOe(e),a=pOe({operationLocation:i,azureAsyncOperation:o}),c=lOe(e),u=r?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:sz0({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 hOe(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 xG(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 c2.verbose(`LRO: unrecognized operation status: ${e}`),e}}function nz0(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return hOe({status:r,statusCode:t.statusCode})}function iz0(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 hOe({status:i,statusCode:t.statusCode})}function xG(t){return t===202?"running":t<300?"succeeded":"failed"}function bOe({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?oz0(new Date(e)):r*1e3}}function MOe(t){let e=t.flatResponse.error;if(!e){c2.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){c2.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 oz0(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}function mOe(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 xG(e.rawResponse.statusCode);case"Body":return WG(e,r);default:return"running"}}let i=n();return i==="running"&&s===void 0?"succeeded":i}async function az0(t){let{stateProxy:e,resourceLocationConfig:r,processResult:s,lro:n,setErrorAsResult:i}=t;return cOe({init:async()=>{let o=await n.sendInitialRequest(),a=fOe({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:mOe,setErrorAsResult:i})}function gOe({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r===void 0?void 0:r.mode){case"OperationLocation":return pOe({operationLocation:AOe(t),azureAsyncOperation:dOe(t)});case"ResourceLocation":return lOe(t);default:return}}function WG({rawResponse:t},e){var r;let s=(r=e.config.metadata)===null||r===void 0?void 0:r.mode;switch(s){case"OperationLocation":return nz0(t);case"ResourceLocation":return xG(t.statusCode);case"Body":return iz0(t);default:throw new Error(`Internal error: Unexpected operation mode: ${s}`)}}function zOe({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)}rM.base64decode=Gz0;function Hz0(t){let e="",r=0,s,n=0;for(let i=0;i<t.length;i++)switch(s=t[i],r){case 0:e+=Uu[s>>2],n=(s&3)<<4,r=1;break;case 1:e+=Uu[n|s>>4],n=(s&15)<<2,r=2;break;case 2:e+=Uu[n|s>>6],e+=Uu[s&63],r=0;break}return r&&(e+=Uu[n],e+="=",r==1&&(e+="=")),e}rM.base64encode=Hz0});var $Oe=f(CR=>{"use strict";Object.defineProperty(CR,"__esModule",{value:!0});CR.utf8read=void 0;var VG=t=>String.fromCharCode.apply(String,t);function Xz0(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(VG(s)),n=0);return r.length?(n&&r.push(VG(s.slice(0,n))),r.join("")):VG(s.slice(0,n))}CR.utf8read=Xz0});var W3=f(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});tc.WireType=tc.mergeBinaryOptions=tc.UnknownFieldHandler=void 0;var Vz0;(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])})(Vz0=tc.UnknownFieldHandler||(tc.UnknownFieldHandler={}));function jz0(t,e){return Object.assign(Object.assign({},t),e)}tc.mergeBinaryOptions=jz0;var $z0;(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"})($z0=tc.WireType||(tc.WireType={}))});var DR=f(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.varint32read=Xs.varint32write=Xs.int64toString=Xs.int64fromString=Xs.varint64write=Xs.varint64read=void 0;function Yz0(){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")}Xs.varint64read=Yz0;function Jz0(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)}}Xs.varint64write=Jz0;var BR=65536*65536;function Kz0(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>=BR&&(n=n+(s/BR|0),s=s%BR)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,s,n]}Xs.int64fromString=Kz0;function Zz0(t,e){if(e>>>0<=2097151)return""+(BR*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)}Xs.int64toString=Zz0;function eO0(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)}}Xs.varint32write=eO0;function tO0(){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}Xs.varint32read=tO0});var $l=f(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.PbLong=jl.PbULong=jl.detectBi=void 0;var _3=DR(),U0;function YOe(){let t=new DataView(new ArrayBuffer(8));U0=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}jl.detectBi=YOe;YOe();function JOe(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var KOe=/^-?[0-9]+$/,IR=4294967296,qR=2147483648,RR=c
Line truncated
|
||||
`)}};ZR.RpcError=zH});var EH=f(tw=>{"use strict";Object.defineProperty(tw,"__esModule",{value:!0});tw.mergeRpcOptions=void 0;var I3e=Jt();function y30(t,e){if(!e)return t;let r={};ew(t,r),ew(e,r);for(let s of Object.keys(e)){let n=e[s];switch(s){case"jsonOptions":r.jsonOptions=I3e.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=I3e.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},ew(t.meta,r.meta),ew(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(n):n.concat();break}}return r}tw.mergeRpcOptions=y30;function ew(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 CH=f(d2=>{"use strict";Object.defineProperty(d2,"__esModule",{value:!0});d2.Deferred=d2.DeferredState=void 0;var nc;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(nc=d2.DeferredState||(d2.DeferredState={}));var yH=class{constructor(e=!0){this._state=nc.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!==nc.PENDING)throw new Error(`cannot resolve ${nc[this.state].toLowerCase()}`);this._resolve(e),this._state=nc.RESOLVED}reject(e){if(this.state!==nc.PENDING)throw new Error(`cannot reject ${nc[this.state].toLowerCase()}`);this._reject(e),this._state=nc.REJECTED}resolvePending(e){this._state===nc.PENDING&&this.resolve(e)}rejectPending(e){this._state===nc.PENDING&&this.reject(e)}};d2.Deferred=yH});var DH=f(rw=>{"use strict";Object.defineProperty(rw,"__esModule",{value:!0});rw.RpcOutputStreamController=void 0;var R3e=CH(),f2=Jt(),BH=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){f2.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){f2.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){f2.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(){f2.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;f2.assert(e,"bad state"),f2.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 R3e.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let s=r.p;f2.assert(s.state==R3e.DeferredState.PENDING,"iterator contract broken"),"value"in e?s.resolve(e):s.reject(e),delete r.p}else r.q.push(e)}};rw.RpcOutputStreamController=BH});var IH=f(uM=>{"use strict";var C30=uM&&uM.__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(uM,"__esModule",{value:!0});uM.UnaryCall=void 0;var qH=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 C30(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}})}};uM.UnaryCall=qH});var wH=f(pM=>{"use strict";var B30=pM&&pM.__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(pM,"__esModule",{value:!0});pM.ServerStreamingCall=void 0;var RH=class{constructor(e
Line truncated
|
||||
Operation status: ${l}
|
||||
Polling status: ${oOe.includes(l)?"Stopped":"Running"}`),l==="succeeded"){let A=a(p,r);if(A!==void 0)return{response:await e(A).catch(nOe({state:r,stateProxy:s,isOperationError:c})),status:l}}return{response:p,status:l}}o(sz0,"pollOperationHelper");async function pOe(t){let{poll:e,state:r,stateProxy:s,options:n,getOperationStatus:i,getResourceLocation:a,getOperationLocation:c,isOperationError:u,withOperationLocation:p,getPollingInterval:l,processResult:A,getError:d,updateState:b,setDelay:m,isDone:z,setErrorAsResult:C}=t,{operationLocation:E}=r.config;if(E!==void 0){let{response:D,status:R}=await sz0({poll:e,getOperationStatus:i,state:r,stateProxy:s,operationLocation:E,getResourceLocation:a,isOperationError:u,options:n});if(cOe({status:R,response:D,state:r,stateProxy:s,isDone:z,processResult:A,getError:d,setErrorAsResult:C}),!oOe.includes(R)){let w=l?.(D);w&&m(w);let v=c?.(D,r);if(v!==void 0){let W=E!==v;r.config.operationLocation=v,p?.(v,W)}else p?.(E,!1)}b?.(r,D)}}o(pOe,"pollOperation");function lOe(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}o(lOe,"getOperationLocationPollingUrl");function AOe(t){return t.headers.location}o(AOe,"getLocationHeader");function dOe(t){return t.headers["operation-location"]}o(dOe,"getOperationLocationHeader");function fOe(t){return t.headers["azure-asyncoperation"]}o(fOe,"getAzureAsyncOperationHeader");function nz0(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=a())!==null&&e!==void 0?e:n;default:return a()}function a(){switch(i){case"azure-async-operation":return;case"original-uri":return n;default:return r}}o(a,"getDefault")}o(nz0,"findResourceLocation");function hOe(t){let{rawResponse:e,requestMethod:r,requestPath:s,resourceLocationConfig:n}=t,i=dOe(e),a=fOe(e),c=lOe({operationLocation:i,azureAsyncOperation:a}),u=AOe(e),p=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:nz0({requestMethod:p,location:u,requestPath:s,resourceLocationConfig:n})}:u!==void 0?{mode:"ResourceLocation",operationLocation:u}:p==="PUT"&&s?{mode:"Body",operationLocation:s}:void 0}o(hOe,"inferLroMode");function bOe(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 WG(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 u2.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(bOe,"transformStatus");function iz0(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return bOe({status:r,statusCode:t.statusCode})}o(iz0,"getStatus");function oz0(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 bOe({status:i,statusCode:t.statusCode})}o(oz0,"getProvisioningState");function WG(t){return t===202?"running":t<300?"succeeded":"failed"}o(WG,"toOperationStatus");function MOe({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?az0(new Date(e)):r*1e3}}o(MOe,"parseRetryAfter");function mOe(t){let e=t.flatResponse.error;if(!e){u2.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){u2.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}o(mOe,"getErrorFromResponse");function az0(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}o(az0,"calculatePollingIntervalFromDate");function gOe(t){let{response:e,state:r,operationLocation:s}=t;function n(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return WG(e.rawResponse.statusCode);case"Body":return _G(e,r);default:return"running"}}o(n,"helper");let i=n();return i==="running"&&s===void 0?"succeeded":i}o(gOe,"getStatusFromInitialResponse");async function cz0(t){let{stateProxy:e,resourceLocationConfig:r,processResult:s,lro:n,setErrorAsResult:i}=t;return uOe({init:o(async()=>{let a=await n.sendInitialRequest(),c=hOe({rawResponse:a.rawResponse,requestPath:n.requestPath,requestMethod:n.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},"init"),stateProxy:e,processResult:s?({flatResponse:a},c)=>s(a,c):({flatResponse:a})=>a,getOperationStatus:gOe,setErrorAsResult:i})}o(cz0,"initHttpOperation");function zOe({rawResponse:t},e){var r;switchLine truncated
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(n){case 0:a=i,n=1;break;case 1:r[s++]=a<<2|(i&48)>>4,a=i,n=2;break;case 2:r[s++]=(a&15)<<4|(i&60)>>2,a=i,n=3;break;case 3:r[s++]=(a&3)<<6|i,n=0;break}}if(n==1)throw Error("invalid base64 string.");return r.subarray(0,s)}o(Hz0,"base64decode");sM.base64decode=Hz0;function Xz0(t){let e="",r=0,s,n=0;for(let i=0;i<t.length;i++)switch(s=t[i],r){case 0:e+=Gu[s>>2],n=(s&3)<<4,r=1;break;case 1:e+=Gu[n|s>>4],n=(s&15)<<2,r=2;break;case 2:e+=Gu[n|s>>6],e+=Gu[s&63],r=0;break}return r&&(e+=Gu[n],e+="=",r==1&&(e+="=")),e}o(Xz0,"base64encode");sM.base64encode=Xz0});var YOe=h(DR=>{"use strict";Object.defineProperty(DR,"__esModule",{value:!0});DR.utf8read=void 0;var jG=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function Vz0(t){if(t.length<1)return"";let e=0,r=[],s=[],n=0,i,a=t.length;for(;e<a;)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(jG(s)),n=0);return r.length?(n&&r.push(jG(s.slice(0,n))),r.join("")):jG(s.slice(0,n))}o(Vz0,"utf8read");DR.utf8read=Vz0});var _3=h(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});rc.WireType=rc.mergeBinaryOptions=rc.UnknownFieldHandler=void 0;var jz0;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,s,n,i,a)=>{(e(s)?s[t.symbol]:s[t.symbol]=[]).push({no:n,wireType:i,data:a})},t.onWrite=(r,s,n)=>{for(let{no:i,wireType:a,data:c}of t.list(s))n.tag(i,a).raw(c)},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=o(r=>r&&Array.isArray(r[t.symbol]),"is")})(jz0=rc.UnknownFieldHandler||(rc.UnknownFieldHandler={}));function $z0(t,e){return Object.assign(Object.assign({},t),e)}o($z0,"mergeBinaryOptions");rc.mergeBinaryOptions=$z0;var Yz0;(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"})(Yz0=rc.WireType||(rc.WireType={}))});var IR=h(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.varint32read=Vs.varint32write=Vs.int64toString=Vs.int64fromString=Vs.varint64write=Vs.varint64read=void 0;function Jz0(){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")}o(Jz0,"varint64read");Vs.varint64read=Jz0;function Kz0(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 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 a=e>>>i,c=!!(a>>>7),u=(c?a|128:a)&255;if(r.push(u),!c)return}r.push(e>>>31&1)}}o(Kz0,"varint64write");Vs.varint64write=Kz0;var qR=65536*65536;function Zz0(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,s=0,n=0;function i(a,c){let u=Number(t.slice(a,c));n*=r,s=s*r+u,s>=qR&&(n=n+(s/qR|0),s=s%qR)}return o(i,"add1e6digit"),i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,s,n]}o(Zz0,"int64fromString");Vs.int64fromString=Zz0;function eO0(t,e){if(e>>>0<=2097151)return""+(qR*e+(t>>>0));let r=t&16777215,s=(t>>>24|e<<8)>>>0&16777215,n=e>>16&65535,i=r+s*6777216+n*6710656,a=s+n*8147497,c=n*2,u=1e7;i>=u&&(a+=Math.floor(i/u),i%=u),a>=u&&(c+=Math.floor(a/u),a%=u);function p(l,A){let d=l?String(l):"";return A?"0000000".slice(d.length)+d:d}return o(p,"decimalFrom1e7"),p(c,0)+p(a,c)+p(i,1)}o(eO0,"int64toString");Vs.int64toString=eO0;function tO0(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}o(tO0,"varint32write");Vs.varint32write=tO0;function rO0(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(rO0,"varint32read");Vs.varint32read=rO0});var Yl=h($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.PbLong=$l.PbULong=$l.detectBi=void 0;var L3=IR(),G0;function JOe(){let t=new DataView(new ArrayBuffer(8));G0=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
|
||||
`)}};tw.RpcError=OH});var yH=h(sw=>{"use strict";Object.defineProperty(sw,"__esModule",{value:!0});sw.mergeRpcOptions=void 0;var R3e=Kt();function C30(t,e){if(!e)return t;let r={};rw(t,r),rw(e,r);for(let s of Object.keys(e)){let n=e[s];switch(s){case"jsonOptions":r.jsonOptions=R3e.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=R3e.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},rw(t.meta,r.meta),rw(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(n):n.concat();break}}return r}o(C30,"mergeRpcOptions");sw.mergeRpcOptions=C30;function rw(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}o(rw,"copy")});var BH=h(f2=>{"use strict";Object.defineProperty(f2,"__esModule",{value:!0});f2.Deferred=f2.DeferredState=void 0;var ic;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(ic=f2.DeferredState||(f2.DeferredState={}));var CH=class{static{o(this,"Deferred")}constructor(e=!0){this._state=ic.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!==ic.PENDING)throw new Error(`cannot resolve ${ic[this.state].toLowerCase()}`);this._resolve(e),this._state=ic.RESOLVED}reject(e){if(this.state!==ic.PENDING)throw new Error(`cannot reject ${ic[this.state].toLowerCase()}`);this._reject(e),this._state=ic.REJECTED}resolvePending(e){this._state===ic.PENDING&&this.resolve(e)}rejectPending(e){this._state===ic.PENDING&&this.reject(e)}};f2.Deferred=CH});var qH=h(nw=>{"use strict";Object.defineProperty(nw,"__esModule",{value:!0});nw.RpcOutputStreamController=void 0;var w3e=BH(),h2=Kt(),DH=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let 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){h2.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){h2.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){h2.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(){h2.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:o(()=>{let e=this._itState;h2.assert(e,"bad state"),h2.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 w3e.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let s=r.p;h2.assert(s.state==w3e.DeferredState.PENDING,"iterator contract broken"),"value"in e?s.resolve(e):s.reject(e),delete r.p}else r.q.push(e)}};nw.RpcOutputStreamController=DH});var RH=h(pM=>{"use strict";var B30=pM&&pM.__awaiter||function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})};Object.defineProperty(pM,"__esModule",{value:!0});pM.UnaryCall=void 0;var IH=class{static{o(this,"UnaryCall")}constructor(e,r,s,n,i,a,c){this.method=e,this.requestHeaders=r,this.request=s,this.headers=n,this.response=i,this.status=a,this.trailers=c}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 B30(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}})}};pM.UnaryCall=IH});var SH=h(lM=>{"use strict";var D30=lM&&lM.__awaiter||function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function
Line truncated
|
||||
You can add a runtime option to disable the check or this warning:
|
||||
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function PC0(){Object.keys(Qw).forEach(function(t){delete Qw[t]})}});var kw=f(ac=>{"use strict";ac.__esModule=!0;ac.HandlebarsEnvironment=ZX;function Pye(t){return t&&t.__esModule?t:{default:t}}var y2=us(),kC0=Gn(),JX=Pye(kC0),UC0=VX(),GC0=Wye(),HC0=$X(),Pw=Pye(HC0),XC0=YX(),VC0="4.7.9";ac.VERSION=VC0;var jC0=8;ac.COMPILER_REVISION=jC0;var $C0=7;ac.LAST_COMPATIBLE_COMPILER_REVISION=$C0;var YC0={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"};ac.REVISION_CHANGES=YC0;var KX="[object Object]";function ZX(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},UC0.registerDefaultHelpers(this),GC0.registerDefaultDecorators(this)}ZX.prototype={constructor:ZX,logger:Pw.default,log:Pw.default.log,registerHelper:function(e,r){if(y2.toString.call(e)===KX){if(r)throw new JX.default("Arg not supported with multiple helpers");y2.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(y2.toString.call(e)===KX)y2.extend(this.partials,e);else{if(typeof r>"u")throw new JX.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(y2.toString.call(e)===KX){if(r)throw new JX.default("Arg not supported with multiple decorators");y2.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){XC0.resetLoggedProperties()}};var JC0=Pw.default.log;ac.log=JC0;ac.createFrame=y2.createFrame;ac.logger=Pw.default});var Uye=f((Uw,kye)=>{"use strict";Uw.__esModule=!0;function eV(t){this.string=t}eV.prototype.toString=eV.prototype.toHTML=function(){return""+this.string};Uw.default=eV;kye.exports=Uw.default});var Gye=f(tV=>{"use strict";tV.__esModule=!0;tV.wrapHelper=KC0;function KC0(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 Yye=f(eA=>{"use strict";eA.__esModule=!0;eA.checkRevision=n40;eA.template=i40;eA.wrapProgram=Gw;eA.resolvePartial=o40;eA.invokePartial=a40;eA.noop=jye;function ZC0(t){return t&&t.__esModule?t:{default:t}}function e40(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 t40=us(),CM=e40(t40),r40=Gn(),ju=ZC0(r40),$u=kw(),Hye=VX(),s40=Gye(),Xye=YX();function n40(t){var e=t&&t[0]||1,r=$u.COMPILER_REVISION;if(!(e>=$u.LAST_COMPATIBLE_COMPILER_REVISION&&e<=$u.COMPILER_REVISION))if(e<$u.LAST_COMPATIBLE_COMPILER_REVISION){var s=$u.REVISION_CHANGES[r],n=$u.REVISION_CHANGES[e];throw new ju.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 ju.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 i40(t,e){if(!e)throw new ju.default("No environment passed to template");if(!t||!t.main)throw new ju.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=CM.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 ju.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 ju.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)||Xye.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:CM.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=Gw(this,a,h,c,u,p,l):A||(A=this.programs[a]=Gw(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=CM.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=c40(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=$ye(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={};Vye(a,e.helpers,n),Vye(a,o.helpers,n),n.helpers=a,t.usePartial&&(n.partials=n.mergeIfNeeded(o.partials,e.partials)),(t.usePartial||t.useDecorators)&&(n.decorators=CM.extend({},e.decorators,o.decorators)),n.hooks={},n.protoAccessControl=Xye.createProtoAccessControl(o);var c=o.allowCallsToHelperMissing||r;Hye.moveHelperToHooks(n,"helperMissing",c),Hye.moveHelperToHooks(n,"blockHelperMissing",c)}},i._child=function(o,a,c,u){if(t.useBlockParams&&!c)throw new ju.default("must pass block params");if(t.useDepths&&!u)throw new ju.default("must pass parent depths");return Gw(n,o,t[o],a,0,c,u)},i}function Gw(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=$ye(r,a,t,o,s,i),a.program=e,a.depth=o?o.length:0,a.blockParams=n||0,a}function o40(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Hw(r.partials,t)):r.name==="@partial-block"?t=Hw(r.data,"partial-block"):t=Hw(r.partials,r.name),t}function a40(t,e,r){var s=Hw(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!==jye&&(function(){r.data=$u.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=$u.createFrame(c.data),c.data["partial-block"]=s,i(a,c)},i.partials&&(r.partials=CM.extend({},r.partials,i.partials))})(),t===void 0&&n&&(t=n),t===void 0)throw new ju.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function jye(){return""}function Hw(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function c40(t,e){return(!e||!("root"in e))&&(e=e?$u.createFrame(e):{},e.root=t),e}function $ye(t,e,r,s,n,i){if(t.decorator){var o={};e=t.decorator(e,o,r,s&&s[0],n,i,s),CM.extend(e,o)}return e}function Vye(t,e,r){e&&Object.keys(e).forEach(function(s){var n=e[s];t[s]=u40(n,r)})}function u40(t,e){var r=e.lookupProperty;return s40.wrapHelper(t,function(s){return s.lookupProperty=r,s})}});var rV=f((Xw,Jye)=>{"use strict";Xw.__esModule=!0;Xw.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}};Jye.exports=Xw.default});var rCe=f((Vw,tCe)=>{"use strict";Vw.__esModule=!0;function nV(t){return t&&t.__esModule?t:{default:t}}function iV(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var p40=kw(),Kye=iV(p40),l40=Uye(),A40=nV(l40),d40=Gn(),f40=nV(d40),h40=us(),sV=iV(h40),b40=Yye(),Zye=iV(b40),M40=rV(),m40=nV(M40);function eCe(){var t=new Kye.HandlebarsEnvironment;return sV.extend(t,Kye),t.SafeString=A40.default,t.Exception=f40.default,t.Utils=sV,t.escapeExpression=sV.escapeExpression,t.VM=Zye,t.template=function(e){return Zye.template(e,t)},t}var cE=eCe();cE.create=eCe;m40.default(cE);cE.default=cE;Vw.default=cE;tCe.exports=Vw.default});var oV=f((jw,nCe)=>{"use strict";jw.__esModule=!0;var sCe={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`))}o(PC0,"logUnexpecedPropertyAccessOnce");function kC0(){Object.keys(kw).forEach(function(t){delete kw[t]})}o(kC0,"resetLoggedProperties")});var Gw=h(cc=>{"use strict";cc.__esModule=!0;cc.HandlebarsEnvironment=eV;function kye(t){return t&&t.__esModule?t:{default:t}}o(kye,"_interopRequireDefault");var C2=ps(),UC0=Hn(),KX=kye(UC0),GC0=jX(),HC0=_ye(),XC0=YX(),Uw=kye(XC0),VC0=JX(),jC0="4.7.9";cc.VERSION=jC0;var $C0=8;cc.COMPILER_REVISION=$C0;var YC0=7;cc.LAST_COMPATIBLE_COMPILER_REVISION=YC0;var JC0={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"};cc.REVISION_CHANGES=JC0;var ZX="[object Object]";function eV(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},GC0.registerDefaultHelpers(this),HC0.registerDefaultDecorators(this)}o(eV,"HandlebarsEnvironment");eV.prototype={constructor:eV,logger:Uw.default,log:Uw.default.log,registerHelper:o(function(e,r){if(C2.toString.call(e)===ZX){if(r)throw new KX.default("Arg not supported with multiple helpers");C2.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:o(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:o(function(e,r){if(C2.toString.call(e)===ZX)C2.extend(this.partials,e);else{if(typeof r>"u")throw new KX.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:o(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:o(function(e,r){if(C2.toString.call(e)===ZX){if(r)throw new KX.default("Arg not supported with multiple decorators");C2.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){VC0.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var KC0=Uw.default.log;cc.log=KC0;cc.createFrame=C2.createFrame;cc.logger=Uw.default});var Gye=h((Hw,Uye)=>{"use strict";Hw.__esModule=!0;function tV(t){this.string=t}o(tV,"SafeString");tV.prototype.toString=tV.prototype.toHTML=function(){return""+this.string};Hw.default=tV;Uye.exports=Hw.default});var Hye=h(rV=>{"use strict";rV.__esModule=!0;rV.wrapHelper=ZC0;function ZC0(t,e){if(typeof t!="function")return t;var r=o(function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=e(n),t.apply(this,arguments)},"wrapper");return r}o(ZC0,"wrapHelper")});var Jye=h(tA=>{"use strict";tA.__esModule=!0;tA.checkRevision=i40;tA.template=o40;tA.wrapProgram=Xw;tA.resolvePartial=a40;tA.invokePartial=c40;tA.noop=$ye;function e40(t){return t&&t.__esModule?t:{default:t}}o(e40,"_interopRequireDefault");function t40(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(t40,"_interopRequireWildcard");var r40=ps(),BM=t40(r40),s40=Hn(),$u=e40(s40),Yu=Gw(),Xye=jX(),n40=Hye(),Vye=JX();function i40(t){var e=t&&t[0]||1,r=Yu.COMPILER_REVISION;if(!(e>=Yu.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Yu.COMPILER_REVISION))if(e<Yu.LAST_COMPATIBLE_COMPILER_REVISION){var s=Yu.REVISION_CHANGES[r],n=Yu.REVISION_CHANGES[e];throw new $u.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 $u.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}o(i40,"checkRevision");function o40(t,e){if(!e)throw new $u.default("No environment passed to template");if(!t||!t.main)throw new $u.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(a,c,u){u.hash&&(c=BM.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 l=p.split(`
|
||||
`),A=0,d=l.length;A<d&&!(!l[A]&&A+1===d);A++)l[A]=u.indent+l[A];p=l.join(`
|
||||
`)}return p}else throw new $u.default("The partial "+u.name+" could not be compiled when running in runtime-only mode")}o(s,"invokePartialWrapper");var n={strict:o(function(c,u,p){if(!c||!(u in c))throw new $u.default('"'+u+'" not defined in '+c,{loc:p});return n.lookupProperty(c,u)},"strict"),lookupProperty:o(function(c,u){var p=c[u];if(p==null||Object.prototype.hasOwnProperty.call(c,u)||Vye.resultIsAllowed(p,n.protoAccessControl,u))return p},"lookupProperty"),lookup:o(function(c,u){for(var p=c.length,l=0;l<p;l++){var A=c[l]&&n.lookupProperty(c[l],u);if(A!=null)return A}},"lookup"),lambda:o(function(c,u){return typeof c=="function"?c.call(u):c},"lambda"),escapeExpression:BM.escapeExpression,invokePartial:s,fn:o(function(c){var u=t[c];return u.decorator=t[c+"_d"],u},"fn"),programs:[],program:o(function(c,u,p,l,A){var d=this.programs[c],b=this.fn(c);return u||A||l||p?d=Xw(this,c,b,u,p,l,A):d||(d=this.programs[c]=Xw(this,c,b)),d},"program"),data:o(function(c,u){for(;c&&u--;)c=c._parent;return c},"data"),mergeIfNeeded:o(function(c,u){var p=c||u;return c&&u&&c!==u&&(p=BM.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=u40(a,u));var p=void 0,l=t.useBlockParams?[]:void 0;t.useDepths&&(c.depths?p=a!=c.depths[0]?[a].concat(c.depths):c.depths:p=[a]);function A(d){return""+t.main(n,d,n.helpers,n.partials,u,l,p)}return o(A,"main"),A=Yye(t.main,A,n,c.depths||[],u,l),A(a,c)}return o(i,"ret"),i.isTop=!0,i._setup=function(a){if(a.partial)n.protoAccessControl=a.protoAccessControl,n.helpers=a.helpers,n.partials=a.partials,n.decorators=a.decorators,n.hooks=a.hooks;else{var c={};jye(c,e.helpers,n),jye(c,a.helpers,n),n.helpers=c,t.usePartial&&(n.partials=n.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(n.decorators=BM.extend({},e.decorators,a.decorators)),n.hooks={},n.protoAccessControl=Vye.createProtoAccessControl(a);var u=a.allowCallsToHelperMissing||r;Xye.moveHelperToHooks(n,"helperMissing",u),Xye.moveHelperToHooks(n,"blockHelperMissing",u)}},i._child=function(a,c,u,p){if(t.useBlockParams&&!u)throw new $u.default("must pass block params");if(t.useDepths&&!p)throw new $u.default("must pass parent depths");return Xw(n,a,t[a],c,0,u,p)},i}o(o40,"template");function Xw(t,e,r,s,n,i,a){function c(u){var p=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a;return a&&u!=a[0]&&!(u===t.nullContext&&a[0]===null)&&(l=[u].concat(a)),r(t,u,t.helpers,t.partials,p.data||s,i&&[p.blockParams].concat(i),l)}return o(c,"prog"),c=Yye(r,c,t,a,s,i),c.program=e,c.depth=a?a.length:0,c.blockParams=n||0,c}o(Xw,"wrapProgram");function a40(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Vw(r.partials,t)):r.name==="@partial-block"?t=Vw(r.data,"partial-block"):t=Vw(r.partials,r.name),t}o(a40,"resolvePartial");function c40(t,e,r){var s=Vw(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!==$ye&&(function(){r.data=Yu.createFrame(r.data);var i=r.fn;n=r.data["partial-block"]=o(function(c){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return u.data=Yu.createFrame(u.data),u.data["partial-block"]=s,i(c,u)},"partialBlockWrapper"),i.partials&&(r.partials=BM.extend({},r.partials,i.partials))})(),t===void 0&&n&&(t=n),t===void 0)throw new $u.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}o(c40,"invokePartial");function $ye(){return""}o($ye,"noop");function Vw(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}o(Vw,"lookupOwnProperty");function u40(t,e){return(!e||!("root"in e))&&(e=e?Yu.createFrame(e):{},e.root=t),e}o(u40,"initData");function Yye(t,e,r,s,n,i){if(t.decorator){var a={};e=t.decorator(e,a,r,s&&s[0],n,i,s),BM.extend(e,a)}return e}o(Yye,"executeDecorators");function jye(t,e,r){e&&Object.keys(e).forEach(function(s){var n=e[s];t[s]=p40(n,r)})}o(jye,"addHelpers");function p40(t,e){var r=e.lookupProperty;return n40.wrapHelper(t,function(s){return s.lookupProperty=r,s})}o(p40,"passLookupPropertyOption")});var sV=h((jw,Kye)=>{"use strict";jw.__esModule=!0;jw.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}};Kye.exports=jw.default});var sCe=h(($w,rCe)=>{"use strict";$w.__esModule=!0;function iV(t){return t&&t.__esModule?t:{default:t}}o(iV,"_interopRequireDefault");function oV(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(oV,"_interopRequireWildcard");var l40=Gw(),Zye=oV(l40),A40=Gye(),d40=iV(A40),f40=Hn(),h40=iV(f40),b40=ps(),nV=oV(b40),M40=Jye
Line truncated
|
||||
`+this.lexer.showPosition()+`
|
||||
Expecting `+qe.join(", ")+", got '"+(this.terminals_[R]||R)+"'":_e="Parse error on line "+(l+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(_e,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:y,expected:qe})}}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+R);switch(L[0]){case 1:o.push(R),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),o.push(L[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(Be=this.productions_[L[1]][1],Ie.$=a[a.length-Be],Ie._$={first_line:c[c.length-(Be||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Be||1)].first_column,last_column:c[c.length-1].last_column},O&&(Ie._$.range=[c[c.length-(Be||1)].range[0],c[c.length-1].range[1]]),fe=this.performAction.call(Ie,p,A,l,this.yy,L[1],a,c),typeof fe<"u")return fe;Be&&(o=o.slice(0,-1*Be*2),a=a.slice(0,-1*Be),c=c.slice(0,-1*Be)),o.push(this.productions_[L[1]][0]),a.push(Ie.$),c.push(Ie._$),Y=u[o[o.length-2]][o[o.length-1]],o.push(Y);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})();$w.default=g40;iCe.exports=$w.default});var Zw=f((Kw,uCe)=>{"use strict";Kw.__esModule=!0;function z40(t){return t&&t.__esModule?t:{default:t}}var O40=Gn(),aV=z40(O40);function Yw(){this.parents=[]}Yw.prototype={constructor:Yw,mutating:!1,acceptKey:function(e,r){var s=this.accept(e[r]);if(this.mutating){if(s&&!Yw.prototype[s.type])throw new aV.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 aV.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 aV.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:Jw,Decorator:Jw,BlockStatement:aCe,DecoratorBlock:aCe,PartialStatement:cCe,PartialBlockStatement:function(e){cCe.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Jw,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 Jw(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 q2(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 q2?e:(e=RV(e,this,r),new q2(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=RV(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(RV(e[s],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};aS.default=GCe;HCe.exports=aS.default});var JCe=f((cS,YCe)=>{"use strict";cS.__esModule=!0;function $Ce(t){return t&&t.__esModule?t:{default:t}}var VCe=kw(),mB0=Gn(),SV=$Ce(mB0),gB0=us(),zB0=XCe(),jCe=$Ce(zB0);function wM(t){this.value=t}function SM(){}SM.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=VCe.COMPILER_REVISION,r=VCe.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,s){return gB0.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 SV.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(),`;
|
||||
Expecting `+Ie.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Le="Parse error on line "+(A+1)+": Unexpected "+(w==1?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Le,{text:this.lexer.match,token:this.terminals_[w]||w,line:this.lexer.yylineno,loc:C,expected:Ie})}}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+w);switch(Q[0]){case 1:a.push(w),c.push(this.lexer.yytext),u.push(this.lexer.yylloc),a.push(Q[1]),w=null,v?(w=v,v=null):(d=this.lexer.yyleng,l=this.lexer.yytext,A=this.lexer.yylineno,C=this.lexer.yylloc,b>0&&b--);break;case 2:if(De=this.productions_[Q[1]][1],Re.$=c[c.length-De],Re._$={first_line:u[u.length-(De||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(De||1)].first_column,last_column:u[u.length-1].last_column},E&&(Re._$.range=[u[u.length-(De||1)].range[0],u[u.length-1].range[1]]),he=this.performAction.call(Re,l,d,A,this.yy,Q[1],c,u),typeof he<"u")return he;De&&(a=a.slice(0,-1*De*2),c=c.slice(0,-1*De),u=u.slice(0,-1*De)),a.push(this.productions_[Q[1]][0]),c.push(Re.$),u.push(Re._$),J=p[a[a.length-2]][a[a.length-1]],a.push(J);break;case 3:return!0}}return!0},"parse")},e=(function(){var s={EOF:1,parseError:o(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:o(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:o(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:o(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:o(function(){return this._more=!0,this},"more"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(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:o(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:o(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
||||
`+a+"^"},"showPosition"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,u,p,l;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),d=0;d<A.length&&(c=this._input.match(this.rules[A[d]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,u=d,!this.options.flex)));d++);return a?(l=a[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.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,A[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:o(function(){var i=this.next();return typeof i<"u"?i:this.lex()},"lex"),begin:o(function(i){this.conditionStack.push(i)},"begin"),popState:o(function(){return this.conditionStack.pop()},"popState"),_currentRules:o(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:o(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:o(function(i){this.begin(i)},"begin")};return s.options={},s.performAction=o(function(i,a,c,u){function p(A,d){return a.yytext=a.yytext.substring(A,a.yyleng-d+A)}o(p,"strip");var l=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"),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 o(r,"Parser"),r.prototype=t,t.Parser=r,new r})();Jw.default=z40;oCe.exports=Jw.default});var tS=h((eS,pCe)=>{"use strict";eS.__esModule=!0;function O40(t){return t&&t.__esModule?t:{default:t}}o(O40,"_interopRequireDefault");var E40=Hn(),cV=O40(E40);function Kw(){this.parents=[]}o(Kw,"Visitor");Kw.prototype={constructor:Kw,mutating:!1,acceptKey:o(function(e,r){var s=this.accept(e[r]);if(this.mutating){if(s&&!Kw.prototype[s.type])throw new cV.default('Unexpected node type "'+s.type+'" found when accepting '+r+" on "+e.type);e[r]=s}},"acceptKey"),acceptRequired:o(function(e,r){if(this.acceptKey(e,r),!e[r])throw new cV.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:o(function(e){for(var r=0,s=e.length;r<s;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,s--)},"acceptArray"),accept:o(function(e){if(e){if(!this[e.type])throw new cV.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},"accept"),Program:o(function(e){this.acceptArray(e.body)},"Program"),MustacheStatement:Zw,Decorator:Zw,BlockStatement:cCe,DecoratorBlock:cCe,PartialStatement:uCe,PartialBlockStatement:o(function(e){uCe.call(this,e),this.acceptKey(e,"program")},"PartialBlockStatement"),ContentStatement:o(function(){},"ContentStatement"),CommentStatement:o(function(){},"CommentStatement"),SubExpression:Zw,PathExpression:o(function(){},"PathExpressionLine truncated
|
||||
`])}),e},"merge"),each:o(function(e){for(var r=0,s=this.source.length;r<s;r++)e(this.source[r])},"each"),empty:o(function(){var e=this.currentLocation||{start:{}};return new I2(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:o(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof I2?e:(e=wV(e,this,r),new I2(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:o(function(e,r,s){return s=this.generateList(s),this.wrap([e,r?"."+r+"(":"(",s,")"])},"functionCall"),quotedString:o(function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:o(function(e){var r=this,s=[];Object.keys(e).forEach(function(i){var a=wV(e[i],r);a!=="undefined"&&s.push([r.quotedString(i),":",a])});var n=this.generateList(s);return n.prepend("{"),n.add("}"),n},"objectLiteral"),generateList:o(function(e){for(var r=this.empty(),s=0,n=e.length;s<n;s++)s&&r.add(","),r.add(wV(e[s],this));return r},"generateList"),generateArray:o(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};uS.default=HCe;XCe.exports=uS.default});var KCe=h((pS,JCe)=>{"use strict";pS.__esModule=!0;function YCe(t){return t&&t.__esModule?t:{default:t}}o(YCe,"_interopRequireDefault");var jCe=Gw(),gB0=Hn(),NV=YCe(gB0),zB0=ps(),OB0=VCe(),$Ce=YCe(OB0);function SM(t){this.value=t}o(SM,"Literal");function NM(){}o(NM,"JavaScriptCompiler");NM.prototype={nameLookup:o(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:o(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:o(function(){var e=jCe.COMPILER_REVISION,r=jCe.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:o(function(e,r,s){return zB0.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:s?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:o(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:o(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:o(function(e,r,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,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 NV.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) {
|
||||
`),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 jCe.default(this.options.srcName),this.decorators=new jCe.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 l=this.createFunctionContext(n);if(this.isChild)return l;var A={compiler:this.compilerInfo(),main:l};this.decorators&&(A.main_d=this.decorators,A.useDecorators=!0);var d=this.context,b=d.programs,m=d.decorators;for(u=0,p=b.length;u<p;u++)A[u]=b[u],m[u]&&(A[u+"_d"]=m[u],A.useDecorators=!0);return this.environment.usePartial&&(A.usePartial=!0),this.options.data&&(A.useData=!0),this.useDepths&&(A.useDepths=!0),this.useBlockParams&&(A.useBlockParams=!0),this.options.compat&&(A.compat=!0),n?A.compilerOptions=this.options:(A.compiler=JSON.stringify(A.compiler),this.source.currentLocation={start:{line:1,column:0}},A=this.objectLiteral(A),r.srcName?(A=A.toStringWithSourceMap({file:r.destName}),A.map=A.map&&A.map.toString()):A=A.toString()),A},"compile"),preamble:o(function(){this.lastContext=0,this.source=new $Ce.default(this.options.srcName),this.decorators=new $Ce.default(this.options.srcName)},"preamble"),createFunctionContext:o(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(u){var p=r.aliases[u];p.children&&p.referenceCount>1&&(s+=", alias"+ ++i+"="+u,p.children[0]="alias"+i)}),this.lookupPropertyFunctionIsUsed&&(s+=", "+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(s);return e?(a.push(c),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
|
||||
`,c,"}"])},"createFunctionContext"),mergeSource:o(function(e){var r=this.environment.isSimple,s=!this.forceBuffer,n=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 += "):n=!0,c.add(";"),a=c=void 0),i=!0,r||(s=!1))}),s?a?(a.prepend("return "),c.add(";")):i||this.source.push('return "";'):(e+=", buffer = "+(n?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),c.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(n?"":`;
|
||||
`)),this.source.merge()},"mergeSource"),lookupPropertyFunctionVarDeclaration:o(function(){return`
|
||||
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
||||
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
||||
return parent[propertyName];
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
`.trim()},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(OB0(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};Ft.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};Ft.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Ft.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Ft.prototype.BlockStatement=Ft.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};Ft.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+" }}")};Ft.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+" }}")};Ft.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Ft.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Ft.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};Ft.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Ft.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Ft.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Ft.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Ft.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Ft.prototype.NullLiteral=function(){return"NULL"};Ft.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(", ")+"}"};Ft.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var FV=f((kDt,n4e)=>{var lS=e4e().default,s4e=t4e();lS.PrintVisitor=s4e.PrintVisitor;lS.print=s4e.print;n4e.exports=lS;function r4e(t,e){var r=require("fs"),s=r.readFileSync(e,"utf8");t.exports=lS.compile(s)}typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=r4e,require.extensions[".hbs"]=r4e)});var bS=f(rA=>{"use strict";Object.defineProperty(rA,"__esModule",{value:!0});rA.Signature=rA.Envelope=void 0;rA.Envelope={fromJSON(t){return{payload:hS(t.payload)?Buffer.from(h4e(t.payload)):Buffer.alloc(0),payloadType:hS(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>rA.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=b4e(t.payload)),t.payloadType!==""&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>rA.Signature.toJSON(r))),e}};rA.Signature={fromJSON(t){return{sig:hS(t.sig)?Buffer.from(h4e(t.sig)):Buffer.alloc(0),keyid:hS(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=b4e(t.sig)),t.keyid!==""&&(e.keyid=t.keyid),e}};function h4e(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function b4e(t){return globalThis.Buffer.from(t).toString("base64")}function hS(t){return t!=null}});var m4e=f(MS=>{"use strict";Object.defineProperty(MS,"__esModule",{value:!0});MS.Timestamp=void 0;MS.Timestamp={fromJSON(t){return{seconds:M4e(t.seconds)?globalThis.String(t.seconds):"0",nanos:M4e(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 M4e(t){return t!=null}});var Ku=f(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.TimeRange=Te.X509CertificateChain=Te.SubjectAlternativeName=Te.X509Certificate=Te.DistinguishedName=Te.ObjectIdentifierValuePair=Te.ObjectIdentifier=Te.PublicKeyIdentifier=Te.PublicKey=Te.RFC3161SignedTimestamp=Te.LogId=Te.MessageSignature=Te.HashOutput=Te.SubjectAlternativeNameType=Te.PublicKeyDetails=Te.HashAlgorithm=void 0;Te.hashAlgorithmFromJSON=z4e;Te.hashAlgorithmToJSON=O4e;Te.publicKeyDetailsFromJSON=E4e;Te.publicKeyDetailsToJSON=y4e;Te.subjectAlternativeNameTypeFromJSON=C4e;Te.subjectAlternativeNameTypeToJSON=B4e;var GB0=m4e(),Js;(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"})(Js||(Te.HashAlgorithm=Js={}));function z4e(t){switch(t){cas
Line truncated
|
||||
`).forEach(r=>{r.match(xD0)||r.match(WD0)||(e+=r)}),Buffer.from(e,"base64")}function LD0(t,e="CERTIFICATE"){let s=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`
|
||||
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:o(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))},"blockValue"),ambiguousBlockValue:o(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),"}"])},"ambiguousBlockValue"),appendContent:o(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:o(function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},"append"),appendEscaped:o(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:o(function(e){this.lastContext=e},"getContext"),pushContext:o(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:o(function(e,r,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)},"lookupOnContext"),lookupBlockParam:o(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:o(function(e,r,s){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,s)},"lookupData"),resolvePath:o(function(e,r,s,n,i){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(EB0(this.options.strict&&i,this,r,s,e));return}for(var c=r.length,u=o(function(l){a.replaceStack(function(A){var d=a.nameLookup(A,r[l],e);return n?[" && ",d]:[" != null ? ",d," : ",A]})},"_loop"),p=s;p<c;p++)u(p)},"resolvePath"),resolvePossibleLambda:o(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:o(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:o(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:o(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:o(function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},"popHash"),pushString:o(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:o(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:o(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:o(function(e,r){var 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;"])},"registerDecorator"),invokeHelper:o(function(e,r,s){var n=this.popStack(),i=this.setupHelper(e,r),a=[];s&&a.push(i.name),a.push(n),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:o(function(e,r){var s=[];s.push(e[0]);for(var n=1;n<e.length;n++)s.push(r,e[n]);return s},"itemsSeparatedBy"),invokeKnownHelper:o(function(e,r){var s=this.setupHelper(e,r);this.push(this.source.functionCall(s.name,"call",s.callParams))},"invokeKnownHelper"),invokeAmbiguous:o(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"),a=["(","(helper = ",i," || ",s,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,n.paramsInit?["),(",n.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("h
Line truncated
|
||||
`,e};Tt.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};Tt.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Tt.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Tt.prototype.BlockStatement=Tt.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};Tt.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+" }}")};Tt.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+" }}")};Tt.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Tt.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Tt.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};Tt.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Tt.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Tt.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Tt.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Tt.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Tt.prototype.NullLiteral=function(){return"NULL"};Tt.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(", ")+"}"};Tt.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var TV=h((lTt,i4e)=>{var dS=t4e().default,n4e=r4e();dS.PrintVisitor=n4e.PrintVisitor;dS.print=n4e.print;i4e.exports=dS;function s4e(t,e){var r=require("fs"),s=r.readFileSync(e,"utf8");t.exports=dS.compile(s)}o(s4e,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=s4e,require.extensions[".hbs"]=s4e)});var mS=h(sA=>{"use strict";Object.defineProperty(sA,"__esModule",{value:!0});sA.Signature=sA.Envelope=void 0;sA.Envelope={fromJSON(t){return{payload:MS(t.payload)?Buffer.from(b4e(t.payload)):Buffer.alloc(0),payloadType:MS(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>sA.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=M4e(t.payload)),t.payloadType!==""&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>sA.Signature.toJSON(r))),e}};sA.Signature={fromJSON(t){return{sig:MS(t.sig)?Buffer.from(b4e(t.sig)):Buffer.alloc(0),keyid:MS(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=M4e(t.sig)),t.keyid!==""&&(e.keyid=t.keyid),e}};function b4e(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}o(b4e,"bytesFromBase64");function M4e(t){return globalThis.Buffer.from(t).toString("base64")}o(M4e,"base64FromBytes");function MS(t){return t!=null}o(MS,"isSet")});var g4e=h(gS=>{"use strict";Object.defineProperty(gS,"__esModule",{value:!0});gS.Timestamp=void 0;gS.Timestamp={fromJSON(t){return{seconds:m4e(t.seconds)?globalThis.String(t.seconds):"0",nanos:m4e(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 m4e(t){return t!=null}o(m4e,"isSet")});var Zu=h(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.TimeRange=xe.X509CertificateChain=xe.SubjectAlternativeName=xe.X509Certificate=xe.DistinguishedName=xe.ObjectIdentifierValuePair=xe.ObjectIdentifier=xe.PublicKeyIdentifier=xe.PublicKey=xe.RFC3161SignedTimestamp=xe.LogId=xe.MessageSignature=xe.HashOutput=xe.SubjectAlternativeNameType=xe.PublicKeyDetails=xe.HashAlgorithm=void 0;xe.hashAlgorithmFromJSON=O4e;xe.hashAlgorithmToJSON=E4e;xe.publicKeyDetailsFromJSON=y4e;xe.publicKeyDetailsToJSON=C4e;xe.subjectAlternativeNameTypeFromJSON=B4e;xe.subjectAlternativeNameTypeToJSON=D4e;var HB0=g4e(),Ks;(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
|
||||
`).forEach(r=>{r.match(WD0)||r.match(_D0)||(e+=r)}),Buffer.from(e,"base64")}o(LD0,"toDER");function QD0(t,e="CERTIFICATE"){let s=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`
|
||||
`).concat(`
|
||||
`)}});var _S=f(cA=>{"use strict";Object.defineProperty(cA,"__esModule",{value:!0});cA.SHA2_HASH_ALGOS=cA.RSA_SIGNATURE_ALGOS=cA.ECDSA_SIGNATURE_ALGOS=void 0;cA.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"};cA.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"};cA.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 aj=f(LS=>{"use strict";Object.defineProperty(LS,"__esModule",{value:!0});LS.RFC3161TimestampVerificationError=void 0;var oj=class extends Error{};LS.RFC3161TimestampVerificationError=oj});var sBe=f(dc=>{"use strict";var QD0=dc&&dc.__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]})),PD0=dc&&dc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kD0=dc&&dc.__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"&&QD0(r,e,s[n]);return PD0(r,e),r}})();Object.defineProperty(dc,"__esModule",{value:!0});dc.TSTInfo=void 0;var rBe=kD0(_M()),UD0=_S(),GD0=aj(),cj=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 UD0.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=rBe.digest(this.messageImprintHashAlgorithm,e);if(!rBe.bufferEqual(r,this.messageImprintHashedMessage))throw new GD0.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};dc.TSTInfo=cj});var iBe=f(fc=>{"use strict";var HD0=fc&&fc.__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]})),XD0=fc&&fc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),VD0=fc&&fc.__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"&&HD0(r,e,s[n]);return XD0(r,e),r}})();Object.defineProperty(fc,"__esModule",{value:!0});fc.RFC3161Timestamp=void 0;var jD0=TS(),uj=VD0(_M()),nBe=_S(),CE=aj(),$D0=sBe(),YD0="1.2.840.113549.1.7.2",JD0="1.2.840.113549.1.9.16.1.4",KD0="1.2.840.113549.1.9.4",pj=class t{root;constructor(e){this.root=e}static parse(e){let r=jD0.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 nBe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return nBe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new $D0.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new CE.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==YD0)throw new CE.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==JD0)throw new CE.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=uj.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!uj.bufferEqual(e,r))throw new CE.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(e){let r=this.signedAttrsObj.toDER();if(r[0
Line truncated
|
||||
`)}o(QD0,"fromDER")});var QS=h(uA=>{"use strict";Object.defineProperty(uA,"__esModule",{value:!0});uA.SHA2_HASH_ALGOS=uA.RSA_SIGNATURE_ALGOS=uA.ECDSA_SIGNATURE_ALGOS=void 0;uA.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"};uA.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"};uA.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 cj=h(PS=>{"use strict";Object.defineProperty(PS,"__esModule",{value:!0});PS.RFC3161TimestampVerificationError=void 0;var aj=class extends Error{static{o(this,"RFC3161TimestampVerificationError")}};PS.RFC3161TimestampVerificationError=aj});var nBe=h(fc=>{"use strict";var PD0=fc&&fc.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),kD0=fc&&fc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),UD0=fc&&fc.__importStar||(function(){var t=o(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)},"ownKeys");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"&&PD0(r,e,s[n]);return kD0(r,e),r}})();Object.defineProperty(fc,"__esModule",{value:!0});fc.TSTInfo=void 0;var sBe=UD0(LM()),GD0=QS(),HD0=cj(),uj=class{static{o(this,"TSTInfo")}root;constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return GD0.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=sBe.digest(this.messageImprintHashAlgorithm,e);if(!sBe.bufferEqual(r,this.messageImprintHashedMessage))throw new HD0.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};fc.TSTInfo=uj});var oBe=h(hc=>{"use strict";var XD0=hc&&hc.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),VD0=hc&&hc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),jD0=hc&&hc.__importStar||(function(){var t=o(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)},"ownKeys");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"&&XD0(r,e,s[n]);return VD0(r,e),r}})();Object.defineProperty(hc,"__esModule",{value:!0});hc.RFC3161Timestamp=void 0;var $D0=WS(),pj=jD0(LM()),iBe=QS(),BE=cj(),YD0=nBe(),JD0="1.2.840.113549.1.7.2",KD0="1.2.840.113549.1.9.16.1.4",ZD0="1.2.840.113549.1.9.4",lj=class t{static{o(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}static parse(e){let r=$D0.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 iBe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return iBe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new YD0.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new BE.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==JD0)throw new BE.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==KD0)throw new BE.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=pj.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].valu
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 gDe=f(mDe=>{"use strict";var K$=cp().Buffer;mDe._dbcs=pp;var fr=-1,MDe=-2,Ui=-10,Ms=-1e3,KM=new Array(256),UE=-1;for(CN=0;CN<256;CN++)KM[CN]=fr;var CN;function pp(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]=KM.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(KM.slice(0));var i=this.decodeTables.length;this.decodeTables.push(KM.slice(0));for(var o=this.decodeTables[0],s=129;s<=254;s++)for(var a=this.decodeTables[Ms-o[s]],c=48;c<=57;c++){if(a[c]===fr)a[c]=Ms-n;else if(a[c]>Ms)throw new Error("gb18030 decode tables conflict at byte 2");for(var u=this.decodeTables[Ms-a[c]],p=129;p<=254;p++){if(u[p]===fr)u[p]=Ms-i;else{if(u[p]===Ms-i)continue;if(u[p]>Ms)throw new Error("gb18030 decode tables conflict at byte 3")}for(var l=this.decodeTables[Ms-u[p]],A=48;A<=57;A++)l[A]===fr&&(l[A]=MDe)}}}this.defaultCharUnicode=e.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var h={};if(t.encodeSkipVals)for(var s=0;s<t.encodeSkipValsLine truncated
|
||||
\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 zDe=h(gDe=>{"use strict";var Z$=up().Buffer;gDe._dbcs=lp;var hr=-1,mDe=-2,Gi=-10,ms=-1e3,ZM=new Array(256),GE=-1;for(DN=0;DN<256;DN++)ZM[DN]=hr;var DN;function lp(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]=ZM.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(ZM.slice(0));var i=this.decodeTables.length;this.decodeTables.push(ZM.slice(0));for(var a=this.decodeTables[0],s=129;s<=254;s++)for(var c=this.decodeTables[ms-a[s]],u=48;u<=57;u++){if(c[u]===hr)c[u]=ms-n;else if(c[u]>ms)throw new Error("gb18030 decode tables conflict at byte 2");for(var p=this.decodeTables[ms-c[u]],l=129;l<=254;l++){if(p[l]===hr)p[l]=ms-i;else{if(p[l]===ms-i)continue;if(p[l]>ms)throw new Error("gb18030 decode tables conflict at byte 3")}for(var A=this.decodeTables[ms-p[l]],d=48;d<=57;d++)A[d]===hr&&(A[d]=mDe)}}}this.defaultCharUnicode=e.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var b={};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))}},hp=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?pR0:uR0);if(!n||s&&!EY.includes(n[1])||!Bqe.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=Yn(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&&!(EY.includes(this.algorithm)&&this.digest.match(cR0)&&this.options.every(r=>r.match(lR0)))?"":`${this.algorithm}-${this.digest}${JE(this.options)}`}};function Cqe(t,e,r,s){let n=t!=="",i=!1,o="",a=s.length-1;for(let u=0;u<a;u++){let p=hp.prototype.toString.call(s[u],r);p&&(i=!0,o+=p,o+=e)}let c=hp.prototype.toString.call(s[a],r);return c&&(i=!0,o+=c),n&&i?t+e+o:t+o}var X2=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 EY)this[n]&&(s=Cqe(s,r,e,this[n]))}else for(let n of Object.keys(this))s=Cqe(s,r,e,this[n]);return s}concat(e,r){let s=typeof e=="string"?e:$E(e,r);return Yn(`${this.toString(r)} ${s}`,r)}hexDigest(){return Yn(this,{single:!0}).hexDigest()}merge(e,r){let s=Yn(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=Yn(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||mR0,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}};Cc.exports.parse=Yn;function Yn(t,e){if(!t)return null;if(typeof t=="string")return OY(t,e);if(t.algorithm&&t.digest){let r=new X2;return r[t.algorithm]=[t],OY($E(r,e),e)}else return OY($E(t,e),e)}function OY(t,e){if(e?.single)return new hp(t,e);let r=t.trim().split(/\s+/).reduce((s,n)=>{let i=new hp(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 X2);return r.isEmpty()?null:r}Cc.exports.stringify=$E;function $E(t,e){return t.algorithm&&t.digest?hp.prototype.toString.call(t,e):typeof t=="string"?$E(Yn(t,e),e):X2.prototype.toString.call(t,e)}Cc.exports.fromHex=AR0;function AR0(t,e,r){let s=JE(r?.options);return Yn(`${e}-${Buffer.from(t,"hex").toString("base64")}${s}`,r)}Cc.exports.fromData=dR0;function dR0(t,e){let r=e?.algorithms||[...CY],s=JE(e?.options);return r.reduce((n,i)=>{let o=YE.createHash(i).update(t).digest("base64"),a=new hp(`${i}-${o}${s}`,e);if(a.algorithm&&a.digest){let c=a.algorithm;n[c]||(n[c]=[]),n[c].push(a)}return n},new X2)}Cc.exports.fromStream=fR0;function fR0(t,e){let r=BY(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()})}Cc.exports.checkData=hR0;function hR0(t,e,r){if(e=Yn(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=YE.createHash(s).update(t).digest("base64"),i=Yn({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}.
|
||||
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))}},bp=class{static{o(this,"Hash")}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?lR0:pR0);if(!n||s&&!yY.includes(n[1])||!Dqe.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=Jn(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(a=>a.digest===this.digest);return i||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(yY.includes(this.algorithm)&&this.digest.match(uR0)&&this.options.every(r=>r.match(AR0)))?"":`${this.algorithm}-${this.digest}${KE(this.options)}`}};function Bqe(t,e,r,s){let n=t!=="",i=!1,a="",c=s.length-1;for(let p=0;p<c;p++){let l=bp.prototype.toString.call(s[p],r);l&&(i=!0,a+=l,a+=e)}let u=bp.prototype.toString.call(s[c],r);return u&&(i=!0,a+=u),n&&i?t+e+a:t+a}o(Bqe,"integrityHashToString");var V2=class{static{o(this,"Integrity")}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 yY)this[n]&&(s=Bqe(s,r,e,this[n]))}else for(let n of Object.keys(this))s=Bqe(s,r,e,this[n]);return s}concat(e,r){let s=typeof e=="string"?e:YE(e,r);return Jn(`${this.toString(r)} ${s}`,r)}hexDigest(){return Jn(this,{single:!0}).hexDigest()}merge(e,r){let s=Jn(e,r);for(let n in s)if(this[n]){if(!this[n].find(i=>s[n].find(a=>i.digest===a.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[n]=s[n]}match(e,r){let s=Jn(e,r);if(!s)return!1;let n=s.pickAlgorithm(r,Object.keys(this));return!!n&&this[n].find(i=>s[n].find(a=>i.digest===a.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||gR0,n=Object.keys(this);return r?.length&&(n=n.filter(i=>r.includes(i))),n.length?n.reduce((i,a)=>s(i,a)||i):null}};Bc.exports.parse=Jn;function Jn(t,e){if(!t)return null;if(typeof t=="string")return EY(t,e);if(t.algorithm&&t.digest){let r=new V2;return r[t.algorithm]=[t],EY(YE(r,e),e)}else return EY(YE(t,e),e)}o(Jn,"parse");function EY(t,e){if(e?.single)return new bp(t,e);let r=t.trim().split(/\s+/).reduce((s,n)=>{let i=new bp(n,e);if(i.algorithm&&i.digest){let a=i.algorithm;Object.keys(s).includes(a)||(s[a]=[]),s[a].push(i)}return s},new V2);return r.isEmpty()?null:r}o(EY,"_parse");Bc.exports.stringify=YE;function YE(t,e){return t.algorithm&&t.digest?bp.prototype.toString.call(t,e):typeof t=="string"?YE(Jn(t,e),e):V2.prototype.toString.call(t,e)}o(YE,"stringify");Bc.exports.fromHex=dR0;function dR0(t,e,r){let s=KE(r?.options);return Jn(`${e}-${Buffer.from(t,"hex").toString("base64")}${s}`,r)}o(dR0,"fromHex");Bc.exports.fromData=fR0;function fR0(t,e){let r=e?.algorithms||[...BY],s=KE(e?.options);return r.reduce((n,i)=>{let a=JE.createHash(i).update(t).digest("base64"),c=new bp(`${i}-${a}${s}`,e);if(c.algorithm&&c.digest){let u=c.algorithm;n[u]||(n[u]=[]),n[u].push(c)}return n},new V2)}o(fR0,"fromData");Bc.exports.fromStream=hR0;function hR0(t,e){let r=DY(e);return new Promise((s,n)=>{t.pipe(r),t.on("error",n),r.on("error",n);let i;r.on("integrity",a=>{i=a}),r.on("end",()=>s(i)),r.resume()})}o(hR0,"fromStream");Bc.exports.checkData=bR0;function bR0(t,e,r){if(e=Jn(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=JE.createHash(s).update(t).digest("base64"),i=Jn({algorithm:s,digest:n}),a=i.match(e,r);if(r=r||{},a||!r.error)return a;if(typeof r.size=="number"&&t.length!==r.size){let c=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}}Cc.exports.checkStream=bR0;function bR0(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=Yn(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=BY(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()})}Cc.exports.integrityStream=BY;function BY(t=Object.create(null)){return new yY(t)}Cc.exports.create=MR0;function MR0(t){let e=t?.algorithms||[...CY],r=JE(t?.options),s=e.map(YE.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 hp(`${o}-${a}${r}`,t);return i[c.algorithm]||(i[c.algorithm]=[]),i[c.algorithm].push(c),i},new X2)}}}function mR0(t,e){return yqe.indexOf(t.toLowerCase())>=yqe.indexOf(e.toLowerCase())?t:e}});var qY=f((C5t,wqe)=>{var Dqe=fY(),qqe=zY(),gR0=KE(),Iqe={shared:!1,ignoreCargoCult:!0},zR0={status:200,headers:{}},tm=t=>{let e={method:t.method,url:t.url,headers:{},compress:t.compress};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},Rqe=t=>{let e={status:t.status,headers:{}};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},DY=class{constructor({entry:e,request:r,response:s,options:n}){this.entry=e,this.request=tm(r),this.response=Rqe(s),this.options=n,this.policy=new Dqe(this.request,this.response,Iqe),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 Dqe(tm(e),zR0,Iqe).storable()}satisfies(e){let r=tm(e);if(this.request.headers.host!==r.headers.host||this.request.compress!==r.compress)return!1;let s=new qqe(this.request),n=new qqe(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?gR0.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=tm(e);return r.method="GET",!this.policy.satisfiesWithoutRevalidation(r)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let r=tm(e);return this.policy.revalidationHeaders(r)}revalidated(e,r){let s=tm(e),n=Rqe(r);return!this.policy.revalidatedPolicy(s,n).modified}};wqe.exports=DY});var Nqe=f((B5t,Sqe)=>{var IY=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"}};Sqe.exports={NotCachedError:IY}});var kqe=f((D5t,Pqe)=>{"use strict";var vqe=typeof process=="object"&&process?process:{stdout:null,stderr:null},OR0=require("events"),Fqe=require("stream"),Tqe=require("string_decoder").StringDecoder,bp=Symbol("EOF"),Mp=Symbol("maybeEmitEnd"),bA=Symbol("emittedEnd"),WN=Symbol("emittingEnd"),ZE=Symbol("emittedError"),_N=Symbol("closed"),xqe=Symbol("read"),LN=Symbol("flush"),Wqe=Symbol("flushChunk"),Zs=Symbol("encoding"),mp=Symbol("decoder"),QN=Symbol("flowing"),ey=Symbol("paused"),rm=Symbol("resume"),H1=Symbol("bufferLength"),RY=Symbol("bufferPush"),wY=Symbol("bufferShift"),vr=Symbol("objectMode"),Fr=Symbol("destroyed"),SY=Symbol("emitData"),_qe=Symbol("emitEnd"),NY=Symbol("emitEnd2"),gp=Symbol("async"),ty=t=>Promise.resolve().then(t),Lqe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",ER0=Lqe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),yR0=Lqe&&Symbol.iterator||Symbol("iterator not implemented"),CR0=t=>t==="end"||t==="finish"||t==="prefinish",BR0=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,DR0=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),PN=class{constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[rm](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},vY=class extends PN{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)}};Pqe.exports=class Qqe extends Fqe{constructor(e){super(),this[QN]=!1,this[ey]=!1,this.pipes=[],this.buffer=[],this[vr]=e&&e.objectMode||!1,this[vr]?this[Zs]=null:this[Zs]=e&&e.encoding||null,this[Zs]==="buffer"&&(this[Zs]=null),this[gp]=e&&!!e.async||!1,this[mp]=this[Zs]?new Tqe(this[Zs]):null,this[bp]=!1,this[bA]=!1,this[WN]=!1,this[_N]=!1,this[ZE]=null,this.writable=!0,this.readable=!0,thi
Line truncated
|
||||
Found: ${t.length}`);throw c.code="EBADSIZE",c.found=t.length,c.expected=r.size,c.sri=e,c}else{let c=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${i}. (${t.length} bytes)`);throw c.code="EINTEGRITY",c.found=i,c.expected=e,c.algorithm=s,c.sri=e,c}}o(bR0,"checkData");Bc.exports.checkStream=MR0;function MR0(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=Jn(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=DY(r);return new Promise((n,i)=>{t.pipe(s),t.on("error",i),s.on("error",i);let a;s.on("verified",c=>{a=c}),s.on("end",()=>n(a)),s.resume()})}o(MR0,"checkStream");Bc.exports.integrityStream=DY;function DY(t=Object.create(null)){return new CY(t)}o(DY,"integrityStream");Bc.exports.create=mR0;function mR0(t){let e=t?.algorithms||[...BY],r=KE(t?.options),s=e.map(JE.createHash);return{update:o(function(n,i){return s.forEach(a=>a.update(n,i)),this},"update"),digest:o(function(){return e.reduce((i,a)=>{let c=s.shift().digest("base64"),u=new bp(`${a}-${c}${r}`,t);return i[u.algorithm]||(i[u.algorithm]=[]),i[u.algorithm].push(u),i},new V2)},"digest")}}o(mR0,"createIntegrity");function gR0(t,e){return Cqe.indexOf(t.toLowerCase())>=Cqe.indexOf(e.toLowerCase())?t:e}o(gR0,"getPrioritizedHash")});var IY=h((FLt,Sqe)=>{var qqe=hY(),Iqe=OY(),zR0=ZE(),Rqe={shared:!1,ignoreCargoCult:!0},OR0={status:200,headers:{}},rm=o(t=>{let e={method:t.method,url:t.url,headers:{},compress:t.compress};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},"requestObject"),wqe=o(t=>{let e={status:t.status,headers:{}};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},"responseObject"),qY=class{static{o(this,"CachePolicy")}constructor({entry:e,request:r,response:s,options:n}){this.entry=e,this.request=rm(r),this.response=wqe(s),this.options=n,this.policy=new qqe(this.request,this.response,Rqe),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 qqe(rm(e),OR0,Rqe).storable()}satisfies(e){let r=rm(e);if(this.request.headers.host!==r.headers.host||this.request.compress!==r.compress)return!1;let s=new Iqe(this.request),n=new Iqe(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?zR0.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=rm(e);return r.method="GET",!this.policy.satisfiesWithoutRevalidation(r)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let r=rm(e);return this.policy.revalidationHeaders(r)}revalidated(e,r){let s=rm(e),n=wqe(r);return!this.policy.revalidatedPolicy(s,n).modified}};Sqe.exports=qY});var vqe=h((xLt,Nqe)=>{var RY=class extends Error{static{o(this,"NotCachedError")}constructor(e){super(`request to ${e} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};Nqe.exports={NotCachedError:RY}});var Uqe=h((_Lt,kqe)=>{"use strict";var Fqe=typeof process=="object"&&process?process:{stdout:null,stderr:null},ER0=require("events"),Tqe=require("stream"),xqe=require("string_decoder").StringDecoder,Mp=Symbol("EOF"),mp=Symbol("maybeEmitEnd"),MA=Symbol("emittedEnd"),LN=Symbol("emittingEnd"),ey=Symbol("emittedError"),QN=Symbol("closed"),Wqe=Symbol("read"),PN=Symbol("flush"),_qe=Symbol("flushChunk"),en=Symbol("encoding"),gp=Symbol("decoder"),kN=Symbol("flowing"),ty=Symbol("paused"),sm=Symbol("resume"),X1=Symbol("bufferLength"),wY=Symbol("bufferPush"),SY=Symbol("bufferShift"),Fr=Symbol("objectMode"),Tr=Symbol("destroyed"),NY=Symbol("emitData"),Lqe=Symbol("emitEnd"),vY=Symbol("emitEnd2"),zp=Symbol("async"),ry=o(t=>Promise.resolve().then(t),"defer"),Qqe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",yR0=Qqe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),CR0=Qqe&&Symbol.iterator||Symbol("iterator not implemented"),BR0=o(t=>t==="end"||t==="finish"||t==="prefinish","isEndish"),DR0=o(t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,"isArrayBuffer"),qR0=o(t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),"isArrayBufferView"),UN=class{static{o(this,"Pipe")}constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[sm](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},FY=class extends UN{static{o(this,"PipeProxyErrors")}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)}};kqe.exports=class Pqe extends Tq
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))}},Cp=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?QR0:LR0);if(!n||s&&!YY.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=Kn(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&&!(YY.includes(this.algorithm)&&this.digest.match(_R0)&&this.options.every(r=>r.match(PR0)))?"":`${this.algorithm}-${this.digest}${cy(this.options)}`}};function cIe(t,e,r,s){let n=t!=="",i=!1,o="",a=s.length-1;for(let u=0;u<a;u++){let p=Cp.prototype.toString.call(s[u],r);p&&(i=!0,o+=p,o+=e)}let c=Cp.prototype.toString.call(s[a],r);return c&&(i=!0,o+=c),n&&i?t+e+o:t+o}var $2=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 YY)this[n]&&(s=cIe(s,r,e,this[n]))}else for(let n of Object.keys(this))s=cIe(s,r,e,this[n]);return s}concat(e,r){let s=typeof e=="string"?e:oy(e,r);return Kn(`${this.toString(r)} ${s}`,r)}hexDigest(){return Kn(this,{single:!0}).hexDigest()}merge(e,r){let s=Kn(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=Kn(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||$R0,n=Object.keys(this).filter(i=>r?.length?r.includes(i):!0);return n.length?n.reduce((i,o)=>s(i,o)||i):null}};Bc.exports.parse=Kn;function Kn(t,e){if(!t)return null;if(typeof t=="string")return $Y(t,e);if(t.algorithm&&t.digest){let r=new $2;return r[t.algorithm]=[t],$Y(oy(r,e),e)}else return $Y(oy(t,e),e)}function $Y(t,e){if(e?.single)return new Cp(t,e);let r=t.trim().split(/\s+/).reduce((s,n)=>{let i=new Cp(n,e);if(i.algorithm&&i.digest){let o=i.algorithm;s[o]||(s[o]=[]),s[o].push(i)}return s},new $2);return r.isEmpty()?null:r}Bc.exports.stringify=oy;function oy(t,e){return t.algorithm&&t.digest?Cp.prototype.toString.call(t,e):typeof t=="string"?oy(Kn(t,e),e):$2.prototype.toString.call(t,e)}Bc.exports.fromHex=kR0;function kR0(t,e,r){let s=cy(r?.options);return Kn(`${e}-${Buffer.from(t,"hex").toString("base64")}${s}`,r)}Bc.exports.fromData=UR0;function UR0(t,e){let r=e?.algorithms||[...KY],s=cy(e?.options);return r.reduce((n,i)=>{let o=ay.createHash(i).update(t).digest("base64"),a=new Cp(`${i}-${o}${s}`,e);if(a.algorithm&&a.digest){let c=a.algorithm;n[c]||(n[c]=[]),n[c].push(a)}return n},new $2)}Bc.exports.fromStream=GR0;function GR0(t,e){let r=ZY(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()})}Bc.exports.checkData=HR0;function HR0(t,e,r){if(e=Kn(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=ay.createHash(s).update(t).digest("base64"),i=Kn({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}.
|
||||
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))}},Bp=class{static{o(this,"Hash")}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?PR0:QR0);if(!n||s&&!JY.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=Zn(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(a=>a.digest===this.digest);return i||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(JY.includes(this.algorithm)&&this.digest.match(LR0)&&this.options.every(r=>r.match(kR0)))?"":`${this.algorithm}-${this.digest}${uy(this.options)}`}};function uIe(t,e,r,s){let n=t!=="",i=!1,a="",c=s.length-1;for(let p=0;p<c;p++){let l=Bp.prototype.toString.call(s[p],r);l&&(i=!0,a+=l,a+=e)}let u=Bp.prototype.toString.call(s[c],r);return u&&(i=!0,a+=u),n&&i?t+e+a:t+a}o(uIe,"integrityHashToString");var Y2=class{static{o(this,"Integrity")}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 JY)this[n]&&(s=uIe(s,r,e,this[n]))}else for(let n of Object.keys(this))s=uIe(s,r,e,this[n]);return s}concat(e,r){let s=typeof e=="string"?e:ay(e,r);return Zn(`${this.toString(r)} ${s}`,r)}hexDigest(){return Zn(this,{single:!0}).hexDigest()}merge(e,r){let s=Zn(e,r);for(let n in s)if(this[n]){if(!this[n].find(i=>s[n].find(a=>i.digest===a.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[n]=s[n]}match(e,r){let s=Zn(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(a=>i.digest===a.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||YR0,n=Object.keys(this).filter(i=>r?.length?r.includes(i):!0);return n.length?n.reduce((i,a)=>s(i,a)||i):null}};Dc.exports.parse=Zn;function Zn(t,e){if(!t)return null;if(typeof t=="string")return YY(t,e);if(t.algorithm&&t.digest){let r=new Y2;return r[t.algorithm]=[t],YY(ay(r,e),e)}else return YY(ay(t,e),e)}o(Zn,"parse");function YY(t,e){if(e?.single)return new Bp(t,e);let r=t.trim().split(/\s+/).reduce((s,n)=>{let i=new Bp(n,e);if(i.algorithm&&i.digest){let a=i.algorithm;s[a]||(s[a]=[]),s[a].push(i)}return s},new Y2);return r.isEmpty()?null:r}o(YY,"_parse");Dc.exports.stringify=ay;function ay(t,e){return t.algorithm&&t.digest?Bp.prototype.toString.call(t,e):typeof t=="string"?ay(Zn(t,e),e):Y2.prototype.toString.call(t,e)}o(ay,"stringify");Dc.exports.fromHex=UR0;function UR0(t,e,r){let s=uy(r?.options);return Zn(`${e}-${Buffer.from(t,"hex").toString("base64")}${s}`,r)}o(UR0,"fromHex");Dc.exports.fromData=GR0;function GR0(t,e){let r=e?.algorithms||[...ZY],s=uy(e?.options);return r.reduce((n,i)=>{let a=cy.createHash(i).update(t).digest("base64"),c=new Bp(`${i}-${a}${s}`,e);if(c.algorithm&&c.digest){let u=c.algorithm;n[u]||(n[u]=[]),n[u].push(c)}return n},new Y2)}o(GR0,"fromData");Dc.exports.fromStream=HR0;function HR0(t,e){let r=eJ(e);return new Promise((s,n)=>{t.pipe(r),t.on("error",n),r.on("error",n);let i;r.on("integrity",a=>{i=a}),r.on("end",()=>s(i)),r.resume()})}o(HR0,"fromStream");Dc.exports.checkData=XR0;function XR0(t,e,r){if(e=Zn(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=cy.createHash(s).update(t).digest("base64"),i=Zn({algorithm:s,digest:n}),a=i.match(e,r);if(r=r||{},a||!r.error)return a;if(typeof r.size=="number"&&t.length!==r.size){let c=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}}Bc.exports.checkStream=XR0;function XR0(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=Kn(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=ZY(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()})}Bc.exports.integrityStream=ZY;function ZY(t=Object.create(null)){return new JY(t)}Bc.exports.create=VR0;function VR0(t){let e=t?.algorithms||[...KY],r=cy(t?.options),s=e.map(ay.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 Cp(`${o}-${a}${r}`,t);if(c.algorithm&&c.digest){let u=c.algorithm;i[u]||(i[u]=[]),i[u].push(c)}return i},new $2)}}}var jR0=ay.getHashes(),uIe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>jR0.includes(t));function $R0(t,e){return uIe.indexOf(t.toLowerCase())>=uIe.indexOf(e.toLowerCase())?t:e}});var pIe=f((N5t,eJ)=>{(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 eJ<"u"?eJ.exports=e:this.MurmurHash3=e})()});var AIe=f((v5t,lIe)=>{"use strict";var YR0=pIe();lIe.exports=function(t){if(t){var e=new YR0(t);return("00000000"+e.result().toString(16)).slice(-8)}else return(Math.random().toString(16)+"0000000").slice(2,10)}});var tJ=f((F5t,dIe)=>{var JR0=require("path"),KR0=AIe();dIe.exports=function(t,e,r){return JR0.join(t,(e?e+"-":"")+KR0(r))}});var rJ=f((T5t,ZR0)=>{ZR0.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 sJ=f((x5t,fIe)=>{"use strict";fIe.exports=ew0;function ew0(t){return[t.slice(0,2),t.slice(2,4),t.slice(4)]}});var am=f((W5t,nJ)=>{"use strict";var tw0=rJ()["cache-version"].content,rw0=sJ(),hIe=require("path"),sw0=om();nJ.exports=nw0;function nw0(t,e){let r=sw
Line truncated
|
||||
`+o.map(A=>{let h=JSON.stringify(A);return`${A6(h)} ${h}`}).join(`
|
||||
`),c=async()=>{let A=bv0(qc.join(t,"tmp"),s.tmpPrefix);return await vJ(qc.dirname(A),{recursive:!0}),{target:A,moved:!1}},u=async A=>{if(!A.moved)return ewe(A.target,{recursive:!0,force:!0})},p=async A=>{await dv0(A.target,a,{flag:"wx"}),await vJ(qc.dirname(n),{recursive:!0}),await zv0(A.target,n),A.moved=!0},l=await c();try{await p(l)}finally{await u(l)}return o.reverse().map(A=>d6(t,A,!0))}Zn.exports.insert=twe;async function twe(t,e,r,s={}){let{metadata:n,size:i,time:o}=s,a=Oy(t,e),c={key:e,integrity:r&&hv0.stringify(r),time:o||Date.now(),size:i,metadata:n};try{await vJ(qc.dirname(a),{recursive:!0});let u=JSON.stringify(c);await pv0(a,`
|
||||
${A6(u)} ${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return d6(t,c)}Zn.exports.find=Ev0;async function Ev0(t,e){let r=Oy(t,e);try{return(await l6(r)).reduce((n,i)=>i&&i.key===e?d6(t,i):n,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}Zn.exports.delete=yv0;function yv0(t,e,r={}){if(!r.removeFully)return twe(t,e,null,r);let s=Oy(t,e);return ewe(s,{recursive:!0,force:!0})}Zn.exports.lsStream=rwe;function rwe(t){let e=FJ(t),r=new fv0({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(p6(),u6)),n=await NJ(e);return await s(n,async i=>{let o=qc.join(e,i),a=await NJ(o);await s(a,async c=>{let u=qc.join(o,c),p=await NJ(u);await s(p,async l=>{let A=qc.join(u,l);try{let M=(await l6(A)).reduce((g,y)=>(g.set(y.key,y),g),new Map);for(let g of M.values()){let y=d6(t,g);y&&r.write(y)}}catch(h){if(h.code==="ENOENT")return;throw h}},{concurrency:SJ})},{concurrency:SJ})},{concurrency:SJ}),r.end(),r}).catch(s=>r.emit("error",s)),r}Zn.exports.ls=Cv0;async function Cv0(t){return(await rwe(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}Zn.exports.bucketEntries=l6;async function l6(t,e){let r=await lv0(t,"utf8");return Bv0(r,e)}function Bv0(t){let e=[];return t.split(`
|
||||
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||A6(s[1])!==s[0])return;let n;try{n=JSON.parse(s[1])}catch{}n&&e.push(n)}),e}Zn.exports.bucketDir=FJ;function FJ(t){return qc.join(t,`index-v${gv0}`)}Zn.exports.bucketPath=Oy;function Oy(t,e){let r=swe(e);return qc.join.apply(qc,[FJ(t)].concat(mv0(r)))}Zn.exports.hashKey=swe;function swe(t){return nwe(t,"sha256")}Zn.exports.hashEntry=A6;function A6(t){return nwe(t,"sha1")}function nwe(t,e){return uv0.createHash(e).update(t).digest("hex")}function d6(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?Mv0(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}function NJ(t){return Av0(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}});var hm=f(h6=>{"use strict";Object.defineProperty(h6,"__esModule",{value:!0});h6.LRUCache=void 0;var Dv0=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,owe=new Set,TJ=typeof process=="object"&&process?process:{},awe=(t,e,r,s)=>{typeof TJ.emitWarning=="function"?TJ.emitWarning(t,e,r,s):console.error(`[${r}] ${e}: ${t}`)},f6=globalThis.AbortController,iwe=globalThis.AbortSignal;if(typeof f6>"u"){iwe=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,n){this._onabort.push(n)}},f6=class{constructor(){e()}signal=new iwe;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=TJ.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,awe("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 qv0=t=>!owe.has(t),mA=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),cwe=t=>mA(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?fm:null:null,fm=class extends Array{constructor(e){super(e),this.fill(0)}},xJ=class t{heap;length;static#e=!1;static create(e){let r=cwe(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]}},WJ=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:x,ignoreFetchAbort:L,perf:j}=e;if(j!==void 0&&typeof j?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#a=j??Dv0,r!==0&&!mA(r))throw new TypeError("max option must be a nonnegative integer");let fe=r?cwe(r):Array;if(!fe)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 fe(r),this.#O=new fe(r),this.#M=0,this.#m=0,this.#B=xJ.create(r),this.#o=0,this.#l=0,typeof u=="function"
Line truncated
|
||||
Found: ${t.length}`);throw c.code="EBADSIZE",c.found=t.length,c.expected=r.size,c.sri=e,c}else{let c=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${i}. (${t.length} bytes)`);throw c.code="EINTEGRITY",c.found=i,c.expected=e,c.algorithm=s,c.sri=e,c}}o(XR0,"checkData");Dc.exports.checkStream=VR0;function VR0(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=Zn(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=eJ(r);return new Promise((n,i)=>{t.pipe(s),t.on("error",i),s.on("error",i);let a;s.on("verified",c=>{a=c}),s.on("end",()=>n(a)),s.resume()})}o(VR0,"checkStream");Dc.exports.integrityStream=eJ;function eJ(t=Object.create(null)){return new KY(t)}o(eJ,"integrityStream");Dc.exports.create=jR0;function jR0(t){let e=t?.algorithms||[...ZY],r=uy(t?.options),s=e.map(cy.createHash);return{update:o(function(n,i){return s.forEach(a=>a.update(n,i)),this},"update"),digest:o(function(){return e.reduce((i,a)=>{let c=s.shift().digest("base64"),u=new Bp(`${a}-${c}${r}`,t);if(u.algorithm&&u.digest){let p=u.algorithm;i[p]||(i[p]=[]),i[p].push(u)}return i},new Y2)},"digest")}}o(jR0,"createIntegrity");var $R0=cy.getHashes(),pIe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>$R0.includes(t));function YR0(t,e){return pIe.indexOf(t.toLowerCase())>=pIe.indexOf(e.toLowerCase())?t:e}o(YR0,"getPrioritizedHash")});var lIe=h((YLt,tJ)=>{(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}o(e,"MurmurHash3"),e.prototype.hash=function(r){var s,n,i,a,c;switch(c=r.length,this.len+=c,n=this.k1,i=0,this.rem){case 0:n^=c>i?r.charCodeAt(i++)&65535:0;case 1:n^=c>i?(r.charCodeAt(i++)&65535)<<8:0;case 2:n^=c>i?(r.charCodeAt(i++)&65535)<<16:0;case 3:n^=c>i?(r.charCodeAt(i)&255)<<24:0,n^=c>i?(r.charCodeAt(i++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>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>=c);)n=r.charCodeAt(i++)&65535^(r.charCodeAt(i++)&65535)<<8^(r.charCodeAt(i++)&65535)<<16,a=r.charCodeAt(i++),n^=(a&255)<<24^(a&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 tJ<"u"?tJ.exports=e:this.MurmurHash3=e})()});var dIe=h((KLt,AIe)=>{"use strict";var JR0=lIe();AIe.exports=function(t){if(t){var e=new JR0(t);return("00000000"+e.result().toString(16)).slice(-8)}else return(Math.random().toString(16)+"0000000").slice(2,10)}});var rJ=h((ZLt,fIe)=>{var KR0=require("path"),ZR0=dIe();fIe.exports=function(t,e,r){return KR0.join(t,(e?e+"-":"")+ZR0(r))}});var sJ=h((e8t,ew0)=>{ew0.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 nJ=h((t8t,hIe)=>{"use strict";hIe.exports=tw0;function tw0(t){return[t.slice(0,2),t.slice(2,4),t.slic
Line truncated
|
||||
`+a.map(d=>{let b=JSON.stringify(d);return`${f6(b)} ${b}`}).join(`
|
||||
`),u=o(async()=>{let d=Mv0(Ic.join(t,"tmp"),s.tmpPrefix);return await FJ(Ic.dirname(d),{recursive:!0}),{target:d,moved:!1}},"setup"),p=o(async d=>{if(!d.moved)return twe(d.target,{recursive:!0,force:!0})},"teardown"),l=o(async d=>{await fv0(d.target,c,{flag:"wx"}),await FJ(Ic.dirname(n),{recursive:!0}),await Ov0(d.target,n),d.moved=!0},"write"),A=await u();try{await l(A)}finally{await p(A)}return a.reverse().map(d=>h6(t,d,!0))}o(Ev0,"compact");ei.exports.insert=rwe;async function rwe(t,e,r,s={}){let{metadata:n,size:i,time:a}=s,c=Ey(t,e),u={key:e,integrity:r&&bv0.stringify(r),time:a||Date.now(),size:i,metadata:n};try{await FJ(Ic.dirname(c),{recursive:!0});let p=JSON.stringify(u);await lv0(c,`
|
||||
${f6(p)} ${p}`)}catch(p){if(p.code==="ENOENT")return;throw p}return h6(t,u)}o(rwe,"insert");ei.exports.find=yv0;async function yv0(t,e){let r=Ey(t,e);try{return(await d6(r)).reduce((n,i)=>i&&i.key===e?h6(t,i):n,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}o(yv0,"find");ei.exports.delete=Cv0;function Cv0(t,e,r={}){if(!r.removeFully)return rwe(t,e,null,r);let s=Ey(t,e);return twe(s,{recursive:!0,force:!0})}o(Cv0,"del");ei.exports.lsStream=swe;function swe(t){let e=TJ(t),r=new hv0({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(A6(),l6)),n=await vJ(e);return await s(n,async i=>{let a=Ic.join(e,i),c=await vJ(a);await s(c,async u=>{let p=Ic.join(a,u),l=await vJ(p);await s(l,async A=>{let d=Ic.join(p,A);try{let m=(await d6(d)).reduce((z,C)=>(z.set(C.key,C),z),new Map);for(let z of m.values()){let C=h6(t,z);C&&r.write(C)}}catch(b){if(b.code==="ENOENT")return;throw b}},{concurrency:NJ})},{concurrency:NJ})},{concurrency:NJ}),r.end(),r}).catch(s=>r.emit("error",s)),r}o(swe,"lsStream");ei.exports.ls=Bv0;async function Bv0(t){return(await swe(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}o(Bv0,"ls");ei.exports.bucketEntries=d6;async function d6(t,e){let r=await Av0(t,"utf8");return Dv0(r,e)}o(d6,"bucketEntries");function Dv0(t){let e=[];return t.split(`
|
||||
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||f6(s[1])!==s[0])return;let n;try{n=JSON.parse(s[1])}catch{}n&&e.push(n)}),e}o(Dv0,"_bucketEntries");ei.exports.bucketDir=TJ;function TJ(t){return Ic.join(t,`index-v${zv0}`)}o(TJ,"bucketDir");ei.exports.bucketPath=Ey;function Ey(t,e){let r=nwe(e);return Ic.join.apply(Ic,[TJ(t)].concat(gv0(r)))}o(Ey,"bucketPath");ei.exports.hashKey=nwe;function nwe(t){return iwe(t,"sha256")}o(nwe,"hashKey");ei.exports.hashEntry=f6;function f6(t){return iwe(t,"sha1")}o(f6,"hashEntry");function iwe(t,e){return pv0.createHash(e).update(t).digest("hex")}o(iwe,"hash");function h6(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?mv0(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}o(h6,"formatEntry");function vJ(t){return dv0(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}o(vJ,"readdirOrEmpty")});var bm=h(M6=>{"use strict";Object.defineProperty(M6,"__esModule",{value:!0});M6.LRUCache=void 0;var qv0=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,awe=new Set,xJ=typeof process=="object"&&process?process:{},cwe=o((t,e,r,s)=>{typeof xJ.emitWarning=="function"?xJ.emitWarning(t,e,r,s):console.error(`[${r}] ${e}: ${t}`)},"emitWarning"),b6=globalThis.AbortController,owe=globalThis.AbortSignal;if(typeof b6>"u"){owe=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(s,n){this._onabort.push(n)}},b6=class{static{o(this,"AbortController")}constructor(){e()}signal=new owe;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=xJ.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{t&&(t=!1,cwe("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))},"warnACPolyfill")}var Iv0=o(t=>!awe.has(t),"shouldWarn"),gA=o(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"isPosInt"),uwe=o(t=>gA(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?hm:null:null,"getUintArray"),hm=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},WJ=class t{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let r=uwe(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]}},_J=class t{static{o(this,"LRUCache")}#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:o(r=>e.#f(r),"isBackgroundFetch"),backgroundFetch:o((r,s,n,i)=>e.#U(r,s,n,i),"backgroundFetch"),moveToTail:o(r=>e.#W(r),"moveToTail"),indexes:o(r=>e.#w(r),"indexes"),rindexes:o(r=>e.#N(r),"rindexes"),isStale:o(r=>e.#I(r),"isStale")}}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:a,updateAgeOnHas:c,allowStale:u,dispose:p,onInsert:l,disposeAfter:A,noDisposeOnSet:d,noUpdateTTL:b,maxSize:m=0,maxEntrySize:z=0,sizeCalculation:C,fetchMethod:E,memoMethod:D,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:W,ignoreFetchAbort:Q,perf:$}=e;if($!==void 0&&typeof $?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#a=$??qv0,r!==0&&!gA(r))throw new TypeError("max option must be a nonnegative integer");let he=r?uwe(r):Array;if(!he)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=m,this.maxEntrySize=z||this.#t,this.sizeCalculation=C,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("si
Line truncated
|
||||
Wanted: ${t}
|
||||
Found: ${e}`);return r.code="EINTEGRITY",r.expected=t,r.found=e,r}});var wwe=f((JRt,JJ)=>{"use strict";var Dwe=dm(),qwe=Ey(),Iwe=Bwe(),uF0=ry(),{PassThrough:pF0}=_Y(),lF0=j2(),Rwe=t=>({algorithms:["sha512"],...t});JJ.exports=AF0;async function AF0(t,e,r,s={}){let{memoize:n}=s;s=Rwe(s);let i=await Iwe(t,r,s),o=await Dwe.insert(t,e,i.integrity,{...s,size:i.size});return n&&qwe.put(t,o,r,s),i.integrity}JJ.exports.stream=dF0;function dF0(t,e,r={}){let{memoize:s}=r;r=Rwe(r);let n,i,o,a,c=new lF0;if(s){let p=new pF0().on("collect",l=>{a=l});c.push(p)}let u=Iwe.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 uF0({async flush(){if(!o){let p=await Dwe.insert(t,e,n,{...r,size:i});s&&a&&qwe.put(t,p,a,r),c.emit("integrity",n),c.emit("size",i)}}})),c}});var Nwe=f(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.range=nf.balanced=void 0;var fF0=(t,e,r)=>{let s=t instanceof RegExp?Swe(t,r):t,n=e instanceof RegExp?Swe(e,r):e,i=s!==null&&n!=null&&(0,nf.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)}};nf.balanced=fF0;var Swe=(t,e)=>{let r=e.match(t);return r?r[0]:null},hF0=(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};nf.range=hF0});var Lwe=f(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});Cm.EXPANSION_MAX=void 0;Cm.expand=IF0;var vwe=Nwe(),Fwe="\0SLASH"+Math.random()+"\0",Twe="\0OPEN"+Math.random()+"\0",ZJ="\0CLOSE"+Math.random()+"\0",xwe="\0COMMA"+Math.random()+"\0",Wwe="\0PERIOD"+Math.random()+"\0",bF0=new RegExp(Fwe,"g"),MF0=new RegExp(Twe,"g"),mF0=new RegExp(ZJ,"g"),gF0=new RegExp(xwe,"g"),zF0=new RegExp(Wwe,"g"),OF0=/\\\\/g,EF0=/\\{/g,yF0=/\\}/g,CF0=/\\,/g,BF0=/\\./g;Cm.EXPANSION_MAX=1e5;function KJ(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function DF0(t){return t.replace(OF0,Fwe).replace(EF0,Twe).replace(yF0,ZJ).replace(CF0,xwe).replace(BF0,Wwe)}function qF0(t){return t.replace(bF0,"\\").replace(MF0,"{").replace(mF0,"}").replace(gF0,",").replace(zF0,".")}function _we(t){if(!t)return[""];let e=[],r=(0,vwe.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=_we(i);return i.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function IF0(t,e={}){if(!t)return[];let{max:r=Cm.EXPANSION_MAX}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),Ry(DF0(t),r,!0).map(qF0)}function RF0(t){return"{"+t+"}"}function wF0(t){return/^-?0\d/.test(t)}function SF0(t,e){return t<=e}function NF0(t,e){return t>=e}function Ry(t,e,r){let s=[],n=(0,vwe.balanced)("{","}",t);if(!n)return[t];let i=n.pre,o=n.post.length?Ry(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+ZJ+n.post,Ry(t,e,!0)):[t];let l;if(u)l=n.body.split(/\.\./);else if(l=_we(n.body),l.length===1&&l[0]!==void 0&&(l=Ry(l[0],e,!1).map(RF0),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=KJ(l[0]),M=KJ(l[1]),g=Math.max(l[0].length,l[1].length),y=l.length===3&&l[2]!==void 0?Math.abs(KJ(l[2])):1,O=SF0;M<h&&(y*=-1,O=NF0);let I=l.some(wF0);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 x=g-N.length;if(x>0){let L=new Array(x+1).join("0");R<0?N="-"+L+N.slice(1):N=L+N}}A.push(N)}}else{A=[];for(let h=0;h<l.length;h++)A.push.apply(A,Ry(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 Qwe=f(D6=>{"use strict";Object.defineProperty(D6,"__esModule",{value:!0});D6.assertValidPattern=void 0;var vF0=1024*64,FF0=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>vF0)throw new TypeError("pattern is too long")};D6.assertValidPattern=FF0});var kwe=f(q6=>{"use strict";Object.defineProperty(q6,"__esModule",{value:!0});q6.parseClass=void 0;var TF0={"[: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]},wy=t=>t.replace(/[[\]\\-]/g,"\\$&"),xF0=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,ze.braceExpand)(this.pattern,this.options)}parse(e){(0,F6.assertValidPattern)(e);let r=this.options;if(e==="**")return ze.GLOBSTAR;if(e==="")return"";let s,n=null;(s=e.match(aT0))?n=r.dot?uT0:cT0:(s=e.match(JF0))?n=(r.nocase?r.dot?tT0:eT0:r.dot?ZF0:KF0)(s[1]):(s=e.match(pT0))?n=(r.nocase?r.dot?AT0:lT0:r.dot?dT0:fT0)(s):(s=e.match(rT0))?n=r.dot?nT0:sT0:(s=e.match(iT0))&&(n=oT0);let i=jwe.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?bT0:r.dot?MT0:mT0,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"?CT0(l):l===ze.GLOBSTAR?ze.GLOBSTAR:l._src});u.forEach((l,A)=>{let h=u[A+1],M=u[A-1];l!==ze.GLOBSTAR||M===ze.GLOBSTAR||(M===void 0?h!==void 0&&h!==ze.GLOBSTAR?u[A+1]="(?:\\/|"+s+"\\/)?"+h:u[A]=s:h===void 0?u[A-1]=M+"(?:\\/|\\/"+s+")?":h!==ze.GLOBSTAR&&(u[A-1]=M+"(?:\\/|\\/"+s+"\\/)"+h,u[A+1]=ze.GLOBSTAR))});let p=u.filter(l=>l!==ze.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 ze.minimatch.defaults(e).Minimatch}};ze.Minimatch=of;var BT0=rK();Object.defineProperty(ze,"AST",{enumerable:!0,get:function(){return BT0.AST}});var DT0=sK();Object.defineProperty(ze,"escape",{enumerable:!0,get:function(){return DT0.escape}});var qT0=R6();Object.defineProperty(ze,"unescape",{enumerable:!0,get:function(){return qT0.unescape}});ze.minimatch.AST=jwe.AST;ze.minimatch.Minimatch=of;ze.minimatch.escape=jF0.escape;ze.minimatch.unescape=$F0.unescape});var sSe=f(Os=>{"use strict";var IT0=Os&&Os.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Os,"__esModule",{value:!0});Os.Minipass=Os.isWritable=Os.isReadable=Os.isStream=void 0;var Kwe=typeof process=="object"&&process?process:{stdout:null,stderr:null},pK=require("node:events"),rSe=IT0(require("node:stream")),RT0=require("node:string_decoder"),wT0=t=>!!t&&typeof t=="object"&&(t instanceof P6||t instanceof rSe.default||(0,Os.isReadable)(t)||(0,Os.isWritable)(t));Os.isStream=wT0;var ST0=t=>!!t&&typeof t=="object"&&t instanceof pK.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==rSe.default.Writable.prototype.pipe;Os.isReadable=ST0;var NT0=t=>!!t&&typeof t=="object"&&t instanceof pK.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function";Os.isWritable=NT0;var vp=Symbol("EOF"),Fp=Symbol("maybeEmitEnd"),yA=Symbol("emittedEnd"),T6=Symbol("emittingEnd"),Sy=Symbol("emittedError"),x6=Symbol("closed"),Zwe=Symbol("read"),W6=Symbol("flush"),eSe=Symbol("flushChunk"),Xo=Symbol("encoding"),Bm=Symbol("decoder"),j1=Symbol("flowing"),Ny=Symbol("paused"),Dm=Symbol("resume"),$1=Symbol("buffer"),zs=Symbol("pipes"),Y1=Symbol("bufferLength"),nK=Symbol("bufferPush"),_6=Symbol("bufferShift"),_r=Symbol("objectMode"),i1=Symbol("destroyed"),iK=Symbol("error"),oK=Symbol("emitData"),tSe=Symbol("emitEnd"),aK=Symbol("emitEnd2"),Rc=Symbol("async"),cK=Symbol("abort"),L6=Symbol("aborted"),vy=Symbol("signal"),af=Symbol("dataListeners"),ei=Symbol("discarded"),Fy=t=>Promise.resolve().then(t),vT0=t=>t(),FT0=t=>t==="end"||t==="finish"||t==="prefinish",TT0=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,xT0=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Q6=class{src;dest;opts;ondrain;constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[Dm](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyE
Line truncated
|
||||
Found: ${e}`);return r.code="EINTEGRITY",r.expected=t,r.found=e,r}o(uF0,"checksumError")});var Swe=h((EPt,KJ)=>{"use strict";var qwe=fm(),Iwe=yy(),Rwe=Dwe(),pF0=sy(),{PassThrough:lF0}=LY(),AF0=$2(),wwe=o(t=>({algorithms:["sha512"],...t}),"putOpts");KJ.exports=dF0;async function dF0(t,e,r,s={}){let{memoize:n}=s;s=wwe(s);let i=await Rwe(t,r,s),a=await qwe.insert(t,e,i.integrity,{...s,size:i.size});return n&&Iwe.put(t,a,r,s),i.integrity}o(dF0,"putData");KJ.exports.stream=fF0;function fF0(t,e,r={}){let{memoize:s}=r;r=wwe(r);let n,i,a,c,u=new AF0;if(s){let l=new lF0().on("collect",A=>{c=A});u.push(l)}let p=Rwe.stream(t,r).on("integrity",l=>{n=l}).on("size",l=>{i=l}).on("error",l=>{a=l});return u.push(p),u.push(new pF0({async flush(){if(!a){let l=await qwe.insert(t,e,n,{...r,size:i});s&&c&&Iwe.put(t,l,c,r),u.emit("integrity",n),u.emit("size",i)}}})),u}o(fF0,"putStream")});var vwe=h(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.range=of.balanced=void 0;var hF0=o((t,e,r)=>{let s=t instanceof RegExp?Nwe(t,r):t,n=e instanceof RegExp?Nwe(e,r):e,i=s!==null&&n!=null&&(0,of.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)}},"balanced");of.balanced=hF0;var Nwe=o((t,e)=>{let r=e.match(t);return r?r[0]:null},"maybeMatch"),bF0=o((t,e,r)=>{let s,n,i,a,c,u=r.indexOf(t),p=r.indexOf(e,u+1),l=u;if(u>=0&&p>0){if(t===e)return[u,p];for(s=[],i=r.length;l>=0&&!c;){if(l===u)s.push(l),u=r.indexOf(t,l+1);else if(s.length===1){let A=s.pop();A!==void 0&&(c=[A,p])}else n=s.pop(),n!==void 0&&n<i&&(i=n,a=p),p=r.indexOf(e,l+1);l=u<p&&u>=0?u:p}s.length&&a!==void 0&&(c=[i,a])}return c},"range");of.range=bF0});var Qwe=h(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.EXPANSION_MAX=void 0;Bm.expand=RF0;var Fwe=vwe(),Twe="\0SLASH"+Math.random()+"\0",xwe="\0OPEN"+Math.random()+"\0",eK="\0CLOSE"+Math.random()+"\0",Wwe="\0COMMA"+Math.random()+"\0",_we="\0PERIOD"+Math.random()+"\0",MF0=new RegExp(Twe,"g"),mF0=new RegExp(xwe,"g"),gF0=new RegExp(eK,"g"),zF0=new RegExp(Wwe,"g"),OF0=new RegExp(_we,"g"),EF0=/\\\\/g,yF0=/\\{/g,CF0=/\\}/g,BF0=/\\,/g,DF0=/\\./g;Bm.EXPANSION_MAX=1e5;function ZJ(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}o(ZJ,"numeric");function qF0(t){return t.replace(EF0,Twe).replace(yF0,xwe).replace(CF0,eK).replace(BF0,Wwe).replace(DF0,_we)}o(qF0,"escapeBraces");function IF0(t){return t.replace(MF0,"\\").replace(mF0,"{").replace(gF0,"}").replace(zF0,",").replace(OF0,".")}o(IF0,"unescapeBraces");function Lwe(t){if(!t)return[""];let e=[],r=(0,Fwe.balanced)("{","}",t);if(!r)return t.split(",");let{pre:s,body:n,post:i}=r,a=s.split(",");a[a.length-1]+="{"+n+"}";let c=Lwe(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}o(Lwe,"parseCommaParts");function RF0(t,e={}){if(!t)return[];let{max:r=Bm.EXPANSION_MAX}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),wy(qF0(t),r,!0).map(IF0)}o(RF0,"expand");function wF0(t){return"{"+t+"}"}o(wF0,"embrace");function SF0(t){return/^-?0\d/.test(t)}o(SF0,"isPadded");function NF0(t,e){return t<=e}o(NF0,"lte");function vF0(t,e){return t>=e}o(vF0,"gte");function wy(t,e,r){let s=[],n=(0,Fwe.balanced)("{","}",t);if(!n)return[t];let i=n.pre,a=n.post.length?wy(n.post,e,!1):[""];if(/\$$/.test(n.pre))for(let c=0;c<a.length&&c<e;c++){let u=i+"{"+n.body+"}"+a[c];s.push(u)}else{let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),p=c||u,l=n.body.indexOf(",")>=0;if(!p&&!l)return n.post.match(/,(?!,).*\}/)?(t=n.pre+"{"+n.body+eK+n.post,wy(t,e,!0)):[t];let A;if(p)A=n.body.split(/\.\./);else if(A=Lwe(n.body),A.length===1&&A[0]!==void 0&&(A=wy(A[0],e,!1).map(wF0),A.length===1))return a.map(b=>n.pre+A[0]+b);let d;if(p&&A[0]!==void 0&&A[1]!==void 0){let b=ZJ(A[0]),m=ZJ(A[1]),z=Math.max(A[0].length,A[1].length),C=A.length===3&&A[2]!==void 0?Math.abs(ZJ(A[2])):1,E=NF0;m<b&&(C*=-1,E=vF0);let R=A.some(SF0);d=[];for(let w=b;E(w,m);w+=C){let v;if(u)v=String.fromCharCode(w),v==="\\"&&(v="");else if(v=String(w),R){let W=z-v.length;if(W>0){let Q=new Array(W+1).join("0");w<0?v="-"+Q+v.slice(1):v=Q+v}}d.push(v)}}else{d=[];for(let b=0;b<A.length;b++)d.push.apply(d,wy(A[b],e,!1))}for(let b=0;b<d.length;b++)for(let m=0;m<a.length&&s.length<e;m++){let z=i+d[b]+a[m];(!r||p||z)&&s.push(z)}}return s}o(wy,"expand_")});var Pwe=h(I6=>{"use strict";Object.defineProperty(I6,"__esModule",{value:!0});I6.assertValidPattern=void 0;var FF0=1024*64,TF0=o(t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>FF0)throw new TypeError("pattern is too long")},"assertValidPattern");I6.assertValidPattern=TF0});var Uwe=h(R6=>{"use strict";Object.defineProperty(R6,"__esModule",{value:!0});R6.parseClass=void 0;var xF0={"[: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}
Line truncated
|
||||
globstar while`,e,d,r,b,m),this.matchOne(e.slice(d),r.slice(b),s))return this.debug("globstar found match!",d,u,m),!0;if(m==="."||m===".."||!n.dot&&m.charAt(0)==="."){this.debug("dot detected!",e,d,r,b);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(s&&(this.debug(`
|
||||
>>> no match, partial?`,e,d,r,b),d===u))}let z;if(typeof l=="string"?(z=A===l,this.debug("string match",l,A,z)):(z=l.test(A),this.debug("pattern match",l,A,z)),!z)return!1}if(a===u&&c===p)return!0;if(a===u)return s;if(c===p)return a===u-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,Oe.braceExpand)(this.pattern,this.options)}parse(e){(0,x6.assertValidPattern)(e);let r=this.options;if(e==="**")return Oe.GLOBSTAR;if(e==="")return"";let s,n=null;(s=e.match(cT0))?n=r.dot?pT0:uT0:(s=e.match(KF0))?n=(r.nocase?r.dot?rT0:tT0:r.dot?eT0:ZF0)(s[1]):(s=e.match(lT0))?n=(r.nocase?r.dot?dT0:AT0:r.dot?fT0:hT0)(s):(s=e.match(sT0))?n=r.dot?iT0:nT0:(s=e.match(oT0))&&(n=aT0);let i=$we.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?MT0:r.dot?mT0:gT0,n=new Set(r.nocase?["i"]:[]),i=e.map(u=>{let p=u.map(A=>{if(A instanceof RegExp)for(let d of A.flags.split(""))n.add(d);return typeof A=="string"?BT0(A):A===Oe.GLOBSTAR?Oe.GLOBSTAR:A._src});p.forEach((A,d)=>{let b=p[d+1],m=p[d-1];A!==Oe.GLOBSTAR||m===Oe.GLOBSTAR||(m===void 0?b!==void 0&&b!==Oe.GLOBSTAR?p[d+1]="(?:\\/|"+s+"\\/)?"+b:p[d]=s:b===void 0?p[d-1]=m+"(?:\\/|\\/"+s+")?":b!==Oe.GLOBSTAR&&(p[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+b,p[d+1]=Oe.GLOBSTAR))});let l=p.filter(A=>A!==Oe.GLOBSTAR);if(this.partial&&l.length>=1){let A=[];for(let d=1;d<=l.length;d++)A.push(l.slice(0,d).join("/"));return"(?:"+A.join("|")+")"}return l.join("/")}).join("|"),[a,c]=e.length>1?["(?:",")"]:["",""];i="^"+a+i+c+"$",this.partial&&(i="^(?:\\/|"+a+i.slice(1,-1)+c+")$"),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 a=n[n.length-1];if(!a)for(let c=n.length-2;!a&&c>=0;c--)a=n[c];for(let c=0;c<i.length;c++){let u=i[c],p=n;if(s.matchBase&&u.length===1&&(p=[a]),this.matchOne(p,u,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return Oe.minimatch.defaults(e).Minimatch}};Oe.Minimatch=af;var DT0=sK();Object.defineProperty(Oe,"AST",{enumerable:!0,get:o(function(){return DT0.AST},"get")});var qT0=nK();Object.defineProperty(Oe,"escape",{enumerable:!0,get:o(function(){return qT0.escape},"get")});var IT0=S6();Object.defineProperty(Oe,"unescape",{enumerable:!0,get:o(function(){return IT0.unescape},"get")});Oe.minimatch.AST=$we.AST;Oe.minimatch.Minimatch=af;Oe.minimatch.escape=$F0.escape;Oe.minimatch.unescape=YF0.unescape});var nSe=h(Es=>{"use strict";var RT0=Es&&Es.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Es,"__esModule",{value:!0});Es.Minipass=Es.isWritable=Es.isReadable=Es.isStream=void 0;var Zwe=typeof process=="object"&&process?process:{stdout:null,stderr:null},lK=require("node:events"),sSe=RT0(require("node:stream")),wT0=require("node:string_decoder"),ST0=o(t=>!!t&&typeof t=="object"&&(t instanceof U6||t instanceof sSe.default||(0,Es.isReadable)(t)||(0,Es.isWritable)(t)),"isStream");Es.isStream=ST0;var NT0=o(t=>!!t&&typeof t=="object"&&t instanceof lK.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==sSe.default.Writable.prototype.pipe,"isReadable");Es.isReadable=NT0;var vT0=o(t=>!!t&&typeof t=="object"&&t instanceof lK.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function","isWritable");Es.isWritable=vT0;var Fp=Symbol("EOF"),Tp=Symbol("maybeEmitEnd"),CA=Symbol("emittedEnd"),W6=Symbol("emittingEnd"),Ny=Symbol("emittedError"),_6=Symbol("closed"),eSe=Symbol("read"),L6=Symbol("flush"),tSe=Symbol("flushChunk"),Vo=Symbol("encoding"),Dm=Symbol("decoder"),$1=Symbol("flowing"),vy=Symbol("paused"),qm=Symbol("resume"),Y1=Symbol("buffer"),Os=Symbol("pipes"),J1=Symbol("bufferLength"),iK=Symbol("bufferPush"),Q6=Symbol("bufferShift"),Lr=Symbol("objectMode"),o1=Symbol("destroyed"),oK=Symbol("error"),aK=Symbol("emitData"),rSe=Symbol("emitEnd"),cK=Symbol("emitEnd2"),wc=Symbol("async"),uK=Symbol("abort"),P6=Symbol("aborted"),Fy=Symbol("signal"),cf=Symbol("dataListeners"),ti=Symbol("discarded"),Ty=o(t=>Promise.resolve().then(t),"defer"),FT0=o(t=>t(),"nodefer"),TT0=o(t=>t==="end"||t==="finish"||t==="prefinish","isEndish"),xT0=o(t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,"isArrayBufferLike"),WT0=o(t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),"isArrayBufferView"),k6=class{static{o(this,"Pipe")}src;dest;opts;ondra
Line truncated
|
||||
\r
|
||||
`);if(A===-1){Mv("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(),x=I.slice(R+1).trimStart(),L=B[N];typeof L=="string"?B[N]=[L,x]:Array.isArray(L)?L.push(x):B[N]=x}Mv("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()})}Nm.parseProxyResponse=GW0});var CNe=f(Yi=>{"use strict";var HW0=Yi&&Yi.__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]})),XW0=Yi&&Yi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ENe=Yi&&Yi.__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)&&HW0(e,t,r);return XW0(e,t),e},yNe=Yi&&Yi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.HttpsProxyAgent=void 0;var eC=ENe(require("net")),zNe=ENe(require("tls")),VW0=yNe(require("assert")),jW0=yNe(Gd()),$W0=QO(),YW0=require("url"),JW0=gNe(),tC=(0,jW0.default)("https-proxy-agent"),mv=class extends $W0.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new YW0.URL(e):e,this.proxyHeaders=r?.headers??{},tC("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?ONe(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:"){tC("Creating `tls.Socket`: %o",this.connectOpts);let A=this.connectOpts.servername||this.connectOpts.host;n=zNe.connect({...this.connectOpts,servername:A&&eC.isIP(A)?void 0:A})}else tC("Creating `net.Socket`: %o",this.connectOpts),n=eC.connect(this.connectOpts);let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=eC.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,JW0.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",KW0),r.secureEndpoint){tC("Upgrading socket connection to TLS");let A=r.servername||r.host;return zNe.connect({...ONe(r,"host","path","port"),socket:n,servername:eC.isIP(A)?void 0:A})}return n}n.destroy();let l=new eC.Socket({writable:!1});return l.readable=!0,e.once("socket",A=>{tC("Replaying proxy buffer for failed request"),(0,VW0.default)(A.listenerCount("data")>0),A.push(p),A.push(null)}),l}};mv.protocols=["http","https"];Yi.HttpsProxyAgent=mv;function KW0(t){t.resume()}function ONe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var INe=f(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var BNe=require("buffer"),Af={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."};Wp.ERRORS=Af;function ZW0(t){if(!BNe.Buffer.isEncoding(t))throw new Error(Af.INVALID_ENCODING)}Wp.checkEncoding=ZW0;function DNe(t){return typeof t=="number"&&isFinite(t)&&s_0(t)}Wp.isFiniteInteger=DNe;function qNe(t,e){if(typeof t=="number"){if(!DNe(t)||t<0)throw new Error(e?Af.INVALID_OFFSET:Af.INVALID_LENGTH)}else throw new Error(e?Af.INVALID_OFFSET_NON_NUMBER:Af.INVALID_LENGTH_NON_NUMBER)}function e_0(t){qNe(t,!1)}Wp.checkLengthValue=e_0;function t_0(t){qNe(t,!0)}Wp.checkOffsetValue=t_0;function r_0(t,e){if(t<0||t>e.length)throw new Error(Af.INVALID_TARGET_OFFSET)}Wp.checkTargetOffset=r_0;function s_0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function n_0(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof BNe.Buffer.prototype[t]>"u")throw new Error(`Platform does not support Buffer.prototype.${t}.`)}Wp.bigIntAndBufferInt64Check=n_0});var wNe=f(ZK=>{"use strict";Object.defineProperty(ZK,"__esModule",{value:!0});var Ze=INe(),RNe=4096,i_0="utf8",KK=class t{constructor(e){if(this.length=0,this._encoding=i_0,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(Ze.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(Ze.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(Ze.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(Ze.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(RNe);else{if(typeof e<"u")throw new Error(Ze.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(RNe)}}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 Ze.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return Ze.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){return t
Line truncated
|
||||
`);if(d===-1){gv("have not received end of HTTP headers yet..."),i();return}let b=A.slice(0,d).toString("ascii").split(`\r
|
||||
`),m=b.shift();if(!m)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let z=m.split(" "),C=+z[1],E=z.slice(2).join(" "),D={};for(let R of b){if(!R)continue;let w=R.indexOf(":");if(w===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${R}"`));let v=R.slice(0,w).toLowerCase(),W=R.slice(w+1).trimStart(),Q=D[v];typeof Q=="string"?D[v]=[Q,W]:Array.isArray(Q)?Q.push(W):D[v]=W}gv("got proxy server response: %o %o",m,D),a(),e({connect:{statusCode:C,statusText:E,headers:D},buffered:A})}o(p,"ondata"),t.on("error",u),t.on("end",c),i()})}o(HW0,"parseProxyResponse");vm.parseProxyResponse=HW0});var BNe=h(Ji=>{"use strict";var XW0=Ji&&Ji.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),VW0=Ji&&Ji.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),yNe=Ji&&Ji.__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)&&XW0(e,t,r);return VW0(e,t),e},CNe=Ji&&Ji.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.HttpsProxyAgent=void 0;var tC=yNe(require("net")),ONe=yNe(require("tls")),jW0=CNe(require("assert")),$W0=CNe(Hd()),YW0=PO(),JW0=require("url"),KW0=zNe(),rC=(0,$W0.default)("https-proxy-agent"),zv=class extends YW0.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new JW0.URL(e):e,this.proxyHeaders=r?.headers??{},rC("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?ENe(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:"){rC("Creating `tls.Socket`: %o",this.connectOpts);let d=this.connectOpts.servername||this.connectOpts.host;n=ONe.connect({...this.connectOpts,servername:d&&tC.isIP(d)?void 0:d})}else rC("Creating `net.Socket`: %o",this.connectOpts),n=tC.connect(this.connectOpts);let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=tC.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
||||
`;if(s.username||s.password){let d=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}i.Host=`${a}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))c+=`${d}: ${i[d]}\r
|
||||
`;let u=(0,KW0.parseProxyResponse)(n);n.write(`${c}\r
|
||||
`);let{connect:p,buffered:l}=await u;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200){if(e.once("socket",ZW0),r.secureEndpoint){rC("Upgrading socket connection to TLS");let d=r.servername||r.host;return ONe.connect({...ENe(r,"host","path","port"),socket:n,servername:tC.isIP(d)?void 0:d})}return n}n.destroy();let A=new tC.Socket({writable:!1});return A.readable=!0,e.once("socket",d=>{rC("Replaying proxy buffer for failed request"),(0,jW0.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),A}};zv.protocols=["http","https"];Ji.HttpsProxyAgent=zv;function ZW0(t){t.resume()}o(ZW0,"resume");function ENe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(ENe,"omit")});var RNe=h(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});var DNe=require("buffer"),df={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};_p.ERRORS=df;function e_0(t){if(!DNe.Buffer.isEncoding(t))throw new Error(df.INVALID_ENCODING)}o(e_0,"checkEncoding");_p.checkEncoding=e_0;function qNe(t){return typeof t=="number"&&isFinite(t)&&n_0(t)}o(qNe,"isFiniteInteger");_p.isFiniteInteger=qNe;function INe(t,e){if(typeof t=="number"){if(!qNe(t)||t<0)throw new Error(e?df.INVALID_OFFSET:df.INVALID_LENGTH)}else throw new Error(e?df.INVALID_OFFSET_NON_NUMBER:df.INVALID_LENGTH_NON_NUMBER)}o(INe,"checkOffsetOrLengthValue");function t_0(t){INe(t,!1)}o(t_0,"checkLengthValue");_p.checkLengthValue=t_0;function r_0(t){INe(t,!0)}o(r_0,"checkOffsetValue");_p.checkOffsetValue=r_0;function s_0(t,e){if(t<0||t>e.length)throw new Error(df.INVALID_TARGET_OFFSET)}o(s_0,"checkTargetOffset");_p.checkTargetOffset=s_0;function n_0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}o(n_0,"isInteger");function i_0(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof DNe.Buffer.prototype[t]>"u")throw new Error(`Platform does not support Buffer.prototype.${t}.`)}o(i_0,"bigIntAndBufferInt64Check");_p.bigIntAndBufferInt64Check=i_0});var SNe=h(eZ=>{"use strict";Object.defineProperty(eZ,"__esModule",{value:!0});var e0=RNe(),wNe=4096,o_0="utf8",ZK=class t{static{o(this,"SmartBuffer")}constructor(e){if(this.length=0,this._encoding=o_0,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(e0.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(e0.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(e0.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(e0.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(wNe);else{if(typeof e<"u")throw new Error(e0.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(wNe)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return e0.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return e0.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)}insertInt16B
Line truncated
|
||||
`).join(`
|
||||
`+i),t.push(n+"m+"+SF.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=w70()+e+" "+t[0]}function w70(){return rr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function S70(...t){return process.stderr.write(wF.formatWithOptions(rr.inspectOpts,...t)+`
|
||||
`)}function N70(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function v70(){return process.env.DEBUG}function F70(t){t.inspectOpts={};let e=Object.keys(rr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=rr.inspectOpts[e[r]]}SF.exports=Yee()(rr);var{formatters:gFe}=SF.exports;gFe.o=function(t){return this.inspectOpts.colors=this.useColors,wF.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};gFe.O=function(t){return this.inspectOpts.colors=this.useColors,wF.inspect(t,this.inspectOpts)}});var Kee=f((bNt,Jee)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Jee.exports=mFe():Jee.exports=zFe()});var EFe=f((MNt,OFe)=>{var T70=require("dns"),x70=["if-modified-since","if-none-match","if-unmodified-since","if-match","if-range"],W70=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:T70.lookup,...r.dns},r.cache=r.cache||"default",r.cache==="default"&&Object.keys(r.headers||{}).some(n=>x70.includes(n.toLowerCase()))&&(r.cache="no-store"),r.cacheAdditionalHeaders=r.cacheAdditionalHeaders||[],r.cacheManager&&!r.cachePath&&(r.cachePath=r.cacheManager),r};OFe.exports=W70});var e0e=f((mNt,qFe)=>{var yFe=fY(),CFe=zY(),_70=KE(),BFe={shared:!1,ignoreCargoCult:!0},L70={status:200,headers:{}},og=t=>{let e={method:t.method,url:t.url,headers:{},compress:t.compress};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},DFe=t=>{let e={status:t.status,headers:{}};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},Zee=class{constructor({entry:e,request:r,response:s,options:n}){this.entry=e,this.request=og(r),this.response=DFe(s),this.options=n,this.policy=new yFe(this.request,this.response,BFe),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 yFe(og(e),L70,BFe).storable()}satisfies(e){let r=og(e);if(this.request.headers.host!==r.headers.host||this.request.compress!==r.compress)return!1;let s=new CFe(this.request),n=new CFe(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?_70.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=og(e);return r.method="GET",!this.policy.satisfiesWithoutRevalidation(r)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let r=og(e);return this.policy.revalidationHeaders(r)}revalidated(e,r){let s=og(e),n=DFe(r);return!this.policy.revalidatedPolicy(s,n).modified}};qFe.exports=Zee});var RFe=f((gNt,IFe)=>{var t0e=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"}};IFe.exports={NotCachedError:t0e}});var s0e=f((zNt,wFe)=>{"use strict";var Q70=j2(),r0e=class extends Q70{#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)}};wFe.exports=r0e});var NFe=f((ONt,SFe)=>{var{URL:P70,format:k70}=require("url"),U70={auth:!1,fragment:!1,search:!0,unicode:!1},G70=t=>{let e=new P70(t.url);return`make-fetch-happen:request-cache:${k70(e,U70)}`};SFe.exports=G70});var vFe=f((ENt,H70)=>{H70.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 vF=f((yNt,TFe)=>{var{Minipass:X70}=Sr(),NF=fp(),{promiseRetry:V70}=HK(),j70=KE(),{log:FFe}=dv()
Line truncated
|
||||
`).forEach(r=>{r.match(vU0)||r.match(FU0)||(e+=r)}),Buffer.from(e,"base64")}function xU0(t,e="CERTIFICATE"){let s=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`
|
||||
`+i),t.push(n+"m+"+vF.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=S70()+e+" "+t[0]}o(w70,"formatArgs");function S70(){return sr.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(S70,"getDate");function N70(...t){return process.stderr.write(NF.formatWithOptions(sr.inspectOpts,...t)+`
|
||||
`)}o(N70,"log");function v70(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(v70,"save");function F70(){return process.env.DEBUG}o(F70,"load");function T70(t){t.inspectOpts={};let e=Object.keys(sr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=sr.inspectOpts[e[r]]}o(T70,"init");vF.exports=Jee()(sr);var{formatters:zFe}=vF.exports;zFe.o=function(t){return this.inspectOpts.colors=this.useColors,NF.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};zFe.O=function(t){return this.inspectOpts.colors=this.useColors,NF.inspect(t,this.inspectOpts)}});var Zee=h((ZUt,Kee)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Kee.exports=gFe():Kee.exports=OFe()});var yFe=h((eGt,EFe)=>{var x70=require("dns"),W70=["if-modified-since","if-none-match","if-unmodified-since","if-match","if-range"],_70=o(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:x70.lookup,...r.dns},r.cache=r.cache||"default",r.cache==="default"&&Object.keys(r.headers||{}).some(n=>W70.includes(n.toLowerCase()))&&(r.cache="no-store"),r.cacheAdditionalHeaders=r.cacheAdditionalHeaders||[],r.cacheManager&&!r.cachePath&&(r.cachePath=r.cacheManager),r},"configureOptions");EFe.exports=_70});var t0e=h((rGt,IFe)=>{var CFe=hY(),BFe=OY(),L70=ZE(),DFe={shared:!1,ignoreCargoCult:!0},Q70={status:200,headers:{}},ag=o(t=>{let e={method:t.method,url:t.url,headers:{},compress:t.compress};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},"requestObject"),qFe=o(t=>{let e={status:t.status,headers:{}};return t.headers.forEach((r,s)=>{e.headers[s]=r}),e},"responseObject"),e0e=class{static{o(this,"CachePolicy")}constructor({entry:e,request:r,response:s,options:n}){this.entry=e,this.request=ag(r),this.response=qFe(s),this.options=n,this.policy=new CFe(this.request,this.response,DFe),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 CFe(ag(e),Q70,DFe).storable()}satisfies(e){let r=ag(e);if(this.request.headers.host!==r.headers.host||this.request.compress!==r.compress)return!1;let s=new BFe(this.request),n=new BFe(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?L70.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=ag(e);return r.method="GET",!this.policy.satisfiesWithoutRevalidation(r)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let r=ag(e);return this.policy.revalidationHeaders(r)}revalidated(e,r){let s=ag(e),n=qFe(r);return!this.policy.revalidatedPolicy(s,n).modified}};IFe.exports=e0e});var wFe=h((nGt,RFe)=>{var r0e=class extends Error{static{o(this,"NotCachedError")}constructor(e){super(`request to ${e} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};RFe.exports={NotCachedError:r0e}});var n0e=h((oGt,SFe)=>{"use strict";var P70=$2(),s0e=class extends P70{static{o(this,"CachingMinipassPipeline")}#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)}};SFe.exports=s0e});var vFe=h((cGt,NFe)=>{var{URL:k70,format:U70}=require("url"),G70={auth:!1,fragment:!1,search:!0,unicode:!1},H70=o(t=>{let e=new k70(t.url);return`make-fetch-happen:request-cache:${U70(e,G70)}`},"cacheKey");NFe.exports=H70});var FFe=h((pGt,X70)=>{X70.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
Line truncated
|
||||
`).forEach(r=>{r.match(FU0)||r.match(TU0)||(e+=r)}),Buffer.from(e,"base64")}o(xU0,"toDER");function WU0(t,e="CERTIFICATE"){let s=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`
|
||||
`).concat(`
|
||||
`)}});var sT=f(LA=>{"use strict";Object.defineProperty(LA,"__esModule",{value:!0});LA.SHA2_HASH_ALGOS=LA.RSA_SIGNATURE_ALGOS=LA.ECDSA_SIGNATURE_ALGOS=void 0;LA.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"};LA.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"};LA.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 G0e=f(nT=>{"use strict";Object.defineProperty(nT,"__esModule",{value:!0});nT.RFC3161TimestampVerificationError=void 0;var U0e=class extends Error{};nT.RFC3161TimestampVerificationError=U0e});var STe=f(kc=>{"use strict";var WU0=kc&&kc.__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]})),_U0=kc&&kc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),LU0=kc&&kc.__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"&&WU0(r,e,s[n]);return _U0(r,e),r}})();Object.defineProperty(kc,"__esModule",{value:!0});kc.TSTInfo=void 0;var wTe=LU0(fg()),QU0=sT(),PU0=G0e(),H0e=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 QU0.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=wTe.digest(this.messageImprintHashAlgorithm,e);if(!wTe.bufferEqual(r,this.messageImprintHashedMessage))throw new PU0.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};kc.TSTInfo=H0e});var vTe=f(Uc=>{"use strict";var kU0=Uc&&Uc.__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]})),UU0=Uc&&Uc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),GU0=Uc&&Uc.__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"&&kU0(r,e,s[n]);return UU0(r,e),r}})();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.RFC3161Timestamp=void 0;var HU0=eT(),X0e=GU0(fg()),NTe=sT(),IC=G0e(),XU0=STe(),VU0="1.2.840.113549.1.7.2",jU0="1.2.840.113549.1.9.16.1.4",$U0="1.2.840.113549.1.9.4",V0e=class t{root;constructor(e){this.root=e}static parse(e){let r=HU0.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 NTe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return NTe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new XU0.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new IC.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==VU0)throw new IC.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==jU0)throw new IC.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=X0e.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!X0e.bufferEqual(e,r))throw new IC.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(e){let r=this.signedAttrsObj.toD
Line truncated
|
||||
`)}o(WU0,"fromDER")});var iT=h(QA=>{"use strict";Object.defineProperty(QA,"__esModule",{value:!0});QA.SHA2_HASH_ALGOS=QA.RSA_SIGNATURE_ALGOS=QA.ECDSA_SIGNATURE_ALGOS=void 0;QA.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"};QA.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"};QA.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 H0e=h(oT=>{"use strict";Object.defineProperty(oT,"__esModule",{value:!0});oT.RFC3161TimestampVerificationError=void 0;var G0e=class extends Error{static{o(this,"RFC3161TimestampVerificationError")}};oT.RFC3161TimestampVerificationError=G0e});var NTe=h(Uc=>{"use strict";var _U0=Uc&&Uc.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),LU0=Uc&&Uc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),QU0=Uc&&Uc.__importStar||(function(){var t=o(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)},"ownKeys");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"&&_U0(r,e,s[n]);return LU0(r,e),r}})();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.TSTInfo=void 0;var STe=QU0(hg()),PU0=iT(),kU0=H0e(),X0e=class{static{o(this,"TSTInfo")}root;constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return PU0.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=STe.digest(this.messageImprintHashAlgorithm,e);if(!STe.bufferEqual(r,this.messageImprintHashedMessage))throw new kU0.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};Uc.TSTInfo=X0e});var FTe=h(Gc=>{"use strict";var UU0=Gc&&Gc.__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:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),GU0=Gc&&Gc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),HU0=Gc&&Gc.__importStar||(function(){var t=o(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)},"ownKeys");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"&&UU0(r,e,s[n]);return GU0(r,e),r}})();Object.defineProperty(Gc,"__esModule",{value:!0});Gc.RFC3161Timestamp=void 0;var XU0=rT(),V0e=HU0(hg()),vTe=iT(),RC=H0e(),VU0=NTe(),jU0="1.2.840.113549.1.7.2",$U0="1.2.840.113549.1.9.16.1.4",YU0="1.2.840.113549.1.9.4",j0e=class t{static{o(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}static parse(e){let r=XU0.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 vTe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return vTe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new VU0.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new RC.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==jU0)throw new RC.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==$U0)throw new RC.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=V0e.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].su
Line truncated
|
||||
|
||||
`,AH0=/\u2014 (\S+) (\S+)\n/g;function dH0(t,e){let r=t.inclusionProof,s=Ote.fromString(r.checkpoint.envelope),n=bT.fromString(s.note);if(!fH0(s,e))throw new FC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return n}function fH0(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let n=e.find(i=>ixe.crypto.bufferEqual(i.logID.subarray(0,4),s.keyHint)&&i.baseURL.match(s.name));return n?ixe.crypto.verify(r,n.publicKey,s.signature):!1})}var Ote=class t{note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(zte))throw new FC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(zte),s=e.slice(0,r+1),i=e.slice(r+zte.length).matchAll(AH0),o=Array.from(i,a=>{let[,c,u]=a,p=Buffer.from(u,"base64");if(p.length<5)throw new FC.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 FC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,o)}},bT=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 FC.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)}};TC.LogCheckpoint=bT});var axe=f(Bte=>{"use strict";Object.defineProperty(Bte,"__esModule",{value:!0});Bte.verifyMerkleInclusion=MH0;var Cte=Jo(),Ete=kr(),hH0=Buffer.from([0]),bH0=Buffer.from([1]);function MH0(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),n=BigInt(e.logSize);if(s<0n||s>=n)throw new Ete.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${s}`});let{inner:i,border:o}=mH0(s,n);if(r.hashes.length!==i+o)throw new Ete.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=r.hashes.slice(0,i),c=r.hashes.slice(i),u=CH0(t.canonicalizedBody),p=zH0(gH0(u,a,s),c);if(!Cte.crypto.bufferEqual(p,e.logHash))throw new Ete.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function mH0(t,e){let r=OH0(t,e),s=EH0(t>>BigInt(r));return{inner:r,border:s}}function gH0(t,e,r){return e.reduce((s,n,i)=>r>>BigInt(i)&BigInt(1)?yte(n,s):yte(s,n),t)}function zH0(t,e){return e.reduce((r,s)=>yte(s,r),t)}function OH0(t,e){return yH0(t^e-BigInt(1))}function EH0(t){return t.toString(2).split("1").length-1}function yH0(t){return t===0n?0:t.toString(2).length}function yte(t,e){return Cte.crypto.digest("sha256",bH0,t,e)}function CH0(t){return Cte.crypto.digest("sha256",hH0,t)}});var uxe=f(Dte=>{"use strict";Object.defineProperty(Dte,"__esModule",{value:!0});Dte.verifyTLogSET=qH0;var cxe=Jo(),BH0=kr(),DH0=Mg();function qH0(t,e){if(!(0,DH0.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(n=>{let i=IH0(t),o=Buffer.from(cxe.json.canonicalize(i),"utf8"),a=t.inclusionPromise.signedEntryTimestamp;return cxe.crypto.verify(o,n.publicKey,a)}))throw new BH0.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function IH0(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 lxe=f(MT=>{"use strict";Object.defineProperty(MT,"__esModule",{value:!0});MT.verifyTLogBody=vH0;MT.verifyTLogInclusion=FH0;var pxe=VZ(),Rte=kr(),qte=rxe(),Ite=sxe(),RH0=nxe(),wH0=oxe(),SH0=axe(),NH0=uxe();function vH0(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 Rte.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${s}, received: ${n.kind}/${n.apiVersion}`});switch(r){case"dsse":if(s==qte.DSSE_API_VERSION_V1)return(0,qte.verifyDSSETLogBody)(n,e);{let i=pxe.Entry.fromJSON(n);return(0,qte.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,RH0.verifyIntotoTLogBody)(n,e);case"hashedrekord":if(s==Ite.HASHEDREKORD_API_VERSION_V1)return(0,Ite.verifyHashedRekordTLogBody)(n,e);{let i=pxe.Entry.fromJSON(n);return(0,Ite.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new Rte.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}function FH0(t,e){let r=!1;if(TH0(t)&&((0,NH0.verifyTLogSET)(t,e),r=!0),xH0(t)){let s=(0,wH0.verifyCheckpoint)(t,e);(0,SH0.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new Rte.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}function TH0(t){return t.inclusionPromise!==void 0}function xH0(t){return t.inclusionProof!==void 0}});var bxe=f(mT=>{"use strict";Object.defineProperty(mT,"__esModule",{value:!0});mT.Verifier=void 0;var WH0=require("util"),mg=kr(),Axe=JTe(),wte=KTe(),dxe=txe(),fxe=lxe(),Ste=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=[];for(let s of e.timestamps)switch(s.$case){case"timestamp-authority":r.push((0,dxe.getTSATimestamp)(s.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities));break;case"transparency-log":{let n=(0,dxe.getTLogTimestamp)(s.tlogEntry);n&&r.push(n);break}}if(hxe(r))throw new mg.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(r.length<this.options.timestampThreshold)throw new mg.VerificationError({code:"TIMESTAMP_ERROR",message:`expected ${this.options.timestampThreshold} timestamps, got ${r.length}`});return r.map(s=>s.timestamp)}verifySigningKey({key:e},r){switch(e.$case){case"public-key":return(0,Axe.verifyPublicKey)(e.hint,r,this.trustMaterial);case"certificate":{let s=(0,Axe.verifyCertificate)(e.certificate,r,this.trustMaterial);if(h
Line truncated
|
||||
[`+w+"] ";for(_ in arguments[0])i(arguments[0],_)&&(D+=_+": "+arguments[0][_]+", ");D=D.slice(0,-2)}else D=arguments[w];z.push(D)}L(d+`
|
||||
Arguments: `+Array.prototype.slice.call(z).join("")+`
|
||||
`+new Error().stack),m=!1}return b.apply(this,arguments)},b)}var fe={};function Ie(d,b){e.deprecationHandler!=null&&e.deprecationHandler(d,b),fe[d]||(L(b),fe[d]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function K(d){return typeof Function<"u"&&d instanceof Function||Object.prototype.toString.call(d)==="[object Function]"}function Be(d){var b,m;for(m in d)i(d,m)&&(b=d[m],K(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 Y(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 qe(d){d!=null&&this.set(d)}var _e;Object.keys?_e=Object.keys:_e=function(d){var b,m=[];for(b in d)i(d,b)&&m.push(b);return m};var M0={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function p0(d,b,m){var z=this._calendar[d]||this._calendar.sameElse;return K(z)?z.call(b,m):z}function F0(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 gt=/(\[[^\[]*\])|(\\)?([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,P0=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,nr={},Pt={};function ge(d,b,m,z){var D=z;typeof z=="string"&&(D=function(){return this[z]()}),d&&(Pt[d]=D),b&&(Pt[b[0]]=function(){return F0(D.apply(this,arguments),b[1],b[2])}),m&&(Pt[m]=function(){return this.localeData().ordinal(D.apply(this,arguments),d)})}function JA(d){return d.match(/\[[\s\S]/)?d.replace(/^\[|\]$/g,""):d.replace(/\\/g,"")}function co(d){var b=d.match(gt),m,z;for(m=0,z=b.length;m<z;m++)Pt[b[m]]?b[m]=Pt[b[m]]:b[m]=JA(b[m]);return function(D){var w="",_;for(_=0;_<z;_++)w+=K(b[_])?b[_].call(D,d):b[_];return w}}function E0(d,b){return d.isValid()?(b=Ct(b,d.localeData()),nr[b]=nr[b]||co(b),nr[b](d)):d.localeData().invalidDate()}function Ct(d,b){var m=5;function z(D){return b.longDateFormat(D)||D}for(P0.lastIndex=0;m>=0&&P0.test(d);)d=d.replace(P0,z),P0.lastIndex=0,m-=1;return d}var jf={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 $f(d){var b=this._longDateFormat[d],m=this._longDateFormat[d.toUpperCase()];return b||!m?b:(this._longDateFormat[d]=m.match(gt).map(function(z){return z==="MMMM"||z==="MM"||z==="DD"||z==="dddd"?z.slice(1):z}).join(""),this._longDateFormat[d])}var Ug="Invalid date";function tu(){return this._invalidDate}var S="%d",P=/\d{1,2}/;function k(d){return this._ordinal.replace("%d",d)}var $={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 Ne(d,b,m,z){var D=this._relativeTime[m];return K(D)?D(d,b,m,z):D.replace(/%d/i,d)}function n0(d,b){var m=this._relativeTime[d>0?"future":"past"];return K(m)?m(b):m.replace(/%s/i,b)}var et={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"?et[d]||et[d.toLowerCase()]:void 0}function T0(d){var b={},m,z;for(z in d)i(d,z)&&(m=ke(z),m&&(b[m]=d[z]));return b}var F4={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 wx(d){var b=[],m;for(m in d)i(d,m)&&b.push({unit:m,priority:F4[m]});return b.sort(function(z,D){return z.priority-D.priority}),b}var T4=/\d/,Ur=/\d\d/,x4=/\d{3}/,Gg=/\d{4}/,Yf=/[+-]?\d{6}/,k0=/\d\d?/,W4=/\d\d\d\d?/,_4=/\d\d\d\d\d\d?/,Jf=/\d{1,3}/,KA=/\d{1,4}/,Kf=/[+-]?\d{1,6}/,ru=/\d+/,Zf=/[+-]?\d+/,L4=/Z|[+-]\d\d:?\d\d/gi,eh=/Z|[+-]\d\d(?::?\d\d)?/gi,Sx=/[+-]?\d+(\.\d{1,3})?/,ZA=/[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,tl=/^[1-9]\d?/,Hg=/^([1-9]\d|\d)/,th;th={};function ie(d,b,m){th[d]=K(b
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}f4.exports=x0t,f4.exports.__esModule=!0,f4.exports.default=f4.exports});var x7e=f((qLt,h4)=>{var W0t=zke(),_0t=l7e(),L0t=F7e(),Q0t=T7e();function P0t(t,e){return W0t(t)||_0t(t,e)||L0t(t,e)||Q0t()}h4.exports=P0t,h4.exports.__esModule=!0,h4.exports.default=h4.exports});var _7e=f((ILt,W7e)=>{"use strict";var k0t=fx().forEach,U0t=u4(),G0t=U0t("forEach");W7e.exports=G0t?[].forEach:function(e){return k0t(this,e,arguments.length>1?arguments[1]:void 0)}});var Q7e=f(()=>{"use strict";var H0t=Z0(),L7e=_7e();H0t({target:"Array",proto:!0,forced:[].forEach!==L7e},{forEach:L7e})});var k7e=f((SLt,P7e)=>{"use strict";Q7e();var X0t=na();P7e.exports=X0t("Array","forEach")});var G7e=f((NLt,U7e)=>{"use strict";var V0t=k7e();U7e.exports=V0t});var H7e=f(()=>{});var V7e=f((TLt,X7e)=>{"use strict";var j0t=Tg(),$0t=qs(),Y0t=un(),J0t=G7e();H7e();var Ire=Array.prototype,K0t={DOMTokenList:!0,NodeList:!0};X7e.exports=function(t){var e=t.forEach;return t===Ire||Y0t(Ire,t)&&e===Ire.forEach||$0t(K0t,j0t(t))?J0t:e}});var Rre=f((xLt,j7e)=>{j7e.exports=V7e()});var $7e=f(()=>{"use strict";var Z0t=Z0(),ett=JT().includes,ttt=Lt(),rtt=u1e(),stt=ttt(function(){return!Array(1).includes()});Z0t({target:"Array",proto:!0,forced:stt},{includes:function(e){return ett(this,e,arguments.length>1?arguments[1]:void 0)}});rtt("includes")});var J7e=f((LLt,Y7e)=>{"use strict";$7e();var ntt=na();Y7e.exports=ntt("Array","includes")});var Z7e=f((QLt,K7e)=>{"use strict";var itt=ni(),ott=Vp(),att=a1(),ctt=att("match");K7e.exports=function(t){var e;return itt(t)&&((e=t[ctt])!==void 0?!!e:ott(t)==="RegExp")}});var t9e=f((PLt,e9e)=>{"use strict";var utt=Z7e(),ptt=TypeError;e9e.exports=function(t){if(utt(t))throw new ptt("The method doesn't accept regular expressions");return t}});var s9e=f((kLt,r9e)=>{"use strict";var ltt=a1(),Att=ltt("match");r9e.exports=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[Att]=!1,"/./"[t](e)}catch{}}return!1}});var i9e=f(()=>{"use strict";var dtt=Z0(),ftt=yt(),htt=t9e(),btt=Ff(),n9e=Zc(),Mtt=s9e(),mtt=ftt("".indexOf);dtt({target:"String",proto:!0,forced:!Mtt("includes")},{includes:function(e){return!!~mtt(n9e(btt(this)),n9e(htt(e)),arguments.length>1?arguments[1]:void 0)}})});var a9e=f((HLt,o9e)=>{"use strict";i9e();var gtt=na();o9e.exports=gtt("String","includes")});var p9e=f((XLt,u9e)=>{"use strict";var c9e=un(),ztt=J7e(),Ott=a9e(),wre=Array.prototype,Sre=String.prototype;u9e.exports=function(t){var e=t.includes;return t===wre||c9e(wre,t)&&e===wre.includes?ztt:typeof t=="string"||t===Sre||c9e(Sre,t)&&e===Sre.includes?Ott:e}});var A9e=f((VLt,l9e)=>{"use strict";var Ett=p9e();l9e.exports=Ett});var b4=f((jLt,d9e)=>{d9e.exports=A9e()});var Nre=f(($Lt,f9e)=>{"use strict";f9e.exports=`
|
||||
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var M9e=f((YLt,b9e)=>{"use strict";var ytt=yt(),Ctt=Ff(),Btt=Zc(),Fre=Nre(),h9e=ytt("".replace),Dtt=RegExp("^["+Fre+"]+"),qtt=RegExp("(^|[^"+Fre+"])["+Fre+"]+$"),vre=function(t){return function(e){var r=Btt(Ctt(e));return t&1&&(r=h9e(r,Dtt,"")),t&2&&(r=h9e(r,qtt,"$1")),r}};b9e.exports={start:vre(1),end:vre(2),trim:vre(3)}});var C9e=f((JLt,y9e)=>{"use strict";var O9e=B1(),Itt=Lt(),Rtt=yt(),wtt=Zc(),Stt=M9e().trim,m9e=Nre(),M4=O9e.parseInt,g9e=O9e.Symbol,z9e=g9e&&g9e.iterator,E9e=/^[+-]?0x/i,Ntt=Rtt(E9e.exec),vtt=M4(m9e+"08")!==8||M4(m9e+"0x16")!==22||z9e&&!Itt(function(){M4(Object(z9e))});y9e.exports=vtt?function(e,r){var s=Stt(wtt(e));return M4(s,r>>>0||(Ntt(E9e,s)?16:10))}:M4});var D9e=f(()=>{"use strict";var Ftt=Z0(),B9e=C9e();Ftt({global:!0,forced:parseInt!==B9e},{parseInt:B9e})});var I9e=f((e8t,q9e)=>{"use strict";D9e();var Ttt=ea();q9e.exports=Ttt.parseInt});var w9e=f((t8t,R9e)=>{"use strict";var xtt=I9e();R9e.exports=xtt});var N9e=f((r8t,S9e)=>{S9e.exports=w9e()});var yx=f((s8t,v9e)=>{v9e.exports=qre()});var x9e=f((n8t,T9e)=>{"use strict";var F9e=GC(),Wtt=TypeError;T9e.exports=function(t,e){if(!delete t[e])throw new Wtt("Cannot delete property "+F9e(e)+" of "+F9e(t))}});var L9e=f((i8t,_9e)=>{"use strict";var W9e=r4(),_tt=Math.floor,Tre=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=_tt(r/2),a=Tre(W9e(t,0,o),e),c=Tre(W9e(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};_9e.exports=Tre});var k9e=f((o8t,P9e)=>{"use strict";var Ltt=qg(),Q9e=Ltt.match(/firefox\/(\d+)/i);P9e.exports=!!Q9e&&+Q9e[1]});var G9e=f((a8t,U9e)=>{"use strict";var Qtt=qg();U9e.exports=/MSIE|Trident/.test(Qtt)});var V9e=f((c8t,X9e)=>{"use strict";var Ptt=qg(),H9e=Ptt.match(/AppleWebKit\/(\d+)\./);X9e.exports=!!H9e&&+H9e[1]});var rUe=f(()=>{"use strict";var ktt=Z0(),eUe=yt(),Utt=xf(),Gtt=Jc(),j9e=Yp(),Htt=x9e(),$9e=Zc(),xre=Lt(),Xtt=L9e(),Vtt=u4(),Y9e=k9e(),jtt=G9e(),J9e=Ig(),K9e=V9e(),VA=[],Z9e=eUe(VA.sort),$tt=eUe(VA.push),Ytt=xre(function(){VA.sort(void 0)}),Jtt=xre(function(){VA.sort(null)}),Ktt=Vtt("sort"),tUe=!xre(function(){if(J9e)return J9e<70;if(!(Y9e&&Y9e>3)){if(jtt)return!0;if(K9e)return K9e<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++)VA.push({k:r+n,v:s})}for(VA.sort(function(i,o){return o.v-i.v}),n=0;n<VA.length;n++)r=VA[n].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),Ztt=Ytt||!Jtt||!Ktt||!tUe,e1t=function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:$9e(e)>$9e(r)?1:-1}};ktt({target:"Array",proto:!0,forced:Ztt},{sort:function(e){e!==void 0&&Utt(e);var r=Gtt(this);if(tUe)return e===void 0?Z9e(r):Z9e(r,e);var s=[],n=j9e(r),i,o;for(o=0;o<n;o++)o in r&&$tt(s,r[o]);for(Xtt(s,e1t(e)),i=j9e(s),o=0;o<i;)r[o]=s[o++];for(;o<n;)Htt(r,o++);return r}})});var nUe=f((l8t,sUe)=>{"use strict";rUe();var t1t=na();sUe.exports=t1t("Array","sort")});var oUe=f((A8t,iUe)=>{"use strict";var r1t=un(),s1t=nUe(),Wre=Array.prototype;iUe.exports=function(t){var e=t.sort;return t===Wre||r1t(Wre,t)&&e===Wre.sort?s1t:e}});var cUe=f((d8t,aUe)=>{"use strict";var n1t=oUe();aUe.exports=n1t});var pUe=f((f8t,uUe)=>{uUe.exports=cUe()});var lUe=f(()=>{});var fUe=f((M8t,dUe)=>{"use strict";var i1t=B1(),o1t=Lt(),AUe=i1t.RegExp,a1t=!o1t(function(){var t=!0;try{AUe(".","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(AUe.prototype,"flags").get.call(e);return a!==s||r!==s});dUe.exports={correct:a1t}});var bUe=f((m8t,hUe)=>{"use strict";var c1t=$p();hUe.exports=function(){var t=c1t(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 gUe=f((g8t,mUe)=>{"use strict";var u1t=io(),p1t=qs(),l1t=un(),MUe=fUe(),A1t=bUe(),d1t=RegExp.prototype;mUe.exports=MUe.correct?function(t){return t.flags}:function(t){return!MUe.correct&&l1t(d1t,t)&&!p1t(t,"flags")?u1t(A1t,t):t.flags}});var OUe=f((z8t,zUe)=>{"use strict";lUe();var f1t=gUe();zUe.exports=f1t});var CUe=f((O8t,yUe)=>{"use strict";var h1t=un(),b1t=OUe(),EUe=RegExp.prototype;yUe.exports=function(t){return t===EUe||h1t(EUe,t)?b1t(t):t.flags}});var DUe=f((E8t,BUe)=>{"use strict";var M1t=CUe();BUe.exports=M1t});var IUe=f((y8t,qUe)=>{qUe.exports=DUe()});var VUe=f((E4,XUe)=>{"use strict";var Is=$c(),m1t=Kc();m1t(E4,"__esModule",{value:!0});E4.default=void 0;var g1t=Is(T1e()),z1t=Is(W1e()),O1t=Is(L1e()
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,g1t.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 q1t(t,e){var r;if(t){if(typeof t=="string")return RUe(t,e);var s=(0,ao.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,y1t.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return RUe(t,e)}}function RUe(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 at="xregexp",Hf={astral:!1,namespacing:!1},Qt={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},eu={},m4={},Lg={},_re=[],Qg="default",wUe="class",I1t={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]/},R1t=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,w1t=Qt.exec.call(/()??/,"")[1]===void 0,S1t=(0,Gf.default)(/x/)!==void 0,N1t={},TUe=N1t.toString;function Qre(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 xUe=Qre("u"),Pre=Qre("y"),WUe={g:!0,i:!0,m:!0,u:xUe,y:Pre};function _Ue(t,e,r,s,n){var i;if(t[at]={captureNames:e},n)return t;if(t.__proto__)t.__proto__=oe.prototype;else for(var o in oe.prototype)t[o]=oe.prototype[o];return t[at].source=r,t[at].flags=s&&(0,D1t.default)(i=s.split("")).call(i).join(""),t}function g4(t){return Qt.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}function Vf(t,e){var r;if(!oe.isRegExp(t))throw new TypeError("Type RegExp expected");var s=t[at]||{},n=v1t(t),i="",o="",a=null,c=null;return e=e||{},e.removeG&&(o+="g"),e.removeY&&(o+="y"),o&&(n=Qt.replace.call(n,new RegExp("[".concat(o,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(n=g4(n+i)),e.isInternalOnly||(s.source!==void 0&&(a=s.source),(0,Gf.default)(s)!=null&&(c=i?g4((0,Gf.default)(s)+i):(0,Gf.default)(s))),t=_Ue(new RegExp(e.source||t.source,n),F1t(t)?(0,ao.default)(r=s.captureNames).call(r,0):null,a,c,e.isInternalOnly),t}function LUe(t){return(0,FUe.default)(t,16)}function QUe(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||Qt.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||T1t(t.input,t.index+t[0].length,r)?"":"(?:)"}function v1t(t){return S1t?(0,Gf.default)(t):Qt.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}function F1t(t){return!!(t[at]&&t[at].captureNames)}function PUe(t){return(0,FUe.default)(t,10).toString(16)}function T1t(t,e,r){var s="\\(\\?#[^)]*\\)",n="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return Qt.test.call((0,Xf.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,ao.default)(t).call(t,e))}function kre(t,e){return TUe.call(t)==="[object ".concat(e,"]")}function kUe(t){for(;t.length<4;)t="0".concat(t);return t}function x1t(t,e){if(g4(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=Qt.replace.call(t,/^\(\?([\w$]+)\)/,function(i,o){if(Qt.test.call(/[gy]/,o))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=g4(e+o),""});var r=z4(e),s;try{for(r.s();!(s=r.n()).done;){var n=s.value;if(!WUe[n])throw new SyntaxError("Unknown regex flag ".concat(n))}}catch(i){r.e(i)}finally{r.f()}return{pattern:t,flags:e}}function UUe(t){var e={};return kre(t,"String")?((0,Lre.default)(oe).call(oe,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}function SUe(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be a single character A-Za-z0-9_$");WUe[t]=!0}function W1t(t,e,r,s,n){for(var i=_re.length,o=t[r],a=null,c,u;i--;)if(u=_re[i],!(u.leadChar&&u.leadChar!==o||u.scope!==s&&u.scope!=="all"||u.flag&&!(0,Xf.default)(e).call(e,u.flag))&&(c=oe.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 GUe(t){Hf.astral=t}function HUe(t){Hf.namespacing=t}function O4(t){if(t==null)throw new TypeError("Cannot convert null or undefined to object");return t}function oe(t,e){if(oe.isRegExp(t)){if(e!==void 0)throw new TypeError("Cannot supply flags when copying a RegExp");return Vf(t)}if(t=t===void 0?"":String(t),e=e===void 0?"":String(e),oe.isInstalled("astral")&&!(0,Xf.default)(e).call(e,"A")&&(e+="A"),Lg[t]||(Lg[t]={}),!Lg[t][e]){for(var r={hasNamedCapture:!1,captureNames:[]},s=Qg,n="",i=0,o,a=x1t(t,e),c=a.pattern,u=(0,Gf.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,mrt.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 qrt(t,e){var r;if(t){if(typeof t=="string")return RGe(t,e);var s=(0,yrt.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,Ert.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return RGe(t,e)}}function RGe(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 Irt=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,Brt.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,Xre.default)(y="[".concat(M.bmp,"]")).call(y,M.astral?"|":"")}if(M.astral&&(g+=M.astral),M.isBmpLast&&M.bmp){var O;g+=(0,Xre.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,Crt.default)(M).call(M,"A"),x=o(A[4]||A[3]),L=r[x];if(A[1]==="P"&&A[2])throw new SyntaxError(g+A[0]);if(!r.hasOwnProperty(x))throw new SyntaxError(y+A[0]);if(L.inverseOf){if(x=o(L.inverseOf),!r.hasOwnProperty(x)){var j;throw new ReferenceError((0,Xre.default)(j="".concat(O+A[0]," -> ")).call(j,L.inverseOf))}L=r[x],R=!R}if(!(L.bmp||N))throw new SyntaxError(B+A[0]);if(N){if(h==="class")throw new SyntaxError(I);return l(x,R)}return h==="class"?R?u(x):L.bmp:"".concat((R?"[^":"[")+L.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(A){var h="Unicode token requires name",M="Unicode token has no character data ",g=Drt(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]}};D4.default=Irt;wGe.exports=D4.default});var vGe=f((L8t,NGe)=>{NGe.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 K8(t,e){if(process.env.GITHUB_OUTPUT||"")return ez("OUTPUT",oB(t,e));process.stdout.write(J8.EOL),aa("set-output",{name:t},oa(e))}function _Ae(t){process.exitCode=Y8.Failure,lb(t)}function Cu(){return process.env.RUNNER_DEBUG==="1"}function F(t){aa("debug",{},t)}function lb(t,e={}){aa("error",uW(e),t instanceof Error?t.toString():t)}function g0(t,e={}){aa("warning",uW(e),t instanceof Error?t.toString():t)}function W(t){process.stdout.write(t+J8.EOL)}function Nd(t){lW("group",t)}function vd(){lW("endgroup")}function cr(t,e){return po0(this,void 0,void 0,function*(){Nd(t);let r;try{r=yield e()}finally{vd()}return r})}function aq(t,e){if(process.env.GITHUB_STATE||"")return ez("STATE",oB(t,e));aa("save-state",{name:t},oa(e))}function LAe(t){return process.env[`STATE_${t}`]||""}var pw=T(require("fs"),1),pX=T(require("os"),1),lX=T(require("path"),1);var PAe=T(require("os"),1);function cO(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}function kAe(t,e,r){let s=new Z8(t,e,r);process.stdout.write(s.toString()+PAe.EOL)}var QAe="::",Z8=class{constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){let e=QAe+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let s in this.properties)if(this.properties.hasOwnProperty(s)){let n=this.properties[s];n&&(r?r=!1:e+=",",e+=`${s}=${Ao0(n)}`)}}return e+=`${QAe}${lo0(this.message)}`,e}};function lo0(t){return cO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function Ao0(t){return cO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}var XAe=T(require("os"),1);var GAe=require("os"),uO=require("fs"),eQ=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())})},{access:do0,appendFile:fo0,writeFile:ho0}=uO.promises,UAe="GITHUB_STEP_SUMMARY";var tQ=class{constructor(){this._buffer=""}filePath(){return eQ(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[UAe];if(!e)throw new Error(`Unable to find environment variable for $${UAe}. Check if your runtime environment supports job summaries.`);try{yield do0(e,uO.constants.R_OK|uO.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,s={}){let n=Object.entries(s).map(([i,o])=>` ${i}="${o}"`).join("");return r?`<${e}${n}>${r}</${e}>`:`<${e}${n}>`}write(e){return eQ(this,void 0,void 0,function*(){let r=!!e?.overwrite,s=yield this.filePath();return yield(r?ho0:fo0)(s,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return eQ(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(GAe.EOL)}addCodeBlock(e,r){let s=Object.assign({},r&&{lang:r}),n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,r=!1){let s=r?"ol":"ul",n=e.map(o=>this.wrap("li",o)).join(""),i=this.wrap(s,n);return this.addRaw(i).addEOL()}addTable(e){let r=e.map(n=>{let i=n.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:a,data:c,colspan:u,rowspan:p}=o,l=a?"th":"td",A=Object.assign(Object.assign({},u&&{colspan:u}),p&&{rowspan:p});return this.wrap(l,c,A)}).join("");return this.wrap("tr",i)}).join(""),s=this.wrap("table",r);return this.addRaw(s).addEOL()}addDetails(e,r){let s=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(s).addEOL()}addImage(e,r,s){let{width:n,height:i}=s||{},o=Object.assign(Object.assign({},n&&{width:n}),i&&{height:i}),a=this.wrap("img",null,Object.assign({src:e,alt:r},o));return this.addRaw(a).addEOL()}addHeading(e,r){let s=`h${r}`,n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1",i=this.wrap(n,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 s=Object.assign({},r&&{cite:r}),n=this.wrap("blockquote",e,s);return this.addRaw(n).addEOL()}addLink(e,r){let s=this.wrap("a",e,{href:r});return this.addRaw(s).addEOL()}},wot=new tQ;var rQ=T(require("os"),1);var vot=rQ.default.platform(),Fot=rQ.default.arch();var HAe;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(HAe||(HAe={}));function sQ(){return process.env.RUNNER_DEBUG==="1"}function j0(t){kAe("debug",{},t)}function nQ(t){process.stdout.write(t+XAe.EOL)}var DQ=T(require("cryLine truncated
|
||||
`,dH0=/\u2014 (\S+) (\S+)\n/g;function fH0(t,e){let r=t.inclusionProof,s=Ete.fromString(r.checkpoint.envelope),n=mT.fromString(s.note);if(!hH0(s,e))throw new TC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return n}o(fH0,"verifyCheckpoint");function hH0(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let n=e.find(i=>oxe.crypto.bufferEqual(i.logID.subarray(0,4),s.keyHint)&&i.baseURL.match(s.name));return n?oxe.crypto.verify(r,n.publicKey,s.signature):!1})}o(hH0,"verifySignedNote");var Ete=class t{static{o(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(Ote))throw new TC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(Ote),s=e.slice(0,r+1),i=e.slice(r+Ote.length).matchAll(dH0),a=Array.from(i,c=>{let[,u,p]=c,l=Buffer.from(p,"base64");if(l.length<5)throw new TC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:u,keyHint:l.subarray(0,4),signature:l.subarray(4)}});if(a.length===0)throw new TC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,a)}},mT=class t{static{o(this,"LogCheckpoint")}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 TC.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"),a=r.slice(3);return new t(s,n,i,a)}};xC.LogCheckpoint=mT});var cxe=h(Dte=>{"use strict";Object.defineProperty(Dte,"__esModule",{value:!0});Dte.verifyMerkleInclusion=mH0;var Bte=Ko(),yte=Ur(),bH0=Buffer.from([0]),MH0=Buffer.from([1]);function mH0(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),n=BigInt(e.logSize);if(s<0n||s>=n)throw new yte.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${s}`});let{inner:i,border:a}=gH0(s,n);if(r.hashes.length!==i+a)throw new yte.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,i),u=r.hashes.slice(i),p=BH0(t.canonicalizedBody),l=OH0(zH0(p,c,s),u);if(!Bte.crypto.bufferEqual(l,e.logHash))throw new yte.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(mH0,"verifyMerkleInclusion");function gH0(t,e){let r=EH0(t,e),s=yH0(t>>BigInt(r));return{inner:r,border:s}}o(gH0,"decompInclProof");function zH0(t,e,r){return e.reduce((s,n,i)=>r>>BigInt(i)&BigInt(1)?Cte(n,s):Cte(s,n),t)}o(zH0,"chainInner");function OH0(t,e){return e.reduce((r,s)=>Cte(s,r),t)}o(OH0,"chainBorderRight");function EH0(t,e){return CH0(t^e-BigInt(1))}o(EH0,"innerProofSize");function yH0(t){return t.toString(2).split("1").length-1}o(yH0,"onesCount");function CH0(t){return t===0n?0:t.toString(2).length}o(CH0,"bitLength");function Cte(t,e){return Bte.crypto.digest("sha256",MH0,t,e)}o(Cte,"hashChildren");function BH0(t){return Bte.crypto.digest("sha256",bH0,t)}o(BH0,"hashLeaf")});var pxe=h(qte=>{"use strict";Object.defineProperty(qte,"__esModule",{value:!0});qte.verifyTLogSET=IH0;var uxe=Ko(),DH0=Ur(),qH0=mg();function IH0(t,e){if(!(0,qH0.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(n=>{let i=RH0(t),a=Buffer.from(uxe.json.canonicalize(i),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return uxe.crypto.verify(a,n.publicKey,c)}))throw new DH0.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o(IH0,"verifyTLogSET");function RH0(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")}}o(RH0,"toVerificationPayload")});var Axe=h(gT=>{"use strict";Object.defineProperty(gT,"__esModule",{value:!0});gT.verifyTLogBody=FH0;gT.verifyTLogInclusion=TH0;var lxe=jZ(),wte=Ur(),Ite=sxe(),Rte=nxe(),wH0=ixe(),SH0=axe(),NH0=cxe(),vH0=pxe();function FH0(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 wte.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${s}, received: ${n.kind}/${n.apiVersion}`});switch(r){case"dsse":if(s==Ite.DSSE_API_VERSION_V1)return(0,Ite.verifyDSSETLogBody)(n,e);{let i=lxe.Entry.fromJSON(n);return(0,Ite.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,wH0.verifyIntotoTLogBody)(n,e);case"hashedrekord":if(s==Rte.HASHEDREKORD_API_VERSION_V1)return(0,Rte.verifyHashedRekordTLogBody)(n,e);{let i=lxe.Entry.fromJSON(n);return(0,Rte.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new wte.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}o(FH0,"verifyTLogBody");function TH0(t,e){let r=!1;if(xH0(t)&&((0,vH0.verifyTLogSET)(t,e),r=!0),WH0(t)){let s=(0,SH0.verifyCheckpoint)(t,e);(0,NH0.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new wte.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}o(TH0,"verifyTLogInclusion");function xH0(t){return t.inclusionPromise!==void 0}o(xH0,"isTLogEntryWithInclusionPromise");function WH0(t){return t.inclusionProof!==void 0}o(WH0,"isTLogEntryWithInclusionProof")});var Mxe=h(zT=>{"use strict";Object.defineProperty(zT,"__esModule",{value:!0});zT.Verifier=void 0;var _H0=require("util"),gg=Ur(),dxe=KTe(),Ste=ZTe(),fxe=rxe(),hxe=Axe(),Nte=class{static{o(this,"Verifier")}trustMaterial;options;constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,timestampThreshold:r.timestampThreshold??r.tsaThreshold??1,tsaThreshold:0}}verify(e,r){let 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=[];for(let s of e.timestamps)switch(s.$case){case"timestamp-authority":r.push((0,fxe.getTSATimestamp)(s.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities));break;case"transparency-log":{let n=(0,fxe.getTLogTimestamp)(s.tlogEntry);n&&r.push(n);break}}if(bxe(r))throw new gg.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(r.leng
Line truncated
|
||||
[`+S+"] ";for(L in arguments[0])i(arguments[0],L)&&(q+=L+": "+arguments[0][L]+", ");q=q.slice(0,-2)}else q=arguments[S];O.push(q)}Q(f+`
|
||||
Arguments: `+Array.prototype.slice.call(O).join("")+`
|
||||
`+new Error().stack),g=!1}return M.apply(this,arguments)},M)}o($,"deprecate");var he={};function Re(f,M){e.deprecationHandler!=null&&e.deprecationHandler(f,M),he[f]||(Q(M),he[f]=!0)}o(Re,"deprecateSimple"),e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function Z(f){return typeof Function<"u"&&f instanceof Function||Object.prototype.toString.call(f)==="[object Function]"}o(Z,"isFunction");function De(f){var M,g;for(g in f)i(f,g)&&(M=f[g],Z(M)?this[g]=M:this["_"+g]=M);this._config=f,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}o(De,"set");function J(f,M){var g=A({},f),O;for(O in M)i(M,O)&&(n(f[O])&&n(M[O])?(g[O]={},A(g[O],f[O]),A(g[O],M[O])):M[O]!=null?g[O]=M[O]:delete g[O]);for(O in f)i(f,O)&&!i(M,O)&&n(f[O])&&(g[O]=A({},g[O]));return g}o(J,"mergeConfigs");function Ie(f){f!=null&&this.set(f)}o(Ie,"Locale");var Le;Object.keys?Le=Object.keys:Le=o(function(f){var M,g=[];for(M in f)i(f,M)&&g.push(M);return g},"keys");var m0={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function l0(f,M,g){var O=this._calendar[f]||this._calendar.sameElse;return Z(O)?O.call(M,g):O}o(l0,"calendar");function T0(f,M,g){var O=""+Math.abs(f),q=M-O.length,S=f>=0;return(S?g?"+":"":"-")+Math.pow(10,Math.max(0,q)).toString().substr(1)+O}o(T0,"zeroFill");var zt=/(\[[^\[]*\])|(\\)?([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,k0=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ir={},kt={};function ze(f,M,g,O){var q=O;typeof O=="string"&&(q=o(function(){return this[O]()},"func")),f&&(kt[f]=q),M&&(kt[M[0]]=function(){return T0(q.apply(this,arguments),M[1],M[2])}),g&&(kt[g]=function(){return this.localeData().ordinal(q.apply(this,arguments),f)})}o(ze,"addFormatToken");function KA(f){return f.match(/\[[\s\S]/)?f.replace(/^\[|\]$/g,""):f.replace(/\\/g,"")}o(KA,"removeFormattingTokens");function uo(f){var M=f.match(zt),g,O;for(g=0,O=M.length;g<O;g++)kt[M[g]]?M[g]=kt[M[g]]:M[g]=KA(M[g]);return function(q){var S="",L;for(L=0;L<O;L++)S+=Z(M[L])?M[L].call(q,f):M[L];return S}}o(uo,"makeFormatFunction");function y0(f,M){return f.isValid()?(M=Bt(M,f.localeData()),ir[M]=ir[M]||uo(M),ir[M](f)):f.localeData().invalidDate()}o(y0,"formatMoment");function Bt(f,M){var g=5;function O(q){return M.longDateFormat(q)||q}for(o(O,"replaceLongDateFormatTokens"),k0.lastIndex=0;g>=0&&k0.test(f);)f=f.replace(k0,O),k0.lastIndex=0,g-=1;return f}o(Bt,"expandFormat");var $f={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 Yf(f){var M=this._longDateFormat[f],g=this._longDateFormat[f.toUpperCase()];return M||!g?M:(this._longDateFormat[f]=g.match(zt).map(function(O){return O==="MMMM"||O==="MM"||O==="DD"||O==="dddd"?O.slice(1):O}).join(""),this._longDateFormat[f])}o(Yf,"longDateFormat");var Gg="Invalid date";function ru(){return this._invalidDate}o(ru,"invalidDate");var N="%d",k=/\d{1,2}/;function U(f){return this._ordinal.replace("%d",f)}o(U,"ordinal");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 ve(f,M,g,O){var q=this._relativeTime[g];return Z(q)?q(f,M,g,O):q.replace(/%d/i,f)}o(ve,"relativeTime");function i0(f,M){var g=this._relativeTime[f>0?"future":"past"];return Z(g)?g(M):g.replace(/%s/i,M)}o(i0,"pastFuture");var tt={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 Ue(f){return typeof f=="string"?tt[f]||tt[f.toLowerCase()]:void 0}o(Ue,"normalizeUnits");function x0(f){var M={},g,O;for(O in f)i(f,O)&&(g=Ue(O),g&&(M[g]=f[O]));return M}o(x0,"normalizeObjectUnits");var T4={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 Nx(f){var M=[],g;for(g in f)i(f,g)&&M.push({unit:g,priority:T4[g]});return M.sort(function(O,q){return O.priority-q.priority}),M}o(Nx,"get
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}o(W0t,"_nonIterableRest");h4.exports=W0t,h4.exports.__esModule=!0,h4.exports.default=h4.exports});var W7e=h((Fe1,b4)=>{var _0t=Oke(),L0t=A7e(),Q0t=T7e(),P0t=x7e();function k0t(t,e){return _0t(t)||L0t(t,e)||Q0t(t,e)||P0t()}o(k0t,"_slicedToArray");b4.exports=k0t,b4.exports.__esModule=!0,b4.exports.default=b4.exports});var L7e=h((xe1,_7e)=>{"use strict";var U0t=bx().forEach,G0t=p4(),H0t=G0t("forEach");_7e.exports=H0t?[].forEach:o(function(e){return U0t(this,e,arguments.length>1?arguments[1]:void 0)},"forEach")});var P7e=h(()=>{"use strict";var X0t=et(),Q7e=L7e();X0t({target:"Array",proto:!0,forced:[].forEach!==Q7e},{forEach:Q7e})});var U7e=h((Qe1,k7e)=>{"use strict";P7e();var V0t=ia();k7e.exports=V0t("Array","forEach")});var H7e=h((Pe1,G7e)=>{"use strict";var j0t=U7e();G7e.exports=j0t});var X7e=h(()=>{});var j7e=h((Ge1,V7e)=>{"use strict";var $0t=xg(),Y0t=Is(),J0t=pn(),K0t=H7e();X7e();var Rre=Array.prototype,Z0t={DOMTokenList:!0,NodeList:!0};V7e.exports=function(t){var e=t.forEach;return t===Rre||J0t(Rre,t)&&e===Rre.forEach||Y0t(Z0t,$0t(t))?K0t:e}});var wre=h((He1,$7e)=>{$7e.exports=j7e()});var Y7e=h(()=>{"use strict";var ett=et(),ttt=ZT().includes,rtt=Qt(),stt=p1e(),ntt=rtt(function(){return!Array(1).includes()});ett({target:"Array",proto:!0,forced:ntt},{includes:o(function(e){return ttt(this,e,arguments.length>1?arguments[1]:void 0)},"includes")});stt("includes")});var K7e=h(($e1,J7e)=>{"use strict";Y7e();var itt=ia();J7e.exports=itt("Array","includes")});var e9e=h((Ye1,Z7e)=>{"use strict";var ott=ii(),att=jp(),ctt=c1(),utt=ctt("match");Z7e.exports=function(t){var e;return ott(t)&&((e=t[utt])!==void 0?!!e:att(t)==="RegExp")}});var r9e=h((Je1,t9e)=>{"use strict";var ptt=e9e(),ltt=TypeError;t9e.exports=function(t){if(ptt(t))throw new ltt("The method doesn't accept regular expressions");return t}});var n9e=h((Ke1,s9e)=>{"use strict";var Att=c1(),dtt=Att("match");s9e.exports=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[dtt]=!1,"/./"[t](e)}catch{}}return!1}});var o9e=h(()=>{"use strict";var ftt=et(),htt=Ct(),btt=r9e(),Mtt=Tf(),i9e=eu(),mtt=n9e(),gtt=htt("".indexOf);ftt({target:"String",proto:!0,forced:!mtt("includes")},{includes:o(function(e){return!!~gtt(i9e(Mtt(this)),i9e(btt(e)),arguments.length>1?arguments[1]:void 0)},"includes")})});var c9e=h((r01,a9e)=>{"use strict";o9e();var ztt=ia();a9e.exports=ztt("String","includes")});var l9e=h((s01,p9e)=>{"use strict";var u9e=pn(),Ott=K7e(),Ett=c9e(),Sre=Array.prototype,Nre=String.prototype;p9e.exports=function(t){var e=t.includes;return t===Sre||u9e(Sre,t)&&e===Sre.includes?Ott:typeof t=="string"||t===Nre||u9e(Nre,t)&&e===Nre.includes?Ett:e}});var d9e=h((n01,A9e)=>{"use strict";var ytt=l9e();A9e.exports=ytt});var M4=h((i01,f9e)=>{f9e.exports=d9e()});var vre=h((o01,h9e)=>{"use strict";h9e.exports=`
|
||||
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var m9e=h((a01,M9e)=>{"use strict";var Ctt=Ct(),Btt=Tf(),Dtt=eu(),Tre=vre(),b9e=Ctt("".replace),qtt=RegExp("^["+Tre+"]+"),Itt=RegExp("(^|[^"+Tre+"])["+Tre+"]+$"),Fre=o(function(t){return function(e){var r=Dtt(Btt(e));return t&1&&(r=b9e(r,qtt,"")),t&2&&(r=b9e(r,Itt,"$1")),r}},"createMethod");M9e.exports={start:Fre(1),end:Fre(2),trim:Fre(3)}});var B9e=h((u01,C9e)=>{"use strict";var E9e=D1(),Rtt=Qt(),wtt=Ct(),Stt=eu(),Ntt=m9e().trim,g9e=vre(),m4=E9e.parseInt,z9e=E9e.Symbol,O9e=z9e&&z9e.iterator,y9e=/^[+-]?0x/i,vtt=wtt(y9e.exec),Ftt=m4(g9e+"08")!==8||m4(g9e+"0x16")!==22||O9e&&!Rtt(function(){m4(Object(O9e))});C9e.exports=Ftt?o(function(e,r){var s=Ntt(Stt(e));return m4(s,r>>>0||(vtt(y9e,s)?16:10))},"parseInt"):m4});var q9e=h(()=>{"use strict";var Ttt=et(),D9e=B9e();Ttt({global:!0,forced:parseInt!==D9e},{parseInt:D9e})});var R9e=h((d01,I9e)=>{"use strict";q9e();var xtt=ta();I9e.exports=xtt.parseInt});var S9e=h((f01,w9e)=>{"use strict";var Wtt=R9e();w9e.exports=Wtt});var v9e=h((h01,N9e)=>{N9e.exports=S9e()});var Bx=h((b01,F9e)=>{F9e.exports=Ire()});var W9e=h((M01,x9e)=>{"use strict";var T9e=HC(),_tt=TypeError;x9e.exports=function(t,e){if(!delete t[e])throw new _tt("Cannot delete property "+T9e(e)+" of "+T9e(t))}});var Q9e=h((m01,L9e)=>{"use strict";var _9e=s4(),Ltt=Math.floor,xre=o(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 a=Ltt(r/2),c=xre(_9e(t,0,a),e),u=xre(_9e(t,a),e),p=c.length,l=u.length,A=0,d=0;A<p||d<l;)t[A+d]=A<p&&d<l?e(c[A],u[d])<=0?c[A++]:u[d++]:A<p?c[A++]:u[d++];return t},"sort");L9e.exports=xre});var U9e=h((z01,k9e)=>{"use strict";var Qtt=Ig(),P9e=Qtt.match(/firefox\/(\d+)/i);k9e.exports=!!P9e&&+P9e[1]});var H9e=h((O01,G9e)=>{"use strict";var Ptt=Ig();G9e.exports=/MSIE|Trident/.test(Ptt)});var j9e=h((E01,V9e)=>{"use strict";var ktt=Ig(),X9e=ktt.match(/AppleWebKit\/(\d+)\./);V9e.exports=!!X9e&&+X9e[1]});var sUe=h(()=>{"use strict";var Utt=et(),tUe=Ct(),Gtt=Wf(),Htt=Kc(),$9e=Jp(),Xtt=W9e(),Y9e=eu(),Wre=Qt(),Vtt=Q9e(),jtt=p4(),J9e=U9e(),$tt=H9e(),K9e=Rg(),Z9e=j9e(),jA=[],eUe=tUe(jA.sort),Ytt=tUe(jA.push),Jtt=Wre(function(){jA.sort(void 0)}),Ktt=Wre(function(){jA.sort(null)}),Ztt=jtt("sort"),rUe=!Wre(function(){if(K9e)return K9e<70;if(!(J9e&&J9e>3)){if($tt)return!0;if(Z9e)return Z9e<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++)jA.push({k:r+n,v:s})}for(jA.sort(function(i,a){return a.v-i.v}),n=0;n<jA.length;n++)r=jA[n].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),e1t=Jtt||!Ktt||!Ztt||!rUe,t1t=o(function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:Y9e(e)>Y9e(r)?1:-1}},"getSortCompare");Utt({target:"Array",proto:!0,forced:e1t},{sort:o(function(e){e!==void 0&&Gtt(e);var r=Htt(this);if(rUe)return e===void 0?eUe(r):eUe(r,e);var s=[],n=$9e(r),i,a;for(a=0;a<n;a++)a in r&&Ytt(s,r[a]);for(Vtt(s,t1t(e)),i=$9e(s),a=0;a<i;)r[a]=s[a++];for(;a<n;)Xtt(r,a++);return r},"sort")})});var iUe=h((D01,nUe)=>{"use strict";sUe();var r1t=ia();nUe.exports=r1t("Array","sort")});var aUe=h((q01,oUe)=>{"use strict";var s1t=pn(),n1t=iUe(),_re=Array.prototype;oUe.exports=function(t){var e=t.sort;return t===_re||s1t(_re,t)&&e===_re.sort?n1t:e}});var uUe=h((I01,cUe)=>{"use strict";var i1t=aUe();cUe.exports=i1t});var lUe=h((R01,pUe)=>{pUe.exports=uUe()});var AUe=h(()=>{});var hUe=h((N01,fUe)=>{"use strict";var o1t=D1(),a1t=Qt(),dUe=o1t.RegExp,c1t=!a1t(function(){var t=!0;try{dUe(".","d")}catch{t=!1}var e={},r="",s=t?"dgimsy":"gimsy",n=o(function(u,p){Object.defineProperty(e,u,{get:o(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)n(a,i[a]);var c=Object.getOwnPropertyDescriptor(dUe.prototype,"flags").get.call(e);return c!==s||r!==s});fUe.exports={correct:c1t}});var MUe=h((F01,bUe)=>{"use strict";var u1t=Yp();bUe.exports=function(){var t=u1t(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 zUe=h((T01,gUe)=>{"use strict";var p1t=oo(),l1t=Is(),A1t=pn(),mUe=hUe(),d1t=MUe(),f1t=RegExp.prototype;gUe.exports=mUe.correct?function(t){return t.flags}:function(t){return!mUe.correct&&A1t(f1t,t)&&!l1t(t,"flags")?p1t(d1t,t):t.flags}});var EUe=h((x01,OUe)=>{"use strict";AUe();var h1t=zUe();OUe.exports=h1t});var BUe=h((W01,CUe)=>{"use strict";var b1t=pn(),M1t=EUe(),yUe=RegExp.prototype;CUe.exports=function(t){return t===yUe||b1t(yUe,t)?M1t(t):t.flags}});var qUe=h((_01,DUe)=>{"use strict";var m1t=BUe();DUe.exports=m1t});var RUe=h((L01,IUe)=>{IUe.exports=qUe()});var jUe=h((y4,VUe)=>{"use strict";var Rs=Yc(),g1t=Zc(
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,c;return{s:o(function(){r=(0,z1t.default)(t)},"s"),n:o(function(){var p=r.next();return i=p.done,p},"n"),e:o(function(p){a=!0,c=p},"e"),f:o(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}o(O4,"_createForOfIteratorHelper");function I1t(t,e){var r;if(t){if(typeof t=="string")return wUe(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,C1t.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return wUe(t,e)}}o(I1t,"_unsupportedIterableToArray");function wUe(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}o(wUe,"_arrayLikeToArray");var ct="xregexp",Xf={astral:!1,namespacing:!1},Pt={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},tu={},g4={},Qg={},Lre=[],Pg="default",SUe="class",R1t={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]/},w1t=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,S1t=Pt.exec.call(/()??/,"")[1]===void 0,N1t=(0,Hf.default)(/x/)!==void 0,v1t={},xUe=v1t.toString;function Pre(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}o(Pre,"hasNativeFlag");var WUe=Pre("u"),kre=Pre("y"),_Ue={g:!0,i:!0,m:!0,u:WUe,y:kre};function LUe(t,e,r,s,n){var i;if(t[ct]={captureNames:e},n)return t;if(t.__proto__)t.__proto__=ae.prototype;else for(var a in ae.prototype)t[a]=ae.prototype[a];return t[ct].source=r,t[ct].flags=s&&(0,q1t.default)(i=s.split("")).call(i).join(""),t}o(LUe,"augment");function z4(t){return Pt.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}o(z4,"clipDuplicates");function jf(t,e){var r;if(!ae.isRegExp(t))throw new TypeError("Type RegExp expected");var s=t[ct]||{},n=F1t(t),i="",a="",c=null,u=null;return e=e||{},e.removeG&&(a+="g"),e.removeY&&(a+="y"),a&&(n=Pt.replace.call(n,new RegExp("[".concat(a,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(n=z4(n+i)),e.isInternalOnly||(s.source!==void 0&&(c=s.source),(0,Hf.default)(s)!=null&&(u=i?z4((0,Hf.default)(s)+i):(0,Hf.default)(s))),t=LUe(new RegExp(e.source||t.source,n),T1t(t)?(0,co.default)(r=s.captureNames).call(r,0):null,c,u,e.isInternalOnly),t}o(jf,"copyRegex");function QUe(t){return(0,TUe.default)(t,16)}o(QUe,"dec");function PUe(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||Pt.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||x1t(t.input,t.index+t[0].length,r)?"":"(?:)"}o(PUe,"getContextualTokenSeparator");function F1t(t){return N1t?(0,Hf.default)(t):Pt.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}o(F1t,"getNativeFlags");function T1t(t){return!!(t[ct]&&t[ct].captureNames)}o(T1t,"hasNamedCapture");function kUe(t){return(0,TUe.default)(t,10).toString(16)}o(kUe,"hex");function x1t(t,e,r){var s="\\(\\?#[^)]*\\)",n="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return Pt.test.call((0,Vf.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,co.default)(t).call(t,e))}o(x1t,"isQuantifierNext");function Ure(t,e){return xUe.call(t)==="[object ".concat(e,"]")}o(Ure,"isType");function UUe(t){for(;t.length<4;)t="0".concat(t);return t}o(UUe,"pad4");function W1t(t,e){if(z4(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=Pt.replace.call(t,/^\(\?([\w$]+)\)/,function(i,a){if(Pt.test.call(/[gy]/,a))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=z4(e+a),""});var r=O4(e),s;try{for(r.s();!(s=r.n()).done;){var n=s.value;if(!_Ue[n])throw new SyntaxError("Unknown regex flag ".concat(n))}}catch(i){r.e(i)}finally{r.f()}return{pattern:t,flags:e}}o(W1t,"prepareFlags");function GUe(t){var e={};return Ure(t,"String")?((0,Qre.default)(ae).call(ae,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}o(GUe,"prepareOptions");function NUe(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be a single character A-Za-z0-9_$");_Ue[t]=!0}o(NUe,"registerFlag");function _1t(t,e,r,s,n){for(var i=Lre.length,a=t[r],c=null,u,p;i--;)if(p=Lre[i],!(p.leadChar&&p.leadChar!==a||p.scope!==s&&p.scope!=="all"||p.flag&&!(0,Vf.default)(e).call(e,p.flag))&&(u=ae.exec(t,p.regex,r,"sticky"),u)){c={matchLength:u[0].length,output:p.handler.call(n,u,s,e),reparse:p.reparse};break}return c}o(_1t,"runTokens");function HUe(t){Xf.astral=t}o(HUe,"setAstral");function XUe(t){Xf.namespacing=t}o(XUe
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,c;return{s:o(function(){r=(0,grt.default)(t)},"s"),n:o(function(){var p=r.next();return i=p.done,p},"n"),e:o(function(p){a=!0,c=p},"e"),f:o(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}o(qrt,"_createForOfIteratorHelper");function Irt(t,e){var r;if(t){if(typeof t=="string")return wGe(t,e);var s=(0,Crt.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,yrt.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return wGe(t,e)}}o(Irt,"_unsupportedIterableToArray");function wGe(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}o(wGe,"_arrayLikeToArray");var Rrt=o(function(e){var r={},s=e._dec,n=e._hex,i=e._pad4;function a(d){return d.replace(/[- _]+/g,"").toLowerCase()}o(a,"normalize");function c(d){var b=/^\\[xu](.+)/.exec(d);return b?s(b[1]):d.charCodeAt(d[0]==="\\"?1:0)}o(c,"charCode");function u(d){var b="",m=-1;return(0,Drt.default)(e).call(e,d,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(z){var C=c(z[1]);C>m+1&&(b+="\\u".concat(i(n(m+1))),C>m+2&&(b+="-\\u".concat(i(n(C-1))))),m=c(z[2]||z[1])}),m<65535&&(b+="\\u".concat(i(n(m+1))),m<65534&&(b+="-\\uFFFF")),b}o(u,"invertBmp");function p(d){var b="b!";return r[d][b]||(r[d][b]=u(r[d].bmp))}o(p,"cacheInvertedBmp");function l(d,b){var m=r[d],z="";if(m.bmp&&!m.isBmpLast){var C;z=(0,Vre.default)(C="[".concat(m.bmp,"]")).call(C,m.astral?"|":"")}if(m.astral&&(z+=m.astral),m.isBmpLast&&m.bmp){var E;z+=(0,Vre.default)(E="".concat(m.astral?"|":"","[")).call(E,m.bmp,"]")}return b?"(?:(?!".concat(z,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(z,")")}o(l,"buildAstral");function A(d,b){var m=b?"a!":"a=";return r[d][m]||(r[d][m]=l(d,b))}o(A,"cacheAstral"),e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(d,b,m){var z="Invalid double negation ",C="Unknown Unicode token ",E="Unicode token missing data ",D="Astral mode required for Unicode token ",R="Astral mode does not support Unicode tokens within character classes",w=d[1]==="P"||!!d[2],v=(0,Brt.default)(m).call(m,"A"),W=a(d[4]||d[3]),Q=r[W];if(d[1]==="P"&&d[2])throw new SyntaxError(z+d[0]);if(!r.hasOwnProperty(W))throw new SyntaxError(C+d[0]);if(Q.inverseOf){if(W=a(Q.inverseOf),!r.hasOwnProperty(W)){var $;throw new ReferenceError((0,Vre.default)($="".concat(E+d[0]," -> ")).call($,Q.inverseOf))}Q=r[W],w=!w}if(!(Q.bmp||v))throw new SyntaxError(D+d[0]);if(v){if(b==="class")throw new SyntaxError(R);return A(W,w)}return b==="class"?w?p(W):Q.bmp:"".concat((w?"[^":"[")+Q.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(d){var b="Unicode token requires name",m="Unicode token has no character data ",z=qrt(d),C;try{for(z.s();!(C=z.n()).done;){var E=C.value;if(!E.name)throw new Error(b);if(!(E.inverseOf||E.bmp||E.astral))throw new Error(m+E.name);r[a(E.name)]=E,E.alias&&(r[a(E.alias)]=E)}}catch(D){z.e(D)}finally{z.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(d){var b=a(d);return r[b]}},"_default");q4.default=Rrt;SGe.exports=q4.default});var FGe=h((ut1,vGe)=>{vGe.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\``)}o(_Ae,"getBooleanInput");function Z8(t,e){if(process.env.GITHUB_OUTPUT||"")return tz("OUTPUT",cB(t,e));process.stdout.write(K8.EOL),ca("set-output",{name:t},aa(e))}o(Z8,"setOutput");function LAe(t){process.exitCode=J8.Failure,Ab(t)}o(LAe,"setFailed");function Bu(){return process.env.RUNNER_DEBUG==="1"}o(Bu,"isDebug");function T(t){ca("debug",{},t)}o(T,"debug");function Ab(t,e={}){ca("error",pW(e),t instanceof Error?t.toString():t)}o(Ab,"error");function z0(t,e={}){ca("warning",pW(e),t instanceof Error?t.toString():t)}o(z0,"warning");function _(t){process.stdout.write(t+K8.EOL)}o(_,"info");function vd(t){AW("group",t)}o(vd,"startGroup");function Fd(){AW("endgroup")}o(Fd,"endGroup");function ur(t,e){return lo0(this,void 0,void 0,function*(){vd(t);let r;try{r=yield e()}finally{Fd()}return r})}o(ur,"group");function uq(t,e){if(process.env.GITHUB_STATE||"")return tz("STATE",cB(t,e));ca("save-state",{name:t},aa(e))}o(uq,"saveState");function QAe(t){return process.env[`STATE_${t}`]||""}o(QAe,"getState");var Aw=x(require("fs"),1),lX=x(require("os"),1),AX=x(require("path"),1);var kAe=x(require("os"),1);function uO(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(uO,"toCommandValue");function UAe(t,e,r){let s=new eQ(t,e,r);process.stdout.write(s.toString()+kAe.EOL)}o(UAe,"issueCommand");var PAe="::",eQ=class{static{o(this,"Command")}constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){let e=PAe+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let s in this.properties)if(this.properties.hasOwnProperty(s)){let n=this.properties[s];n&&(r?r=!1:e+=",",e+=`${s}=${do0(n)}`)}}return e+=`${PAe}${Ao0(this.message)}`,e}};function Ao0(t){return uO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(Ao0,"escapeData");function do0(t){return uO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(do0,"escapeProperty");var VAe=x(require("os"),1);var HAe=require("os"),pO=require("fs");var tQ=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})},{access:fo0,appendFile:ho0,writeFile:bo0}=pO.promises,GAe="GITHUB_STEP_SUMMARY";var rQ=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return tQ(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[GAe];if(!e)throw new Error(`Unable to find environment variable for $${GAe}. Check if your runtime environment supports job summaries.`);try{yield fo0(e,pO.constants.R_OK|pO.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,s={}){let n=Object.entries(s).map(([i,a])=>` ${i}="${a}"`).join("");return r?`<${e}${n}>${r}</${e}>`:`<${e}${n}>`}write(e){return tQ(this,void 0,void 0,function*(){let r=!!e?.overwrite,s=yield this.filePath();return yield(r?bo0:ho0)(s,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return tQ(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(HAe.EOL)}addCodeBlock(e,r){let s=Object.assign({},r&&{lang:r}),n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,r=!1){let s=r?"ol":"ul",n=e.map(a=>this.wrap("li",a)).join(""),i=this.wrap(s,n);return this.addRaw(i).addEOL()}addTable(e){let r=e.map(n=>{let i=n.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:u,colspan:p,rowspan:l}=a,A=c?"th":"td",d=Object.assign(Object.assign({},p&&{colspan:p}),l&&{rowspan:l});return this.wrap(A,u,d)}).join("");return this.wrap("tr",i)}).join(""),s=this.wrap("table",r);return this.addRaw(s).addEOL()}addDetails(e,r){let s=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(s).addEOL()}addImage(e,r,s){let{width:n,height:i}=s||{},a=Object.assign(Object.assign({},n&&{width:n}),i&&{height:i}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let s=`h${r}`,n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1",i=this.wrap(n,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 s=Object.assign({},r&&{cite:r}),n=this.wrap("blockquote",e,s);return this.addRaw(Line 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 EO(i));return s.searchPaths.push(...xQ(s.patterns)),s})}static stat(e,r,s){return kQ(this,void 0,void 0,function*(){let n;if(r.followSymbolicLinks)try{n=yield mb.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){gi(`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 mb.promises.lstat(e.path);if(n.isDirectory()&&r.followSymbolicLinks){let i=yield mb.promises.realpath(e.path);for(;s.length>=e.level;)s.pop();if(s.some(o=>o===i)){gi(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}s.push(i)}return n})}};var rp0=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 Cfe(t,e){return rp0(this,void 0,void 0,function*(){return yield qq.create(t,e)})}var Uq=T(require("crypto"),1),Eb=T(require("fs"),1),Wd=T(require("path"),1),bbe=T(Rn(),1),Mbe=T(require("util"),1);var RO;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(RO||(RO={}));var es;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(es||(es={}));var wn;(function(t){t.GNU="gnu",t.BSD="bsd"})(wn||(wn={}));var Pq=2,kq=5e3,uP=5e3,pP=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,hbe=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,wO="cache.tar",lP="manifest.txt",Wut=10*Math.pow(1024,3);var Ob=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())})},ud0=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)}},pd0="1.0";function SO(){return Ob(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=Wd.join(s,"actions","temp")}let r=Wd.join(e,Uq.randomUUID());return yield yu(r),r})}function Ba(t){return Eb.statSync(t).size}function AP(t){return Ob(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 Cfe(t.join(`
|
||||
`),{implicitDescendants:!1});try{for(var u=!0,p=ud0(c.globGenerator()),l;l=yield p.next(),e=l.done,!e;u=!0){n=l.value,u=!1;let h=Wd.relative(a,n).replace(new RegExp(`\\${Wd.sep}`,"g"),"/");F(`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 NO(t){return Ob(this,void 0,void 0,function*(){return Mbe.promisify(Eb.unlink)(t)})}function mbe(t){return Ob(this,arguments,void 0,function*(e,r=[]){let s="";r.push("--version"),F(`Checking ${e} ${r.join(" ")}`);try{yield Dn(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:n=>s+=n.toString(),stderr:n=>s+=n.toString()}})}catch(n){F(n.message)}return s=s.trim(),F(s),s})}function vO(){return Ob(this,void 0,void 0,function*(){let t=yield mbe("zstd",["--quiet"]),e=bbe.clean(t);return F(`zstd version: ${e}`),t===""?es.Gzip:es.ZstdWithoutLong})}function Fl(t){return t===es.Gzip?RO.Gzip:RO.Zstd}function gbe(){return Ob(this,void 0,void 0,function*(){return Eb.existsSync(pP)?pP:(yield mbe("tar")).toLowerCase().includes("gnu tar")?ar("tar"):""})}function dP(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}function yb(t,e,r=!1){let s=t.slice();return e&&s.push(e),process.platform==="win32"&&!r&&s.push("windows-only"),s.push(pd0),Uq.createHash("sha256").update(s.join("|")).digest("hex")}function zbe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}var TO=T(require("http"),1),bP=T(require("https"),1);function fP(t){let e=t.protocol==="https:";if(ld0(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 Hq(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Hq(`http://${r}`)}else return}function ld0(t){if(!t.hostname)return!1;let e=t.hostname;if(Ad0(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let s;t.port?s=Number(t.port):t.protocol==="http:"?s=80:t.protocol==="https:"&&(s=443);let n=[t.hostname.toUpperCase()];typeof s=="number"&&n.push(`${n[0]}:${s}`);for(let i of r.split(",").map(o=>o.trim().toUpperCase()).filter(o=>o))if(i==="*"||n.some(o=>o===i||o.endsWith(`.${i}`)||i.startsWith(".")&&o.endsWith(`${i}`)))return!0;return!1}function Ad0(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}var Hq=class extends URL{constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var Tl=T(tz(),1),Obe=T(cb(),1),Vt=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())})},Dt;(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"})(Dt||(Dt={}));var ts;(function(t){t.Accept="accept",t.ContentType="content-type"})(ts||(ts={}));var Iu;(function(t){t.ApplicationJson="application/json"})(Iu||(Iu={}));var fd0=[Dt.MovedPermanently,Dt.ResourceMoved,Dt.SeeOther,Dt.TemporaryRedirect,Dt.PermanentRedirect],hd0=[Dt.BadGateway,Dt.ServiceUnavailable,Dt.GatewayTimeout],bd0=["OPTIONS","GET","DELETE","HEAD"],Md0=10,md0=5,Da=class t extends Error{constructor(e,r){super(e),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,t.prototype)}},hP=class{constructor(e){this.message=e}readBody(){return Vt(this,void 0,void 0,function*(){return new Promise(e=>Vt(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",s=>{r=Buffer.concat([r,s])}),this.message.on("end",()=>{e(r.toString())})}))})}readBodyBuffer(){return Vt(this,void 0,void 0,functi
Line truncated
|
||||
${qd0.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Jq(t){return t instanceof rs?!0:Ld(t)&&t.name==="RestError"}function Ws(t,e){return Buffer.from(t,e)}var Kq=T(require("node:http"),1),Zq=T(require("node:https"),1),DP=T(require("node:zlib"),1),Lbe=require("node:stream");var Ei=xO("ts-http-runtime");var Id0={};function WO(t){return t&&typeof t.pipe=="function"}function _be(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 Qbe(t){return t&&typeof t.byteLength=="number"}var eI=class extends Lbe.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}},qP=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new qa("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 Ro;Ei.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=Nd0(a);u!==null&&e.headers.set("Content-Length",u)}let c;try{if(a&&e.onUploadProgress){let M=e.onUploadProgress,g=new eI(M);g.on("error",y=>{Ei.error("Error in upload progress",y)}),WO(a)?a.pipe(g):g.end(a),a=g}let u=await this.makeRequest(e,r,a);n!==void 0&&clearTimeout(n);let p=Rd0(u),A={status:u.statusCode??0,headers:p,request:e};if(e.method==="HEAD")return u.resume(),A;c=o?wd0(u,p):u;let h=e.onDownloadProgress;if(h){let M=new eI(h);M.on("error",g=>{Ei.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 Sd0(c),A}finally{if(e.abortSignal&&s){let u=Promise.resolve();WO(a)&&(u=_be(a));let p=Promise.resolve();WO(c)&&(p=_be(c)),Promise.all([u,p]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(l=>{Ei.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?Kq.default.request(a,c):Zq.default.request(a,c);p.once("error",l=>{u(new rs(l.message,{code:l.code??rs.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new qa("The operation was aborted. Rejecting from abort signal callback while making request.");p.destroy(l),u(l)}),s&&WO(s)?s.pipe(p):s?typeof s=="string"||Buffer.isBuffer(s)?p.end(s):Qbe(s)?p.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(Ei.error("Unrecognized body type",s),u(new rs("Unrecognized body type"))):p.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?Kq.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Kq.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return Zq.default.globalAgent;let n=e.tlsSettings??Id0,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(Ei.info("No cached TLS Agent exist, creating a new Agent"),i=new Zq.default.Agent({keepAlive:!s,...n}),this.cachedHttpsAgents.set(n,i)),i}}};function Rd0(t){let e=Sn();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 wd0(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let s=DP.default.createGunzip();return t.pipe(s),s}else if(r==="deflate"){let s=DP.default.createInflate();return t.pipe(s),s}return t}function Sd0(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 rs(`Error reading response as text: ${n.message}`,{code:rs.PARSE_ERROR}))})})}function Nd0(t){return t?Buffer.isBuffer(t)?t.length:WO(t)?null:Qbe(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function Pbe(){return new qP}function tI(){return Pbe()}var IP="logPolicy";function rI(t={}){let e=t.logger??Ei.info,r=new Ro({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additional
Line truncated
|
||||
`;return e}function pf0(t){return t instanceof Uint8Array?t.byteLength:yI(t)?t.size===-1?void 0:t.size:void 0}function lf0(t){let e=0;for(let r of t){let s=pf0(r);if(s===void 0)return;e+=s}return e}async function Af0(t,e,r){let s=[Ws(`--${r}`,"utf-8"),...e.flatMap(i=>[Ws(`\r
|
||||
`,"utf-8"),Ws(uf0(i.headers),"utf-8"),Ws(`\r
|
||||
`,"utf-8"),i.body,Ws(`\r
|
||||
--${r}`,"utf-8")]),Ws(`--\r
|
||||
`).map(i=>i.trim());for(let i of n)!i||i.startsWith("#")||s.patterns.push(new yO(i));return s.searchPaths.push(...WQ(s.patterns)),s})}static stat(e,r,s){return UQ(this,void 0,void 0,function*(){let n;if(r.followSymbolicLinks)try{n=yield gb.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){zi(`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 gb.promises.lstat(e.path);if(n.isDirectory()&&r.followSymbolicLinks){let i=yield gb.promises.realpath(e.path);for(;s.length>=e.level;)s.pop();if(s.some(a=>a===i)){zi(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}s.push(i)}return n})}};var sp0=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})};function Bfe(t,e){return sp0(this,void 0,void 0,function*(){return yield Rq.create(t,e)})}o(Bfe,"create");var Hq=x(require("crypto"),1),yb=x(require("fs"),1),_d=x(require("path"),1),Mbe=x(wn(),1),mbe=x(require("util"),1);var wO;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(wO||(wO={}));var ts;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(ts||(ts={}));var Sn;(function(t){t.GNU="gnu",t.BSD="bsd"})(Sn||(Sn={}));var Uq=2,Gq=5e3,pP=5e3,lP=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,bbe=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,SO="cache.tar",AP="manifest.txt",Ndt=10*Math.pow(1024,3);var Eb=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})},pd0=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(a){return new Promise(function(c,u){a=t[i](a),n(c,u,a.done,a.value)})}}function n(i,a,c,u){Promise.resolve(u).then(function(p){i({value:p,done:c})},a)}},ld0="1.0";function NO(){return Eb(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=_d.join(s,"actions","temp")}let r=_d.join(e,Hq.randomUUID());return yield Cu(r),r})}o(NO,"createTempDirectory");function Da(t){return yb.statSync(t).size}o(Da,"getArchiveFileSizeInBytes");function dP(t){return Eb(this,void 0,void 0,function*(){var e,r,s,n,i;let a=[],c=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),u=yield Bfe(t.join(`
|
||||
`),{implicitDescendants:!1});try{for(var p=!0,l=pd0(u.globGenerator()),A;A=yield l.next(),e=A.done,!e;p=!0){n=A.value,p=!1;let b=_d.relative(c,n).replace(new RegExp(`\\${_d.sep}`,"g"),"/");T(`Matched: ${b}`),b===""?a.push("."):a.push(`${b}`)}}catch(d){r={error:d}}finally{try{!p&&!e&&(s=l.return)&&(yield s.call(l))}finally{if(r)throw r.error}}return a})}o(dP,"resolvePaths");function vO(t){return Eb(this,void 0,void 0,function*(){return mbe.promisify(yb.unlink)(t)})}o(vO,"unlinkFile");function gbe(t){return Eb(this,arguments,void 0,function*(e,r=[]){let s="";r.push("--version"),T(`Checking ${e} ${r.join(" ")}`);try{yield qn(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:o(n=>s+=n.toString(),"stdout"),stderr:o(n=>s+=n.toString(),"stderr")}})}catch(n){T(n.message)}return s=s.trim(),T(s),s})}o(gbe,"getVersion");function FO(){return Eb(this,void 0,void 0,function*(){let t=yield gbe("zstd",["--quiet"]),e=Mbe.clean(t);return T(`zstd version: ${e}`),t===""?ts.Gzip:ts.ZstdWithoutLong})}o(FO,"getCompressionMethod");function Tl(t){return t===ts.Gzip?wO.Gzip:wO.Zstd}o(Tl,"getCacheFileName");function zbe(){return Eb(this,void 0,void 0,function*(){return yb.existsSync(lP)?lP:(yield gbe("tar")).toLowerCase().includes("gnu tar")?cr("tar"):""})}o(zbe,"getGnuTarPathOnWindows");function fP(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(fP,"assertDefined");function Cb(t,e,r=!1){let s=t.slice();return e&&s.push(e),process.platform==="win32"&&!r&&s.push("windows-only"),s.push(ld0),Hq.createHash("sha256").update(s.join("|")).digest("hex")}o(Cb,"getCacheVersion");function Obe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(Obe,"getRuntimeToken");var xO=x(require("http"),1),MP=x(require("https"),1);function hP(t){let e=t.protocol==="https:";if(Ad0(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 Vq(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Vq(`http://${r}`)}else return}o(hP,"getProxyUrl");function Ad0(t){if(!t.hostname)return!1;let e=t.hostname;if(dd0(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let s;t.port?s=Number(t.port):t.protocol==="http:"?s=80:t.protocol==="https:"&&(s=443);let n=[t.hostname.toUpperCase()];typeof s=="number"&&n.push(`${n[0]}:${s}`);for(let i of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(i==="*"||n.some(a=>a===i||a.endsWith(`.${i}`)||i.startsWith(".")&&a.endsWith(`${i}`)))return!0;return!1}o(Ad0,"checkBypass");function dd0(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(dd0,"isLoopbackAddress");var Vq=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var xl=x(rz(),1),Ebe=x(ub(),1);var jt=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})},qt;(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"})(qt||(qt={}));var rs;(function(t){t.Accept="accept",t.ContentType="content-type"})(rs||(rs={}));var Ru;(function(t){t.ApplicationJson="application/json"})(Ru||(Ru={}));var hd0=[qt.MovedPermanently,qt.ResourceMoved,qt.SeeOther,qt.TemporaryRedirect,qt.PermanentRedirect],bd0=[qt.BadGateway,qt.ServiceUnavailable,qt.GatewayTimeout],Md0=["OPTIONS","GET","DELETE","HEAD"],md0=10,gd0=5,qa=class t extends Error{static{o(this,"HttpClientError")}const
Line truncated
|
||||
${Id0.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Zq(t){return t instanceof ss?!0:Qd(t)&&t.name==="RestError"}o(Zq,"isRestError");function _s(t,e){return Buffer.from(t,e)}o(_s,"stringToUint8Array");var eI=x(require("node:http"),1),tI=x(require("node:https"),1),qP=x(require("node:zlib"),1),Qbe=require("node:stream");var yi=WO("ts-http-runtime");var Rd0={};function _O(t){return t&&typeof t.pipe=="function"}o(_O,"isReadableStream");function Lbe(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}o(Lbe,"isStreamComplete");function Pbe(t){return t&&typeof t.byteLength=="number"}o(Pbe,"isArrayBuffer");var rI=class extends Qbe.Transform{static{o(this,"ReportTransform")}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}},IP=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ia("The operation was aborted. Request has already been canceled.");s=o(p=>{p.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",s)}let n;e.timeout>0&&(n=setTimeout(()=>{let p=new wo;yi.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=vd0(c);p!==null&&e.headers.set("Content-Length",p)}let u;try{if(c&&e.onUploadProgress){let m=e.onUploadProgress,z=new rI(m);z.on("error",C=>{yi.error("Error in upload progress",C)}),_O(c)?c.pipe(z):z.end(c),c=z}let p=await this.makeRequest(e,r,c);n!==void 0&&clearTimeout(n);let l=wd0(p),d={status:p.statusCode??0,headers:l,request:e};if(e.method==="HEAD")return p.resume(),d;u=a?Sd0(p,l):p;let b=e.onDownloadProgress;if(b){let m=new rI(b);m.on("error",z=>{yi.error("Error in download progress",z)}),u.pipe(m),u=m}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=u:d.bodyAsText=await Nd0(u),d}finally{if(e.abortSignal&&s){let p=Promise.resolve();_O(c)&&(p=Lbe(c));let l=Promise.resolve();_O(u)&&(l=Lbe(u)),Promise.all([p,l]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(A=>{yi.warning("Error when cleaning up abortListener on httpRequest",A)})}}}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 c={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((u,p)=>{let l=i?eI.default.request(c,u):tI.default.request(c,u);l.once("error",A=>{p(new ss(A.message,{code:A.code??ss.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let A=new Ia("The operation was aborted. Rejecting from abort signal callback while making request.");l.destroy(A),p(A)}),s&&_O(s)?s.pipe(l):s?typeof s=="string"||Buffer.isBuffer(s)?l.end(s):Pbe(s)?l.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(yi.error("Unrecognized body type",s),p(new ss("Unrecognized body type"))):l.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?eI.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new eI.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return tI.default.globalAgent;let n=e.tlsSettings??Rd0,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(yi.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 wd0(t){let e=Nn();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}o(wd0,"getResponseHeaders");function Sd0(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let s=qP.default.createGunzip();return t.pipe(s),s}else if(r==="deflate"){let s=qP.default.createInflate();return t.pipe(s),s}return t}o(Sd0,"getDecodedResponseStream");function Nd0(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 ss(`Error reading response as text: ${n.message}`,{code:ss.PARSE_ERROR}))})})}o(Nd0,"streamToText");function vd0(t){return t?Buffer.isBuffer(t)?t.length:
Line truncated
|
||||
`;return e}o(pf0,"encodeHeaders");function lf0(t){return t instanceof Uint8Array?t.byteLength:BI(t)?t.size===-1?void 0:t.size:void 0}o(lf0,"getLength");function Af0(t){let e=0;for(let r of t){let s=lf0(r);if(s===void 0)return;e+=s}return e}o(Af0,"getTotalLength");async function df0(t,e,r){let s=[_s(`--${r}`,"utf-8"),...e.flatMap(i=>[_s(`\r
|
||||
`,"utf-8"),_s(pf0(i.headers),"utf-8"),_s(`\r
|
||||
`,"utf-8"),i.body,_s(`\r
|
||||
--${r}`,"utf-8")]),_s(`--\r
|
||||
\r
|
||||
`,"utf-8")],n=lf0(s);n&&t.headers.set("Content-Length",n),t.body=await kMe(s)}var PO="multipartPolicy",df0=70,ff0=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function hf0(t){if(t.length>df0)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!ff0.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function BI(){return{name:PO,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?hf0(r):r=cf0(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await Af0(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function DI(){return Yq()}var UMe=Vq({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Edt=UMe.logger;function wa(t){return UMe.createClientLogger(t)}var Sa=wa("core-rest-pipeline");function VP(t={}){return rI({logger:Sa.info,...t})}var jP=sI;function $P(t={}){return nI(t)}var qI=T(require("node:os"),1),II=T(require("node:process"),1);function GMe(){return"User-Agent"}async function HMe(t){if(II.default&&II.default.versions){let e=`${qI.default.type()} ${qI.default.release()}; ${qI.default.arch()}`,r=II.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 RI="1.22.2";function yf0(t){let e=[];for(let[r,s]of t){let n=s?`${r}/${s}`:r;e.push(n)}return e.join(" ")}function XMe(){return GMe()}async function wI(t){let e=new Map;e.set("core-rest-pipeline",RI),await HMe(e);let r=yf0(e);return t?`${t} ${r}`:r}var VMe=XMe(),jMe="userAgentPolicy";function YP(t={}){let e=wI(t.userAgentPrefix);return{name:jMe,async sendRequest(r,s){return r.headers.has(VMe)||r.headers.set(VMe,await e),s(r)}}}var Tn=class extends Error{constructor(e){super(e),this.name="AbortError"}};function JP(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,o)=>{function a(){o(new Tn(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 If0="The delay was aborted.";function kO(t,e){let r,{abortSignal:s,abortErrorMsg:n}=e??{};return JP(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:s,abortErrorMsg:n??If0})}function Wl(t){if(Ld(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 $Me(t){return Ld(t)}function Nb(){return _d()}var D0=kd;var YMe=Symbol("rawContent");function ZP(t){return typeof t[YMe]=="function"}function JMe(t){return ZP(t)?t[YMe]():t}var SI=PO;function ek(){let t=BI();return{name:SI,sendRequest:async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)ZP(s.body)&&(s.body=JMe(s.body));return t.sendRequest(e,r)}}}var tk=iI;function rk(){return oI()}function sk(t={}){return uI(t)}function nk(){return pI()}function _l(t){return kP(t)}function ik(t,e){return zI(t,e)}var KMe="setClientRequestIdPolicy";function ok(t="x-ms-client-request-id"){return{name:KMe,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function ak(t){return OI(t)}function ck(t){return EI(t)}var vb={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function ZMe(t={}){let e=new uk(t.parentContext);return t.span&&(e=e.setValue(vb.span,t.span)),t.namespace&&(e=e.setValue(vb.namespace,t.namespace)),e}var uk=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 tme=T(eme(),1),vI=tme.state;function Rf0(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}}}function wf0(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(t,e)=>({span:Rf0(),tracingContext:ZMe({parentContext:e.tracingContext})}),withContext(t,e,...r){return e(...r)}}}function UO(){return vI.instrumenterImplementation||(vI.instrumenterImplementation=wf0()),vI.instrumenterImplementation}function GO(t){let{namespace:e,packageName:r,packageVersion:s}=t;function n(u,p,l){let A=UO().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--),!Kh0(c)){let l;return c.trim().length===0?l="Invalid space after '<'.":l="Tag '"+c+"' is an invalid name.",jt("InvalidTag",l,ss(t,i))}let u=Vh0(t,i);if(u===!1)return jt("InvalidAttr","Attributes for '"+c+"' have open quote.",ss(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=xme(p,e);if(A===!0)s=!0;else return jt(A.err.code,A.err.msg,ss(t,l+A.err.line))}else if(a)if(u.tagClosed){if(p.trim().length>0)return jt("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",ss(t,o));if(r.length===0)return jt("InvalidTag","Closing tag '"+c+"' has not been opened.",ss(t,o));{let l=r.pop();if(c!==l.tagName){let A=ss(t,l.tagStartPos);return jt("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+A.line+", col "+A.col+") instead of closing tag '"+c+"'.",ss(t,o))}r.length==0&&(n=!0)}}else return jt("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",ss(t,i));else{let l=xme(p,e);if(l!==!0)return jt(l.err.code,l.err.msg,ss(t,i-p.length+l.err.line));if(n===!0)return jt("InvalidXml","Multiple possible root nodes found.",ss(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=Tme(t,i);continue}else if(t[i+1]==="?"){if(i=Fme(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=Yh0(t,i);if(l==-1)return jt("InvalidChar","char '&' is not expected.",ss(t,i));i=l}else if(n===!0&&!vme(t[i]))return jt("InvalidXml","Extra text at the end",ss(t,i));t[i]==="<"&&i--}}else{if(vme(t[i]))continue;return jt("InvalidChar","char '"+t[i]+"' is not expected.",ss(t,i))}if(s){if(r.length==1)return jt("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",ss(t,r[0].tagStartPos));if(r.length>0)return jt("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return jt("InvalidXml","Start tag expected.",1);return!0}function vme(t){return t===" "||t===" "||t===`
|
||||
`||t==="\r"}function Fme(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 jt("InvalidXml","XML declaration allowed only at the start of the document.",ss(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function Tme(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 Hh0='"',Xh0="'";function Vh0(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===Hh0||t[e]===Xh0)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 jh0=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function xme(t,e){let r=kI(t,jh0),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return jt("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",e3(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return jt("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",e3(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return jt("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",e3(r[n]));let i=r[n][2];if(!Jh0(i))return jt("InvalidAttr","Attribute '"+i+"' is an invalid name.",e3(r[n]));if(!Object.prototype.hasOwnProperty.call(s,i))s[i]=1;else return jt("InvalidAttr","Attribute '"+i+"' is repeated.",e3(r[n]))}return!0}function $h0(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 Yh0(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,$h0(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 jt(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Jh0(t){return qk(t)}function Kh0(t){return qk(t)}function ss(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function e3(t){return t.startIndex+t[1].length}var Wme={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"},_me={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"},Lme={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 Ps("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,i=new s3(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=_b(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=Tk(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=xk(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 Ps(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=_b(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=_b(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=xk(t,a,n.removeNSPrefix);if(!p){let x=t.substring(Math.max(0,a-50),Math.min(o,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${x}"`)}let l=p.tagName,A=p.rawTagName,h=p.tagExp,M=p.attrExpPresent,g=p.closeIndex;if({tagName:l,tagExp:h}=Tk(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=Ob0(A),l!==e.tagname&&this.matcher.push(l,{},R),l!==h&&M&&(B=this.buildAttributesMap(h,this.matcher,l),B&&(I=zb0(B,n))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=a;if(this.isCurrentNodeStopNode){let x="";if(O)a=p.closeIndex;else if(n.unpairedTagsSet.has(l))a=p.closeIndex;else{let j=this.readStopNodeData(t,A,g+1);if(!j)throw new Error(`Unexpected end of ${A}`);a=j.i,x=j.tagContent}let L=new Ps(l);B&&(L[":@"]=B),L.add(n.textNodeName,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,L,this.readonlyMatcher,N)}else{if(O){({tagName:l,tagExp:h}=Tk(n.transformTagName,l,h,n));let x=new Ps(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(n.unpairedTagsSet.has(l)){let x=new Ps(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=p.closeIndex;continue}else{let x=new Ps(l);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),r=x}s="",a=g}}}else s+=t[a];return e.child};function qb0(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 Ib0(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 Rb0(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 wb0(){return this.stopNodeExpressionsSet.size===0?!1:this.matcher.matchesAny(this.stopNodeExpressionsSet)}function Sb0(t,e,r=">"){Line truncated
|
||||
`;function Lb0(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(kk(r)==="?xml"){let n=r[":@"];if(n){let i=e.attributeNamePrefix+"version";if(n[i])return n[i]}}return"1.0"}function ige(t,e,r,s,n){return!r.sanitizeName||jd(t,{xmlVersion:n})?t:r.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()})}function Pk(t,e){let r="";e.format&&(r=_b0);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 _n(a)):a instanceof _n&&s.push(a)}let n=Lb0(t,e),i=new Fa;return oge(t,e,r,i,s,n)}function oge(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=Qk(c,e),c}return""}for(let c=0;c<t.length;c++){let u=t[c],p=kk(u);if(p===void 0)continue;let A=p===e.textNodeName||p===e.cdataPropName||p===e.commentPropName||p[0]==="?"?p:ige(p,!1,e,s,i),h=Qb0(u[":@"],e);s.push(A,h);let M=kb0(s,n);if(A===e.textNodeName){let I=u[p];M||(I=e.tagValueProcessor(A,I),I=Qk(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=$I(I);o+=`<![CDATA[${R}]]>`,a=!1,s.pop();continue}else if(A===e.commentPropName){let I=u[p][0][e.textNodeName],R=jI(I);o+=r+`<!--${R}-->`,a=!0,s.pop();continue}else if(A[0]==="?"){let I=nge(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=nge(u[":@"],e,M,s,i),O=r+`<${A}${y}`,B;M?B=age(u[p],e):B=oge(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 Qb0(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]=Pl(t[n]),s=!0}return s?r:null}function age(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=kk(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=Pb0(n[":@"],e),a=age(n[i],e);!a||a.length===0?r+=`<${i}${o}/>`:r+=`<${i}${o}>${a}</${i}>`}}}return r}function Pb0(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)}="${Pl(n)}"`}return r}function kk(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 nge(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:ige(a,!0,e,s,n),u;r?u=t[o]:(u=e.attributeValueProcessor(o,t[o]),u=Qk(u,e)),u===!0&&e.suppressBooleanAttributes?i+=` ${c}`:i+=` ${c}="${Pl(u)}"`}return i}function kb0(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 Qk(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 Uk(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 Ub0={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 Us(t){if(this.options=Object.assign({},Ub0,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 _n(r)):r instanceof _n&&this.stopNodeExpressions.push(r)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignorLine truncated
|
||||
`,"utf-8")],n=Af0(s);n&&t.headers.set("Content-Length",n),t.body=await UMe(s)}o(df0,"buildRequestBody");var kO="multipartPolicy",ff0=70,hf0=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function bf0(t){if(t.length>ff0)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!hf0.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}o(bf0,"assertValidBoundary");function qI(){return{name:kO,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,a]=n;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?bf0(r):r=uf0(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await df0(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(qI,"multipartPolicy");function II(){return Kq()}o(II,"createEmptyPipeline");var GMe=$q({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),wMt=GMe.logger;function Sa(t){return GMe.createClientLogger(t)}o(Sa,"createClientLogger");var Na=Sa("core-rest-pipeline");function jP(t={}){return nI({logger:Na.info,...t})}o(jP,"logPolicy");var $P=iI;function YP(t={}){return oI(t)}o(YP,"redirectPolicy");var RI=x(require("node:os"),1),wI=x(require("node:process"),1);function HMe(){return"User-Agent"}o(HMe,"getHeaderName");async function XMe(t){if(wI.default&&wI.default.versions){let e=`${RI.default.type()} ${RI.default.release()}; ${RI.default.arch()}`,r=wI.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}o(XMe,"setPlatformSpecificData");var SI="1.22.2";function Cf0(t){let e=[];for(let[r,s]of t){let n=s?`${r}/${s}`:r;e.push(n)}return e.join(" ")}o(Cf0,"getUserAgentString");function VMe(){return HMe()}o(VMe,"getUserAgentHeaderName");async function NI(t){let e=new Map;e.set("core-rest-pipeline",SI),await XMe(e);let r=Cf0(e);return t?`${t} ${r}`:r}o(NI,"getUserAgentValue");var jMe=VMe(),$Me="userAgentPolicy";function JP(t={}){let e=NI(t.userAgentPrefix);return{name:$Me,async sendRequest(r,s){return r.headers.has(jMe)||r.headers.set(jMe,await e),s(r)}}}o(JP,"userAgentPolicy");var xn=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function KP(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,a)=>{function c(){a(new xn(n??"The operation was aborted."))}o(c,"rejectOnAbort");function u(){s?.removeEventListener("abort",p)}o(u,"removeListeners");function p(){r?.(),u(),c()}if(o(p,"onAbort"),s?.aborted)return c();try{t(l=>{u(),i(l)},l=>{u(),a(l)})}catch(l){a(l)}s?.addEventListener("abort",p)})}o(KP,"createAbortablePromise");var Rf0="The delay was aborted.";function UO(t,e){let r,{abortSignal:s,abortErrorMsg:n}=e??{};return KP(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:s,abortErrorMsg:n??Rf0})}o(UO,"delay");function _l(t){if(Qd(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}o(_l,"getErrorMessage");function YMe(t){return Qd(t)}o(YMe,"isError");function vb(){return Ld()}o(vb,"randomUUID");var q0=Ud;var JMe=Symbol("rawContent");function ek(t){return typeof t[JMe]=="function"}o(ek,"hasRawContent");function KMe(t){return ek(t)?t[JMe]():t}o(KMe,"getRawContent");var vI=kO;function tk(){let t=qI();return{name:vI,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)ek(s.body)&&(s.body=KMe(s.body));return t.sendRequest(e,r)},"sendRequest")}}o(tk,"multipartPolicy");var rk=aI;function sk(){return cI()}o(sk,"decompressResponsePolicy");function nk(t={}){return lI(t)}o(nk,"defaultRetryPolicy");function ik(){return AI()}o(ik,"formDataPolicy");function Ll(t){return UP(t)}o(Ll,"getDefaultProxySettings");function ok(t,e){return EI(t,e)}o(ok,"proxyPolicy");var ZMe="setClientRequestIdPolicy";function ak(t="x-ms-client-request-id"){return{name:ZMe,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}o(ak,"setClientRequestIdPolicy");function ck(t){return yI(t)}o(ck,"agentPolicy");function uk(t){return CI(t)}o(uk,"tlsPolicy");var Fb={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function eme(t={}){let e=new pk(t.parentContext);return t.span&&(e=e.setValue(Fb.span,t.span)),t.namespace&&(e=e.setValue(Fb.namespace,t.namespace)),e}o(eme,"createTracingContext");var pk=class t{static{o(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--),!Zh0(u)){let A;return u.trim().length===0?A="Invalid space after '<'.":A="Tag '"+u+"' is an invalid name.",$t("InvalidTag",A,ns(t,i))}let p=jh0(t,i);if(p===!1)return $t("InvalidAttr","Attributes for '"+u+"' have open quote.",ns(t,i));let l=p.value;if(i=p.index,l[l.length-1]==="/"){let A=i-l.length;l=l.substring(0,l.length-1);let d=Wme(l,e);if(d===!0)s=!0;else return $t(d.err.code,d.err.msg,ns(t,A+d.err.line))}else if(c)if(p.tagClosed){if(l.trim().length>0)return $t("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",ns(t,a));if(r.length===0)return $t("InvalidTag","Closing tag '"+u+"' has not been opened.",ns(t,a));{let A=r.pop();if(u!==A.tagName){let d=ns(t,A.tagStartPos);return $t("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+u+"'.",ns(t,a))}r.length==0&&(n=!0)}}else return $t("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",ns(t,i));else{let A=Wme(l,e);if(A!==!0)return $t(A.err.code,A.err.msg,ns(t,i-l.length+A.err.line));if(n===!0)return $t("InvalidXml","Multiple possible root nodes found.",ns(t,i));e.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:a}),s=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=xme(t,i);continue}else if(t[i+1]==="?"){if(i=Tme(t,++i),i.err)return i}else break;else if(t[i]==="&"){let A=Jh0(t,i);if(A==-1)return $t("InvalidChar","char '&' is not expected.",ns(t,i));i=A}else if(n===!0&&!Fme(t[i]))return $t("InvalidXml","Extra text at the end",ns(t,i));t[i]==="<"&&i--}}else{if(Fme(t[i]))continue;return $t("InvalidChar","char '"+t[i]+"' is not expected.",ns(t,i))}if(s){if(r.length==1)return $t("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",ns(t,r[0].tagStartPos));if(r.length>0)return $t("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return $t("InvalidXml","Start tag expected.",1);return!0}o(XI,"validate");function Fme(t){return t===" "||t===" "||t===`
|
||||
`||t==="\r"}o(Fme,"isWhiteSpace");function Tme(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 $t("InvalidXml","XML declaration allowed only at the start of the document.",ns(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(Tme,"readPI");function xme(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}o(xme,"readCommentAndCDATA");var Xh0='"',Vh0="'";function jh0(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===Xh0||t[e]===Vh0)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}}o(jh0,"readAttributeStr");var $h0=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Wme(t,e){let r=GI(t,$h0),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return $t("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",t3(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return $t("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",t3(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return $t("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",t3(r[n]));let i=r[n][2];if(!Kh0(i))return $t("InvalidAttr","Attribute '"+i+"' is an invalid name.",t3(r[n]));if(!Object.prototype.hasOwnProperty.call(s,i))s[i]=1;else return $t("InvalidAttr","Attribute '"+i+"' is repeated.",t3(r[n]))}return!0}o(Wme,"validateAttributeString");function Yh0(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}o(Yh0,"validateNumberAmpersand");function Jh0(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Yh0(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}o(Jh0,"validateAmpersand");function $t(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o($t,"getErrorObject");function Kh0(t){return Ik(t)}o(Kh0,"validateAttrName");function Zh0(t){return Ik(t)}o(Zh0,"validateTagName");function ns(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(ns,"getLineNumberForPosition");function t3(t){return t.startIndex+t[1].length}o(t3,"getPositionFromMatch");var _me={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"},Lme={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"},Qme={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 ks("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,i=new n3(n.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let p=t.charCodeAt(c+1);if(p===47){let l=Lb(t,">",c,"Closing Tag is not closed."),A=t.substring(c+2,l).trim();if(n.removeNSPrefix){let b=A.indexOf(":");b!==-1&&(A=A.substr(b+1))}A=xk(n.transformTagName,A,"",n).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let d=this.matcher.getCurrentTag();if(A&&n.unpairedTagsSet.has(A))throw new Error(`Unpaired tag can not be used as closing tag: </${A}>`);d&&n.unpairedTagsSet.has(d)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),s="",c=l}else if(p===63){let l=Wk(t,c,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let A=this.buildAttributesMap(l.tagExp,this.matcher,l.tagName,!0);if(A){let d=A[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(d)||1),i.setXmlVersion(Number(d)||1)}if(!(n.ignoreDeclaration&&l.tagName==="?xml"||n.ignorePiTags)){let d=new ks(l.tagName);d.add(n.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&n.ignoreAttributes!==!0&&(d[":@"]=A),this.addChild(r,d,this.readonlyMatcher,c)}c=l.closeIndex+1}else if(p===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let l=Lb(t,"-->",c+4,"Comment is not closed.");if(n.commentPropName){let A=t.substring(c+4,l-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(n.commentPropName,[{[n.textNodeName]:A}])}c=l}else if(p===33&&t.charCodeAt(c+2)===68){let l=i.readDocType(t,c);this.entityDecoder.addInputEntities(l.entities),c=l.i}else if(p===33&&t.charCodeAt(c+2)===91){let l=Lb(t,"]]>",c,"CDATA is not closed.")-2,A=t.substring(c+9,l);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let d=this.parseTextData(A,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);d==null&&(d=""),n.cdataPropName?r.add(n.cdataPropName,[{[n.textNodeName]:A}]):r.add(n.textNodeName,d),c=l+2}else{let l=Wk(t,c,n.removeNSPrefix);if(!l){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 A=l.tagName,d=l.rawTagName,b=l.tagExp,m=l.attrExpPresent,z=l.closeIndex;if({tagName:A,tagExp:b}=xk(n.transformTagName,A,b,n),n.strictReservedNames&&(A===n.commentPropName||A===n.cdataPropName||A===n.textNodeName||A===n.attributesGroupName))throw new Error(`Invalid tag name: ${A}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher,!1));let C=r;C&&n.unpairedTagsSet.has(C.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;b.length>0&&b.lastIndexOf("/")===b.length-1&&(E=!0,A[A.length-1]==="/"?(A=A.substr(0,A.length-1),b=A):b=b.substr(0,b.length-1),m=A!==b);let D=null,R={},w;w=Eb0(d),A!==e.tagname&&this.matcher.push(A,{},w),A!==b&&m&&(D=this.buildAttributesMap(b,this.matcher,A),D&&(R=Ob0(D,n))),A!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let v=c;if(this.isCurrentNodeStopNode){let W="";if(E)c=l.closeIndex;else if(n.unpairedTagsSet.has(A))c=l.closeIndex;else{let $=this.readStopNodeData(t,d,z+1);if(!$)throw new Error(`Unexpected end of ${d}`);c=$.i,W=$.tagContent}let Q=new ks(A);D&&(Q[":@"]=D),Q.add(n.textNodeName,W),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,Q,this.readonlyMatcher,v)}else{if(E){({tagName:A,tagExp:b}=xk(n.transformTagName,A,b,n));let W=new ks(A);D&&(W[":@"]=D),this.addChild(r,W,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(n.unpairedTagsSet.has(A)){let W=new ks(A);D&&(W[":@"]=D),this.addChild(r,W,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=l.closeIndex;continue}else{let W=new ks(A);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),D&&(W[":@"]=D),this.addChild(r,W,this.readonlyMatcher,v),r=W}s="",c=z}}}else s+=t[c];return e.child},"parseXml");function Ib0(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))}o(Ib0,"addChild");function Rb0(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)}o(Rb0,"replaceEntitiesValue");function wb0(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}o(wb0,"saveTextToParentTag");function Sb0(){return this.stopNodeExpressionsSet.Line truncated
|
||||
`;function Qb0(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(Uk(r)==="?xml"){let n=r[":@"];if(n){let i=e.attributeNamePrefix+"version";if(n[i])return n[i]}}return"1.0"}o(Qb0,"detectXmlVersionFromArray");function oge(t,e,r,s,n){return!r.sanitizeName||$d(t,{xmlVersion:n})?t:r.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()})}o(oge,"resolveTagName");function kk(t,e){let r="";e.format&&(r=Lb0);let s=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let a=0;a<e.stopNodes.length;a++){let c=e.stopNodes[a];typeof c=="string"?s.push(new Ln(c)):c instanceof Ln&&s.push(c)}let n=Qb0(t,e),i=new Ta;return age(t,e,r,i,s,n)}o(kk,"toXml");function age(t,e,r,s,n,i){let a="",c=!1;if(e.maxNestedTags&&s.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let u=t.toString();return u=Pk(u,e),u}return""}for(let u=0;u<t.length;u++){let p=t[u],l=Uk(p);if(l===void 0)continue;let d=l===e.textNodeName||l===e.cdataPropName||l===e.commentPropName||l[0]==="?"?l:oge(l,!1,e,s,i),b=Pb0(p[":@"],e);s.push(d,b);let m=Ub0(s,n);if(d===e.textNodeName){let R=p[l];m||(R=e.tagValueProcessor(d,R),R=Pk(R,e)),c&&(a+=r),a+=R,c=!1,s.pop();continue}else if(d===e.cdataPropName){c&&(a+=r);let R=p[l][0][e.textNodeName],w=JI(R);a+=`<![CDATA[${w}]]>`,c=!1,s.pop();continue}else if(d===e.commentPropName){let R=p[l][0][e.textNodeName],w=YI(R);a+=r+`<!--${w}-->`,c=!0,s.pop();continue}else if(d[0]==="?"){let R=ige(p[":@"],e,m,s,i);a+=(d==="?xml"?"":r)+`<${d}${R}?>`,c=!0,s.pop();continue}let z=r;z!==""&&(z+=e.indentBy);let C=ige(p[":@"],e,m,s,i),E=r+`<${d}${C}`,D;m?D=cge(p[l],e):D=age(p[l],e,z,s,n,i),e.unpairedTags.indexOf(d)!==-1?e.suppressUnpairedNode?a+=E+">":a+=E+"/>":(!D||D.length===0)&&e.suppressEmptyNode?a+=E+"/>":D&&D.endsWith(">")?a+=E+`>${D}${r}</${d}>`:(a+=E+">",D&&r!==""&&(D.includes("/>")||D.includes("</"))?a+=r+e.indentBy+D+r:a+=D,a+=`</${d}>`),c=!0,s.pop()}return a}o(age,"arrToStr");function Pb0(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]=kl(t[n]),s=!0}return s?r:null}o(Pb0,"extractAttributeValues");function cge(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=Uk(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 a=kb0(n[":@"],e),c=cge(n[i],e);!c||c.length===0?r+=`<${i}${a}/>`:r+=`<${i}${a}>${c}</${i}>`}}}return r}o(cge,"getRawContent");function kb0(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)}="${kl(n)}"`}return r}o(kb0,"attr_to_str_raw");function Uk(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}}o(Uk,"propName");function ige(t,e,r,s,n){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:oge(c,!0,e,s,n),p;r?p=t[a]:(p=e.attributeValueProcessor(a,t[a]),p=Pk(p,e)),p===!0&&e.suppressBooleanAttributes?i+=` ${u}`:i+=` ${u}="${kl(p)}"`}return i}o(ige,"attr_to_str");function Ub0(t,e){if(!e||e.length===0)return!1;for(let r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}o(Ub0,"checkStopNode");function Pk(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}o(Pk,"replaceEntitiesValue");function Gk(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}o(Gk,"getIgnoreAttributesFn");var Gb0={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:o(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:o(function(t,e){return e},"attributeValueProcessor"),preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function Gs(t){if(this.options=Object.assign({},Gb0,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 Gb0(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 Gk(t,e,r,s,n){return!r.sanitizeName||jd(t,{xmlVersion:n})?t:r.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()})}Us.prototype.build=function(t){if(this.options.preserveOrder)return Pk(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new Fa,r=Gb0(t,this.options);return this.j2x(t,0,e,r).val}};Us.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:Gk(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=Gk(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=Gk(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}};Us.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+'="'+Pl(e)+'"'};function Hb0(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)}Us.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]=Pl(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]=Pl(t[s]),r=!0)}return r?e:null};Us.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="")}o(Gs,"Builder");function Hb0(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"}o(Hb0,"detectXmlVersionFromObj");function Hk(t,e,r,s,n){return!r.sanitizeName||$d(t,{xmlVersion:n})?t:r.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()})}o(Hk,"resolveTagName");Gs.prototype.build=function(t){if(this.options.preserveOrder)return kk(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new Ta,r=Hb0(t,this.options);return this.j2x(t,0,e,r).val}};Gs.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 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 l=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:Hk(u,!1,this.options,r,s);if(typeof t[u]>"u")this.isAttribute(u)&&(i+="");else if(t[u]===null)this.isAttribute(u)||l===this.options.cdataPropName||l===this.options.commentPropName?i+="":l[0]==="?"?i+=this.indentate(e)+"<"+l+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+l+"/"+this.tagEndChar;else if(t[u]instanceof Date)i+=this.buildTextValNode(t[u],l,"",e,r);else if(typeof t[u]!="object"){let A=this.isAttribute(u);if(A&&!this.ignoreAttributesFn(A,a)){let d=Hk(A,!0,this.options,r,s);n+=this.buildAttrPairStr(d,""+t[u],c)}else if(!A)if(u===this.options.textNodeName){let d=this.options.tagValueProcessor(u,""+t[u]);i+=this.replaceEntitiesValue(d)}else{r.push(l);let d=this.checkStopNode(r);if(r.pop(),d){let b=""+t[u];b===""?i+=this.indentate(e)+"<"+l+this.closeTag(l)+this.tagEndChar:i+=this.indentate(e)+"<"+l+">"+b+"</"+l+this.tagEndChar}else i+=this.buildTextValNode(t[u],l,"",e,r)}}else if(Array.isArray(t[u])){let A=t[u].length,d="",b="";for(let m=0;m<A;m++){let z=t[u][m];if(!(typeof z>"u"))if(z===null)l[0]==="?"?i+=this.indentate(e)+"<"+l+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+l+"/"+this.tagEndChar;else if(typeof z=="object")if(this.options.oneListGroup){r.push(l);let C=this.j2x(z,e+1,r,s);r.pop(),d+=C.val,this.options.attributesGroupName&&z.hasOwnProperty(this.options.attributesGroupName)&&(b+=C.attrStr)}else d+=this.processTextOrObjNode(z,l,e,r,s);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor(l,z);C=this.replaceEntitiesValue(C),d+=C}else{r.push(l);let C=this.checkStopNode(r);if(r.pop(),C){let E=""+z;E===""?d+=this.indentate(e)+"<"+l+this.closeTag(l)+this.tagEndChar:d+=this.indentate(e)+"<"+l+">"+E+"</"+l+this.tagEndChar}else d+=this.buildTextValNode(z,l,"",e,r)}}this.options.oneListGroup&&(d=this.buildObjectNode(d,l,b,e)),i+=d}else if(this.options.attributesGroupName&&u===this.options.attributesGroupName){let A=Object.keys(t[u]),d=A.length;for(let b=0;b<d;b++){let m=Hk(A[b],!0,this.options,r,s);n+=this.buildAttrPairStr(m,""+t[u][A[b]],c)}}else i+=this.processTextOrObjNode(t[u],l,e,r,s)}return{attrStr:n,val:i}};Gs.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+'="'+kl(e)+'"'};function Xb0(t,e,r,s,n){let i=this.extractAttributes(t);if(s.push(e,i),this.checkStopNode(s)){let u=this.buildRawContent(t),p=this.buildAttributesForStopNode(t);return s.pop(),this.buildObjectNode(u,e,p,r)}let c=this.j2x(t,r+1,s,n);return s.pop(),e[0]==="?"?this.buildTextValNode("",e,c.attrStr,r,s):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,c.attrStr,r,s):this.buildObjectNode(c.val,e,c.attrStr,r)}o(Xb0,"processTextOrObjNode");Gs.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]=kl(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]=kl(t[s]),r=!0)}return r?e:null};Gs.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(We.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${s}`),e}getHeaderValueToSign(e,r){let s=e.headers.get(r);return!s||r===We.CONTENT_LENGTH&&s==="0"?"":s}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(n=>n.name.toLowerCase().startsWith(We.PREFIX_FOR_STORAGE));r.sort((n,i)=>o5(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=s5(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=n5(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 qt=class extends Jd{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new c3(e,r,this)}computeHMACSHA256(e){return(0,hge.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var g1=wa("storage-common");var Di;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Di||(Di={}));var Ul={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Di.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},eM0=new Tn("The operation was aborted."),u3=class extends Ta{retryOptions;constructor(e,r,s=Ul){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:Ul.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):Ul.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:Ul.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:Ul.maxRetryDelayInMs):Ul.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:Ul.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:Ul.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=r5(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=kl(n.url,vu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(g1.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(g1.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 g1.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 g1.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 g1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return g1.info(`RetryPolicy: Will retry for status code ${o}.`),!0}if(s&&s?.status>=400){let o=s.headers.get(We.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')?(g1.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 Di.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Di.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return g1.info(`RetryPolicy: Delay for ${n}ms`),i5(n,s,eM0)}};var p3=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new u3(e,r,this.retryOptions)}};var tM0="storageBrowserPolicy";function bge(){return{name:tM0,async sendRequest(t,e){return D0||((t.method==="GET"||t.method==="HEAD")&&(t.url=kl(t.url,vu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(We.COOKIE),t.headers.delete(We.CONTENT_LENGTH)),e(t)}}}var rM0="StorageCorrectContentLengthPolicy";function Mge(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(We.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:rM0,async sendRequest(e,r){return t(e),r(e)}}}var sM0="storageRetryPolicy",Qb={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Di.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},nM0=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],iM0=new Tn("The operation was aborted.");function mge(t={}){let e=t.retryPolicyType??Qb.retryPolicyType,r=t.maxTries??Qb.maxTries,s=t.retryDelayInMs??Qb.retryDelayInMs,n=t.maxRetryDelayInMs??Qb.maxRetryDelayInMs,i=t.secondaryHost??Qb.secondaryHost,o=t.tryTimeoutInMs??Qb.tryTimeoutInMs;function a({isPrimaryRetry:u,attempt:p,response:l,error:A}){if(p>=r)return g1.info(`RetryPolicy: Attempt(s) ${p} >= maxTries ${r}, no further try.`),!1;if(A){for(let h of nM0)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),s=this.factory.computeHMACSHA256(r);return e.headers.set(_e.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${s}`),e}getHeaderValueToSign(e,r){let s=e.headers.get(r);return!s||r===_e.CONTENT_LENGTH&&s==="0"?"":s}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(n=>n.name.toLowerCase().startsWith(_e.PREFIX_FOR_STORAGE));r.sort((n,i)=>c5(n.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((n,i,a)=>!(i>0&&n.name.toLowerCase()===a[i-1].name.toLowerCase()));let s="";return r.forEach(n=>{s+=`${n.name.toLowerCase().trimRight()}:${n.value.trimLeft()}
|
||||
`}),s}getCanonicalizedResourceString(e){let r=i5(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=o5(e.url),i={};if(n){let a=[];for(let c in n)if(Object.prototype.hasOwnProperty.call(n,c)){let u=c.toLowerCase();i[u]=n[c],a.push(u)}a.sort();for(let c of a)s+=`
|
||||
${c}:${decodeURIComponent(i[c])}`}return s}};var It=class extends Kd{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new u3(e,r,this)}computeHMACSHA256(e){return(0,bge.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var z1=Sa("storage-common");var qi;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(qi||(qi={}));var Gl={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:qi.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},tM0=new xn("The operation was aborted."),p3=class extends xa{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,s=Gl){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:Gl.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):Gl.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:Gl.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:Gl.maxRetryDelayInMs):Gl.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:Gl.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:Gl.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=n5(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=Ul(n.url,Fu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(z1.info(`RetryPolicy: =====> Try=${s} ${i?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(n),!this.shouldRetry(i,s,a))return a;r=r||!i&&a.status===404}catch(c){if(z1.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(i,s,a,c))throw c}return await this.delay(i,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,n){if(r>=this.retryOptions.maxTries)return z1.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 a of i)if(n.name.toUpperCase().includes(a)||n.message.toUpperCase().includes(a)||n.code&&n.code.toString().toUpperCase()===a)return z1.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(s||n){let a=s?s.status:n?n.statusCode:0;if(!e&&a===404)return z1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return z1.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(s&&s?.status>=400){let a=s.headers.get(_e.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return n?.code==="PARSE_ERROR"&&n?.message.startsWith('Error "Error: Unclosed root tag')?(z1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,s){let n=0;if(e)switch(this.retryOptions.retryPolicyType){case qi.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case qi.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return z1.info(`RetryPolicy: Delay for ${n}ms`),a5(n,s,tM0)}};var l3=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new p3(e,r,this.retryOptions)}};var rM0="storageBrowserPolicy";function Mge(){return{name:rM0,async sendRequest(t,e){return q0||((t.method==="GET"||t.method==="HEAD")&&(t.url=Ul(t.url,Fu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(_e.COOKIE),t.headers.delete(_e.CONTENT_LENGTH)),e(t)}}}o(Mge,"storageBrowserPolicy");var sM0="StorageCorrectContentLengthPolicy";function mge(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(_e.CONTENT_LENGTH,Buffer.byteLength(e.body))}return o(t,"correctContentLength"),{name:sM0,async sendRequest(e,r){return t(e),r(e)}}}o(mge,"storageCorrectContentLengthPolicy");var nM0="storageRetryPolicy",Pb={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:qi.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},iM0=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],oM0=new xn("The operation was aborted.");function gge(t={}){let e=t.retryPolicyType??Pb.retryPolicyType,r=t.maxTries??Pb.maxTries,s=t.retryDelayInMs??Pb.retryDelayInMs,n=t.maxRetryDelayInMs??Pb.maxRetryDelayInMs,i=t.secondaryHost??Pb.secondaryHost,a=t.tryTimeoutInMs??Pb.tryTimeoutInMs;function c({isPrimaryRetry:p,attempt:l,response:A,error:d}){if(l>=r)return
Line truncated
|
||||
`)+`
|
||||
`+s(i)+n(i),a=(0,gge.createHmac)("sha256",t.accountKey).update(o,"utf8").digest("base64");i.headers.set(We.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(i,o){let a=i.headers.get(o);return!a||o===We.CONTENT_LENGTH&&a==="0"?"":a}function s(i){let o=[];for(let[c,u]of i.headers)c.toLowerCase().startsWith(We.PREFIX_FOR_STORAGE)&&o.push({name:c,value:u});o.sort((c,u)=>o5(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=s5(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=n5(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:oM0,async sendRequest(i,o){return e(i),o(i)}}}var aM0="storageRequestFailureDetailsParserPolicy";function zge(){return{name:aM0,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 Oge=require("node:crypto"),a5=class{accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,Oge.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var c5="12.31.0",u5="2026-02-06";var p5="https://storage.azure.com/.default",Fu={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var wo="",Yk="*",cM0=1*1024*1024;var uM0=4*cM0;var Ege="AES256",yge="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Cge=["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"],Bge=["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"],Dge="BlobUsesCustomerSpecifiedEncryption",qge="BlobDoesNotUseCustomerSpecifiedEncryption",Ige=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Tu(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 l3=class{factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function $t(t,e={}){t||(t=new At);let r=new l3([],e);return r._credential=t,r}function pM0(t){let e=[lM0,Rge,AM0,dM0,fM0,hM0,MM0];if(t.factories.length){let r=t.factories.filter(s=>!e.some(n=>n(s)));if(r.length){let s=r.some(n=>bM0(n));return{wrappedPolicies:Bk(r),afterRetry:s}}}}function Jk(t){let{httpClient:e,...r}=t.options,s=t._coreHttpClient;s||(s=e?Dk(e):jk(),t._coreHttpClient=s);let n=t._corePipeline;if(!n){let i=`azsdk-js-azure-storage-blob/${c5}`,o=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;n=VO({...r,loggingOptions:{additionalAllowedHeaderNames:Cge,additionalAllowedQueryParameters:Bge,logger:JI.info},userAgentOptions:{userAgentPrefix:o},serializationOptions:{stringifyXML:YI,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:Xk,serializerOptions:{xml:{xmlCharKey:"#"}}}}),n.removePolicy({phase:"Retry"}),n.removePolicy({name:tk}),n.addPolicy(Mge()),n.addPolicy(mge(r.retryOptions),{phase:"Retry"}),n.addPolicy(zge()),n.addPolicy(bge());let a=pM0(t);a&&n.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:"Retry"}:void 0);let c=Kk(t);xn(c)?n.addPolicy(Fb({credential:c,scopes:r.audience??p5
Line truncated
|
||||
`),i=e.computeHMACSHA256(n);return{sasQueryParameters:new To(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 lg0(t,e){if(t=o2(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=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Fo(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 To(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 Ag0(t,e){if(t=o2(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=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Fo(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 To(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 dg0(t,e){if(t=o2(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=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?q0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?q0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Fo(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 To(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 fg0(t,e){if(t=o2(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=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?q0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?q0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Fo(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 To(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 hg0(t,e){if(t=o2(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=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?q0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?q0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Fo(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 To(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 bg0(t,e){if(t=o2(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=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?q0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?q0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Fo(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 To(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 o2(t){let e=t.version?t.version:u5;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 y3=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=Nb()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==wo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==wo||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 me.withSpan("BlobLeaseClient-acquireLease",r,async s=>ye(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!==wo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==wo||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 me.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=ye(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!==wo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==wo||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 me.withSpan("BlobLeaseClient-releaseLease",e,async r=>ye(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!==wo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==wo||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 me.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"}};Kb.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var p2=class extends Error{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"}};p2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var v3=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var Dz0=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())})},PG=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);W(`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 NOe(t,e,r){return Dz0(this,void 0,void 0,function*(){var s;let n=new ku(t),i=n.getBlockBlobClient(),o=new PG((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(),F(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let c=yield i.uploadFile(e,a);if(c._response.status>=400)throw new fR(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw g0(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}var FOe=T(require("buffer"),1),ec=T(require("fs"),1),TOe=T(require("stream"),1),xOe=T(require("util"),1);var hR=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 bR(t){return t?t>=200&&t<300:!1}function qz0(t){return t?t>=500:!0}function Iz0(t){return t?[Dt.BadGateway,Dt.ServiceUnavailable,Dt.GatewayTimeout].includes(t):!1}function Rz0(t){return hR(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function vOe(t,e,r){return hR(this,arguments,void 0,function*(s,n,i,o=Pq,a=kq,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),!qz0(A)))return l;if(A&&(h=Iz0(A),u=`Cache service responded with ${A}`),F(`${s} - Attempt ${p} of ${o} failed with error: ${u}`),!h){F(`${s} - Error is not retryable`);break}yield Rz0(a),p++}throw Error(`${s} failed: ${u}`)})}function F3(t,e){return hR(this,arguments,void 0,function*(r,s,n=Pq,i=kq){return yield vOe(r,s,o=>o.statusCode,n,i,o=>{if(o instanceof Da)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function Zb(t,e){return hR(this,arguments,void 0,function*(r,s,n=Pq,i=kq){return yield vOe(r,s,o=>o.message.statusCode,n,i)})}var Si=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 wz0(t,e){return Si(this,void 0,void 0,function*(){yield xOe.promisify(TOe.pipeline)(t.message,e)})}var MR=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,F(`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);W(`Received ${e} of ${this.contentLength} (${r}%), ${n} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=
Line truncated
|
||||
Other caches with similar key:`);for(let a of i?.artifactCaches||[])F(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function HG(t,e,r){return Hs(this,void 0,void 0,function*(){let s=new XOe.URL(t),n=QOe(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield _Oe(t,e,n):n.concurrentBlobDownloads?yield WOe(t,e,n):yield mR(t,e):yield mR(t,e)})}function jOe(t,e,r){return Hs(this,void 0,void 0,function*(){let s=GG(),n=yb(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield F3("reserveCache",()=>Hs(this,void 0,void 0,function*(){return s.postJson(x3("caches"),i)}))})}function HOe(t,e){return`bytes ${t}-${e}/*`}function _z0(t,e,r,s,n){return Hs(this,void 0,void 0,function*(){F(`Uploading chunk of size ${n-s+1} bytes at offset ${s} with content range: ${HOe(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":HOe(s,n)},o=yield Zb(`uploadChunk (start: ${s}, end: ${n})`,()=>Hs(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!bR(o.message.statusCode))throw new Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function Lz0(t,e,r,s){return Hs(this,void 0,void 0,function*(){let n=Ba(r),i=x3(`caches/${e.toString()}`),o=eM.openSync(r,"r"),a=kG(s),c=dP("uploadConcurrency",a.uploadConcurrency),u=dP("uploadChunkSize",a.uploadChunkSize),p=[...new Array(c).keys()];F("Awaiting all uploads");let l=0;try{yield Promise.all(p.map(()=>Hs(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 _z0(t,i,()=>eM.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{eM.closeSync(o)}})}function Qz0(t,e,r){return Hs(this,void 0,void 0,function*(){let s={size:r};return yield F3("commitCache",()=>Hs(this,void 0,void 0,function*(){return t.postJson(x3(`caches/${e.toString()}`),s)}))})}function XG(t,e,r,s){return Hs(this,void 0,void 0,function*(){if(kG(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield NOe(r,e,s)}else{let i=GG();F("Upload cache"),yield Lz0(i,t,e,s),F("Commiting cache");let o=Ba(e);W(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);let a=yield Qz0(i,t,o);if(!bR(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);W("Cache saved successfully")}})}var k3e=T(T3e(),1),Kt=T(Jt(),1),Pn=T(Jt(),1),h2=T(Jt(),1),b2=T(Jt(),1),M2=T(Jt(),1);var QH=T(Jt(),1),PH=T(Jt(),1),L3e=T(Jt(),1),Q3e=T(Jt(),1),P3e=T(Jt(),1);var WH=T(Jt(),1),_H=T(Jt(),1),x3e=T(Jt(),1),W3e=T(Jt(),1),_3e=T(Jt(),1),LH=class extends _3e.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,W3e.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,x3e.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?_H.UnknownFieldHandler.onRead:u)(this.typeName,i,a,c,p)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,WH.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,WH.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?_H.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},iw=new LH;var kH=class extends P3e.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:()=>iw}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,Q3e.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,L3e.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(iw.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?PH.UnknownFieldHandler.onRead:u)(this.typeName,i,a,c,p)}}return i}internalBinaryWrite(e,r,s){e.repositoryId!=="0"&&r.tag(1,QH.WireType.Varint).int64(e.repositoryId);for(let i=0;i<e.scope.length;i++)iw.internalBinaryWrite(e.scope[i],r.tag(2,QH.WireType.LengthDelimited).fork(),s).join();let n=s.writeUnknownFields;return n!==!1&&(n==!0?PH.UnknownFieldHandler.onWrite:n)(this.type
Line truncated
|
||||
`));let s=yield sX(r,"create");yield nX(s,t)})}var MM=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())})},_o=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},bM=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},uw=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function X3e(t){if(!t||t.length===0)throw new _o("Path Validation Error: At least one directory or file path is required")}function aX(t){if(t.length>512)throw new _o(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new _o(`Key Validation Error: ${t} cannot contain commas.`)}function cX(){return T3()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function V3e(t,e,r,s){return MM(this,arguments,void 0,function*(n,i,o,a,c=!1){let u=T3();return F(`Cache service version: ${u}`),X3e(n),u==="v2"?yield tE0(n,i,o,a,c):yield eE0(n,i,o,a,c)})}function eE0(t,e,r,s){return MM(this,arguments,void 0,function*(n,i,o,a,c=!1){o=o||[];let u=[i,...o];if(F("Resolved Keys:"),F(JSON.stringify(u)),u.length>10)throw new _o("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of u)aX(A);let p=yield vO(),l="";try{let A=yield VOe(u,n,{compressionMethod:p,enableCrossOsArchive:c});if(!A?.archiveLocation)return;if(a?.lookupOnly)return W("Lookup only - skipping download"),A.cacheKey;l=K3.join(yield SO(),Fl(p)),F(`Archive Path: ${l}`),yield HG(A.archiveLocation,l,a),Cu()&&(yield J3(l,p));let h=Ba(l);return W(`Cache Size: ~${Math.round(h/(1024*1024))} MB (${h} B)`),yield iX(l,p),W("Cache restored successfully"),A.cacheKey}catch(A){let h=A;if(h.name===_o.name)throw A;h instanceof Da&&typeof h.statusCode=="number"&&h.statusCode>=500?lb(`Failed to restore: ${A.message}`):g0(`Failed to restore: ${A.message}`)}finally{try{yield NO(l)}catch(A){F(`Failed to delete archive: ${A}`)}}})}function tE0(t,e,r,s){return MM(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(F("Resolved Keys:"),F(JSON.stringify(u)),u.length>10)throw new _o("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of u)aX(l);let p="";try{let l=rX(),A=yield vO(),h={key:i,restoreKeys:o,version:yb(n,A,c)},M=yield l.GetCacheEntryDownloadURL(h);if(!M.ok){F(`Cache not found for version ${h.version} of keys: ${u.join(", ")}`);return}if(h.key!==M.matchedKey?W(`Cache hit for restore-key: ${M.matchedKey}`):W(`Cache hit for: ${M.matchedKey}`),a?.lookupOnly)return W("Lookup only - skipping download"),M.matchedKey;p=K3.join(yield SO(),Fl(A)),F(`Archive path: ${p}`),F(`Starting download of archive to: ${p}`),yield HG(M.signedDownloadUrl,p,a);let y=Ba(p);return W(`Cache Size: ~${Math.round(y/(1024*1024))} MB (${y} B)`),Cu()&&(yield J3(p,A)),yield iX(p,A),W("Cache restored successfully"),M.matchedKey}catch(l){let A=l;if(A.name===_o.name)throw l;A instanceof Da&&typeof A.statusCode=="number"&&A.statusCode>=500?lb(`Failed to restore: ${l.message}`):g0(`Failed to restore: ${l.message}`)}finally{try{p&&(yield NO(p))}catch(l){F(`Failed to delete archive: ${l}`)}}})}function uX(t,e,r){return MM(this,arguments,void 0,function*(s,n,i,o=!1){let a=T3();return F(`Cache service version: ${a}`),X3e(s),aX(n),a==="v2"?yield sE0(s,n,i,o):yield rE0(s,n,i,o)})}function rE0(t,e,r){return MM(this,arguments,void 0,function*(s,n,i,o=!1){var a,c,u,p,l;let A=yield vO(),h=-1,M=yield AP(s);if(F("Cache Paths:"),F(`${JSON.stringify(M)}`),M.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let g=yield SO(),y=K3.join(g,Fl(A));F(`Archive Path: ${y}`);try{yield oX(g,M,A),Cu()&&(yield J3(y,A));let O=10*1024*1024*1024,B=Ba(y);if(F(`File Size: ${B}`),B>O&&!UG())throw new Error(`Cache size of ~${Math.round(B/(1024*1024))} MB (${B} B) is over the 10GB limit, not saving cache.`);F("Reserving Cache");let I=yield jOe(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 bM(`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}`);F(`Saving Cache (ID: ${h})`),yield XG(h,y,"",i)}catch(O){let B=O;if(B.name===_o.name)throw O;B.name===bM.name
Line truncated
|
||||
`+s(i)+n(i),c=(0,zge.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");i.headers.set(_e.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}o(e,"signRequest");function r(i,a){let c=i.headers.get(a);return!c||a===_e.CONTENT_LENGTH&&c==="0"?"":c}o(r,"getHeaderValueToSign");function s(i){let a=[];for(let[u,p]of i.headers)u.toLowerCase().startsWith(_e.PREFIX_FOR_STORAGE)&&a.push({name:u,value:p});a.sort((u,p)=>c5(u.name.toLowerCase(),p.name.toLowerCase())),a=a.filter((u,p,l)=>!(p>0&&u.name.toLowerCase()===l[p-1].name.toLowerCase()));let c="";return a.forEach(u=>{c+=`${u.name.toLowerCase().trimRight()}:${u.value.trimLeft()}
|
||||
`}),c}o(s,"getCanonicalizedHeadersString");function n(i){let a=i5(i.url)||"/",c="";c+=`/${t.accountName}${a}`;let u=o5(i.url),p={};if(u){let l=[];for(let A in u)if(Object.prototype.hasOwnProperty.call(u,A)){let d=A.toLowerCase();p[d]=u[A],l.push(d)}l.sort();for(let A of l)c+=`
|
||||
${A}:${decodeURIComponent(p[A])}`}return c}return o(n,"getCanonicalizedResourceString"),{name:aM0,async sendRequest(i,a){return e(i),a(i)}}}o(Yk,"storageSharedKeyCredentialPolicy");var cM0="storageRequestFailureDetailsParserPolicy";function Oge(){return{name:cM0,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
|
||||
`),r}}}}o(Oge,"storageRequestFailureDetailsParserPolicy");var Ege=require("node:crypto");var u5=class{static{o(this,"UserDelegationKeyCredential")}accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,Ege.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var p5="12.31.0",l5="2026-02-06";var A5="https://storage.azure.com/.default",Tu={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var So="",Jk="*",uM0=1*1024*1024;var pM0=4*uM0;var yge="AES256",Cge="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Bge=["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"],Dge=["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"],qge="BlobUsesCustomerSpecifiedEncryption",Ige="BlobDoesNotUseCustomerSpecifiedEncryption",Rge=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function xu(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}o(xu,"isPipelineLike");var A3=class{static{o(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function Yt(t,e={}){t||(t=new dt);let r=new A3([],e);return r._credential=t,r}o(Yt,"newPipeline");function lM0(t){let e=[AM0,wge,dM0,fM0,hM0,bM0,mM0];if(t.factories.length){let r=t.factories.filter(s=>!e.some(n=>n(s)));if(r.length){let s=r.some(n=>MM0(n));return{wrappedPolicies:Dk(r),afterRetry:s}}}}o(lM0,"processDownlevelPipeline");function Kk(t){let{httpClient:e,...r}=t.options,s=t._coreHttpClient;s||(s=e?qk(e):$k(),t._coreHttpClient=s);let n=t._corePipeline;if(!n){let i=`azsdk-js-azure-storage-blob/${p5}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;n=jO({...r,loggingOptions:{additionalAllowedHeaderNames:Bge,additionalAllowedQueryParameters:Dge,logger:ZI.info},userAgentOptions:{userAgentPrefix:a},serializationOptions:{stringifyXML:KI,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:Vk,serializerOptions:{xml:{xmlCharKey:"#"}}}}),n.removePolicy({phase:"Retry"}),n.removePolicy({name:rk}),n.addPolicy(mge()),n.addPolicy(gge(r.retryOptions),{phase:"R
Line truncated
|
||||
`),i=e.computeHMACSHA256(n);return{sasQueryParameters:new xo(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}}o(lg0,"generateBlobSASQueryParameters20150405");function Ag0(t,e){if(t=a2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",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=Za.parse(t.permissions.toString()).toString():n=ec.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?To(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(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new xo(t.version,a,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(Ag0,"generateBlobSASQueryParameters20181109");function dg0(t,e){if(t=a2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",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=Za.parse(t.permissions.toString()).toString():n=ec.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?To(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(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new xo(t.version,a,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}}o(dg0,"generateBlobSASQueryParameters20201206");function fg0(t,e){if(t=a2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",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=Za.parse(t.permissions.toString()).toString():n=ec.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new xo(t.version,a,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}}o(fg0,"generateBlobSASQueryParametersUDK20181109");function hg0(t,e){if(t=a2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",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=Za.parse(t.permissions.toString()).toString():n=ec.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new xo(t.version,a,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}}o(hg0,"generateBlobSASQueryParametersUDK20200210");function bg0(t,e){if(t=a2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",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=Za.parse(t.permissions.toString()).toString():n=ec.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new xo(t.version,a,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}}o(bg0,"generateBlobSASQueryParametersUDK20201206");function Mg0(t,e){if(t=a2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",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=Za.parse(t.permissions.toString()).toString():n=ec.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",o2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new xo(t.version,a,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}}o(Mg0,"generateBlobSASQueryParametersUDK20250705");function o2(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}o(o2,"getCanonicalName");function a2(t){let e=t.version?t.version:l5;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(a2,"SASSignatureValuesSanityCheckAndAutofill");var C3=class{static{o(this,"BlobLeaseClient")}_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=vb()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==So||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==So||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 ge.withSpan("BlobLeaseClient-acquireLease",r,async s=>Ce(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!==So||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==So||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 ge.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=Ce(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!==So||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==So||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 ge.withSpan("BlobLeaseClient-releaseLease",e,async r=>Ce(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!==So||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==So||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"}};Zb.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var l2=class extends Error{static{o(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};l2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var F3=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var qz0=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})},kG=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),s=Date.now()-this.startTime,n=(e/(1024*1024)/(s/1e3)).toFixed(1);_(`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=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function vOe(t,e,r){return qz0(this,void 0,void 0,function*(){var s;let n=new Uu(t),i=n.getBlockBlobClient(),a=new kG((s=r?.archiveSizeBytes)!==null&&s!==void 0?s:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),T(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let u=yield i.uploadFile(e,c);if(u._response.status>=400)throw new bR(`uploadCacheArchiveSDK: upload failed with status code ${u._response.status}`);return u}catch(u){throw z0(`uploadCacheArchiveSDK: internal error uploading cache archive: ${u.message}`),u}finally{a.stopDisplayTimer()}})}o(vOe,"uploadCacheArchiveSDK");var TOe=x(require("buffer"),1),tc=x(require("fs"),1),xOe=x(require("stream"),1),WOe=x(require("util"),1);var MR=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})};function mR(t){return t?t>=200&&t<300:!1}o(mR,"isSuccessStatusCode");function Iz0(t){return t?t>=500:!0}o(Iz0,"isServerErrorStatusCode");function Rz0(t){return t?[qt.BadGateway,qt.ServiceUnavailable,qt.GatewayTimeout].includes(t):!1}o(Rz0,"isRetryableStatusCode");function wz0(t){return MR(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(wz0,"sleep");function FOe(t,e,r){return MR(this,arguments,void 0,function*(s,n,i,a=Uq,c=Gq,u=void 0){let p="",l=1;for(;l<=a;){let A,d,b=!1;try{A=yield n()}catch(m){u&&(A=u(m)),b=!0,p=m.message}if(A&&(d=i(A),!Iz0(d)))return A;if(d&&(b=Rz0(d),p=`Cache service responded with ${d}`),T(`${s} - Attempt ${l} of ${a} failed with error: ${p}`),!b){T(`${s} - Error is not retryable`);break}yield wz0(c),l++}throw Error(`${s} failed: ${p}`)})}o(FOe,"retry");function T3(t,e){return MR(this,arguments,void 0,function*(r,s,n=Uq,i=Gq){return yield FOe(r,s,a=>a.statusCode,n,i,a=>{if(a instanceof qa)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(T3,"retryTypedResponse");function eM(t,e){return MR(this,arguments,void 0,function*(r,s,n=Uq,i=Gq){return yield FOe(r,s,a=>a.message.statusCode,n,i)})}o(eM,"retryHttpClientResponse");var Ni=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})};function Sz0(t,e){return Ni(this,void 0,void 0,function*(){yield WOe.promisify(xOe.pipeline)(t.message,e)})}o(Sz0,"pipeResponseToStream");var gR=class{static{o(this,"DownloadProgress")}constructor(e){this.contentLength=e,this.segmentIndex=0,this.segmentSize=0,this.segmentOffset=0,this.receivedBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize,this.segmentIndex=this.segmentIndex+1,this.segmentSize=e,this.receivedBytes=0,T(`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||[])T(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}o(_z0,"printCachesListForDiagnostics");function XG(t,e,r){return Xs(this,void 0,void 0,function*(){let s=new VOe.URL(t),n=POe(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield LOe(t,e,n):n.concurrentBlobDownloads?yield _Oe(t,e,n):yield zR(t,e):yield zR(t,e)})}o(XG,"downloadCache");function $Oe(t,e,r){return Xs(this,void 0,void 0,function*(){let s=HG(),n=Cb(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield T3("reserveCache",()=>Xs(this,void 0,void 0,function*(){return s.postJson(W3("caches"),i)}))})}o($Oe,"reserveCache");function XOe(t,e){return`bytes ${t}-${e}/*`}o(XOe,"getContentRange");function Lz0(t,e,r,s,n){return Xs(this,void 0,void 0,function*(){T(`Uploading chunk of size ${n-s+1} bytes at offset ${s} with content range: ${XOe(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":XOe(s,n)},a=yield eM(`uploadChunk (start: ${s}, end: ${n})`,()=>Xs(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!mR(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}o(Lz0,"uploadChunk");function Qz0(t,e,r,s){return Xs(this,void 0,void 0,function*(){let n=Da(r),i=W3(`caches/${e.toString()}`),a=tM.openSync(r,"r"),c=UG(s),u=fP("uploadConcurrency",c.uploadConcurrency),p=fP("uploadChunkSize",c.uploadChunkSize),l=[...new Array(u).keys()];T("Awaiting all uploads");let A=0;try{yield Promise.all(l.map(()=>Xs(this,void 0,void 0,function*(){for(;A<n;){let d=Math.min(n-A,p),b=A,m=A+d-1;A+=p,yield Lz0(t,i,()=>tM.createReadStream(r,{fd:a,start:b,end:m,autoClose:!1}).on("error",z=>{throw new Error(`Cache upload failed because file read failed with ${z.message}`)}),b,m)}})))}finally{tM.closeSync(a)}})}o(Qz0,"uploadFile");function Pz0(t,e,r){return Xs(this,void 0,void 0,function*(){let s={size:r};return yield T3("commitCache",()=>Xs(this,void 0,void 0,function*(){return t.postJson(W3(`caches/${e.toString()}`),s)}))})}o(Pz0,"commitCache");function VG(t,e,r,s){return Xs(this,void 0,void 0,function*(){if(UG(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield vOe(r,e,s)}else{let i=HG();T("Upload cache"),yield Qz0(i,t,e,s),T("Commiting cache");let a=Da(e);_(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield Pz0(i,t,a);if(!mR(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);_("Cache saved successfully")}})}o(VG,"saveCache");var U3e=x(x3e(),1),Zt=x(Kt(),1),kn=x(Kt(),1),b2=x(Kt(),1),M2=x(Kt(),1),m2=x(Kt(),1);var PH=x(Kt(),1),kH=x(Kt(),1),Q3e=x(Kt(),1),P3e=x(Kt(),1),k3e=x(Kt(),1);var _H=x(Kt(),1),LH=x(Kt(),1),W3e=x(Kt(),1),_3e=x(Kt(),1),L3e=x(Kt(),1);var QH=class extends L3e.MessageType{static{o(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,_3e.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,W3e.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??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=s.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let l=e.skip(u);p!==!1&&(p===!0?LH.UnknownFieldHandler.onRead:p)(this.typeName,i,c,u,l)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,_H.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,_H.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?LH.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},aw=new QH;var UH=class extends k3e.MessageType{static{o(this,"CacheMetadata$Type")}constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:o(()=>aw,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,P3e.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Q3e.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??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(aw.internalBinaryRead(e,e.uint32(),s));break;default:let p=s.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let l=e.skip(u);p!==!1&&(p===!0?kH.UnknownFieldHandler.onRead:p)(this.typeName,i,c,u,l)}}return i}internalBinaryWrite(e,r,s){e.repositoryId!==
Line truncated
|
||||
`));let s=yield nX(r,"create");yield iX(s,t)})}o(aX,"createTar");var mM=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})},Lo=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},MM=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},lw=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function V3e(t){if(!t||t.length===0)throw new Lo("Path Validation Error: At least one directory or file path is required")}o(V3e,"checkPaths");function cX(t){if(t.length>512)throw new Lo(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Lo(`Key Validation Error: ${t} cannot contain commas.`)}o(cX,"checkKey");function uX(){return x3()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(uX,"isFeatureAvailable");function j3e(t,e,r,s){return mM(this,arguments,void 0,function*(n,i,a,c,u=!1){let p=x3();return T(`Cache service version: ${p}`),V3e(n),p==="v2"?yield rE0(n,i,a,c,u):yield tE0(n,i,a,c,u)})}o(j3e,"restoreCache");function tE0(t,e,r,s){return mM(this,arguments,void 0,function*(n,i,a,c,u=!1){a=a||[];let p=[i,...a];if(T("Resolved Keys:"),T(JSON.stringify(p)),p.length>10)throw new Lo("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of p)cX(d);let l=yield FO(),A="";try{let d=yield jOe(p,n,{compressionMethod:l,enableCrossOsArchive:u});if(!d?.archiveLocation)return;if(c?.lookupOnly)return _("Lookup only - skipping download"),d.cacheKey;A=Z3.join(yield NO(),Tl(l)),T(`Archive Path: ${A}`),yield XG(d.archiveLocation,A,c),Bu()&&(yield K3(A,l));let b=Da(A);return _(`Cache Size: ~${Math.round(b/(1024*1024))} MB (${b} B)`),yield oX(A,l),_("Cache restored successfully"),d.cacheKey}catch(d){let b=d;if(b.name===Lo.name)throw d;b instanceof qa&&typeof b.statusCode=="number"&&b.statusCode>=500?Ab(`Failed to restore: ${d.message}`):z0(`Failed to restore: ${d.message}`)}finally{try{yield vO(A)}catch(d){T(`Failed to delete archive: ${d}`)}}})}o(tE0,"restoreCacheV1");function rE0(t,e,r,s){return mM(this,arguments,void 0,function*(n,i,a,c,u=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let p=[i,...a];if(T("Resolved Keys:"),T(JSON.stringify(p)),p.length>10)throw new Lo("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of p)cX(A);let l="";try{let A=sX(),d=yield FO(),b={key:i,restoreKeys:a,version:Cb(n,d,u)},m=yield A.GetCacheEntryDownloadURL(b);if(!m.ok){T(`Cache not found for version ${b.version} of keys: ${p.join(", ")}`);return}if(b.key!==m.matchedKey?_(`Cache hit for restore-key: ${m.matchedKey}`):_(`Cache hit for: ${m.matchedKey}`),c?.lookupOnly)return _("Lookup only - skipping download"),m.matchedKey;l=Z3.join(yield NO(),Tl(d)),T(`Archive path: ${l}`),T(`Starting download of archive to: ${l}`),yield XG(m.signedDownloadUrl,l,c);let C=Da(l);return _(`Cache Size: ~${Math.round(C/(1024*1024))} MB (${C} B)`),Bu()&&(yield K3(l,d)),yield oX(l,d),_("Cache restored successfully"),m.matchedKey}catch(A){let d=A;if(d.name===Lo.name)throw A;d instanceof qa&&typeof d.statusCode=="number"&&d.statusCode>=500?Ab(`Failed to restore: ${A.message}`):z0(`Failed to restore: ${A.message}`)}finally{try{l&&(yield vO(l))}catch(A){T(`Failed to delete archive: ${A}`)}}})}o(rE0,"restoreCacheV2");function pX(t,e,r){return mM(this,arguments,void 0,function*(s,n,i,a=!1){let c=x3();return T(`Cache service version: ${c}`),V3e(s),cX(n),c==="v2"?yield nE0(s,n,i,a):yield sE0(s,n,i,a)})}o(pX,"saveCache");function sE0(t,e,r){return mM(this,arguments,void 0,function*(s,n,i,a=!1){var c,u,p,l,A;let d=yield FO(),b=-1,m=yield dP(s);if(T("Cache Paths:"),T(`${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 z=yield NO(),C=Z3.join(z,Tl(d));T(`Archive Path: ${C}`);try{yield aX(z,m,d),Bu()&&(yield K3(C,d));let E=10*1024*1024*1024,D=Da(C);if(T(`File Size: ${D}`),D>E&&!GG())throw new Error(`Cache size of ~${Math.round(D/(1024*1024))} MB (${D} B) is over the 10GB limit, not saving cache.`);T("Reserving Cache");let R=yield $Oe(n,s,{compressionMethod:d,enableCrossOsArchive:a,cacheSize:D});if(!((c=R?.result)===null||c===void 0)&&c.cacheId)b=(u=R?.result)===null||u===void 0?void 0:u.cacheId;else throw R?.statusCode===400?new Error((l=(p=R?.error)===null||p===void 0?void 0:p.message)!==null&&l!==void 0?l:`Cache size of ~${Math.round(D/(1024*Line truncated
|
||||
`+t.errors.map(e=>` - ${e.message}`).join(`
|
||||
`)}var KE0=class extends Error{constructor(t,e,r){super(JE0(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},ZE0=["method","baseUrl","url","headers","request","query","mediaType","operationName"],ey0=["query","method","url"],FEe=/\/api\/v3\/?$/;function ty0(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(ey0.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)=>ZE0.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 FEe.test(i)&&(n.url=i.replace(FEe,"/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 KE0(n,a,o.data)}return o.data.data})}function EX(t,e){let r=t.defaults(e);return Object.assign((n,i)=>ty0(r,n,i),{defaults:EX.bind(null,r),endpoint:r.endpoint})}var WBt=EX(rE,{headers:{"user-agent":`octokit-graphql.js/${YE0} ${Kl()}`},method:"POST",url:"/graphql"});function TEe(t){return EX(t,{method:"POST",url:"/graphql"})}var yX="(?:[a-zA-Z0-9_-]+)",xEe="\\.",WEe=new RegExp(`^${yX}${xEe}${yX}${xEe}${yX}$`),ry0=WEe.test.bind(WEe);async function sy0(t){let e=ry0(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 ny0(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function iy0(t,e,r,s){let n=e.endpoint.merge(r,s);return n.headers.authorization=ny0(t),e(n)}var _Ee=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(sy0.bind(null,e),{hook:iy0.bind(null,e)})};var CX="7.0.6";var LEe=()=>{},oy0=console.warn.bind(console),ay0=console.error.bind(console);function cy0(t={}){return typeof t.debug!="function"&&(t.debug=LEe),typeof t.info!="function"&&(t.info=LEe),typeof t.warn!="function"&&(t.warn=oy0),typeof t.error!="function"&&(t.error=ay0),t}var QEe=`octokit-core.js/${CX} ${Kl()}`,Ew=class{static VERSION=CX;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 dEe.Collection,s={baseUrl:rE.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} ${QEe}`:QEe,e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=rE.defaults(s),this.graphql=TEe(this.request).defaults(s),this.log=cy0(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=_Ee(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 BX="17.0.0";var uy0={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:x}=this.options,{bomSkipped:L,previousBuf:j,rawBuffer:fe,escapeIsQuote:Ie}=this.state,K;if(j===void 0)if(s===void 0){o();return}else K=s;else j!==void 0&&s===void 0?K=j:K=Buffer.concat([j,s]);if(L===!1)if(a===!1)this.state.bomSkipped=!0;else if(K.length<3){if(n===!1){this.state.previousBuf=K;return}}else{for(let qe in vM)if(vM[qe].compare(K,0,vM[qe].length)===0){let _e=vM[qe].length;this.state.bufBytesStart+=_e,K=K.slice(_e);let M0=WV({...this.original_options,encoding:qe});for(let p0 in M0)this.options[p0]=M0[p0];({comment:I,escape:R,quote:N}=this.options);break}this.state.bomSkipped=!0}let Be=K.length,Y;for(Y=0;Y<Be&&!this.__needMoreData(Y,Be,n);Y++){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&&x.length===0&&this.__autoDiscoverRecordDelimiter(K,Y)&&(x=this.options.record_delimiter);let qe=K[Y];if(h===!0&&fe.append(qe),(qe===kB0||qe===UB0)&&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(K,Y,qe)&&Y+R.length<Be)if(Ie){if(this.__isQuote(K,Y+R.length)){this.state.escaping=!0,Y+=R.length-1;continue}}else{this.state.escaping=!0,Y+=R.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(K,Y))if(this.state.quoting===!0){let p0=K[Y+N.length],F0=g&&this.__isCharTrimable(K,Y+N.length),gt=I!==null&&this.__compareBytes(I,K,Y+N.length,p0),P0=this.__isDelimiter(K,Y+N.length,p0),nr=x.length===0?this.__autoDiscoverRecordDelimiter(K,Y+N.length):this.__isRecordDelimiter(p0,K,Y+N.length);if(R!==null&&this.__isEscape(K,Y,qe)&&this.__isQuote(K,Y+R.length))Y+=R.length-1;else if(!p0||P0||nr||gt||F0){this.state.quoting=!1,this.state.wasQuoting=!0,Y+=N.length-1;continue}else if(M===!1){let Pt=this.__error(new b0("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(p0)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Pt!==void 0)return Pt}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(N),Y+=N.length-1}else if(this.state.field.length!==0){if(M===!1){let p0=this.__infoField(),F0=Object.keys(vM).map(P0=>vM[P0].equals(this.state.field.toString())?P0:!1).filter(Boolean)[0],gt=this.__error(new b0("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(p0.column)} at line ${p0.lines}, value is ${JSON.stringify(this.state.field.toString(u))}`,F0?`(${F0} bom)`:void 0],this.options,p0,{field:this.state.field}));if(gt!==void 0)return gt}}else{this.state.quoting=!0,Y+=N.length-1;continue}if(this.state.quoting===!1){let p0=this.__isRecordDelimiter(qe,K,Y);if(p0!==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(),Y+=p0-1;continue}if(y===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,Y+=p0-1;continue}this.info.bytes=this.state.bufBytesStart+Y;let P0=this.__onField();if(P0!==void 0)return P0;this.info.bytes=this.state.bufBytesStart+Y+p0;let nr=this.__onRecord(i);if(nr!==void 0)return nr;if(O!==-1&&this.info.records>=O){this.state.stop=!0,o();return}}this.state.commenting=!1,Y+=p0-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,K,Y,qe)!==0){this.state.commenting=!0;continue}let F0=this.__isDelimiter(K,Y,qe);if(F0!==0){this.info.bytes=this.state.bufBytesStart+Y;let gt=this.__onField();if(gt!==void 0)return gt;Y+=F0-1;continue}}}if(this.state.commenting===!1&&A!==0&&this.state.record_length+this.state.field.length>A)return this.__error(new b0("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 _e=l===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(K,Y),M0=g===!1||this.state.wasQuoting===!1;if(_e===!0&&M0===!0)this.state.field.append(qe);else{if(g===!0&&!this.__isCharTrimable(K,Y))return this.__error(new b0("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()));_e===!1&&(Y+=this.__isCharTrimable(K,Y)-1);continue}}if(n===!0)if(t
Line truncated
|
||||
`)}o(KE0,"_buildMessageForResponseErrors");var ZE0=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(KE0(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},ey0=["method","baseUrl","url","headers","request","query","mediaType","operationName"],ty0=["query","method","url"],TEe=/\/api\/v3\/?$/;function ry0(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(ty0.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let s=typeof e=="string"?Object.assign({query:e},r):e,n=Object.keys(s).reduce((a,c)=>ey0.includes(c)?(a[c]=s[c],a):(a.variables||(a.variables={}),a.variables[c]=s[c],a),{}),i=s.baseUrl||t.endpoint.DEFAULTS.baseUrl;return TEe.test(i)&&(n.url=i.replace(TEe,"/api/graphql")),t(n).then(a=>{if(a.data.errors){let c={};for(let u of Object.keys(a.headers))c[u]=a.headers[u];throw new ZE0(n,c,a.data)}return a.data.data})}o(ry0,"graphql");function yX(t,e){let r=t.defaults(e);return Object.assign(o((n,i)=>ry0(r,n,i),"newApi"),{defaults:yX.bind(null,r),endpoint:r.endpoint})}o(yX,"withDefaults");var cvt=yX(sE,{headers:{"user-agent":`octokit-graphql.js/${JE0} ${Zl()}`},method:"POST",url:"/graphql"});function xEe(t){return yX(t,{method:"POST",url:"/graphql"})}o(xEe,"withCustomRequest");var CX="(?:[a-zA-Z0-9_-]+)",WEe="\\.",_Ee=new RegExp(`^${CX}${WEe}${CX}${WEe}${CX}$`),sy0=_Ee.test.bind(_Ee);async function ny0(t){let e=sy0(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"}}o(ny0,"auth");function iy0(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}o(iy0,"withAuthorizationPrefix");async function oy0(t,e,r,s){let n=e.endpoint.merge(r,s);return n.headers.authorization=iy0(t),e(n)}o(oy0,"hook");var LEe=o(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(ny0.bind(null,e),{hook:oy0.bind(null,e)})},"createTokenAuth2");var BX="7.0.6";var QEe=o(()=>{},"noop"),ay0=console.warn.bind(console),cy0=console.error.bind(console);function uy0(t={}){return typeof t.debug!="function"&&(t.debug=QEe),typeof t.info!="function"&&(t.info=QEe),typeof t.warn!="function"&&(t.warn=ay0),typeof t.error!="function"&&(t.error=cy0),t}o(uy0,"createLogger");var PEe=`octokit-core.js/${BX} ${Zl()}`,Cw=class{static{o(this,"Octokit")}static VERSION=BX;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}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{o(this,"NewOctokit")}static plugins=r.concat(e.filter(n=>!r.includes(n)))}}constructor(e={}){let r=new fEe.Collection,s={baseUrl:sE.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} ${PEe}`:PEe,e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=sE.defaults(s),this.graphql=xEe(this.request).defaults(s),this.log=uy0(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=LEe(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 DX="17.0.0";var py0={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:A,p?(c===null?0:c.length)+u.length:0,p?u.length+A:0);return d<b},"__needMoreData"),parse:o(function(s,n,i,a){let{bom:c,comment_no_infix:u,encoding:p,from_line:l,ltrim:A,max_record_size:d,raw:b,relax_quotes:m,rtrim:z,skip_empty_lines:C,to:E,to_line:D}=this.options,{comment:R,escape:w,quote:v,record_delimiter:W}=this.options,{bomSkipped:Q,previousBuf:$,rawBuffer:he,escapeIsQuote:Re}=this.state,Z;if($===void 0)if(s===void 0){a();return}else Z=s;else $!==void 0&&s===void 0?Z=$:Z=Buffer.concat([$,s]);if(Q===!1)if(c===!1)this.state.bomSkipped=!0;else if(Z.length<3){if(n===!1){this.state.previousBuf=Z;return}}else{for(let Ie in FM)if(FM[Ie].compare(Z,0,FM[Ie].length)===0){let Le=FM[Ie].length;this.state.bufBytesStart+=Le,Z=Z.slice(Le);let m0=_V({...this.original_options,encoding:Ie});for(let l0 in m0)this.options[l0]=m0[l0];({comment:R,escape:w,quote:v}=this.options);break}this.state.bomSkipped=!0}let De=Z.length,J;for(J=0;J<De&&!this.__needMoreData(J,De,n);J++){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&&W.length===0&&this.__autoDiscoverRecordDelimiter(Z,J)&&(W=this.options.record_delimiter);let Ie=Z[J];if(b===!0&&he.append(Ie),(Ie===UB0||Ie===GB0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(w!==null&&this.state.quoting===!0&&this.__isEscape(Z,J,Ie)&&J+w.length<De)if(Re){if(this.__isQuote(Z,J+w.length)){this.state.escaping=!0,J+=w.length-1;continue}}else{this.state.escaping=!0,J+=w.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(Z,J))if(this.state.quoting===!0){let l0=Z[J+v.length],T0=z&&this.__isCharTrimable(Z,J+v.length),zt=R!==null&&this.__compareBytes(R,Z,J+v.length,l0),k0=this.__isDelimiter(Z,J+v.length,l0),ir=W.length===0?this.__autoDiscoverRecordDelimiter(Z,J+v.length):this.__isRecordDelimiter(l0,Z,J+v.length);if(w!==null&&this.__isEscape(Z,J,Ie)&&this.__isQuote(Z,J+w.length))J+=w.length-1;else if(!l0||k0||ir||zt||T0){this.state.quoting=!1,this.state.wasQuoting=!0,J+=v.length-1;continue}else if(m===!1){let kt=this.__error(new M0("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(l0)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(kt!==void 0)return kt}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(v),J+=v.length-1}else if(this.state.field.length!==0){if(m===!1){let l0=this.__infoField(),T0=Object.keys(FM).map(k0=>FM[k0].equals(this.state.field.toString())?k0:!1).filter(Boolean)[0],zt=this.__error(new M0("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(l0.column)} at line ${l0.lines}, value is ${JSON.stringify(this.state.field.toString(p))}`,T0?`(${T0} bom)`:void 0],this.options,l0,{field:this.state.field}));if(zt!==void 0)return zt}}else{this.state.quoting=!0,J+=v.length-1;continue}if(this.state.quoting===!1){let l0=this.__isRecordDelimiter(Ie,Z,J);if(l0!==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(),J+=l0-1;continue}if(C===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,J+=l0-1;continue}this.info.bytes=this.state.bufBytesStart+J;let k0=this.__onField();if(k0!==void 0)return k0;this.info.bytes=this.state.bufBytesStart+J+l0;let ir=this.__onRecord(i);if(ir!==void 0)return ir;if(E!==-1&&this.info.records>=E){this.state.stop=!0,a();return}}this.state.commenting=!1,J+=l0-1;continue}if(this.state.commenting)continue;if(R!==null&&(u===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(R,Z,J,Ie)!==0){this.state.commenting=!0;continue}let T0=this.__isDelimiter(Z,J,Ie);if(T0!==0){this.info.bytes=this.state.bufBytesStart+J;let zt=this.__onField();if(zt!==void 0)return zt;J+=T0-1;continue}}}if(this.state.commenting===!1&&d!==0&&this.state.record_length+this.state.field.length>d)return this.__error(new M0("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${d}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let Le=A===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(Z,J),m0=z===!1||this.state.wasQuoting===!1;if(Le===!0&&m0===!0)this.state.field.append(Ie);else{if(z===!0&&!this.__isCharTrimable(Z,J))return this.__error(new M0("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()));Le===!1&&(J+=this.__isCharTrimable(Z,J)-1);cont
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 d1=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?{}:[],s=u4e(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 O0=class t{static getInputList(e,r){return this.getList(qn(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let s=[];if(e=="")return s;let n=d1(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=qn(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 ar("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 p4e.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 _V.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 _V.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,s){return l4e.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=gE.default.resolve(e);return gE.default.resolve(r).startsWith(s.endsWith(gE.default.sep)?s:`${s}${gE.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 Dr=class t{static get configDir(){return process.env.DOCKER_CONFIG||zE.default.join(A4e.default.homedir(),".docker")}static configFile(){let e=zE.default.join(t.configDir,"config.json");if(LV.default.existsSync(e))return JSON.parse(LV.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await ar("docker",!0).then(e=>(F(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(F(`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 ve.exec("docker",e,t.execOptions(r))}static async getExecOutput(e,r){return ve.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||F(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${u}: ${l}`)}return a}};var I2=T(require("fs"),1),QV=T(require("path"),1);var dS=class t{buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new Y0,this.iidFilename=`build-iidfile-${O0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${O0.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=O0.parseBoolOrDefault(s["fetch-by-commit"]),o=e?.ref||s.ref||as.ref;o.startsWith("refs/")?o.startsWith("refs/pull/")&&O0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(o=o.replace(/\/merge$/g,"/head")):o=`refs/heads/${o}`;let a=`${z0.serverURL}/${as.repo.owner}/${as.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(O0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(p="query")}catch{}}let l=as.sha||o;o.startsWith("refs/pull/")&&o.endsWith("/head")&&(l=typeof as.payload.pull_request?.head?.sha=="string"?as.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 QV.default.join(h0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(I2.default.existsSync(e))return I2.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return QV.default.join(h0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!I2.default.existsSync(e))return;let r=I2.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(!I2.default.existsSync(n))throw new Error(`secret file ${n} not found`);return[s,n]}let i=h0.tmpName({tmpdir:h0.tmpDir()});return I2.default.writeFileSync(i,n),[s,i]}static getProvenanceInput(e){let r=qn(e);if(!r)return r;try{return WAe(e)?`builder-id=${z0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${z0.workflowRunURL(!0)}`;let r=d1(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=${z0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let s="registry",n="",i="",o=d1(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=${z0.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=d1(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=d1(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=d1(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let n of r)for(let i of n)try{let o=O0.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&&ga(i),[n,i]}};var PV=T(require("fs"),1),f4e=T(require("path"),1);var fS=class t{buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new Y0,this.metadataFilename=`bake-metadata-${O0.generateRandomString()}.json`}getMetadataFilePath(){return f4e.default.join(h0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!PV.default.existsSync(e))return;let r=PV.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(!O0.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 ve.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=d1(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=O0.parseBool(o);break;default:r[i]=o}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=d1(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=d1(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=d1(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"]);F(`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 ve.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(`
|
||||
`,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]!==s[n+p])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:o(function(s){let{encoding:n,raw:i,skip_records_with_error:a}=this.options,c=typeof s=="string"?new Error(s):s;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,i?this.state.rawBuffer.toString(n):void 0)}catch(u){return u}return}else return c},"__error"),__infoDataSet:o(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:o(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}},"__infoRecord"),__infoField:o(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}},"__infoField")}},"transform");var f1=o(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?{}:[],s=p4e(e),n=o(c=>{s.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),i=o(()=>{},"close"),a=s.parse(t,!0,n,i);if(a!==void 0)throw a;return r},"parse");var E0=class t{static{o(this,"Util")}static getInputList(e,r){return this.getList(In(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let s=[];if(e=="")return s;let n=f1(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=In(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 cr("powershell",!0),n=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=[];if(r)for(let a in r)i.push(`-${a} '${r[a].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 l4e.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 LV.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 LV.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,s){return A4e.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=zE.default.resolve(e);return zE.default.resolve(r).startsWith(s.endsWith(zE.default.sep)?s:`${s}${zE.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,a=[];return s&&a.push(`${s}h`),n&&a.push(`${n}m`),(i||a.length===0)&&a.push(`${i}s`),a.join("")}};var qr=class t{static{o(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||OE.default.join(d4e.default.homedir(),".docker")}static configFile(){let e=OE.default.join(t.configDir,"config.json");if(QV.default.existsSync(e))return JSON.parse(QV.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await cr("docker",!0).then(e=>(T(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(T(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0}catch{return!1}}st
Line truncated
|
||||
More info: ${u.url}`);let b=u.range&&u.range.length>0?u.range[0]?.start.line:void 0,m=!1;for(let z of a)if(z.remote||z.path.endsWith(p)&&z.content===l){c.push({title:A,message:d,file:z.path,startLine:b}),m=!0;break}m||T(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${p}: ${A}`)}return c}};var R2=x(require("fs"),1),PV=x(require("path"),1);var hS=class t{static{o(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new J0,this.iidFilename=`build-iidfile-${E0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${E0.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),s=e?.attrs||{},n=Object.entries(s).filter(([b])=>!r.has(b)),i=E0.parseBoolOrDefault(s["fetch-by-commit"]),a=e?.ref||s.ref||cs.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&E0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${O0.serverURL}/${cs.repo.owner}/${cs.repo.repo}.git`,u=e?.checksum||s.checksum,p=e?.subdir||s.subdir,l=e?.format;if(!l){if(l="fragment",n.length>0)l="query";else if(E0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(l="query")}catch{}}let A=cs.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(A=typeof cs.payload.pull_request?.head?.sha=="string"?cs.payload.pull_request.head.sha:a);let d=u||A;if(l==="query"){let b=[`ref=${i||u?a:d}`],m=i?d:u;m&&b.push(`checksum=${m}`),p&&p!=="."&&b.push(`subdir=${p}`);for(let[z,C]of n)b.push(`${z}=${C}`);return`${c}?${b.join("&")}`}return`${c}#${d}${p&&p!=="."?`:${p}`:""}`}getImageIDFilePath(){return PV.default.join(b0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(R2.default.existsSync(e))return R2.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return PV.default.join(b0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!R2.default.existsSync(e))return;let r=R2.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,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(!R2.default.existsSync(n))throw new Error(`secret file ${n} not found`);return[s,n]}let i=b0.tmpName({tmpdir:b0.tmpDir()});return R2.default.writeFileSync(i,n),[s,i]}static getProvenanceInput(e){let r=In(e);if(!r)return r;try{return _Ae(e)?`builder-id=${O0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${O0.workflowRunURL(!0)}`;let r=f1(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=${O0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let s="registry",n="",i="",a=f1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let u=c.toString().split(/(?<=^[^=]+?)=/).map(p=>p.trim());u[0]==="type"?s=u[1]:u[0]==="repository"?n=u[1]:u[0]==="ghtoken"&&(i=u[1])}return s==="gha"&&(n||(e=`${e},repository=${O0.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=f1(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,a]of n.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let s=f1(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s)for(let[i,a]of n.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=f1(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let n of r)for(let i of n)try{let a=E0.parseBool(i);s.push(`disabled=${!a}`)}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&&za(i),[n,i]}};var kV=x(require("fs"),1),h4e=x(require("path"),1);var bS=class t{static{o(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new J0,this.metadataFilename=`bake-metadata-${E0.generateRandomString()}.json`}getMetadataFilePath(){return h4e.default.join(b0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!kV.default.existsSync(e))return;let r=kV.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=[],a=[...e.files||[],e.source];if(a){for(let u of a.map(p=>p?p.trim():""))if(u.length!=0){if(!E0.isValidRef(u)){i.push(u);continue}if(n)throw new Error("Only one remote bake definition can be defined");n=u}}n&&s.push(n);for(let u of i)s.push("--file",u);if(e.overrides)for(let u of e.overrides)s.push("--set",u);if(e.vars)for(let u of e.vars)s.push("--var",u);if(e.allow)for(let u of e.allow)s.push("--allow",u);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 c=await this.buildx.getCommand([...s,"--print",...e.targets||[]]);return await Fe.getExecOutput(c.command,c.args,r).then(u=>{if(u.stderr.length>0&&u.exitCode!=0)throw new Error(`cannot parse bake definitions: ${u.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(u.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=f1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let[i,a]=n.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(i){case"type":r.type=a;break;case"disabled":r.disabled=E0.parseBool(a);break;default:r[i]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=f1(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,a]=n.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:""},s=f1(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,a]=n.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={},s=f1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0],n="";for(let i of s){let[a,c]=i.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());switch(a){case"type":n=c;break;case"id":r.id=c;break;case"source":case"src":r.src=c;break;case"env":r.env=c;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,
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"]);T(`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 a=n.match(/^[^/]+\/[^/]+, (.+)$/);if(a)return`refs/heads/${a[1].trim()}`;let c=n.match(/^[^/]+\/(.+)$/);if(c)return`refs/heads/${c[1].trim()}`;throw new Error(`Unsupported detached HEAD ref in "${e}"`)}static async exec(e=[]){return await Fe.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 Bxe=require("crypto"),Hc=T(require("fs"),1),kA=T(require("path"),1);var xC=T(EE(),1),Xc=T(fve(),1),Dxe=T(S0e(),1),gg=T(mxe(),1);var Nte=T(EE(),1);var zxe=T(Rn(),1);var gxe="application/vnd.oci.empty.v1+json";var Up=class{binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await ve.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(F(`Cosign.isAvailable cmd err: ${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(F(`Cosign.isAvailable error: ${r}`),!1));return F(`Cosign.isAvailable: ${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await ve.getExecOutput(this.binPath,["version","--json"],{ignoreReturnCode:!0,silent:!0}).then(e=>{if(e.stderr.length>0&&e.exitCode!=0)throw new Error(e.stderr.trim());return JSON.parse(e.stdout.trim()).gitVersion}),this._version)}async printVersion(){await ve.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let s=r??await this.version();if(!s)return F("Cosign.versionSatisfies false: undefined version"),!1;let n=zxe.satisfies(s,e)||/^[0-9a-f]{7}$/.exec(s)!==null;return F(`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===Nte.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===gxe&&typeof u.digest=="string"&&(s=u.digest)}if(!n&&c&&c.mediaType===Nte.BUNDLE_V03_MEDIA_TYPE&&(n=c),n&&(r||s)){i=void 0;break}}return{bundle:n,signatureManifestDigest:r||s,errors:i}}};var vte=T(require("fs"),1);var gT=class t{buildx;constructor(e){this.buildx=e?.buildx||new Y0}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=h0.tmpName({tmpdir:h0.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){W(`[command]${o.command} ${o.args.join(" ")}`),W("Skipped create command");return}return await ve.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(!vte.default.existsSync(s))return;let c=vte.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 ve.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 Oxe="application/vnd.in-toto+json";var Exe="https://fulcio.sigstore.dev",yxe="https://rekor.sigstore.dev",Cxe="https://timestamp.sigstore.dev",vf="https://search.sigstore.dev";var PH0="slsaprovenance1",UA=class t{cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Up,this.imageTools=e?.imageTools||new gT}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);W(`Using Sigstore signing endpoint: ${s.fulcioURL}`);let n=t.noTransparencyLog(e.noTransparencyLog),i=[];await this.cosign.versionSatisfies(">=3.0.4")?await cr("Creating Sigstore protobuf signing config",async()=>{let o=h0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:h0.tmpDir()}),a=["signing-config","create","--with-default-services=true",`--out=${o}`];n&&a.push("--no-default-rekor=true"),await ve.exec(this.cosign.binPath,a,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),W(JSON.stringify(JSON.parse(Hc.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 cr(`Signing attestation manifest ${u}`,async()=>{let p=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...i];W(`[command]${this.cosign.binPath} ${[...p,u].join(" ")}`);let l=await ve.getExecOutput(this.cosign.binPath,["--verbose",...p,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),A=Up.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(`
|
||||
`).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 Dxe=require("crypto"),Xc=x(require("fs"),1),UA=x(require("path"),1);var WC=x(yE(),1),Vc=x(hve(),1),qxe=x(N0e(),1),zg=x(gxe(),1);var vte=x(yE(),1);var Oxe=x(wn(),1);var zxe="application/vnd.oci.empty.v1+json";var Gp=class{static{o(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await Fe.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(T(`Cosign.isAvailable cmd err: ${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(T(`Cosign.isAvailable error: ${r}`),!1));return T(`Cosign.isAvailable: ${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Fe.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 Fe.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let s=r??await this.version();if(!s)return T("Cosign.versionSatisfies false: undefined version"),!1;let n=Oxe.satisfies(s,e)||/^[0-9a-f]{7}$/.exec(s)!==null;return T(`Cosign.versionSatisfies ${s} statisfies ${e}: ${n}`),n}static parseCommandOutput(e){let r,s,n,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===vte.BUNDLE_V03_MEDIA_TYPE&&typeof p.digest=="string"?r=p.digest:p?.artifactType===zxe&&typeof p.digest=="string"&&(s=p.digest)}if(!n&&u&&u.mediaType===vte.BUNDLE_V03_MEDIA_TYPE&&(n=u),n&&(r||s)){i=void 0;break}}return{bundle:n,signatureManifestDigest:r||s,errors:i}}};var Fte=x(require("fs"),1);var OT=class t{static{o(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new J0}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(a=>a.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return s;let n=e.platform,i=new Map;for(let a of r.manifests)a.digest&&i.set(a.digest,a);return s.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let u=i.get(c);return u?u.platform?.os===n.os&&u.platform?.architecture===n.architecture&&(u.platform?.variant??"")===(n.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],s=b0.tmpName({tmpdir:b0.tmpDir(),template:"imagetools-metadata-XXXXXX"}),n=[],i=[];for(let c of e.sources){if(c.startsWith("cwd://")){let u=c.substring(6);u.length>0&&n.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",s);for(let c of n)r.push("--file",c);for(let c of i)r.push(c);let a=await this.getCreateCommand(r);if(e.skipExec){_(`[command]${a.command} ${a.args.join(" ")}`),_("Skipped create command");return}return await Fe.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(!Fte.default.existsSync(s))return;let u=Fte.default.readFileSync(s,{encoding:"utf-8"}).trim();if(u===""||u==="null")return;let p=JSON.parse(u),l=p["containerimage.descriptor"];return l?{digest:p["containerimage.digest"]||l.digest,descriptor:l,imageNames:p["image.name"]?p["image.name"].split(",").map(A=>A.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,a;for(let c=0;c<i;c++)try{return await this.execInspe
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,s){return await Fe.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 Exe="application/vnd.in-toto+json";var yxe="https://fulcio.sigstore.dev",Cxe="https://rekor.sigstore.dev",Bxe="https://timestamp.sigstore.dev",Ff="https://search.sigstore.dev";var kH0="slsaprovenance1",GA=class t{static{o(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Gp,this.imageTools=e?.imageTools||new OT}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);_(`Using Sigstore signing endpoint: ${s.fulcioURL}`);let n=t.noTransparencyLog(e.noTransparencyLog),i=[];await this.cosign.versionSatisfies(">=3.0.4")?await ur("Creating Sigstore protobuf signing config",async()=>{let a=b0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:b0.tmpDir()}),c=["signing-config","create","--with-default-services=true",`--out=${a}`];n&&c.push("--no-default-rekor=true"),await Fe.exec(this.cosign.binPath,c,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),_(JSON.stringify(JSON.parse(Xc.default.readFileSync(a,{encoding:"utf-8"})),null,2)),i.push(`--signing-config=${a}`)}):(i.push("--use-signing-config"),n&&i.push("--tlog-upload=false"));for(let a of e.imageNames){let c=await this.imageTools.attestationDigests({name:`${a}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let u of c){let p=`${a}@${u}`;await ur(`Signing attestation manifest ${p}`,async()=>{let l=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...i];_(`[command]${this.cosign.binPath} ${[...l,p].join(" ")}`);let A=await Fe.getExecOutput(this.cosign.binPath,["--verbose",...l,p],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),d=Gp.parseCommandOutput(A.stderr.trim());if(A.exitCode!=0)if(d.errors&&d.errors.length>0){let m=d.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,xC.bundleFromJSON)(A.bundle));h.tlogID&&W(`Uploaded to Rekor transparency log: ${vf}?logIndex=${h.tlogID}`),W(`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 cr(`Verifying signature of ${n}`,async()=>{let o=await this.verifyImageAttestation(n,{certificateIdentityRegexp:r.certificateIdentityRegexp,noTransparencyLog:r.noTransparencyLog||!i.tlogID,retryOnManifestUnknown:r.retryOnManifestUnknown});W(`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);W(`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){W(`[command]${this.cosign.binPath} ${[...s,e].join(" ")}`);let o=await ve.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=Up.parseCommandOutput(o.stderr.trim());return{cosignArgs:s,signatureManifestDigest:a.signatureManifestDigest}}let n=r.retryLimit??15,i;W(`[command]${this.cosign.binPath} ${[...s,e].join(" ")}`);for(let o=0;o<n;o++){let a=await ve.getExecOutput(this.cosign.binPath,["--verbose",...s,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),c=Up.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: ${A.stderr.trim().split(/\r?\n/).filter(m=>m.length>0).pop()??"unknown error"}`);let b=t.parseBundle((0,WC.bundleFromJSON)(d.bundle));b.tlogID&&_(`Uploaded to Rekor transparency log: ${Ff}?logIndex=${b.tlogID}`),_(`Signature manifest pushed: https://oci.dag.dev/?referrers=${p}`),r[p]={...b,imageName:a}})}}}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 ur(`Verifying signature of ${n}`,async()=>{let a=await this.verifyImageAttestation(n,{certificateIdentityRegexp:r.certificateIdentityRegexp,noTransparencyLog:r.noTransparencyLog||!i.tlogID,retryOnManifestUnknown:r.retryOnManifestUnknown});_(`Signature manifest verified: https://oci.dag.dev/?image=${i.imageName}@${a.signatureManifestDigest}`),s[n]=a});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 a of n){let c=`${i}@${a}`,u=await this.verifyImageAttestation(c,r);_(`Signature manifest verified: https://oci.dag.dev/?image=${i}@${u.signatureManifestDigest}`),s[c]=u}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){_(`[command]${this.cosign.binPath} ${[...s,e].join(" ")}`);let a=await Fe.getExecOutput(this.cosign.binPath,["--verbose",...s,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: ${a.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`);let c=Gp.parseCommandOutput(a.stderr.trim());return{cosignArgs:s,signatureManifestDigest:c.signatureManifestDigest}}let n=r.retryLimit??15,i;_(`[command]${this.cosign.binPath} ${[...s,e].join(" ")}`);for(let a=0;a<n;a++){let c=await Fe.getExecOutput(this.cosign.binPath,["--verbose",...s,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),u=Gp.parseCommandOutput(c.stderr.trim());if(c.exitCode===0)return{cosignArgs:s,signatureManifestDigest:u.signatureManifestDigest};if(u.errors&&u.errors.length>0){let p=u.errors.map(l=>`- [${l.code}] ${l.message} : ${l.detail}`).join(`
|
||||
`);if(i=new Error(`Cosign verify command failed with errors:
|
||||
${u}`),c.errors.some(p=>p.code==="MANIFEST_UNKNOWN"))W(`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);W(`Using Sigstore signing endpoint: ${s.fulcioURL}`);let n=t.getProvenanceBlobs(e);for(let i of Object.keys(n))await cr(`Signing ${i}`,async()=>{let o=n[i],a=kA.default.join(kA.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),c=t.getProvenanceSubjects(o);if(c.length===0){g0(`No subjects found in provenance ${i}, skip signing.`);return}let u=await t.signPayload({data:o,type:Oxe},s),p=t.parseBundle(u);W("Provenance blob signed for:");for(let l of c){let[A,h]=Object.entries(l.digest)[0]||[];W(` - ${l.name} (${A}:${h})`)}p.tlogID&&W(`Attestation signature uploaded to Rekor transparency log: ${vf}?logIndex=${p.tlogID}`),W(`Writing Sigstore bundle to: ${a}`),Hc.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=kA.default.dirname(n);await cr(`Verifying signature bundle ${i.bundlePath}`,async()=>{for(let a of i.subjects){let c=kA.default.join(o,a.name);W(`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??PH0];(r.noTransparencyLog||!i.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let p=await ve.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){W("Verifying keyless verification bundle signature");let n=JSON.parse(Hc.default.readFileSync(r,"utf-8")),i=(0,xC.bundleFromJSON)(n);W("Fetching Sigstore TUF trusted root metadata");let o=await Dxe.getTrustedRoot(),a=(0,gg.toTrustMaterial)(o);try{W("Verifying artifact signature");let c=(0,gg.toSignedEntity)(i,Hc.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 gg.Verifier(a).verify(c,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return F(`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),W(`Upload to transparency log: ${e?"disabled":"enabled"}`),{fulcioURL:Exe,rekorURL:e?void 0:yxe,tsaServerURL:Cxe}}static noTransparencyLog(e){return e??z0.context.payload.repository?.private}static getProvenanceBlobs(e){let r=kA.default.join(e.localExportDir,"provenance.json");if(Hc.default.existsSync(r))return{[r]:Hc.default.readFileSync(r)};let s=Hc.default.readdirSync(e.localExportDir,{withFileTypes:!0}),n=s.filter(i=>i.isDirectory());if(n.length>0&&n.length===s.length&&n.every(i=>Hc.default.existsSync(kA.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let o of n){let a=kA.default.join(e.localExportDir,o.name,"provenance.json");i[a]=Hc.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 Xc.FulcioSigner({identityProvider:new Xc.CIContextProvider("sigstore"),fulcioBaseURL:r.fulcioURL,timeout:s,retry:n});return r.rekorURL&&i.push(new Xc.RekorWitness({rekorBaseURL:r.rekorURL,fetchOnConflict:!0,timeout:s,retry:n})),r.tsaServerURL&&i.push(new Xc.TSAWitness({tsaBaseURL:r.tsaServerURL,timeout:s,retry:n})),new Xc.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,xC.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 qxe=T(Rn(),1);var OT=T(require("fs"),1);var ET=class{resolveFromString(e){return this.resolve(e,!1)}resolveFromFile(e){return this.resolve(e,!0)}resolve(e,r){if(r){if(!OT.default.existsSync(e))throw new Error(`config file ${e} not found`);e=OT.default.readFileSync(e,{encoding:"utf-8"})}let s=h0.tmpName({tmpdir:h0.tmpDir()});return OT.default.writeFileSync(s,e),s}};var yT=class{buildx;config;constructor(e){this.config=new ET,this.buildx=e?.buildx||new Y0}async getVersion(e){if(!e.buildkit&&e.name)try{return await this.getVersionWithinImage(e.name)}catch(r){g0(r)}return e.buildkit}async getVersionWithinImage(e){return F(`BuildKit.getVersionWithinImage nodeName: ${e}`),Dr.getExecOutput(["inspect","--format","{{.Config.Image}}",`${Y0.containerNamePrefix}${e}`],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.exitCode==0&&r.stdout.length>0)return F(`BuildKit.getVersionWithinImage image: ${r.stdout.trim()}`),Dr.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 Og({buildx:this.buildx}).inspect(e));for(let n of s.nodes){let i=n.buildkit;if(F(`BuildKit.versionSatisfies ${i}: ${r}`),!i)try{i=await this.getVersionWithinImage(n.name||"")}catch{return F(`BuildKit.versionSatisfies ${n.name}: can't get version`),!1}if(F(`BuildKit.versionSatisfies ${n.name}: version ${i}`),s.driver=="docker"&&!i.endsWith("-moby")||!qxe.satisfies(i.replace(/-moby$/,""),r))return!1}return!0}};var CT=class t{_version;_versionOnce;_standalone;constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}async isStandalone(){let e=this._standalone??!await Dr.isAvailable();return F(`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 ve.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(s=>s.stderr.length>0&&s.exitCode!=0?(F(`Compose.isAvailable cmd err: ${s.stderr.trim()}`),!1):s.exitCode==0).catch(s=>(F(`Compose.isAvailable error: ${s}`),!1));return F(`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 ve.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 ve.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 Hp=T(require("fs"),1),jc=T(require("os"),1),Eg=T(require("path"),1);var DT=T(Rn(),1),Tte=T(require("util"),1);var BT=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);F(`Install.download version: ${s.version}`);let n=await t.getRelease(s,this.githubToken);F(`Install.download release tag name: ${n.tag_name}`);let i=await this.vspec(n.tag_name);F(`Install.download vspec: ${i}`);let o=DT.clean(i)||"";if(!DT.valid(o))throw new Error(`Invalid Compose version "${i}".`);let a=new T1({htcName:s.key!="official"?`compose-dl-bin-${s.key}`:"compose-dl-bin",htcVersion:i,baseCacheDir:Eg.default.join(jc.default.homedir(),".bin","docker-compose"),cacheFile:jc.default.platform()=="win32"?"docker-compose.exe":"docker-compose",ghaNoCache:r}),c=await a.find();if(c)return W(`Compose binary found in ${c}`),c;let u=Tte.format(s.downloadURL,i,this.filename());W(`Downloading ${u}`);let p=await mi(u,void 0,this.githubToken);F(`Install.download htcDownloadPath: ${p}`);let l=await a.save(p);return W(`Cached to ${l}`),l}async installStandalone(e,r){W("Standalone mode"),r=r||h0.tmpDir();let s=Eg.default.join(r,"compose-bin-standalone");Hp.default.existsSync(s)||Hp.default.mkdirSync(s,{recursive:!0});let n=jc.default.platform()=="win32"?"compose.exe":"compose",i=Eg.default.join(s,n);return Hp.default.copyFileSync(e,i),W("Fixing perms"),Hp.default.chmodSync(i,"0755"),Oa(s),W("Added Compose to PATH"),W(`Binary path: ${i}`),i}async installPlugin(e,r){W("Docker plugin mode"),r=r||Dr.configDir;let s=Eg.default.join(r,"cli-plugins");Hp.default.existsSync(s)||Hp.default.mkdirSync(s,{recursive:!0});let n=jc.default.platform()=="win32"?"docker-compose.exe":"docker-compose",i=Eg.default.join(s,n);return Hp.defaul
Line truncated
|
||||
${p}`),u.errors.some(l=>l.code==="MANIFEST_UNKNOWN"))_(`Cosign verify command failed with MANIFEST_UNKNOWN, retrying attempt ${a+1}/${n}...
|
||||
${p}`),await new Promise(l=>setTimeout(l,Math.pow(2,a)*100));else throw i}else throw new Error(`Cosign verify command failed with: ${c.stderr.trim().split(/\r?\n/).filter(p=>p.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);_(`Using Sigstore signing endpoint: ${s.fulcioURL}`);let n=t.getProvenanceBlobs(e);for(let i of Object.keys(n))await ur(`Signing ${i}`,async()=>{let a=n[i],c=UA.default.join(UA.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),u=t.getProvenanceSubjects(a);if(u.length===0){z0(`No subjects found in provenance ${i}, skip signing.`);return}let p=await t.signPayload({data:a,type:Exe},s),l=t.parseBundle(p);_("Provenance blob signed for:");for(let A of u){let[d,b]=Object.entries(A.digest)[0]||[];_(` - ${A.name} (${d}:${b})`)}l.tlogID&&_(`Attestation signature uploaded to Rekor transparency log: ${Ff}?logIndex=${l.tlogID}`),_(`Writing Sigstore bundle to: ${c}`),Xc.default.writeFileSync(c,JSON.stringify(l.payload,null,2),{encoding:"utf-8"}),r[i]={...l,bundlePath:c,subjects:u}})}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 a=UA.default.dirname(n);await ur(`Verifying signature bundle ${i.bundlePath}`,async()=>{for(let c of i.subjects){let u=UA.default.join(a,c.name);_(`Verifying signed artifact ${u}`);let p=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??kH0];(r.noTransparencyLog||!i.tlogID)&&p.push("--use-signed-timestamps","--insecure-ignore-tlog");let l=await Fe.getExecOutput(this.cosign.binPath,[...p,"--bundle",i.bundlePath,u],{ignoreReturnCode:!0});if(l.stderr.length>0&&l.exitCode!=0)throw new Error(l.stderr);s[u]={bundlePath:i.bundlePath,cosignArgs:p}}})}return s}async verifyArtifact(e,r,s){_("Verifying keyless verification bundle signature");let n=JSON.parse(Xc.default.readFileSync(r,"utf-8")),i=(0,WC.bundleFromJSON)(n);_("Fetching Sigstore TUF trusted root metadata");let a=await qxe.getTrustedRoot(),c=(0,zg.toTrustMaterial)(a);try{_("Verifying artifact signature");let u=(0,zg.toSignedEntity)(i,Xc.default.readFileSync(e)),p=t.parseCertificate(i),l=i.verificationMaterial.tlogEntries,A=l.length>0?l[0].logIndex:void 0;if(s?.subjectAlternativeName&&s?.subjectAlternativeName instanceof RegExp){let m=p.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 b=new zg.Verifier(c).verify(u,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return T(`Sigstore.verifyArtifact signer: ${JSON.stringify(b)}`),{payload:n,certificate:p.toString(),tlogID:A}}catch(u){throw new Error(`Failed to verify artifact signature: ${u}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),_(`Upload to transparency log: ${e?"disabled":"enabled"}`),{fulcioURL:yxe,rekorURL:e?void 0:Cxe,tsaServerURL:Bxe}}static noTransparencyLog(e){return e??O0.context.payload.repository?.private}static getProvenanceBlobs(e){let r=UA.default.join(e.localExportDir,"provenance.json");if(Xc.default.existsSync(r))return{[r]:Xc.default.readFileSync(r)};let s=Xc.default.readdirSync(e.localExportDir,{withFileTypes:!0}),n=s.filter(i=>i.isDirectory());if(n.length>0&&n.length===s.length&&n.every(i=>Xc.default.existsSync(UA.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let a of n){let c=UA.default.join(e.localExportDir,a.name,"provenance.json");i[c]=Xc.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(s=>({name:s.name,digest:s.digest}))}static async signPayload(e,r,s,n){let i=[],a=new Vc.FulcioSigner({identityProvider:new Vc.CIContextProvider("sigstore"),fulcioBaseURL:r.fulcioURL,timeout:s,retry:n});return r.rekorURL&&i.push(new Vc.RekorWitness({rekorBaseURL:r.rekorURL,fetchOnConflict:!0,timeout:s,retry:n})),r.tsaServerURL&&i.push(new Vc.TSAWitness({tsaBaseURL:r.tsaServerURL,timeout:s,retry:n})),new Vc.DSSEBundleBuilder({signer:a,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,WC.bundleToJSON)(e),certificate:r.toString(),tlogID:n}}
Line truncated
|
||||
`)){let[p,...l]=u.split(":"),A=p.toLowerCase(),d=l.map(b=>b.trim()).join(":");if(p.length!=0)switch(!0){case A=="name":s=void 0,r.name==null?r.name=d:(i&&n.gcPolicy&&(n.gcPolicy.push(i),i=void 0),n.name&&r.nodes.push(n),n={name:d});break;case A=="driver":s=void 0,r.driver=d;break;case A=="last activity":s=void 0,r.lastActivity=new Date(d);break;case A=="endpoint":s=void 0,n.endpoint=d;break;case A=="driver options":s=void 0,n["driver-opts"]=(d.match(/([a-zA-Z0-9_.]+)="([^"]*)"/g)||[]).map(b=>b.replace(/^(.*)="(.*)"$/g,"$1=$2"));break;case A=="status":s=void 0,n.status=d;break;case A=="buildkit daemon flags":case A=="flags":s=void 0,n["buildkitd-flags"]=d;break;case A=="buildkit version":case A=="buildkit":s=void 0,n.buildkit=d;break;case A=="platforms":{if(s=void 0,!d)break;let b=[];if(d.includes("*"))for(let m of d.split(", "))m.includes("*")&&b.push(m.replace(/\*/g,""));else b=d.split(", ");n.platforms=b.join(",");break}case A=="features":s="features",n.features={};break;case A=="labels":s="label",n.labels={};break;case A=="devices":s="devices",n.devices=n.devices||[];break;case A.startsWith("gc policy rule#"):s="gcpolicy",n.gcPolicy&&i&&(n.gcPolicy.push(i),i=void 0);break;case A.startsWith("file#"):s="file",c=p.split("#")[1],n.files=n.files||{},n.files[c]="";break;default:switch(s&&s!=="devices"&&n.devices&&a&&(n.devices.push(a),a=void 0),s||""){case"features":{n.features=n.features||{},n.features[p.trim()]=!!d;break}case"label":{n.labels=n.labels||{},n.labels[p.trim()]=d;break}case"devices":{switch(A.trim()){case"name":{n.devices&&a&&n.devices.push(a),a={},a.name=d;break}case"on-demand":{a&&d&&(a.onDemand=d=="true");break}case"automatically allowed":{a&&d&&(a.autoAllow=d=="true");break}case"annotations":{a&&(a.annotations=a.annotations||{});break}default:a&&a.annotations&&(a.annotations[p.trim()]=d)}break}case"gcpolicy":{switch(n.gcPolicy=n.gcPolicy||[],i=i||{},A.trim()){case"all":{i.all=d=="true";break}case"filters":{d&&(i.filter=d.split(","));break}case"keep duration":{i.keepDuration=d;break}case"keep bytes":{i.keepBytes=d;break}case"reserved space":{i.reservedSpace=d;break}case"max used space":{i.maxUsedSpace=d;break}case"min free space":{i.minFreeSpace=d;break}}break}case"file":{c&&n.files&&(n.files[c].length>0&&(n.files[c]+=`
|
||||
`),n.files[c]+=u.replace(/^\s>\s?/,""));break}}}}return a&&n.devices&&n.devices.push(a),i&&n.gcPolicy&&n.gcPolicy.push(i),n.name&&r.nodes.push(n),r}};var Ixe=x(wn(),1);var yT=x(require("fs"),1);var CT=class{static{o(this,"Config")}resolveFromString(e){return this.resolve(e,!1)}resolveFromFile(e){return this.resolve(e,!0)}resolve(e,r){if(r){if(!yT.default.existsSync(e))throw new Error(`config file ${e} not found`);e=yT.default.readFileSync(e,{encoding:"utf-8"})}let s=b0.tmpName({tmpdir:b0.tmpDir()});return yT.default.writeFileSync(s,e),s}};var BT=class{static{o(this,"BuildKit")}buildx;config;constructor(e){this.config=new CT,this.buildx=e?.buildx||new J0}async getVersion(e){if(!e.buildkit&&e.name)try{return await this.getVersionWithinImage(e.name)}catch(r){z0(r)}return e.buildkit}async getVersionWithinImage(e){return T(`BuildKit.getVersionWithinImage nodeName: ${e}`),qr.getExecOutput(["inspect","--format","{{.Config.Image}}",`${J0.containerNamePrefix}${e}`],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.exitCode==0&&r.stdout.length>0)return T(`BuildKit.getVersionWithinImage image: ${r.stdout.trim()}`),qr.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 Eg({buildx:this.buildx}).inspect(e));for(let n of s.nodes){let i=n.buildkit;if(T(`BuildKit.versionSatisfies ${i}: ${r}`),!i)try{i=await this.getVersionWithinImage(n.name||"")}catch{return T(`BuildKit.versionSatisfies ${n.name}: can't get version`),!1}if(T(`BuildKit.versionSatisfies ${n.name}: version ${i}`),s.driver=="docker"&&!i.endsWith("-moby")||!Ixe.satisfies(i.replace(/-moby$/,""),r))return!1}return!0}};var DT=class t{static{o(this,"Compose")}_version;_versionOnce;_standalone;constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}async isStandalone(){let e=this._standalone??!await qr.isAvailable();return T(`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 Fe.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(s=>s.stderr.length>0&&s.exitCode!=0?(T(`Compose.isAvailable cmd err: ${s.stderr.trim()}`),!1):s.exitCode==0).catch(s=>(T(`Compose.isAvailable error: ${s}`),!1));return T(`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 Fe.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 Fe.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 Xp=x(require("fs"),1),$c=x(require("os"),1),yg=x(require("path"),1);var IT=x(wn(),1),xte=x(require("util"),1);var qT=class t{static{o(this,"Install")}standalone;githubToken;constructor(e){this.standalone=e?.standalone,this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN}async download(e,r){let s=await t.getDownloadVersion(e);T(`Install.download version: ${s.version}`);let n=await t.getRelease(s,this.githubToken);T(`Install.download release tag name: ${n.tag_name}`);let i=await this.vspec(n.tag_name);T(`Install.download vspec: ${i}`);let a=IT.clean(i)||"";if(!IT.valid(a))throw new Error(`Invalid Compose version "${i}".`);let c=new x1({htcName:s.key!="official"?`compose-dl-bin-${s.key}`:"compose-dl-bin",htcVersion:i,baseCacheDir:yg.default.join($c.default.homedir(),".bin","docker-compose"),cacheFile:$c.default.platform()=="win32"?"docker-compose.exe":"docker-compose",ghaNoCache:r}),u=await c.find();if(u)return _(`Compose binary found in ${u}`),u;let p=xte.format(s.downloadURL,i,this.filename());_(`Downloading ${p}`);let l=await gi(p,void 0,this.githubToken);T(`Install.download htcDownloadPath: ${l}`);let A=await c.save(l);return _(`Cached to ${A}`),A}async installStandalone(e,r){_("Standalone mode"),r=r||b0.tmpDir();let s=yg.default.join(r,"compose-bin-standalone");Xp.default.existsSync(s)||Xp.default.mkdirSync(s,{recursive:!0});let n=$c.default.platform()=="win32"?"compose.exe":"compose",i=yg.default.join(s,n);return Xp.default.copyFileSync(e,i),_("Fixing perms"),Xp.default.chmodSync(i,"0755"),Ea(s),_("Added Compose to PATH"),_(`Binary path: ${i}`),i}async installPlugin(e,r){_("Docker plugin mode"),r=r||qr.configDir;let s=yg.default.join(r,"cli-plugins");Xp.default.existsSync(s)||Xp.default.mkdirSync(s,{recursive:!0});let n=$c.defau
Line truncated
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG GO_VERSION="1.24"
|
||||
@@ -234,10 +234,10 @@ EOT
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /out /
|
||||
`;var qT=class t{githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||new Y0,this.sigstore=e?.sigstore||new UA}async download(e){let r=await t.getDownloadVersion(e.version);F(`Install.download version: ${r.version}`);let s=await t.getRelease(r,this.githubToken);F(`Install.download release tag name: ${s.tag_name}`);let n=await this.vspec(s.tag_name);F(`Install.download vspec: ${n}`);let i=Cg.clean(n)||"";if(!Cg.valid(i))throw new Error(`Invalid Cosign version "${n}".`);let o=new T1({htcName:"cosign-dl-bin",htcVersion:n,baseCacheDir:yg.default.join(Ko.default.homedir(),".bin"),cacheFile:Ko.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),a=await o.find();if(a)return W(`Cosign binary found in ${a}`),a;let c=xte.format(r.downloadURL,n,this.filename());W(`Downloading ${c}`);let u=await mi(c,void 0,this.githubToken);F(`Install.download htcDownloadPath: ${u}`),e.verifySignature&&Cg.satisfies(n,">=3.0.1")&&await this.verifySignature(u,c);let p=await o.save(u,e.skipState);return W(`Cached to ${p}`),p}async build(e,r,s){let n=await this.vspec(e);F(`Install.build vspec: ${n}`);let i=new T1({htcName:"cosign-build-bin",htcVersion:n,baseCacheDir:yg.default.join(Ko.default.homedir(),".bin"),cacheFile:Ko.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),o=await i.find();if(o)return W(`Cosign binary found in ${o}`),o;let a=yg.default.join(h0.tmpDir(),"cosign-build-cache"),c=await this.buildCommand(e,a),u=await ve.getExecOutput(c.command,c.args,{ignoreReturnCode:!0,input:Buffer.from(Ixe)}).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 W(`Cached to ${p}`),p}async install(e,r){r=r||h0.tmpDir();let s=yg.default.join(r,"cosign-bin");WC.default.existsSync(s)||WC.default.mkdirSync(s,{recursive:!0});let n=Ko.default.platform()=="win32"?"cosign.exe":"cosign",i=yg.default.join(s,n);return WC.default.copyFileSync(e,i),W("Fixing perms"),WC.default.chmodSync(i,"0755"),Oa(s),W("Added Cosign to PATH"),W(`Binary path: ${i}`),i}async buildCommand(e,r){let s=await new Y0({standalone:!0}).isAvailable(),n=await new Y0({standalone:!1}).isAvailable(),i=!1;if(await this.buildx.isStandalone()&&s)F("Install.buildCommand: Buildx standalone found, build with it"),i=!0;else if(!await this.buildx.isStandalone()&&n)F("Install.buildCommand: Buildx plugin found, build with it"),i=!1;else if(s)F("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),i=!0;else if(n)F("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 Y0({standalone:i}).getCommand(o)}async verifySignature(e,r){let s=`${r}.sigstore.json`;W(`Downloading keyless verification bundle at ${s}`);let n=await mi(s,void 0,this.githubToken);F(`Install.verifySignature bundlePath: ${n}`);let i=await this.sigstore.verifyArtifact(e,n,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});W(`Cosign binary signature verified! ${i.tlogID?`${vf}?logIndex=${i.tlogID}`:""}`)}filename(){let e;switch(Ko.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=Ko.default.arch();break}}let r=Ko.default.platform()=="win32"?"windows":Ko.default.platform(),s=Ko.default.platform()=="win32"?".exe":"";return xte.format("cosign-%s-%s%s",r,e,s)}async vspec(e){if(!O0.isValidRef(e)){let u=e.replace(/^v+|v+$/g,"");return W(`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 Ju.remoteSha(r,s,process.env.GIT_AUTH_TOKEN);let[i,o]=r.substring(19).split("/"),a=`${i}/${O0.trimSuffix(o,".git")}/${n}`,c=O0.hash(a);return W(`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 z0({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 Rxe=T(Rn(),1);var IT=class{binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"regctl",this._version="",this._versionOnce=!1}async blobGet(e){return await ve.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:qn("sep-labels",{trimWhitespace:!1})||`
|
||||
`,sepAnnotations:qn("sep-annotations",{trimWhitespace:!1})||`
|
||||
`,bakeTarget:qn("bake-target")||"docker-metadata-action",githubToken:qn("github-token")}}async function Nxe(t,e){switch(t){case"workflow":return await kH0(e);case"git":return await UH0();default:throw new Error(`Invalid context source: ${t}`)}}async function kH0(t){let e=z0.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 GH0(e.sha,t),...e}}async function UH0(){let t=await Ju.context();return{commitDate:await Ju.commitDate(t.sha),...t}}async function GH0(t,e){let r=z0.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:z0.context.repo.owner,repo:z0.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 F(`Failed to get commit date from GitHub API: ${s.message}`),new Date}}var el=T(FV(),1),CHe=T(require("fs"),1),BHe=T(require("path"),1),v4=T(_xe(),1),ii=T(gHe(),1),kg=T(Rn(),1);function OHe(t){let e=[];if(t.length==1){let r=!1,s=d1(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 zHe(e)}e=[];for(let r of t){let s={name:"",enable:!0},n=d1(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 zHe(e)}function zHe(t){Nd("Processing images input");for(let e of t)W(`name=${e.name},enable=${e.enable}`);return vd(),t}var ose=(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))(ose||{}),qx=(s=>(s.Branch="branch",s.Tag="tag",s.PR="pr",s))(qx||{}),Ix=(r=>(r.Short="short",r.Long="long",r))(Ix||{}),ise=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(",")}},xst={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function EHe(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(Wst(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);Nd("Processing tags input");for(let s of r)W(s.toString());return vd(),r}function Wst(t){let e=d1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new ise;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(ose).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(qx).map(s=>qx[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-"),Obje
Line truncated
|
||||
`;var RT=class t{static{o(this,"Install")}githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||new J0,this.sigstore=e?.sigstore||new GA}async download(e){let r=await t.getDownloadVersion(e.version);T(`Install.download version: ${r.version}`);let s=await t.getRelease(r,this.githubToken);T(`Install.download release tag name: ${s.tag_name}`);let n=await this.vspec(s.tag_name);T(`Install.download vspec: ${n}`);let i=Bg.clean(n)||"";if(!Bg.valid(i))throw new Error(`Invalid Cosign version "${n}".`);let a=new x1({htcName:"cosign-dl-bin",htcVersion:n,baseCacheDir:Cg.default.join(Zo.default.homedir(),".bin"),cacheFile:Zo.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),c=await a.find();if(c)return _(`Cosign binary found in ${c}`),c;let u=Wte.format(r.downloadURL,n,this.filename());_(`Downloading ${u}`);let p=await gi(u,void 0,this.githubToken);T(`Install.download htcDownloadPath: ${p}`),e.verifySignature&&Bg.satisfies(n,">=3.0.1")&&await this.verifySignature(p,u);let l=await a.save(p,e.skipState);return _(`Cached to ${l}`),l}async build(e,r,s){let n=await this.vspec(e);T(`Install.build vspec: ${n}`);let i=new x1({htcName:"cosign-build-bin",htcVersion:n,baseCacheDir:Cg.default.join(Zo.default.homedir(),".bin"),cacheFile:Zo.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),a=await i.find();if(a)return _(`Cosign binary found in ${a}`),a;let c=Cg.default.join(b0.tmpDir(),"cosign-build-cache"),u=await this.buildCommand(e,c),p=await Fe.getExecOutput(u.command,u.args,{ignoreReturnCode:!0,input:Buffer.from(Rxe)}).then(A=>{if(A.stderr.length>0&&A.exitCode!=0)throw new Error(`build failed with: ${A.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return`${c}/cosign`}),l=await i.save(p,s);return _(`Cached to ${l}`),l}async install(e,r){r=r||b0.tmpDir();let s=Cg.default.join(r,"cosign-bin");_C.default.existsSync(s)||_C.default.mkdirSync(s,{recursive:!0});let n=Zo.default.platform()=="win32"?"cosign.exe":"cosign",i=Cg.default.join(s,n);return _C.default.copyFileSync(e,i),_("Fixing perms"),_C.default.chmodSync(i,"0755"),Ea(s),_("Added Cosign to PATH"),_(`Binary path: ${i}`),i}async buildCommand(e,r){let s=await new J0({standalone:!0}).isAvailable(),n=await new J0({standalone:!1}).isAvailable(),i=!1;if(await this.buildx.isStandalone()&&s)T("Install.buildCommand: Buildx standalone found, build with it"),i=!0;else if(!await this.buildx.isStandalone()&&n)T("Install.buildCommand: Buildx plugin found, build with it"),i=!1;else if(s)T("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),i=!0;else if(n)T("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 J0({standalone:i}).getCommand(a)}async verifySignature(e,r){let s=`${r}.sigstore.json`;_(`Downloading keyless verification bundle at ${s}`);let n=await gi(s,void 0,this.githubToken);T(`Install.verifySignature bundlePath: ${n}`);let i=await this.sigstore.verifyArtifact(e,n,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});_(`Cosign binary signature verified! ${i.tlogID?`${Ff}?logIndex=${i.tlogID}`:""}`)}filename(){let e;switch(Zo.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=Zo.default.arch();break}}let r=Zo.default.platform()=="win32"?"windows":Zo.default.platform(),s=Zo.default.platform()=="win32"?".exe":"";return Wte.format("cosign-%s-%s%s",r,e,s)}async vspec(e){if(!E0.isValidRef(e)){let p=e.replace(/^v+|v+$/g,"");return _(`Use ${p} version spec cache key for ${e}`),p}let[r,s]=e.split("#");s.length==0&&(s="master");let n;s.match(/^[0-9a-fA-F]{40}$/)?n=s:n=await Ku.remoteSha(r,s,process.env.GIT_AUTH_TOKEN);let[i,a]=r.substring(19).split("/"),c=`${i}/${E0.trimSuffix(a,".git")}/${n}`,u=E0.hash(c);return _(`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 n=await new O0({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 wxe=x(wn(),1);var wT=class{static{o(this,"Regctl")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"regctl",this._version="",this._versionOnce=!1}async blobGet(e){return await Fe.getExecOutput(this.binPath,["blob","get",e.repository,e.digest],{ignoreReturnCode:!0,s
Line truncated
|
||||
`,sepLabels:In("sep-labels",{trimWhitespace:!1})||`
|
||||
`,sepAnnotations:In("sep-annotations",{trimWhitespace:!1})||`
|
||||
`,bakeTarget:In("bake-target")||"docker-metadata-action",githubToken:In("github-token")}}o(Nxe,"getInputs");async function vxe(t,e){switch(t){case"workflow":return await UH0(e);case"git":return await GH0();default:throw new Error(`Invalid context source: ${t}`)}}o(vxe,"getContext");async function UH0(t){let e=O0.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 HH0(e.sha,t),...e}}o(UH0,"getContextFromWorkflow");async function GH0(){let t=await Ku.context();return{commitDate:await Ku.commitDate(t.sha),...t}}o(GH0,"getContextFromGit");async function HH0(t,e){let r=O0.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:O0.context.repo.owner,repo:O0.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 T(`Failed to get commit date from GitHub API: ${s.message}`),new Date}}o(HH0,"getCommitDateFromWorkflow");var tl=x(TV(),1),BHe=x(require("fs"),1),DHe=x(require("path"),1),F4=x(Lxe(),1),oi=x(zHe(),1),Ug=x(wn(),1);function EHe(t){let e=[];if(t.length==1){let r=!1,s=f1(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let i=n.toString().split("=").map(a=>a.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return OHe(e)}e=[];for(let r of t){let s={name:"",enable:!0},n=f1(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of n){let a=i.toString().split("=").map(c=>c.trim());if(a.length==1)s.name=a[0];else{let c=a[0].toLowerCase(),u=a[1];switch(c){case"name":{s.name=u;break}case"enable":{if(!["true","false"].includes(u))throw new Error(`Invalid enable attribute value: ${r}`);s.enable=/true/i.test(u);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 OHe(e)}o(EHe,"Transform");function OHe(t){vd("Processing images input");for(let e of t)_(`name=${e.name},enable=${e.enable}`);return Fd(),t}o(OHe,"output");var ase=(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))(ase||{}),Rx=(s=>(s.Branch="branch",s.Tag="tag",s.PR="pr",s))(Rx||{}),wx=(r=>(r.Short="short",r.Long="long",r))(wx||{}),ose=class{static{o(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(",")}},Wst={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function yHe(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(_st(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);vd("Processing tags input");for(let s of r)_(s.toString());return Fd(),r}o(yHe,"Transform");function _st(t){let e=f1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new ose;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(),a=n[1];switch(i){case"type":{if(!Object.values(ase).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(Rx).map(s=>Rx[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(!Ob
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
undici/lib/web/fetch/body.js:
|
||||
|
||||
Reference in new issue
Block a user