mirror of
https://github.com/gradle/actions.git
synced 2026-10-16 19:57:12 +08:00
[bot] Update dist directory
This commit is contained in:
10 files changed
+896
-1608
No files matched your search
Vendored
+195
-317
@@ -1,269 +1,166 @@
|
||||
import {createRequire} from 'module';const require=createRequire(import.meta.url);
|
||||
var fMt=Object.create;var LP=Object.defineProperty;var pMt=Object.getOwnPropertyDescriptor;var mMt=Object.getOwnPropertyNames;var EMt=Object.getPrototypeOf,CMt=Object.prototype.hasOwnProperty;var B=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var IMt=(t,e)=>()=>(t&&(e=t(t=0)),e);var f=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),xu=(t,e)=>{for(var r in e)LP(t,r,{get:e[r],enumerable:!0})},lTe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of mMt(e))!CMt.call(t,s)&&s!==r&&LP(t,s,{get:()=>e[s],enumerable:!(n=pMt(e,s))||n.enumerable});return t};var Xe=(t,e,r)=>(r=t!=null?fMt(EMt(t)):{},lTe(e||!t||!t.__esModule?LP(r,"default",{value:t,enumerable:!0}):r,t)),$n=t=>lTe(LP({},"__esModule",{value:!0}),t);var ETe=f($y=>{"use strict";var Syn=B("net"),NMt=B("tls"),$K=B("http"),fTe=B("https"),SMt=B("events"),Ryn=B("assert"),RMt=B("util");$y.httpOverHttp=DMt;$y.httpsOverHttp=xMt;$y.httpOverHttps=TMt;$y.httpsOverHttps=kMt;function DMt(t){var e=new Pf(t);return e.request=$K.request,e}function xMt(t){var e=new Pf(t);return e.request=$K.request,e.createSocket=pTe,e.defaultPort=443,e}function TMt(t){var e=new Pf(t);return e.request=fTe.request,e}function kMt(t){var e=new Pf(t);return e.request=fTe.request,e.createSocket=pTe,e.defaultPort=443,e}function Pf(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||$K.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(n,s,i,o){for(var a=mTe(s,i,o),A=0,c=e.requests.length;A<c;++A){var u=e.requests[A];if(u.host===a.host&&u.port===a.port){e.requests.splice(A,1),u.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)})}RMt.inherits(Pf,SMt.EventEmitter);Pf.prototype.addRequest=function(e,r,n,s){var i=this,o=eX({request:e},i.options,mTe(r,n,s));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",A),a.on("close",c),a.on("agentRemove",c),e.onSocket(a);function A(){i.emit("free",a,o)}function c(u){i.removeSocket(a),a.removeListener("free",A),a.removeListener("close",c),a.removeListener("agentRemove",c)}})};Pf.prototype.createSocket=function(e,r){var n=this,s={};n.sockets.push(s);var i=eX({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),Gm("making CONNECT request");var o=n.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",A),o.once("connect",c),o.once("error",u),o.end();function a(l){l.upgrade=!0}function A(l,d,h){process.nextTick(function(){c(l,d,h)})}function c(l,d,h){if(o.removeAllListeners(),d.removeAllListeners(),l.statusCode!==200){Gm("tunneling socket could not be established, statusCode=%d",l.statusCode),d.destroy();var g=new Error("tunneling socket could not be established, statusCode="+l.statusCode);g.code="ECONNRESET",e.request.emit("error",g),n.removeSocket(s);return}if(h.length>0){Gm("got illegal response body from proxy"),d.destroy();var g=new Error("got illegal response body from proxy");g.code="ECONNRESET",e.request.emit("error",g),n.removeSocket(s);return}return Gm("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=d,r(d)}function u(l){o.removeAllListeners(),Gm(`tunneling socket could not be established, cause=%s
|
||||
`,l.message,l.stack);var d=new Error("tunneling socket could not be established, cause="+l.message);d.code="ECONNRESET",e.request.emit("error",d),n.removeSocket(s)}};Pf.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(s){n.request.onSocket(s)})}};function pTe(t,e){var r=this;Pf.prototype.createSocket.call(r,t,function(n){var s=t.request.getHeader("host"),i=eX({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):t.host}),o=NMt.connect(0,i);r.sockets[r.sockets.indexOf(n)]=o,e(o)})}function mTe(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function eX(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var s=Object.keys(n),i=0,o=s.length;i<o;++i){var a=s[i];n[a]!==void 0&&(t[a]=n[a])}}return t}var Gm;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Gm=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)}:Gm=function(){};$y.debug=Gm});var qP=f((xyn,CTe)=>{CTe.exports=ETe()});var ps=f((Tyn,ITe)=>{ITe.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 tn=f((kyn,YTe)=>{"use strict";var BTe=Symbol.for("undici.error.UND_ERR"),Ts=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[BTe]===!0}[BTe]=!0},QTe=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),tX=class extends Ts{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[QTe]===!0}[QTe]=!0},yTe=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),rX=class extends Ts{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[yTe]===!0}[yTe]=!0},bTe=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),nX=class extends Ts{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[bTe]===!0}[bTe]=!0},wTe=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),sX=class extends Ts{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[wTe]===!0}[wTe]=!0},NTe=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),iX=class extends Ts{constructor(e,r,n,s){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 zLt(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let i=n.length;i!==0;i--){let o=n[i-1].trim();if(kLt.has(o)){s=o;break}}s!==""&&(t.referrerPolicy=s)}function jLt(){return"allowed"}function KLt(){return"success"}function XLt(){return"success"}function ZLt(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function $Lt(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&&zX(t.origin)&&!zX(PT(t))&&(e=null);break;case"same-origin":c_(t,PT(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function cb(t,e){return t}function eUt(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:cb(t.domainLookupStartTime,r),domainLookupEndTime:cb(t.domainLookupEndTime,r),connectionStartTime:cb(t.connectionStartTime,r),connectionEndTime:cb(t.connectionEndTime,r),secureConnectionStartTime:cb(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function tUt(t){return cb(ULt.now(),t)}function rUt(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 ike(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function nUt(t){return{referrerPolicy:t.referrerPolicy}}function sUt(t){let e=t.referrerPolicy;oB(e);let r=null;if(t.referrer==="client"){let a=$1e();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let n=WX(r),s=WX(r,!0);n.toString().length>4096&&(n=s);let i=c_(t,n),o=UT(n)&&!UT(t.url);switch(e){case"origin":return s??WX(r,!0);case"unsafe-url":return n;case"same-origin":return i?s:"no-referrer";case"origin-when-cross-origin":return i?n:s;case"strict-origin-when-cross-origin":{let a=PT(t);return c_(n,a)?n:UT(n)&&!UT(a)?"no-referrer":s}default:return o?"no-referrer":s}}function WX(t,e){return oB(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 UT(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}function iUt(t,e){if(A_===void 0)return!0;let r=oke(e);if(r==="no metadata"||r.length===0)return!0;let n=aUt(r),s=AUt(r,n);for(let i of s){let o=i.algo,a=i.hash,A=A_.createHash(o).update(t).digest("base64");if(A[A.length-1]==="="&&(A[A.length-2]==="="?A=A.slice(0,-2):A=A.slice(0,-1)),cUt(A,a))return!0}return!1}var oUt=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function oke(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=oUt.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let i=s.groups.algo.toLowerCase();tke.includes(i)&&e.push(s.groups)}return r===!0?"no metadata":e}function aUt(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}function AUt(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}function cUt(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 uUt(t){}function c_(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function lUt(){let t,e;return{promise:new Promise((n,s)=>{t=n,e=s}),resolve:t,reject:e}}function dUt(t){return t.controller.state==="aborted"}function hUt(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function gUt(t){return OLt[t.toLowerCase()]??t}function fUt(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return oB(typeof e=="string"),e}var pUt=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function ake(t,e,r=0,n=1){class s{
Line truncated
|
||||
`);function VUt(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function WUt(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}function zUt(t,e){l_(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),s=[],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+n.length).equals(n))i.position+=n.length;else return"failure";if(i.position===t.length-2&&d_(t,YUt,i)||i.position===t.length-4&&d_(t,JUt,i))return s;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let a=jUt(t,i);if(a==="failure")return"failure";let{name:A,filename:c,contentType:u,encoding:l}=a;i.position+=2;let d;{let g=t.indexOf(n.subarray(2),i.position);if(g===-1)return"failure";d=t.subarray(i.position,g-4),i.position+=d.length,l==="base64"&&(d=Buffer.from(d.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let h;c!==null?(u??="text/plain",VUt(u)||(u=""),h=new qUt([d],c,{type:u})):h=UUt(Buffer.from(d)),l_(Cke(A)),l_(typeof h=="string"&&Cke(h)||_Ut(h)),s.push(OUt(A,h,c))}}function jUt(t,e){let r=null,n=null,s=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:s,encoding:i};let o=lb(a=>a!==10&&a!==13&&a!==58,t,e);if(o=tZ(o,!0,!0,a=>a===9||a===32),!PUt.test(o.toString())||t[e.position]!==58)return"failure";switch(e.position++,lb(a=>a===32||a===9,t,e),LUt(o)){case"content-disposition":{if(r=n=null,!d_(t,GUt,e)||(e.position+=17,r=Qke(t,e),r===null))return"failure";if(d_(t,Bke,e)){let a=e.position+Bke.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,n=Qke(t,e),n===null))return"failure"}break}case"content-type":{let a=lb(A=>A!==10&&A!==13,t,e);a=tZ(a,!1,!0,A=>A===9||A===32),s=Ike(a);break}case"content-transfer-encoding":{let a=lb(A=>A!==10&&A!==13,t,e);a=tZ(a,!1,!0,A=>A===9||A===32),i=Ike(a);break}default:lb(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function Qke(t,e){l_(t[e.position-1]===34);let r=lb(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}function lb(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}function tZ(t,e,r,n){let s=0,i=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;i>0&&n(t[i]);)i--;return s===0&&i===t.length-1?t:t.subarray(s,i+1)}function d_(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}yke.exports={multipartFormDataParser:zUt,validateBoundary:WUt}});var gb=f((nbn,Mke)=>{"use strict";var HT=mr(),{ReadableStreamFrom:KUt,isBlobLike:wke,isReadableStreamLike:XUt,readableStreamClose:ZUt,createDeferredPromise:$Ut,fullyReadBody:ePt,extractMimeType:tPt,utf8DecodeBytes:Rke}=Qc(),{FormData:Nke}=OT(),{kState:hb}=Ym(),{webidl:rPt}=Oo(),{Blob:nPt}=B("node:buffer"),rZ=B("node:assert"),{isErrored:Dke,isDisturbed:sPt}=B("node:stream"),{isArrayBuffer:iPt}=B("node:util/types"),{serializeAMimeType:oPt}=yA(),{multipartFormDataParser:aPt}=bke(),nZ;try{let t=B("node:crypto");nZ=e=>t.randomInt(0,e)}catch{nZ=t=>Math.floor(Math.random(t))}var h_=new TextEncoder;function APt(){}var xke=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,Tke;xke&&(Tke=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!sPt(e)&&!Dke(e)&&e.cancel("Response object has been garbage collected").catch(APt)}));function kke(t,e=!1){let r=null;t instanceof ReadableStream?r=t:wke(t)?r=t.stream():r=new ReadableStream({async pull(A){let c=typeof s=="string"?h_.encode(s):s;c.byteLength&&A.enqueue(c),queueMicrotask(()=>ZUt(A))},start(){},type:"bytes"}),rZ(XUt(r));let n=null,s=null,i=null,o=null;if(typeof t=="string")s=t,o="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),o="application/x-www-form-urlencoded;charset=UTF-8";else if(iPt(t))s=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))s=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(HT.isFormDataLike(t)){let A=`----formdata-undici-0${`${nZ(1e11)}`.padStart(11,"0")}`,c=`--${A}\r
|
||||
var _Ke=Object.create;var P3=Object.defineProperty;var PKe=Object.getOwnPropertyDescriptor;var OKe=Object.getOwnPropertyNames;var HKe=Object.getPrototypeOf,GKe=Object.prototype.hasOwnProperty;var B=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),QA=(t,e)=>{for(var r in e)P3(t,r,{get:e[r],enumerable:!0})},YKe=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of OKe(e))!GKe.call(t,n)&&n!==r&&P3(t,n,{get:()=>e[n],enumerable:!(s=PKe(e,n))||s.enumerable});return t};var le=(t,e,r)=>(r=t!=null?_Ke(HKe(t)):{},YKe(e||!t||!t.__esModule?P3(r,"default",{value:t,enumerable:!0}):r,t));var wae=E(Bm=>{"use strict";var SEr=B("net"),jKe=B("tls"),Y3=B("http"),Qae=B("https"),KKe=B("events"),NEr=B("assert"),ZKe=B("util");Bm.httpOverHttp=XKe;Bm.httpsOverHttp=$Ke;Bm.httpOverHttps=eZe;Bm.httpsOverHttps=tZe;function XKe(t){var e=new yl(t);return e.request=Y3.request,e}function $Ke(t){var e=new yl(t);return e.request=Y3.request,e.createSocket=yae,e.defaultPort=443,e}function eZe(t){var e=new yl(t);return e.request=Qae.request,e}function tZe(t){var e=new yl(t);return e.request=Qae.request,e.createSocket=yae,e.defaultPort=443,e}function yl(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||Y3.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(s,n,i,o){for(var a=bae(n,i,o),A=0,c=e.requests.length;A<c;++A){var u=e.requests[A];if(u.host===a.host&&u.port===a.port){e.requests.splice(A,1),u.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)})}ZKe.inherits(yl,KKe.EventEmitter);yl.prototype.addRequest=function(e,r,s,n){var i=this,o=q3({request:e},i.options,bae(r,s,n));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",A),a.on("close",c),a.on("agentRemove",c),e.onSocket(a);function A(){i.emit("free",a,o)}function c(u){i.removeSocket(a),a.removeListener("free",A),a.removeListener("close",c),a.removeListener("agentRemove",c)}})};yl.prototype.createSocket=function(e,r){var s=this,n={};s.sockets.push(n);var i=q3({},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")),Kd("making CONNECT request");var o=s.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",A),o.once("connect",c),o.once("error",u),o.end();function a(l){l.upgrade=!0}function A(l,d,h){process.nextTick(function(){c(l,d,h)})}function c(l,d,h){if(o.removeAllListeners(),d.removeAllListeners(),l.statusCode!==200){Kd("tunneling socket could not be established, statusCode=%d",l.statusCode),d.destroy();var f=new Error("tunneling socket could not be established, statusCode="+l.statusCode);f.code="ECONNRESET",e.request.emit("error",f),s.removeSocket(n);return}if(h.length>0){Kd("got illegal response body from proxy"),d.destroy();var f=new Error("got illegal response body from proxy");f.code="ECONNRESET",e.request.emit("error",f),s.removeSocket(n);return}return Kd("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=d,r(d)}function u(l){o.removeAllListeners(),Kd(`tunneling socket could not be established, cause=%s
|
||||
`,l.message,l.stack);var d=new Error("tunneling socket could not be established, cause="+l.message);d.code="ECONNRESET",e.request.emit("error",d),s.removeSocket(n)}};yl.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 yae(t,e){var r=this;yl.prototype.createSocket.call(r,t,function(s){var n=t.request.getHeader("host"),i=q3({},r.options,{socket:s,servername:n?n.replace(/:.*$/,""):t.host}),o=jKe.connect(0,i);r.sockets[r.sockets.indexOf(s)]=o,e(o)})}function bae(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function q3(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 Kd;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Kd=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)}:Kd=function(){};Bm.debug=Kd});var V3=E((REr,Sae)=>{Sae.exports=wae()});var Hr=E((TEr,Nae)=>{Nae.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 $t=E((xEr,Zae)=>{"use strict";var Dae=Symbol.for("undici.error.UND_ERR"),Zr=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[Dae]===!0}[Dae]=!0},Rae=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),J3=class extends Zr{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[Rae]===!0}[Rae]=!0},Tae=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),W3=class extends Zr{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[Tae]===!0}[Tae]=!0},xae=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),z3=class extends Zr{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[xae]===!0}[xae]=!0},kae=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),j3=class extends Zr{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[kae]===!0}[kae]=!0},Fae=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),K3=class extends Zr{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 E$e(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(t$e.has(o)){n=o;break}}n!==""&&(t.referrerPolicy=n)}function m$e(){return"allowed"}function C$e(){return"success"}function I$e(){return"success"}function B$e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function Q$e(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&&P8(t.origin)&&!P8(XQ(t))&&(e=null);break;case"same-origin":wR(t,XQ(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function xm(t,e){return t}function y$e(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:xm(t.domainLookupStartTime,r),domainLookupEndTime:xm(t.domainLookupEndTime,r),connectionStartTime:xm(t.connectionStartTime,r),connectionEndTime:xm(t.connectionEndTime,r),secureConnectionStartTime:xm(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function b$e(t){return xm(o$e.now(),t)}function w$e(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 dce(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function S$e(t){return{referrerPolicy:t.referrerPolicy}}function N$e(t){let e=t.referrerPolicy;Eg(e);let r=null;if(t.referrer==="client"){let a=oce();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let s=_8(r),n=_8(r,!0);s.toString().length>4096&&(s=n);let i=wR(t,s),o=ZQ(s)&&!ZQ(t.url);switch(e){case"origin":return n??_8(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=XQ(t);return wR(s,a)?s:ZQ(s)&&!ZQ(a)?"no-referrer":n}default:return o?"no-referrer":n}}function _8(t,e){return Eg(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 ZQ(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 D$e(t,e){if(bR===void 0)return!0;let r=hce(e);if(r==="no metadata"||r.length===0)return!0;let s=T$e(r),n=x$e(r,s);for(let i of n){let o=i.algo,a=i.hash,A=bR.createHash(o).update(t).digest("base64");if(A[A.length-1]==="="&&(A[A.length-2]==="="?A=A.slice(0,-2):A=A.slice(0,-1)),k$e(A,a))return!0}return!1}var R$e=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function hce(t){let e=[],r=!0;for(let s of t.split(" ")){r=!1;let n=R$e.exec(s);if(n===null||n.groups===void 0||n.groups.algo===void 0)continue;let i=n.groups.algo.toLowerCase();Ace.includes(i)&&e.push(n.groups)}return r===!0?"no metadata":e}function T$e(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 x$e(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 k$e(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 F$e(t){}function wR(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function M$e(){let t,e;return{promise:new Promise((s,n)=>{t=s,e=n}),resolve:t,reject:e}}function U$e(t){return t.controller.state==="aborted"}function v$e(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function L$e(t){return c$e[t.toLowerCase()]??t}function _$e(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return Eg(typeof e=="string"),e}var P$e=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function fce(t,e,r=0,s=1){class n{
Line truncated
|
||||
`);function pet(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function Eet(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 met(t,e){NR(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&&DR(t,fet,i)||i.position===t.length-4&&DR(t,get,i))return n;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let a=Cet(t,i);if(a==="failure")return"failure";let{name:A,filename:c,contentType:u,encoding:l}=a;i.position+=2;let d;{let f=t.indexOf(s.subarray(2),i.position);if(f===-1)return"failure";d=t.subarray(i.position,f-4),i.position+=d.length,l==="base64"&&(d=Buffer.from(d.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let h;c!==null?(u??="text/plain",pet(u)||(u=""),h=new det([d],c,{type:u})):h=oet(Buffer.from(d)),NR(Sce(A)),NR(typeof h=="string"&&Sce(h)||Aet(h)),n.push(cet(A,h,c))}}function Cet(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=Fm(a=>a!==10&&a!==13&&a!==58,t,e);if(o=J8(o,!0,!0,a=>a===9||a===32),!aet.test(o.toString())||t[e.position]!==58)return"failure";switch(e.position++,Fm(a=>a===32||a===9,t,e),iet(o)){case"content-disposition":{if(r=s=null,!DR(t,het,e)||(e.position+=17,r=Rce(t,e),r===null))return"failure";if(DR(t,Dce,e)){let a=e.position+Dce.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,s=Rce(t,e),s===null))return"failure"}break}case"content-type":{let a=Fm(A=>A!==10&&A!==13,t,e);a=J8(a,!1,!0,A=>A===9||A===32),n=Nce(a);break}case"content-transfer-encoding":{let a=Fm(A=>A!==10&&A!==13,t,e);a=J8(a,!1,!0,A=>A===9||A===32),i=Nce(a);break}default:Fm(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function Rce(t,e){NR(t[e.position-1]===34);let r=Fm(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 Fm(t,e,r){let s=r.position;for(;s<e.length&&t(e[s]);)++s;return e.subarray(r.position,r.position=s)}function J8(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 DR(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}Tce.exports={multipartFormDataParser:met,validateBoundary:Eet}});var vm=E((rmr,Hce)=>{"use strict";var ty=Qt(),{ReadableStreamFrom:Iet,isBlobLike:kce,isReadableStreamLike:Bet,readableStreamClose:Qet,createDeferredPromise:yet,fullyReadBody:bet,extractMimeType:wet,utf8DecodeBytes:Uce}=go(),{FormData:Fce}=ey(),{kState:Um}=Zd(),{webidl:Net}=Nn(),{Blob:Det}=B("node:buffer"),W8=B("node:assert"),{isErrored:vce,isDisturbed:Ret}=B("node:stream"),{isArrayBuffer:Tet}=B("node:util/types"),{serializeAMimeType:xet}=Li(),{multipartFormDataParser:ket}=xce(),z8;try{let t=B("node:crypto");z8=e=>t.randomInt(0,e)}catch{z8=t=>Math.floor(Math.random(t))}var RR=new TextEncoder;function Fet(){}var Lce=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,_ce;Lce&&(_ce=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!Ret(e)&&!vce(e)&&e.cancel("Response object has been garbage collected").catch(Fet)}));function Pce(t,e=!1){let r=null;t instanceof ReadableStream?r=t:kce(t)?r=t.stream():r=new ReadableStream({async pull(A){let c=typeof n=="string"?RR.encode(n):n;c.byteLength&&A.enqueue(c),queueMicrotask(()=>Qet(A))},start(){},type:"bytes"}),W8(Bet(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(Tet(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(ty.isFormDataLike(t)){let A=`----formdata-undici-0${`${z8(1e11)}`.padStart(11,"0")}`,c=`--${A}\r
|
||||
Content-Disposition: form-data`;let u=C=>C.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),l=C=>C.replace(/\r?\n|\r/g,`\r
|
||||
`),d=[],h=new Uint8Array([13,10]);i=0;let g=!1;for(let[C,m]of t)if(typeof m=="string"){let I=h_.encode(c+`; name="${u(l(C))}"\r
|
||||
`),d=[],h=new Uint8Array([13,10]);i=0;let f=!1;for(let[C,m]of t)if(typeof m=="string"){let I=RR.encode(c+`; name="${u(l(C))}"\r
|
||||
\r
|
||||
${l(m)}\r
|
||||
`);d.push(I),i+=I.byteLength}else{let I=h_.encode(`${c}; name="${u(l(C))}"`+(m.name?`; filename="${u(m.name)}"`:"")+`\r
|
||||
`);d.push(I),i+=I.byteLength}else{let I=RR.encode(`${c}; name="${u(l(C))}"`+(m.name?`; filename="${u(m.name)}"`:"")+`\r
|
||||
Content-Type: ${m.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);d.push(I,m,h),typeof m.size=="number"?i+=I.byteLength+m.size+h.byteLength:g=!0}let p=h_.encode(`--${A}--\r
|
||||
`);d.push(p),i+=p.byteLength,g&&(i=null),s=t,n=async function*(){for(let C of d)C.stream?yield*C.stream():yield C},o=`multipart/form-data; boundary=${A}`}else if(wke(t))s=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(HT.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:KUt(t)}if((typeof s=="string"||HT.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let A;r=new ReadableStream({async start(){A=n(t)[Symbol.asyncIterator]()},async pull(c){let{value:u,done:l}=await A.next();if(l)queueMicrotask(()=>{c.close(),c.byobRequest?.respond(0)});else if(!Dke(r)){let d=new Uint8Array(u);d.byteLength&&c.enqueue(d)}return c.desiredSize>0},async cancel(c){await A.return()},type:"bytes"})}return[{stream:r,source:s,length:i},o]}function cPt(t,e=!1){return t instanceof ReadableStream&&(rZ(!HT.isDisturbed(t),"The body has already been consumed."),rZ(!t.locked,"The stream is locked.")),kke(t,e)}function uPt(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}function lPt(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function dPt(t){return{blob(){return db(this,r=>{let n=Ske(this);return n===null?n="":n&&(n=oPt(n)),new nPt([r],{type:n})},t)},arrayBuffer(){return db(this,r=>new Uint8Array(r).buffer,t)},text(){return db(this,Rke,t)},json(){return db(this,gPt,t)},formData(){return db(this,r=>{let n=Ske(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=aPt(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Nke;return i[hb]=s,i}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),i=new Nke;for(let[o,a]of s)i.append(o,a);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return db(this,r=>new Uint8Array(r),t)}}}function hPt(t){Object.assign(t.prototype,dPt(t))}async function db(t,e,r){if(rPt.brandCheck(t,r),Fke(t))throw new TypeError("Body is unusable: Body has already been read");lPt(t[hb]);let n=$Ut(),s=o=>n.reject(o),i=o=>{try{n.resolve(e(o))}catch(a){s(a)}};return t[hb].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(await ePt(t[hb].body,i,s),n.promise)}function Fke(t){let e=t[hb].body;return e!=null&&(e.stream.locked||HT.isDisturbed(e.stream))}function gPt(t){return JSON.parse(Rke(t))}function Ske(t){let e=t[hb].headersList,r=tPt(e);return r==="failure"?null:r}Mke.exports={extractBody:kke,safelyExtractBody:cPt,cloneBody:uPt,mixinBody:hPt,streamRegistry:Tke,hasFinalizationRegistry:xke,bodyUnusable:Fke}});var Jke=f((sbn,Yke)=>{"use strict";var xt=B("node:assert"),Yt=mr(),{channels:vke}=tb(),sZ=_X(),{RequestContentLengthMismatchError:aB,ResponseContentLengthMismatchError:fPt,RequestAbortedError:Hke,HeadersTimeoutError:pPt,HeadersOverflowError:mPt,SocketError:C_,InformationalError:fb,BodyTimeoutError:EPt,HTTPParserError:CPt,ResponseExceededMaxSizeError:IPt}=tn(),{kUrl:qke,kReset:bA,kClient:AZ,kParser:Js,kBlocking:YT,kRunning:sa,kPending:BPt,kSize:Lke,kWriting:Vm,kQueue:Ad,kNoRef:qT,kKeepAliveDefaultTimeout:QPt,kHostHeader:yPt,kPendingIdx:bPt,kRunningIdx:ku,kError:Fu,kPipelining:m_,kSocket:pb,kKeepAliveTimeoutValue:I_,kMaxHeadersSize:iZ,kKeepAliveMaxTimeout:wPt,kKeepAliveTimeoutThreshold:NPt,kHeadersTimeout:SPt,kBodyTimeout:RPt,kStrictContentLength:cZ,kMaxRequests:Uke,kCounter:DPt,kMaxResponseSize:xPt,kOnError:TPt,kResume:Jm,kHTTPContext:Gke}=ps(),Qh=T1e(),kPt=Buffer.alloc(0),g_=Buffer[Symbol.species],f_=Yt.addListener,FPt=Yt.removeAllListeners,oZ;async function MPt(){let t=process.env.JEST_WORKER_ID?qX():void 0,e;try{e=await WebAssembly.compile(M1e())}catch{e=await WebAssembly.compile(t||qX())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,s)=>0,wasm_on_status:(r,n,s)=>{xt(Hi.ptr===r);let i=n-bh+yh.byteOffset;return Hi.onStatus(new g_(yh.buffer,i,s))||0},wasm_on_message_begin:r=>(xt(Hi.ptr===r),Hi.onMessageBegin()||0),wasm_on_header_field:(r,n,s)=>{xt(Hi.ptr===r);let i=n-bh+yh.byteOffset;return Hi.onHeaderField(new g_(yh.buffer,i,s))||0},wasm_on_header_value:(r,n,s)=>{xt(Hi.ptr===r);let i=n-bh+yh.byteOffset;return Hi.onHeaderValue(new g_(yh.buffer,i,s))||0},wasm_on_headers_complete:(r,n,s,i)=>(xt(Hi.ptr===r),Hi.onHeadersComplete(n,!!s,!!i)||0),wasm_on_body:(r,n,s)=>{xt(Hi.ptr===r);let i=n-bh+yh.byteOffset;return Hi.onBody(new g_(yh.buffer,i,s))||0},wasm_on_message_complete:r=>(xt(Hi.ptr===r),Hi.onMessageComplete()||0)}})}var aZ=null,uZ=MPt();uZ.catch();var Hi=null,yh=null,p_=0,bh=null,vPt=0,GT=1,mb=2|GT,E_=4|GT,lZ=8|vPt,dZ=class{constructor(e,r,{exports:n}){xt(Number.isFinite(e[iZ])&&e[iZ]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Qh.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=[],thi
Line truncated
|
||||
`;if(typeof s=="string"?p+=`host: ${s}\r
|
||||
`:p+=t[yPt],i?p+=`connection: upgrade\r
|
||||
`);d.push(I,m,h),typeof m.size=="number"?i+=I.byteLength+m.size+h.byteLength:f=!0}let p=RR.encode(`--${A}--\r
|
||||
`);d.push(p),i+=p.byteLength,f&&(i=null),n=t,s=async function*(){for(let C of d)C.stream?yield*C.stream():yield C},o=`multipart/form-data; boundary=${A}`}else if(kce(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(ty.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Iet(t)}if((typeof n=="string"||ty.isBuffer(n))&&(i=Buffer.byteLength(n)),s!=null){let A;r=new ReadableStream({async start(){A=s(t)[Symbol.asyncIterator]()},async pull(c){let{value:u,done:l}=await A.next();if(l)queueMicrotask(()=>{c.close(),c.byobRequest?.respond(0)});else if(!vce(r)){let d=new Uint8Array(u);d.byteLength&&c.enqueue(d)}return c.desiredSize>0},async cancel(c){await A.return()},type:"bytes"})}return[{stream:r,source:n,length:i},o]}function Met(t,e=!1){return t instanceof ReadableStream&&(W8(!ty.isDisturbed(t),"The body has already been consumed."),W8(!t.locked,"The stream is locked.")),Pce(t,e)}function Uet(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function vet(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function Let(t){return{blob(){return Mm(this,r=>{let s=Mce(this);return s===null?s="":s&&(s=xet(s)),new Det([r],{type:s})},t)},arrayBuffer(){return Mm(this,r=>new Uint8Array(r).buffer,t)},text(){return Mm(this,Uce,t)},json(){return Mm(this,Pet,t)},formData(){return Mm(this,r=>{let s=Mce(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=ket(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Fce;return i[Um]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new Fce;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 Mm(this,r=>new Uint8Array(r),t)}}}function _et(t){Object.assign(t.prototype,Let(t))}async function Mm(t,e,r){if(Net.brandCheck(t,r),Oce(t))throw new TypeError("Body is unusable: Body has already been read");vet(t[Um]);let s=yet(),n=o=>s.reject(o),i=o=>{try{s.resolve(e(o))}catch(a){n(a)}};return t[Um].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await bet(t[Um].body,i,n),s.promise)}function Oce(t){let e=t[Um].body;return e!=null&&(e.stream.locked||ty.isDisturbed(e.stream))}function Pet(t){return JSON.parse(Uce(t))}function Mce(t){let e=t[Um].headersList,r=wet(e);return r==="failure"?null:r}Hce.exports={extractBody:Pce,safelyExtractBody:Met,cloneBody:Uet,mixinBody:_et,streamRegistry:_ce,hasFinalizationRegistry:Lce,bodyUnusable:Oce}});var Xce=E((smr,Zce)=>{"use strict";var ze=B("node:assert"),ot=Qt(),{channels:Gce}=ym(),j8=T8(),{RequestContentLengthMismatchError:mg,ResponseContentLengthMismatchError:Oet,RequestAbortedError:zce,HeadersTimeoutError:Het,HeadersOverflowError:Get,SocketError:UR,InformationalError:Lm,BodyTimeoutError:Yet,HTTPParserError:qet,ResponseExceededMaxSizeError:Vet}=$t(),{kUrl:jce,kReset:_i,kClient:$8,kParser:As,kBlocking:ny,kRunning:On,kPending:Jet,kSize:Yce,kWriting:$d,kQueue:bA,kNoRef:ry,kKeepAliveDefaultTimeout:Wet,kHostHeader:zet,kPendingIdx:jet,kRunningIdx:fa,kError:ga,kPipelining:FR,kSocket:_m,kKeepAliveTimeoutValue:vR,kMaxHeadersSize:K8,kKeepAliveMaxTimeout:Ket,kKeepAliveTimeoutThreshold:Zet,kHeadersTimeout:Xet,kBodyTimeout:$et,kStrictContentLength:e4,kMaxRequests:qce,kCounter:ett,kMaxResponseSize:ttt,kOnError:rtt,kResume:Xd,kHTTPContext:Kce}=Hr(),xc=_Ae(),stt=Buffer.alloc(0),TR=Buffer[Symbol.species],xR=ot.addListener,ntt=ot.removeAllListeners,Z8;async function itt(){let t=process.env.JEST_WORKER_ID?F8():void 0,e;try{e=await WebAssembly.compile(HAe())}catch{e=await WebAssembly.compile(t||F8())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,n)=>0,wasm_on_status:(r,s,n)=>{ze(Ys.ptr===r);let i=s-Fc+kc.byteOffset;return Ys.onStatus(new TR(kc.buffer,i,n))||0},wasm_on_message_begin:r=>(ze(Ys.ptr===r),Ys.onMessageBegin()||0),wasm_on_header_field:(r,s,n)=>{ze(Ys.ptr===r);let i=s-Fc+kc.byteOffset;return Ys.onHeaderField(new TR(kc.buffer,i,n))||0},wasm_on_header_value:(r,s,n)=>{ze(Ys.ptr===r);let i=s-Fc+kc.byteOffset;return Ys.onHeaderValue(new TR(kc.buffer,i,n))||0},wasm_on_headers_complete:(r,s,n,i)=>(ze(Ys.ptr===r),Ys.onHeadersComplete(s,!!n,!!i)||0),wasm_on_body:(r,s,n)=>{ze(Ys.ptr===r);let i=s-Fc+kc.byteOffset;return Ys.onBody(new TR(kc.buffer,i,n))||0},wasm_on_message_complete:r=>(ze(Ys.ptr===r),Ys.onMessageComplete()||0)}})}var X8=null,t4=itt();t4.catch();var Ys=null,kc=null,kR=0,Fc=null,ott=0,sy=1,Pm=2|sy,MR=4|sy,r4=8|ott,s4=class{constructor(e,r,{exports:s}){ze(Number.isFinite(e[K8])&&e[K8]>0),this.llhttp=s,this.ptr=this.llhttp.llhttp_alloc(xc.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=[],thi
Line truncated
|
||||
`;if(typeof n=="string"?p+=`host: ${n}\r
|
||||
`:p+=t[zet],i?p+=`connection: upgrade\r
|
||||
upgrade: ${i}\r
|
||||
`:t[m_]&&!h[bA]?p+=`connection: keep-alive\r
|
||||
`:t[FR]&&!h[_i]?p+=`connection: keep-alive\r
|
||||
`:p+=`connection: close\r
|
||||
`,Array.isArray(c))for(let C=0;C<c.length;C+=2){let m=c[C+0],I=c[C+1];if(Array.isArray(I))for(let y=0;y<I.length;y++)p+=`${m}: ${I[y]}\r
|
||||
`,Array.isArray(c))for(let C=0;C<c.length;C+=2){let m=c[C+0],I=c[C+1];if(Array.isArray(I))for(let Q=0;Q<I.length;Q++)p+=`${m}: ${I[Q]}\r
|
||||
`;else p+=`${m}: ${I}\r
|
||||
`}return vke.sendHeaders.hasSubscribers&&vke.sendHeaders.publish({request:e,headers:p,socket:h}),!A||d===0?_ke(g,null,t,e,h,u,p,l):Yt.isBuffer(A)?_ke(g,A,t,e,h,u,p,l):Yt.isBlobLike(A)?typeof A.stream=="function"?Oke(g,A.stream(),t,e,h,u,p,l):HPt(g,A,t,e,h,u,p,l):Yt.isStream(A)?OPt(g,A,t,e,h,u,p,l):Yt.isIterable(A)?Oke(g,A,t,e,h,u,p,l):xt(!1),!0}function OPt(t,e,r,n,s,i,o,a){xt(i!==0||r[sa]===0,"stream body cannot be pipelined");let A=!1,c=new B_({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(g){if(!A)try{!c.write(g)&&this.pause&&this.pause()}catch(p){Yt.destroy(this,p)}},l=function(){A||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!A){let g=new Hke;queueMicrotask(()=>h(g))}},h=function(g){if(!A){if(A=!0,xt(s.destroyed||s[Vm]&&r[sa]<=1),s.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!g)try{c.end()}catch(p){g=p}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?Yt.destroy(e,g):Yt.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),s.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(d)}function _ke(t,e,r,n,s,i,o,a){try{e?Yt.isBuffer(e)&&(xt(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
`}return Gce.sendHeaders.hasSubscribers&&Gce.sendHeaders.publish({request:e,headers:p,socket:h}),!A||d===0?Jce(f,null,t,e,h,u,p,l):ot.isBuffer(A)?Jce(f,A,t,e,h,u,p,l):ot.isBlobLike(A)?typeof A.stream=="function"?Wce(f,A.stream(),t,e,h,u,p,l):dtt(f,A,t,e,h,u,p,l):ot.isStream(A)?ltt(f,A,t,e,h,u,p,l):ot.isIterable(A)?Wce(f,A,t,e,h,u,p,l):ze(!1),!0}function ltt(t,e,r,s,n,i,o,a){ze(i!==0||r[On]===0,"stream body cannot be pipelined");let A=!1,c=new LR({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(f){if(!A)try{!c.write(f)&&this.pause&&this.pause()}catch(p){ot.destroy(this,p)}},l=function(){A||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!A){let f=new zce;queueMicrotask(()=>h(f))}},h=function(f){if(!A){if(A=!0,ze(n.destroyed||n[$d]&&r[On]<=1),n.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!f)try{c.end()}catch(p){f=p}c.destroy(f),f&&(f.code!=="UND_ERR_INFO"||f.message!=="reset")?ot.destroy(e,f):ot.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),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(d)}function Jce(t,e,r,s,n,i,o,a){try{e?ot.isBuffer(e)&&(ze(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!a&&n.reset!==!1&&(s[bA]=!0)):i===0?s.write(`${o}content-length: 0\r
|
||||
`,"latin1"),n.write(e),n.uncork(),s.onBodySent(e),!a&&s.reset!==!1&&(n[_i]=!0)):i===0?n.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(xt(i===null,"no body must not have content length"),s.write(`${o}\r
|
||||
`,"latin1")),n.onRequestSent(),r[Jm]()}catch(A){t(A)}}async function HPt(t,e,r,n,s,i,o,a){xt(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new aB;let A=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
`,"latin1"):(ze(i===null,"no body must not have content length"),n.write(`${o}\r
|
||||
`,"latin1")),s.onRequestSent(),r[Xd]()}catch(A){t(A)}}async function dtt(t,e,r,s,n,i,o,a){ze(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new mg;let A=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(A),s.uncork(),n.onBodySent(A),n.onRequestSent(),!a&&n.reset!==!1&&(s[bA]=!0),r[Jm]()}catch(A){t(A)}}async function Oke(t,e,r,n,s,i,o,a){xt(i!==0||r[sa]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let u=()=>new Promise((d,h)=>{xt(A===null),s[Fu]?h(s[Fu]):A=d});s.on("close",c).on("drain",c);let l=new B_({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(s[Fu])throw s[Fu];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{s.off("close",c).off("drain",c)}}var B_=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[Vm]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[Fu])throw r[Fu];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(s!==null&&o+c>s){if(i[cZ])throw new aB;process.emitWarning(new aB)}r.cork(),o===0&&(!a&&n.reset!==!1&&(r[bA]=!0),s===null?r.write(`${A}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${A}content-length: ${s}\r
|
||||
`,"latin1"),n.write(A),n.uncork(),s.onBodySent(A),s.onRequestSent(),!a&&s.reset!==!1&&(n[_i]=!0),r[Xd]()}catch(A){t(A)}}async function Wce(t,e,r,s,n,i,o,a){ze(i!==0||r[On]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let u=()=>new Promise((d,h)=>{ze(A===null),n[ga]?h(n[ga]):A=d});n.on("close",c).on("drain",c);let l=new LR({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(n[ga])throw n[ga];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{n.off("close",c).off("drain",c)}}var LR=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[$d]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[ga])throw r[ga];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(n!==null&&o+c>n){if(i[e4])throw new mg;process.emitWarning(new mg)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[_i]=!0),n===null?r.write(`${A}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${A}content-length: ${n}\r
|
||||
\r
|
||||
`,"latin1")),s===null&&r.write(`\r
|
||||
`,"latin1")),n===null&&r.write(`\r
|
||||
${c.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=c;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[Js].timeout&&r[Js].timeoutType===mb&&r[Js].timeout.refresh&&r[Js].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[Vm]=!1,e[Fu])throw e[Fu];if(!e.destroyed){if(s===0?i?e.write(`${o}content-length: 0\r
|
||||
`,"latin1"),this.bytesWritten+=c;let u=r.write(e);return r.uncork(),s.onBodySent(e),u||r[As].timeout&&r[As].timeoutType===Pm&&r[As].timeout.refresh&&r[As].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:s,bytesWritten:n,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[$d]=!1,e[ga])throw e[ga];if(!e.destroyed){if(n===0?i?e.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${o}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&s!==r){if(n[cZ])throw new aB;process.emitWarning(new aB)}e[Js].timeout&&e[Js].timeoutType===mb&&e[Js].timeout.refresh&&e[Js].timeout.refresh(),n[Jm]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Vm]=!1,e&&(xt(n[sa]<=1,"pipeline should only contain this request"),s(e))}};Yke.exports=LPt});var $ke=f((ibn,Zke)=>{"use strict";var Mu=B("node:assert"),{pipeline:qPt}=B("node:stream"),wr=mr(),{RequestContentLengthMismatchError:hZ,RequestAbortedError:Vke,SocketError:JT,InformationalError:gZ}=tn(),{kUrl:Q_,kReset:b_,kClient:Eb,kRunning:w_,kPending:GPt,kQueue:Wm,kPendingIdx:fZ,kRunningIdx:cd,kError:ld,kSocket:oo,kStrictContentLength:YPt,kOnError:pZ,kMaxConcurrentStreams:Xke,kHTTP2Session:ud,kResume:zm,kSize:JPt,kHTTPContext:VPt}=ps(),Yf=Symbol("open streams"),Wke,zke=!1,y_;try{y_=B("node:http2")}catch{y_={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:WPt,HTTP2_HEADER_METHOD:zPt,HTTP2_HEADER_PATH:jPt,HTTP2_HEADER_SCHEME:KPt,HTTP2_HEADER_CONTENT_LENGTH:XPt,HTTP2_HEADER_EXPECT:ZPt,HTTP2_HEADER_STATUS:$Pt}}=y_;function e_t(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}async function t_t(t,e){t[oo]=e,zke||(zke=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=y_.connect(t[Q_],{createConnection:()=>e,peerMaxConcurrentStreams:t[Xke]});r[Yf]=0,r[Eb]=t,r[oo]=e,wr.addListener(r,"error",n_t),wr.addListener(r,"frameError",s_t),wr.addListener(r,"end",i_t),wr.addListener(r,"goaway",o_t),wr.addListener(r,"close",function(){let{[Eb]:s}=this,{[oo]:i}=s,o=this[oo][ld]||this[ld]||new JT("closed",wr.getSocketInfo(i));if(s[ud]=null,s.destroyed){Mu(s[GPt]===0);let a=s[Wm].splice(s[cd]);for(let A=0;A<a.length;A++){let c=a[A];wr.errorRequest(s,c,o)}}}),r.unref(),t[ud]=r,e[ud]=r,wr.addListener(e,"error",function(s){Mu(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[ld]=s,this[Eb][pZ](s)}),wr.addListener(e,"end",function(){wr.destroy(this,new JT("other side closed",wr.getSocketInfo(this)))}),wr.addListener(e,"close",function(){let s=this[ld]||new JT("closed",wr.getSocketInfo(this));t[oo]=null,this[ud]!=null&&this[ud].destroy(s),t[fZ]=t[cd],Mu(t[w_]===0),t.emit("disconnect",t[Q_],[t],s),t[zm]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return A_t(t,...s)},resume(){r_t(t)},destroy(s,i){n?queueMicrotask(i):e.destroy(s).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function r_t(t){let e=t[oo];e?.destroyed===!1&&(t[JPt]===0&&t[Xke]===0?(e.unref(),t[ud].unref()):(e.ref(),t[ud].ref()))}function n_t(t){Mu(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[oo][ld]=t,this[Eb][pZ](t)}function s_t(t,e,r){if(r===0){let n=new gZ(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[oo][ld]=n,this[Eb][pZ](n)}}function i_t(){let t=new JT("other side closed",wr.getSocketInfo(this[oo]));this.destroy(t),wr.destroy(this[oo],t)}function o_t(t){let e=this[ld]||new JT(`HTTP/2: "GOAWAY" frame received with code ${t}`,wr.getSocketInfo(this)),r=this[Eb];if(r[oo]=null,r[VPt]=null,this[ud]!=null&&(this[ud].destroy(e),this[ud]=null),wr.destroy(this[oo],e),r[cd]<r[Wm].length){let n=r[Wm][r[cd]];r[Wm][r[cd]++]=null,wr.errorRequest(r,n,e),r[fZ]=r[cd]}Mu(r[w_]===0),r.emit("disconnect",r[Q_],[r],e),r[zm]()}function a_t(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function A_t(t,e){let r=t[ud],{method:n,path:s,host:i,upgrade:o,expectContinue:a,signal:A,headers:c}=e,{body:u}=e;if(o)return wr.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let w=0;w<c.length;w+=2){let H=c[w+0],z=c[w+1];if(Array.isArray(z))for(let F=0;F<z.length;F++)l[H]?l[H]+=`,${z[F]}`:l[H]=z[F];else l[H]=z}let d,{hostname:h,port:g}=t[Q_];l[WPt]=i||`${h}${g?`:${g}`:""}`,l[zPt]=n;let p=w=>{e.aborted||e.completed||(w=w||new Vke,wr.errorRequest(t,e,w),d!=null&&wr.destroy(d,w),wr.destroy(u,w),t[Wm][t[cd]++]=null,t[zm]())};try{e.onConnect(p)}catch(w){wr.errorRequest(t,e,w)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),d=r.request(l,{endStream:!1,signal:A}),d.id&&!d.pending?(e.onUpgrade(null,null,d),++r[Yf],t[Wm][t[cd]++]=null):d.once("ready",()=>{e.onUpgrade(null,null,d),++r[Yf],t[Wm][t[cd]++]=null}),d.once("close",()=>{r[Yf]-=1,r[Yf]===0&&r.unref()}),!0;l[jPt]=s,l[KPt]="https";let C=n==="PUT"||n==="POST"||n==="PATCH";u&&typeof u.read=="function"&&u.read(0);let m=wr.bodyLength(u);if(wr.isFormDataLike(u)){Wke??=gb().extractBody;let[w,H]=Wke(u);l["content-type"]=H,u=w.stream,m=w.length}if(m==null&&(m=e.contentLength),(m===0||!C)&&(m=null),a_t(n)&&m>0&&e.contentLength!=null&&e.contentLength!==m){if(t[YPt])return wr.errorRequest(t,e,new hZ),!1;process.emitWarning(new hZ)}m!=null&&(Mu(u,"no body must not have content length"),l[XPt]=`${m}`),r.ref();let I=n==="GET"||n==="HEAD"||u===null;return a?(l[ZPt]="100-continue",d=r.request(l,{endStream:I,signal:A}),d.once("cont
Line truncated
|
||||
`,this[M_t]=A??3e5,this[F_t]=s??3e5,this[v_t]=I??!0,this[L_t]=w,this[IZ]=z,this[Km]=null,this[H_t]=W>-1?W:-1,this[G_t]=oe??100,this[fi]=null,this[dd]=[],this[Vf]=0,this[hd]=0,this[jT]=he=>QZ(this,he),this[q_t]=he=>l2e(this,he)}get pipelining(){return this[D_]}set pipelining(e){this[D_]=e,this[jT](!0)}get[ZT](){return this[dd].length-this[hd]}get[XT](){return this[hd]-this[Vf]}get[KT](){return this[dd].length-this[Vf]}get[N_t](){return!!this[fi]&&!this[Ib]&&!this[fi].destroyed}get[CZ](){return!!(this[fi]?.busy(null)||this[KT]>=(u2e(this)||1)||this[ZT]>0)}[w_t](e){d2e(this),this.once("connect",e)}[O_t](e,r){let n=e.origin||this[Nh].origin,s=new C_t(n,e,r);return this[dd].push(s),this[cB]||(AB.bodyLength(s.body)==null&&AB.isIterable(s.body)?(this[cB]=1,queueMicrotask(()=>QZ(this))):this[jT](!0)),this[cB]&&this[Xm]!==2&&this[CZ]&&(this[Xm]=2),this[Xm]<2}async[P_t](){return new Promise(e=>{this[KT]?this[Km]=e:e(null)})}async[__t](e){return new Promise(r=>{let n=this[dd].splice(this[hd]);for(let i=0;i<n.length;i++){let o=n[i];AB.errorRequest(this,o,e)}let s=()=>{this[Km]&&(this[Km](),this[Km]=null),r(null)};this[fi]?(this[fi].destroy(e,s),this[fi]=null):queueMicrotask(s),this[jT]()})}},V_t=R_();function l2e(t,e){if(t[XT]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Jf(t[hd]===t[Vf]);let r=t[dd].splice(t[Vf]);for(let n=0;n<r.length;n++){let s=r[n];AB.errorRequest(t,s,e)}Jf(t[KT]===0)}}async function d2e(t){Jf(!t[Ib]),Jf(!t[fi]);let{host:e,hostname:r,protocol:n,port:s}=t[Nh];if(r[0]==="["){let i=r.indexOf("]");Jf(i!==-1);let o=r.substring(1,i);Jf(c2e.isIP(o)),r=o}t[Ib]=!0,Cb.beforeConnect.hasSubscribers&&Cb.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[fi]?.version,servername:t[jm],localAddress:t[zT]},connector:t[WT]});try{let i=await new Promise((o,a)=>{t[WT]({host:e,hostname:r,protocol:n,port:s,servername:t[jm],localAddress:t[zT]},(A,c)=>{A?a(A):o(c)})});if(t.destroyed){AB.destroy(i.on("error",a2e),new Q_t);return}Jf(i);try{t[fi]=i.alpnProtocol==="h2"?await J_t(t,i):await Y_t(t,i)}catch(o){throw i.destroy().on("error",a2e),o}t[Ib]=!1,i[U_t]=0,i[IZ]=t[IZ],i[b_t]=t,i[R_t]=null,Cb.connected.hasSubscribers&&Cb.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[fi]?.version,servername:t[jm],localAddress:t[zT]},connector:t[WT],socket:i}),t.emit("connect",t[Nh],[t])}catch(i){if(t.destroyed)return;if(t[Ib]=!1,Cb.connectError.hasSubscribers&&Cb.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[fi]?.version,servername:t[jm],localAddress:t[zT]},connector:t[WT],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Jf(t[XT]===0);t[ZT]>0&&t[dd][t[hd]].servername===t[jm];){let o=t[dd][t[hd]++];AB.errorRequest(t,o,i)}else l2e(t,i);t.emit("connectionError",t[Nh],[t],i)}t[jT]()}function A2e(t){t[Xm]=0,t.emit("drain",t[Nh],[t])}function QZ(t,e){t[cB]!==2&&(t[cB]=2,W_t(t,e),t[cB]=0,t[Vf]>256&&(t[dd].splice(0,t[Vf]),t[hd]-=t[Vf],t[Vf]=0))}function W_t(t,e){for(;;){if(t.destroyed){Jf(t[ZT]===0);return}if(t[Km]&&!t[KT]){t[Km](),t[Km]=null;return}if(t[fi]&&t[fi].resume(),t[CZ])t[Xm]=2;else if(t[Xm]===2){e?(t[Xm]=1,queueMicrotask(()=>A2e(t))):A2e(t);continue}if(t[ZT]===0||t[XT]>=(u2e(t)||1))return;let r=t[dd][t[hd]];if(t[Nh].protocol==="https:"&&t[jm]!==r.servername){if(t[XT]>0)return;t[jm]=r.servername,t[fi]?.destroy(new B_t("servername changed"),()=>{t[fi]=null,QZ(t)})}if(t[Ib])return;if(!t[fi]){d2e(t);return}if(t[fi].destroyed||t[fi].busy(r))return;!r.aborted&&t[fi].write(r)?t[hd]++:t[dd].splice(t[hd],1)}}h2e.exports=BZ});var yZ=f((ubn,g2e)=>{"use strict";var x_=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)}};g2e.exports=class{constructor(){this.head=this.tail=new x_}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new x_),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var p2e=f((lbn,f2e)=>{var{kFree:z_t,kConnected:j_t,kPending:K_t,kQueued:X_t,kRunning:Z_t,kSize:$_t}=ps(),uB=Symbol("pool"),bZ=class{constructor(e){this[uB]=e}get connected(){return this[uB][j_t]}get free(){return this[uB][z_t]}get pending(){return this[uB][K_t]}get queued(){return this[uB][X_t]}get running(){return this[uB][Z_t]}get size(){return this[uB][$_t]}};f2e.exports=bZ});var xZ=f((dbn,N2e)=>{"use strict";var eOt=ib(),tOt=yZ(),{kConnected:wZ,kSize:m2e,kRunning:E2e,kPending:C2e,kQueued:$T,kBusy:rOt,kFree:nOt,kUrl:sOt,kClose:iOt,kDestroy:oOt,kDispatch:aOt}=ps(),AOt=p2e(),wA=Symbol("clients"),Ha=Symbol("needDrain"),e1=Symbol("queue"),NZ=Symbol("closed resolve"),SZ=Symbol("onDrain"),I2e=Symbol("onConnect"),B2e=Symbol("onDisconnect"),Q2e=Symbol("onC
Line truncated
|
||||
${n.count} ${n.noun} ${n.is} pending:
|
||||
`,"latin1"),r!==null&&n!==r){if(s[e4])throw new mg;process.emitWarning(new mg)}e[As].timeout&&e[As].timeoutType===Pm&&e[As].timeout.refresh&&e[As].timeout.refresh(),s[Xd]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[$d]=!1,e&&(ze(s[On]<=1,"pipeline should only contain this request"),n(e))}};Zce.exports=att});var oue=E((nmr,iue)=>{"use strict";var pa=B("node:assert"),{pipeline:htt}=B("node:stream"),Dt=Qt(),{RequestContentLengthMismatchError:n4,RequestAbortedError:$ce,SocketError:iy,InformationalError:i4}=$t(),{kUrl:_R,kReset:OR,kClient:Om,kRunning:HR,kPending:ftt,kQueue:eh,kPendingIdx:o4,kRunningIdx:wA,kError:NA,kSocket:on,kStrictContentLength:gtt,kOnError:a4,kMaxConcurrentStreams:nue,kHTTP2Session:SA,kResume:th,kSize:ptt,kHTTPContext:Ett}=Hr(),Rl=Symbol("open streams"),eue,tue=!1,PR;try{PR=B("node:http2")}catch{PR={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:mtt,HTTP2_HEADER_METHOD:Ctt,HTTP2_HEADER_PATH:Itt,HTTP2_HEADER_SCHEME:Btt,HTTP2_HEADER_CONTENT_LENGTH:Qtt,HTTP2_HEADER_EXPECT:ytt,HTTP2_HEADER_STATUS:btt}}=PR;function wtt(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 Stt(t,e){t[on]=e,tue||(tue=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=PR.connect(t[_R],{createConnection:()=>e,peerMaxConcurrentStreams:t[nue]});r[Rl]=0,r[Om]=t,r[on]=e,Dt.addListener(r,"error",Dtt),Dt.addListener(r,"frameError",Rtt),Dt.addListener(r,"end",Ttt),Dt.addListener(r,"goaway",xtt),Dt.addListener(r,"close",function(){let{[Om]:n}=this,{[on]:i}=n,o=this[on][NA]||this[NA]||new iy("closed",Dt.getSocketInfo(i));if(n[SA]=null,n.destroyed){pa(n[ftt]===0);let a=n[eh].splice(n[wA]);for(let A=0;A<a.length;A++){let c=a[A];Dt.errorRequest(n,c,o)}}}),r.unref(),t[SA]=r,e[SA]=r,Dt.addListener(e,"error",function(n){pa(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[NA]=n,this[Om][a4](n)}),Dt.addListener(e,"end",function(){Dt.destroy(this,new iy("other side closed",Dt.getSocketInfo(this)))}),Dt.addListener(e,"close",function(){let n=this[NA]||new iy("closed",Dt.getSocketInfo(this));t[on]=null,this[SA]!=null&&this[SA].destroy(n),t[o4]=t[wA],pa(t[HR]===0),t.emit("disconnect",t[_R],[t],n),t[th]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return Ftt(t,...n)},resume(){Ntt(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function Ntt(t){let e=t[on];e?.destroyed===!1&&(t[ptt]===0&&t[nue]===0?(e.unref(),t[SA].unref()):(e.ref(),t[SA].ref()))}function Dtt(t){pa(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[on][NA]=t,this[Om][a4](t)}function Rtt(t,e,r){if(r===0){let s=new i4(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[on][NA]=s,this[Om][a4](s)}}function Ttt(){let t=new iy("other side closed",Dt.getSocketInfo(this[on]));this.destroy(t),Dt.destroy(this[on],t)}function xtt(t){let e=this[NA]||new iy(`HTTP/2: "GOAWAY" frame received with code ${t}`,Dt.getSocketInfo(this)),r=this[Om];if(r[on]=null,r[Ett]=null,this[SA]!=null&&(this[SA].destroy(e),this[SA]=null),Dt.destroy(this[on],e),r[wA]<r[eh].length){let s=r[eh][r[wA]];r[eh][r[wA]++]=null,Dt.errorRequest(r,s,e),r[o4]=r[wA]}pa(r[HR]===0),r.emit("disconnect",r[_R],[r],e),r[th]()}function ktt(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function Ftt(t,e){let r=t[SA],{method:s,path:n,host:i,upgrade:o,expectContinue:a,signal:A,headers:c}=e,{body:u}=e;if(o)return Dt.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let b=0;b<c.length;b+=2){let U=c[b+0],q=c[b+1];if(Array.isArray(q))for(let x=0;x<q.length;x++)l[U]?l[U]+=`,${q[x]}`:l[U]=q[x];else l[U]=q}let d,{hostname:h,port:f}=t[_R];l[mtt]=i||`${h}${f?`:${f}`:""}`,l[Ctt]=s;let p=b=>{e.aborted||e.completed||(b=b||new $ce,Dt.errorRequest(t,e,b),d!=null&&Dt.destroy(d,b),Dt.destroy(u,b),t[eh][t[wA]++]=null,t[th]())};try{e.onConnect(p)}catch(b){Dt.errorRequest(t,e,b)}if(e.aborted)return!1;if(s==="CONNECT")return r.ref(),d=r.request(l,{endStream:!1,signal:A}),d.id&&!d.pending?(e.onUpgrade(null,null,d),++r[Rl],t[eh][t[wA]++]=null):d.once("ready",()=>{e.onUpgrade(null,null,d),++r[Rl],t[eh][t[wA]++]=null}),d.once("close",()=>{r[Rl]-=1,r[Rl]===0&&r.unref()}),!0;l[Itt]=n,l[Btt]="https";let C=s==="PUT"||s==="POST"||s==="PATCH";u&&typeof u.read=="function"&&u.read(0);let m=Dt.bodyLength(u);if(Dt.isFormDataLike(u)){eue??=vm().extractBody;let[b,U]=eue(u);l["content-type"]=U,u=b.stream,m=b.length}if(m==null&&(m=e.contentLength),(m===0||!C)&&(m=null),ktt(s)&&m>0&&e.contentLength!=null&&e.contentLength!==m){if(t[gtt])return Dt.errorRequest(t,e,new n4),!1;process.emitWarning(new n4)}m!=null&&(pa(u,"no body must not have content length"),l[Qtt]=`${m}`),r.ref();let I=s==="GET"||s==="HEAD"||u===null;return a?(l[ytt]="100-continue",d=r.request(l,{endStream:I,signal:A}),d.once("cont
Line truncated
|
||||
`,this[irt]=A??3e5,this[nrt]=n??3e5,this[ort]=I??!0,this[art]=b,this[l4]=q,this[sh]=null,this[drt]=P>-1?P:-1,this[frt]=$??100,this[ys]=null,this[DA]=[],this[xl]=0,this[RA]=0,this[cy]=ae=>h4(this,ae),this[hrt]=ae=>mue(this,ae)}get pipelining(){return this[VR]}set pipelining(e){this[VR]=e,this[cy](!0)}get[dy](){return this[DA].length-this[RA]}get[ly](){return this[RA]-this[xl]}get[uy](){return this[DA].length-this[xl]}get[Ztt](){return!!this[ys]&&!this[Gm]&&!this[ys].destroyed}get[u4](){return!!(this[ys]?.busy(null)||this[uy]>=(Eue(this)||1)||this[dy]>0)}[Ktt](e){Cue(this),this.once("connect",e)}[lrt](e,r){let s=e.origin||this[Uc].origin,n=new qtt(s,e,r);return this[DA].push(n),this[Ig]||(Cg.bodyLength(n.body)==null&&Cg.isIterable(n.body)?(this[Ig]=1,queueMicrotask(()=>h4(this))):this[cy](!0)),this[Ig]&&this[nh]!==2&&this[u4]&&(this[nh]=2),this[nh]<2}async[crt](){return new Promise(e=>{this[uy]?this[sh]=e:e(null)})}async[urt](e){return new Promise(r=>{let s=this[DA].splice(this[RA]);for(let i=0;i<s.length;i++){let o=s[i];Cg.errorRequest(this,o,e)}let n=()=>{this[sh]&&(this[sh](),this[sh]=null),r(null)};this[ys]?(this[ys].destroy(e,n),this[ys]=null):queueMicrotask(n),this[cy]()})}},Ert=qR();function mue(t,e){if(t[ly]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Tl(t[RA]===t[xl]);let r=t[DA].splice(t[xl]);for(let s=0;s<r.length;s++){let n=r[s];Cg.errorRequest(t,n,e)}Tl(t[uy]===0)}}async function Cue(t){Tl(!t[Gm]),Tl(!t[ys]);let{host:e,hostname:r,protocol:s,port:n}=t[Uc];if(r[0]==="["){let i=r.indexOf("]");Tl(i!==-1);let o=r.substring(1,i);Tl(pue.isIP(o)),r=o}t[Gm]=!0,Hm.beforeConnect.hasSubscribers&&Hm.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[ys]?.version,servername:t[rh],localAddress:t[Ay]},connector:t[ay]});try{let i=await new Promise((o,a)=>{t[ay]({host:e,hostname:r,protocol:s,port:n,servername:t[rh],localAddress:t[Ay]},(A,c)=>{A?a(A):o(c)})});if(t.destroyed){Cg.destroy(i.on("error",fue),new Wtt);return}Tl(i);try{t[ys]=i.alpnProtocol==="h2"?await prt(t,i):await grt(t,i)}catch(o){throw i.destroy().on("error",fue),o}t[Gm]=!1,i[Art]=0,i[l4]=t[l4],i[jtt]=t,i[$tt]=null,Hm.connected.hasSubscribers&&Hm.connected.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[ys]?.version,servername:t[rh],localAddress:t[Ay]},connector:t[ay],socket:i}),t.emit("connect",t[Uc],[t])}catch(i){if(t.destroyed)return;if(t[Gm]=!1,Hm.connectError.hasSubscribers&&Hm.connectError.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[ys]?.version,servername:t[rh],localAddress:t[Ay]},connector:t[ay],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Tl(t[ly]===0);t[dy]>0&&t[DA][t[RA]].servername===t[rh];){let o=t[DA][t[RA]++];Cg.errorRequest(t,o,i)}else mue(t,i);t.emit("connectionError",t[Uc],[t],i)}t[cy]()}function gue(t){t[nh]=0,t.emit("drain",t[Uc],[t])}function h4(t,e){t[Ig]!==2&&(t[Ig]=2,mrt(t,e),t[Ig]=0,t[xl]>256&&(t[DA].splice(0,t[xl]),t[RA]-=t[xl],t[xl]=0))}function mrt(t,e){for(;;){if(t.destroyed){Tl(t[dy]===0);return}if(t[sh]&&!t[uy]){t[sh](),t[sh]=null;return}if(t[ys]&&t[ys].resume(),t[u4])t[nh]=2;else if(t[nh]===2){e?(t[nh]=1,queueMicrotask(()=>gue(t))):gue(t);continue}if(t[dy]===0||t[ly]>=(Eue(t)||1))return;let r=t[DA][t[RA]];if(t[Uc].protocol==="https:"&&t[rh]!==r.servername){if(t[ly]>0)return;t[rh]=r.servername,t[ys]?.destroy(new Jtt("servername changed"),()=>{t[ys]=null,h4(t)})}if(t[Gm])return;if(!t[ys]){Cue(t);return}if(t[ys].destroyed||t[ys].busy(r))return;!r.aborted&&t[ys].write(r)?t[RA]++:t[DA].splice(t[RA],1)}}Iue.exports=d4});var f4=E((cmr,Bue)=>{"use strict";var JR=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)}};Bue.exports=class{constructor(){this.head=this.tail=new JR}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new JR),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var yue=E((umr,Que)=>{var{kFree:Crt,kConnected:Irt,kPending:Brt,kQueued:Qrt,kRunning:yrt,kSize:brt}=Hr(),Bg=Symbol("pool"),g4=class{constructor(e){this[Bg]=e}get connected(){return this[Bg][Irt]}get free(){return this[Bg][Crt]}get pending(){return this[Bg][Brt]}get queued(){return this[Bg][Qrt]}get running(){return this[Bg][yrt]}get size(){return this[Bg][brt]}};Que.exports=g4});var B4=E((lmr,Fue)=>{"use strict";var wrt=Nm(),Srt=f4(),{kConnected:p4,kSize:bue,kRunning:wue,kPending:Sue,kQueued:hy,kBusy:Nrt,kFree:Drt,kUrl:Rrt,kClose:Trt,kDestroy:xrt,kDispatch:krt}=Hr(),Frt=yue(),Pi=Symbol("clients"),di=Symbol("needDrain"),fy=Symbol("queue"),E4=Symbol("closed resolve"),m4=Symbol("onDrain"),Nue=Symbol("onConnect"),Due=Symbol("onDisconnect"),Rue=Symbol("onCo
Line truncated
|
||||
${s.count} ${s.noun} ${s.is} pending:
|
||||
|
||||
${e.format(r)}
|
||||
`.trim())}};kMe.exports=x$});var z_=f((Obn,UMe)=>{"use strict";var MMe=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Mqt}=tn(),vqt=yb();LMe()===void 0&&vMe(new vqt);function vMe(t){if(!t||typeof t.dispatch!="function")throw new Mqt("Argument agent must implement Agent");Object.defineProperty(globalThis,MMe,{value:t,writable:!0,enumerable:!1,configurable:!1})}function LMe(){return globalThis[MMe]}UMe.exports={setGlobalDispatcher:vMe,getGlobalDispatcher:LMe}});var j_=f((qbn,PMe)=>{"use strict";PMe.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 OMe=f((Gbn,_Me)=>{"use strict";var Lqt=S_();_Me.exports=t=>{let e=t?.maxRedirections;return r=>function(s,i){let{maxRedirections:o=e,...a}=s;if(!o)return r(s,i);let A=new Lqt(r,o,s,i);return r(a,A)}}});var qMe=f((Ybn,HMe)=>{"use strict";var Uqt=P_();HMe.exports=t=>e=>function(n,s){return e(n,new Uqt({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))}});var YMe=f((Jbn,GMe)=>{"use strict";var Pqt=mr(),{InvalidArgumentError:_qt,RequestAbortedError:Oqt}=tn(),Hqt=j_(),T$=class extends Hqt{#e=1024*1024;#t=null;#n=!1;#r=!1;#s=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new _qt("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#o.bind(this))}#o(e){this.#r=!0,this.#i=e}onHeaders(e,r,n,s){let o=Pqt.parseHeaders(r)["content-length"];if(o!=null&&o>this.#e)throw new Oqt(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,s)}onError(e){this.#n||(e=this.#i??e,this.#a.onError(e))}onData(e){return this.#s=this.#s+e.length,this.#s>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function qqt({maxSize:t}={maxSize:1024*1024}){return e=>function(n,s){let{dumpMaxSize:i=t}=n,o=new T$({maxSize:i},s);return e(n,o)}}GMe.exports=qqt});var WMe=f((Vbn,VMe)=>{"use strict";var{isIP:Gqt}=B("node:net"),{lookup:Yqt}=B("node:dns"),Jqt=j_(),{InvalidArgumentError:Fb,InformationalError:Vqt}=tn(),JMe=Math.pow(2,31)-1,k$=class{#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#s}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let s=this.#n.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(s==null)this.lookup(e,i,(o,a)=>{if(o||a==null||a.length===0){n(o??new Vqt("No DNS entries found"));return}this.setRecords(e,a);let A=this.#n.get(e.hostname),c=this.pick(e,A,i.affinity),u;typeof c.port=="number"?u=`:${c.port}`:e.port!==""?u=`:${e.port}`:u="",n(null,`${e.protocol}//${c.family===6?`[${c.address}]`:c.address}${u}`)});else{let o=this.pick(e,s,i.affinity);if(o==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let a;typeof o.port=="number"?a=`:${o.port}`:e.port!==""?a=`:${e.port}`:a="",n(null,`${e.protocol}//${o.family===6?`[${o.address}]`:o.address}${a}`)}}#r(e,r,n){Yqt(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,i)=>{if(s)return n(s);let o=new Map;for(let a of i)o.set(`${a.address}:${a.family}`,a);n(null,o.values())})}#s(e,r,n){let s=null,{records:i,offset:o}=r,a;if(this.dualStack?(n==null&&(o==null||o===JMe?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),i[n]!=null&&i[n].ips.length>0?a=i[n]:a=i[n===4?6:4]):a=i[n],a==null||a.ips.length===0)return s;a.offset==null||a.offset===JMe?a.offset=0:a.offset++;let A=a.offset%a.ips.length;return s=a.ips[A]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(a.ips.splice(A,1),this.pick(e,r,n)):s}setRecords(e,r){let n=Date.now(),s={records:{4:null,6:null}};for(let i of r){i.timestamp=n,typeof i.ttl=="number"?i.ttl=Math.min(i.ttl,this.#e):i.ttl=this.#e;let o=s.records[i.family]??{ips:[]};o.ips.push(i),s.records[i.family]=o}this.#n.set(e.hostname,s)}getHandler(e,r){return new F$(this,e,r)}},F$=class extends Jqt{#e=null;#t=null;#n=null;#r=null;#s=null;constructor(e,{origin:r,handler:n,dispatch:s},i){super(n),this.#s=r,this.#r=n,this.#t={...i},this.#e=e,this.#n=s}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#s,this.#t,(r,n)=>{if(r)
Line truncated
|
||||
${i}`;break;case"retry":NUe(i)&&(r[s]=i);break;case"id":SUe(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&NUe(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&SUe(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}}};RUe.exports={EventSourceStream:Eee}});var UUe=f((ywn,LUe)=>{"use strict";var{pipeline:eYt}=B("node:stream"),{fetching:tYt}=h1(),{makeRequest:rYt}=Lb(),{webidl:Xf}=Oo(),{EventSourceStream:nYt}=DUe(),{parseMIMEType:sYt}=yA(),{createFastMessageEvent:iYt}=qb(),{isNetworkError:xUe}=l1(),{delay:oYt}=pee(),{kEnumerableProperty:wB}=mr(),{environmentSettingsObject:TUe}=Qc(),kUe=!1,FUe=3e3,w1=0,MUe=1,N1=2,aYt="anonymous",AYt="use-credentials",Wb=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#n=!1;#r=w1;#s=null;#i=null;#a;#o;constructor(e,r={}){super(),Xf.util.markAsUncloneable(this);let n="EventSource constructor";Xf.argumentLengthCheck(arguments,1,n),kUe||(kUe=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Xf.converters.USVString(e,n,"url"),r=Xf.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#o={lastEventId:"",reconnectionTime:FUe};let s=TUe,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(A){throw new DOMException(A,"SyntaxError")}this.#t=i.href;let o=aYt;r.withCredentials&&(o=AYt,this.#n=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=TUe.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#s=rYt(a),this.#A()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#A(){if(this.#r===N1)return;this.#r=w1;let e={request:this.#s,dispatcher:this.#a},r=n=>{xUe(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()};e.processResponseEndOfBody=r,e.processResponse=n=>{if(xUe(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let s=n.headersList.get("content-type",!0),i=s!==null?sYt(s):"failure",o=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||o===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=MUe,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let a=new nYt({eventSourceSettings:this.#o,push:A=>{this.dispatchEvent(iYt(A.type,A.options))}});eYt(n.body.stream,a,A=>{A?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=tYt(e)}async#c(){this.#r!==N1&&(this.#r=w1,this.dispatchEvent(new Event("error")),await oYt(this.#o.reconnectionTime),this.#r===w1&&(this.#o.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#A()))}close(){Xf.brandCheck(this,t),this.#r!==N1&&(this.#r=N1,this.#i.abort(),this.#s=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}},vUe={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:w1,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:MUe,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:N1,writable:!1}};Object.defineProperties(Wb,vUe);Object.defineProperties(Wb.prototype,vUe);Object.defineProperties(Wb.prototype,{close:wB,onerror:wB,onmessage:wB,onopen:wB,readyState:wB,url:wB,withCredentials:wB});Xf.converters.EventSourceInitDict=Xf.dictionaryConverter([{key:"withCredentials",converter:Xf.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Xf.converters.any}]);LUe.exports={EventSource:Wb,defaultReconnectionTime:FUe}});var HUe=f((bwn,Mt)=>{"use strict";var cYt=Bb(),PUe=TT(),uYt=Qb(),lYt=v2e(),dYt=yb(),hYt=GZ(),gYt=iFe(),fYt=lFe(),_Ue=tn(),UO=mr(),{InvalidArgumentError:LO}=_Ue,zb=XFe(),pYt=FT(),mYt=b$(),EYt=FMe(),CYt=S$(),IYt=l$(),BYt=P_(),{getGlobalDispatcher:OUe,setGlobalDispatcher:QYt}=z_(),yYt=j_(),bYt=S_(),wYt=R_();Object.assign(PUe.prototype,zb);Mt.exports.Dispatcher=PUe;Mt.exports.Client=cYt;Mt.exports.Pool=uYt;Mt.exports.BalancedPool=lYt;Mt.exports.Agent=dYt;Mt.exports.ProxyAgent=hYt;Mt.exports.EnvHttpProxyAgent=gYt;Mt.expo
Line truncated
|
||||
\r
|
||||
`),m6t=/\r\n/g,E6t=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function $b(t){OPe.call(this),t=t||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=_Pe(t,"maxHeaderPairs",2e3),this.maxHeaderSize=_Pe(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new f6t(p6t),this.ss.on("info",function(r,n,s,i){n&&!e.maxed&&(e.nread+i-s>=e.maxHeaderSize?(i=e.maxHeaderSize-e.nread+s,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=i-s,e.buffer+=n.toString("binary",s,i)),r&&e._finish()})}g6t($b,OPe);$b.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};$b.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};$b.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",t)};$b.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split(m6t),e=t.length,r,n;for(var s=0;s<e;++s){if(t[s].length===0)continue;if((t[s][0]===" "||t[s][0]===" ")&&n){this.header[n][this.header[n].length-1]+=t[s];continue}let i=t[s].indexOf(":");if(i===-1||i===0)return;if(r=E6t.exec(t[s]),n=r[1].toLowerCase(),this.header[n]=this.header[n]||[],this.header[n].push(r[2]||""),++this.npairs===this.maxHeaderPairs)break}};HPe.exports=$b});var ate=f((pNn,YPe)=>{"use strict";var ote=B("node:stream").Writable,C6t=B("node:util").inherits,I6t=ste(),GPe=UPe(),B6t=qPe(),Q6t=45,y6t=Buffer.from("-"),b6t=Buffer.from(`\r
|
||||
`),w6t=function(){};function Ed(t){if(!(this instanceof Ed))return new Ed(t);if(ote.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new B6t(t),this._hparser.on("header",function(r){e._inHeader=!1,e._part.emit("header",r)})}C6t(Ed,ote);Ed.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let r=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(r+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else ote.prototype.emit.apply(this,arguments)};Ed.prototype._write=function(t,e,r){if(!this._hparser&&!this._bparser)return r();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new GPe(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let n=this._hparser.push(t);if(!this._inHeader&&n!==void 0&&n<t.length)t=t.slice(n);else return r()}this._firstWrite&&(this._bparser.push(b6t),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=r:r()};Ed.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Ed.prototype.setBoundary=function(t){let e=this;this._bparser=new I6t(`\r
|
||||
--`+t),this._bparser.on("info",function(r,n,s,i){e._oninfo(r,n,s,i)})};Ed.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",w6t),this._part.resume())};Ed.prototype._oninfo=function(t,e,r,n){let s,i=this,o=0,a,A=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&r+o<n;)if(e[r+o]===Q6t)++o,++this._dashes;else{this._dashes&&(s=y6t),this._dashes=0;break}if(this._dashes===2&&(r+o<n&&this.listenerCount("trailer")!==0&&this.emit("trailer",e.slice(r+o,n)),this.reset(),this._finished=!0,i._parts===0&&(i._realFinish=!0,i.emit("finish"),i._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new GPe(this._partOpts),this._part._read=function(c){i._unpause()},this._isPreamble&&this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._isPreamble!==!0&&this.listenerCount("part")!==0?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&r<n&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(s&&(A=this._part.push(s)),A=this._part.push(e.slice(r,n)),A||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(s&&this._hparser.push(s),a=this._hparser.push(e.slice(r,n)),!this._inHeader&&a!==void 0&&a<n&&this._oninfo(!1,e,r+a,n))),t&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:r!==n&&(++this._parts,this._part.on("end",function(){--i._parts===0&&(i._finished?(i._realFinish=!0,i.emit("finish"),i._realFinish=!1):i._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};Ed.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let t=this._cb;this._cb=void 0,t()}};YPe.exports=Ed});var KO=f((Ate,WPe)=>{"use strict";var JPe=new TextDecoder("utf-8"),VPe=new Map([["utf-8",JPe],["utf8",JPe]]);function N6t(t){let e;for(;;)switch(t){case"utf-8":case"utf8":return v1.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return v1.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return v1.utf16le;case"base64":return v1.base64;default:if(e===void 0){e=!0,t=t.toLowerCase();continue}return v1.other.bind(t)}}var v1={utf8:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.utf8Slice(0,t.length)),latin1:(t,e)=>t.length===0?"":typeof t=="string"?t:t.latin1Slice(0,t.length),utf16le:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.ucs2Slice(0,t.length)),base64:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.base64Slice(0,t.length)),other:(t,e)=>{if(t.length===0)return"";if(typeof t=="string"&&(t=Buffer.from(t,e)),VPe.has(Ate.toString()))try{return VPe.get(Ate).decode(t)}catch{}return typeof t=="string"?t:t.toString()}};function S6t(t,e,r){return t&&N6t(r)(t,e)}WPe.exports=S6t});var ute=f((mNn,ZPe)=>{"use strict";var XO=KO(),zPe=/%[a-fA-F0-9][a-fA-F0-9]/g,R6t={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"\x07","%08":"\b","%09":" ","%0a":`
|
||||
`,"%0A":`
|
||||
`,"%0b":"\v","%0B":"\v","%0c":"\f","%0C":"\f","%0d":"\r","%0D":"\r","%0e":"","%0E":"","%0f":"","%0F":"","%10":"","%11":"","%12":"","%13":"","%14":"","%15":"","%16":"","%17":"","%18":"","%19":"","%1a":"","%1A":"","%1b":"\x1B","%1B":"\x1B","%1c":"","%1C":"","%1d":"","%1D":"","%1e":"","%1E":"","%1f":"","%1F":"","%20":" ","%21":"!","%22":'"',"%23":"#","%24":"$","%25":"%","%26":"&","%27":"'","%28":"(","%29":")","%2a":"*","%2A":"*","%2b":"+","%2B":"+","%2c":",","%2C":",","%2d":"-","%2D":"-","%2e":".","%2E":".","%2f":"/","%2F":"/","%30":"0","%31":"1","%32":"2","%33":"3","%34":"4","%35":"5","%36":"6","%37":"7","%38":"8","%39":"9","%3a":":","%3A":":","%3b":";","%3B":";","%3c":"<","%3C":"<","%3d":"=","%3D":"=","%3e":">","%3E":">","%3f":"?","%3F":"?","%40":"@","%41":"A","%42":"B","%43":"C","%44":"D","%45":"E","%46":"F","%47":"G","%48":"H","%49":"I","%4a":"J","%4A":"J","%4b":"K","%4B":"K","%4c":"L","%4C":"L","%4d":"M","%4D":"M","%4e":"N","%4E":"N","%4f":"O","%4F":"O","%50":"P","%51":"Q","%52":"R","%53":"S","%54":"T","%55":"U","%56":"V","%57":"W","%58":"X","%59":"Y","%5a":"Z","%5A":"Z","%5b":"[","%5B":"[","%5c":"\\","%5C":"\\","%5d":"]","%5D":"]","%5e":"^","%5E":"^","%5f":"_","%5F":"_","%60":"`","%61":"a","%62":"b","%63":"c","%64":"d","%65":"e","%66":"f","%67":"g","%68":"h","%69":"i","%6a":"j","%6A":"j","%6b":"k","%6B":"k","%6c":"l","%6C":"l","%6d":"m","%6D":"m","%6e":"n","%6E":"n","%6f":"o","%6F":"o","%70":"p","%71":"q","%72":"r","%73":"s","%74":"t","%75":"u","%76":"v","%77":"w","%78":"x","%79":"y","%7a":"z","%7A":"z","%7b":"{","%7B":"{","%7c":"|","%7C":"|","%7d":"}","%7D":"}","%7e":"~","%7E":"~","%7f":"\x7F","%7F":"\x7F","%80":"\x80","%81":"\x81","%82":"\x82","%83":"\x83","%84":"\x84","%85":"\x85","%86":"\x86","%87":"\x87","%88":"\x88","%89":"\x89","%8a":"\x8A","%8A":"\x8A","%8b":"\x8B","%8B":"\x8B","%8c":"\x8C","%8C":"\x8C","%8d":"\x8D","%8D":"\x8D","%8e":"\x8E","%8E":"\x8E","%8f":"\x8F","%8F":"\x8F","%90":"\x90","%91":"\x91","%92":"\x92","%93":"\x93","%94":"\x94","%95":"\x95","%96":"\x96","%97":"\x97","%98":"\x98","%99":"\x99","%9a":"\x9A","%9A":"\x9A","%9b":"\x9B","%9B":"\x9B","%9c":"\x9C","%9C":"\x9C","%9d":"\x9D","%9D":"\x9D","%9e":"\x9E","%9E":"\x9E","%9f":"\x9F","%9F":"\x9F","%a0":"\xA0","%A0":"\xA0","%a1":"\xA1","%A1":"\xA1","%a2":"\xA2","%A2":"\xA2","%a3":"\xA3","%A3":"\xA3","%a4":"\xA4","%A4":"\xA4","%a5":"\xA5","%A5":"\xA5","%a6":"\xA6","%A6":"\xA6","%a7":"\xA7","%A7":"\xA7","%a8":"\xA8","%A8":"\xA8","%a9":"\xA9","%A9":"\xA9","%aa":"\xAA","%Aa":"\xAA","%aA":"\xAA","%AA":"\xAA","%ab":"\xAB","%Ab":"\xAB","%aB":"\xAB","%AB":"\xAB","%ac":"\xAC","%Ac":"\xAC","%aC":"\xAC","%AC":"\xAC","%ad":"\xAD","%Ad":"\xAD","%aD":"\xAD","%AD":"\xAD","%ae":"\xAE","%Ae":"\xAE","%aE":"\xAE","%AE":"\xAE","%af":"\xAF","%Af":"\xAF","%aF":"\xAF","%AF":"\xAF","%b0":"\xB0","%B0":"\xB0","%b1":"\xB1","%B1":"\xB1","%b2":"\xB2","%B2":"\xB2","%b3":"\xB3","%B3":"\xB3","%b4":"\xB4","%B4":"\xB4","%b5":"\xB5","%B5":"\xB5","%b6":"\xB6","%B6":"\xB6","%b7":"\xB7","%B7":"\xB7","%b8":"\xB8","%B8":"\xB8","%b9":"\xB9","%B9":"\xB9","%ba":"\xBA","%Ba":"\xBA","%bA":"\xBA","%BA":"\xBA","%bb":"\xBB","%Bb":"\xBB","%bB":"\xBB","%BB":"\xBB","%bc":"\xBC","%Bc":"\xBC","%bC":"\xBC","%BC":"\xBC","%bd":"\xBD","%Bd":"\xBD","%bD":"\xBD","%BD":"\xBD","%be":"\xBE","%Be":"\xBE","%bE":"\xBE","%BE":"\xBE","%bf":"\xBF","%Bf":"\xBF","%bF":"\xBF","%BF":"\xBF","%c0":"\xC0","%C0":"\xC0","%c1":"\xC1","%C1":"\xC1","%c2":"\xC2","%C2":"\xC2","%c3":"\xC3","%C3":"\xC3","%c4":"\xC4","%C4":"\xC4","%c5":"\xC5","%C5":"\xC5","%c6":"\xC6","%C6":"\xC6","%c7":"\xC7","%C7":"\xC7","%c8":"\xC8","%C8":"\xC8","%c9":"\xC9","%C9":"\xC9","%ca":"\xCA","%Ca":"\xCA","%cA":"\xCA","%CA":"\xCA","%cb":"\xCB","%Cb":"\xCB","%cB":"\xCB","%CB":"\xCB","%cc":"\xCC","%Cc":"\xCC","%cC":"\xCC","%CC":"\xCC","%cd":"\xCD","%Cd":"\xCD","%cD":"\xCD","%CD":"\xCD","%ce":"\xCE","%Ce":"\xCE","%cE":"\xCE","%CE":"\xCE","%cf":"\xCF","%Cf":"\xCF","%cF":"\xCF","%CF":"\xCF","%d0":"\xD0","%D0":"\xD0","%d1":"\xD1","%D1":"\xD1","%d2":"\xD2","%D2":"\xD2","%d3":"\xD3","%D3":"\xD3","%d4":"\xD4","%D4":"\xD4","%d5":"\xD5","%D5":"\xD5","%d6":"\xD6","%D6":"\xD6","%d7":"\xD7","%D7":"\xD7","%d8":"\xD8","%D8":"\xD8","%d9":"\xD9","%D9":"\xD9","%da":"\xDA","%Da":"\xDA","%dA":"\xDA","%DA":"\xDA","%db":"\xDB","%Db":"\xDB","%dB":"\xDB","%DB":"\xDB","%dc":"\xDC","%Dc":"\xDC","%dC":"\xDC","%DC":"\xDC","%dd":"\xDD","%Dd":"\xDD","%dD":"\xDD","%DD":"\xDD","%de":"\xDE","%De":"\xDE","%dE":"\xDE","%DE":"\xDE","%df":"\xDF","%Df":"\xDF","%dF":"\xDF","%DF":"\xDF","%e0":"\xE0","%E0":"\xE0","%e1":"\xE1","%E1":"\xE1","%e2":"\xE2","%E2":"\xE2","%e3":"\xE3","%E3":"\xE3","%e4":"\xE4","%E4":"\xE4","%e5":"\xE5","%E5":"\xE5","%e6":"\xE6","%E6":"\xE6","%e7":"\xE7","%E7":"\xE7","%e8":"\xE8","%E8":"\xE8","%e9":"\xE9","%E9":"\xE9","%ea":"\xEA","%Ea":"\xEA","%eA":"\xEA","%EA":"\xEA","%eb":"\xEB","%Eb":"\xEB","%eB":"\xEB","%EB":"\xEB","%ec":"\xEC","%Ec":"\xEC","%eC":"\xEC","%EC":"\xEC","%ed":"\xED","%Ed":"\xED","%eD":"\xED","%ED":"\xED","%ee":"\xLine truncated
|
||||
`))}function S9t(t,e){let{headersList:r}=e,n=(r.get("referrer-policy")??"").split(","),s="";if(n.length>0)for(let i=n.length;i!==0;i--){let o=n[i-1].trim();if(h9t.has(o)){s=o;break}}s!==""&&(t.referrerPolicy=s)}function R9t(){return"allowed"}function D9t(){return"success"}function x9t(){return"success"}function T9t(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e)}function k9t(t){let e=t.origin;if(t.responseTainting==="cors"||t.mode==="websocket")e&&t.headersList.append("origin",e);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&&Ete(t.origin)&&!Ete(P1(t))&&(e=null);break;case"same-origin":rH(t,P1(t))||(e=null);break;default:}e&&t.headersList.append("origin",e)}}function F9t(t){return p9t.now()}function M9t(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 v9t(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function L9t(t){return{referrerPolicy:t.referrerPolicy}}function U9t(t){let e=t.referrerPolicy;sw(e);let r=null;if(t.referrer==="client"){let a=f9t();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let n=pte(r),s=pte(r,!0);n.toString().length>4096&&(n=s);let i=rH(t,n),o=U1(n)&&!U1(t.url);switch(e){case"origin":return s??pte(r,!0);case"unsafe-url":return n;case"same-origin":return i?s:"no-referrer";case"origin-when-cross-origin":return i?n:s;case"strict-origin-when-cross-origin":{let a=P1(t);return rH(n,a)?n:U1(n)&&!U1(a)?"no-referrer":s}default:return o?"no-referrer":s}}function pte(t,e){return sw(t instanceof URL),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}function U1(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}function P9t(t,e){if(tH===void 0)return!0;let r=w_e(e);if(r==="no metadata"||r.length===0)return!0;let n=O9t(r),s=H9t(r,n);for(let i of s){let o=i.algo,a=i.hash,A=tH.createHash(o).update(t).digest("base64");if(A[A.length-1]==="="&&(A[A.length-2]==="="?A=A.slice(0,-2):A=A.slice(0,-1)),q9t(A,a))return!0}return!1}var _9t=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function w_e(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=_9t.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let i=s.groups.algo.toLowerCase();B_e.includes(i)&&e.push(s.groups)}return r===!0?"no metadata":e}function O9t(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}function H9t(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}function q9t(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 G9t(t){}function rH(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function Y9t(){let t,e;return{promise:new Promise((n,s)=>{t=n,e=s}),resolve:t,reject:e}}function J9t(t){return t.controller.state==="aborted"}function V9t(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}var Cte={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"};Object.setPrototypeOf(Cte,null);function W9t(t){return Cte[t.toLowerCase()]??t}function z9t(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return sw(typeof e=="string"),e}var j9t=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function K9t(t,e,r){let n={index:0,kind:r,target:t},s={next(){if(Object.getPrototypeOf(this)!==s)throw new TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let{index:i,kind:o,target:a}=n,A=a(),c=A.length;if(i>=c)return{value:void 0,done:!0};let u=A[i];return n.index=i+1,X9t(u,o)},[Symbol.toStringTag]:`${e} Iterator`};return Object.setPrototypeOf(s,j9t),Object.setPrototypeOf({},s)}function X9t(t,e){let r;switch(e){case"key":{r=t[0];brea
Line truncated
|
||||
`||t===" "||t===" "}function Ite(t,e=!0,r=!0){let n=0,s=t.length-1;if(e)for(;n<t.length&&k_e(t[n]);n++);if(r)for(;s>0&&k_e(t[s]);s--);return t.slice(n,s+1)}function F_e(t){return t==="\r"||t===`
|
||||
`||t===" "||t==="\f"||t===" "}function pJt(t,e=!0,r=!0){let n=0,s=t.length-1;if(e)for(;n<t.length&&F_e(t[n]);n++);if(r)for(;s>0&&F_e(t[s]);s--);return t.slice(n,s+1)}U_e.exports={dataURLProcessor:dJt,URLSerializer:M_e,collectASequenceOfCodePoints:iH,collectASequenceOfCodePointsFast:iw,stringPercentDecode:v_e,parseMIMEType:Bte,collectAnHTTPQuotedString:L_e,serializeAMimeType:fJt}});var oH=f((DNn,q_e)=>{"use strict";var{Blob:O_e,File:P_e}=B("buffer"),{types:Qte}=B("util"),{kState:xc}=np(),{isBlobLike:H_e}=Hu(),{webidl:fn}=Ya(),{parseMIMEType:mJt,serializeAMimeType:EJt}=Cd(),{kEnumerableProperty:__e}=qr(),CJt=new TextEncoder,_1=class t extends O_e{constructor(e,r,n={}){fn.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=fn.converters["sequence<BlobPart>"](e),r=fn.converters.USVString(r),n=fn.converters.FilePropertyBag(n);let s=r,i=n.type,o;e:{if(i){if(i=mJt(i),i==="failure"){i="";break e}i=EJt(i).toLowerCase()}o=n.lastModified}super(IJt(e,n),{type:i}),this[xc]={name:s,lastModified:o,type:i}}get name(){return fn.brandCheck(this,t),this[xc].name}get lastModified(){return fn.brandCheck(this,t),this[xc].lastModified}get type(){return fn.brandCheck(this,t),this[xc].type}},yte=class t{constructor(e,r,n={}){let s=r,i=n.type,o=n.lastModified??Date.now();this[xc]={blobLike:e,name:s,type:i,lastModified:o}}stream(...e){return fn.brandCheck(this,t),this[xc].blobLike.stream(...e)}arrayBuffer(...e){return fn.brandCheck(this,t),this[xc].blobLike.arrayBuffer(...e)}slice(...e){return fn.brandCheck(this,t),this[xc].blobLike.slice(...e)}text(...e){return fn.brandCheck(this,t),this[xc].blobLike.text(...e)}get size(){return fn.brandCheck(this,t),this[xc].blobLike.size}get type(){return fn.brandCheck(this,t),this[xc].blobLike.type}get name(){return fn.brandCheck(this,t),this[xc].name}get lastModified(){return fn.brandCheck(this,t),this[xc].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(_1.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:__e,lastModified:__e});fn.converters.Blob=fn.interfaceConverter(O_e);fn.converters.BlobPart=function(t,e){if(fn.util.Type(t)==="Object"){if(H_e(t))return fn.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||Qte.isAnyArrayBuffer(t))return fn.converters.BufferSource(t,e)}return fn.converters.USVString(t,e)};fn.converters["sequence<BlobPart>"]=fn.sequenceConverter(fn.converters.BlobPart);fn.converters.FilePropertyBag=fn.dictionaryConverter([{key:"lastModified",converter:fn.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:fn.converters.DOMString,defaultValue:""},{key:"endings",converter:t=>(t=fn.converters.DOMString(t),t=t.toLowerCase(),t!=="native"&&(t="transparent"),t),defaultValue:"transparent"}]);function IJt(t,e){let r=[];for(let n of t)if(typeof n=="string"){let s=n;e.endings==="native"&&(s=BJt(s)),r.push(CJt.encode(s))}else Qte.isAnyArrayBuffer(n)||Qte.isTypedArray(n)?n.buffer?r.push(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)):r.push(new Uint8Array(n)):H_e(n)&&r.push(n);return r}function BJt(t){let e=`
|
||||
`;return process.platform==="win32"&&(e=`\r
|
||||
`),t.replace(/\r?\n/g,e)}function QJt(t){return P_e&&t instanceof P_e||t instanceof _1||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}q_e.exports={File:_1,FileLike:yte,isFileLike:QJt}});var AH=f((xNn,W_e)=>{"use strict";var{isBlobLike:aH,toUSVString:yJt,makeIterator:bte}=Hu(),{kState:aa}=np(),{File:V_e,FileLike:G_e,isFileLike:bJt}=oH(),{webidl:wn}=Ya(),{Blob:wJt,File:wte}=B("buffer"),Y_e=wte??V_e,ow=class t{constructor(e){if(e!==void 0)throw wn.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[aa]=[]}append(e,r,n=void 0){if(wn.brandCheck(this,t),wn.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!aH(r))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=wn.converters.USVString(e),r=aH(r)?wn.converters.Blob(r,{strict:!1}):wn.converters.USVString(r),n=arguments.length===3?wn.converters.USVString(n):void 0;let s=J_e(e,r,n);this[aa].push(s)}delete(e){wn.brandCheck(this,t),wn.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=wn.converters.USVString(e),this[aa]=this[aa].filter(r=>r.name!==e)}get(e){wn.brandCheck(this,t),wn.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=wn.converters.USVString(e);let r=this[aa].findIndex(n=>n.name===e);return r===-1?null:this[aa][r].value}getAll(e){return wn.brandCheck(this,t),wn.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=wn.converters.USVString(e),this[aa].filter(r=>r.name===e).map(r=>r.value)}has(e){return wn.brandCheck(this,t),wn.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=wn.converters.USVString(e),this[aa].findIndex(r=>r.name===e)!==-1}set(e,r,n=void 0){if(wn.brandCheck(this,t),wn.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!aH(r))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=wn.converters.USVString(e),r=aH(r)?wn.converters.Blob(r,{strict:!1}):wn.converters.USVString(r),n=arguments.length===3?yJt(n):void 0;let s=J_e(e,r,n),i=this[aa].findIndex(o=>o.name===e);i!==-1?this[aa]=[...this[aa].slice(0,i),s,...this[aa].slice(i+1).filter(o=>o.name!==e)]:this[aa].push(s)}entries(){return wn.brandCheck(this,t),bte(()=>this[aa].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return wn.brandCheck(this,t),bte(()=>this[aa].map(e=>[e.name,e.value]),"FormData","key")}values(){return wn.brandCheck(this,t),bte(()=>this[aa].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,r=globalThis){if(wn.brandCheck(this,t),wn.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[n,s]of this)e.apply(r,[s,n,this])}};ow.prototype[Symbol.iterator]=ow.prototype.entries;Object.defineProperties(ow.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function J_e(t,e,r){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(bJt(e)||(e=e instanceof wJt?new Y_e([e],"blob",{type:e.type}):new G_e(e,"blob",{type:e.type})),r!==void 0){let n={type:e.type,lastModified:e.lastModified};e=wte&&e instanceof wte||e instanceof V_e?new Y_e([e],r,n):new G_e(e,r,n)}return{name:t,value:e}}W_e.exports={FormData:ow}});var O1=f((TNn,rOe)=>{"use strict";var NJt=l_e(),aw=qr(),{ReadableStreamFrom:SJt,isBlobLike:z_e,isReadableStreamLike:RJt,readableStreamClose:DJt,createDeferredPromise:xJt,fullyReadBody:TJt}=Hu(),{FormData:j_e}=AH(),{kState:ip}=np(),{webidl:Nte}=Ya(),{DOMException:Z_e,structuredClone:kJt}=dE(),{Blob:FJt,File:MJt}=B("buffer"),{kBodyUsed:vJt}=ts(),Ste=B("assert"),{isErrored:LJt}=qr(),{isUint8Array:$_e,isArrayBuffer:UJt}=B("util/types"),{File:PJt}=oH(),{parseMIMEType:_Jt,serializeAMimeType:OJt}=Cd(),Rte;try{let t=B("node:crypto");Rte=e=>t.randomInt(0,e)}catch{Rte=t=>Math.floor(Math.random(t))}var sp=globalThis.ReadableStream,K_e=MJt??PJt,cH=new TextEncoder,HJt=new TextDecoder;function eOe(t,e=!1){sp||(sp=B("stream/web").ReadableStream);let r=null;t instanceof sp?r=t:z_e(t)?r=t.stream():r=new sp({async pull(A){A.enqueue(typeof s=="string"?cH.encode(s):s),queueMicrotask(()=>DJt(A))},start(){},type:void 0}),Ste(RJt(r));let n=null,s=null,i=null,o=null;if(typeof t=="string")s=t,o="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),o="application/x-www-form-urlencoded;charset=UTF-8";else if(UJt(t))s=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))s=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(aw.isFormDataLike(t)){let A=`----formdata-undici-0${`${Rte(1e11)}`.padStart(11,"0")}`,c=`--${A}\r
|
||||
`.trim())}};Pde.exports=BH});var uT=E((Pmr,qde)=>{"use strict";var Hde=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:iit}=$t(),oit=Vm();Yde()===void 0&&Gde(new oit);function Gde(t){if(!t||typeof t.dispatch!="function")throw new iit("Argument agent must implement Agent");Object.defineProperty(globalThis,Hde,{value:t,writable:!0,enumerable:!1,configurable:!1})}function Yde(){return globalThis[Hde]}qde.exports={setGlobalDispatcher:Gde,getGlobalDispatcher:Yde}});var lT=E((Hmr,Vde)=>{"use strict";Vde.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 Wde=E((Gmr,Jde)=>{"use strict";var ait=YR();Jde.exports=t=>{let e=t?.maxRedirections;return r=>function(n,i){let{maxRedirections:o=e,...a}=n;if(!o)return r(n,i);let A=new ait(r,o,n,i);return r(a,A)}}});var jde=E((Ymr,zde)=>{"use strict";var Ait=eT();zde.exports=t=>e=>function(s,n){return e(s,new Ait({...s,retryOptions:{...t,...s.retryOptions}},{handler:n,dispatch:e}))}});var Zde=E((qmr,Kde)=>{"use strict";var cit=Qt(),{InvalidArgumentError:uit,RequestAbortedError:lit}=$t(),dit=lT(),QH=class extends dit{#e=1024*1024;#t=null;#r=!1;#s=!1;#n=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new uit("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#o.bind(this))}#o(e){this.#s=!0,this.#i=e}onHeaders(e,r,s,n){let o=cit.parseHeaders(r)["content-length"];if(o!=null&&o>this.#e)throw new lit(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#s?!0:this.#a.onHeaders(e,r,s,n)}onError(e){this.#r||(e=this.#i??e,this.#a.onError(e))}onData(e){return this.#n=this.#n+e.length,this.#n>=this.#e&&(this.#r=!0,this.#s?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#r){if(this.#s){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function hit({maxSize:t}={maxSize:1024*1024}){return e=>function(s,n){let{dumpMaxSize:i=t}=s,o=new QH({maxSize:i},n);return e(s,o)}}Kde.exports=hit});var ehe=E((Vmr,$de)=>{"use strict";var{isIP:fit}=B("node:net"),{lookup:git}=B("node:dns"),pit=lT(),{InvalidArgumentError:t0,InformationalError:Eit}=$t(),Xde=Math.pow(2,31)-1,yH=class{#e=0;#t=0;#r=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.#s,this.pick=e.pick??this.#n}get full(){return this.#r.size===this.#t}runLookup(e,r,s){let n=this.#r.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 Eit("No DNS entries found"));return}this.setRecords(e,a);let A=this.#r.get(e.hostname),c=this.pick(e,A,i.affinity),u;typeof c.port=="number"?u=`:${c.port}`:e.port!==""?u=`:${e.port}`:u="",s(null,`${e.protocol}//${c.family===6?`[${c.address}]`:c.address}${u}`)});else{let o=this.pick(e,n,i.affinity);if(o==null){this.#r.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}`)}}#s(e,r,s){git(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===Xde?(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===Xde?a.offset=0:a.offset++;let A=a.offset%a.ips.length;return n=a.ips[A]??null,n==null?n:Date.now()-n.timestamp>n.ttl?(a.ips.splice(A,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.#r.set(e.hostname,n)}getHandler(e,r){return new bH(this,e,r)}},bH=class extends pit{#e=null;#t=null;#r=null;#s=null;#n=null;constructor(e,{origin:r,handler:s,dispatch:n},i){super(s),this.#n=r,this.#s=s,this.#t={...i},this.#e=e,this.#r=n}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#n,this.#t,(r,s)=>{if(r)
Line truncated
|
||||
${i}`;break;case"retry":Fge(i)&&(r[n]=i);break;case"id":Mge(i)&&(r[n]=i);break;case"event":i.length>0&&(r[n]=i);break}}processEvent(e){e.retry&&Fge(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Mge(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}}};Uge.exports={EventSourceStream:cG}});var qge=E((Q0r,Yge)=>{"use strict";var{pipeline:wct}=B("node:stream"),{fetching:Sct}=Ny(),{makeRequest:Nct}=n0(),{webidl:vl}=Nn(),{EventSourceStream:Dct}=vge(),{parseMIMEType:Rct}=Li(),{createFastMessageEvent:Tct}=u0(),{isNetworkError:Lge}=wy(),{delay:xct}=aG(),{kEnumerableProperty:vg}=Qt(),{environmentSettingsObject:_ge}=go(),Pge=!1,Oge=3e3,Py=0,Hge=1,Oy=2,kct="anonymous",Fct="use-credentials",g0=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#r=!1;#s=Py;#n=null;#i=null;#a;#o;constructor(e,r={}){super(),vl.util.markAsUncloneable(this);let s="EventSource constructor";vl.argumentLengthCheck(arguments,1,s),Pge||(Pge=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=vl.converters.USVString(e,s,"url"),r=vl.converters.EventSourceInitDict(r,s,"eventSourceInitDict"),this.#a=r.dispatcher,this.#o={lastEventId:"",reconnectionTime:Oge};let n=_ge,i;try{i=new URL(e,n.settingsObject.baseUrl),this.#o.origin=i.origin}catch(A){throw new DOMException(A,"SyntaxError")}this.#t=i.href;let o=kct;r.withCredentials&&(o=Fct,this.#r=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=_ge.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=Nct(a),this.#A()}get readyState(){return this.#s}get url(){return this.#t}get withCredentials(){return this.#r}#A(){if(this.#s===Oy)return;this.#s=Py;let e={request:this.#n,dispatcher:this.#a},r=s=>{Lge(s)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()};e.processResponseEndOfBody=r,e.processResponse=s=>{if(Lge(s))if(s.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let n=s.headersList.get("content-type",!0),i=n!==null?Rct(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.#s=Hge,this.dispatchEvent(new Event("open")),this.#o.origin=s.urlList[s.urlList.length-1].origin;let a=new Dct({eventSourceSettings:this.#o,push:A=>{this.dispatchEvent(Tct(A.type,A.options))}});wct(s.body.stream,a,A=>{A?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=Sct(e)}async#c(){this.#s!==Oy&&(this.#s=Py,this.dispatchEvent(new Event("error")),await xct(this.#o.reconnectionTime),this.#s===Py&&(this.#o.lastEventId.length&&this.#n.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#A()))}close(){vl.brandCheck(this,t),this.#s!==Oy&&(this.#s=Oy,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}},Gge={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Py,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:Hge,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Oy,writable:!1}};Object.defineProperties(g0,Gge);Object.defineProperties(g0.prototype,Gge);Object.defineProperties(g0.prototype,{close:vg,onerror:vg,onmessage:vg,onopen:vg,readyState:vg,url:vg,withCredentials:vg});vl.converters.EventSourceInitDict=vl.dictionaryConverter([{key:"withCredentials",converter:vl.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:vl.converters.any}]);Yge.exports={EventSource:g0,defaultReconnectionTime:Oge}});var zge=E((y0r,Xe)=>{"use strict";var Mct=Ym(),Vge=VQ(),Uct=qm(),vct=Gue(),Lct=Vm(),_ct=M4(),Pct=dle(),Oct=mle(),Jge=$t(),$T=Qt(),{InvalidArgumentError:XT}=Jge,p0=nde(),Hct=WQ(),Gct=gH(),Yct=Ode(),qct=mH(),Vct=rH(),Jct=eT(),{getGlobalDispatcher:Wge,setGlobalDispatcher:Wct}=uT(),zct=lT(),jct=YR(),Kct=qR();Object.assign(Vge.prototype,p0);Xe.exports.Dispatcher=Vge;Xe.exports.Client=Mct;Xe.exports.Pool=Uct;Xe.exports.BalancedPool=vct;Xe.exports.Agent=Lct;Xe.exports.ProxyAgent=_ct;Xe.exports.EnvHttpProxyAgent=Pct;Xe.export
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}function iht(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(Ydt.has(o)){n=o;break}}n!==""&&(t.referrerPolicy=n)}function oht(){return"allowed"}function aht(){return"success"}function Aht(){return"success"}function cht(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function uht(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&&f6(t.origin)&&!f6(tb(t))&&(e=null);break;case"same-origin":xx(t,tb(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function D0(t,e){return t}function lht(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:D0(t.domainLookupStartTime,r),domainLookupEndTime:D0(t.domainLookupEndTime,r),connectionStartTime:D0(t.connectionStartTime,r),connectionEndTime:D0(t.connectionEndTime,r),secureConnectionStartTime:D0(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function dht(t){return D0(zdt.now(),t)}function hht(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 nme(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function fht(t){return{referrerPolicy:t.referrerPolicy}}function ght(t){let e=t.referrerPolicy;Gg(e);let r=null;if(t.referrer==="client"){let a=XEe();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let s=h6(r),n=h6(r,!0);s.toString().length>4096&&(s=n);let i=xx(t,s),o=eb(s)&&!eb(t.url);switch(e){case"origin":return n??h6(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=tb(t);return xx(s,a)?s:eb(s)&&!eb(a)?"no-referrer":n}default:return o?"no-referrer":n}}function h6(t,e){return Gg(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 eb(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 pht(t,e){if(Tx===void 0)return!0;let r=ime(e);if(r==="no metadata"||r.length===0)return!0;let s=mht(r),n=Cht(r,s);for(let i of n){let o=i.algo,a=i.hash,A=Tx.createHash(o).update(t).digest("base64");if(A[A.length-1]==="="&&(A[A.length-2]==="="?A=A.slice(0,-2):A=A.slice(0,-1)),Iht(A,a))return!0}return!1}var Eht=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function ime(t){let e=[],r=!0;for(let s of t.split(" ")){r=!1;let n=Eht.exec(s);if(n===null||n.groups===void 0||n.groups.algo===void 0)continue;let i=n.groups.algo.toLowerCase();eme.includes(i)&&e.push(n.groups)}return r===!0?"no metadata":e}function mht(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 Cht(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 Iht(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 Bht(t){}function xx(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function Qht(){let t,e;return{promise:new Promise((s,n)=>{t=s,e=n}),resolve:t,reject:e}}function yht(t){return t.controller.state==="aborted"}function bht(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function wht(t){return Zdt[t.toLowerCase()]??t}function Sht(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return Gg(typeof e=="string"),e}var Nht=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function ome(t,e,r=0,s=1){class n{
Line truncated
|
||||
`);function sft(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function nft(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 ift(t,e){Fx(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&&Mx(t,tft,i)||i.position===t.length-4&&Mx(t,rft,i))return n;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let a=oft(t,i);if(a==="failure")return"failure";let{name:A,filename:c,contentType:u,encoding:l}=a;i.position+=2;let d;{let f=t.indexOf(s.subarray(2),i.position);if(f===-1)return"failure";d=t.subarray(i.position,f-4),i.position+=d.length,l==="base64"&&(d=Buffer.from(d.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let h;c!==null?(u??="text/plain",sft(u)||(u=""),h=new $ht([d],c,{type:u})):h=zht(Buffer.from(d)),Fx(mme(A)),Fx(typeof h=="string"&&mme(h)||Kht(h)),n.push(Zht(A,h,c))}}function oft(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=T0(a=>a!==10&&a!==13&&a!==58,t,e);if(o=B6(o,!0,!0,a=>a===9||a===32),!jht.test(o.toString())||t[e.position]!==58)return"failure";switch(e.position++,T0(a=>a===32||a===9,t,e),Wht(o)){case"content-disposition":{if(r=s=null,!Mx(t,eft,e)||(e.position+=17,r=Bme(t,e),r===null))return"failure";if(Mx(t,Ime,e)){let a=e.position+Ime.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,s=Bme(t,e),s===null))return"failure"}break}case"content-type":{let a=T0(A=>A!==10&&A!==13,t,e);a=B6(a,!1,!0,A=>A===9||A===32),n=Cme(a);break}case"content-transfer-encoding":{let a=T0(A=>A!==10&&A!==13,t,e);a=B6(a,!1,!0,A=>A===9||A===32),i=Cme(a);break}default:T0(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function Bme(t,e){Fx(t[e.position-1]===34);let r=T0(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 T0(t,e,r){let s=r.position;for(;s<e.length&&t(e[s]);)++s;return e.subarray(r.position,r.position=s)}function B6(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 Mx(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}Qme.exports={multipartFormDataParser:ift,validateBoundary:nft}});var F0=E((kCr,Fme)=>{"use strict";var nb=yt(),{ReadableStreamFrom:aft,isBlobLike:bme,isReadableStreamLike:Aft,readableStreamClose:cft,createDeferredPromise:uft,fullyReadBody:lft,extractMimeType:dft,utf8DecodeBytes:Nme}=bo(),{FormData:wme}=sb(),{kState:k0}=mh(),{webidl:hft}=Rn(),{Blob:fft}=B("node:buffer"),Q6=B("node:assert"),{isErrored:Dme,isDisturbed:gft}=B("node:stream"),{isArrayBuffer:pft}=B("node:util/types"),{serializeAMimeType:Eft}=Yi(),{multipartFormDataParser:mft}=yme(),y6;try{let t=B("node:crypto");y6=e=>t.randomInt(0,e)}catch{y6=t=>Math.floor(Math.random(t))}var Ux=new TextEncoder;function Cft(){}var Rme=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,Tme;Rme&&(Tme=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!gft(e)&&!Dme(e)&&e.cancel("Response object has been garbage collected").catch(Cft)}));function xme(t,e=!1){let r=null;t instanceof ReadableStream?r=t:bme(t)?r=t.stream():r=new ReadableStream({async pull(A){let c=typeof n=="string"?Ux.encode(n):n;c.byteLength&&A.enqueue(c),queueMicrotask(()=>cft(A))},start(){},type:"bytes"}),Q6(Aft(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(pft(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(nb.isFormDataLike(t)){let A=`----formdata-undici-0${`${y6(1e11)}`.padStart(11,"0")}`,c=`--${A}\r
|
||||
Content-Disposition: form-data`;let u=C=>C.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),l=C=>C.replace(/\r?\n|\r/g,`\r
|
||||
`),d=[],h=new Uint8Array([13,10]);i=0;let g=!1;for(let[C,m]of t)if(typeof m=="string"){let I=cH.encode(c+`; name="${u(l(C))}"\r
|
||||
`),d=[],h=new Uint8Array([13,10]);i=0;let f=!1;for(let[C,m]of t)if(typeof m=="string"){let I=Ux.encode(c+`; name="${u(l(C))}"\r
|
||||
\r
|
||||
${l(m)}\r
|
||||
`);d.push(I),i+=I.byteLength}else{let I=cH.encode(`${c}; name="${u(l(C))}"`+(m.name?`; filename="${u(m.name)}"`:"")+`\r
|
||||
`);d.push(I),i+=I.byteLength}else{let I=Ux.encode(`${c}; name="${u(l(C))}"`+(m.name?`; filename="${u(m.name)}"`:"")+`\r
|
||||
Content-Type: ${m.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);d.push(I,m,h),typeof m.size=="number"?i+=I.byteLength+m.size+h.byteLength:g=!0}let p=cH.encode(`--${A}--`);d.push(p),i+=p.byteLength,g&&(i=null),s=t,n=async function*(){for(let C of d)C.stream?yield*C.stream():yield C},o="multipart/form-data; boundary="+A}else if(z_e(t))s=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(aw.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof sp?t:SJt(t)}if((typeof s=="string"||aw.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let A;r=new sp({async start(){A=n(t)[Symbol.asyncIterator]()},async pull(c){let{value:u,done:l}=await A.next();return l?queueMicrotask(()=>{c.close()}):LJt(r)||c.enqueue(new Uint8Array(u)),c.desiredSize>0},async cancel(c){await A.return()},type:void 0})}return[{stream:r,source:s,length:i},o]}function qJt(t,e=!1){return sp||(sp=B("stream/web").ReadableStream),t instanceof sp&&(Ste(!aw.isDisturbed(t),"The body has already been consumed."),Ste(!t.locked,"The stream is locked.")),eOe(t,e)}function GJt(t){let[e,r]=t.stream.tee(),n=kJt(r,{transfer:[r]}),[,s]=n.tee();return t.stream=e,{stream:s,length:t.length,source:t.source}}async function*X_e(t){if(t)if($_e(t))yield t;else{let e=t.stream;if(aw.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[vJt]=!0,yield*e}}function Dte(t){if(t.aborted)throw new Z_e("The operation was aborted.","AbortError")}function YJt(t){return{blob(){return uH(this,r=>{let n=zJt(this);return n==="failure"?n="":n&&(n=OJt(n)),new FJt([r],{type:n})},t)},arrayBuffer(){return uH(this,r=>new Uint8Array(r).buffer,t)},text(){return uH(this,tOe,t)},json(){return uH(this,WJt,t)},async formData(){Nte.brandCheck(this,t),Dte(this[ip]);let r=this.headers.get("Content-Type");if(/multipart\/form-data/.test(r)){let n={};for(let[a,A]of this.headers)n[a.toLowerCase()]=A;let s=new j_e,i;try{i=new NJt({headers:n,preservePath:!0})}catch(a){throw new Z_e(`${a}`,"AbortError")}i.on("field",(a,A)=>{s.append(a,A)}),i.on("file",(a,A,c,u,l)=>{let d=[];if(u==="base64"||u.toLowerCase()==="base64"){let h="";A.on("data",g=>{h+=g.toString().replace(/[\r\n]/gm,"");let p=h.length-h.length%4;d.push(Buffer.from(h.slice(0,p),"base64")),h=h.slice(p)}),A.on("end",()=>{d.push(Buffer.from(h,"base64")),s.append(a,new K_e(d,c,{type:l}))})}else A.on("data",h=>{d.push(h)}),A.on("end",()=>{s.append(a,new K_e(d,c,{type:l}))})});let o=new Promise((a,A)=>{i.on("finish",a),i.on("error",c=>A(new TypeError(c)))});if(this.body!==null)for await(let a of X_e(this[ip].body))i.write(a);return i.end(),await o,s}else if(/application\/x-www-form-urlencoded/.test(r)){let n;try{let i="",o=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of X_e(this[ip].body)){if(!$_e(a))throw new TypeError("Expected Uint8Array chunk");i+=o.decode(a,{stream:!0})}i+=o.decode(),n=new URLSearchParams(i)}catch(i){throw Object.assign(new TypeError,{cause:i})}let s=new j_e;for(let[i,o]of n)s.append(i,o);return s}else throw await Promise.resolve(),Dte(this[ip]),Nte.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}function JJt(t){Object.assign(t.prototype,YJt(t))}async function uH(t,e,r){if(Nte.brandCheck(t,r),Dte(t[ip]),VJt(t[ip].body))throw new TypeError("Body is unusable");let n=xJt(),s=o=>n.reject(o),i=o=>{try{n.resolve(e(o))}catch(a){s(a)}};return t[ip].body==null?(i(new Uint8Array),n.promise):(await TJt(t[ip].body,i,s),n.promise)}function VJt(t){return t!=null&&(t.stream.locked||aw.isDisturbed(t.stream))}function tOe(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),HJt.decode(t))}function WJt(t){return JSON.parse(tOe(t))}function zJt(t){let{headersList:e}=t[ip],r=e.get("content-type");return r===null?"failure":_Jt(r)}rOe.exports={extractBody:eOe,safelyExtractBody:qJt,cloneBody:GJt,mixinBody:JJt}});var oOe=f((kNn,iOe)=>{"use strict";var{InvalidArgumentError:Yn,NotSupportedError:jJt}=Un(),op=B("assert"),{kHTTP2BuildRequest:KJt,kHTTP2CopyHeaders:XJt,kHTTP1BuildRequest:ZJt}=ts(),xA=qr(),nOe=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,sOe=/[^\t\x20-\x7e\x80-\xff]/,$Jt=/[^\u0021-\u00ff]/,Id=Symbol("handler"),xi={},xte;try{let t=B("diagnostics_channel");xi.create=t.channel("undici:request:create"),xi.bodySent=t.channel("undici:request:bodySent"),xi.headers=t.channel("undici:request:headers"),xi.trailers=t.channel("undici:request:trailers"),xi.error=t.channel("undici:request:error")}catch{xi.create={hasSubscribers:!1},xi.bodySent={hasSubscribers:!1},xi.headers={hasSubscribers:!1},xi.trailers={hasSubscribers:!1},xi.error={hasSubscribers:!1}}var Tte=class t{constructor(e,{path:r,method:n,body:s,headers:i,query:o,idempotent:a,blocking:A,upgrade:c,headersTimeout:u,bodyTimeout:l,reset:d,throwOnError:h,expectContinue:g},p){if(typeof r!="string")throw new Yn("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsLine truncated
|
||||
`),this.body=C.stream,this.contentLength=C.length}else xA.isBlobLike(s)&&this.contentType==null&&s.type&&(this.contentType=s.type,this.headers+=`content-type: ${s.type}\r
|
||||
`);xA.validateHandler(p,n,c),this.servername=xA.getServerName(this.host),this[Id]=p,xi.create.hasSubscribers&&xi.create.publish({request:this})}onBodySent(e){if(this[Id].onBodySent)try{return this[Id].onBodySent(e)}catch(r){this.abort(r)}}onRequestSent(){if(xi.bodySent.hasSubscribers&&xi.bodySent.publish({request:this}),this[Id].onRequestSent)try{return this[Id].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(op(!this.aborted),op(!this.completed),this.error)e(this.error);else return this.abort=e,this[Id].onConnect(e)}onHeaders(e,r,n,s){op(!this.aborted),op(!this.completed),xi.headers.hasSubscribers&&xi.headers.publish({request:this,response:{statusCode:e,headers:r,statusText:s}});try{return this[Id].onHeaders(e,r,n,s)}catch(i){this.abort(i)}}onData(e){op(!this.aborted),op(!this.completed);try{return this[Id].onData(e)}catch(r){return this.abort(r),!1}}onUpgrade(e,r,n){return op(!this.aborted),op(!this.completed),this[Id].onUpgrade(e,r,n)}onComplete(e){this.onFinally(),op(!this.aborted),this.completed=!0,xi.trailers.hasSubscribers&&xi.trailers.publish({request:this,trailers:e});try{return this[Id].onComplete(e)}catch(r){this.onError(r)}}onError(e){if(this.onFinally(),xi.error.hasSubscribers&&xi.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Id].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,r){return H1(this,e,r),this}static[ZJt](e,r,n){return new t(e,r,n)}static[KJt](e,r,n){let s=r.headers;r={...r,headers:null};let i=new t(e,r,n);if(i.headers={},Array.isArray(s)){if(s.length%2!==0)throw new Yn("headers array must be even");for(let o=0;o<s.length;o+=2)H1(i,s[o],s[o+1],!0)}else if(s&&typeof s=="object"){let o=Object.keys(s);for(let a=0;a<o.length;a++){let A=o[a];H1(i,A,s[A],!0)}}else if(s!=null)throw new Yn("headers must be an object or an array");return i}static[XJt](e){let r=e.split(`\r
|
||||
`),n={};for(let s of r){let[i,o]=s.split(": ");o==null||o.length===0||(n[i]?n[i]+=`,${o}`:n[i]=o)}return n}};function FB(t,e,r){if(e&&typeof e=="object")throw new Yn(`invalid ${t} header`);if(e=e!=null?`${e}`:"",sOe.exec(e)!==null)throw new Yn(`invalid ${t} header`);return r?e:`${t}: ${e}\r
|
||||
`}function H1(t,e,r,n=!1){if(r&&typeof r=="object"&&!Array.isArray(r))throw new Yn(`invalid ${e} header`);if(r===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(sOe.exec(r)!==null)throw new Yn(`invalid ${e} header`);t.host=r}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(r,10),!Number.isFinite(t.contentLength))throw new Yn("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=r,n?t.headers[e]=FB(e,r,n):t.headers+=FB(e,r);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new Yn("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let s=typeof r=="string"?r.toLowerCase():null;if(s!=="close"&&s!=="keep-alive")throw new Yn("invalid connection header");s==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new Yn("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new Yn("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new jJt("expect header not supported");if(nOe.exec(e)===null)throw new Yn("invalid header key");if(Array.isArray(r))for(let s=0;s<r.length;s++)n?t.headers[e]?t.headers[e]+=`,${FB(e,r[s],n)}`:t.headers[e]=FB(e,r[s],n):t.headers+=FB(e,r[s]);else n?t.headers[e]=FB(e,r,n):t.headers+=FB(e,r)}}}iOe.exports=Tte});var lH=f((FNn,aOe)=>{"use strict";var eVt=B("events"),kte=class extends eVt{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};aOe.exports=kte});var G1=f((MNn,AOe)=>{"use strict";var tVt=lH(),{ClientDestroyedError:Fte,ClientClosedError:rVt,InvalidArgumentError:Aw}=Un(),{kDestroy:nVt,kClose:sVt,kDispatch:Mte,kInterceptors:MB}=ts(),cw=Symbol("destroyed"),q1=Symbol("closed"),ap=Symbol("onDestroyed"),uw=Symbol("onClosed"),dH=Symbol("Intercepted Dispatch"),vte=class extends tVt{constructor(){super(),this[cw]=!1,this[ap]=null,this[q1]=!1,this[uw]=[]}get destroyed(){return this[cw]}get closed(){return this[q1]}get interceptors(){return this[MB]}set interceptors(e){if(e){for(let r=e.length-1;r>=0;r--)if(typeof this[MB][r]!="function")throw new Aw("interceptor must be an function")}this[MB]=e}close(e){if(e===void 0)return new Promise((n,s)=>{this.close((i,o)=>i?s(i):n(o))});if(typeof e!="function")throw new Aw("invalid callback");if(this[cw]){queueMicrotask(()=>e(new Fte,null));return}if(this[q1]){this[uw]?this[uw].push(e):queueMicrotask(()=>e(null,null));return}this[q1]=!0,this[uw].push(e);let r=()=>{let n=this[uw];this[uw]=null;for(let s=0;s<n.length;s++)n[s](null,null)};this[sVt]().then(()=>this.destroy()).then(()=>{queueMicrotask(r)})}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((s,i)=>{this.destroy(e,(o,a)=>o?i(o):s(a))});if(typeof r!="function")throw new Aw("invalid callback");if(this[cw]){this[ap]?this[ap].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new Fte),this[cw]=!0,this[ap]=this[ap]||[],this[ap].push(r);let n=()=>{let s=this[ap];this[ap]=null;for(let i=0;i<s.length;i++)s[i](null,null)};this[nVt](e).then(()=>{queueMicrotask(n)})}[dH](e,r){if(!this[MB]||this[MB].length===0)return this[dH]=this[Mte],this[Mte](e,r);let n=this[Mte].bind(this);for(let s=this[MB].length-1;s>=0;s--)n=this[MB][s](n);return this[dH]=n,n(e,r)}dispatch(e,r){if(!r||typeof r!="object")throw new Aw("handler must be an object");try{if(!e||typeof e!="object")throw new Aw("opts must be an object.");if(this[cw]||this[ap])throw new Fte;if(this[q1])throw new rVt;return this[dH](e,r)}catch(n){if(typeof r.onError!="function")throw new Aw("invalid onError method");return r.onError(n),!1}}};AOe.exports=vte});var Y1=f((UNn,lOe)=>{"use strict";var iVt=B("net"),cOe=B("assert"),uOe=qr(),{InvalidArgumentError:oVt,ConnectTimeoutError:aVt}=Un(),Lte,Ute;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?Ute=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size<this._maxCachedSessions)return;let n=this._sessionCache.get(r);n!==void 0&&n.deref()===void 0&&this._sessionCache.delete(r)})}get(e){let r=this._sessionCache.get(e);return r?r.deref():null}set(e,r){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(r)),this._sessionRegistry.register(r,e))}}:Ute=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,r){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(e,r)}}};function AVt({allowH2:t,maxCachedSessions:e,socketPath:r,timeout:n,...s}){if(e!=null&&(!Number.isInteger(e)||e<0))throw new oVt("maxCachedSessions must be a positive integer or zero");let i={path:r,...s},o=new Ute(e??100);return n=n??1e4,t
Line truncated
|
||||
`,this[ROe]=A??3e5,this[SOe]=s??3e5,this[K1]=I??!0,this[PVt]=w,this[X1]=z,this[gE]=null,this[xOe]=W>-1?W:-1,this[Uh]="h1",this[kc]=null,this[IH]=oe?{openStreams:0,maxConcurrentStreams:Z??100}:null,this[TOe]=`${this[qo].hostname}${this[qo].port?`:${this[qo].port}`:""}`,this[rs]=[],this[ns]=0,this[Tc]=0}get pipelining(){return this[pE]}set pipelining(e){this[pE]=e,Fc(this,!0)}get[UB](){return this[rs].length-this[Tc]}get[Fs](){return this[Tc]-this[ns]}get[LB](){return this[rs].length-this[ns]}get[UVt](){return!!this[Ws]&&!this[dw]&&!this[Ws].destroyed}get[Jte](){let e=this[Ws];return e&&(e[Ja]||e[up]||e[gw])||this[LB]>=(this[pE]||1)||this[UB]>0}[LVt](e){vOe(this),this.once("connect",e)}[HVt](e,r){let n=e.origin||this[qo].origin,s=this[Uh]==="h2"?Yte[GVt](n,e,r):Yte[JVt](n,e,r);return this[rs].push(s),this[vB]||(ft.bodyLength(s.body)==null&&ft.isIterable(s.body)?(this[vB]=1,process.nextTick(Fc,this)):Fc(this,!0)),this[vB]&&this[fE]!==2&&this[Jte]&&(this[fE]=2),this[fE]<2}async[_Vt](){return new Promise(e=>{this[LB]?this[gE]=e:e(null)})}async[OVt](e){return new Promise(r=>{let n=this[rs].splice(this[Tc]);for(let i=0;i<n.length;i++){let o=n[i];Va(this,o,e)}let s=()=>{this[gE]&&(this[gE](),this[gE]=null),r()};this[kc]!=null&&(ft.destroy(this[kc],e),this[kc]=null,this[IH]=null),this[Ws]?ft.destroy(this[Ws].on("close",s),e):queueMicrotask(s),Fc(this)})}};function $Vt(t){Ve(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Ws][Go]=t,bH(this[Lh],t)}function eWt(t,e,r){let n=new vh(`HTTP/2: "frameError" received - type ${t}, code ${e}`);r===0&&(this[Ws][Go]=n,bH(this[Lh],n))}function tWt(){ft.destroy(this,new hw("other side closed")),ft.destroy(this[Ws],new hw("other side closed"))}function rWt(t){let e=this[Lh],r=new vh(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[Ws]=null,e[kc]=null,e.destroyed){Ve(this[UB]===0);let n=e[rs].splice(e[ns]);for(let s=0;s<n.length;s++){let i=n[s];Va(this,i,r)}}else if(e[Fs]>0){let n=e[rs][e[ns]];e[rs][e[ns]++]=null,Va(e,n,r)}e[Tc]=e[ns],Ve(e[Fs]===0),e.emit("disconnect",e[qo],[e],r),Fc(e)}var kh=hOe(),nWt=fH(),sWt=Buffer.alloc(0);async function iWt(){let t=process.env.JEST_WORKER_ID?Hte():void 0,e;try{e=await WebAssembly.compile(Buffer.from(IOe(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||Hte(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,s)=>0,wasm_on_status:(r,n,s)=>{Ve.strictEqual(Gi.ptr,r);let i=n-Mh+Fh.byteOffset;return Gi.onStatus(new pH(Fh.buffer,i,s))||0},wasm_on_message_begin:r=>(Ve.strictEqual(Gi.ptr,r),Gi.onMessageBegin()||0),wasm_on_header_field:(r,n,s)=>{Ve.strictEqual(Gi.ptr,r);let i=n-Mh+Fh.byteOffset;return Gi.onHeaderField(new pH(Fh.buffer,i,s))||0},wasm_on_header_value:(r,n,s)=>{Ve.strictEqual(Gi.ptr,r);let i=n-Mh+Fh.byteOffset;return Gi.onHeaderValue(new pH(Fh.buffer,i,s))||0},wasm_on_headers_complete:(r,n,s,i)=>(Ve.strictEqual(Gi.ptr,r),Gi.onHeadersComplete(n,!!s,!!i)||0),wasm_on_body:(r,n,s)=>{Ve.strictEqual(Gi.ptr,r);let i=n-Mh+Fh.byteOffset;return Gi.onBody(new pH(Fh.buffer,i,s))||0},wasm_on_message_complete:r=>(Ve.strictEqual(Gi.ptr,r),Gi.onMessageComplete()||0)}})}var Gte=null,zte=iWt();zte.catch();var Gi=null,Fh=null,mH=0,Mh=null,fw=1,CH=2,jte=3,Kte=class{constructor(e,r,{exports:n}){Ve(Number.isFinite(e[EH])&&e[EH]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(kh.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=[],this.headersSize=0,this.headersMaxSize=e[EH],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[xOe]}setTimeout(e,r){this.timeoutType=r,e!==this.timeoutValue?(qte.clearTimeout(this.timeout),e?(this.timeout=qte.setTimeout(oWt,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(Ve(this.ptr!=null),Ve(Gi==null),this.llhttp.llhttp_resume(this.ptr),Ve(this.timeoutType===CH),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||sWt),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){Ve(this.ptr!=null),Ve(Gi==null),Ve(!this.paused);let{socket:r,llhttp:n}=this;e.length>mH&&(Mh&&n.free(Mh),mH=Math.ceil(e.length/4096)*4096,Mh=n.malloc(mH)),new Uint8Array(n.memory.buffer,Mh,mH).set(e);try{let s;try{Fh=e,Gi=this,s=n.llhttp_execute(this.ptr,Mh,e.length)}catch(o){throw o}finally{Gi=null,Fh=null}let i=n.llhttp_get_error_pos(this.ptr)-Mh;if(s===kh.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(i));else if(s===kh.ERROR.PAUSED)this.paused=!0,r.unshift(e.slice(i));else if(s!==kh.ERROR.OK){let o=n.llhttp_get_error_reason(this.ptr),a="";if(o){let A=new Uint8Array(n.memory.buffer,o).indexOf(0);a="Response do
Line truncated
|
||||
`;return typeof i=="string"?g+=`host: ${i}\r
|
||||
`:g+=t[bOe],o?g+=`connection: upgrade\r
|
||||
upgrade: ${o}\r
|
||||
`:t[pE]&&!h[Ja]?g+=`connection: keep-alive\r
|
||||
`:g+=`connection: close\r
|
||||
`,a&&(g+=a),Aa.sendHeaders.hasSubscribers&&Aa.sendHeaders.publish({request:e,headers:g,socket:h}),!r||l===0?(d===0?h.write(`${g}content-length: 0\r
|
||||
`);d.push(I,m,h),typeof m.size=="number"?i+=I.byteLength+m.size+h.byteLength:f=!0}let p=Ux.encode(`--${A}--\r
|
||||
`);d.push(p),i+=p.byteLength,f&&(i=null),n=t,s=async function*(){for(let C of d)C.stream?yield*C.stream():yield C},o=`multipart/form-data; boundary=${A}`}else if(bme(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(nb.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:aft(t)}if((typeof n=="string"||nb.isBuffer(n))&&(i=Buffer.byteLength(n)),s!=null){let A;r=new ReadableStream({async start(){A=s(t)[Symbol.asyncIterator]()},async pull(c){let{value:u,done:l}=await A.next();if(l)queueMicrotask(()=>{c.close(),c.byobRequest?.respond(0)});else if(!Dme(r)){let d=new Uint8Array(u);d.byteLength&&c.enqueue(d)}return c.desiredSize>0},async cancel(c){await A.return()},type:"bytes"})}return[{stream:r,source:n,length:i},o]}function Ift(t,e=!1){return t instanceof ReadableStream&&(Q6(!nb.isDisturbed(t),"The body has already been consumed."),Q6(!t.locked,"The stream is locked.")),xme(t,e)}function Bft(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function Qft(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function yft(t){return{blob(){return x0(this,r=>{let s=Sme(this);return s===null?s="":s&&(s=Eft(s)),new fft([r],{type:s})},t)},arrayBuffer(){return x0(this,r=>new Uint8Array(r).buffer,t)},text(){return x0(this,Nme,t)},json(){return x0(this,wft,t)},formData(){return x0(this,r=>{let s=Sme(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=mft(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new wme;return i[k0]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new wme;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 x0(this,r=>new Uint8Array(r),t)}}}function bft(t){Object.assign(t.prototype,yft(t))}async function x0(t,e,r){if(hft.brandCheck(t,r),kme(t))throw new TypeError("Body is unusable: Body has already been read");Qft(t[k0]);let s=uft(),n=o=>s.reject(o),i=o=>{try{s.resolve(e(o))}catch(a){n(a)}};return t[k0].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await lft(t[k0].body,i,n),s.promise)}function kme(t){let e=t[k0].body;return e!=null&&(e.stream.locked||nb.isDisturbed(e.stream))}function wft(t){return JSON.parse(Nme(t))}function Sme(t){let e=t[k0].headersList,r=dft(e);return r==="failure"?null:r}Fme.exports={extractBody:xme,safelyExtractBody:Ift,cloneBody:Bft,mixinBody:bft,streamRegistry:Tme,hasFinalizationRegistry:Rme,bodyUnusable:kme}});var qme=E((FCr,Yme)=>{"use strict";var Ke=B("node:assert"),At=yt(),{channels:Mme}=I0(),b6=i6(),{RequestContentLengthMismatchError:Yg,ResponseContentLengthMismatchError:Sft,RequestAbortedError:Ome,HeadersTimeoutError:Nft,HeadersOverflowError:Dft,SocketError:Hx,InformationalError:M0,BodyTimeoutError:Rft,HTTPParserError:Tft,ResponseExceededMaxSizeError:xft}=tr(),{kUrl:Hme,kReset:qi,kClient:D6,kParser:us,kBlocking:ab,kRunning:Yn,kPending:kft,kSize:Ume,kWriting:Ih,kQueue:vA,kNoRef:ib,kKeepAliveDefaultTimeout:Fft,kHostHeader:Mft,kPendingIdx:Uft,kRunningIdx:Qa,kError:ya,kPipelining:Px,kSocket:U0,kKeepAliveTimeoutValue:Gx,kMaxHeadersSize:w6,kKeepAliveMaxTimeout:vft,kKeepAliveTimeoutThreshold:Lft,kHeadersTimeout:_ft,kBodyTimeout:Pft,kStrictContentLength:R6,kMaxRequests:vme,kCounter:Oft,kMaxResponseSize:Hft,kOnError:Gft,kResume:Ch,kHTTPContext:Gme}=qr(),Jc=TEe(),Yft=Buffer.alloc(0),vx=Buffer[Symbol.species],Lx=At.addListener,qft=At.removeAllListeners,S6;async function Vft(){let t=process.env.JEST_WORKER_ID?A6():void 0,e;try{e=await WebAssembly.compile(FEe())}catch{e=await WebAssembly.compile(t||A6())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,n)=>0,wasm_on_status:(r,s,n)=>{Ke(qs.ptr===r);let i=s-zc+Wc.byteOffset;return qs.onStatus(new vx(Wc.buffer,i,n))||0},wasm_on_message_begin:r=>(Ke(qs.ptr===r),qs.onMessageBegin()||0),wasm_on_header_field:(r,s,n)=>{Ke(qs.ptr===r);let i=s-zc+Wc.byteOffset;return qs.onHeaderField(new vx(Wc.buffer,i,n))||0},wasm_on_header_value:(r,s,n)=>{Ke(qs.ptr===r);let i=s-zc+Wc.byteOffset;return qs.onHeaderValue(new vx(Wc.buffer,i,n))||0},wasm_on_headers_complete:(r,s,n,i)=>(Ke(qs.ptr===r),qs.onHeadersComplete(s,!!n,!!i)||0),wasm_on_body:(r,s,n)=>{Ke(qs.ptr===r);let i=s-zc+Wc.byteOffset;return qs.onBody(new vx(Wc.buffer,i,n))||0},wasm_on_message_complete:r=>(Ke(qs.ptr===r),qs.onMessageComplete()||0)}})}var N6=null,T6=Vft();T6.catch();var qs=null,Wc=null,_x=0,zc=null,Jft=0,ob=1,v0=2|ob,Ox=4|ob,x6=8|Jft,k6=class{constructor(e,r,{exports:s}){Ke(Number.isFinite(e[w6])&&e[w6]>0),this.llhttp=s,this.ptr=this.llhttp.llhttp_alloc(Jc.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=[],thi
Line truncated
|
||||
`;if(typeof n=="string"?p+=`host: ${n}\r
|
||||
`:p+=t[Mft],i?p+=`connection: upgrade\r
|
||||
upgrade: ${i}\r
|
||||
`:t[Px]&&!h[qi]?p+=`connection: keep-alive\r
|
||||
`:p+=`connection: close\r
|
||||
`,Array.isArray(c))for(let C=0;C<c.length;C+=2){let m=c[C+0],I=c[C+1];if(Array.isArray(I))for(let Q=0;Q<I.length;Q++)p+=`${m}: ${I[Q]}\r
|
||||
`;else p+=`${m}: ${I}\r
|
||||
`}return Mme.sendHeaders.hasSubscribers&&Mme.sendHeaders.publish({request:e,headers:p,socket:h}),!A||d===0?_me(f,null,t,e,h,u,p,l):At.isBuffer(A)?_me(f,A,t,e,h,u,p,l):At.isBlobLike(A)?typeof A.stream=="function"?Pme(f,A.stream(),t,e,h,u,p,l):Xft(f,A,t,e,h,u,p,l):At.isStream(A)?Zft(f,A,t,e,h,u,p,l):At.isIterable(A)?Pme(f,A,t,e,h,u,p,l):Ke(!1),!0}function Zft(t,e,r,s,n,i,o,a){Ke(i!==0||r[Yn]===0,"stream body cannot be pipelined");let A=!1,c=new Yx({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(f){if(!A)try{!c.write(f)&&this.pause&&this.pause()}catch(p){At.destroy(this,p)}},l=function(){A||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!A){let f=new Ome;queueMicrotask(()=>h(f))}},h=function(f){if(!A){if(A=!0,Ke(n.destroyed||n[Ih]&&r[Yn]<=1),n.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!f)try{c.end()}catch(p){f=p}c.destroy(f),f&&(f.code!=="UND_ERR_INFO"||f.message!=="reset")?At.destroy(e,f):At.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),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(d)}function _me(t,e,r,s,n,i,o,a){try{e?At.isBuffer(e)&&(Ke(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"):(Ve(d===null,"no body must not have content length"),h.write(`${g}\r
|
||||
`,"latin1")),e.onRequestSent()):ft.isBuffer(r)?(Ve(d===r.byteLength,"buffer body must have content length"),h.cork(),h.write(`${g}content-length: ${d}\r
|
||||
`,"latin1"),n.write(e),n.uncork(),s.onBodySent(e),!a&&s.reset!==!1&&(n[qi]=!0)):i===0?n.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"),h.write(r),h.uncork(),e.onBodySent(r),e.onRequestSent(),u||(h[Ja]=!0)):ft.isBlobLike(r)?typeof r.stream=="function"?QH({body:r.stream(),client:t,request:e,socket:h,contentLength:d,header:g,expectsPayload:u}):POe({body:r,client:t,request:e,socket:h,contentLength:d,header:g,expectsPayload:u}):ft.isStream(r)?UOe({body:r,client:t,request:e,socket:h,contentLength:d,header:g,expectsPayload:u}):ft.isIterable(r)?QH({body:r,client:t,request:e,socket:h,contentLength:d,header:g,expectsPayload:u}):Ve(!1),!0}function cWt(t,e,r){let{body:n,method:s,path:i,host:o,upgrade:a,expectContinue:A,signal:c,headers:u}=r,l;if(typeof u=="string"?l=Yte[YVt](u.trim()):l=u,a)return Va(t,r,new Error("Upgrade not supported for H2")),!1;try{r.onConnect(I=>{r.aborted||r.completed||Va(t,r,I||new Zte)})}catch(I){Va(t,r,I)}if(r.aborted)return!1;let d,h=t[IH];if(l[VVt]=o||t[TOe],l[WVt]=s,s==="CONNECT")return e.ref(),d=e.request(l,{endStream:!1,signal:c}),d.id&&!d.pending?(r.onUpgrade(null,null,d),++h.openStreams):d.once("ready",()=>{r.onUpgrade(null,null,d),++h.openStreams}),d.once("close",()=>{h.openStreams-=1,h.openStreams===0&&e.unref()}),!0;l[zVt]=i,l[jVt]="https";let g=s==="PUT"||s==="POST"||s==="PATCH";n&&typeof n.read=="function"&&n.read(0);let p=ft.bodyLength(n);if(p==null&&(p=r.contentLength),(p===0||!g)&&(p=null),LOe(s)&&p>0&&r.contentLength!=null&&r.contentLength!==p){if(t[K1])return Va(t,r,new cp),!1;process.emitWarning(new cp)}p!=null&&(Ve(n,"no body must not have content length"),l[KVt]=`${p}`),e.ref();let C=s==="GET"||s==="HEAD";return A?(l[XVt]="100-continue",d=e.request(l,{endStream:C,signal:c}),d.once("continue",m)):(d=e.request(l,{endStream:C,signal:c}),m()),++h.openStreams,d.once("response",I=>{let{[ZVt]:y,...w}=I;r.onHeaders(Number(y),w,d.resume.bind(d),"")===!1&&d.pause()}),d.once("end",()=>{r.onComplete([])}),d.on("data",I=>{r.onData(I)===!1&&d.pause()}),d.once("close",()=>{h.openStreams-=1,h.openStreams===0&&e.unref()}),d.once("error",function(I){t[kc]&&!t[kc].destroyed&&!this.closed&&!this.destroyed&&(h.streams-=1,ft.destroy(d,I))}),d.once("frameError",(I,y)=>{let w=new vh(`HTTP/2: "frameError" received - type ${I}, code ${y}`);Va(t,r,w),t[kc]&&!t[kc].destroyed&&!this.closed&&!this.destroyed&&(h.streams-=1,ft.destroy(d,w))}),!0;function m(){n?ft.isBuffer(n)?(Ve(p===n.byteLength,"buffer body must have content length"),d.cork(),d.write(n),d.uncork(),d.end(),r.onBodySent(n),r.onRequestSent()):ft.isBlobLike(n)?typeof n.stream=="function"?QH({client:t,request:r,contentLength:p,h2stream:d,expectsPayload:g,body:n.stream(),socket:t[Ws],header:""}):POe({body:n,client:t,request:r,contentLength:p,expectsPayload:g,h2stream:d,header:"",socket:t[Ws]}):ft.isStream(n)?UOe({body:n,client:t,request:r,contentLength:p,expectsPayload:g,socket:t[Ws],h2stream:d,header:""}):ft.isIterable(n)?QH({body:n,client:t,request:r,contentLength:p,expectsPayload:g,header:"",h2stream:d,socket:t[Ws]}):Ve(!1):r.onRequestSent()}}function UOe({h2stream:t,body:e,client:r,request:n,socket:s,contentLength:i,header:o,expectsPayload:a}){if(Ve(i!==0||r[Fs]===0,"stream body cannot be pipelined"),r[Uh]==="h2"){let p=function(C){n.onBodySent(C)},g=NVt(e,t,C=>{C?(ft.destroy(e,C),ft.destroy(t,C)):n.onRequestSent()});g.on("data",p),g.once("end",()=>{g.removeListener("data",p),ft.destroy(g)});return}let A=!1,c=new yH({socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(g){if(!A)try{!c.write(g)&&this.pause&&this.pause()}catch(p){ft.destroy(this,p)}},l=function(){A||e.resume&&e.resume()},d=function(){if(A)return;let g=new Zte;queueMicrotask(()=>h(g))},h=function(g){if(!A){if(A=!0,Ve(s.destroyed||s[up]&&r[Fs]<=1),s.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("error",h).removeListener("close",d),!g)try{c.end()}catch(p){g=p}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?ft.destroy(e,g):ft.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),s.on("drain",l).on("error",h)}async function POe({h2stream:t,body:e,client:r,request:n,socket:s,contentLength:i,header:o,expectsPayload:a}){Ve(i===e.size,"blob body must have content length");let A=r[Uh]==="h2";try{if(i!=null&&i!==e.size)throw new cp;let c=Buffer.from(await e.arrayBuffer());A?(t.cork(),t.write(c),t.uncork()):(s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
`,"latin1"):(Ke(i===null,"no body must not have content length"),n.write(`${o}\r
|
||||
`,"latin1")),s.onRequestSent(),r[Ch]()}catch(A){t(A)}}async function Xft(t,e,r,s,n,i,o,a){Ke(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Yg;let A=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(c),s.uncork()),n.onBodySent(c),n.onRequestSent(),a||(s[Ja]=!0),Fc(r)}catch(c){ft.destroy(A?t:s,c)}}async function QH({h2stream:t,body:e,client:r,request:n,socket:s,contentLength:i,header:o,expectsPayload:a}){Ve(i!==0||r[Fs]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let u=()=>new Promise((d,h)=>{Ve(A===null),s[Go]?h(s[Go]):A=d});if(r[Uh]==="h2"){t.on("close",c).on("drain",c);try{for await(let d of e){if(s[Go])throw s[Go];let h=t.write(d);n.onBodySent(d),h||await u()}}catch(d){t.destroy(d)}finally{n.onRequestSent(),t.end(),t.off("close",c).off("drain",c)}return}s.on("close",c).on("drain",c);let l=new yH({socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(s[Go])throw s[Go];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{s.off("close",c).off("drain",c)}}var yH=class{constructor({socket:e,request:r,contentLength:n,client:s,expectsPayload:i,header:o}){this.socket=e,this.request=r,this.contentLength=n,this.client=s,this.bytesWritten=0,this.expectsPayload=i,this.header=o,e[up]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[Go])throw r[Go];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(s!==null&&o+c>s){if(i[K1])throw new cp;process.emitWarning(new cp)}r.cork(),o===0&&(a||(r[Ja]=!0),s===null?r.write(`${A}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${A}content-length: ${s}\r
|
||||
`,"latin1"),n.write(A),n.uncork(),s.onBodySent(A),s.onRequestSent(),!a&&s.reset!==!1&&(n[qi]=!0),r[Ch]()}catch(A){t(A)}}async function Pme(t,e,r,s,n,i,o,a){Ke(i!==0||r[Yn]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let u=()=>new Promise((d,h)=>{Ke(A===null),n[ya]?h(n[ya]):A=d});n.on("close",c).on("drain",c);let l=new Yx({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(n[ya])throw n[ya];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{n.off("close",c).off("drain",c)}}var Yx=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[Ih]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[ya])throw r[ya];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(n!==null&&o+c>n){if(i[R6])throw new Yg;process.emitWarning(new Yg)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[qi]=!0),n===null?r.write(`${A}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${A}content-length: ${n}\r
|
||||
\r
|
||||
`,"latin1")),s===null&&r.write(`\r
|
||||
`,"latin1")),n===null&&r.write(`\r
|
||||
${c.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=c;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[Vs].timeout&&r[Vs].timeoutType===fw&&r[Vs].timeout.refresh&&r[Vs].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[up]=!1,e[Go])throw e[Go];if(!e.destroyed){if(s===0?i?e.write(`${o}content-length: 0\r
|
||||
`,"latin1"),this.bytesWritten+=c;let u=r.write(e);return r.uncork(),s.onBodySent(e),u||r[us].timeout&&r[us].timeoutType===v0&&r[us].timeout.refresh&&r[us].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:s,bytesWritten:n,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[Ih]=!1,e[ya])throw e[ya];if(!e.destroyed){if(n===0?i?e.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${o}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&s!==r){if(n[K1])throw new cp;process.emitWarning(new cp)}e[Vs].timeout&&e[Vs].timeoutType===fw&&e[Vs].timeout.refresh&&e[Vs].timeout.refresh(),Fc(n)}}destroy(e){let{socket:r,client:n}=this;r[up]=!1,e&&(Ve(n[Fs]<=1,"pipeline should only contain this request"),ft.destroy(r,e))}};function Va(t,e,r){try{e.onError(r),Ve(e.aborted)}catch(n){t.emit("error",n)}}_Oe.exports=Wte});var HOe=f((VNn,OOe)=>{"use strict";var wH=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)}};OOe.exports=class{constructor(){this.head=this.tail=new wH}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new wH),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=f((WNn,qOe)=>{var{kFree:uWt,kConnected:lWt,kPending:dWt,kQueued:hWt,kRunning:gWt,kSize:fWt}=ts(),PB=Symbol("pool"),$te=class{constructor(e){this[PB]=e}get connected(){return this[PB][lWt]}get free(){return this[PB][uWt]}get pending(){return this[PB][dWt]}get queued(){return this[PB][hWt]}get running(){return this[PB][gWt]}get size(){return this[PB][fWt]}};qOe.exports=$te});var ire=f((zNn,$Oe)=>{"use strict";var pWt=G1(),mWt=HOe(),{kConnected:ere,kSize:YOe,kRunning:JOe,kPending:VOe,kQueued:$1,kBusy:EWt,kFree:CWt,kUrl:IWt,kClose:BWt,kDestroy:QWt,kDispatch:yWt}=ts(),bWt=GOe(),TA=Symbol("clients"),Wa=Symbol("needDrain"),ek=Symbol("queue"),tre=Symbol("closed resolve"),rre=Symbol("onDrain"),WOe=Symbol("onConnect"),zOe=Symbol("onDisconnect"),jOe=Symbol("onConnectionError"),nre=Symbol("get dispatcher"),XOe=Symbol("add client"),ZOe=Symbol("remove client"),KOe=Symbol("stats"),sre=class extends pWt{constructor(){super(),this[ek]=new mWt,this[TA]=[],this[$1]=0;let e=this;this[rre]=function(n,s){let i=e[ek],o=!1;for(;!o;){let a=i.shift();if(!a)break;e[$1]--,o=!this.dispatch(a.opts,a.handler)}this[Wa]=o,!this[Wa]&&e[Wa]&&(e[Wa]=!1,e.emit("drain",n,[e,...s])),e[tre]&&i.isEmpty()&&Promise.all(e[TA].map(a=>a.close())).then(e[tre])},this[WOe]=(r,n)=>{e.emit("connect",r,[e,...n])},this[zOe]=(r,n,s)=>{e.emit("disconnect",r,[e,...n],s)},this[jOe]=(r,n,s)=>{e.emit("connectionError",r,[e,...n],s)},this[KOe]=new bWt(this)}get[EWt](){return this[Wa]}get[ere](){return this[TA].filter(e=>e[ere]).length}get[CWt](){return this[TA].filter(e=>e[ere]&&!e[Wa]).length}get[VOe](){let e=this[$1];for(let{[VOe]:r}of this[TA])e+=r;return e}get[JOe](){let e=0;for(let{[JOe]:r}of this[TA])e+=r;return e}get[YOe](){let e=this[$1];for(let{[YOe]:r}of this[TA])e+=r;return e}get stats(){return this[KOe]}async[BWt](){return this[ek].isEmpty()?Promise.all(this[TA].map(e=>e.close())):new Promise(e=>{this[tre]=e})}async[QWt](e){for(;;){let r=this[ek].shift();if(!r)break;r.handler.onError(e)}return Promise.all(this[TA].map(r=>r.destroy(e)))}[yWt](e,r){let n=this[nre]();return n?n.dispatch(e,r)||(n[Wa]=!0,this[Wa]=!this[nre]()):(this[Wa]=!0,this[ek].push({opts:e,handler:r}),this[$1]++),!this[Wa]}[XOe](e){return e.on("drain",this[rre]).on("connect",this[WOe]).on("disconnect",this[zOe]).on("connectionError",this[jOe]),this[TA].push(e),this[Wa]&&process.nextTick(()=>{this[Wa]&&this[rre](e[IWt],[this,e])}),this}[ZOe](e){e.close(()=>{let r=this[TA].indexOf(e);r!==-1&&this[TA].splice(r,1)}),this[Wa]=this[TA].some(r=>!r[Wa]&&r.closed!==!0&&r.destroyed!==!0)}};$Oe.exports={PoolBase:sre,kClients:TA,kNeedDrain:Wa,kAddClient:XOe,kRemoveClient:ZOe,kGetDispatcher:nre}});var pw=f((jNn,rHe)=>{"use strict";var{PoolBase:wWt,kClients:NH,kNeedDrain:NWt,kAddClient:SWt,kGetDispatcher:RWt}=ire(),DWt=Z1(),{InvalidArgumentError:ore}=Un(),are=qr(),{kUrl:eHe,kInterceptors:xWt}=ts(),TWt=Y1(),Are=Symbol("options"),cre=Symbol("connections"),tHe=Symbol("factory");function kWt(t,e){return new DWt(t,e)}var ure=class extends wWt{constructor(e,{connections:r,factory:n=kWt,connect:s,connectTimeout:i,tls:o,maxCachedSessions:a,socketPath:A,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:u,allowH2:l,...d}={}){if(super(),r!=null&&(!Number.isFinite(r)||r<0))throw new ore("invalid connections");if(typeof n!="function")throw new ore("factory must be a function.");if(s!=null&&typeof s!="function"&&typeof s!="object")throw new ore("connect must be a function or an object");typeof s!="function"&&(s=TWt({...o,maxCachedSessions:a,allowH2:l,socketPath:A,timeout:i,...are.nodeHasAutoSelectFamily&&c?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:u}:void 0,...s})),this[xWt]=d.interceptors&&d.interceptors.Pool&&Array.isArray(d.interceptors.Pool)?d.interceptors.Pool:[],this[cre]=r||null,this[eHe]=are.parseOrigin(e),this[Are]={...are.deepClone(d),connect:s,allowH2:l},this[Are].interceptors=d.interceptors?{...d.interceptors}:void 0,this[tHe]=n,this.on("con
Line truncated
|
||||
${n.count} ${n.noun} ${n.is} pending:
|
||||
`,"latin1"),r!==null&&n!==r){if(s[R6])throw new Yg;process.emitWarning(new Yg)}e[us].timeout&&e[us].timeoutType===v0&&e[us].timeout.refresh&&e[us].timeout.refresh(),s[Ch]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[Ih]=!1,e&&(Ke(s[Yn]<=1,"pipeline should only contain this request"),n(e))}};Yme.exports=Wft});var Xme=E((MCr,Zme)=>{"use strict";var ba=B("node:assert"),{pipeline:$ft}=B("node:stream"),Tt=yt(),{RequestContentLengthMismatchError:F6,RequestAbortedError:Vme,SocketError:Ab,InformationalError:M6}=tr(),{kUrl:qx,kReset:Jx,kClient:L0,kRunning:Wx,kPending:egt,kQueue:Bh,kPendingIdx:U6,kRunningIdx:LA,kError:PA,kSocket:An,kStrictContentLength:tgt,kOnError:v6,kMaxConcurrentStreams:Kme,kHTTP2Session:_A,kResume:Qh,kSize:rgt,kHTTPContext:sgt}=qr(),ql=Symbol("open streams"),Jme,Wme=!1,Vx;try{Vx=B("node:http2")}catch{Vx={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:ngt,HTTP2_HEADER_METHOD:igt,HTTP2_HEADER_PATH:ogt,HTTP2_HEADER_SCHEME:agt,HTTP2_HEADER_CONTENT_LENGTH:Agt,HTTP2_HEADER_EXPECT:cgt,HTTP2_HEADER_STATUS:ugt}}=Vx;function lgt(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 dgt(t,e){t[An]=e,Wme||(Wme=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=Vx.connect(t[qx],{createConnection:()=>e,peerMaxConcurrentStreams:t[Kme]});r[ql]=0,r[L0]=t,r[An]=e,Tt.addListener(r,"error",fgt),Tt.addListener(r,"frameError",ggt),Tt.addListener(r,"end",pgt),Tt.addListener(r,"goaway",Egt),Tt.addListener(r,"close",function(){let{[L0]:n}=this,{[An]:i}=n,o=this[An][PA]||this[PA]||new Ab("closed",Tt.getSocketInfo(i));if(n[_A]=null,n.destroyed){ba(n[egt]===0);let a=n[Bh].splice(n[LA]);for(let A=0;A<a.length;A++){let c=a[A];Tt.errorRequest(n,c,o)}}}),r.unref(),t[_A]=r,e[_A]=r,Tt.addListener(e,"error",function(n){ba(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[PA]=n,this[L0][v6](n)}),Tt.addListener(e,"end",function(){Tt.destroy(this,new Ab("other side closed",Tt.getSocketInfo(this)))}),Tt.addListener(e,"close",function(){let n=this[PA]||new Ab("closed",Tt.getSocketInfo(this));t[An]=null,this[_A]!=null&&this[_A].destroy(n),t[U6]=t[LA],ba(t[Wx]===0),t.emit("disconnect",t[qx],[t],n),t[Qh]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return Cgt(t,...n)},resume(){hgt(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function hgt(t){let e=t[An];e?.destroyed===!1&&(t[rgt]===0&&t[Kme]===0?(e.unref(),t[_A].unref()):(e.ref(),t[_A].ref()))}function fgt(t){ba(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[An][PA]=t,this[L0][v6](t)}function ggt(t,e,r){if(r===0){let s=new M6(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[An][PA]=s,this[L0][v6](s)}}function pgt(){let t=new Ab("other side closed",Tt.getSocketInfo(this[An]));this.destroy(t),Tt.destroy(this[An],t)}function Egt(t){let e=this[PA]||new Ab(`HTTP/2: "GOAWAY" frame received with code ${t}`,Tt.getSocketInfo(this)),r=this[L0];if(r[An]=null,r[sgt]=null,this[_A]!=null&&(this[_A].destroy(e),this[_A]=null),Tt.destroy(this[An],e),r[LA]<r[Bh].length){let s=r[Bh][r[LA]];r[Bh][r[LA]++]=null,Tt.errorRequest(r,s,e),r[U6]=r[LA]}ba(r[Wx]===0),r.emit("disconnect",r[qx],[r],e),r[Qh]()}function mgt(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function Cgt(t,e){let r=t[_A],{method:s,path:n,host:i,upgrade:o,expectContinue:a,signal:A,headers:c}=e,{body:u}=e;if(o)return Tt.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let b=0;b<c.length;b+=2){let U=c[b+0],q=c[b+1];if(Array.isArray(q))for(let x=0;x<q.length;x++)l[U]?l[U]+=`,${q[x]}`:l[U]=q[x];else l[U]=q}let d,{hostname:h,port:f}=t[qx];l[ngt]=i||`${h}${f?`:${f}`:""}`,l[igt]=s;let p=b=>{e.aborted||e.completed||(b=b||new Vme,Tt.errorRequest(t,e,b),d!=null&&Tt.destroy(d,b),Tt.destroy(u,b),t[Bh][t[LA]++]=null,t[Qh]())};try{e.onConnect(p)}catch(b){Tt.errorRequest(t,e,b)}if(e.aborted)return!1;if(s==="CONNECT")return r.ref(),d=r.request(l,{endStream:!1,signal:A}),d.id&&!d.pending?(e.onUpgrade(null,null,d),++r[ql],t[Bh][t[LA]++]=null):d.once("ready",()=>{e.onUpgrade(null,null,d),++r[ql],t[Bh][t[LA]++]=null}),d.once("close",()=>{r[ql]-=1,r[ql]===0&&r.unref()}),!0;l[ogt]=n,l[agt]="https";let C=s==="PUT"||s==="POST"||s==="PATCH";u&&typeof u.read=="function"&&u.read(0);let m=Tt.bodyLength(u);if(Tt.isFormDataLike(u)){Jme??=F0().extractBody;let[b,U]=Jme(u);l["content-type"]=U,u=b.stream,m=b.length}if(m==null&&(m=e.contentLength),(m===0||!C)&&(m=null),mgt(s)&&m>0&&e.contentLength!=null&&e.contentLength!==m){if(t[tgt])return Tt.errorRequest(t,e,new F6),!1;process.emitWarning(new F6)}m!=null&&(ba(u,"no body must not have content length"),l[Agt]=`${m}`),r.ref();let I=s==="GET"||s==="HEAD"||u===null;return a?(l[cgt]="100-continue",d=r.request(l,{endStream:I,signal:A}),d.once("cont
Line truncated
|
||||
`,this[Vgt]=A??3e5,this[qgt]=n??3e5,this[Jgt]=I??!0,this[Wgt]=b,this[O6]=q,this[bh]=null,this[Xgt]=P>-1?P:-1,this[ept]=$??100,this[Ss]=null,this[OA]=[],this[Jl]=0,this[HA]=0,this[db]=ae=>G6(this,ae),this[$gt]=ae=>u0e(this,ae)}get pipelining(){return this[Zx]}set pipelining(e){this[Zx]=e,this[db](!0)}get[gb](){return this[OA].length-this[HA]}get[fb](){return this[HA]-this[Jl]}get[hb](){return this[OA].length-this[Jl]}get[Lgt](){return!!this[Ss]&&!this[P0]&&!this[Ss].destroyed}get[P6](){return!!(this[Ss]?.busy(null)||this[hb]>=(c0e(this)||1)||this[gb]>0)}[vgt](e){l0e(this),this.once("connect",e)}[Zgt](e,r){let s=e.origin||this[Kc].origin,n=new Tgt(s,e,r);return this[OA].push(n),this[Vg]||(qg.bodyLength(n.body)==null&&qg.isIterable(n.body)?(this[Vg]=1,queueMicrotask(()=>G6(this))):this[db](!0)),this[Vg]&&this[wh]!==2&&this[P6]&&(this[wh]=2),this[wh]<2}async[jgt](){return new Promise(e=>{this[hb]?this[bh]=e:e(null)})}async[Kgt](e){return new Promise(r=>{let s=this[OA].splice(this[HA]);for(let i=0;i<s.length;i++){let o=s[i];qg.errorRequest(this,o,e)}let n=()=>{this[bh]&&(this[bh](),this[bh]=null),r(null)};this[Ss]?(this[Ss].destroy(e,n),this[Ss]=null):queueMicrotask(n),this[db]()})}},spt=Kx();function u0e(t,e){if(t[fb]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Vl(t[HA]===t[Jl]);let r=t[OA].splice(t[Jl]);for(let s=0;s<r.length;s++){let n=r[s];qg.errorRequest(t,n,e)}Vl(t[hb]===0)}}async function l0e(t){Vl(!t[P0]),Vl(!t[Ss]);let{host:e,hostname:r,protocol:s,port:n}=t[Kc];if(r[0]==="["){let i=r.indexOf("]");Vl(i!==-1);let o=r.substring(1,i);Vl(A0e.isIP(o)),r=o}t[P0]=!0,_0.beforeConnect.hasSubscribers&&_0.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Ss]?.version,servername:t[yh],localAddress:t[lb]},connector:t[ub]});try{let i=await new Promise((o,a)=>{t[ub]({host:e,hostname:r,protocol:s,port:n,servername:t[yh],localAddress:t[lb]},(A,c)=>{A?a(A):o(c)})});if(t.destroyed){qg.destroy(i.on("error",o0e),new Fgt);return}Vl(i);try{t[Ss]=i.alpnProtocol==="h2"?await rpt(t,i):await tpt(t,i)}catch(o){throw i.destroy().on("error",o0e),o}t[P0]=!1,i[zgt]=0,i[O6]=t[O6],i[Ugt]=t,i[Pgt]=null,_0.connected.hasSubscribers&&_0.connected.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Ss]?.version,servername:t[yh],localAddress:t[lb]},connector:t[ub],socket:i}),t.emit("connect",t[Kc],[t])}catch(i){if(t.destroyed)return;if(t[P0]=!1,_0.connectError.hasSubscribers&&_0.connectError.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[Ss]?.version,servername:t[yh],localAddress:t[lb]},connector:t[ub],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Vl(t[fb]===0);t[gb]>0&&t[OA][t[HA]].servername===t[yh];){let o=t[OA][t[HA]++];qg.errorRequest(t,o,i)}else u0e(t,i);t.emit("connectionError",t[Kc],[t],i)}t[db]()}function a0e(t){t[wh]=0,t.emit("drain",t[Kc],[t])}function G6(t,e){t[Vg]!==2&&(t[Vg]=2,npt(t,e),t[Vg]=0,t[Jl]>256&&(t[OA].splice(0,t[Jl]),t[HA]-=t[Jl],t[Jl]=0))}function npt(t,e){for(;;){if(t.destroyed){Vl(t[gb]===0);return}if(t[bh]&&!t[hb]){t[bh](),t[bh]=null;return}if(t[Ss]&&t[Ss].resume(),t[P6])t[wh]=2;else if(t[wh]===2){e?(t[wh]=1,queueMicrotask(()=>a0e(t))):a0e(t);continue}if(t[gb]===0||t[fb]>=(c0e(t)||1))return;let r=t[OA][t[HA]];if(t[Kc].protocol==="https:"&&t[yh]!==r.servername){if(t[fb]>0)return;t[yh]=r.servername,t[Ss]?.destroy(new kgt("servername changed"),()=>{t[Ss]=null,G6(t)})}if(t[P0])return;if(!t[Ss]){l0e(t);return}if(t[Ss].destroyed||t[Ss].busy(r))return;!r.aborted&&t[Ss].write(r)?t[HA]++:t[OA].splice(t[HA],1)}}d0e.exports=H6});var Y6=E((PCr,h0e)=>{"use strict";var Xx=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)}};h0e.exports=class{constructor(){this.head=this.tail=new Xx}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Xx),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var g0e=E((OCr,f0e)=>{var{kFree:ipt,kConnected:opt,kPending:apt,kQueued:Apt,kRunning:cpt,kSize:upt}=qr(),Jg=Symbol("pool"),q6=class{constructor(e){this[Jg]=e}get connected(){return this[Jg][opt]}get free(){return this[Jg][ipt]}get pending(){return this[Jg][apt]}get queued(){return this[Jg][Apt]}get running(){return this[Jg][cpt]}get size(){return this[Jg][upt]}};f0e.exports=q6});var K6=E((HCr,w0e)=>{"use strict";var lpt=b0(),dpt=Y6(),{kConnected:V6,kSize:p0e,kRunning:E0e,kPending:m0e,kQueued:pb,kBusy:hpt,kFree:fpt,kUrl:gpt,kClose:ppt,kDestroy:Ept,kDispatch:mpt}=qr(),Cpt=g0e(),Vi=Symbol("clients"),gi=Symbol("needDrain"),Eb=Symbol("queue"),J6=Symbol("closed resolve"),W6=Symbol("onDrain"),C0e=Symbol("onConnect"),I0e=Symbol("onDisconnect"),B0e=Symbol("onCo
Line truncated
|
||||
${s.count} ${s.noun} ${s.is} pending:
|
||||
|
||||
${e.format(r)}
|
||||
`.trim())}};Mqe.exports=zre});var Hqe=f((ISn,Oqe)=>{"use strict";var{kProxy:Fjt,kClose:Mjt,kDestroy:vjt,kInterceptors:Ljt}=ts(),{URL:Lqe}=B("url"),Uqe=rk(),Ujt=pw(),Pjt=G1(),{InvalidArgumentError:ak,RequestAbortedError:_jt}=Un(),Pqe=Y1(),ik=Symbol("proxy agent"),WH=Symbol("proxy client"),ok=Symbol("proxy headers"),jre=Symbol("request tls settings"),Ojt=Symbol("proxy tls settings"),_qe=Symbol("connect endpoint function");function Hjt(t){return t==="https:"?443:80}function qjt(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new ak("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}function Gjt(t,e){return new Ujt(t,e)}var Kre=class extends Pjt{constructor(e){if(super(e),this[Fjt]=qjt(e),this[ik]=new Uqe(e),this[Ljt]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new ak("Proxy opts.uri is mandatory");let{clientFactory:r=Gjt}=e;if(typeof r!="function")throw new ak("Proxy opts.clientFactory must be a function.");this[jre]=e.requestTls,this[Ojt]=e.proxyTls,this[ok]=e.headers||{};let n=new Lqe(e.uri),{origin:s,port:i,host:o,username:a,password:A}=n;if(e.auth&&e.token)throw new ak("opts.auth cannot be used in combination with opts.token");e.auth?this[ok]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[ok]["proxy-authorization"]=e.token:a&&A&&(this[ok]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(a)}:${decodeURIComponent(A)}`).toString("base64")}`);let c=Pqe({...e.proxyTls});this[_qe]=Pqe({...e.requestTls}),this[WH]=r(n,{connect:c}),this[ik]=new Uqe({...e,connect:async(u,l)=>{let d=u.host;u.port||(d+=`:${Hjt(u.protocol)}`);try{let{socket:h,statusCode:g}=await this[WH].connect({origin:s,port:i,path:d,signal:u.signal,headers:{...this[ok],host:o}});if(g!==200&&(h.on("error",()=>{}).destroy(),l(new _jt(`Proxy response (${g}) !== 200 when HTTP Tunneling`))),u.protocol!=="https:"){l(null,h);return}let p;this[jre]?p=this[jre].servername:p=u.servername,this[_qe]({...u,servername:p,httpSocket:h},l)}catch(h){l(h)}}})}dispatch(e,r){let{host:n}=new Lqe(e.origin),s=Yjt(e.headers);return Jjt(s),this[ik].dispatch({...e,headers:{...s,host:n}},r)}async[Mjt](){await this[ik].close(),await this[WH].close()}async[vjt](){await this[ik].destroy(),await this[WH].destroy()}};function Yjt(t){if(Array.isArray(t)){let e={};for(let r=0;r<t.length;r+=2)e[t[r]]=t[r+1];return e}return t}function Jjt(t){if(t&&Object.keys(t).find(r=>r.toLowerCase()==="proxy-authorization"))throw new ak("Proxy-Authorization should be sent in ProxyAgent constructor")}Oqe.exports=Kre});var Vqe=f((BSn,Jqe)=>{var YB=B("assert"),{kRetryHandlerDefaultRetry:qqe}=ts(),{RequestRetryError:zH}=Un(),{isDisturbed:Gqe,parseHeaders:Vjt,parseRangeHeader:Yqe}=qr();function Wjt(t){let e=Date.now();return new Date(t).getTime()-e}var Xre=class t{constructor(e,r){let{retryOptions:n,...s}=e,{retry:i,maxRetries:o,maxTimeout:a,minTimeout:A,timeoutFactor:c,methods:u,errorCodes:l,retryAfter:d,statusCodes:h}=n??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts=s,this.abort=null,this.aborted=!1,this.retryOpts={retry:i??t[qqe],retryAfter:d??!0,maxTimeout:a??30*1e3,timeout:A??500,timeoutFactor:c??2,maxRetries:o??5,methods:u??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:h??[500,502,503,504,429],errorCodes:l??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(g=>{this.aborted=!0,this.abort?this.abort(g):this.reason=g})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,r,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,r,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[qqe](e,{state:r,opts:n},s){let{statusCode:i,code:o,headers:a}=e,{method:A,retryOptions:c}=n,{maxRetries:u,timeout:l,maxTimeout:d,timeoutFactor:h,statusCodes:g,errorCodes:p,methods:C}=c,{counter:m,currentTimeout:I}=r;if(I=I!=null&&I>0?I:l,o&&o!=="UND_ERR_REQ_RETRY"&&o!=="UND_ERR_SOCKET"&&!p.includes(o)){s(e);return}if(Array.isArray(C)&&!C.includes(A)){s(e);return}if(i!=null&&Array.isArray(g)&&!g.includes(i)){s(e);return}if(m>u){s(e);return}let y=a!=null&&a["retry-after"];y&&(y=Number(y),y=isNaN(y)?Wjt(y):y*1e3);let w=y>0?Math.min(y,d):Math.min(I*h**m,d);r.currentTimeout=w,setTimeout(()=>s(null),w)}onHeaders(e,r,n,s){let i=Vjt(r);if(this.retryCount+=1,e>=300)return this.abort(new zH("Request failed",e,{headers:i,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,e!==206)return!0;let a=Yqe(i["content-range"]);if(!a)return this.abort(new zH("Content-Range mismatch",e,{headers:i,count:this.retryCount})),!1;if(this.etag!=null&&this.etag!==i.etag)return this.abort(new zH("ETag mismatch",e,{headers:i,count:this.retryCount})),!1;let{start:A,size:c,en
Line truncated
|
||||
|
||||
Error Code : ${o.statusCode}
|
||||
|
||||
Error Message: ${o.message}`)})).result)===null||r===void 0?void 0:r.value;if(!i)throw new Error("Response json body do not have ID Token field");return i})}static getIDToken(e){return t3e(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let s=encodeURIComponent(e);r=`${r}&audience=${s}`}(0,r3e.debug)(`ID token url is ${r}`);let n=yield t.getCall(r);return(0,r3e.setSecret)(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};Hw.OidcClient=One});var Yne=f(LA=>{"use strict";var Hne=LA&&LA.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(LA,"__esModule",{value:!0});LA.summary=LA.markdownSummary=LA.SUMMARY_DOCS_URL=LA.SUMMARY_ENV_VAR=void 0;var UZt=B("os"),qne=B("fs"),{access:PZt,appendFile:_Zt,writeFile:OZt}=qne.promises;LA.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";LA.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var Gne=class{constructor(){this._buffer=""}filePath(){return Hne(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[LA.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${LA.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield PZt(e,qne.constants.R_OK|qne.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let s=Object.entries(n).map(([i,o])=>` ${i}="${o}"`).join("");return r?`<${e}${s}>${r}</${e}>`:`<${e}${s}>`}write(e){return Hne(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?OZt:_Zt)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return Hne(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(UZt.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",s=e.map(o=>this.wrap("li",o)).join(""),i=this.wrap(n,s);return this.addRaw(i).addEOL()}addTable(e){let r=e.map(s=>{let i=s.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:a,data:A,colspan:c,rowspan:u}=o,l=a?"th":"td",d=Object.assign(Object.assign({},c&&{colspan:c}),u&&{rowspan:u});return this.wrap(l,A,d)}).join("");return this.wrap("tr",i)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:i}=n||{},o=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i}),a=this.wrap("img",null,Object.assign({src:e,alt:r},o));return this.addRaw(a).addEOL()}addHeading(e,r){let n=`h${r}`,s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},s3e=new Gne;LA.markdownSummary=s3e;LA.summary=s3e});var i3e=f(UA=>{"use strict";var HZt=UA&&UA.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qZt=UA&&UA.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),GZt=UA&&UA.__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)&&HZt(e,t,r);return qZt(e,t),e};Object.defineProperty(UA,"__esModule",{value:!0});UA.toPlatformPath=UA.toWin32Path=UA.toPosixPath=void 0;var YZt=GZt(B("path"));function JZt(t){return t.replace(/[\\]/g,"/")}UA.toPosixPath=JZt;function VZt(t){return t.replace(/[/]/g,"\\")}UA.toWin32Path=VZt;function WZt(t){return t.replace(/[/\\]/g,YZt.sep)}UA.toPlatformPath=WZt});var Vne=f(Ze=>{"use strict";var zZt=Ze&&Ze.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),tLine truncated
|
||||
`);return{name:e,version:r}});Gr.platform=y3e.default.platform();Gr.arch=y3e.default.arch();Gr.isWindows=Gr.platform==="win32";Gr.isMacOS=Gr.platform==="darwin";Gr.isLinux=Gr.platform==="linux";function N$t(){return Yq(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield Gr.isWindows?y$t():Gr.isMacOS?b$t():w$t()),{platform:Gr.platform,arch:Gr.arch,isWindows:Gr.isWindows,isMacOS:Gr.isMacOS,isLinux:Gr.isLinux})})}Gr.getDetails=N$t});var Oc=f(We=>{"use strict";var S$t=We&&We.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),R$t=We&&We.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xne=We&&We.__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)&&S$t(e,t,r);return R$t(e,t),e},w3e=We&&We.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(We,"__esModule",{value:!0});We.platform=We.toPlatformPath=We.toWin32Path=We.toPosixPath=We.markdownSummary=We.summary=We.getIDToken=We.getState=We.saveState=We.group=We.endGroup=We.startGroup=We.info=We.notice=We.warning=We.error=We.debug=We.isDebug=We.setFailed=We.setCommandEcho=We.setOutput=We.getBooleanInput=We.getMultilineInput=We.getInput=We.addPath=We.setSecret=We.exportVariable=We.ExitCode=void 0;var zu=uPe(),ZB=hPe(),Gw=GO(),N3e=Xne(B("os")),D$t=Xne(B("path")),x$t=n3e(),Kne;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(Kne||(We.ExitCode=Kne={}));function T$t(t,e){let r=(0,Gw.toCommandValue)(e);if(process.env[t]=r,process.env.GITHUB_ENV||"")return(0,ZB.issueFileCommand)("ENV",(0,ZB.prepareKeyValueMessage)(t,e));(0,zu.issueCommand)("set-env",{name:t},r)}We.exportVariable=T$t;function k$t(t){(0,zu.issueCommand)("add-mask",{},t)}We.setSecret=k$t;function F$t(t){process.env.GITHUB_PATH||""?(0,ZB.issueFileCommand)("PATH",t):(0,zu.issueCommand)("add-path",{},t),process.env.PATH=`${t}${D$t.delimiter}${process.env.PATH}`}We.addPath=F$t;function Zne(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}We.getInput=Zne;function M$t(t,e){let r=Zne(t,e).split(`
|
||||
`).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}We.getMultilineInput=M$t;function v$t(t,e){let r=["true","True","TRUE"],n=["false","False","FALSE"],s=Zne(t,e);if(r.includes(s))return!0;if(n.includes(s))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}We.getBooleanInput=v$t;function L$t(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,ZB.issueFileCommand)("OUTPUT",(0,ZB.prepareKeyValueMessage)(t,e));process.stdout.write(N3e.EOL),(0,zu.issueCommand)("set-output",{name:t},(0,Gw.toCommandValue)(e))}We.setOutput=L$t;function U$t(t){(0,zu.issue)("echo",t?"on":"off")}We.setCommandEcho=U$t;function P$t(t){process.exitCode=Kne.Failure,S3e(t)}We.setFailed=P$t;function _$t(){return process.env.RUNNER_DEBUG==="1"}We.isDebug=_$t;function O$t(t){(0,zu.issueCommand)("debug",{},t)}We.debug=O$t;function S3e(t,e={}){(0,zu.issueCommand)("error",(0,Gw.toCommandProperties)(e),t instanceof Error?t.toString():t)}We.error=S3e;function H$t(t,e={}){(0,zu.issueCommand)("warning",(0,Gw.toCommandProperties)(e),t instanceof Error?t.toString():t)}We.warning=H$t;function q$t(t,e={}){(0,zu.issueCommand)("notice",(0,Gw.toCommandProperties)(e),t instanceof Error?t.toString():t)}We.notice=q$t;function G$t(t){process.stdout.write(t+N3e.EOL)}We.info=G$t;function R3e(t){(0,zu.issue)("group",t)}We.startGroup=R3e;function D3e(){(0,zu.issue)("endgroup")}We.endGroup=D3e;function Y$t(t,e){return w3e(this,void 0,void 0,function*(){R3e(t);let r;try{r=yield e()}finally{D3e()}return r})}We.group=Y$t;function J$t(t,e){if(process.env.GITHUB_STATE||"")return(0,ZB.issueFileCommand)("STATE",(0,ZB.prepareKeyValueMessage)(t,e));(0,zu.issueCommand)("save-state",{name:t},(0,Gw.toCommandValue)(e))}We.saveState=J$t;function V$t(t){return process.env[`STATE_${t}`]||""}We.getState=V$t;function W$t(t){return w3e(this,void 0,void 0,function*(){return yield x$t.OidcClient.getIDToken(t)})}We.getIDToken=W$t;var z$t=Yne();Object.defineProperty(We,"summary",{enumerable:!0,get:function(){return z$t.summary}});var j$t=Yne();Object.defineProperty(We,"markdownSummary",{enumerable:!0,get:function(){return j$t.markdownSummary}});var $ne=i3e();Object.defineProperty(We,"toPosixPath",{enumerable:!0,get:function(){return $ne.toPosixPath}});Object.defineProperty(We,"toWin32Path",{enumerable:!0,get:function(){return $ne.toWin32Path}});Object.defineProperty(We,"toPlatformPath",{enumerable:!0,get:function(){return $ne.toPlatformPath}});We.platform=Xne(b3e())});var x3e=f(Jh=>{"use strict";var K$t=Jh&&Jh.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),X$t=Jh&&Jh.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Z$t=Jh&&Jh.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&K$t(e,t,r);return X$t(e,t),e};Object.defineProperty(Jh,"__esModule",{value:!0});Jh.getOptions=void 0;var ese=Z$t(Oc());function $$t(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,ese.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,ese.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,ese.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}Jh.getOptions=$$t});var Vq=f(js=>{"use strict";var eer=js&&js.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ter=js&&js.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rer=js&&js.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&eer(e,t,r);return ter(e,t),e},ner=js&&js.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(js,"__esModule",{value:!0});js.safeTrimTrailingSeparator=js.normalizeSeparators=js.hasRoot=js.hasAbsoluteRoot=js.ensureAbsoluteRoot=js.dirname=void 0;var Jq=rer(B("path")),$B=ner(B("assert")),bE=process.platform==="win32";function ser(t){if(t=rse(t),bE&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=Jq.dirname(t);return bE&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=rse(e)),e}js.dirname=ser;function ier(t,e){if($B.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),$B.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),tse(e))return e;if(bE){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let r=process.cwd();return $B.default(r.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${r}'`),e[0].toUpperCase()===r[0].toUpperCase()?e.length===2?`${e[0]}:\\${r.substr(3)}`:(r.endsLine truncated
|
||||
%s`,H,H,I,n);var z=I.type==="*"?ose:I.type==="?"?ise:"\\"+I.type;s=!0,n=n.slice(0,I.reStart)+z+"\\("+H}g(),i&&(n+="\\\\");var F=!1;switch(n.charAt(0)){case"[":case".":case"(":F=!0}for(var W=a.length-1;W>-1;W--){var U=a[W],ee=n.slice(0,U.reStart),oe=n.slice(U.reStart,U.reEnd-8),Z=n.slice(U.reEnd-8,U.reEnd),he=n.slice(U.reEnd);Z+=he;var Se=ee.split("(").length-1,Je=he;for(p=0;p<Se;p++)Je=Je.replace(/\)[+*?]?/,"");he=Je;var He="";he===""&&e!==jq&&(He="$");var $t=ee+oe+he+He+Z;n=$t}if(n!==""&&s&&(n="(?=.)"+n),F&&(n=d+n),e===jq)return[n,s];if(!s)return Mer(t);var en=r.nocase?"i":"";try{var er=new RegExp("^"+n+"$",en)}catch{return new RegExp("$.")}return er._glob=t,er._src=n,er}Hc.makeRe=function(t,e){return new Jo(t,e||{}).makeRe()};Jo.prototype.makeRe=Fer;function Fer(){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?ose:e.dot?wer:Ner,n=e.nocase?"i":"",s=t.map(function(i){return i.map(function(o){return o===ase?r:typeof o=="string"?ver(o):o._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}Hc.match=function(t,e,r){r=r||{};var n=new Jo(e,r);return t=t.filter(function(s){return n.match(s)}),n.options.nonull&&!t.length&&t.push(e),t};Jo.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 n=this.options;yk.sep!=="/"&&(e=e.split(yk.sep).join("/")),e=e.split(K3e),this.debug(this.pattern,"split",e);var s=this.set;this.debug(this.pattern,"set",s);var i,o;for(o=e.length-1;o>=0&&(i=e[o],!i);o--);for(o=0;o<s.length;o++){var a=s[o],A=e;n.matchBase&&a.length===1&&(A=[i]);var c=this.matchOne(A,a,r);if(c)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};Jo.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var s=0,i=0,o=t.length,a=e.length;s<o&&i<a;s++,i++){this.debug("matchOne loop");var A=e[i],c=t[s];if(this.debug(e,A,c),A===!1)return!1;if(A===ase){this.debug("GLOBSTAR",[e,A,c]);var u=s,l=i+1;if(l===a){for(this.debug("** at the end");s<o;s++)if(t[s]==="."||t[s]===".."||!n.dot&&t[s].charAt(0)===".")return!1;return!0}for(;u<o;){var d=t[u];if(this.debug(`
|
||||
globstar while`,t,u,e,l,d),this.matchOne(t.slice(u),e.slice(l),r))return this.debug("globstar found match!",u,o,d),!0;if(d==="."||d===".."||!n.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,u,e,l);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(r&&(this.debug(`
|
||||
>>> no match, partial?`,t,u,e,l),u===o))}var h;if(typeof A=="string"?(h=c===A,this.debug("string match",A,c,h)):(h=c.match(A),this.debug("pattern match",A,c,h)),!h)return!1}if(s===o&&i===a)return!0;if(s===o)return r;if(i===a)return s===o-1&&t[s]==="";throw new Error("wtf?")};function Mer(t){return t.replace(/\\(.)/g,"$1")}function ver(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var e4e=f(ju=>{"use strict";var Ler=ju&&ju.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Uer=ju&&ju.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$3e=ju&&ju.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Ler(e,t,r);return Uer(e,t),e},Per=ju&&ju.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ju,"__esModule",{value:!0});ju.Path=void 0;var bk=$3e(B("path")),NE=$3e(Vq()),wk=Per(B("assert")),_er=process.platform==="win32",cse=class{constructor(e){if(this.segments=[],typeof e=="string")if(wk.default(e,"Parameter 'itemPath' must not be empty"),e=NE.safeTrimTrailingSeparator(e),!NE.hasRoot(e))this.segments=e.split(bk.sep);else{let r=e,n=NE.dirname(r);for(;n!==r;){let s=bk.basename(r);this.segments.unshift(s),r=n,n=NE.dirname(r)}this.segments.unshift(r)}else{wk.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let r=0;r<e.length;r++){let n=e[r];wk.default(n,"Parameter 'itemPath' must not contain any empty segments"),n=NE.normalizeSeparators(e[r]),r===0&&NE.hasRoot(n)?(n=NE.safeTrimTrailingSeparator(n),wk.default(n===NE.dirname(n),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(n)):(wk.default(!n.includes(bk.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(n))}}}toString(){let e=this.segments[0],r=e.endsWith(bk.sep)||_er&&/^[A-Z]:$/i.test(e);for(let n=1;n<this.segments.length;n++)r?r=!1:e+=bk.sep,e+=this.segments[n];return e}};ju.Path=cse});var t4e=f(Ku=>{"use strict";var Oer=Ku&&Ku.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Her=Ku&&Ku.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),dse=Ku&&Ku.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Oer(e,t,r);return Her(e,t),e},qer=Ku&&Ku.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ku,"__esModule",{value:!0});Ku.Pattern=void 0;var Ger=dse(B("os")),Nk=dse(B("path")),qA=dse(Vq()),e0=qer(B("assert")),Yer=Ase(),use=Wq(),Xq=e4e(),fp=process.platform==="win32",lse=class t{constructor(e,r=!1,n,s){this.negate=!1;let i;if(typeof e=="string")i=e.trim();else{n=n||[],e0.default(n.length,"Parameter 'segments' must not empty");let c=t.getLiteral(n[0]);e0.default(c&&qA.hasAbsoluteRoot(c),"Parameter 'segments' first element must be a root path"),i=new Xq.Path(n).toString().trim(),e&&(i=`!${i}`)}for(;i.startsWith("!");)this.negate=!this.negate,i=i.substr(1).trim();i=t.fixupPattern(i,s),this.segments=new Xq.Path(i).segments,this.trailingSeparator=qA.normalizeSeparators(i).endsWith(Nk.sep),i=qA.safeTrimTrailingSeparator(i);let o=!1,a=this.segments.map(c=>t.getLiteral(c)).filter(c=>!o&&!(o=c===""));this.searchPath=new Xq.Path(a).toString(),this.rootRegExp=new RegExp(t.regExpEscape(a[0]),fp?"i":""),this.isImplicitPattern=r;let A={dot:!0,nobrace:!0,nocase:fp,nocomment:!0,noext:!0,nonegate:!0};i=fp?i.replace(/\\/g,"/"):i,this.minimatch=new Yer.Minimatch(i,A)}match(e){return this.segments[this.segments.length-1]==="**"?(e=qA.normalizeSeparators(e),!e.endsWith(Nk.sep)&&this.isImplicitPattern===!1&&(e=`${e}${Nk.sep}`)):e=qA.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?use.MatchKind.Directory:use.MatchKind.All:use.MatchKind.None}partialMatch(e){return e=qA.safeTrimTrailingSeparator(e),qA.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(fp?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(fp?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,r){e0.default(e,"pattern cannot be empty");let n=new Xq.Path(e).segments.map(s=>t.getLiteral(s));if(e0.default(n.every((s,i)=>(s!=="."||i===0)&&s!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),e0.default(!qA.hasRoot(e)||n[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=qA.normalizeSeparators(e),e==="."||e.startsWith(`.${Nk.sep}`))e=t.globEscap
Line truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`));let s=e.split(`
|
||||
`).map(i=>i.trim());for(let i of s)!i||i.startsWith("#")||n.patterns.push(new i4e.Pattern(i));return n.searchPaths.push(...$q.getSearchPaths(n.patterns)),n})}static stat(e,r,n){return gse(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield Sk.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){fse.debug(`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 s=yield Sk.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let i=yield Sk.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===i)){fse.debug(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return s})}};co.DefaultGlobber=pse});var A4e=f(Jw=>{"use strict";var Xer=Jw&&Jw.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Jw,"__esModule",{value:!0});Jw.create=void 0;var Zer=a4e();function $er(t,e){return Xer(this,void 0,void 0,function*(){return yield Zer.DefaultGlobber.create(t,e)})}Jw.create=$er});var g4e=f((Ot,h4e)=>{Ot=h4e.exports=ur;var En;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?En=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:En=function(){};Ot.SEMVER_SPEC_VERSION="2.0.0";var Dk=256,eG=Number.MAX_SAFE_INTEGER||9007199254740991,mse=16,etr=Dk-6,Vw=Ot.re=[],mn=Ot.safeRe=[],me=Ot.src=[],ie=Ot.tokens={},l4e=0;function Er(t){ie[t]=l4e++}var Cse="[a-zA-Z0-9-]",Ese=[["\\s",1],["\\d",Dk],[Cse,etr]];function Tk(t){for(var e=0;e<Ese.length;e++){var r=Ese[e][0],n=Ese[e][1];t=t.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return t}Er("NUMERICIDENTIFIER");me[ie.NUMERICIDENTIFIER]="0|[1-9]\\d*";Er("NUMERICIDENTIFIERLOOSE");me[ie.NUMERICIDENTIFIERLOOSE]="\\d+";Er("NONNUMERICIDENTIFIER");me[ie.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+Cse+"*";Er("MAINVERSION");me[ie.MAINVERSION]="("+me[ie.NUMERICIDENTIFIER]+")\\.("+me[ie.NUMERICIDENTIFIER]+")\\.("+me[ie.NUMERICIDENTIFIER]+")";Er("MAINVERSIONLOOSE");me[ie.MAINVERSIONLOOSE]="("+me[ie.NUMERICIDENTIFIERLOOSE]+")\\.("+me[ie.NUMERICIDENTIFIERLOOSE]+")\\.("+me[ie.NUMERICIDENTIFIERLOOSE]+")";Er("PRERELEASEIDENTIFIER");me[ie.PRERELEASEIDENTIFIER]="(?:"+me[ie.NUMERICIDENTIFIER]+"|"+me[ie.NONNUMERICIDENTIFIER]+")";Er("PRERELEASEIDENTIFIERLOOSE");me[ie.PRERELEASEIDENTIFIERLOOSE]="(?:"+me[ie.NUMERICIDENTIFIERLOOSE]+"|"+me[ie.NONNUMERICIDENTIFIER]+")";Er("PRERELEASE");me[ie.PRERELEASE]="(?:-("+me[ie.PRERELEASEIDENTIFIER]+"(?:\\."+me[ie.PRERELEASEIDENTIFIER]+")*))";Er("PRERELEASELOOSE");me[ie.PRERELEASELOOSE]="(?:-?("+me[ie.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+me[ie.PRERELEASEIDENTIFIERLOOSE]+")*))";Er("BUILDIDENTIFIER");me[ie.BUILDIDENTIFIER]=Cse+"+";Er("BUILD");me[ie.BUILD]="(?:\\+("+me[ie.BUILDIDENTIFIER]+"(?:\\."+me[ie.BUILDIDENTIFIER]+")*))";Er("FULL");Er("FULLPLAIN");me[ie.FULLPLAIN]="v?"+me[ie.MAINVERSION]+me[ie.PRERELEASE]+"?"+me[ie.BUILD]+"?";me[ie.FULL]="^"+me[ie.FULLPLAIN]+"$";Er("LOOSEPLAIN");me[ie.LOOSEPLAIN]="[v=\\s]*"+me[ie.MAINVERSIONLOOSE]+me[ie.PRERELEASELOOSE]+"?"+me[ie.BUILD]+"?";Er("LOOSE");me[ie.LOOSE]="^"+me[ie.LOOSEPLAIN]+"$";Er("GTLT");me[ie.GTLT]="((?:<|>)?=?)";Er("XRANGEIDENTIFIERLOOSE");me[ie.XRANGEIDENTIFIERLOOSE]=me[ie.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";Er("XRANGEIDENTIFIER");me[ie.XRANGEIDENTIFIER]=me[ie.NUMERICIDENTIFIER]+"|x|X|\\*";Er("XRANGEPLAIN");me[ie.XRANGEPLAIN]="[v=\\s]*("+me[ie.XRANGEIDENTIFIER]+")(?:\\.("+me[ie.XRANGEIDENTIFIER]+")(?:\\.("+me[ie.XRANGEIDENTIFIER]+")(?:"+me[ie.PRERELEASE]+")?"+me[ie.BUILD]+"?)?)?";Er("XRANGEPLAINLOOSE");me[ie.XRANGEPLAINLOOSE]="[v=\\s]*("+me[ie.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+me[ie.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+me[ie.XRANGEIDENTIFIERLOOSE]+")(?:"+me[ie.PRERELEASELOOSE]+")?"+me[ie.BUILD]+"?)?)?";Er("XRANGE");me[ie.XRANGE]="^"+me[ie.GTLT]+"\\s*"+me[ie.XRANGEPLAIN]+"$";Er("XRANGELOOSE");me[ie.XRANGELOOSE]="^"+me[ie.GTLT]+"\\s*"+me[ie.XRANGEPLAINLOOSE]+"$";Er("COERCE");me[ie.COERCE]="(^|[^\\d])(\\d{1,"+mse+"})(?:\\.(\\d{1,"+mse+"}))?(?:\\.(\\d{1,"+mse+"}))?(?:$|[^\\d])";Er("COERCERTL");Vw[ie.COERCERTL]=new RegExp(me[ie.COERCE],"g");mn[ie.COERCERTL]=new RegExp(Tk(me[ie.COERCE]),"g");Er("LONETILDE");me[ie.LONETILDE]="(?:~>?)";Er("TILDETRIM");me[ie.TILDETRIM]="(\\s*)"+me[ie.LONETILDE]+"\\s+";Vw[ie.TILDETRIM]=new RegExp(me[ie.TILDETRIM],"g");mn[ie.TILDETRIM]=new RegExp(Tk(me[ie.TILDETRIM]),"g");var ttr="$1~";Er("TILDE");me[ie.TILDE]="^"+me[ie.LONETILDE]+me[ie.XRANGEPLAIN]+"$";Er("TILDELOOSE");me[ie.TILDELOOSE]="^"+me[ie.LONETILDE]+me[ie.XRANGEPLAINLOOSE]+"$";Er("LONECARET");me[ie.LONECARET]="(?:\\^)";Er("CARETTRIM"
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var c=!0,u=_tr(A.globGenerator()),l;l=yield u.next(),e=l.done,!e;c=!0){s=l.value,c=!1;let d=s,h=sG.relative(a,d).replace(new RegExp(`\\${sG.sep}`,"g"),"/");kk.debug(`Matched: ${h}`),h===""?o.push("."):o.push(`${h}`)}}catch(d){r={error:d}}finally{try{!c&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(r)throw r.error}}return o})}Zr.resolvePaths=Wtr;function ztr(t){return jw(this,void 0,void 0,function*(){return Gtr.promisify(bse.unlink)(t)})}Zr.unlinkFile=ztr;function I4e(t,e=[]){return jw(this,void 0,void 0,function*(){let r="";e.push("--version"),kk.debug(`Checking ${t} ${e.join(" ")}`);try{yield Otr.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:n=>r+=n.toString(),stderr:n=>r+=n.toString()}})}catch(n){kk.debug(n.message)}return r=r.trim(),kk.debug(r),r})}function jtr(){return jw(this,void 0,void 0,function*(){let t=yield I4e("zstd",["--quiet"]),e=qtr.clean(t);return kk.debug(`zstd version: ${e}`),t===""?n0.CompressionMethod.Gzip:n0.CompressionMethod.ZstdWithoutLong})}Zr.getCompressionMethod=jtr;function Ktr(t){return t===n0.CompressionMethod.Gzip?n0.CacheFilename.Gzip:n0.CacheFilename.Zstd}Zr.getCacheFileName=Ktr;function Xtr(){return jw(this,void 0,void 0,function*(){return bse.existsSync(n0.GnuTarPathOnWindows)?n0.GnuTarPathOnWindows:(yield I4e("tar")).toLowerCase().includes("gnu tar")?E4e.which("tar"):""})}Zr.getGnuTarPathOnWindows=Xtr;function Ztr(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}Zr.assertDefined=Ztr;function $tr(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(Ytr),C4e.createHash("sha256").update(n.join("|")).digest("hex")}Zr.getCacheVersion=$tr;function err(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}Zr.getRuntimeToken=err});var Vn={};xu(Vn,{__addDisposableResource:()=>J4e,__assign:()=>iG,__asyncDelegator:()=>U4e,__asyncGenerator:()=>L4e,__asyncValues:()=>P4e,__await:()=>Xw,__awaiter:()=>x4e,__classPrivateFieldGet:()=>q4e,__classPrivateFieldIn:()=>Y4e,__classPrivateFieldSet:()=>G4e,__createBinding:()=>aG,__decorate:()=>y4e,__disposeResources:()=>V4e,__esDecorate:()=>w4e,__exportStar:()=>k4e,__extends:()=>B4e,__generator:()=>T4e,__importDefault:()=>H4e,__importStar:()=>O4e,__makeTemplateObject:()=>_4e,__metadata:()=>D4e,__param:()=>b4e,__propKey:()=>S4e,__read:()=>Sse,__rest:()=>Q4e,__rewriteRelativeImportExtension:()=>W4e,__runInitializers:()=>N4e,__setFunctionName:()=>R4e,__spread:()=>F4e,__spreadArray:()=>v4e,__spreadArrays:()=>M4e,__values:()=>oG,default:()=>nrr});function B4e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wse(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Q4e(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function y4e(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i}function b4e(t,e){return function(r,n){e(r,n,t)}}function w4e(t,e,r,n,s,i){function o(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var a=n.kind,A=a==="getter"?"get":a==="setter"?"set":"value",c=!e&&t?n.static?t:t.prototype:null,u=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),l,d=!1,h=r.length-1;h>=0;h--){var g={};for(var p in n)g[p]=p==="access"?{}:n[p];for(var p in n.access)g.access[p]=n.access[p];g.addInitializer=function(m){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(m||null))};var C=(0,r[h])(a==="accessor"?{get:u.get,set:u.set}:u[A],g);if(a==="accessor"){if(C===void 0)continue;if(C===null||typeof C!="object")throw new TypeError("Object expected");(l=o(C.get))&&(u.get=l),(l=o(C.set))&&(u.set=l),(l=o(C.init))&&s.unshift(l)}else(l=o(C))&&(a==="field"?s.unshift(l):u[A]=l)}c&&Object.defineProperty(c,n.name,u),d=!0}function N4e(t,e,r){for(var n=arguments.length>2,s=0;s<e.length;s++)r=n?e[s].call(t,r):e[s].call(t);return n?r:void 0}function S4e(t){return typeof t=="symbol"?t:"".concat(t)}function R4e(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function D4e(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function x4e(t,e,r,n){function s(i){re
Line truncated
|
||||
${Frr.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};Lk.RestError=mG;function Mrr(t){return t instanceof mG?!0:(0,xrr.isError)(t)&&t.name==="RestError"}});var s0=f(EG=>{"use strict";Object.defineProperty(EG,"__esModule",{value:!0});EG.uint8ArrayToString=vrr;EG.stringToUint8Array=Lrr;function vrr(t,e){return Buffer.from(t).toString(e)}function Lrr(t,e){return Buffer.from(t,e)}});var Uk=f(CG=>{"use strict";Object.defineProperty(CG,"__esModule",{value:!0});CG.logger=void 0;var Urr=lG();CG.logger=(0,Urr.createClientLogger)("ts-http-runtime")});var mYe=f(BG=>{"use strict";Object.defineProperty(BG,"__esModule",{value:!0});BG.getBodyLength=pYe;BG.createNodeHttpClient=Jrr;var $se=(Wn(),$n(Vn)),Kse=$se.__importDefault(B("node:http")),Xse=$se.__importDefault(B("node:https")),dYe=$se.__importDefault(B("node:zlib")),Prr=B("node:stream"),hYe=Fk(),_rr=DE(),_k=Zw(),$w=Uk(),Orr=vk(),Hrr={};function Pk(t){return t&&typeof t.pipe=="function"}function gYe(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 fYe(t){return t&&typeof t.byteLength=="number"}var IG=class extends Prr.Transform{loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},Zse=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new hYe.AbortError("The operation was aborted. Request has already been canceled.");n=c=>{c.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let c=new Orr.Sanitizer;$w.logger.info(`request to '${c.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 c=pYe(a);c!==null&&e.headers.set("Content-Length",c)}let A;try{if(a&&e.onUploadProgress){let g=e.onUploadProgress,p=new IG(g);p.on("error",C=>{$w.logger.error("Error in upload progress",C)}),Pk(a)?a.pipe(p):p.end(a),a=p}let c=await this.makeRequest(e,r,a);s!==void 0&&clearTimeout(s);let u=qrr(c),d={status:c.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return c.resume(),d;A=o?Grr(c,u):c;let h=e.onDownloadProgress;if(h){let g=new IG(h);g.on("error",p=>{$w.logger.error("Error in download progress",p)}),A.pipe(g),A=g}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=A:d.bodyAsText=await Yrr(A),d}finally{if(e.abortSignal&&n){let c=Promise.resolve();Pk(a)&&(c=gYe(a));let u=Promise.resolve();Pk(A)&&(u=gYe(A)),Promise.all([c,u]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{$w.logger.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let s=new URL(e.url),i=s.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((A,c)=>{let u=i?Kse.default.request(a,A):Xse.default.request(a,A);u.once("error",l=>{c(new _k.RestError(l.message,{code:l.code??_k.RestError.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new hYe.AbortError("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(l),c(l)}),n&&Pk(n)?n.pipe(u):n?typeof n=="string"||Buffer.isBuffer(n)?u.end(n):fYe(n)?u.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):($w.logger.error("Unrecognized body type",n),c(new _k.RestError("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?Kse.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Kse.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return Xse.default.globalAgent;let s=e.tlsSettings??Hrr,i=this.cachedHttpsAgents.get(s);return i&&i.options.keepAlive===!n||($w.logger.info("No cached TLS Agent exist, creating a new Agent"),i=new Xse.default.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,i)),i}}};function qrr(t){let e=(0,_rr.createHttpHeaders)();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}function Grr(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=dYe.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=dYe.default.createInflate
Line truncated
|
||||
`.trim())}};xIe.exports=K5});var p2=E((gIr,vIe)=>{"use strict";var FIe=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Vmt}=tr(),Jmt=G0();UIe()===void 0&&MIe(new Jmt);function MIe(t){if(!t||typeof t.dispatch!="function")throw new Vmt("Argument agent must implement Agent");Object.defineProperty(globalThis,FIe,{value:t,writable:!0,enumerable:!1,configurable:!1})}function UIe(){return globalThis[FIe]}vIe.exports={setGlobalDispatcher:MIe,getGlobalDispatcher:UIe}});var E2=E((EIr,LIe)=>{"use strict";LIe.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 PIe=E((mIr,_Ie)=>{"use strict";var Wmt=jx();_Ie.exports=t=>{let e=t?.maxRedirections;return r=>function(n,i){let{maxRedirections:o=e,...a}=n;if(!o)return r(n,i);let A=new Wmt(r,o,n,i);return r(a,A)}}});var HIe=E((CIr,OIe)=>{"use strict";var zmt=o2();OIe.exports=t=>e=>function(s,n){return e(s,new zmt({...s,retryOptions:{...t,...s.retryOptions}},{handler:n,dispatch:e}))}});var YIe=E((IIr,GIe)=>{"use strict";var jmt=yt(),{InvalidArgumentError:Kmt,RequestAbortedError:Zmt}=tr(),Xmt=E2(),Z5=class extends Xmt{#e=1024*1024;#t=null;#r=!1;#s=!1;#n=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new Kmt("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#o.bind(this))}#o(e){this.#s=!0,this.#i=e}onHeaders(e,r,s,n){let o=jmt.parseHeaders(r)["content-length"];if(o!=null&&o>this.#e)throw new Zmt(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#s?!0:this.#a.onHeaders(e,r,s,n)}onError(e){this.#r||(e=this.#i??e,this.#a.onError(e))}onData(e){return this.#n=this.#n+e.length,this.#n>=this.#e&&(this.#r=!0,this.#s?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#r){if(this.#s){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function $mt({maxSize:t}={maxSize:1024*1024}){return e=>function(s,n){let{dumpMaxSize:i=t}=s,o=new Z5({maxSize:i},n);return e(s,o)}}GIe.exports=$mt});var JIe=E((BIr,VIe)=>{"use strict";var{isIP:e0t}=B("node:net"),{lookup:t0t}=B("node:dns"),r0t=E2(),{InvalidArgumentError:X0,InformationalError:s0t}=tr(),qIe=Math.pow(2,31)-1,X5=class{#e=0;#t=0;#r=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.#s,this.pick=e.pick??this.#n}get full(){return this.#r.size===this.#t}runLookup(e,r,s){let n=this.#r.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 s0t("No DNS entries found"));return}this.setRecords(e,a);let A=this.#r.get(e.hostname),c=this.pick(e,A,i.affinity),u;typeof c.port=="number"?u=`:${c.port}`:e.port!==""?u=`:${e.port}`:u="",s(null,`${e.protocol}//${c.family===6?`[${c.address}]`:c.address}${u}`)});else{let o=this.pick(e,n,i.affinity);if(o==null){this.#r.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}`)}}#s(e,r,s){t0t(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===qIe?(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===qIe?a.offset=0:a.offset++;let A=a.offset%a.ips.length;return n=a.ips[A]??null,n==null?n:Date.now()-n.timestamp>n.ttl?(a.ips.splice(A,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.#r.set(e.hostname,n)}getHandler(e,r){return new $5(this,e,r)}},$5=class extends r0t{#e=null;#t=null;#r=null;#s=null;#n=null;constructor(e,{origin:r,handler:s,dispatch:n},i){super(s),this.#n=r,this.#s=s,this.#t={...i},this.#e=e,this.#r=n}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#n,this.#t,(r,s)=>{if(r)
Line truncated
|
||||
${i}`;break;case"retry":wye(i)&&(r[n]=i);break;case"id":Sye(i)&&(r[n]=i);break;case"event":i.length>0&&(r[n]=i);break}}processEvent(e){e.retry&&wye(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Sye(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}}};Nye.exports={EventSourceStream:_9}});var vye=E((XIr,Uye)=>{"use strict";var{pipeline:lQt}=B("node:stream"),{fetching:dQt}=Tb(),{makeRequest:hQt}=tC(),{webidl:Zl}=Rn(),{EventSourceStream:fQt}=Dye(),{parseMIMEType:gQt}=Yi(),{createFastMessageEvent:pQt}=aC(),{isNetworkError:Rye}=Db(),{delay:EQt}=v9(),{kEnumerableProperty:ap}=yt(),{environmentSettingsObject:Tye}=bo(),xye=!1,kye=3e3,Gb=0,Fye=1,Yb=2,mQt="anonymous",CQt="use-credentials",dC=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#r=!1;#s=Gb;#n=null;#i=null;#a;#o;constructor(e,r={}){super(),Zl.util.markAsUncloneable(this);let s="EventSource constructor";Zl.argumentLengthCheck(arguments,1,s),xye||(xye=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Zl.converters.USVString(e,s,"url"),r=Zl.converters.EventSourceInitDict(r,s,"eventSourceInitDict"),this.#a=r.dispatcher,this.#o={lastEventId:"",reconnectionTime:kye};let n=Tye,i;try{i=new URL(e,n.settingsObject.baseUrl),this.#o.origin=i.origin}catch(A){throw new DOMException(A,"SyntaxError")}this.#t=i.href;let o=mQt;r.withCredentials&&(o=CQt,this.#r=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=Tye.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=hQt(a),this.#A()}get readyState(){return this.#s}get url(){return this.#t}get withCredentials(){return this.#r}#A(){if(this.#s===Yb)return;this.#s=Gb;let e={request:this.#n,dispatcher:this.#a},r=s=>{Rye(s)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()};e.processResponseEndOfBody=r,e.processResponse=s=>{if(Rye(s))if(s.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let n=s.headersList.get("content-type",!0),i=n!==null?gQt(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.#s=Fye,this.dispatchEvent(new Event("open")),this.#o.origin=s.urlList[s.urlList.length-1].origin;let a=new fQt({eventSourceSettings:this.#o,push:A=>{this.dispatchEvent(pQt(A.type,A.options))}});lQt(s.body.stream,a,A=>{A?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=dQt(e)}async#c(){this.#s!==Yb&&(this.#s=Gb,this.dispatchEvent(new Event("error")),await EQt(this.#o.reconnectionTime),this.#s===Gb&&(this.#o.lastEventId.length&&this.#n.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#A()))}close(){Zl.brandCheck(this,t),this.#s!==Yb&&(this.#s=Yb,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}},Mye={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Gb,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:Fye,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Yb,writable:!1}};Object.defineProperties(dC,Mye);Object.defineProperties(dC.prototype,Mye);Object.defineProperties(dC.prototype,{close:ap,onerror:ap,onmessage:ap,onopen:ap,readyState:ap,url:ap,withCredentials:ap});Zl.converters.EventSourceInitDict=Zl.dictionaryConverter([{key:"withCredentials",converter:Zl.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Zl.converters.any}]);Uye.exports={EventSource:dC,defaultReconnectionTime:kye}});var P9=E(($Ir,$e)=>{"use strict";var IQt=O0(),Lye=zy(),BQt=H0(),QQt=M0e(),yQt=G0(),bQt=c5(),wQt=nCe(),SQt=uCe(),_ye=tr(),ik=yt(),{InvalidArgumentError:nk}=_ye,hC=KCe(),NQt=Ky(),DQt=q5(),RQt=kIe(),TQt=W5(),xQt=x5(),kQt=o2(),{getGlobalDispatcher:Pye,setGlobalDispatcher:FQt}=p2(),MQt=E2(),UQt=jx(),vQt=Kx();Object.assign(Lye.prototype,hC);$e.exports.Dispatcher=Lye;$e.exports.Client=IQt;$e.exports.Pool=BQt;$e.exports.BalancedPool=QQt;$e.exports.Agent=yQt;$e.exports.ProxyAgent=bQt;$e.exports.EnvHttpProxyAgent=wQt;$e.exports
Line truncated
|
||||
%s`,U,U,I,s);var q=I.type==="*"?CY:I.type==="?"?mY:"\\"+I.type;n=!0,s=s.slice(0,I.reStart)+q+"\\("+U}f(),i&&(s+="\\\\");var x=!1;switch(s.charAt(0)){case"[":case".":case"(":x=!0}for(var P=a.length-1;P>-1;P--){var F=a[P],W=s.slice(0,F.reStart),$=s.slice(F.reStart,F.reEnd-8),ee=s.slice(F.reEnd-8,F.reEnd),ae=s.slice(F.reEnd);ee+=ae;var Be=W.split("(").length-1,Me=ae;for(p=0;p<Be;p++)Me=Me.replace(/\)[+*?]?/,"");ae=Me;var Pe="";ae===""&&e!==mk&&(Pe="$");var Mt=W+$+ae+Pe+ee;s=Mt}if(s!==""&&n&&(s="(?=.)"+s),x&&(s=d+s),e===mk)return[s,n];if(!n)return $bt(t);var Pr=r.nocase?"i":"";try{var zt=new RegExp("^"+s+"$",Pr)}catch{return new RegExp("$.")}return zt._glob=t,zt._src=s,zt}ko.makeRe=function(t,e){return new Tn(t,e||{}).makeRe()};Tn.prototype.makeRe=Xbt;function Xbt(){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?CY:e.dot?qbt:Vbt,s=e.nocase?"i":"",n=t.map(function(i){return i.map(function(o){return o===IY?r:typeof o=="string"?ewt(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}ko.match=function(t,e,r){r=r||{};var s=new Tn(e,r);return t=t.filter(function(n){return s.match(n)}),s.options.nonull&&!t.length&&t.push(e),t};Tn.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;Kb.sep!=="/"&&(e=e.split(Kb.sep).join("/")),e=e.split(awe),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],A=e;s.matchBase&&a.length===1&&(A=[i]);var c=this.matchOne(A,a,r);if(c)return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate};Tn.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 A=e[i],c=t[n];if(this.debug(e,A,c),A===!1)return!1;if(A===IY){this.debug("GLOBSTAR",[e,A,c]);var u=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(;u<o;){var d=t[u];if(this.debug(`
|
||||
globstar while`,t,u,e,l,d),this.matchOne(t.slice(u),e.slice(l),r))return this.debug("globstar found match!",u,o,d),!0;if(d==="."||d===".."||!s.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,u,e,l);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(r&&(this.debug(`
|
||||
>>> no match, partial?`,t,u,e,l),u===o))}var h;if(typeof A=="string"?(h=c===A,this.debug("string match",A,c,h)):(h=c.match(A),this.debug("pattern match",A,c,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 $bt(t){return t.replace(/\\(.)/g,"$1")}function ewt(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var ew=E((dQr,fwe)=>{"use strict";var awt="2.0.0",Awt=Number.MAX_SAFE_INTEGER||9007199254740991,cwt=16,uwt=250,lwt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];fwe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:cwt,MAX_SAFE_BUILD_LENGTH:uwt,MAX_SAFE_INTEGER:Awt,RELEASE_TYPES:lwt,SEMVER_SPEC_VERSION:awt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var tw=E((hQr,gwe)=>{"use strict";var dwt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};gwe.exports=dwt});var IC=E((eu,pwe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:QY,MAX_SAFE_BUILD_LENGTH:hwt,MAX_LENGTH:fwt}=ew(),gwt=tw();eu=pwe.exports={};var pwt=eu.re=[],Ewt=eu.safeRe=[],me=eu.src=[],mwt=eu.safeSrc=[],Ce=eu.t={},Cwt=0,yY="[a-zA-Z0-9-]",Iwt=[["\\s",1],["\\d",fwt],[yY,hwt]],Bwt=t=>{for(let[e,r]of Iwt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},ut=(t,e,r)=>{let s=Bwt(e),n=Cwt++;gwt(t,n,e),Ce[t]=n,me[n]=e,mwt[n]=s,pwt[n]=new RegExp(e,r?"g":void 0),Ewt[n]=new RegExp(s,r?"g":void 0)};ut("NUMERICIDENTIFIER","0|[1-9]\\d*");ut("NUMERICIDENTIFIERLOOSE","\\d+");ut("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${yY}*`);ut("MAINVERSION",`(${me[Ce.NUMERICIDENTIFIER]})\\.(${me[Ce.NUMERICIDENTIFIER]})\\.(${me[Ce.NUMERICIDENTIFIER]})`);ut("MAINVERSIONLOOSE",`(${me[Ce.NUMERICIDENTIFIERLOOSE]})\\.(${me[Ce.NUMERICIDENTIFIERLOOSE]})\\.(${me[Ce.NUMERICIDENTIFIERLOOSE]})`);ut("PRERELEASEIDENTIFIER",`(?:${me[Ce.NONNUMERICIDENTIFIER]}|${me[Ce.NUMERICIDENTIFIER]})`);ut("PRERELEASEIDENTIFIERLOOSE",`(?:${me[Ce.NONNUMERICIDENTIFIER]}|${me[Ce.NUMERICIDENTIFIERLOOSE]})`);ut("PRERELEASE",`(?:-(${me[Ce.PRERELEASEIDENTIFIER]}(?:\\.${me[Ce.PRERELEASEIDENTIFIER]})*))`);ut("PRERELEASELOOSE",`(?:-?(${me[Ce.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${me[Ce.PRERELEASEIDENTIFIERLOOSE]})*))`);ut("BUILDIDENTIFIER",`${yY}+`);ut("BUILD",`(?:\\+(${me[Ce.BUILDIDENTIFIER]}(?:\\.${me[Ce.BUILDIDENTIFIER]})*))`);ut("FULLPLAIN",`v?${me[Ce.MAINVERSION]}${me[Ce.PRERELEASE]}?${me[Ce.BUILD]}?`);ut("FULL",`^${me[Ce.FULLPLAIN]}$`);ut("LOOSEPLAIN",`[v=\\s]*${me[Ce.MAINVERSIONLOOSE]}${me[Ce.PRERELEASELOOSE]}?${me[Ce.BUILD]}?`);ut("LOOSE",`^${me[Ce.LOOSEPLAIN]}$`);ut("GTLT","((?:<|>)?=?)");ut("XRANGEIDENTIFIERLOOSE",`${me[Ce.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);ut("XRANGEIDENTIFIER",`${me[Ce.NUMERICIDENTIFIER]}|x|X|\\*`);ut("XRANGEPLAIN",`[v=\\s]*(${me[Ce.XRANGEIDENTIFIER]})(?:\\.(${me[Ce.XRANGEIDENTIFIER]})(?:\\.(${me[Ce.XRANGEIDENTIFIER]})(?:${me[Ce.PRERELEASE]})?${me[Ce.BUILD]}?)?)?`);ut("XRANGEPLAINLOOSE",`[v=\\s]*(${me[Ce.XRANGEIDENTIFIERLOOSE]})(?:\\.(${me[Ce.XRANGEIDENTIFIERLOOSE]})(?:\\.(${me[Ce.XRANGEIDENTIFIERLOOSE]})(?:${me[Ce.PRERELEASELOOSE]})?${me[Ce.BUILD]}?)?)?`);ut("XRANGE",`^${me[Ce.GTLT]}\\s*${me[Ce.XRANGEPLAIN]}$`);ut("XRANGELOOSE",`^${me[Ce.GTLT]}\\s*${me[Ce.XRANGEPLAINLOOSE]}$`);ut("COERCEPLAIN",`(^|[^\\d])(\\d{1,${QY}})(?:\\.(\\d{1,${QY}}))?(?:\\.(\\d{1,${QY}}))?`);ut("COERCE",`${me[Ce.COERCEPLAIN]}(?:$|[^\\d])`);ut("COERCEFULL",me[Ce.COERCEPLAIN]+`(?:${me[Ce.PRERELEASE]})?(?:${me[Ce.BUILD]})?(?:$|[^\\d])`);ut("COERCERTL",me[Ce.COERCE],!0);ut("COERCERTLFULL",me[Ce.COERCEFULL],!0);ut("LONETILDE","(?:~>?)");ut("TILDETRIM",`(\\s*)${me[Ce.LONETILDE]}\\s+`,!0);eu.tildeTrimReplace="$1~";ut("TILDE",`^${me[Ce.LONETILDE]}${me[Ce.XRANGEPLAIN]}$`);ut("TILDELOOSE",`^${me[Ce.LONETILDE]}${me[Ce.XRANGEPLAINLOOSE]}$`);ut("LONECARET","(?:\\^)");ut("CARETTRIM",`(\\s*)${me[Ce.LONECARET]}\\s+`,!0);eu.caretTrimReplace="$1^";ut("CARET",`^${me[Ce.LONECARET]}${me[Ce.XRANGEPLAIN]}$`);ut("CARETLOOSE",`^${me[Ce.LONECARET]}${me[Ce.XRANGEPLAINLOOSE]}$`);ut("COMPARATORLOOSE",`^${me[Ce.GTLT]}\\s*(${me[Ce.LOOSEPLAIN]})$|^$`);ut("COMPARATOR",`^${me[Ce.GTLT]}\\s*(${me[Ce.FULLPLAIN]})$|^$`);ut("COMPARATORTRIM",`(\\s*)${me[Ce.GTLT]}\\s*(${me[Ce.LOOSEPLAIN]}|${me[Ce.XRANGEPLAIN]})`,!0);eu.comparatorTrimReplace="$1$2$3";ut("HYPHENRANGE",`^\\s*(${me[Ce.XRANGEPLAIN]})\\s+-\\s+(${me[Ce.XRANGEPLAIN]})\\s*$`);ut("HYPHENRANGELOOSE",`^\\s*(${me[Ce.XRANGEPLAINLOOSE]})\\s+-\\s+(${me[Ce.XRANGEPLAINLOOSE]})\\s*$`);ut("STAR","(<|>)?=?\\s*\\*");ut("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");ut("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var yk=E((fQr,Ewe)=>{"use strict";var Qwt=Object.freeze({loose:!0}),ywt=Object.freeze({}),bwt=t=>t?typeof t!="object"?Qwt:t:ywt;Ewe.exports=bwt});var bY=E((gQr,Iwe)=>{"use strict";var mwe=/^[0-9]+$/,Cwe=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=mwe.test(t),s=mwe.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},wwt=(t,e)=>Cwe(e
Line truncated
|
||||
`).join(`
|
||||
`+i),t.push(s+"m+"+TG.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=rsr()+e+" "+t[0]}function rsr(){return lo.inspectOpts.hideDate?"":new Date().toISOString()+" "}function nsr(...t){return process.stderr.write(xG.formatWithOptions(lo.inspectOpts,...t)+`
|
||||
`)}function ssr(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function isr(){return process.env.DEBUG}function osr(t){t.inspectOpts={};let e=Object.keys(lo.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=lo.inspectOpts[e[r]]}TG.exports=mie()(lo);var{formatters:OYe}=TG.exports;OYe.o=function(t){return this.inspectOpts.colors=this.useColors,xG.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};OYe.O=function(t){return this.inspectOpts.colors=this.useColors,xG.inspect(t,this.inspectOpts)}});var kG=f((ADn,Iie)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Iie.exports=MYe():Iie.exports=HYe()});var YYe=f(YA=>{"use strict";var asr=YA&&YA.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Asr=YA&&YA.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),qYe=YA&&YA.__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)&&asr(e,t,r);return Asr(e,t),e};Object.defineProperty(YA,"__esModule",{value:!0});YA.req=YA.json=YA.toBuffer=void 0;var csr=qYe(B("http")),usr=qYe(B("https"));async function GYe(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}YA.toBuffer=GYe;async function lsr(t){let r=(await GYe(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}YA.json=lsr;function dsr(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?usr:csr).request(t,e),s=new Promise((i,o)=>{n.once("response",i).once("error",o).end()});return n.then=s.then.bind(s),n}YA.req=dsr});var Qie=f(qc=>{"use strict";var VYe=qc&&qc.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hsr=qc&&qc.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),WYe=qc&&qc.__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)&&VYe(e,t,r);return hsr(e,t),e},gsr=qc&&qc.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&VYe(e,t,r)};Object.defineProperty(qc,"__esModule",{value:!0});qc.Agent=void 0;var fsr=WYe(B("net")),JYe=WYe(B("http")),psr=B("https");gsr(YYe(),qc);var Wh=Symbol("AgentBaseInternalState"),Bie=class extends JYe.Agent{constructor(e){super(e),this[Wh]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
||||
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new fsr.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?psr.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(s),o=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,s)).then(a=>{if(this.decrementSockets(i,o),a instanceof JYe.Agent)try{return a.addRequest(e,s)}catch(A){return n(A)}this[Wh].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(i,o),n(a)})}createConnection(){let e=this[Wh].currentSocket;if(this[Wh].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Wh].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Wh]&&(this[Wh].defaultPort=e)}get protocol(){return this[Wh].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Wh]&&(this[Wh].protocol=e)}};qc.Agent=Bie});var zYe=f(lN=>{"use strict";var msr=lN&&lN.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lN,"__esModule",{value:!0});lN.parseProxyResponse=void 0;var Esr=msr(kG()),FG=(0,Esr.default)("https-proxy-agent:parse-proxy-response");function Csr(t){return new Promise((e,r)=>{let n=0,s=[];function i(){let u=t.read();u?c(u):t.once("readable",i)}function o(){t.removeListener("end",a),t.removeListener("error",A),t.removeListener("readable",i)}function a(){o(),FG("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function A(u){o(),FG("onerror %o",u),r(u)}function c(u){s.push(u),n+=u.length;let l=Buffer.concat(s,n),d=l.indexOf(`\r
|
||||
`+i),t.push(n+"m+"+nF.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Z1t()+e+" "+t[0]}function Z1t(){return un.inspectOpts.hideDate?"":new Date().toISOString()+" "}function X1t(...t){return process.stderr.write(sF.formatWithOptions(un.inspectOpts,...t)+`
|
||||
`)}function $1t(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function eDt(){return process.env.DEBUG}function tDt(t){t.inspectOpts={};let e=Object.keys(un.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=un.inspectOpts[e[r]]}nF.exports=cq()(un);var{formatters:JNe}=nF.exports;JNe.o=function(t){return this.inspectOpts.colors=this.useColors,sF.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};JNe.O=function(t){return this.inspectOpts.colors=this.useColors,sF.inspect(t,this.inspectOpts)}});var iF=E((Lbr,dq)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?dq.exports=ONe():dq.exports=WNe()});var KNe=E(Xi=>{"use strict";var rDt=Xi&&Xi.__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]})),sDt=Xi&&Xi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),zNe=Xi&&Xi.__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)&&rDt(e,t,r);return sDt(e,t),e};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.req=Xi.json=Xi.toBuffer=void 0;var nDt=zNe(B("http")),iDt=zNe(B("https"));async function jNe(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}Xi.toBuffer=jNe;async function oDt(t){let r=(await jNe(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=` (input: ${r})`,n}}Xi.json=oDt;function aDt(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?iDt:nDt).request(t,e),n=new Promise((i,o)=>{s.once("response",i).once("error",o).end()});return s.then=n.then.bind(n),s}Xi.req=aDt});var fq=E(Uo=>{"use strict";var XNe=Uo&&Uo.__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]})),ADt=Uo&&Uo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$Ne=Uo&&Uo.__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)&&XNe(e,t,r);return ADt(e,t),e},cDt=Uo&&Uo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&XNe(e,t,r)};Object.defineProperty(Uo,"__esModule",{value:!0});Uo.Agent=void 0;var uDt=$Ne(B("net")),ZNe=$Ne(B("http")),lDt=B("https");cDt(KNe(),Uo);var su=Symbol("AgentBaseInternalState"),hq=class extends ZNe.Agent{constructor(e){super(e),this[su]={}}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 uDt.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)?lDt.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 ZNe.Agent)try{return a.addRequest(e,n)}catch(A){return s(A)}this[su].currentSocket=a,super.createSocket(e,r,s)},a=>{this.decrementSockets(i,o),s(a)})}createConnection(){let e=this[su].currentSocket;if(this[su].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[su].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[su]&&(this[su].defaultPort=e)}get protocol(){return this[su].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[su]&&(this[su].protocol=e)}};Uo.Agent=hq});var e1e=E(RC=>{"use strict";var dDt=RC&&RC.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(RC,"__esModule",{value:!0});RC.parseProxyResponse=void 0;var hDt=dDt(iF()),oF=(0,hDt.default)("https-proxy-agent:parse-proxy-response");function fDt(t){return new Promise((e,r)=>{let s=0,n=[];function i(){let u=t.read();u?c(u):t.once("readable",i)}function o(){t.removeListener("end",a),t.removeListener("error",A),t.removeListener("readable",i)}function a(){o(),oF("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function A(u){o(),oF("onerror %o",u),r(u)}function c(u){n.push(u),s+=u.length;let l=Buffer.concat(n,s),d=l.indexOf(`\r
|
||||
\r
|
||||
`);if(d===-1){FG("have not received end of HTTP headers yet..."),i();return}let h=l.slice(0,d).toString("ascii").split(`\r
|
||||
`),g=h.shift();if(!g)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let p=g.split(" "),C=+p[1],m=p.slice(2).join(" "),I={};for(let y of h){if(!y)continue;let w=y.indexOf(":");if(w===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${y}"`));let H=y.slice(0,w).toLowerCase(),z=y.slice(w+1).trimStart(),F=I[H];typeof F=="string"?I[H]=[F,z]:Array.isArray(F)?F.push(z):I[H]=z}FG("got proxy server response: %o %o",g,I),o(),e({connect:{statusCode:C,statusText:m,headers:I},buffered:l})}t.on("error",A),t.on("end",a),i()})}lN.parseProxyResponse=Csr});var yie=f($u=>{"use strict";var Isr=$u&&$u.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Bsr=$u&&$u.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ZYe=$u&&$u.__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)&&Isr(e,t,r);return Bsr(e,t),e},$Ye=$u&&$u.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($u,"__esModule",{value:!0});$u.HttpsProxyAgent=void 0;var MG=ZYe(B("net")),jYe=ZYe(B("tls")),Qsr=$Ye(B("assert")),ysr=$Ye(kG()),bsr=Qie(),wsr=B("url"),Nsr=zYe(),qk=(0,ysr.default)("https-proxy-agent"),KYe=t=>t.servername===void 0&&t.host&&!MG.isIP(t.host)?{...t,servername:t.host}:t,vG=class extends bsr.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new wsr.URL(e):e,this.proxyHeaders=r?.headers??{},qk("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?XYe(r,"headers"):null,host:n,port:s}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let s;n.protocol==="https:"?(qk("Creating `tls.Socket`: %o",this.connectOpts),s=jYe.connect(KYe(this.connectOpts))):(qk("Creating `net.Socket`: %o",this.connectOpts),s=MG.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=MG.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${r.port} HTTP/1.1\r
|
||||
`;if(n.username||n.password){let d=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))a+=`${d}: ${i[d]}\r
|
||||
`;let A=(0,Nsr.parseProxyResponse)(s);s.write(`${a}\r
|
||||
`);let{connect:c,buffered:u}=await A;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",Ssr),r.secureEndpoint?(qk("Upgrading socket connection to TLS"),jYe.connect({...XYe(KYe(r),"host","path","port"),socket:s})):s;s.destroy();let l=new MG.Socket({writable:!1});return l.readable=!0,e.once("socket",d=>{qk("Replaying proxy buffer for failed request"),(0,Qsr.default)(d.listenerCount("data")>0),d.push(u),d.push(null)}),l}};vG.protocols=["http","https"];$u.HttpsProxyAgent=vG;function Ssr(t){t.resume()}function XYe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var bie=f(el=>{"use strict";var Rsr=el&&el.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Dsr=el&&el.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),t5e=el&&el.__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)&&Rsr(e,t,r);return Dsr(e,t),e},xsr=el&&el.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(el,"__esModule",{value:!0});el.HttpProxyAgent=void 0;var Tsr=t5e(B("net")),ksr=t5e(B("tls")),Fsr=xsr(kG()),Msr=B("events"),vsr=Qie(),e5e=B("url"),dN=(0,Fsr.default)("http-proxy-agent"),LG=class extends vsr.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new e5e.URL(e):e,this.proxyHeaders=r?.headers??{},dN("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?Lsr(r,"headers"):null,host:n,port:s}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,s=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",o=`${s}//${i}`,a=new e5e.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let A=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let c=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;A["Proxy-Authorization"]=`Basic ${Buffer.from(c).toString("base64")}`}A["Proxy-Connection"]||(A["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let c of Object.keys(A)){let u=A[c];u&&e.setHeader(c,u)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,s;dN("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(dN("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r
|
||||
`);if(d===-1){oF("have not received end of HTTP headers yet..."),i();return}let h=l.slice(0,d).toString("ascii").split(`\r
|
||||
`),f=h.shift();if(!f)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let p=f.split(" "),C=+p[1],m=p.slice(2).join(" "),I={};for(let Q of h){if(!Q)continue;let b=Q.indexOf(":");if(b===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${Q}"`));let U=Q.slice(0,b).toLowerCase(),q=Q.slice(b+1).trimStart(),x=I[U];typeof x=="string"?I[U]=[x,q]:Array.isArray(x)?x.push(q):I[U]=q}oF("got proxy server response: %o %o",f,I),o(),e({connect:{statusCode:C,statusText:m,headers:I},buffered:l})}t.on("error",A),t.on("end",a),i()})}RC.parseProxyResponse=fDt});var o1e=E(Ma=>{"use strict";var gDt=Ma&&Ma.__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]})),pDt=Ma&&Ma.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),n1e=Ma&&Ma.__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)&&gDt(e,t,r);return pDt(e,t),e},i1e=Ma&&Ma.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ma,"__esModule",{value:!0});Ma.HttpsProxyAgent=void 0;var aF=n1e(B("net")),t1e=n1e(B("tls")),EDt=i1e(B("assert")),mDt=i1e(iF()),CDt=fq(),IDt=B("url"),BDt=e1e(),pw=(0,mDt.default)("https-proxy-agent"),r1e=t=>t.servername===void 0&&t.host&&!aF.isIP(t.host)?{...t,servername:t.host}:t,AF=class extends CDt.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new IDt.URL(e):e,this.proxyHeaders=r?.headers??{},pw("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?s1e(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:"?(pw("Creating `tls.Socket`: %o",this.connectOpts),n=t1e.connect(r1e(this.connectOpts))):(pw("Creating `net.Socket`: %o",this.connectOpts),n=aF.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=aF.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${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=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))a+=`${d}: ${i[d]}\r
|
||||
`;let A=(0,BDt.parseProxyResponse)(n);n.write(`${a}\r
|
||||
`);let{connect:c,buffered:u}=await A;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",QDt),r.secureEndpoint?(pw("Upgrading socket connection to TLS"),t1e.connect({...s1e(r1e(r),"host","path","port"),socket:n})):n;n.destroy();let l=new aF.Socket({writable:!1});return l.readable=!0,e.once("socket",d=>{pw("Replaying proxy buffer for failed request"),(0,EDt.default)(d.listenerCount("data")>0),d.push(u),d.push(null)}),l}};AF.protocols=["http","https"];Ma.HttpsProxyAgent=AF;function QDt(t){t.resume()}function s1e(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var c1e=E(Ua=>{"use strict";var yDt=Ua&&Ua.__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]})),bDt=Ua&&Ua.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),A1e=Ua&&Ua.__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)&&yDt(e,t,r);return bDt(e,t),e},wDt=Ua&&Ua.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ua,"__esModule",{value:!0});Ua.HttpProxyAgent=void 0;var SDt=A1e(B("net")),NDt=A1e(B("tls")),DDt=wDt(iF()),RDt=B("events"),TDt=fq(),a1e=B("url"),TC=(0,DDt.default)("http-proxy-agent"),cF=class extends TDt.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new a1e.URL(e):e,this.proxyHeaders=r?.headers??{},TC("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?xDt(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 a1e.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let A=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(s.username||s.password){let c=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;A["Proxy-Authorization"]=`Basic ${Buffer.from(c).toString("base64")}`}A["Proxy-Connection"]||(A["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let c of Object.keys(A)){let u=A[c];u&&e.setHeader(c,u)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let s,n;TC("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(TC("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+n.substring(s),dN("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(dN("Creating `tls.Socket`: %o",this.connectOpts),i=ksr.connect(this.connectOpts)):(dN("Creating `net.Socket`: %o",this.connectOpts),i=Tsr.connect(this.connectOpts)),await(0,Msr.once)(i,"connect"),i}};LG.protocols=["http","https"];el.HttpProxyAgent=LG;function Lsr(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var wie=f(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.globalNoProxyList=tl.proxyPolicyName=void 0;tl.loadNoProxy=o5e;tl.getDefaultProxySettings=Vsr;tl.proxyPolicy=zsr;var Usr=yie(),Psr=bie(),_sr=Uk(),Osr="HTTPS_PROXY",Hsr="HTTP_PROXY",qsr="ALL_PROXY",Gsr="NO_PROXY";tl.proxyPolicyName="proxyPolicy";tl.globalNoProxyList=[];var s5e=!1,Ysr=new Map;function UG(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}function i5e(){if(!process)return;let t=UG(Osr),e=UG(qsr),r=UG(Hsr);return t||e||r}function Jsr(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let s=!1;for(let i of e)i[0]==="."?(n.endsWith(i)||n.length===i.length-1&&n===i.slice(1))&&(s=!0):n===i&&(s=!0);return r?.set(n,s),s}function o5e(){let t=UG(Gsr);return s5e=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}function Vsr(t){if(!t&&(t=i5e(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}function Wsr(){let t=i5e();return t?new URL(t):void 0}function r5e(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}function n5e(t,e,r){if(t.agent)return;let s=new URL(t.url).protocol!=="https:";t.tlsSettings&&_sr.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let i=t.headers.toJSON();s?(e.httpProxyAgent||(e.httpProxyAgent=new Psr.HttpProxyAgent(r,{headers:i})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new Usr.HttpsProxyAgent(r,{headers:i})),t.agent=e.httpsProxyAgent)}function zsr(t,e){s5e||tl.globalNoProxyList.push(...o5e());let r=t?r5e(t):Wsr(),n={};return{name:tl.proxyPolicyName,async sendRequest(s,i){return!s.proxySettings&&r&&!Jsr(s.url,e?.customNoProxyList??tl.globalNoProxyList,e?.customNoProxyList?void 0:Ysr)?n5e(s,n,r):s.proxySettings&&n5e(s,n,r5e(s.proxySettings)),i(s)}}}});var Nie=f(hN=>{"use strict";Object.defineProperty(hN,"__esModule",{value:!0});hN.agentPolicyName=void 0;hN.agentPolicy=jsr;hN.agentPolicyName="agentPolicy";function jsr(t){return{name:hN.agentPolicyName,sendRequest:async(e,r)=>(e.agent||(e.agent=t),r(e))}}});var Sie=f(gN=>{"use strict";Object.defineProperty(gN,"__esModule",{value:!0});gN.tlsPolicyName=void 0;gN.tlsPolicy=Ksr;gN.tlsPolicyName="tlsPolicy";function Ksr(t){return{name:gN.tlsPolicyName,sendRequest:async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e))}}});var Gk=f(a0=>{"use strict";Object.defineProperty(a0,"__esModule",{value:!0});a0.isNodeReadableStream=a5e;a0.isWebReadableStream=A5e;a0.isBinaryBody=Xsr;a0.isReadableStream=c5e;a0.isBlob=Zsr;function a5e(t){return!!(t&&typeof t.pipe=="function")}function A5e(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}function Xsr(t){return t!==void 0&&(t instanceof Uint8Array||c5e(t)||typeof t=="function"||t instanceof Blob)}function c5e(t){return a5e(t)||A5e(t)}function Zsr(t){return typeof t.stream=="function"}});var d5e=f(Die=>{"use strict";Object.defineProperty(Die,"__esModule",{value:!0});Die.concat=rir;var Rie=B("stream"),$sr=Gk();async function*u5e(){let t=this.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)return;yield r}}finally{t.releaseLock()}}function eir(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=u5e.bind(t)),t.values||(t.values=u5e.bind(t))}function l5e(t){return t instanceof ReadableStream?(eir(t),Rie.Readable.fromWeb(t)):t}function tir(t){return t instanceof Uint8Array?Rie.Readable.from(Buffer.from(t)):(0,$sr.isBlob)(t)?l5e(t.stream()):l5e(t)}async function rir(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(tir);return Rie.Readable.from((async function*(){for(let r of e)for await(let n of r)yield n})())}}});var xie=f(pN=>{"use strict";Object.defineProperty(pN,"__esModule",{value:!0});pN.multipartPolicyName=void 0;pN.multipartPolicy=gir;var fN=s0(),nir=Gk(),sir=hG(),iir=d5e();function oir(){return`----AzSDKFormBoundary${(0,sir.randomUUID)()}`}function air(t){let e="";for(let[r,n]of t)e+=`${r}: ${n}\r
|
||||
`;return e}function Air(t){return t instanceof Uint8Array?t.byteLength:(0,nir.isBlob)(t)?t.size===-1?void 0:t.size:void 0}function cir(t){let e=0;for(let r of t){let n=Air(r);if(n===void 0)return;e+=n}return e}async function uir(t,e,r){let n=[(0,fN.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(i=>[(0,fN.stringToUint8Array)(`\r
|
||||
`,"utf-8"),(0,fN.stringToUint8Array)(air(i.headers),"utf-8"),(0,fN.stringToUint8Array)(`\r
|
||||
`,"utf-8"),i.body,(0,fN.stringToUint8Array)(`\r
|
||||
--${r}`,"utf-8")]),(0,fN.stringToUint8Array)(`--\r
|
||||
\r
|
||||
`,"utf-8")],s=cir(n);s&&t.headers.set("Content-Length",s),t.body=await(0,iir.concat)(n)}pN.multipartPolicyName="multipartPolicy";var lir=70,dir=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function hir(t){if(t.length>lir)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!dir.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function gir(){return{name:pN.multipartPolicyName,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,i,o]=s;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?hir(r):r=oir(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await uir(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}});var f5e=f(Tie=>{"use strict";Object.defineProperty(Tie,"__esModule",{value:!0});Tie.createPipelineFromOptions=wir;var fir=rie(),pir=Yse(),mir=nie(),Eir=oie(),Cir=aie(),Iir=fie(),Bir=pie(),h5e=Hk(),Qir=wie(),yir=Nie(),bir=Sie(),g5e=xie();function wir(t){let e=(0,pir.createEmptyPipeline)();return h5e.isNodeLike&&(t.agent&&e.addPolicy((0,yir.agentPolicy)(t.agent)),t.tlsOptions&&e.addPolicy((0,bir.tlsPolicy)(t.tlsOptions)),e.addPolicy((0,Qir.proxyPolicy)(t.proxyOptions)),e.addPolicy((0,Cir.decompressResponsePolicy)())),e.addPolicy((0,Bir.formDataPolicy)(),{beforePolicies:[g5e.multipartPolicyName]}),e.addPolicy((0,Eir.userAgentPolicy)(t.userAgentOptions)),e.addPolicy((0,g5e.multipartPolicy)(),{afterPhase:"Deserialize"}),e.addPolicy((0,Iir.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),h5e.isNodeLike&&e.addPolicy((0,mir.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy((0,fir.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),e}});var p5e=f(mN=>{"use strict";Object.defineProperty(mN,"__esModule",{value:!0});mN.apiVersionPolicyName=void 0;mN.apiVersionPolicy=Nir;mN.apiVersionPolicyName="ApiVersionPolicy";function Nir(t){return{name:mN.apiVersionPolicyName,sendRequest:(e,r)=>{let n=new URL(e.url);return!n.searchParams.get("api-version")&&t.apiVersion&&(e.url=`${e.url}${Array.from(n.searchParams.keys()).length>0?"&":"?"}api-version=${t.apiVersion}`),r(e)}}}});var m5e=f(EN=>{"use strict";Object.defineProperty(EN,"__esModule",{value:!0});EN.isOAuth2TokenCredential=Sir;EN.isBearerTokenCredential=Rir;EN.isBasicCredential=Dir;EN.isApiKeyCredential=xir;function Sir(t){return"getOAuth2Token"in t}function Rir(t){return"getBearerToken"in t}function Dir(t){return"username"in t&&"password"in t}function xir(t){return"key"in t}});var Yk=f(kie=>{"use strict";Object.defineProperty(kie,"__esModule",{value:!0});kie.ensureSecureConnection=Mir;var Tir=Uk(),E5e=!1;function kir(t,e){if(e.allowInsecureConnection&&t.allowInsecureConnection){let r=new URL(t.url);if(r.hostname==="localhost"||r.hostname==="127.0.0.1")return!0}return!1}function Fir(){let t="Sending token over insecure transport. Assume any token issued is compromised.";Tir.logger.warning(t),typeof process?.emitWarning=="function"&&!E5e&&(E5e=!0,process.emitWarning(t))}function Mir(t,e){if(!t.url.toLowerCase().startsWith("https://"))if(kir(t,e))Fir();else throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false.")}});var C5e=f(CN=>{"use strict";Object.defineProperty(CN,"__esModule",{value:!0});CN.apiKeyAuthenticationPolicyName=void 0;CN.apiKeyAuthenticationPolicy=Lir;var vir=Yk();CN.apiKeyAuthenticationPolicyName="apiKeyAuthenticationPolicy";function Lir(t){return{name:CN.apiKeyAuthenticationPolicyName,async sendRequest(e,r){(0,vir.ensureSecureConnection)(e,t);let n=(e.authSchemes??t.authSchemes)?.find(s=>s.kind==="apiKey");if(!n)return r(e);if(n.apiKeyLocation!=="header")throw new Error(`Unsupported API key location: ${n.apiKeyLocation}`);return e.headers.set(n.name,t.credential.key),r(e)}}}});var B5e=f(IN=>{"use strict";Object.defineProperty(IN,"__esModule",{value:!0});IN.basicAuthenticationPolicyName=void 0;IN.basicAuthenticationPolicy=Pir;var I5e=s0(),Uir=Yk();IN.basicAuthenticationPolicyName="bearerAuthenticationPolicy";function Pir(t){return{name:IN.basicAuthenticationPolicyName,async sendRequest(e,r){if((0,Uir.ensureSecureConnection)(e,t),!(e.authSchemes??t.authSchemes)?.find(a=>a.kind==="http"&&a.scheme==="basic"))return r(e);let{username:s,password:i}=t.credential,o=(0,I5e.uint8ArrayToString)((0,I5e.stringToUint8Array)(`${s}:${i}`,"utf-8"),"base64");return e.headers.set("Authorization",`Basic ${o}`),r(e)}}}});var Q5e=f(BN=>{"use strict";Object.defineProperty(BN,"__esModule",{value:!0});BN.bearerAuthenticationPolicyName=
Line truncated
|
||||
`).join(""))}return e(t)}}}});var f9e=f(l0=>{"use strict";Object.defineProperty(l0,"__esModule",{value:!0});l0.auxiliaryAuthenticationHeaderPolicyName=void 0;l0.auxiliaryAuthenticationHeaderPolicy=ycr;var Icr=voe(),Bcr=Wk();l0.auxiliaryAuthenticationHeaderPolicyName="auxiliaryAuthenticationHeaderPolicy";var g9e="x-ms-authorization-auxiliary";async function Qcr(t){let{scopes:e,getAccessToken:r,request:n}=t,s={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions};return(await r(e,s))?.token??""}function ycr(t){let{credentials:e,scopes:r}=t,n=t.logger||Bcr.logger,s=new WeakMap;return{name:l0.auxiliaryAuthenticationHeaderPolicyName,async sendRequest(i,o){if(!i.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return n.info(`${l0.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`),o(i);let a=[];for(let c of e){let u=s.get(c);u||(u=(0,Icr.createTokenCycler)(c),s.set(c,u)),a.push(Qcr({scopes:Array.isArray(r)?r:[r],request:i,getAccessToken:u,logger:n}))}let A=(await Promise.all(a)).filter(c=>!!c);return A.length===0?(n.warning(`None of the auxiliary tokens are valid. ${g9e} header will not be set.`),o(i)):(i.headers.set(g9e,A.map(c=>`Bearer ${c}`).join(", ")),o(i))}}}});var Ji=f(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.createFileFromStream=ye.createFile=ye.agentPolicyName=ye.agentPolicy=ye.auxiliaryAuthenticationHeaderPolicyName=ye.auxiliaryAuthenticationHeaderPolicy=ye.ndJsonPolicyName=ye.ndJsonPolicy=ye.bearerTokenAuthenticationPolicyName=ye.bearerTokenAuthenticationPolicy=ye.formDataPolicyName=ye.formDataPolicy=ye.tlsPolicyName=ye.tlsPolicy=ye.userAgentPolicyName=ye.userAgentPolicy=ye.defaultRetryPolicy=ye.tracingPolicyName=ye.tracingPolicy=ye.retryPolicy=ye.throttlingRetryPolicyName=ye.throttlingRetryPolicy=ye.systemErrorRetryPolicyName=ye.systemErrorRetryPolicy=ye.redirectPolicyName=ye.redirectPolicy=ye.getDefaultProxySettings=ye.proxyPolicyName=ye.proxyPolicy=ye.multipartPolicyName=ye.multipartPolicy=ye.logPolicyName=ye.logPolicy=ye.setClientRequestIdPolicyName=ye.setClientRequestIdPolicy=ye.exponentialRetryPolicyName=ye.exponentialRetryPolicy=ye.decompressResponsePolicyName=ye.decompressResponsePolicy=ye.isRestError=ye.RestError=ye.createPipelineRequest=ye.createHttpHeaders=ye.createDefaultHttpClient=ye.createPipelineFromOptions=ye.createEmptyPipeline=void 0;var bcr=Gie();Object.defineProperty(ye,"createEmptyPipeline",{enumerable:!0,get:function(){return bcr.createEmptyPipeline}});var wcr=X6e();Object.defineProperty(ye,"createPipelineFromOptions",{enumerable:!0,get:function(){return wcr.createPipelineFromOptions}});var Ncr=Z6e();Object.defineProperty(ye,"createDefaultHttpClient",{enumerable:!0,get:function(){return Ncr.createDefaultHttpClient}});var Scr=$6e();Object.defineProperty(ye,"createHttpHeaders",{enumerable:!0,get:function(){return Scr.createHttpHeaders}});var Rcr=e9e();Object.defineProperty(ye,"createPipelineRequest",{enumerable:!0,get:function(){return Rcr.createPipelineRequest}});var p9e=i8();Object.defineProperty(ye,"RestError",{enumerable:!0,get:function(){return p9e.RestError}});Object.defineProperty(ye,"isRestError",{enumerable:!0,get:function(){return p9e.isRestError}});var m9e=hoe();Object.defineProperty(ye,"decompressResponsePolicy",{enumerable:!0,get:function(){return m9e.decompressResponsePolicy}});Object.defineProperty(ye,"decompressResponsePolicyName",{enumerable:!0,get:function(){return m9e.decompressResponsePolicyName}});var E9e=r9e();Object.defineProperty(ye,"exponentialRetryPolicy",{enumerable:!0,get:function(){return E9e.exponentialRetryPolicy}});Object.defineProperty(ye,"exponentialRetryPolicyName",{enumerable:!0,get:function(){return E9e.exponentialRetryPolicyName}});var C9e=Eoe();Object.defineProperty(ye,"setClientRequestIdPolicy",{enumerable:!0,get:function(){return C9e.setClientRequestIdPolicy}});Object.defineProperty(ye,"setClientRequestIdPolicyName",{enumerable:!0,get:function(){return C9e.setClientRequestIdPolicyName}});var I9e=Zie();Object.defineProperty(ye,"logPolicy",{enumerable:!0,get:function(){return I9e.logPolicy}});Object.defineProperty(ye,"logPolicyName",{enumerable:!0,get:function(){return I9e.logPolicyName}});var B9e=doe();Object.defineProperty(ye,"multipartPolicy",{enumerable:!0,get:function(){return B9e.multipartPolicy}});Object.defineProperty(ye,"multipartPolicyName",{enumerable:!0,get:function(){return B9e.multipartPolicyName}});var Loe=moe();Object.defineProperty(ye,"proxyPolicy",{enumerable:!0,get:function(){return Loe.proxyPolicy}});Object.defineProperty(ye,"proxyPolicyName",{enumerable:!0,get:function(){return Loe.proxyPolicyName}});Object.defineProperty(ye,"getDefaultProxySettings",{enumerable:!0,get:function(){return Loe.getDefaultProxySettings}});var Q9e=$ie();Object.defineProperty(ye,"redirectPolicy",{enumerable:!0,get:function(){return Q9e.re
Line truncated
|
||||
`&&Q[J]!=="\r";J++)Ee+=Q[J];if(Ee=Ee.trim(),Ee[Ee.length-1]==="/"&&(Ee=Ee.substring(0,Ee.length-1),J--),!i(Ee)){let bt;return bt=Ee.trim().length===0?"Invalid space after '<'.":"Tag '"+Ee+"' is an invalid name.",m("InvalidTag",bt,y(Q,J))}let Me=h(Q,J);if(Me===!1)return m("InvalidAttr","Attributes for '"+Ee+"' have open quote.",y(Q,J));let zt=Me.value;if(J=Me.index,zt[zt.length-1]==="/"){let bt=J-zt.length;zt=zt.substring(0,zt.length-1);let pr=p(zt,b);if(pr!==!0)return m(pr.err.code,pr.err.msg,y(Q,bt+pr.err.line));j=!0}else if(ae){if(!Me.tagClosed)return m("InvalidTag","Closing tag '"+Ee+"' doesn't have proper closing.",y(Q,J));if(zt.trim().length>0)return m("InvalidTag","Closing tag '"+Ee+"' can't have attributes or invalid starting.",y(Q,ue));if(P.length===0)return m("InvalidTag","Closing tag '"+Ee+"' has not been opened.",y(Q,ue));{let bt=P.pop();if(Ee!==bt.tagName){let pr=y(Q,bt.tagStartPos);return m("InvalidTag","Expected closing tag '"+bt.tagName+"' (opened in line "+pr.line+", col "+pr.col+") instead of closing tag '"+Ee+"'.",y(Q,ue))}P.length==0&&(q=!0)}}else{let bt=p(zt,b);if(bt!==!0)return m(bt.err.code,bt.err.msg,y(Q,J-zt.length+bt.err.line));if(q===!0)return m("InvalidXml","Multiple possible root nodes found.",y(Q,J));b.unpairedTags.indexOf(Ee)!==-1||P.push({tagName:Ee,tagStartPos:ue}),j=!0}for(J++;J<Q.length;J++)if(Q[J]==="<"){if(Q[J+1]==="!"){J++,J=u(Q,J);continue}if(Q[J+1]!=="?")break;if(J=c(Q,++J),J.err)return J}else if(Q[J]==="&"){let bt=C(Q,J);if(bt==-1)return m("InvalidChar","char '&' is not expected.",y(Q,J));J=bt}else if(q===!0&&!A(Q[J]))return m("InvalidXml","Extra text at the end",y(Q,J));Q[J]==="<"&&J--}}}return j?P.length==1?m("InvalidTag","Unclosed tag '"+P[0].tagName+"'.",y(Q,P[0].tagStartPos)):!(P.length>0)||m("InvalidXml","Invalid '"+JSON.stringify(P.map((J=>J.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):m("InvalidXml","Start tag expected.",1)}function A(Q){return Q===" "||Q===" "||Q===`
|
||||
`||Q==="\r"}function c(Q,b){let P=b;for(;b<Q.length;b++)if(!(Q[b]!="?"&&Q[b]!=" ")){let j=Q.substr(P,b-P);if(b>5&&j==="xml")return m("InvalidXml","XML declaration allowed only at the start of the document.",y(Q,b));if(Q[b]=="?"&&Q[b+1]==">"){b++;break}}return b}function u(Q,b){if(Q.length>b+5&&Q[b+1]==="-"&&Q[b+2]==="-"){for(b+=3;b<Q.length;b++)if(Q[b]==="-"&&Q[b+1]==="-"&&Q[b+2]===">"){b+=2;break}}else if(Q.length>b+8&&Q[b+1]==="D"&&Q[b+2]==="O"&&Q[b+3]==="C"&&Q[b+4]==="T"&&Q[b+5]==="Y"&&Q[b+6]==="P"&&Q[b+7]==="E"){let P=1;for(b+=8;b<Q.length;b++)if(Q[b]==="<")P++;else if(Q[b]===">"&&(P--,P===0))break}else if(Q.length>b+9&&Q[b+1]==="["&&Q[b+2]==="C"&&Q[b+3]==="D"&&Q[b+4]==="A"&&Q[b+5]==="T"&&Q[b+6]==="A"&&Q[b+7]==="["){for(b+=8;b<Q.length;b++)if(Q[b]==="]"&&Q[b+1]==="]"&&Q[b+2]===">"){b+=2;break}}return b}let l='"',d="'";function h(Q,b){let P="",j="",q=!1;for(;b<Q.length;b++){if(Q[b]===l||Q[b]===d)j===""?j=Q[b]:j!==Q[b]||(j="");else if(Q[b]===">"&&j===""){q=!0;break}P+=Q[b]}return j===""&&{value:P,index:b,tagClosed:q}}let g=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function p(Q,b){let P=s(Q,g),j={};for(let q=0;q<P.length;q++){if(P[q][1].length===0)return m("InvalidAttr","Attribute '"+P[q][2]+"' has no space in starting.",w(P[q]));if(P[q][3]!==void 0&&P[q][4]===void 0)return m("InvalidAttr","Attribute '"+P[q][2]+"' is without value.",w(P[q]));if(P[q][3]===void 0&&!b.allowBooleanAttributes)return m("InvalidAttr","boolean attribute '"+P[q][2]+"' is not allowed.",w(P[q]));let J=P[q][2];if(!I(J))return m("InvalidAttr","Attribute '"+J+"' is an invalid name.",w(P[q]));if(j.hasOwnProperty(J))return m("InvalidAttr","Attribute '"+J+"' is repeated.",w(P[q]));j[J]=1}return!0}function C(Q,b){if(Q[++b]===";")return-1;if(Q[b]==="#")return(function(j,q){let J=/\d/;for(j[q]==="x"&&(q++,J=/[\da-fA-F]/);q<j.length;q++){if(j[q]===";")return q;if(!j[q].match(J))break}return-1})(Q,++b);let P=0;for(;b<Q.length;b++,P++)if(!(Q[b].match(/\w/)&&P<20)){if(Q[b]===";")break;return-1}return b}function m(Q,b,P){return{err:{code:Q,msg:b,line:P.line||P,col:P.col}}}function I(Q){return i(Q)}function y(Q,b){let P=Q.substring(0,b).split(/\r?\n/);return{line:P.length,col:P[P.length-1].length+1}}function w(Q){return Q.startIndex+Q[1].length}let H={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(Q,b){return b},attributeValueProcessor:function(Q,b){return b},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(Q,b,P){return Q},captureMetaData:!1},z;z=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class F{constructor(b){this.tagname=b,this.child=[],this[":@"]={}}add(b,P){b==="__proto__"&&(b="#__proto__"),this.child.push({[b]:P})}addChild(b,P){b.tagname==="__proto__"&&(b.tagname="#__proto__"),b[":@"]&&Object.keys(b[":@"]).length>0?this.child.push({[b.tagname]:b.child,":@":b[":@"]}):this.child.push({[b.tagname]:b.child}),P!==void 0&&(this.child[this.child.length-1][z]={startIndex:P})}static getMetaDataSymbol(){return z}}function W(Q,b){let P={};if(Q[b+3]!=="O"||Q[b+4]!=="C"||Q[b+5]!=="T"||Q[b+6]!=="Y"||Q[b+7]!=="P"||Q[b+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{b+=9;let j=1,q=!1,J=!1,ue="";for(;b<Q.length;b++)if(Q[b]!=="<"||J)if(Q[b]===">"){if(J?Q[b-1]==="-"&&Q[b-2]==="-"&&(J=!1,j--):j--,j===0)break}else Q[b]==="["?q=!0:ue+=Q[b];else{if(q&&oe(Q,b)){let ae,Ee;b+=7,[ae,Ee,b]=U(Q,b+1),Ee.indexOf("&")===-1&&(P[Je(ae)]={regx:RegExp(`&${ae};`,"g"),val:Ee})}else if(q&&Z(Q,b))b+=8;else if(q&&he(Q,b))b+=8;else if(q&&Se(Q,b))b+=9;else{if(!ee)throw new Error("Invalid DOCTYPE");J=!0}j++,ue=""}if(j!==0)throw new Error("Unclosed DOCTYPE")}return{entities:P,i:b}}function U(Q,b){let P="";for(;b<Q.length&&Q[b]!=="'"&&Q[b]!=='"';b++)P+=Q[b];if(P=P.trim(),P.indexOf(" ")!==-1)throw new Error("External entites are not supported");let j=Q[b++],q="";for(;b<Q.length&&Q[b]!==j;b++)q+=Q[b];return[P,q,b]}function ee(Q,b){return Q[b+1]==="!"&&Q[b+2]==="-"&&Q[b+3]==="-"}function oe(Q,b){return Q[b+1]==="!"&&Q[b+2]==="E"&&Q[b+3]==="N"&&Q[b+4]==="T"&&Q[b+5]==="I"&&Q[b+6]==="T"&&Q[b+7]==="Y"}function Z(Q,b){return Q[b+1]==="!"&&Q[b+2]==="E"&&Q[b+3]==="L"&&Q[b+4]==="E"&&Q[b+5]==="M"&&Q[b+6]==="E"&&Q[b+7]==="N"&&Q[b+8]==="T"}function he(Q,b){return Q[b+1]==="!"&&Q[b+2]==="A"&&Q[b+3]==="T"&&Q[b+4]==="T"&&Q[b+5]==="L"&&Q[b+6]==="I"&&Q[b+7]==="S"&&Q[b+8]==="T"}function Se(Q,b){return Q[b+1]==="!"&&Q[b+2]==="N"&&Q[b+3]==="O"&&Q[b+4]==="T"&&Q[b+5]==="A"&&Q[b+6]==="T"&&Q[b+7]==="I"&&Q[b+8]==="O"&&Q[b+9]==="N"}function Je(Q){if(i(Q))return Q;throw new Error(`Invalid entity name ${Q}`)}let He=/^[-+]Line truncated
|
||||
`);let b=new F("!xml"),P=b,j="",q="";for(let J=0;J<Q.length;J++)if(Q[J]==="<")if(Q[J+1]==="/"){let ue=Ic(Q,">",J,"Closing Tag is not closed."),ae=Q.substring(J+2,ue).trim();if(this.options.removeNSPrefix){let zt=ae.indexOf(":");zt!==-1&&(ae=ae.substr(zt+1))}this.options.transformTagName&&(ae=this.options.transformTagName(ae)),P&&(j=this.saveTextToParentTag(j,P,q));let Ee=q.substring(q.lastIndexOf(".")+1);if(ae&&this.options.unpairedTags.indexOf(ae)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${ae}>`);let Me=0;Ee&&this.options.unpairedTags.indexOf(Ee)!==-1?(Me=q.lastIndexOf(".",q.lastIndexOf(".")-1),this.tagsNodeStack.pop()):Me=q.lastIndexOf("."),q=q.substring(0,Me),P=this.tagsNodeStack.pop(),j="",J=ue}else if(Q[J+1]==="?"){let ue=WI(Q,J,!1,"?>");if(!ue)throw new Error("Pi Tag is not closed.");if(j=this.saveTextToParentTag(j,P,q),!(this.options.ignoreDeclaration&&ue.tagName==="?xml"||this.options.ignorePiTags)){let ae=new F(ue.tagName);ae.add(this.options.textNodeName,""),ue.tagName!==ue.tagExp&&ue.attrExpPresent&&(ae[":@"]=this.buildAttributesMap(ue.tagExp,q,ue.tagName)),this.addChild(P,ae,q,J)}J=ue.closeIndex+1}else if(Q.substr(J+1,3)==="!--"){let ue=Ic(Q,"-->",J+4,"Comment is not closed.");if(this.options.commentPropName){let ae=Q.substring(J+4,ue-2);j=this.saveTextToParentTag(j,P,q),P.add(this.options.commentPropName,[{[this.options.textNodeName]:ae}])}J=ue}else if(Q.substr(J+1,2)==="!D"){let ue=W(Q,J);this.docTypeEntities=ue.entities,J=ue.i}else if(Q.substr(J+1,2)==="!["){let ue=Ic(Q,"]]>",J,"CDATA is not closed.")-2,ae=Q.substring(J+9,ue);j=this.saveTextToParentTag(j,P,q);let Ee=this.parseTextData(ae,P.tagname,q,!0,!1,!0,!0);Ee==null&&(Ee=""),this.options.cdataPropName?P.add(this.options.cdataPropName,[{[this.options.textNodeName]:ae}]):P.add(this.options.textNodeName,Ee),J=ue+2}else{let ue=WI(Q,J,this.options.removeNSPrefix),ae=ue.tagName,Ee=ue.rawTagName,Me=ue.tagExp,zt=ue.attrExpPresent,bt=ue.closeIndex;this.options.transformTagName&&(ae=this.options.transformTagName(ae)),P&&j&&P.tagname!=="!xml"&&(j=this.saveTextToParentTag(j,P,q,!1));let pr=P;pr&&this.options.unpairedTags.indexOf(pr.tagname)!==-1&&(P=this.tagsNodeStack.pop(),q=q.substring(0,q.lastIndexOf("."))),ae!==b.tagname&&(q+=q?"."+ae:ae);let hn=J;if(this.isItStopNode(this.options.stopNodes,q,ae)){let Ys="";if(Me.length>0&&Me.lastIndexOf("/")===Me.length-1)ae[ae.length-1]==="/"?(ae=ae.substr(0,ae.length-1),q=q.substr(0,q.length-1),Me=ae):Me=Me.substr(0,Me.length-1),J=ue.closeIndex;else if(this.options.unpairedTags.indexOf(ae)!==-1)J=ue.closeIndex;else{let Su=this.readStopNodeData(Q,Ee,bt+1);if(!Su)throw new Error(`Unexpected end of ${Ee}`);J=Su.i,Ys=Su.tagContent}let _a=new F(ae);ae!==Me&&zt&&(_a[":@"]=this.buildAttributesMap(Me,q,ae)),Ys&&(Ys=this.parseTextData(Ys,ae,q,!0,zt,!0,!0)),q=q.substr(0,q.lastIndexOf(".")),_a.add(this.options.textNodeName,Ys),this.addChild(P,_a,q,hn)}else{if(Me.length>0&&Me.lastIndexOf("/")===Me.length-1){ae[ae.length-1]==="/"?(ae=ae.substr(0,ae.length-1),q=q.substr(0,q.length-1),Me=ae):Me=Me.substr(0,Me.length-1),this.options.transformTagName&&(ae=this.options.transformTagName(ae));let Ys=new F(ae);ae!==Me&&zt&&(Ys[":@"]=this.buildAttributesMap(Me,q,ae)),this.addChild(P,Ys,q,hn),q=q.substr(0,q.lastIndexOf("."))}else{let Ys=new F(ae);this.tagsNodeStack.push(P),ae!==Me&&zt&&(Ys[":@"]=this.buildAttributesMap(Me,q,ae)),this.addChild(P,Ys,q,hn),P=Ys}j="",J=bt}}else j+=Q[J];return b.child};function JI(Q,b,P,j){this.options.captureMetaData||(j=void 0);let q=this.options.updateTag(b.tagname,P,b[":@"]);q===!1||(typeof q=="string"&&(b.tagname=q),Q.addChild(b,j))}let VI=function(Q){if(this.options.processEntities){for(let b in this.docTypeEntities){let P=this.docTypeEntities[b];Q=Q.replace(P.regx,P.val)}for(let b in this.lastEntities){let P=this.lastEntities[b];Q=Q.replace(P.regex,P.val)}if(this.options.htmlEntities)for(let b in this.htmlEntities){let P=this.htmlEntities[b];Q=Q.replace(P.regex,P.val)}Q=Q.replace(this.ampEntity.regex,this.ampEntity.val)}return Q};function id(Q,b,P,j){return Q&&(j===void 0&&(j=b.child.length===0),(Q=this.parseTextData(Q,b.tagname,P,!1,!!b[":@"]&&Object.keys(b[":@"]).length!==0,j))!==void 0&&Q!==""&&b.add(this.options.textNodeName,Q),Q=""),Q}function od(Q,b,P){let j="*."+P;for(let q in Q){let J=Q[q];if(j===J||b===J)return!0}return!1}function Ic(Q,b,P,j){let q=Q.indexOf(b,P);if(q===-1)throw new Error(j);return q+b.length-1}function WI(Q,b,P,j=">"){let q=(function(bt,pr,hn=">"){let Ys,_a="";for(let Su=pr;Su<bt.length;Su++){let Bc=bt[Su];if(Ys)Bc===Ys&&(Ys="");else if(Bc==='"'||Bc==="'")Ys=Bc;else if(Bc===hn[0]){if(!hn[1])return{data:_a,index:Su};if(bt[Su+1]===hn[1])return{data:_a,index:Su}}else Bc===" "&&(Bc=" ");_a+=Bc}})(Q,b+1,j);if(!q)return;let J=q.data,ue=q.index,ae=J.search(/\s/),Ee=J,Me=!0;ae!==-1&&(Ee=J.substring(0,ae),J=J.substring(ae+1).trimStart());let zt=Ee;if(P){let bt=Ee.indexOf(":");bt!==-1&&(Ee=Ee.substr(bt+1),Me=Ee!==q.data.substr(bt+1))}return{tagName:EeLine truncated
|
||||
`),Uf(Q,b,"",P)}function Uf(Q,b,P,j){let q="",J=!1;for(let ue=0;ue<Q.length;ue++){let ae=Q[ue],Ee=BA(ae);if(Ee===void 0)continue;let Me="";if(Me=P.length===0?Ee:`${P}.${Ee}`,Ee===b.textNodeName){let hn=ae[Ee];qm(Me,b)||(hn=b.tagValueProcessor(Ee,hn),hn=eB(hn,b)),J&&(q+=j),q+=hn,J=!1;continue}if(Ee===b.cdataPropName){J&&(q+=j),q+=`<![CDATA[${ae[Ee][0][b.textNodeName]}]]>`,J=!1;continue}if(Ee===b.commentPropName){q+=j+`<!--${ae[Ee][0][b.textNodeName]}-->`,J=!0;continue}if(Ee[0]==="?"){let hn=QA(ae[":@"],b),Ys=Ee==="?xml"?"":j,_a=ae[Ee][0][b.textNodeName];_a=_a.length!==0?" "+_a:"",q+=Ys+`<${Ee}${_a}${hn}?>`,J=!0;continue}let zt=j;zt!==""&&(zt+=b.indentBy);let bt=j+`<${Ee}${QA(ae[":@"],b)}`,pr=Uf(ae[Ee],b,Me,zt);b.unpairedTags.indexOf(Ee)!==-1?b.suppressUnpairedNode?q+=bt+">":q+=bt+"/>":pr&&pr.length!==0||!b.suppressEmptyNode?pr&&pr.endsWith(">")?q+=bt+`>${pr}${j}</${Ee}>`:(q+=bt+">",pr&&j!==""&&(pr.includes("/>")||pr.includes("</"))?q+=j+b.indentBy+pr+j:q+=pr,q+=`</${Ee}>`):q+=bt+"/>",J=!0}return q}function BA(Q){let b=Object.keys(Q);for(let P=0;P<b.length;P++){let j=b[P];if(Q.hasOwnProperty(j)&&j!==":@")return j}}function QA(Q,b){let P="";if(Q&&!b.ignoreAttributes)for(let j in Q){if(!Q.hasOwnProperty(j))continue;let q=b.attributeValueProcessor(j,Q[j]);q=eB(q,b),q===!0&&b.suppressBooleanAttributes?P+=` ${j.substr(b.attributeNamePrefix.length)}`:P+=` ${j.substr(b.attributeNamePrefix.length)}="${q}"`}return P}function qm(Q,b){let P=(Q=Q.substr(0,Q.length-b.textNodeName.length-1)).substr(Q.lastIndexOf(".")+1);for(let j in b.stopNodes)if(b.stopNodes[j]===Q||b.stopNodes[j]==="*."+P)return!0;return!1}function eB(Q,b){if(Q&&Q.length>0&&b.processEntities)for(let P=0;P<b.entities.length;P++){let j=b.entities[P];Q=Q.replace(j.regex,j.val)}return Q}let Ke={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(Q,b){return b},attributeValueProcessor:function(Q,b){return b},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};function $(Q){this.options=Object.assign({},Ke,Q),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=er(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=le),this.processTextOrObjNode=M,this.options.format?(this.indentate=ne,this.tagEndChar=`>
|
||||
`,this.newLine=`
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function M(Q,b,P,j){let q=this.j2x(Q,P+1,j.concat(b));return Q[this.options.textNodeName]!==void 0&&Object.keys(Q).length===1?this.buildTextValNode(Q[this.options.textNodeName],b,q.attrStr,P):this.buildObjectNode(q.val,b,q.attrStr,P)}function ne(Q){return this.options.indentBy.repeat(Q)}function le(Q){return!(!Q.startsWith(this.options.attributeNamePrefix)||Q===this.options.textNodeName)&&Q.substr(this.attrPrefixLen)}$.prototype.build=function(Q){return this.options.preserveOrder?$I(Q,this.options):(Array.isArray(Q)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(Q={[this.options.arrayNodeName]:Q}),this.j2x(Q,0,[]).val)},$.prototype.j2x=function(Q,b,P){let j="",q="",J=P.join(".");for(let ue in Q)if(Object.prototype.hasOwnProperty.call(Q,ue))if(Q[ue]===void 0)this.isAttribute(ue)&&(q+="");else if(Q[ue]===null)this.isAttribute(ue)||ue===this.options.cdataPropName?q+="":ue[0]==="?"?q+=this.indentate(b)+"<"+ue+"?"+this.tagEndChar:q+=this.indentate(b)+"<"+ue+"/"+this.tagEndChar;else if(Q[ue]instanceof Date)q+=this.buildTextValNode(Q[ue],ue,"",b);else if(typeof Q[ue]!="object"){let ae=this.isAttribute(ue);if(ae&&!this.ignoreAttributesFn(ae,J))j+=this.buildAttrPairStr(ae,""+Q[ue]);else if(!ae)if(ue===this.options.textNodeName){let Ee=this.options.tagValueProcessor(ue,""+Q[ue]);q+=this.replaceEntitiesValue(Ee)}else q+=this.buildTextValNode(Q[ue],ue,"",b)}else if(Array.isArray(Q[ue])){let ae=Q[ue].length,Ee="",Me="";for(let zt=0;zt<ae;zt++){let bt=Q[ue][zt];if(bt!==void 0)if(bt===null)ue[0]==="?"?q+=this.indentate(b)+"<"+ue+"?"+this.tagEndChar:q+=this.indentate(b)+"<"+ue+"/"+this.tagEndChar;else if(typeof bt=="object")if(this.options.oneListGroup){let pr=this.j2x(bt,b+1,P.concat(ue));Ee+=pr.val,this.options.attributesGroupName&&bt.hasOwnProperty(this.options.attributesGroupName)&&(Me+=pr.attrStr)}else Ee+=this.processTextOrObjNode(bt,ue,b,P);else if(this.options.oneListGroup){let pr=this.options.tagValueProcessor(ue,bt);pr=this.replaceEntitiesValue(pr),Ee+=pr}else Ee+=this.buildTextValNode(bt,ue,"",b)}this.options.oneListGroup&&(Ee=this.buildObjectNode(Ee,ue,Me,b)),q+=Ee}else if(this.options.attributesGroupName&&ue===this.options.attributesGroupName){let ae=Object.keys(Q[ue]),Ee=ae.length;for(let Me=0;Me<Ee;Me++)j+=this.buildAttrPairStr(ae[Me],""+Q[ue][ae[Me]])}else q+=this.processTextOrObjNode(Q[ue],ue,b,P);return{attrStr:j,val:q}},$.prototype.buildAttrPairStr=function(Q,b){return b=this.options.attributeValueProcessor(Q,""+b),b=this.replaceEntitiesValue(b),this.options.suppressBooleanAttributes&&b==="true"?" "+Q:" "+Q+'="'+b+'"'},$.prototype.buildObjectNode=function(Q,b,P,j){if(Q==="")return b[0]==="?"?this.indentate(j)+"<"+b+P+"?"+this.tagEndChar:this.indentate(j)+"<"+b+P+this.closeTag(b)+this.tagEndChar;{let q="</"+b+this.tagEndChar,J="";return b[0]==="?"&&(J="?",q=""),!P&&P!==""||Q.indexOf("<")!==-1?this.options.commentPropName!==!1&&b===this.options.commentPropName&&J.length===0?this.indentate(j)+`<!--${Q}-->`+this.newLine:this.indentate(j)+"<"+b+P+J+this.tagEndChar+Q+this.indentate(j)+q:this.indentate(j)+"<"+b+P+J+">"+Q+q}},$.prototype.closeTag=function(Q){let b="";return this.options.unpairedTags.indexOf(Q)!==-1?this.options.suppressUnpairedNode||(b="/"):b=this.options.suppressEmptyNode?"/":`></${Q}`,b},$.prototype.buildTextValNode=function(Q,b,P,j){if(this.options.cdataPropName!==!1&&b===this.options.cdataPropName)return this.indentate(j)+`<![CDATA[${Q}]]>`+this.newLine;if(this.options.commentPropName!==!1&&b===this.options.commentPropName)return this.indentate(j)+`<!--${Q}-->`+this.newLine;if(b[0]==="?")return this.indentate(j)+"<"+b+P+"?"+this.tagEndChar;{let q=this.options.tagValueProcessor(b,Q);return q=this.replaceEntitiesValue(q),q===""?this.indentate(j)+"<"+b+P+this.closeTag(b)+this.tagEndChar:this.indentate(j)+"<"+b+P+">"+q+"</"+b+this.tagEndChar}},$.prototype.replaceEntitiesValue=function(Q){if(Q&&Q.length>0&&this.options.processEntities)for(let b=0;b<this.options.entities.length;b++){let P=this.options.entities[b];Q=Q.replace(P.regex,P.val)}return Q};let ge={validate:a};TJe.exports=e})()});var cae=f(GN=>{"use strict";Object.defineProperty(GN,"__esModule",{value:!0});GN.XML_CHARKEY=GN.XML_ATTRKEY=void 0;GN.XML_ATTRKEY="$";GN.XML_CHARKEY="_"});var vJe=f(S8=>{"use strict";Object.defineProperty(S8,"__esModule",{value:!0});S8.stringifyXML=_lr;S8.parseXML=Olr;var uae=kJe(),FJe=cae();function MJe(t){var e;return{attributesGroupName:FJe.XML_ATTRKEY,textNodeName:(e=t.xmlCharKey)!==null&&e!==void 0?e:FJe.XML_CHARKEY,ignoreAttributes:!1,suppressBooleanAttributes:!1}}function Ulr(t={}){var e,r;return Object.assign(Object.assign({},MJe(t)),{attributeNamePrefix:"@_",format:!0,suppressEmptyNode:!0,indentBy:"",rootNodeName:(e=t.rootName)!==null&&e!==void 0?e:"root",cdataPropName:(r=t.cdataPropName)!==null&&r!==void 0?r:"__cdata"})}function Plr(t={}){return Object.assign(Object.assign({},MJe(t)),{parseAttributeValue:!1Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(ha.HeaderConstants.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===ha.HeaderConstants.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(s=>s.name.toLowerCase().startsWith(ha.HeaderConstants.PREFIX_FOR_STORAGE));r.sort((s,i)=>(0,Tdr.compareHeader)(s.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((s,i,o)=>!(i>0&&s.name.toLowerCase()===o[i-1].name.toLowerCase()));let n="";return r.forEach(s=>{n+=`${s.name.toLowerCase().trimRight()}:${s.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=(0,rVe.getURLPath)(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=(0,rVe.getURLQueries)(e.url),i={};if(s){let o=[];for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){let A=a.toLowerCase();i[A]=s[a],o.push(A)}o.sort();for(let a of o)n+=`
|
||||
${a}:${decodeURIComponent(i[a])}`}return n}};q8.StorageSharedKeyCredentialPolicy=Rae});var nVe=f(G8=>{"use strict";Object.defineProperty(G8,"__esModule",{value:!0});G8.StorageSharedKeyCredential=void 0;var kdr=B("node:crypto"),Fdr=Dae(),Mdr=O8(),xae=class extends Mdr.Credential{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new Fdr.StorageSharedKeyCredentialPolicy(e,r,this)}computeHMACSHA256(e){return(0,kdr.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};G8.StorageSharedKeyCredential=xae});var sVe=f(Y8=>{"use strict";Object.defineProperty(Y8,"__esModule",{value:!0});Y8.AbortError=void 0;var Tae=class extends Error{constructor(e){super(e),this.name="AbortError"}};Y8.AbortError=Tae});var kae=f(J8=>{"use strict";Object.defineProperty(J8,"__esModule",{value:!0});J8.AbortError=void 0;var vdr=sVe();Object.defineProperty(J8,"AbortError",{enumerable:!0,get:function(){return vdr.AbortError}})});var Fae=f(V8=>{"use strict";Object.defineProperty(V8,"__esModule",{value:!0});V8.logger=void 0;var Ldr=A0();V8.logger=(0,Ldr.createClientLogger)("storage-common")});var Mae=f(W8=>{"use strict";Object.defineProperty(W8,"__esModule",{value:!0});W8.StorageRetryPolicyType=void 0;var iVe;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(iVe||(W8.StorageRetryPolicyType=iVe={}))});var aVe=f(I2=>{"use strict";Object.defineProperty(I2,"__esModule",{value:!0});I2.StorageRetryPolicy=void 0;I2.NewRetryPolicyFactory=_dr;var Udr=kae(),Pdr=C2(),oVe=Cp(),vae=h0(),LE=Fae(),Lae=Mae();function _dr(t){return{create:(e,r)=>new z8(e,r,t)}}var UE={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Lae.StorageRetryPolicyType.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Odr=new Udr.AbortError("The operation was aborted."),z8=class extends Pdr.BaseRequestPolicy{retryOptions;constructor(e,r,n=UE){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:UE.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):UE.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:UE.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:UE.maxRetryDelayInMs):UE.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:UE.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:UE.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(s.url=(0,vae.setURLHost)(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=(0,vae.setURLParameter)(s.url,oVe.URLConstants.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(LE.logger.info(`RetryPolicy: =====> Try=${n} ${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(s),!this.shouldRetry(i,n,o))return o;r=r||!i&&o.status===404}catch(a){if(LE.logger.error(`RetryPolicy: Caught error, message: ${a.message}, code: ${a.code}`),!this.shouldRetry(i,n,o,a))throw a}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return LE.logger.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(s){for(let o of i)if(s.name.toUpperCase().includes(o)||s.message.toUpperCase().includes(o)||s.code&&s.code.toString().toUpperCase()===o)return LE.logger.info(`RetryPolicy: Network error ${o} found, will retry.`),!0}if(n||s){let o=n?n.status:s?s.statusCode:0;if(!e&&o===404)return LE.logger.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return LE.logger.info(`RetryPolicy: Will retry for status code ${o}.`),!0}if(n&&n?.status>=400){let o=n.headers.get(oVe.HeaderConstants.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return s?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(LE.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let s=0;if(e)switch(this.retryOptions.retryPolicyType){case Lae.StorageRetryPolicyType.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Lae.StorageRetryPolicyType.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return LE.logger.info(`RetryPolicy: Delay for ${s}ms`),(0,vae.delay)(s,n,Odr)}};I2.StorageRetryPolicy=z8});var _ae=f(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{val
Line truncated
|
||||
`)+`
|
||||
`+n(i)+s(i),a=(0,Zdr.createHmac)("sha256",t.accountKey).update(o,"utf8").digest("base64");i.headers.set(ga.HeaderConstants.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(i,o){let a=i.headers.get(o);return!a||o===ga.HeaderConstants.CONTENT_LENGTH&&a==="0"?"":a}function n(i){let o=[];for(let[A,c]of i.headers)A.toLowerCase().startsWith(ga.HeaderConstants.PREFIX_FOR_STORAGE)&&o.push({name:A,value:c});o.sort((A,c)=>(0,$dr.compareHeader)(A.name.toLowerCase(),c.name.toLowerCase())),o=o.filter((A,c,u)=>!(c>0&&A.name.toLowerCase()===u[c-1].name.toLowerCase()));let a="";return o.forEach(A=>{a+=`${A.name.toLowerCase().trimRight()}:${A.value.trimLeft()}
|
||||
`}),a}function s(i){let o=(0,hVe.getURLPath)(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let A=(0,hVe.getURLQueries)(i.url),c={};if(A){let u=[];for(let l in A)if(Object.prototype.hasOwnProperty.call(A,l)){let d=l.toLowerCase();c[d]=A[l],u.push(d)}u.sort();for(let l of u)a+=`
|
||||
${l}:${decodeURIComponent(c[l])}`}return a}return{name:KN.storageSharedKeyCredentialPolicyName,async sendRequest(i,o){return e(i),o(i)}}}});var fVe=f(XN=>{"use strict";Object.defineProperty(XN,"__esModule",{value:!0});XN.storageRequestFailureDetailsParserPolicyName=void 0;XN.storageRequestFailureDetailsParserPolicy=thr;XN.storageRequestFailureDetailsParserPolicyName="storageRequestFailureDetailsParserPolicy";function thr(){return{name:XN.storageRequestFailureDetailsParserPolicyName,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 pVe=f(j8=>{"use strict";Object.defineProperty(j8,"__esModule",{value:!0});j8.UserDelegationKeyCredential=void 0;var rhr=B("node:crypto"),Gae=class{accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,rhr.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};j8.UserDelegationKeyCredential=Gae});var bd=f(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.BaseRequestPolicy=Ks.getCachedDefaultHttpClient=void 0;var fa=(Wn(),$n(Vn));fa.__exportStar(OJe(),Ks);var nhr=HJe();Object.defineProperty(Ks,"getCachedDefaultHttpClient",{enumerable:!0,get:function(){return nhr.getCachedDefaultHttpClient}});fa.__exportStar(GJe(),Ks);fa.__exportStar(eVe(),Ks);fa.__exportStar(tVe(),Ks);fa.__exportStar(O8(),Ks);fa.__exportStar(nVe(),Ks);fa.__exportStar(_ae(),Ks);var shr=C2();Object.defineProperty(Ks,"BaseRequestPolicy",{enumerable:!0,get:function(){return shr.BaseRequestPolicy}});fa.__exportStar(yae(),Ks);fa.__exportStar(U8(),Ks);fa.__exportStar(AVe(),Ks);fa.__exportStar(cVe(),Ks);fa.__exportStar(dVe(),Ks);fa.__exportStar(Dae(),Ks);fa.__exportStar(gVe(),Ks);fa.__exportStar(fVe(),Ks);fa.__exportStar(pVe(),Ks)});var Gc=f(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.PathStylePorts=at.BlobDoesNotUseCustomerSpecifiedEncryption=at.BlobUsesCustomerSpecifiedEncryptionMsg=at.StorageBlobLoggingAllowedQueryParameters=at.StorageBlobLoggingAllowedHeaderNames=at.DevelopmentConnectionString=at.EncryptionAlgorithmAES25=at.HTTP_VERSION_1_1=at.HTTP_LINE_ENDING=at.BATCH_MAX_PAYLOAD_IN_BYTES=at.BATCH_MAX_REQUEST=at.SIZE_1_MB=at.ETagAny=at.ETagNone=at.HeaderConstants=at.HTTPURLConnection=at.URLConstants=at.StorageOAuthScopes=at.REQUEST_TIMEOUT=at.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS=at.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES=at.DEFAULT_BLOCK_BUFFER_SIZE_BYTES=at.BLOCK_BLOB_MAX_BLOCKS=at.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES=at.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES=at.SERVICE_VERSION=at.SDK_VERSION=void 0;at.SDK_VERSION="12.31.0";at.SERVICE_VERSION="2026-02-06";at.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES=256*1024*1024;at.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES=4e3*1024*1024;at.BLOCK_BLOB_MAX_BLOCKS=5e4;at.DEFAULT_BLOCK_BUFFER_SIZE_BYTES=8*1024*1024;at.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES=4*1024*1024;at.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS=5;at.REQUEST_TIMEOUT=100*1e3;at.StorageOAuthScopes="https://storage.azure.com/.default";at.URLConstants={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};at.HTTPURLConnection={HTTP_ACCEPTED:202,HTTP_CONFLICT:409,HTTP_NOT_FOUND:404,HTTP_PRECON_FAILED:412,HTTP_RANGE_NOT_SATISFIABLE:416};at.HeaderConstants={AUTHORIZATION:"Authorization",AUTHORIZATION_SCHEME:"Bearer",CONTENT_ENCODING:"Content-Encoding",CONTENT_ID:"Content-ID",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",CONTENT_MD5:"Content-Md5",CONTENT_TRANSFER_ENCODING:"Content-Transfer-Encoding",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"date",IF_MATCH:"if-match",IF_MODIFIED_SINCE:"if-modified-since",IF_NONE_MATCH:"if-none-match",IF_UNMODIFIED_SINCE:"if-unmodified-since",PREFIX_FOR_STORAGE:"x-ms-",RANGE:"Range",USER_AGENT:"User-Agent",X_MS_CLIENT_REQUEST_ID:"x-ms-client-request-id",X_MS_COPY_SOURCE:"x-ms-copy-source",X_MS_DATE:"x-ms-date",X_MS_ERROR_CODE:"x-ms-error-code",X_MS_VERSION:"x-ms-version",X_MS_CopySourceErrorCode:"x-ms-copy-source-error-code"};at.ETagNone="";at.ETagAny="*";at.SIZE_1_MB=1*1024*1024;at.BATCH_MAX_REQUEST=256;at.BATCH_MAX_PAYLOAD_IN_BYTES=4*at.SIZE_1_MB;at.HTTP_LINE_ENDING=`\r
|
||||
`;at.HTTP_VERSION_1_1="HTTP/1.1";at.EncryptionAlgorithmAES25="AES256";at.DevelopmentConnectionString="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;";at.StorageBlobLoggingAllowedHeaderNames=["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"];at.StorageBlobLoggingAllowedQueryParameters=["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"];at.BlobUsesCustomerSpecifiedEncryptionMsg="BlobUsesCustomerSpecifiedEncryption";at.BlobDoesNotUseCustomerSpecifiedEncryption="BlobDoesNotUseCustomerSpecifiedEncryption";at.PathStylePorts=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"]});var PE=f(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});Zh.Pipeline=Zh.StorageOAuthScopes=void 0;Zh.isPipelineLike=ohr;Zh.newPipeline=ahr;Zh.getCoreClientOptions=chr;Zh.getCredentialFromPipeline=BVe;var IVe=N8(),mVe=Ji(),EVe=jh(),CVe=lae(),Yae=PN(),ihr=D8(),Yc=bd(),B2=Gc();Object.defineProperty(Zh,"StorageOAuthScopes",{enumerable:!0,get:function(){return B2.StorageOAuthScopes}});function ohr(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 K8=class{factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};Zh.Pipeline=K8;function ahr(t,e={}){t||(t=new Yc.AnonymousCredential);let r=new K8([],e);return r._credential=t,r}function Ahr(t){let e=[uhr,QVe,lhr,dhr,hhr,ghr,phr];if(t.factories.length){let r=t.factories.filter(n=>!e.some(s=>s(n)));if(r.length){let n=r.some(s=>fhr(s));return{wrappedPolicies:(0,IVe.createRequestPolicyFactoryPolicy)(r),afterRetry:n}}}}function chr(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?(0,IVe.convertHttpClient)(e):(0,Yc.getCachedDefaultHttpClient)(),t._coreHttpClient=n);let s=t._corePipeline;if(!s){let i=`azsdk-js-azure-storage-blob/${B2.SDK_VERSION}`,o=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;s=(0,EVe.createClientPipeline)({...r,loggingOptions:{additionalAllowedHeaderNames:B2.StorageBlobLoggingAllowedHeaderNames,additionalAllowedQueryParameters:B2.StorageBlobLoggingAllowedQueryParameters,logger:ihr.logger.info},userAgentOptions:{userAgentPrefix:o},serializationOptions:{stringifyXML:CVe.stringifyXML,serializerOptions:{xml:{xmlCharKey:"#"}}},deserial
Line truncated
|
||||
`),i=e.computeHMACSHA256(s);return{sasQueryParameters:new C0.SASQueryParameters(t.version,i,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}function Sfr(t,e){if(t=B0(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=p0.BlobSASPermissions.parse(t.permissions.toString()).toString():s=m0.ContainerSASPermissions.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?(0,Xs.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Xs.truncatedISO8061Date)(t.expiresOn,!1):"",I0(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?(0,E0.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new C0.SASQueryParameters(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function Rfr(t,e){if(t=B0(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=p0.BlobSASPermissions.parse(t.permissions.toString()).toString():s=m0.ContainerSASPermissions.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?(0,Xs.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Xs.truncatedISO8061Date)(t.expiresOn,!1):"",I0(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?(0,E0.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new C0.SASQueryParameters(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}function Dfr(t,e){if(t=B0(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=p0.BlobSASPermissions.parse(t.permissions.toString()).toString():s=m0.ContainerSASPermissions.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?(0,Xs.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Xs.truncatedISO8061Date)(t.expiresOn,!1):"",I0(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,Xs.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,Xs.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?(0,E0.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new C0.SASQueryParameters(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}function xfr(t,e){if(t=B0(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=p0.BlobSASPermissions.parse(t.permissions.toString()).toString():s=m0.ContainerSASPermissions.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?(0,Xs.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Xs.truncatedISO8061Date)(t.expiresOn,!1):"",I0(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,Xs.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,Xs.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?(0,E0.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new C0.SASQueryParameters(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}function Tfr(t,e){if(t=B0(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=p0.BlobSASPermissions.parse(t.permissions.toString()).toString():s=m0.ContainerSASPermissions.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?(0,Xs.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Xs.truncatedISO8061Date)(t.expiresOn,!1):"",I0(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,Xs.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,Xs.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?(0,E0.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new C0.SASQueryParameters(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}function kfr(t,e){if(t=B0(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=p0.BlobSASPermissions.parse(t.permissions.toString()).toString():s=m0.ContainerSASPermissions.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?(0,Xs.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Xs.truncatedISO8061Date)(t.expiresOn,!1):"",I0(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,Xs.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,Xs.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?(0,E0.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new C0.SASQueryParameters(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}function I0(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}function B0(t){let e=t.version?t.version:aWe.SERVICE_VERSION;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 I3=f(C3=>{"use strict";Object.defineProperty(C3,"__esModule",{value:!0});C3.BlobLeaseClient=void 0;var Ffr=Bs(),eg=Gc(),y2=f0(),E3=nl(),hAe=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=(0,Ffr.randomUUID)()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==eg.ETagNone||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==eg.ETagNone||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 y2.tracingClient.withSpan("BlobLeaseClient-acquireLease",r,async n=>(0,E3.assertResponse)(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==eg.ETagNone||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==eg.ETagNone||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 y2.tracingClient.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=(0,E3.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,s})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==eg.ETagNone||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==eg.ETagNone||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 y2.tracingClient.withSpan("BlobLeaseClient-releaseLease",e,async r=>(0,E3.assertResponse)(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!==eg.ETagNone||e.conditions?.ifNoneMatch&&e.conditions?.i
Line truncated
|
||||
Polling from: ${r.config.operationLocation}
|
||||
Operation status: ${u}
|
||||
Polling status: ${RWe.terminalStates.includes(u)?"Stopped":"Running"}`),u==="succeeded"){let l=o(c,r);if(l!==void 0)return{response:await e(l).catch(SWe({state:r,stateProxy:n,isOperationError:a})),status:u}}return{response:c,status:u}}async function apr(t){let{poll:e,state:r,stateProxy:n,options:s,getOperationStatus:i,getResourceLocation:o,getOperationLocation:a,isOperationError:A,withOperationLocation:c,getPollingInterval:u,processResult:l,getError:d,updateState:h,setDelay:g,isDone:p,setErrorAsResult:C}=t,{operationLocation:m}=r.config;if(m!==void 0){let{response:I,status:y}=await opr({poll:e,getOperationStatus:i,state:r,stateProxy:n,operationLocation:m,getResourceLocation:o,isOperationError:A,options:s});if(DWe({status:y,response:I,state:r,stateProxy:n,isDone:p,processResult:l,getError:d,setErrorAsResult:C}),!RWe.terminalStates.includes(y)){let w=u?.(I);w&&g(w);let H=a?.(I,r);if(H!==void 0){let z=m!==H;r.config.operationLocation=H,c?.(H,z)}else c?.(m,!1)}h?.(r,I)}}VE.pollOperation=apr});var LAe=f(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.pollHttpOperation=Zs.isOperationError=Zs.getResourceLocation=Zs.getOperationStatus=Zs.getOperationLocation=Zs.initHttpOperation=Zs.getStatusFromInitialResponse=Zs.getErrorFromResponse=Zs.parseRetryAfter=Zs.inferLroMode=void 0;var xWe=F3(),FAe=T3();function TWe(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}function kWe(t){return t.headers.location}function FWe(t){return t.headers["operation-location"]}function MWe(t){return t.headers["azure-asyncoperation"]}function Apr(t){var e;let{location:r,requestMethod:n,requestPath:s,resourceLocationConfig:i}=t;switch(n){case"PUT":return s;case"DELETE":return;case"PATCH":return(e=o())!==null&&e!==void 0?e:s;default:return o()}function o(){switch(i){case"azure-async-operation":return;case"original-uri":return s;default:return r}}}function vWe(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t,i=FWe(e),o=MWe(e),a=TWe({operationLocation:i,azureAsyncOperation:o}),A=kWe(e),c=r?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:Apr({requestMethod:c,location:A,requestPath:n,resourceLocationConfig:s})}:A!==void 0?{mode:"ResourceLocation",operationLocation:A}:c==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}Zs.inferLroMode=vWe;function LWe(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 MAe(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 FAe.logger.verbose(`LRO: unrecognized operation status: ${e}`),e}}function cpr(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return LWe({status:r,statusCode:t.statusCode})}function upr(t){var e,r;let{properties:n,provisioningState:s}=(e=t.body)!==null&&e!==void 0?e:{},i=(r=n?.provisioningState)!==null&&r!==void 0?r:s;return LWe({status:i,statusCode:t.statusCode})}function MAe(t){return t===202?"running":t<300?"succeeded":"failed"}function UWe({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?lpr(new Date(e)):r*1e3}}Zs.parseRetryAfter=UWe;function PWe(t){let e=HWe(t,"error");if(!e){FAe.logger.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){FAe.logger.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}Zs.getErrorFromResponse=PWe;function lpr(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}function _We(t){let{response:e,state:r,operationLocation:n}=t;function s(){var o;switch((o=r.config.metadata)===null||o===void 0?void 0:o.mode){case void 0:return MAe(e.rawResponse.statusCode);case"Body":return vAe(e,r);default:return"running"}}let i=s();return i==="running"&&n===void 0?"succeeded":i}Zs.getStatusFromInitialResponse=_We;async function dpr(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:s,setErrorAsResult:i}=t;return(0,xWe.initOperation)({init:async()=>{let o=await s.sendInitialRequest(),a=vWe({rawResponse:o.rawResponse,requestPath:s.requestPath,requestMethod:s.requestMethod,resourceLocationConfig:r});return Object.assign({response:o,operationLocation:a?.operationLocation,resourceLocation:a?.resourceLocation},a?.mode?{metadata:{mode:a.mode}}:{})},stateProxy:e,processResult:n?({flatResponse:o},a)=>n(o,a):({flatResponse:o})=>o,getOperationStatus:_We,setErrorAsResult:i})}Zs.initHttpOperation=dpr;function OWe({rawResponse:t},e){var r;sLine truncated
|
||||
`):o=[e.accountName,n,s,i,t.startsOn?(0,g4.truncatedISO8061Date)(t.startsOn,!1):"",(0,g4.truncatedISO8061Date)(t.expiresOn,!1),t.ipRange?(0,fze.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",r,""].join(`
|
||||
`);let a=e.computeHMACSHA256(o);return{sasQueryParameters:new Cmr.SASQueryParameters(r,a,n.toString(),s,i,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope),stringToSign:o}}});var Bze=f(m4=>{"use strict";Object.defineProperty(m4,"__esModule",{value:!0});m4.BlobServiceClient=void 0;var Qmr=PN(),ymr=Ji(),mze=Bs(),S2=PE(),bmr=ace(),p4=nl(),w0=bd(),ig=nl(),og=f0(),wmr=i4(),Nmr=c3(),Eze=u4(),Cze=dce(),Ize=h4(),hce=class t extends Nmr.StorageClient{serviceContext;static fromConnectionString(e,r){r=r||{};let n=(0,p4.extractConnectionStringParts)(e);if(n.kind==="AccountConnString")if(mze.isNodeLike){let s=new w0.StorageSharedKeyCredential(n.accountName,n.accountKey);r.proxyOptions||(r.proxyOptions=(0,ymr.getDefaultProxySettings)(n.proxyUri));let i=(0,S2.newPipeline)(s,r);return new t(n.url,i)}else throw new Error("Account connection string is only supported in Node.js environment");else if(n.kind==="SASConnString"){let s=(0,S2.newPipeline)(new w0.AnonymousCredential,r);return new t(n.url+"?"+n.accountSas,s)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}constructor(e,r,n){let s;(0,S2.isPipelineLike)(r)?s=r:mze.isNodeLike&&r instanceof w0.StorageSharedKeyCredential||r instanceof w0.AnonymousCredential||(0,Qmr.isTokenCredential)(r)?s=(0,S2.newPipeline)(r,n):s=(0,S2.newPipeline)(new w0.AnonymousCredential,n),super(e,s),this.serviceContext=this.storageClientContext.service}getContainerClient(e){return new bmr.ContainerClient((0,p4.appendToURLPath)(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,r={}){return og.tracingClient.withSpan("BlobServiceClient-createContainer",r,async n=>{let s=this.getContainerClient(e),i=await s.create(n);return{containerClient:s,containerCreateResponse:i}})}async deleteContainer(e,r={}){return og.tracingClient.withSpan("BlobServiceClient-deleteContainer",r,async n=>this.getContainerClient(e).delete(n))}async undeleteContainer(e,r,n={}){return og.tracingClient.withSpan("BlobServiceClient-undeleteContainer",n,async s=>{let i=this.getContainerClient(n.destinationContainerName||e),o=i.storageClientContext.container,a=(0,ig.assertResponse)(await o.restore({deletedContainerName:e,deletedContainerVersion:r,tracingOptions:s.tracingOptions}));return{containerClient:i,containerUndeleteResponse:a}})}async getProperties(e={}){return og.tracingClient.withSpan("BlobServiceClient-getProperties",e,async r=>(0,ig.assertResponse)(await this.serviceContext.getProperties({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async setProperties(e,r={}){return og.tracingClient.withSpan("BlobServiceClient-setProperties",r,async n=>(0,ig.assertResponse)(await this.serviceContext.setProperties(e,{abortSignal:r.abortSignal,tracingOptions:n.tracingOptions})))}async getStatistics(e={}){return og.tracingClient.withSpan("BlobServiceClient-getStatistics",e,async r=>(0,ig.assertResponse)(await this.serviceContext.getStatistics({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async getAccountInfo(e={}){return og.tracingClient.withSpan("BlobServiceClient-getAccountInfo",e,async r=>(0,ig.assertResponse)(await this.serviceContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async listContainersSegment(e,r={}){return og.tracingClient.withSpan("BlobServiceClient-listContainersSegment",r,async n=>(0,ig.assertResponse)(await this.serviceContext.listContainersSegment({abortSignal:r.abortSignal,marker:e,...r,include:typeof r.include=="string"?[r.include]:r.include,tracingOptions:n.tracingOptions})))}async findBlobsByTagsSegment(e,r,n={}){return og.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment",n,async s=>{let i=(0,ig.assertResponse)(await this.serviceContext.filterBlobs({abortSignal:n.abortSignal,where:e,marker:r,maxPageSize:n.maxPageSize,tracingOptions:s.tracingOptions}));return{...i,_response:i._response,blobs:i.blobs.map(a=>{let A="";return a.tags?.blobTagSet.length===1&&(A=a.tags.blobTagSet[0].value),{...a,tags:(0,p4.toTags)(a.tags),tagValue:A}})}})}async*findBlobsByTagsSegments(e,r,n={}){let s;if(r||r===void 0)do s=await this.findBlobsByTagsSegment(e,r,n),s.blobs=s.blobs||[],r=s.continuationToken,yield s;while(r)}async*findBlobsByTagsItems(e,r={}){let n;for await(let s of this.findBlobsByTagsSegments(e,n,r))yield*s.blobs}findBlobsByTags(e,r={}){let n={...r},s=this.findBlobsByTagsItems(e,n);return{next(){return s.next()},[Symbol.asyncIterator](){return this},byPage:(i={})=>this.findBlobsByTagsSegments(e,i.continuationToken,{maxPageSize:i.maxPageSize,...n})}}async*listSegments(e,r={}){let n;if(e||e===void 0)do n=await this.listContainersSegment(e,r),n.containerItems=n.containerItems||[],e=n.continuationToken,yield await n;while(e)}async*listItems(e={}){let r;for await(let n of this.listSegments(r,e))yield*n.containerItems}listContainers(e={}){e.prefix===""&&(e.prefix=void 0);let r=[];e.i
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"}};zA.NetworkError=B4;B4.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Q4=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};zA.UsageError=Q4;Q4.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var Nze=f(jA=>{"use strict";var Tmr=jA&&jA.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),kmr=jA&&jA.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Fmr=jA&&jA.__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)&&Tmr(e,t,r);return kmr(e,t),e},Mmr=jA&&jA.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(jA,"__esModule",{value:!0});jA.uploadCacheArchiveSDK=jA.UploadProgress=void 0;var Ice=Fmr(Oc()),vmr=gce(),Lmr=Cce(),y4=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);Ice.info(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};jA.UploadProgress=y4;function Umr(t,e,r){var n;return Mmr(this,void 0,void 0,function*(){let s=new vmr.BlobClient(t),i=s.getBlockBlobClient(),o=new y4((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),Ice.debug(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let A=yield i.uploadFile(e,a);if(A._response.status>=400)throw new Lmr.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${A._response.status}`);return A}catch(A){throw Ice.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${A.message}`),A}finally{o.stopDisplayTimer()}})}jA.uploadCacheArchiveSDK=Umr});var Qce=f(ei=>{"use strict";var Pmr=ei&&ei.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_mr=ei&&ei.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Omr=ei&&ei.__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)&&Pmr(e,t,r);return _mr(e,t),e},w4=ei&&ei.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(ei,"__esModule",{value:!0});ei.retryHttpClientResponse=ei.retryTypedResponse=ei.retry=ei.isRetryableStatusCode=ei.isServerErrorStatusCode=ei.isSuccessStatusCode=void 0;var Sze=Omr(Oc()),b4=XB(),dS=zw();function Hmr(t){return t?t>=200&&t<300:!1}ei.isSuccessStatusCode=Hmr;function Rze(t){return t?t>=500:!0}ei.isServerErrorStatusCode=Rze;function Dze(t){return t?[b4.HttpCodes.BadGateway,b4.HttpCodes.ServiceUnavailable,b4.HttpCodes.GatewayTimeout].includes(t):!1}ei.isRetryableStatusCode=Dze;function qmr(t){return w4(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function Bce(t,e,r,n=dS.DefaultRetryAttempts,s=dS.DefaultRetryDelay,i=void 0){return w4(this,void 0,void 0,function*(){let o="",a=1;for(;a<=n;){let A,c,u=!1;try{A=yield e()}catch(l){i&&(A=i(l)),u=!0,o=l.message}if(A&&(c=r(A),!Rze(c)))return A;if(c&&(u=Dze(c),o=`Cache service responded with ${c}`),Sze.debug(`${t} - Attempt ${a} of
Line truncated
|
||||
Other caches with similar key:`);for(let a of i?.artifactCaches||[])Wc.debug(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function wEr(t,e,r){return KA(this,void 0,void 0,function*(){let n=new mEr.URL(t),s=(0,Dce.getDownloadOptions)(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield(0,D4.downloadCacheStorageSDK)(t,e,s):s.concurrentBlobDownloads?yield(0,D4.downloadCacheHttpClientConcurrent)(t,e,s):yield(0,D4.downloadCacheHttpClient)(t,e):yield(0,D4.downloadCacheHttpClient)(t,e)})}mo.downloadCache=wEr;function NEr(t,e,r){return KA(this,void 0,void 0,function*(){let n=xce(),s=fS.getCacheVersion(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:s,cacheSize:r?.cacheSize};return yield(0,KE.retryTypedResponse)("reserveCache",()=>KA(this,void 0,void 0,function*(){return n.postJson(F2("caches"),i)}))})}mo.reserveCache=NEr;function Hze(t,e){return`bytes ${t}-${e}/*`}function SEr(t,e,r,n,s){return KA(this,void 0,void 0,function*(){Wc.debug(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${Hze(n,s)}`);let i={"Content-Type":"application/octet-stream","Content-Range":Hze(n,s)},o=yield(0,KE.retryHttpClientResponse)(`uploadChunk (start: ${n}, end: ${s})`,()=>KA(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!(0,KE.isSuccessStatusCode)(o.message.statusCode))throw new Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function REr(t,e,r,n){return KA(this,void 0,void 0,function*(){let s=fS.getArchiveFileSizeInBytes(r),i=F2(`caches/${e.toString()}`),o=Sce.openSync(r,"r"),a=(0,Dce.getUploadOptions)(n),A=fS.assertDefined("uploadConcurrency",a.uploadConcurrency),c=fS.assertDefined("uploadChunkSize",a.uploadChunkSize),u=[...new Array(A).keys()];Wc.debug("Awaiting all uploads");let l=0;try{yield Promise.all(u.map(()=>KA(this,void 0,void 0,function*(){for(;l<s;){let d=Math.min(s-l,c),h=l,g=l+d-1;l+=c,yield SEr(t,i,()=>Sce.createReadStream(r,{fd:o,start:h,end:g,autoClose:!1}).on("error",p=>{throw new Error(`Cache upload failed because file read failed with ${p.message}`)}),h,g)}})))}finally{Sce.closeSync(o)}})}function DEr(t,e,r){return KA(this,void 0,void 0,function*(){let n={size:r};return yield(0,KE.retryTypedResponse)("commitCache",()=>KA(this,void 0,void 0,function*(){return t.postJson(F2(`caches/${e.toString()}`),n)}))})}function xEr(t,e,r,n){return KA(this,void 0,void 0,function*(){if((0,Dce.getUploadOptions)(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,EEr.uploadCacheArchiveSDK)(r,e,n)}else{let i=xce();Wc.debug("Upload cache"),yield REr(i,t,e,n),Wc.debug("Commiting cache");let o=fS.getArchiveFileSizeInBytes(e);Wc.info(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);let a=yield DEr(i,t,o);if(!(0,KE.isSuccessStatusCode)(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);Wc.info("Cache saved successfully")}})}mo.saveCache=xEr});var x4=f(pS=>{"use strict";Object.defineProperty(pS,"__esModule",{value:!0});pS.isJsonObject=pS.typeofJsonValue=void 0;function TEr(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}pS.typeofJsonValue=TEr;function kEr(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}pS.isJsonObject=kEr});var k4=f(mS=>{"use strict";Object.defineProperty(mS,"__esModule",{value:!0});mS.base64encode=mS.base64decode=void 0;var yp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),T4=[];for(let t=0;t<yp.length;t++)T4[yp[t].charCodeAt(0)]=t;T4[45]=yp.indexOf("+");T4[95]=yp.indexOf("/");function FEr(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let r=new Uint8Array(e),n=0,s=0,i,o=0;for(let a=0;a<t.length;a++){if(i=T4[t.charCodeAt(a)],i===void 0)switch(t[a]){case"=":s=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:o=i,s=1;break;case 1:r[n++]=o<<2|(i&48)>>4,o=i,s=2;break;case 2:r[n++]=(o&15)<<4|(i&60)>>2,o=i,s=3;break;case 3:r[n++]=(o&3)<<6|i,s=0;break}}if(s==1)throw Error("invalid base64 string.");return r.subarray(0,n)}mS.base64decode=FEr;function MEr(t){let e="",r=0,n,s=0;for(let i=0;i<t.length;i++)switch(n=t[i],r){case 0:e+=yp[n>>2],s=(n&3)<<4,r=1;break;case 1:e+=yp[s|n>>4],s=(n&15)<<2,r=2;break;case 2:e+=yp[s|n>>6],e+=yp[n&63],r=0;break}return r&&(e+=yp[s],e+="=",r==1&&(e+="=")),e}mS.base64encode=MEr});var Gze=f(F4=>{"use strict";Object.defineProperty(F4,"__esModule",{value:!0});F4.utf8read=void 0;var Tce=t=>String.fromCharCode.apply(String,t);function vEr(t){if(t.length<1)return"";let e=0,r=[],n=[],s=0,i,o=t.length;for(;e<o;)i=t[e++],i<128?n[s++]=i:i>191&&i<224?n[s++]=(i&31)<<6|t[e++]&63:i>239&&i<365?(i=((i&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[s++]=55296+(i>>10),n[s++]=56320+(i&1023)):n[s++]=(i&15)<<12|(t[e++]&63)<<6|t[e++]&63,s>8191&&(r.push(Tce(n)),s=0);return r.length?(s&&r.push(Tce(n.slice(0,s))),r.join("")):Tce(n.slice(0,s))}F4.utf8read=vEr});var M2=f(ag=>{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});ag.WireType=ag.mergeBinaryOptions=ag.UnknownFieldHandler=void 0;var LEr;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,s,i,o)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:s,wireType:i,data:o})},t.onWrite=(r,n,s)=>{for(let{no:i,wireType:o,data:a}of t.list(n))s.tag(i,o).raw(a)},t.list=(r,n)=>{if(e(r)){let s=r[t.symbol];return n?s.filter(i=>i.no==n):s}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(LEr=ag.UnknownFieldHandler||(ag.UnknownFieldHandler={}));function UEr(t,e){return Object.assign(Object.assign({},t),e)}ag.mergeBinaryOptions=UEr;var PEr;(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"})(PEr=ag.WireType||(ag.WireType={}))});var v4=f(XA=>{"use strict";Object.defineProperty(XA,"__esModule",{value:!0});XA.varint32read=XA.varint32write=XA.int64toString=XA.int64fromString=XA.varint64write=XA.varint64read=void 0;function _Er(){let t=0,e=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(t|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let s=this.buf[this.pos++];if(e|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}XA.varint64read=_Er;function OEr(t,e,r){for(let i=0;i<28;i=i+7){let o=t>>>i,a=!(!(o>>>7)&&e==0),A=(a?o|128:o)&255;if(r.push(A),!a)return}let n=t>>>28&15|(e&7)<<4,s=e>>3!=0;if(r.push((s?n|128:n)&255),!!s){for(let i=3;i<31;i=i+7){let o=e>>>i,a=!!(o>>>7),A=(a?o|128:o)&255;if(r.push(A),!a)return}r.push(e>>>31&1)}}XA.varint64write=OEr;var M4=65536*65536;function HEr(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,s=0;function i(o,a){let A=Number(t.slice(o,a));s*=r,n=n*r+A,n>=M4&&(s=s+(n/M4|0),n=n%M4)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,n,s]}XA.int64fromString=HEr;function qEr(t,e){if(e>>>0<=2097151)return""+(M4*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,s=e>>16&65535,i=r+n*6777216+s*6710656,o=n+s*8147497,a=s*2,A=1e7;i>=A&&(o+=Math.floor(i/A),i%=A),o>=A&&(a+=Math.floor(o/A),o%=A);function c(u,l){let d=u?String(u):"";return l?"0000000".slice(d.length)+d:d}return c(a,0)+c(o,a)+c(i,1)}XA.int64toString=qEr;function GEr(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)}}XA.varint32write=GEr;function YEr(){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}XA.varint32read=YEr});var ZE=f(XE=>{"use strict";Object.defineProperty(XE,"__esModule",{value:!0});XE.PbLong=XE.PbULong=XE.detectBi=void 0;var v2=v4(),_n;function Yze(){let t=new DataView(new ArrayBuffer(8));_n=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}XE.detectBi=Yze;Yze();function Jze(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var Vze=/^-?[0-9]+$/,U4=4294967296,L4=2147483648,
Line truncated
|
||||
`)}};AY.RpcError=sue});var oue=f(uY=>{"use strict";Object.defineProperty(uY,"__esModule",{value:!0});uY.mergeRpcOptions=void 0;var Qje=lr();function dIr(t,e){if(!e)return t;let r={};cY(t,r),cY(e,r);for(let n of Object.keys(e)){let s=e[n];switch(n){case"jsonOptions":r.jsonOptions=Qje.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=Qje.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},cY(t.meta,r.meta),cY(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}return r}uY.mergeRpcOptions=dIr;function cY(t,e){if(!t)return;let r=e;for(let[n,s]of Object.entries(t))s instanceof Date?r[n]=new Date(s.getTime()):Array.isArray(s)?r[n]=s.concat():r[n]=s}});var Aue=f(R0=>{"use strict";Object.defineProperty(R0,"__esModule",{value:!0});R0.Deferred=R0.DeferredState=void 0;var ug;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(ug=R0.DeferredState||(R0.DeferredState={}));var aue=class{constructor(e=!0){this._state=ug.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==ug.PENDING)throw new Error(`cannot resolve ${ug[this.state].toLowerCase()}`);this._resolve(e),this._state=ug.RESOLVED}reject(e){if(this.state!==ug.PENDING)throw new Error(`cannot reject ${ug[this.state].toLowerCase()}`);this._reject(e),this._state=ug.REJECTED}resolvePending(e){this._state===ug.PENDING&&this.resolve(e)}rejectPending(e){this._state===ug.PENDING&&this.reject(e)}};R0.Deferred=aue});var uue=f(lY=>{"use strict";Object.defineProperty(lY,"__esModule",{value:!0});lY.RpcOutputStreamController=void 0;var yje=Aue(),D0=lr(),cue=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 n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){D0.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){D0.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){D0.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(){D0.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;D0.assert(e,"bad state"),D0.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 yje.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;D0.assert(n.state==yje.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};lY.RpcOutputStreamController=cue});var due=f(bS=>{"use strict";var hIr=bS&&bS.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(bS,"__esModule",{value:!0});bS.UnaryCall=void 0;var lue=class{constructor(e,r,n,s,i,o,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=i,this.status=o,this.trailers=a}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return hIr(this,void 0,void 0,function*(){let[e,r,n,s]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:s}})}};bS.UnaryCall=lue});var gue=f(wS=>{"use strict";var gIr=wS&&wS.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(wS,"__esModule",{value:!0});wS.ServerStreamingCall=void 0;var hue=class
Line truncated
|
||||
`));let n=yield Uue(r,"create");yield Pue(n,t)})}pa.createTar=ABr});var Z2=f(Mi=>{"use strict";var cBr=Mi&&Mi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),uBr=Mi&&Mi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),K2=Mi&&Mi.__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)&&cBr(e,t,r);return uBr(e,t),e},HS=Mi&&Mi.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.saveCache=Mi.restoreCache=Mi.isFeatureAvailable=Mi.ReserveCacheError=Mi.ValidationError=void 0;var dr=K2(Oc()),CY=K2(B("path")),bs=K2(Kw()),_S=K2(qze()),qje=K2(Pje()),X2=S4(),tC=Hje(),lBr=zw(),y2n=XB(),rC=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};Mi.ValidationError=rC;var j2=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};Mi.ReserveCacheError=j2;function Gje(t){if(!t||t.length===0)throw new rC("Path Validation Error: At least one directory or file path is required")}function _ue(t){if(t.length>512)throw new rC(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new rC(`Key Validation Error: ${t} cannot contain commas.`)}function dBr(){return(0,X2.getCacheServiceVersion)()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}Mi.isFeatureAvailable=dBr;function hBr(t,e,r,n,s=!1){return HS(this,void 0,void 0,function*(){let i=(0,X2.getCacheServiceVersion)();return dr.debug(`Cache service version: ${i}`),Gje(t),i==="v2"?yield fBr(t,e,r,n,s):yield gBr(t,e,r,n,s)})}Mi.restoreCache=hBr;function gBr(t,e,r,n,s=!1){return HS(this,void 0,void 0,function*(){r=r||[];let i=[e,...r];if(dr.debug("Resolved Keys:"),dr.debug(JSON.stringify(i)),i.length>10)throw new rC("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of i)_ue(A);let o=yield bs.getCompressionMethod(),a="";try{let A=yield _S.getCacheEntry(i,t,{compressionMethod:o,enableCrossOsArchive:s});if(!A?.archiveLocation)return;if(n?.lookupOnly)return dr.info("Lookup only - skipping download"),A.cacheKey;a=CY.join(yield bs.createTempDirectory(),bs.getCacheFileName(o)),dr.debug(`Archive Path: ${a}`),yield _S.downloadCache(A.archiveLocation,a,n),dr.isDebug()&&(yield(0,tC.listTar)(a,o));let c=bs.getArchiveFileSizeInBytes(a);return dr.info(`Cache Size: ~${Math.round(c/(1024*1024))} MB (${c} B)`),yield(0,tC.extractTar)(a,o),dr.info("Cache restored successfully"),new OS(A.cacheKey,c)}finally{try{yield bs.unlinkFile(a)}catch(A){dr.debug(`Failed to delete archive: ${A}`)}}})}function fBr(t,e,r,n,s=!1){return HS(this,void 0,void 0,function*(){n=Object.assign(Object.assign({},n),{useAzureSdk:!0}),r=r||[];let i=[e,...r];if(dr.debug("Resolved Keys:"),dr.debug(JSON.stringify(i)),i.length>10)throw new rC("Key Validation Error: Keys are limited to a maximum of 10.");for(let a of i)_ue(a);let o="";try{let a=qje.internalCacheTwirpClient(),A=yield bs.getCompressionMethod(),c={key:e,restoreKeys:r,version:bs.getCacheVersion(t,A,s)},u=yield a.GetCacheEntryDownloadURL(c);if(!u.ok){dr.debug(`Cache not found for version ${c.version} of keys: ${i.join(", ")}`);return}if(c.key!==u.matchedKey?dr.info(`Cache hit for restore-key: ${u.matchedKey}`):dr.info(`Cache hit for: ${u.matchedKey}`),n?.lookupOnly)return dr.info("Lookup only - skipping download"),u.matchedKey;o=CY.join(yield bs.createTempDirectory(),bs.getCacheFileName(A)),dr.debug(`Archive path: ${o}`),dr.debug(`Starting download of archive to: ${o}`),yield _S.downloadCache(u.signedDownloadUrl,o,n);let d=bs.getArchiveFileSizeInBytes(o);return dr.info(`Cache Size: ~${Math.round(d/(1024*1024))} MB (${d} B)`),dr.isDebug()&&(yield(0,tC.listTar)(o,A)),yield(0,tC.extractTar)(o,A),dr.info("Cache restored successfully"),new OS(u.matchedKey,d)}finally{try{o&&(yield bs.unlinkFile(o))}catch(a){dr.debug(`Failed to delete archive: ${a}`)}}})}function pBr(t,e,r,n=!1){return HS(this,void 0,void 0,function*(){let s=(0,X2.getCacheServiceVersion)();return dr.debug(`Cache service version: ${s}`),Gje(t),_ue(e),s==="v2"?yield EBr(t,e,r,n):yield mBr(t,e,r,n)})}Mi.saveCache=pBr;function mBr(t,e,r,n=!1){var s,i,o,a,A;return HS(this,void 0,void 0,function*(){let c=yield bs.getCompressionMethod(),u=-1,l=yield bs.resolvePaths(t);if(dr.debug("C
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}function $Qr(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let i=n.length;i!==0;i--){let o=n[i-1].trim();if(UQr.has(o)){s=o;break}}s!==""&&(t.referrerPolicy=s)}function eyr(){return"allowed"}function tyr(){return"success"}function ryr(){return"success"}function nyr(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function syr(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&&_le(t.origin)&&!_le(dF(t))&&(e=null);break;case"same-origin":zY(t,dF(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function tR(t,e){return t}function iyr(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:tR(t.domainLookupStartTime,r),domainLookupEndTime:tR(t.domainLookupEndTime,r),connectionStartTime:tR(t.connectionStartTime,r),connectionEndTime:tR(t.connectionEndTime,r),secureConnectionStartTime:tR(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function oyr(t){return tR(qQr.now(),t)}function ayr(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 WKe(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function Ayr(t){return{referrerPolicy:t.referrerPolicy}}function cyr(t){let e=t.referrerPolicy;U0(e);let r=null;if(t.referrer==="client"){let a=HKe();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let n=Ple(r),s=Ple(r,!0);n.toString().length>4096&&(n=s);let i=zY(t,n),o=lF(n)&&!lF(t.url);switch(e){case"origin":return s??Ple(r,!0);case"unsafe-url":return n;case"same-origin":return i?s:"no-referrer";case"origin-when-cross-origin":return i?n:s;case"strict-origin-when-cross-origin":{let a=dF(t);return zY(n,a)?n:lF(n)&&!lF(a)?"no-referrer":s}default:return o?"no-referrer":s}}function Ple(t,e){return U0(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 lF(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}function uyr(t,e){if(WY===void 0)return!0;let r=zKe(e);if(r==="no metadata"||r.length===0)return!0;let n=dyr(r),s=hyr(r,n);for(let i of s){let o=i.algo,a=i.hash,A=WY.createHash(o).update(t).digest("base64");if(A[A.length-1]==="="&&(A[A.length-2]==="="?A=A.slice(0,-2):A=A.slice(0,-1)),gyr(A,a))return!0}return!1}var lyr=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function zKe(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=lyr.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let i=s.groups.algo.toLowerCase();GKe.includes(i)&&e.push(s.groups)}return r===!0?"no metadata":e}function dyr(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}function hyr(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}function gyr(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 fyr(t){}function zY(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function pyr(){let t,e;return{promise:new Promise((n,s)=>{t=n,e=s}),resolve:t,reject:e}}function myr(t){return t.controller.state==="aborted"}function Eyr(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function Cyr(t){return JQr[t.toLowerCase()]??t}function Iyr(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return U0(typeof e=="string"),e}var Byr=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function jKe(t,e,r=0,n=1){cl
Line truncated
|
||||
`);function Xyr(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function Zyr(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}function $yr(t,e){KY(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),s=[],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+n.length).equals(n))i.position+=n.length;else return"failure";if(i.position===t.length-2&&XY(t,jyr,i)||i.position===t.length-4&&XY(t,Kyr,i))return s;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let a=ebr(t,i);if(a==="failure")return"failure";let{name:A,filename:c,contentType:u,encoding:l}=a;i.position+=2;let d;{let g=t.indexOf(n.subarray(2),i.position);if(g===-1)return"failure";d=t.subarray(i.position,g-4),i.position+=d.length,l==="base64"&&(d=Buffer.from(d.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let h;c!==null?(u??="text/plain",Xyr(u)||(u=""),h=new Wyr([d],c,{type:u})):h=qyr(Buffer.from(d)),KY(aXe(A)),KY(typeof h=="string"&&aXe(h)||Yyr(h)),s.push(Jyr(A,h,c))}}function ebr(t,e){let r=null,n=null,s=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:s,encoding:i};let o=nR(a=>a!==10&&a!==13&&a!==58,t,e);if(o=Vle(o,!0,!0,a=>a===9||a===32),!Gyr.test(o.toString())||t[e.position]!==58)return"failure";switch(e.position++,nR(a=>a===32||a===9,t,e),Hyr(o)){case"content-disposition":{if(r=n=null,!XY(t,zyr,e)||(e.position+=17,r=uXe(t,e),r===null))return"failure";if(XY(t,cXe,e)){let a=e.position+cXe.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,n=uXe(t,e),n===null))return"failure"}break}case"content-type":{let a=nR(A=>A!==10&&A!==13,t,e);a=Vle(a,!1,!0,A=>A===9||A===32),s=AXe(a);break}case"content-transfer-encoding":{let a=nR(A=>A!==10&&A!==13,t,e);a=Vle(a,!1,!0,A=>A===9||A===32),i=AXe(a);break}default:nR(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function uXe(t,e){KY(t[e.position-1]===34);let r=nR(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}function nR(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}function Vle(t,e,r,n){let s=0,i=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;i>0&&n(t[i]);)i--;return s===0&&i===t.length-1?t:t.subarray(s,i+1)}function XY(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}lXe.exports={multipartFormDataParser:$yr,validateBoundary:Zyr}});var oR=f((EFn,QXe)=>{"use strict";var fF=Ir(),{ReadableStreamFrom:tbr,isBlobLike:hXe,isReadableStreamLike:rbr,readableStreamClose:nbr,createDeferredPromise:sbr,fullyReadBody:ibr,extractMimeType:obr,utf8DecodeBytes:pXe}=jc(),{FormData:gXe}=gF(),{kState:iR}=oC(),{webidl:abr}=Wo(),{Blob:Abr}=B("node:buffer"),Wle=B("node:assert"),{isErrored:mXe,isDisturbed:cbr}=B("node:stream"),{isArrayBuffer:ubr}=B("node:util/types"),{serializeAMimeType:lbr}=$A(),{multipartFormDataParser:dbr}=dXe(),zle;try{let t=B("node:crypto");zle=e=>t.randomInt(0,e)}catch{zle=t=>Math.floor(Math.random(t))}var ZY=new TextEncoder;function hbr(){}var EXe=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,CXe;EXe&&(CXe=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!cbr(e)&&!mXe(e)&&e.cancel("Response object has been garbage collected").catch(hbr)}));function IXe(t,e=!1){let r=null;t instanceof ReadableStream?r=t:hXe(t)?r=t.stream():r=new ReadableStream({async pull(A){let c=typeof s=="string"?ZY.encode(s):s;c.byteLength&&A.enqueue(c),queueMicrotask(()=>nbr(A))},start(){},type:"bytes"}),Wle(rbr(r));let n=null,s=null,i=null,o=null;if(typeof t=="string")s=t,o="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),o="application/x-www-form-urlencoded;charset=UTF-8";else if(ubr(t))s=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))s=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(fF.isFormDataLike(t)){let A=`----formdata-undici-0${`${zle(1e11)}`.padStart(11,"0")}`,c=`--${A}\r
|
||||
Content-Disposition: form-data`;let u=C=>C.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),l=C=>C.replace(/\r?\n|\r/g,`\r
|
||||
`),d=[],h=new Uint8Array([13,10]);i=0;let g=!1;for(let[C,m]of t)if(typeof m=="string"){let I=ZY.encode(c+`; name="${u(l(C))}"\r
|
||||
\r
|
||||
${l(m)}\r
|
||||
`);d.push(I),i+=I.byteLength}else{let I=ZY.encode(`${c}; name="${u(l(C))}"`+(m.name?`; filename="${u(m.name)}"`:"")+`\r
|
||||
Content-Type: ${m.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);d.push(I,m,h),typeof m.size=="number"?i+=I.byteLength+m.size+h.byteLength:g=!0}let p=ZY.encode(`--${A}--\r
|
||||
`);d.push(p),i+=p.byteLength,g&&(i=null),s=t,n=async function*(){for(let C of d)C.stream?yield*C.stream():yield C},o=`multipart/form-data; boundary=${A}`}else if(hXe(t))s=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(fF.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:tbr(t)}if((typeof s=="string"||fF.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let A;r=new ReadableStream({async start(){A=n(t)[Symbol.asyncIterator]()},async pull(c){let{value:u,done:l}=await A.next();if(l)queueMicrotask(()=>{c.close(),c.byobRequest?.respond(0)});else if(!mXe(r)){let d=new Uint8Array(u);d.byteLength&&c.enqueue(d)}return c.desiredSize>0},async cancel(c){await A.return()},type:"bytes"})}return[{stream:r,source:s,length:i},o]}function gbr(t,e=!1){return t instanceof ReadableStream&&(Wle(!fF.isDisturbed(t),"The body has already been consumed."),Wle(!t.locked,"The stream is locked.")),IXe(t,e)}function fbr(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}function pbr(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function mbr(t){return{blob(){return sR(this,r=>{let n=fXe(this);return n===null?n="":n&&(n=lbr(n)),new Abr([r],{type:n})},t)},arrayBuffer(){return sR(this,r=>new Uint8Array(r).buffer,t)},text(){return sR(this,pXe,t)},json(){return sR(this,Cbr,t)},formData(){return sR(this,r=>{let n=fXe(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=dbr(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new gXe;return i[iR]=s,i}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),i=new gXe;for(let[o,a]of s)i.append(o,a);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return sR(this,r=>new Uint8Array(r),t)}}}function Ebr(t){Object.assign(t.prototype,mbr(t))}async function sR(t,e,r){if(abr.brandCheck(t,r),BXe(t))throw new TypeError("Body is unusable: Body has already been read");pbr(t[iR]);let n=sbr(),s=o=>n.reject(o),i=o=>{try{n.resolve(e(o))}catch(a){s(a)}};return t[iR].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(await ibr(t[iR].body,i,s),n.promise)}function BXe(t){let e=t[iR].body;return e!=null&&(e.stream.locked||fF.isDisturbed(e.stream))}function Cbr(t){return JSON.parse(pXe(t))}function fXe(t){let e=t[iR].headersList,r=obr(e);return r==="failure"?null:r}QXe.exports={extractBody:IXe,safelyExtractBody:gbr,cloneBody:fbr,mixinBody:Ebr,streamRegistry:CXe,hasFinalizationRegistry:EXe,bodyUnusable:BXe}});var FXe=f((CFn,kXe)=>{"use strict";var kt=B("node:assert"),Vt=Ir(),{channels:yXe}=WS(),jle=xle(),{RequestContentLengthMismatchError:P0,ResponseContentLengthMismatchError:Ibr,RequestAbortedError:DXe,HeadersTimeoutError:Bbr,HeadersOverflowError:Qbr,SocketError:s5,InformationalError:aR,BodyTimeoutError:ybr,HTTPParserError:bbr,ResponseExceededMaxSizeError:wbr}=sn(),{kUrl:xXe,kReset:ec,kClient:$le,kParser:si,kBlocking:EF,kRunning:ma,kPending:Nbr,kSize:bXe,kWriting:AC,kQueue:Td,kNoRef:pF,kKeepAliveDefaultTimeout:Sbr,kHostHeader:Rbr,kPendingIdx:Dbr,kRunningIdx:gl,kError:fl,kPipelining:r5,kSocket:AR,kKeepAliveTimeoutValue:i5,kMaxHeadersSize:Kle,kKeepAliveMaxTimeout:xbr,kKeepAliveTimeoutThreshold:Tbr,kHeadersTimeout:kbr,kBodyTimeout:Fbr,kStrictContentLength:ede,kMaxRequests:wXe,kCounter:Mbr,kMaxResponseSize:vbr,kOnError:Lbr,kResume:aC,kHTTPContext:TXe}=ws(),gg=CKe(),Ubr=Buffer.alloc(0),$Y=Buffer[Symbol.species],e5=Vt.addListener,Pbr=Vt.removeAllListeners,Xle;async function _br(){let t=process.env.JEST_WORKER_ID?Fle():void 0,e;try{e=await WebAssembly.compile(QKe())}catch{e=await WebAssembly.compile(t||Fle())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,s)=>0,wasm_on_status:(r,n,s)=>{kt(zi.ptr===r);let i=n-pg+fg.byteOffset;return zi.onStatus(new $Y(fg.buffer,i,s))||0},wasm_on_message_begin:r=>(kt(zi.ptr===r),zi.onMessageBegin()||0),wasm_on_header_field:(r,n,s)=>{kt(zi.ptr===r);let i=n-pg+fg.byteOffset;return zi.onHeaderField(new $Y(fg.buffer,i,s))||0},wasm_on_header_value:(r,n,s)=>{kt(zi.ptr===r);let i=n-pg+fg.byteOffset;return zi.onHeaderValue(new $Y(fg.buffer,i,s))||0},wasm_on_headers_complete:(r,n,s,i)=>(kt(zi.ptr===r),zi.onHeadersComplete(n,!!s,!!i)||0),wasm_on_body:(r,n,s)=>{kt(zi.ptr===r);let i=n-pg+fg.byteOffset;return zi.onBody(new $Y(fg.buffer,i,s))||0},wasm_on_message_complete:r=>(kt(zi.ptr===r),zi.onMessageComplete()||0)}})}var Zle=null,tde=_br();tde.catch();var zi=null,fg=null,t5=0,pg=null,Obr=0,mF=1,cR=2|mF,n5=4|mF,rde=8|Obr,nde=class{constructor(e,r,{exports:n}){kt(Number.isFinite(e[Kle])&&e[Kle]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(gg.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,th
Line truncated
|
||||
`;if(typeof s=="string"?p+=`host: ${s}\r
|
||||
`:p+=t[Rbr],i?p+=`connection: upgrade\r
|
||||
upgrade: ${i}\r
|
||||
`:t[r5]&&!h[ec]?p+=`connection: keep-alive\r
|
||||
`:p+=`connection: close\r
|
||||
`,Array.isArray(c))for(let C=0;C<c.length;C+=2){let m=c[C+0],I=c[C+1];if(Array.isArray(I))for(let y=0;y<I.length;y++)p+=`${m}: ${I[y]}\r
|
||||
`;else p+=`${m}: ${I}\r
|
||||
`}return yXe.sendHeaders.hasSubscribers&&yXe.sendHeaders.publish({request:e,headers:p,socket:h}),!A||d===0?SXe(g,null,t,e,h,u,p,l):Vt.isBuffer(A)?SXe(g,A,t,e,h,u,p,l):Vt.isBlobLike(A)?typeof A.stream=="function"?RXe(g,A.stream(),t,e,h,u,p,l):Vbr(g,A,t,e,h,u,p,l):Vt.isStream(A)?Jbr(g,A,t,e,h,u,p,l):Vt.isIterable(A)?RXe(g,A,t,e,h,u,p,l):kt(!1),!0}function Jbr(t,e,r,n,s,i,o,a){kt(i!==0||r[ma]===0,"stream body cannot be pipelined");let A=!1,c=new o5({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(g){if(!A)try{!c.write(g)&&this.pause&&this.pause()}catch(p){Vt.destroy(this,p)}},l=function(){A||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!A){let g=new DXe;queueMicrotask(()=>h(g))}},h=function(g){if(!A){if(A=!0,kt(s.destroyed||s[AC]&&r[ma]<=1),s.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!g)try{c.end()}catch(p){g=p}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?Vt.destroy(e,g):Vt.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),s.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(d)}function SXe(t,e,r,n,s,i,o,a){try{e?Vt.isBuffer(e)&&(kt(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!a&&n.reset!==!1&&(s[ec]=!0)):i===0?s.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(kt(i===null,"no body must not have content length"),s.write(`${o}\r
|
||||
`,"latin1")),n.onRequestSent(),r[aC]()}catch(A){t(A)}}async function Vbr(t,e,r,n,s,i,o,a){kt(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new P0;let A=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(A),s.uncork(),n.onBodySent(A),n.onRequestSent(),!a&&n.reset!==!1&&(s[ec]=!0),r[aC]()}catch(A){t(A)}}async function RXe(t,e,r,n,s,i,o,a){kt(i!==0||r[ma]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let u=()=>new Promise((d,h)=>{kt(A===null),s[fl]?h(s[fl]):A=d});s.on("close",c).on("drain",c);let l=new o5({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(s[fl])throw s[fl];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{s.off("close",c).off("drain",c)}}var o5=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[AC]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[fl])throw r[fl];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(s!==null&&o+c>s){if(i[ede])throw new P0;process.emitWarning(new P0)}r.cork(),o===0&&(!a&&n.reset!==!1&&(r[ec]=!0),s===null?r.write(`${A}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${A}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1")),s===null&&r.write(`\r
|
||||
${c.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=c;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[si].timeout&&r[si].timeoutType===cR&&r[si].timeout.refresh&&r[si].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[AC]=!1,e[fl])throw e[fl];if(!e.destroyed){if(s===0?i?e.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${o}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&s!==r){if(n[ede])throw new P0;process.emitWarning(new P0)}e[si].timeout&&e[si].timeoutType===cR&&e[si].timeout.refresh&&e[si].timeout.refresh(),n[aC]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[AC]=!1,e&&(kt(n[ma]<=1,"pipeline should only contain this request"),s(e))}};kXe.exports=Hbr});var HXe=f((IFn,OXe)=>{"use strict";var pl=B("node:assert"),{pipeline:Wbr}=B("node:stream"),Tr=Ir(),{RequestContentLengthMismatchError:sde,RequestAbortedError:MXe,SocketError:CF,InformationalError:ide}=sn(),{kUrl:a5,kReset:c5,kClient:uR,kRunning:u5,kPending:zbr,kQueue:cC,kPendingIdx:ode,kRunningIdx:kd,kError:Md,kSocket:Bo,kStrictContentLength:jbr,kOnError:ade,kMaxConcurrentStreams:_Xe,kHTTP2Session:Fd,kResume:uC,kSize:Kbr,kHTTPContext:Xbr}=ws(),Mp=Symbol("open streams"),vXe,LXe=!1,A5;try{A5=B("node:http2")}catch{A5={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:Zbr,HTTP2_HEADER_METHOD:$br,HTTP2_HEADER_PATH:ewr,HTTP2_HEADER_SCHEME:twr,HTTP2_HEADER_CONTENT_LENGTH:rwr,HTTP2_HEADER_EXPECT:nwr,HTTP2_HEADER_STATUS:swr}}=A5;function iwr(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}async function owr(t,e){t[Bo]=e,LXe||(LXe=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=A5.connect(t[a5],{createConnection:()=>e,peerMaxConcurrentStreams:t[_Xe]});r[Mp]=0,r[uR]=t,r[Bo]=e,Tr.addListener(r,"error",Awr),Tr.addListener(r,"frameError",cwr),Tr.addListener(r,"end",uwr),Tr.addListener(r,"goaway",lwr),Tr.addListener(r,"close",function(){let{[uR]:s}=this,{[Bo]:i}=s,o=this[Bo][Md]||this[Md]||new CF("closed",Tr.getSocketInfo(i));if(s[Fd]=null,s.destroyed){pl(s[zbr]===0);let a=s[cC].splice(s[kd]);for(let A=0;A<a.length;A++){let c=a[A];Tr.errorRequest(s,c,o)}}}),r.unref(),t[Fd]=r,e[Fd]=r,Tr.addListener(e,"error",function(s){pl(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Md]=s,this[uR][ade](s)}),Tr.addListener(e,"end",function(){Tr.destroy(this,new CF("other side closed",Tr.getSocketInfo(this)))}),Tr.addListener(e,"close",function(){let s=this[Md]||new CF("closed",Tr.getSocketInfo(this));t[Bo]=null,this[Fd]!=null&&this[Fd].destroy(s),t[ode]=t[kd],pl(t[u5]===0),t.emit("disconnect",t[a5],[t],s),t[uC]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return hwr(t,...s)},resume(){awr(t)},destroy(s,i){n?queueMicrotask(i):e.destroy(s).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function awr(t){let e=t[Bo];e?.destroyed===!1&&(t[Kbr]===0&&t[_Xe]===0?(e.unref(),t[Fd].unref()):(e.ref(),t[Fd].ref()))}function Awr(t){pl(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Bo][Md]=t,this[uR][ade](t)}function cwr(t,e,r){if(r===0){let n=new ide(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Bo][Md]=n,this[uR][ade](n)}}function uwr(){let t=new CF("other side closed",Tr.getSocketInfo(this[Bo]));this.destroy(t),Tr.destroy(this[Bo],t)}function lwr(t){let e=this[Md]||new CF(`HTTP/2: "GOAWAY" frame received with code ${t}`,Tr.getSocketInfo(this)),r=this[uR];if(r[Bo]=null,r[Xbr]=null,this[Fd]!=null&&(this[Fd].destroy(e),this[Fd]=null),Tr.destroy(this[Bo],e),r[kd]<r[cC].length){let n=r[cC][r[kd]];r[cC][r[kd]++]=null,Tr.errorRequest(r,n,e),r[ode]=r[kd]}pl(r[u5]===0),r.emit("disconnect",r[a5],[r],e),r[uC]()}function dwr(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function hwr(t,e){let r=t[Fd],{method:n,path:s,host:i,upgrade:o,expectContinue:a,signal:A,headers:c}=e,{body:u}=e;if(o)return Tr.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let w=0;w<c.length;w+=2){let H=c[w+0],z=c[w+1];if(Array.isArray(z))for(let F=0;F<z.length;F++)l[H]?l[H]+=`,${z[F]}`:l[H]=z[F];else l[H]=z}let d,{hostname:h,port:g}=t[a5];l[Zbr]=i||`${h}${g?`:${g}`:""}`,l[$br]=n;let p=w=>{e.aborted||e.completed||(w=w||new MXe,Tr.errorRequest(t,e,w),d!=null&&Tr.destroy(d,w),Tr.destroy(u,w),t[cC][t[kd]++]=null,t[uC]())};try{e.onConnect(p)}catch(w){Tr.errorRequest(t,e,w)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),d=r.request(l,{endStream:!1,signal:A}),d.id&&!d.pending?(e.onUpgrade(null,null,d),++r[Mp],t[cC][t[kd]++]=null):d.once("ready",()=>{e.onUpgrade(null,null,d),++r[Mp],t[cC][t[kd]++]=null}),d.once("close",()=>{r[Mp]-=1,r[Mp]===0&&r.unref()}),!0;l[ewr]=s,l[twr]="https";let C=n==="PUT"||n==="POST"||n==="PATCH";u&&typeof u.read=="function"&&u.read(0);let m=Tr.bodyLength(u);if(Tr.isFormDataLike(u)){vXe??=oR().extractBody;let[w,H]=vXe(u);l["content-type"]=H,u=w.stream,m=w.length}if(m==null&&(m=e.contentLength),(m===0||!C)&&(m=null),dwr(n)&&m>0&&e.contentLength!=null&&e.contentLength!==m){if(t[jbr])return Tr.errorRequest(t,e,new sde),!1;process.emitWarning(new sde)}m!=null&&(pl(u,"no body must not have content length"),l[rwr]=`${m}`),r.ref();let I=n==="GET"||n==="HEAD"||u===null;return a?(l[nwr]="100-continue",d=r.request(l,{endStream:I,signal:A})
Line truncated
|
||||
`,this[_wr]=A??3e5,this[Pwr]=s??3e5,this[Owr]=I??!0,this[Hwr]=w,this[lde]=z,this[dC]=null,this[Vwr]=W>-1?W:-1,this[zwr]=oe??100,this[Qi]=null,this[vd]=[],this[Lp]=0,this[Ld]=0,this[yF]=he=>hde(this,he),this[Wwr]=he=>$Xe(this,he)}get pipelining(){return this[g5]}set pipelining(e){this[g5]=e,this[yF](!0)}get[NF](){return this[vd].length-this[Ld]}get[wF](){return this[Ld]-this[Lp]}get[bF](){return this[vd].length-this[Lp]}get[Twr](){return!!this[Qi]&&!this[dR]&&!this[Qi].destroyed}get[ude](){return!!(this[Qi]?.busy(null)||this[bF]>=(ZXe(this)||1)||this[NF]>0)}[xwr](e){eZe(this),this.once("connect",e)}[Jwr](e,r){let n=e.origin||this[Eg].origin,s=new bwr(n,e,r);return this[vd].push(s),this[O0]||(_0.bodyLength(s.body)==null&&_0.isIterable(s.body)?(this[O0]=1,queueMicrotask(()=>hde(this))):this[yF](!0)),this[O0]&&this[hC]!==2&&this[ude]&&(this[hC]=2),this[hC]<2}async[Gwr](){return new Promise(e=>{this[bF]?this[dC]=e:e(null)})}async[Ywr](e){return new Promise(r=>{let n=this[vd].splice(this[Ld]);for(let i=0;i<n.length;i++){let o=n[i];_0.errorRequest(this,o,e)}let s=()=>{this[dC]&&(this[dC](),this[dC]=null),r(null)};this[Qi]?(this[Qi].destroy(e,s),this[Qi]=null):queueMicrotask(s),this[yF]()})}},Xwr=h5();function $Xe(t,e){if(t[wF]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){vp(t[Ld]===t[Lp]);let r=t[vd].splice(t[Lp]);for(let n=0;n<r.length;n++){let s=r[n];_0.errorRequest(t,s,e)}vp(t[bF]===0)}}async function eZe(t){vp(!t[dR]),vp(!t[Qi]);let{host:e,hostname:r,protocol:n,port:s}=t[Eg];if(r[0]==="["){let i=r.indexOf("]");vp(i!==-1);let o=r.substring(1,i);vp(XXe.isIP(o)),r=o}t[dR]=!0,lR.beforeConnect.hasSubscribers&&lR.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Qi]?.version,servername:t[lC],localAddress:t[QF]},connector:t[BF]});try{let i=await new Promise((o,a)=>{t[BF]({host:e,hostname:r,protocol:n,port:s,servername:t[lC],localAddress:t[QF]},(A,c)=>{A?a(A):o(c)})});if(t.destroyed){_0.destroy(i.on("error",jXe),new Swr);return}vp(i);try{t[Qi]=i.alpnProtocol==="h2"?await Kwr(t,i):await jwr(t,i)}catch(o){throw i.destroy().on("error",jXe),o}t[dR]=!1,i[qwr]=0,i[lde]=t[lde],i[Dwr]=t,i[Fwr]=null,lR.connected.hasSubscribers&&lR.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Qi]?.version,servername:t[lC],localAddress:t[QF]},connector:t[BF],socket:i}),t.emit("connect",t[Eg],[t])}catch(i){if(t.destroyed)return;if(t[dR]=!1,lR.connectError.hasSubscribers&&lR.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Qi]?.version,servername:t[lC],localAddress:t[QF]},connector:t[BF],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(vp(t[wF]===0);t[NF]>0&&t[vd][t[Ld]].servername===t[lC];){let o=t[vd][t[Ld]++];_0.errorRequest(t,o,i)}else $Xe(t,i);t.emit("connectionError",t[Eg],[t],i)}t[yF]()}function KXe(t){t[hC]=0,t.emit("drain",t[Eg],[t])}function hde(t,e){t[O0]!==2&&(t[O0]=2,Zwr(t,e),t[O0]=0,t[Lp]>256&&(t[vd].splice(0,t[Lp]),t[Ld]-=t[Lp],t[Lp]=0))}function Zwr(t,e){for(;;){if(t.destroyed){vp(t[NF]===0);return}if(t[dC]&&!t[bF]){t[dC](),t[dC]=null;return}if(t[Qi]&&t[Qi].resume(),t[ude])t[hC]=2;else if(t[hC]===2){e?(t[hC]=1,queueMicrotask(()=>KXe(t))):KXe(t);continue}if(t[NF]===0||t[wF]>=(ZXe(t)||1))return;let r=t[vd][t[Ld]];if(t[Eg].protocol==="https:"&&t[lC]!==r.servername){if(t[wF]>0)return;t[lC]=r.servername,t[Qi]?.destroy(new Nwr("servername changed"),()=>{t[Qi]=null,hde(t)})}if(t[dR])return;if(!t[Qi]){eZe(t);return}if(t[Qi].destroyed||t[Qi].busy(r))return;!r.aborted&&t[Qi].write(r)?t[Ld]++:t[vd].splice(t[Ld],1)}}tZe.exports=dde});var gde=f((wFn,rZe)=>{"use strict";var f5=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)}};rZe.exports=class{constructor(){this.head=this.tail=new f5}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new f5),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var sZe=f((NFn,nZe)=>{var{kFree:$wr,kConnected:eNr,kPending:tNr,kQueued:rNr,kRunning:nNr,kSize:sNr}=ws(),H0=Symbol("pool"),fde=class{constructor(e){this[H0]=e}get connected(){return this[H0][eNr]}get free(){return this[H0][$wr]}get pending(){return this[H0][tNr]}get queued(){return this[H0][rNr]}get running(){return this[H0][nNr]}get size(){return this[H0][sNr]}};nZe.exports=fde});var Bde=f((SFn,gZe)=>{"use strict";var iNr=XS(),oNr=gde(),{kConnected:pde,kSize:iZe,kRunning:oZe,kPending:aZe,kQueued:SF,kBusy:aNr,kFree:ANr,kUrl:cNr,kClose:uNr,kDestroy:lNr,kDispatch:dNr}=ws(),hNr=sZe(),tc=Symbol("clients"),rA=Symbol("needDrain"),RF=Symbol("queue"),mde=Symbol("closed resolve"),Ede=Symbol("onDrain"),AZe=Symbol("onConnect"),cZe=Symbol("onDisconnec
Line truncated
|
||||
${n.count} ${n.noun} ${n.is} pending:
|
||||
|
||||
${e.format(r)}
|
||||
`.trim())}};Bet.exports=Bhe});var F5=f((tMn,Net)=>{"use strict";var yet=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:_Rr}=sn(),ORr=fR();wet()===void 0&&bet(new ORr);function bet(t){if(!t||typeof t.dispatch!="function")throw new _Rr("Argument agent must implement Agent");Object.defineProperty(globalThis,yet,{value:t,writable:!0,enumerable:!1,configurable:!1})}function wet(){return globalThis[yet]}Net.exports={setGlobalDispatcher:bet,getGlobalDispatcher:wet}});var M5=f((nMn,Ret)=>{"use strict";Ret.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 xet=f((sMn,Det)=>{"use strict";var HRr=d5();Det.exports=t=>{let e=t?.maxRedirections;return r=>function(s,i){let{maxRedirections:o=e,...a}=s;if(!o)return r(s,i);let A=new HRr(r,o,s,i);return r(a,A)}}});var ket=f((iMn,Tet)=>{"use strict";var qRr=y5();Tet.exports=t=>e=>function(n,s){return e(n,new qRr({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))}});var Met=f((oMn,Fet)=>{"use strict";var GRr=Ir(),{InvalidArgumentError:YRr,RequestAbortedError:JRr}=sn(),VRr=M5(),Qhe=class extends VRr{#e=1024*1024;#t=null;#n=!1;#r=!1;#s=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new YRr("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#o.bind(this))}#o(e){this.#r=!0,this.#i=e}onHeaders(e,r,n,s){let o=GRr.parseHeaders(r)["content-length"];if(o!=null&&o>this.#e)throw new JRr(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,s)}onError(e){this.#n||(e=this.#i??e,this.#a.onError(e))}onData(e){return this.#s=this.#s+e.length,this.#s>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function WRr({maxSize:t}={maxSize:1024*1024}){return e=>function(n,s){let{dumpMaxSize:i=t}=n,o=new Qhe({maxSize:i},s);return e(n,o)}}Fet.exports=WRr});var Uet=f((aMn,Let)=>{"use strict";var{isIP:zRr}=B("node:net"),{lookup:jRr}=B("node:dns"),KRr=M5(),{InvalidArgumentError:wR,InformationalError:XRr}=sn(),vet=Math.pow(2,31)-1,yhe=class{#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#s}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let s=this.#n.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(s==null)this.lookup(e,i,(o,a)=>{if(o||a==null||a.length===0){n(o??new XRr("No DNS entries found"));return}this.setRecords(e,a);let A=this.#n.get(e.hostname),c=this.pick(e,A,i.affinity),u;typeof c.port=="number"?u=`:${c.port}`:e.port!==""?u=`:${e.port}`:u="",n(null,`${e.protocol}//${c.family===6?`[${c.address}]`:c.address}${u}`)});else{let o=this.pick(e,s,i.affinity);if(o==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let a;typeof o.port=="number"?a=`:${o.port}`:e.port!==""?a=`:${e.port}`:a="",n(null,`${e.protocol}//${o.family===6?`[${o.address}]`:o.address}${a}`)}}#r(e,r,n){jRr(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,i)=>{if(s)return n(s);let o=new Map;for(let a of i)o.set(`${a.address}:${a.family}`,a);n(null,o.values())})}#s(e,r,n){let s=null,{records:i,offset:o}=r,a;if(this.dualStack?(n==null&&(o==null||o===vet?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),i[n]!=null&&i[n].ips.length>0?a=i[n]:a=i[n===4?6:4]):a=i[n],a==null||a.ips.length===0)return s;a.offset==null||a.offset===vet?a.offset=0:a.offset++;let A=a.offset%a.ips.length;return s=a.ips[A]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(a.ips.splice(A,1),this.pick(e,r,n)):s}setRecords(e,r){let n=Date.now(),s={records:{4:null,6:null}};for(let i of r){i.timestamp=n,typeof i.ttl=="number"?i.ttl=Math.min(i.ttl,this.#e):i.ttl=this.#e;let o=s.records[i.family]??{ips:[]};o.ips.push(i),s.records[i.family]=o}this.#n.set(e.hostname,s)}getHandler(e,r){return new bhe(this,e,r)}},bhe=class extends KRr{#e=null;#t=null;#n=null;#r=null;#s=null;constructor(e,{origin:r,handler:n,dispatch:s},i){super(n),this.#s=r,this.#r=n,this.#t={...i},this.#e=e,this.#n=s}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#s,this.#t,(r,n)=>
Line truncated
|
||||
${i}`;break;case"retry":pnt(i)&&(r[s]=i);break;case"id":mnt(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&pnt(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&mnt(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}}};Ent.exports={EventSourceStream:cge}});var Snt=f((PMn,Nnt)=>{"use strict";var{pipeline:ikr}=B("node:stream"),{fetching:okr}=HF(),{makeRequest:akr}=RR(),{webidl:Hp}=Wo(),{EventSourceStream:Akr}=Cnt(),{parseMIMEType:ckr}=$A(),{createFastMessageEvent:ukr}=MR(),{isNetworkError:Int}=_F(),{delay:lkr}=age(),{kEnumerableProperty:rQ}=Ir(),{environmentSettingsObject:Bnt}=jc(),Qnt=!1,ynt=3e3,$F=0,bnt=1,eM=2,dkr="anonymous",hkr="use-credentials",_R=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#n=!1;#r=$F;#s=null;#i=null;#a;#o;constructor(e,r={}){super(),Hp.util.markAsUncloneable(this);let n="EventSource constructor";Hp.argumentLengthCheck(arguments,1,n),Qnt||(Qnt=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Hp.converters.USVString(e,n,"url"),r=Hp.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#o={lastEventId:"",reconnectionTime:ynt};let s=Bnt,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(A){throw new DOMException(A,"SyntaxError")}this.#t=i.href;let o=dkr;r.withCredentials&&(o=hkr,this.#n=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=Bnt.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#s=akr(a),this.#A()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#A(){if(this.#r===eM)return;this.#r=$F;let e={request:this.#s,dispatcher:this.#a},r=n=>{Int(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()};e.processResponseEndOfBody=r,e.processResponse=n=>{if(Int(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let s=n.headersList.get("content-type",!0),i=s!==null?ckr(s):"failure",o=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||o===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=bnt,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let a=new Akr({eventSourceSettings:this.#o,push:A=>{this.dispatchEvent(ukr(A.type,A.options))}});ikr(n.body.stream,a,A=>{A?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=okr(e)}async#c(){this.#r!==eM&&(this.#r=$F,this.dispatchEvent(new Event("error")),await lkr(this.#o.reconnectionTime),this.#r===$F&&(this.#o.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#A()))}close(){Hp.brandCheck(this,t),this.#r!==eM&&(this.#r=eM,this.#i.abort(),this.#s=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}},wnt={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:$F,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:bnt,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:eM,writable:!1}};Object.defineProperties(_R,wnt);Object.defineProperties(_R.prototype,wnt);Object.defineProperties(_R.prototype,{close:rQ,onerror:rQ,onmessage:rQ,onopen:rQ,readyState:rQ,url:rQ,withCredentials:rQ});Hp.converters.EventSourceInitDict=Hp.dictionaryConverter([{key:"withCredentials",converter:Hp.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Hp.converters.any}]);Nnt.exports={EventSource:_R,defaultReconnectionTime:ynt}});var uge=f((_Mn,vt)=>{"use strict";var gkr=hR(),Rnt=iF(),fkr=gR(),pkr=yZe(),mkr=fR(),Ekr=Mde(),Ckr=WZe(),Ikr=$Ze(),Dnt=sn(),Q6=Ir(),{InvalidArgumentError:B6}=Dnt,OR=_$e(),Bkr=aF(),Qkr=fhe(),ykr=Qet(),bkr=Ehe(),wkr=rhe(),Nkr=y5(),{getGlobalDispatcher:xnt,setGlobalDispatcher:Skr}=F5(),Rkr=M5(),Dkr=d5(),xkr=h5();Object.assign(Rnt.prototype,OR);vt.exports.Dispatcher=Rnt;vt.exports.Client=gkr;vt.exports.Pool=fkr;vt.exports.BalancedPool=pkr;vt.exports.Agent=mkr;vt.exports.ProxyAgent=Ekr;vt.exports.EnvHttpProxyAgent=Ckr;vt.
Line truncated
|
||||
`)+4,e.outputData[0].data=e._header+s.substring(n),TC("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(TC("Creating `tls.Socket`: %o",this.connectOpts),i=NDt.connect(this.connectOpts)):(TC("Creating `net.Socket`: %o",this.connectOpts),i=SDt.connect(this.connectOpts)),await(0,RDt.once)(i,"connect"),i}};cF.protocols=["http","https"];Ua.HttpProxyAgent=cF;function xDt(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var H1e=E(yF=>{"use strict";Object.defineProperty(yF,"__esModule",{value:!0});yF.state=void 0;yF.state={instrumenterImplementation:void 0}});var nDe=E(DF=>{"use strict";Object.defineProperty(DF,"__esModule",{value:!0});DF.state=void 0;DF.state={operationRequestMap:new WeakMap}});var dTe=E((K_r,yFt)=>{yFt.exports={name:"@actions/cache",version:"6.0.0",description:"Actions cache lib",keywords:["github","actions","cache"],homepage:"https://github.com/actions/toolkit/tree/main/packages/cache",license:"MIT",type:"module",main:"lib/cache.js",types:"lib/cache.d.ts",exports:{".":{types:"./lib/cache.d.ts",import:"./lib/cache.js"}},directories:{lib:"lib",test:"__tests__"},files:["lib","!.DS_Store"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/actions/toolkit.git",directory:"packages/cache"},scripts:{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json",test:'echo "Error: run tests from root" && exit 1',tsc:"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},bugs:{url:"https://github.com/actions/toolkit/issues"},dependencies:{"@actions/core":"^3.0.0","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.0","@actions/io":"^3.0.0","@azure/core-rest-pipeline":"^1.22.0","@azure/storage-blob":"^12.30.0","@protobuf-ts/runtime-rpc":"^2.11.1",semver:"^7.7.3"},devDependencies:{"@protobuf-ts/plugin":"^2.9.4","@types/node":"^25.1.0","@types/semver":"^7.7.1",typescript:"^5.2.2"},overrides:{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}});var fTe=E((Z_r,hTe)=>{var bFt=dTe();hTe.exports={version:bFt.version}});var ZM=E(ZC=>{"use strict";Object.defineProperty(ZC,"__esModule",{value:!0});ZC.isJsonObject=ZC.typeofJsonValue=void 0;function FFt(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}ZC.typeofJsonValue=FFt;function MFt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}ZC.isJsonObject=MFt});var $M=E(XC=>{"use strict";Object.defineProperty(XC,"__esModule",{value:!0});XC.base64encode=XC.base64decode=void 0;var fd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),XM=[];for(let t=0;t<fd.length;t++)XM[fd[t].charCodeAt(0)]=t;XM[45]=fd.indexOf("+");XM[95]=fd.indexOf("/");function UFt(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let r=new Uint8Array(e),s=0,n=0,i,o=0;for(let a=0;a<t.length;a++){if(i=XM[t.charCodeAt(a)],i===void 0)switch(t[a]){case"=":n=0;case`
|
||||
`: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)}XC.base64decode=UFt;function vFt(t){let e="",r=0,s,n=0;for(let i=0;i<t.length;i++)switch(s=t[i],r){case 0:e+=fd[s>>2],n=(s&3)<<4,r=1;break;case 1:e+=fd[n|s>>4],n=(s&15)<<2,r=2;break;case 2:e+=fd[n|s>>6],e+=fd[s&63],r=0;break}return r&&(e+=fd[n],e+="=",r==1&&(e+="=")),e}XC.base64encode=vFt});var CTe=E(eU=>{"use strict";Object.defineProperty(eU,"__esModule",{value:!0});eU.utf8read=void 0;var s7=t=>String.fromCharCode.apply(String,t);function LFt(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(s7(s)),n=0);return r.length?(n&&r.push(s7(s.slice(0,n))),r.join("")):s7(s.slice(0,n))}eU.utf8read=LFt});var cS=E(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.WireType=Nu.mergeBinaryOptions=Nu.UnknownFieldHandler=void 0;var _Ft;(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])})(_Ft=Nu.UnknownFieldHandler||(Nu.UnknownFieldHandler={}));function PFt(t,e){return Object.assign(Object.assign({},t),e)}Nu.mergeBinaryOptions=PFt;var OFt;(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"})(OFt=Nu.WireType||(Nu.WireType={}))});var rU=E(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.varint32read=to.varint32write=to.int64toString=to.int64fromString=to.varint64write=to.varint64read=void 0;function HFt(){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")}to.varint64read=HFt;function GFt(t,e,r){for(let i=0;i<28;i=i+7){let o=t>>>i,a=!(!(o>>>7)&&e==0),A=(a?o|128:o)&255;if(r.push(A),!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),A=(a?o|128:o)&255;if(r.push(A),!a)return}r.push(e>>>31&1)}}to.varint64write=GFt;var tU=65536*65536;function YFt(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,s=0,n=0;function i(o,a){let A=Number(t.slice(o,a));n*=r,s=s*r+A,s>=tU&&(n=n+(s/tU|0),s=s%tU)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,s,n]}to.int64fromString=YFt;function qFt(t,e){if(e>>>0<=2097151)return""+(tU*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,A=1e7;i>=A&&(o+=Math.floor(i/A),i%=A),o>=A&&(a+=Math.floor(o/A),o%=A);function c(u,l){let d=u?String(u):"";return l?"0000000".slice(d.length)+d:d}return c(a,0)+c(o,a)+c(i,1)}to.int64toString=qFt;function VFt(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)}}to.varint32write=VFt;function JFt(){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}to.varint32read=JFt});var Xh=E(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});Zh.PbLong=Zh.PbULong=Zh.detectBi=void 0;var uS=rU(),br;function ITe(){let t=new DataView(new ArrayBuffer(8));br=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}Zh.detectBi=ITe;ITe();function BTe(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var QTe=/^-?[0-9]+$/,nU=4294967296,sU=2147483648,iU=c
Line truncated
|
||||
`)}};RU.RpcError=T7});var k7=E(xU=>{"use strict";Object.defineProperty(xU,"__esModule",{value:!0});xU.mergeRpcOptions=void 0;var XTe=Ct();function fUt(t,e){if(!e)return t;let r={};TU(t,r),TU(e,r);for(let s of Object.keys(e)){let n=e[s];switch(s){case"jsonOptions":r.jsonOptions=XTe.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=XTe.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},TU(t.meta,r.meta),TU(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(n):n.concat();break}}return r}xU.mergeRpcOptions=fUt;function TU(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 M7=E(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});Gp.Deferred=Gp.DeferredState=void 0;var Tu;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(Tu=Gp.DeferredState||(Gp.DeferredState={}));var F7=class{constructor(e=!0){this._state=Tu.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!==Tu.PENDING)throw new Error(`cannot resolve ${Tu[this.state].toLowerCase()}`);this._resolve(e),this._state=Tu.RESOLVED}reject(e){if(this.state!==Tu.PENDING)throw new Error(`cannot reject ${Tu[this.state].toLowerCase()}`);this._reject(e),this._state=Tu.REJECTED}resolvePending(e){this._state===Tu.PENDING&&this.resolve(e)}rejectPending(e){this._state===Tu.PENDING&&this.reject(e)}};Gp.Deferred=F7});var v7=E(kU=>{"use strict";Object.defineProperty(kU,"__esModule",{value:!0});kU.RpcOutputStreamController=void 0;var $Te=M7(),Yp=Ct(),U7=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){Yp.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){Yp.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){Yp.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(){Yp.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;Yp.assert(e,"bad state"),Yp.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 $Te.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let s=r.p;Yp.assert(s.state==$Te.DeferredState.PENDING,"iterator contract broken"),"value"in e?s.resolve(e):s.reject(e),delete r.p}else r.q.push(e)}};kU.RpcOutputStreamController=U7});var _7=E(iI=>{"use strict";var gUt=iI&&iI.__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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})};Object.defineProperty(iI,"__esModule",{value:!0});iI.UnaryCall=void 0;var L7=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 gUt(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}})}};iI.UnaryCall=L7});var O7=E(oI=>{"use strict";var pUt=oI&&oI.__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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})};Object.defineProperty(oI,"__esModule",{value:!0});oI.ServerStreamingCall=void 0;var P7=class{constructor(e
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 Rut=f(Sut=>{"use strict";var Qme=Zp().Buffer;Sut._dbcs=$p;var jo=-1,Nut=-2,Ml=-10,AA=-1e3,gD=new Array(256),ev=-1;for(xJ=0;xJ<256;xJ++)gD[xJ]=jo;var xJ;function $p(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]=gD.slice(0),this.decodeTableSeq=[];for(var n=0;n<r.length;n++)this._addDecodeChunk(r[n]);if(typeof t.gb18030=="function"){this.gb18030=t.gb18030();var s=this.decodeTables.length;this.decodeTables.push(gD.slice(0));var i=this.decodeTables.length;this.decodeTables.push(gD.slice(0));for(var o=this.decodeTables[0],n=129;n<=254;n++)for(var a=this.decodeTables[AA-o[n]],A=48;A<=57;A++){if(a[A]===jo)a[A]=AA-s;else if(a[A]>AA)throw new Error("gb18030 decode tables conflict at byte 2");for(var c=this.decodeTables[AA-a[A]],u=129;u<=254;u++){if(c[u]===jo)c[u]=AA-i;else{if(c[u]===AA-i)continue;if(c[u]>AA)throw new Error("gb18030 decode tables conflict at byte 3")}for(var l=this.decodeTables[AA-c[u]],d=48;d<=57;d++)l[d]===jo&&(l[d]=Nut)}}}this.defaultCharUnicode=e.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var h={};if(t.encodeSkipVals)for(var n=0;n<t.encodeSkipValLine truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}function S4r(t){let e=(t.headersList.get("referrer-policy",!0)??"").split(","),r="";if(e.length)for(let n=e.length;n!==0;n--){let s=e[n-1].trim();if(d4r.has(s)){r=s;break}}return r}function R4r(t,e){let r=S4r(e);r!==""&&(t.referrerPolicy=r)}function D4r(){return"allowed"}function x4r(){return"success"}function T4r(){return"success"}function k4r(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function F4r(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&&LEe(t.origin)&&!LEe(RQ(t))&&(e=null);break;case"same-origin":uv(t,RQ(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function BD(t,e){return t}function M4r(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:BD(t.domainLookupStartTime,r),domainLookupEndTime:BD(t.domainLookupEndTime,r),connectionStartTime:BD(t.connectionStartTime,r),connectionEndTime:BD(t.connectionEndTime,r),secureConnectionStartTime:BD(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function v4r(t){return BD(p4r.now(),t)}function L4r(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 sht(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function U4r(t){return{referrerPolicy:t.referrerPolicy}}function P4r(t){let e=t.referrerPolicy;lv(e);let r=null;if(t.referrer==="client"){let i=$dt();if(!i||i.origin==="null")return"no-referrer";r=new URL(i)}else VC.is.URL(t.referrer)&&(r=t.referrer);let n=vEe(r),s=vEe(r,!0);switch(n.toString().length>4096&&(n=s),e){case"no-referrer":return"no-referrer";case"origin":return s??vEe(r,!0);case"unsafe-url":return n;case"strict-origin":{let i=RQ(t);return SQ(n)&&!SQ(i)?"no-referrer":s}case"strict-origin-when-cross-origin":{let i=RQ(t);return uv(n,i)?n:SQ(n)&&!SQ(i)?"no-referrer":s}case"same-origin":return uv(t,n)?n:"no-referrer";case"origin-when-cross-origin":return uv(t,n)?n:s;case"no-referrer-when-downgrade":{let i=RQ(t);return SQ(n)&&!SQ(i)?"no-referrer":n}}}function vEe(t,e=!1){return lv(VC.is.URL(t)),t=new URL(t),Aht(t)?"no-referrer":(t.username="",t.password="",t.hash="",e===!0&&(t.pathname="",t.search=""),t)}var _4r=RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/),O4r=RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/);function iht(t){return t.includes(":")?(t[0]==="["&&t[t.length-1]==="]"&&(t=t.slice(1,-1)),O4r(t)):_4r(t)}function H4r(t){return t==null||t==="null"?!1:(t=new URL(t),!!(t.protocol==="https:"||t.protocol==="wss:"||iht(t.hostname)||t.hostname==="localhost"||t.hostname==="localhost."||t.hostname.endsWith(".localhost")||t.hostname.endsWith(".localhost.")||t.protocol==="file:"))}function SQ(t){return VC.is.URL(t)?t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="blob:"?!0:H4r(t.origin):!1}function q4r(t){}function uv(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function G4r(t){return t.controller.state==="aborted"}function Y4r(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function J4r(t){return E4r[t.toLowerCase()]??t}var V4r=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function oht(t,e,r=0,n=1){class s{#e;#t;#n;constructor(o,a){this.#e=o,this.#t=a,this.#n=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let o=this.#n,a=e(this.#e),A=a.length;if(o>=A)return{value:void 0,done:!0};let{[r]:c,[n]:u}=a[o];this.#n=o+1;let l;switch(this.#t){case"key":l=c;break;case"value":l=u;break;case"key+value":l=[c,u];break}return{value:l,done:!1}}}return delete s.prototype.constructor,Object.setPrototypeOf(s.prototype,V4r),Object.defineProperties(s.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(i,o){return new s(i,o)}}function W4r(t,e,r,n=0,s=1){let i=oht(t,r,n,s),o={keys:{writable:!0,enumerable:!0,configurable:!0,value:function(){return VC.brandCheck(this,e),i(this,"key")}},values:{writable:!0,enumerable:!0,configurable:!0,value:function(){return VC.brandCheck(this,e),i(this,
Line truncated
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"')}else{let o=Ul(a=>JEe(a)&&a!==59,t,e);i=GEe.decode(o)}return{name:n,value:i}}function mYr(t,e){let r=null,n=null,s=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10){if(r===null)throw lc("header name is null");return{name:r,filename:n,contentType:s,encoding:i}}let o=Ul(a=>a!==10&&a!==13&&a!==58,t,e);if(o=YEe(o,!0,!0,a=>a===9||a===32),!cYr.test(o.toString()))throw lc("header name does not match the field-name token production");if(t[e.position]!==58)throw lc("expected :");switch(e.position++,Ul(a=>a===32||a===9,t,e),AYr(o)){case"content-disposition":{if(r=n=null,Ul(A=>JEe(A),t,e).toString("ascii").toLowerCase()!=="form-data")throw lc("expected form-data for content-disposition header");for(;e.position<t.length&&t[e.position]!==13&&t[e.position+1]!==10;){let A=pYr(t,e);if(!A)break;A.name==="name"?r=A.value:A.name==="filename"&&(n=A.value)}if(r===null)throw lc("name attribute is required in content-disposition header");break}case"content-type":{let a=Ul(A=>A!==10&&A!==13,t,e);a=YEe(a,!1,!0,A=>A===9||A===32),s=ght(a);break}case"content-transfer-encoding":{let a=Ul(A=>A!==10&&A!==13,t,e);a=YEe(a,!1,!0,A=>A===9||A===32),i=ght(a);break}default:Ul(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)throw lc("expected CRLF");e.position+=2}}function Ul(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}function YEe(t,e,r,n){let s=0,i=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;i>0&&n(t[i]);)i--;return s===0&&i===t.length-1?t:t.subarray(s,i+1)}function EYr(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}function lc(t){return new TypeError("Failed to parse body as FormData.",{cause:new TypeError(t)})}function CYr(t){return t<=31||t===127}function IYr(t){return t===40||t===41||t===60||t===62||t===64||t===44||t===59||t===58||t===92||t===34||t===47||t===91||t===93||t===63||t===61}function JEe(t){return t<=127&&t!==32&&t!==9&&!CYr(t)&&!IYr(t)}fht.exports={multipartFormDataParser:fYr,validateBoundary:gYr}});var dv=f((pGn,mht)=>{"use strict";function BYr(){let t,e;return{promise:new Promise((n,s)=>{t=n,e=s}),resolve:t,reject:e}}mht.exports={createDeferredPromise:BYr}});var bD=f((mGn,Qht)=>{"use strict";var zEe=Wt(),{ReadableStreamFrom:QYr,readableStreamClose:yYr,fullyReadBody:bYr,extractMimeType:wYr}=au(),{FormData:Eht,setFormDataState:NYr}=eV(),{webidl:jd}=Ko(),VEe=B("node:assert"),{isErrored:WEe,isDisturbed:SYr}=B("node:stream"),{isUint8Array:RYr}=B("node:util/types"),{serializeAMimeType:DYr}=Ll(),{multipartFormDataParser:xYr}=pht(),{createDeferredPromise:TYr}=dv(),{parseJSONFromBytes:kYr}=rm(),{utf8DecodeBytes:FYr}=av(),{runtimeFeatures:MYr}=nm(),vYr=MYr.has("crypto")?B("node:crypto").randomInt:t=>Math.floor(Math.random()*t),tV=new TextEncoder;function LYr(){}var UYr=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!SYr(e)&&!WEe(e)&&e.cancel("Response object has been garbage collected").catch(LYr)});function Iht(t,e=!1){let r=null,n=null;jd.is.ReadableStream(t)?r=t:jd.is.Blob(t)?r=t.stream():r=new ReadableStream({pull(){},start(c){n=c},cancel(){},type:"bytes"}),VEe(jd.is.ReadableStream(r));let s=null,i=null,o=null,a=null;if(typeof t=="string")i=t,a="text/plain;charset=UTF-8";else if(jd.is.URLSearchParams(t))i=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(jd.is.BufferSource(t))i=jd.util.getCopyOfBytesHeldByBufferSource(t);else if(jd.is.FormData(t)){let c=`----formdata-undici-0${`${vYr(1e11)}`.padStart(11,"0")}`,u=`--${c}\r
|
||||
\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 TFe=E(RFe=>{"use strict";var IZ=Qd().Buffer;RFe._dbcs=yd;var xn=-1,DFe=-2,rA=-10,Si=-1e3,UI=new Array(256),tN=-1;for(aL=0;aL<256;aL++)UI[aL]=xn;var aL;function yd(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]=UI.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(UI.slice(0));var i=this.decodeTables.length;this.decodeTables.push(UI.slice(0));for(var o=this.decodeTables[0],s=129;s<=254;s++)for(var a=this.decodeTables[Si-o[s]],A=48;A<=57;A++){if(a[A]===xn)a[A]=Si-n;else if(a[A]>Si)throw new Error("gb18030 decode tables conflict at byte 2");for(var c=this.decodeTables[Si-a[A]],u=129;u<=254;u++){if(c[u]===xn)c[u]=Si-i;else{if(c[u]===Si-i)continue;if(c[u]>Si)throw new Error("gb18030 decode tables conflict at byte 3")}for(var l=this.decodeTables[Si-c[u]],d=48;d<=57;d++)l[d]===xn&&(l[d]=DFe)}}}this.defaultCharUnicode=e.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var h={};if(t.encodeSkipVals)for(var s=0;s<t.encodeSkipValsLine truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}function XHt(t){let e=(t.headersList.get("referrer-policy",!0)??"").split(","),r="";if(e.length)for(let s=e.length;s!==0;s--){let n=e[s-1].trim();if(LHt.has(n)){r=n;break}}return r}function $Ht(t,e){let r=XHt(e);r!==""&&(t.referrerPolicy=r)}function eGt(){return"allowed"}function tGt(){return"success"}function rGt(){return"success"}function sGt(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function nGt(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&&MX(t.origin)&&!MX(lE(t))&&(e=null);break;case"same-origin":lN(t,lE(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function GI(t,e){return t}function iGt(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:GI(t.domainLookupStartTime,r),domainLookupEndTime:GI(t.domainLookupEndTime,r),connectionStartTime:GI(t.connectionStartTime,r),connectionEndTime:GI(t.connectionEndTime,r),secureConnectionStartTime:GI(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function oGt(t){return GI(HHt.now(),t)}function aGt(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 ove(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function AGt(t){return{referrerPolicy:t.referrerPolicy}}function cGt(t){let e=t.referrerPolicy;dN(e);let r=null;if(t.referrer==="client"){let i=tve();if(!i||i.origin==="null")return"no-referrer";r=new URL(i)}else If.is.URL(t.referrer)&&(r=t.referrer);let s=FX(r),n=FX(r,!0);switch(s.toString().length>4096&&(s=n),e){case"no-referrer":return"no-referrer";case"origin":return n??FX(r,!0);case"unsafe-url":return s;case"strict-origin":{let i=lE(t);return uE(s)&&!uE(i)?"no-referrer":n}case"strict-origin-when-cross-origin":{let i=lE(t);return lN(s,i)?s:uE(s)&&!uE(i)?"no-referrer":n}case"same-origin":return lN(t,s)?s:"no-referrer";case"origin-when-cross-origin":return lN(t,s)?s:n;case"no-referrer-when-downgrade":{let i=lE(t);return uE(s)&&!uE(i)?"no-referrer":s}}}function FX(t,e=!1){return dN(If.is.URL(t)),t=new URL(t),uve(t)?"no-referrer":(t.username="",t.password="",t.hash="",e===!0&&(t.pathname="",t.search=""),t)}var uGt=RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/),lGt=RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/);function ave(t){return t.includes(":")?(t[0]==="["&&t[t.length-1]==="]"&&(t=t.slice(1,-1)),lGt(t)):uGt(t)}function dGt(t){return t==null||t==="null"?!1:(t=new URL(t),!!(t.protocol==="https:"||t.protocol==="wss:"||ave(t.hostname)||t.hostname==="localhost"||t.hostname==="localhost."||t.hostname.endsWith(".localhost")||t.hostname.endsWith(".localhost.")||t.protocol==="file:"))}function uE(t){return If.is.URL(t)?t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="blob:"?!0:dGt(t.origin):!1}function hGt(t){}function lN(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function fGt(t){return t.controller.state==="aborted"}function gGt(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function pGt(t){return YHt[t.toLowerCase()]??t}var EGt=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Ave(t,e,r=0,s=1){class n{#e;#t;#r;constructor(o,a){this.#e=o,this.#t=a,this.#r=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let o=this.#r,a=e(this.#e),A=a.length;if(o>=A)return{value:void 0,done:!0};let{[r]:c,[s]:u}=a[o];this.#r=o+1;let l;switch(this.#t){case"key":l=c;break;case"value":l=u;break;case"key+value":l=[c,u];break}return{value:l,done:!1}}}return delete n.prototype.constructor,Object.setPrototypeOf(n.prototype,EGt),Object.defineProperties(n.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(i,o){return new n(i,o)}}function mGt(t,e,r,s=0,n=1){let i=Ave(t,r,s,n),o={keys:{writable:!0,enumerable:!0,configurable:!0,value:function(){return If.brandCheck(this,e),i(this,"key")}},values:{writable:!0,enumerable:!0,configurable:!0,value:function(){return If.brandCheck(this,e),i(this,"value
Line truncated
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"')}else{let o=iA(a=>YX(a)&&a!==59,t,e);i=HX.decode(o)}return{name:s,value:i}}function GGt(t,e){let r=null,s=null,n=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10){if(r===null)throw Ao("header name is null");return{name:r,filename:s,contentType:n,encoding:i}}let o=iA(a=>a!==10&&a!==13&&a!==58,t,e);if(o=GX(o,!0,!0,a=>a===9||a===32),!MGt.test(o.toString()))throw Ao("header name does not match the field-name token production");if(t[e.position]!==58)throw Ao("expected :");switch(e.position++,iA(a=>a===32||a===9,t,e),FGt(o)){case"content-disposition":{if(r=s=null,iA(A=>YX(A),t,e).toString("ascii").toLowerCase()!=="form-data")throw Ao("expected form-data for content-disposition header");for(;e.position<t.length&&t[e.position]!==13&&t[e.position+1]!==10;){let A=HGt(t,e);if(!A)break;A.name==="name"?r=A.value:A.name==="filename"&&(s=A.value)}if(r===null)throw Ao("name attribute is required in content-disposition header");break}case"content-type":{let a=iA(A=>A!==10&&A!==13,t,e);a=GX(a,!1,!0,A=>A===9||A===32),n=pve(a);break}case"content-transfer-encoding":{let a=iA(A=>A!==10&&A!==13,t,e);a=GX(a,!1,!0,A=>A===9||A===32),i=pve(a);break}default:iA(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)throw Ao("expected CRLF");e.position+=2}}function iA(t,e,r){let s=r.position;for(;s<e.length&&t(e[s]);)++s;return e.subarray(r.position,r.position=s)}function GX(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 YGt(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}function Ao(t){return new TypeError("Failed to parse body as FormData.",{cause:new TypeError(t)})}function qGt(t){return t<=31||t===127}function VGt(t){return t===40||t===41||t===60||t===62||t===64||t===44||t===59||t===58||t===92||t===34||t===47||t===91||t===93||t===63||t===61}function YX(t){return t<=127&&t!==32&&t!==9&&!qGt(t)&&!VGt(t)}Eve.exports={multipartFormDataParser:OGt,validateBoundary:PGt}});var hN=E((l6r,Cve)=>{"use strict";function JGt(){let t,e;return{promise:new Promise((s,n)=>{t=s,e=n}),resolve:t,reject:e}}Cve.exports={createDeferredPromise:JGt}});var VI=E((d6r,bve)=>{"use strict";var JX=ct(),{ReadableStreamFrom:WGt,readableStreamClose:zGt,fullyReadBody:jGt,extractMimeType:KGt}=zo(),{FormData:Ive,setFormDataState:ZGt}=xL(),{webidl:dc}=kn(),qX=B("node:assert"),{isErrored:VX,isDisturbed:XGt}=B("node:stream"),{isUint8Array:$Gt}=B("node:util/types"),{serializeAMimeType:e6t}=nA(),{multipartFormDataParser:t6t}=mve(),{createDeferredPromise:r6t}=hN(),{parseJSONFromBytes:s6t}=Sd(),{utf8DecodeBytes:n6t}=AN(),{runtimeFeatures:i6t}=Nd(),o6t=i6t.has("crypto")?B("node:crypto").randomInt:t=>Math.floor(Math.random()*t),kL=new TextEncoder;function a6t(){}var A6t=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!XGt(e)&&!VX(e)&&e.cancel("Response object has been garbage collected").catch(a6t)});function Qve(t,e=!1){let r=null,s=null;dc.is.ReadableStream(t)?r=t:dc.is.Blob(t)?r=t.stream():r=new ReadableStream({pull(){},start(c){s=c},cancel(){},type:"bytes"}),qX(dc.is.ReadableStream(r));let n=null,i=null,o=null,a=null;if(typeof t=="string")i=t,a="text/plain;charset=UTF-8";else if(dc.is.URLSearchParams(t))i=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(dc.is.BufferSource(t))i=dc.util.getCopyOfBytesHeldByBufferSource(t);else if(dc.is.FormData(t)){let c=`----formdata-undici-0${`${o6t(1e11)}`.padStart(11,"0")}`,u=`--${c}\r
|
||||
Content-Disposition: form-data`;let l=m=>m.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),d=m=>m.replace(/\r?\n|\r/g,`\r
|
||||
`),h=[],g=new Uint8Array([13,10]);o=0;let p=!1;for(let[m,I]of t)if(typeof I=="string"){let y=tV.encode(u+`; name="${l(d(m))}"\r
|
||||
`),h=[],f=new Uint8Array([13,10]);o=0;let p=!1;for(let[m,I]of t)if(typeof I=="string"){let Q=kL.encode(u+`; name="${l(d(m))}"\r
|
||||
\r
|
||||
${d(I)}\r
|
||||
`);h.push(y),o+=y.byteLength}else{let y=tV.encode(`${u}; name="${l(d(m))}"`+(I.name?`; filename="${l(I.name)}"`:"")+`\r
|
||||
`);h.push(Q),o+=Q.byteLength}else{let Q=kL.encode(`${u}; name="${l(d(m))}"`+(I.name?`; filename="${l(I.name)}"`:"")+`\r
|
||||
Content-Type: ${I.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);h.push(y,I,g),typeof I.size=="number"?o+=y.byteLength+I.size+g.byteLength:p=!0}let C=tV.encode(`--${c}--\r
|
||||
`);h.push(C),o+=C.byteLength,p&&(o=null),i=t,s=async function*(){for(let m of h)m.stream?yield*m.stream():yield m},a=`multipart/form-data; boundary=${c}`}else if(jd.is.Blob(t))i=t,o=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(zEe.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=jd.is.ReadableStream(t)?t:QYr(t)}return(typeof i=="string"||RYr(i))&&(s=()=>(o=typeof i=="string"?Buffer.byteLength(i):i.length,i)),s!=null&&(async()=>{let c=s(),u=c?.[Symbol.asyncIterator]?.();if(u)for await(let l of u){if(WEe(r))break;l.length&&n.enqueue(new Uint8Array(l))}else c?.length&&!WEe(r)&&n.enqueue(typeof c=="string"?tV.encode(c):new Uint8Array(c));queueMicrotask(()=>yYr(n))})(),[{stream:r,source:i,length:o},a]}function PYr(t,e=!1){return jd.is.ReadableStream(t)&&(VEe(!zEe.isDisturbed(t),"The body has already been consumed."),VEe(!t.locked,"The stream is locked.")),Iht(t,e)}function _Yr(t){let{0:e,1:r}=t.stream.tee();return t.stream=e,{stream:r,length:t.length,source:t.source}}function OYr(t,e){return{blob(){return yD(this,n=>{let s=Cht(e(this));return s===null?s="":s&&(s=DYr(s)),new Blob([n],{type:s})},t,e)},arrayBuffer(){return yD(this,n=>new Uint8Array(n).buffer,t,e)},text(){return yD(this,FYr,t,e)},json(){return yD(this,kYr,t,e)},formData(){return yD(this,n=>{let s=Cht(e(this));if(s!==null)switch(s.essence){case"multipart/form-data":{let i=xYr(n,s),o=new Eht;return NYr(o,i),o}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(n.toString()),o=new Eht;for(let[a,A]of i)o.append(a,A);return o}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t,e)},bytes(){return yD(this,n=>new Uint8Array(n),t,e)}}}function HYr(t,e){Object.assign(t.prototype,OYr(t,e))}function yD(t,e,r,n){try{jd.brandCheck(t,r)}catch(a){return Promise.reject(a)}if(t=n(t),Bht(t))return Promise.reject(new TypeError("Body is unusable: Body has already been read"));let s=TYr(),i=s.reject,o=a=>{try{s.resolve(e(a))}catch(A){i(A)}};return t.body==null?(o(Buffer.allocUnsafe(0)),s.promise):(bYr(t.body,o,i),s.promise)}function Bht(t){let e=t.body;return e!=null&&(e.stream.locked||zEe.isDisturbed(e.stream))}function Cht(t){let e=t.headersList,r=wYr(e);return r==="failure"?null:r}Qht.exports={extractBody:Iht,safelyExtractBody:PYr,cloneBody:_Yr,mixinBody:HYr,streamRegistry:UYr,bodyUnusable:Bht}});var Fht=f((EGn,kht)=>{"use strict";var Lt=B("node:assert"),Pt=Wt(),{channels:yht}=YC(),jEe=Mme(),{RequestContentLengthMismatchError:DQ,ResponseContentLengthMismatchError:qYr,RequestAbortedError:Dht,HeadersTimeoutError:GYr,HeadersOverflowError:YYr,SocketError:fv,InformationalError:wD,BodyTimeoutError:JYr,HTTPParserError:VYr,ResponseExceededMaxSizeError:WYr}=or(),{kUrl:xht,kReset:dc,kClient:rCe,kParser:ai,kBlocking:pv,kRunning:Na,kPending:zYr,kSize:bht,kWriting:zC,kQueue:Kd,kNoRef:hv,kKeepAliveDefaultTimeout:jYr,kHostHeader:KYr,kPendingIdx:XYr,kRunningIdx:Pl,kError:_l,kPipelining:sV,kSocket:ND,kKeepAliveTimeoutValue:oV,kMaxHeadersSize:ZYr,kKeepAliveMaxTimeout:$Yr,kKeepAliveTimeoutThreshold:e5r,kHeadersTimeout:t5r,kBodyTimeout:r5r,kStrictContentLength:ZEe,kMaxRequests:wht,kCounter:n5r,kMaxResponseSize:s5r,kOnError:i5r,kResume:WC,kHTTPContext:Tht,kClosed:$Ee}=Mn(),Fg=Qdt(),o5r=Buffer.alloc(0),rV=Buffer[Symbol.species],a5r=Pt.removeAllListeners,KEe;function A5r(){let t=process.env.JEST_WORKER_ID?QEe():void 0,e,r=process.arch!=="ppc64";if(process.env.UNDICI_NO_WASM_SIMD==="1"?r=!0:process.env.UNDICI_NO_WASM_SIMD==="0"&&(r=!1),r)try{e=new WebAssembly.Module(wdt())}catch{}return e||(e=new WebAssembly.Module(t||QEe())),new WebAssembly.Instance(e,{env:{wasm_on_url:(n,s,i)=>0,wasm_on_status:(n,s,i)=>{Lt(Ki.ptr===n);let o=s-vg+Mg.byteOffset;return Ki.onStatus(new rV(Mg.buffer,o,i))},wasm_on_message_begin:n=>(Lt(Ki.ptr===n),Ki.onMessageBegin()),wasm_on_header_field:(n,s,i)=>{Lt(Ki.ptr===n);let o=s-vg+Mg.byteOffset;return Ki.onHeaderField(new rV(Mg.buffer,o,i))},wasm_on_header_value:(n,s,i)=>{Lt(Ki.ptr===n);let o=s-vg+Mg.byteOffset;return Ki.onHeaderValue(new rV(Mg.buffer,o,i))},wasm_on_headers_complete:(n,s,i,o)=>(Lt(Ki.ptr===n),Ki.onHeadersComplete(s,i===1,o===1)),wasm_on_body:(n,s,i)=>{Lt(Ki.ptr===n);let o=s-vg+Mg.byteOffset;return Ki.onBody(new rV(Mg.buffer,o,i))},wasm_on_message_complete:n=>(Lt(Ki.ptr===n),Ki.onMessageComplete())}})}var XEe=null,Ki=null,Mg=null,nV=0,vg=null,c5r=0,gv=1,SD=2|gv,iV=4|gv,eCe=8|c5r,tCe=class{constructor(e,r,{exports:n}){this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Fg.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=0,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[ZYr],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxRespons
Line truncated
|
||||
`;if(typeof s=="string"?p+=`host: ${s}\r
|
||||
`:p+=t[KYr],i?p+=`connection: upgrade\r
|
||||
`);h.push(Q,I,f),typeof I.size=="number"?o+=Q.byteLength+I.size+f.byteLength:p=!0}let C=kL.encode(`--${c}--\r
|
||||
`);h.push(C),o+=C.byteLength,p&&(o=null),i=t,n=async function*(){for(let m of h)m.stream?yield*m.stream():yield m},a=`multipart/form-data; boundary=${c}`}else if(dc.is.Blob(t))i=t,o=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(JX.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=dc.is.ReadableStream(t)?t:WGt(t)}return(typeof i=="string"||$Gt(i))&&(n=()=>(o=typeof i=="string"?Buffer.byteLength(i):i.length,i)),n!=null&&(async()=>{let c=n(),u=c?.[Symbol.asyncIterator]?.();if(u)for await(let l of u){if(VX(r))break;l.length&&s.enqueue(new Uint8Array(l))}else c?.length&&!VX(r)&&s.enqueue(typeof c=="string"?kL.encode(c):new Uint8Array(c));queueMicrotask(()=>zGt(s))})(),[{stream:r,source:i,length:o},a]}function c6t(t,e=!1){return dc.is.ReadableStream(t)&&(qX(!JX.isDisturbed(t),"The body has already been consumed."),qX(!t.locked,"The stream is locked.")),Qve(t,e)}function u6t(t){let{0:e,1:r}=t.stream.tee();return t.stream=e,{stream:r,length:t.length,source:t.source}}function l6t(t,e){return{blob(){return qI(this,s=>{let n=Bve(e(this));return n===null?n="":n&&(n=e6t(n)),new Blob([s],{type:n})},t,e)},arrayBuffer(){return qI(this,s=>new Uint8Array(s).buffer,t,e)},text(){return qI(this,n6t,t,e)},json(){return qI(this,s6t,t,e)},formData(){return qI(this,s=>{let n=Bve(e(this));if(n!==null)switch(n.essence){case"multipart/form-data":{let i=t6t(s,n),o=new Ive;return ZGt(o,i),o}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(s.toString()),o=new Ive;for(let[a,A]of i)o.append(a,A);return o}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t,e)},bytes(){return qI(this,s=>new Uint8Array(s),t,e)}}}function d6t(t,e){Object.assign(t.prototype,l6t(t,e))}function qI(t,e,r,s){try{dc.brandCheck(t,r)}catch(a){return Promise.reject(a)}if(t=s(t),yve(t))return Promise.reject(new TypeError("Body is unusable: Body has already been read"));let n=r6t(),i=n.reject,o=a=>{try{n.resolve(e(a))}catch(A){i(A)}};return t.body==null?(o(Buffer.allocUnsafe(0)),n.promise):(jGt(t.body,o,i),n.promise)}function yve(t){let e=t.body;return e!=null&&(e.stream.locked||JX.isDisturbed(e.stream))}function Bve(t){let e=t.headersList,r=KGt(e);return r==="failure"?null:r}bve.exports={extractBody:Qve,safelyExtractBody:c6t,cloneBody:u6t,mixinBody:d6t,streamRegistry:A6t,bodyUnusable:yve}});var Uve=E((h6r,Mve)=>{"use strict";var et=B("node:assert"),tt=ct(),{channels:wve}=mf(),WX=kZ(),{RequestContentLengthMismatchError:dE,ResponseContentLengthMismatchError:h6t,RequestAbortedError:xve,HeadersTimeoutError:f6t,HeadersOverflowError:g6t,SocketError:pN,InformationalError:JI,BodyTimeoutError:p6t,HTTPParserError:E6t,ResponseExceededMaxSizeError:m6t}=Et(),{kUrl:kve,kReset:co,kClient:e$,kParser:Cs,kBlocking:EN,kRunning:$n,kPending:C6t,kSize:Sve,kWriting:Qf,kQueue:hc,kNoRef:fN,kKeepAliveDefaultTimeout:I6t,kHostHeader:B6t,kPendingIdx:Q6t,kRunningIdx:oA,kError:aA,kPipelining:UL,kSocket:WI,kKeepAliveTimeoutValue:LL,kMaxHeadersSize:y6t,kKeepAliveMaxTimeout:b6t,kKeepAliveTimeoutThreshold:w6t,kHeadersTimeout:S6t,kBodyTimeout:N6t,kStrictContentLength:KX,kMaxRequests:Nve,kCounter:D6t,kMaxResponseSize:R6t,kOnError:T6t,kResume:Bf,kHTTPContext:Fve,kClosed:ZX}=Br(),Hu=bUe(),x6t=Buffer.alloc(0),FL=Buffer[Symbol.species],k6t=tt.removeAllListeners,zX;function F6t(){let t=process.env.JEST_WORKER_ID?IX():void 0,e,r=process.arch!=="ppc64";if(process.env.UNDICI_NO_WASM_SIMD==="1"?r=!0:process.env.UNDICI_NO_WASM_SIMD==="0"&&(r=!1),r)try{e=new WebAssembly.Module(NUe())}catch{}return e||(e=new WebAssembly.Module(t||IX())),new WebAssembly.Instance(e,{env:{wasm_on_url:(s,n,i)=>0,wasm_on_status:(s,n,i)=>{et(Zs.ptr===s);let o=n-Yu+Gu.byteOffset;return Zs.onStatus(new FL(Gu.buffer,o,i))},wasm_on_message_begin:s=>(et(Zs.ptr===s),Zs.onMessageBegin()),wasm_on_header_field:(s,n,i)=>{et(Zs.ptr===s);let o=n-Yu+Gu.byteOffset;return Zs.onHeaderField(new FL(Gu.buffer,o,i))},wasm_on_header_value:(s,n,i)=>{et(Zs.ptr===s);let o=n-Yu+Gu.byteOffset;return Zs.onHeaderValue(new FL(Gu.buffer,o,i))},wasm_on_headers_complete:(s,n,i,o)=>(et(Zs.ptr===s),Zs.onHeadersComplete(n,i===1,o===1)),wasm_on_body:(s,n,i)=>{et(Zs.ptr===s);let o=n-Yu+Gu.byteOffset;return Zs.onBody(new FL(Gu.buffer,o,i))},wasm_on_message_complete:s=>(et(Zs.ptr===s),Zs.onMessageComplete())}})}var jX=null,Zs=null,Gu=null,ML=0,Yu=null,M6t=0,gN=1,zI=2|gN,vL=4|gN,XX=8|M6t,$X=class{constructor(e,r,{exports:s}){this.llhttp=s,this.ptr=this.llhttp.llhttp_alloc(Hu.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=0,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[y6t],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[R6t]}setTi
Line truncated
|
||||
`;if(typeof n=="string"?p+=`host: ${n}\r
|
||||
`:p+=t[B6t],i?p+=`connection: upgrade\r
|
||||
upgrade: ${i}\r
|
||||
`:t[sV]&&!h[dc]?p+=`connection: keep-alive\r
|
||||
`:t[UL]&&!h[co]?p+=`connection: keep-alive\r
|
||||
`:p+=`connection: close\r
|
||||
`,Array.isArray(c))for(let C=0;C<c.length;C+=2){let m=c[C+0],I=c[C+1];if(Array.isArray(I))for(let y=0;y<I.length;y++)p+=`${m}: ${I[y]}\r
|
||||
`,Array.isArray(c))for(let C=0;C<c.length;C+=2){let m=c[C+0],I=c[C+1];if(Array.isArray(I))for(let Q=0;Q<I.length;Q++)p+=`${m}: ${I[Q]}\r
|
||||
`;else p+=`${m}: ${I}\r
|
||||
`}return yht.sendHeaders.hasSubscribers&&yht.sendHeaders.publish({request:e,headers:p,socket:h}),!A||d===0?Sht(g,null,t,e,h,u,p,l):Pt.isBuffer(A)?Sht(g,A,t,e,h,u,p,l):Pt.isBlobLike(A)?typeof A.stream=="function"?Rht(g,A.stream(),t,e,h,u,p,l):I5r(g,A,t,e,h,u,p,l):Pt.isStream(A)?C5r(g,A,t,e,h,u,p,l):Pt.isIterable(A)?Rht(g,A,t,e,h,u,p,l):Lt(!1),!0}function C5r(t,e,r,n,s,i,o,a){Lt(i!==0||r[Na]===0,"stream body cannot be pipelined");let A=!1,c=new aV({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(g){if(!A)try{!c.write(g)&&this.pause&&this.pause()}catch(p){Pt.destroy(this,p)}},l=function(){A||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!A){let g=new Dht;queueMicrotask(()=>h(g))}},h=function(g){if(!A){if(A=!0,Lt(s.destroyed||s[zC]&&r[Na]<=1),s.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!g)try{c.end()}catch(p){g=p}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?Pt.destroy(e,g):Pt.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),s.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(d)}function Sht(t,e,r,n,s,i,o,a){try{e?Pt.isBuffer(e)&&(Lt(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
`}return wve.sendHeaders.hasSubscribers&&wve.sendHeaders.publish({request:e,headers:p,socket:h}),!A||d===0?Rve(f,null,t,e,h,u,p,l):tt.isBuffer(A)?Rve(f,A,t,e,h,u,p,l):tt.isBlobLike(A)?typeof A.stream=="function"?Tve(f,A.stream(),t,e,h,u,p,l):V6t(f,A,t,e,h,u,p,l):tt.isStream(A)?q6t(f,A,t,e,h,u,p,l):tt.isIterable(A)?Tve(f,A,t,e,h,u,p,l):et(!1),!0}function q6t(t,e,r,s,n,i,o,a){et(i!==0||r[$n]===0,"stream body cannot be pipelined");let A=!1,c=new _L({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(f){if(!A)try{!c.write(f)&&this.pause&&this.pause()}catch(p){tt.destroy(this,p)}},l=function(){A||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!A){let f=new xve;queueMicrotask(()=>h(f))}},h=function(f){if(!A){if(A=!0,et(n.destroyed||n[Qf]&&r[$n]<=1),n.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!f)try{c.end()}catch(p){f=p}c.destroy(f),f&&(f.code!=="UND_ERR_INFO"||f.message!=="reset")?tt.destroy(e,f):tt.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),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(d)}function Rve(t,e,r,s,n,i,o,a){try{e?tt.isBuffer(e)&&(et(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!a&&n.reset!==!1&&(s[dc]=!0)):i===0?s.write(`${o}content-length: 0\r
|
||||
`,"latin1"),n.write(e),n.uncork(),s.onBodySent(e),!a&&s.reset!==!1&&(n[co]=!0)):i===0?n.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(Lt(i===null,"no body must not have content length"),s.write(`${o}\r
|
||||
`,"latin1")),n.onRequestSent(),r[WC]()}catch(A){t(A)}}async function I5r(t,e,r,n,s,i,o,a){Lt(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new DQ;let A=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
`,"latin1"):(et(i===null,"no body must not have content length"),n.write(`${o}\r
|
||||
`,"latin1")),s.onRequestSent(),r[Bf]()}catch(A){t(A)}}async function V6t(t,e,r,s,n,i,o,a){et(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new dE;let A=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(A),s.uncork(),n.onBodySent(A),n.onRequestSent(),!a&&n.reset!==!1&&(s[dc]=!0),r[WC]()}catch(A){t(A)}}async function Rht(t,e,r,n,s,i,o,a){Lt(i!==0||r[Na]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let u=()=>new Promise((d,h)=>{Lt(A===null),s[_l]?h(s[_l]):A=d});s.on("close",c).on("drain",c);let l=new aV({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(s[_l])throw s[_l];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{s.off("close",c).off("drain",c)}}var aV=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[zC]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[_l])throw r[_l];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(s!==null&&o+c>s){if(i[ZEe])throw new DQ;process.emitWarning(new DQ)}r.cork(),o===0&&(!a&&n.reset!==!1&&(r[dc]=!0),s===null?r.write(`${A}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${A}content-length: ${s}\r
|
||||
`,"latin1"),n.write(A),n.uncork(),s.onBodySent(A),s.onRequestSent(),!a&&s.reset!==!1&&(n[co]=!0),r[Bf]()}catch(A){t(A)}}async function Tve(t,e,r,s,n,i,o,a){et(i!==0||r[$n]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let d=A;A=null,d()}}let u=()=>new Promise((d,h)=>{et(A===null),n[aA]?h(n[aA]):A=d});n.on("close",c).on("drain",c);let l=new _L({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(n[aA])throw n[aA];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{n.off("close",c).off("drain",c)}}var _L=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[Qf]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:o,expectsPayload:a,header:A}=this;if(r[aA])throw r[aA];if(r.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(n!==null&&o+c>n){if(i[KX])throw new dE;process.emitWarning(new dE)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[co]=!0),n===null?r.write(`${A}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${A}content-length: ${n}\r
|
||||
\r
|
||||
`,"latin1")),s===null&&r.write(`\r
|
||||
`,"latin1")),n===null&&r.write(`\r
|
||||
${c.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=c;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[ai].timeout&&r[ai].timeoutType===SD&&r[ai].timeout.refresh&&r[ai].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[zC]=!1,e[_l])throw e[_l];if(!e.destroyed){if(s===0?i?e.write(`${o}content-length: 0\r
|
||||
`,"latin1"),this.bytesWritten+=c;let u=r.write(e);return r.uncork(),s.onBodySent(e),u||r[Cs].timeout&&r[Cs].timeoutType===zI&&r[Cs].timeout.refresh&&r[Cs].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:s,bytesWritten:n,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[Qf]=!1,e[aA])throw e[aA];if(!e.destroyed){if(n===0?i?e.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${o}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&s!==r){if(n[ZEe])throw new DQ;process.emitWarning(new DQ)}e[ai].timeout&&e[ai].timeoutType===SD&&e[ai].timeout.refresh&&e[ai].timeout.refresh(),n[WC]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[zC]=!1,e&&(Lt(n[Na]<=1,"pipeline should only contain this request"),s(e))}};kht.exports=u5r});var qht=f((CGn,Hht)=>{"use strict";var Hl=B("node:assert"),{pipeline:B5r}=B("node:stream"),hr=Wt(),{RequestContentLengthMismatchError:oCe,RequestAbortedError:Q5r,SocketError:Iv,InformationalError:jC,InvalidArgumentError:y5r}=or(),{kUrl:Cv,kReset:lV,kClient:Au,kRunning:Bv,kPending:b5r,kQueue:KC,kPendingIdx:ACe,kRunningIdx:Xd,kError:cu,kSocket:_s,kStrictContentLength:w5r,kOnError:RD,kMaxConcurrentStreams:cV,kPingInterval:Mht,kHTTP2Session:im,kHTTP2InitialWindowSize:N5r,kHTTP2ConnectionWindowSize:S5r,kResume:Lg,kSize:R5r,kHTTPContext:cCe,kClosed:aCe,kBodyTimeout:D5r,kEnableConnectProtocol:mv,kRemoteSettings:Ev,kHTTP2Stream:AV,kHTTP2SessionState:uCe}=Mn(),{channels:vht}=YC(),Ol=Symbol("open streams"),Lht,uV;try{uV=B("node:http2")}catch{uV={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:x5r,HTTP2_HEADER_METHOD:Uht,HTTP2_HEADER_PATH:Pht,HTTP2_HEADER_SCHEME:nCe,HTTP2_HEADER_CONTENT_LENGTH:T5r,HTTP2_HEADER_EXPECT:k5r,HTTP2_HEADER_STATUS:sCe,HTTP2_HEADER_PROTOCOL:F5r,NGHTTP2_REFUSED_STREAM:M5r,NGHTTP2_CANCEL:v5r}}=uV;function iCe(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}function L5r(t,e){t[_s]=e;let r=t[N5r],n=t[S5r],s=uV.connect(t[Cv],{createConnection:()=>e,peerMaxConcurrentStreams:t[cV],settings:{enablePush:!1,...r!=null?{initialWindowSize:r}:null}});return t[_s]=e,s[Ol]=0,s[Au]=t,s[_s]=e,s[uCe]={ping:{interval:t[Mht]===0?null:setInterval(O5r,t[Mht],s).unref()}},s[mv]=!1,s[Ev]=!1,n&&hr.addListener(s,"connect",P5r.bind(s,n)),hr.addListener(s,"error",H5r),hr.addListener(s,"frameError",q5r),hr.addListener(s,"end",G5r),hr.addListener(s,"goaway",Y5r),hr.addListener(s,"close",J5r),hr.addListener(s,"remoteSettings",_5r),s.unref(),t[im]=s,e[im]=s,hr.addListener(e,"error",W5r),hr.addListener(e,"end",z5r),hr.addListener(e,"close",V5r),e[aCe]=!1,e.on("close",j5r),{version:"h2",defaultPipelining:1/0,write(i){return X5r(t,i)},resume(){U5r(t)},destroy(i,o){e[aCe]?queueMicrotask(o):e.destroy(i).on("close",o)},get destroyed(){return e.destroyed},busy(i){if(i!=null)if(t[Bv]>0){if(i.idempotent===!1||(i.upgrade==="websocket"||i.method==="CONNECT")&&s[Ev]===!1||hr.bodyLength(i.body)!==0&&(hr.isStream(i.body)||hr.isAsyncIterable(i.body)||hr.isFormDataLike(i.body)))return!0}else return(i.upgrade==="websocket"||i.method==="CONNECT")&&s[Ev]===!1;return!1}}}function U5r(t){let e=t[_s];e?.destroyed===!1&&(t[R5r]===0||t[cV]===0?(e.unref(),t[im].unref()):(e.ref(),t[im].ref()))}function P5r(t){try{typeof this.setLocalWindowSize=="function"&&this.setLocalWindowSize(t)}catch{}}function _5r(t){if(this[Au][cV]=t.maxConcurrentStreams??this[Au][cV],this[Ev]===!0&&this[mv]===!0&&t.enableConnectProtocol===!1){let e=new jC("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441");this[_s][cu]=e,this[Au][RD](e);return}this[mv]=t.enableConnectProtocol??this[mv],this[Ev]=!0,this[Au][Lg]()}function O5r(t){let e=t[uCe];if((t.closed||t.destroyed)&&e.ping.interval!=null){clearInterval(e.ping.interval),e.ping.interval=null;return}t.ping(r.bind(t));function r(n,s){let i=this[Au],o=this[Au];if(n!=null){let a=new jC(`HTTP/2: "PING" errored - type ${n.message}`);o[cu]=a,i[RD](a)}else i.emit("ping",s)}}function H5r(t){Hl(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[_s][cu]=t,this[Au][RD](t)}function q5r(t,e,r){if(r===0){let n=new jC(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[_s][cu]=n,this[Au][RD](n)}}function G5r(){let t=new Iv("other side closed",hr.getSocketInfo(this[_s]));this.destroy(t),hr.destroy(this[_s],t)}function Y5r(t){let e=this[cu]||new Iv(`HTTP/2: "GOAWAY" frame received with code ${t}`,hr.getSocketInfo(this[_s])),r=this[Au];if(r[_s]=null,r[cCe]=null,this.close(),this[im]=null,hr.destroy(this[_s],e),r[Xd]<r[KC].length){let n=r[KC][r[Xd]];r[KC][r[Xd]++]=null,hr.errorRequest(r,n,e),r[ACe]=r[Xd]}Hl(r[Bv]===0),r.emit("disconnect",r[Cv],[r],e),r.emit("connectionError",r[Cv],[r],e),r[Lg]()}function J5r(){let{[Au]:t,[uCe]:e}=this,{[_s]:r}=t,n=this[_s][cu]||this[cu]||new Iv("closed",hr.getSocketInfo(r));if(t[_s]=null,t[cCe]=null,e.ping.interval!=null&&(clearInterval(e.ping.interval),e.ping.interval=null),t.destroyed){Hl(t[b5r]===0);let s=t[KC].splice(t[Xd]);for(let i=0;i<s.length;i++){let o=s[i];hr.errorRequest(t,o,n)}}}function V5r(){let t=this[cu]||new Iv("closed",hr.getSocketInfo(this)),e=this[im][Au];e[_s]=null,e[cCe]=null,this[im]!==null&&this[im].destroy(t),e[ACe]=e[Xd],Hl(e[Bv]===0),e.emit("disconnect",e[Cv],[e],t),e[Lg]()}function W5r(t){Hl(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[cu]=t,this[Au][RD](t)}function z5r(){hr.destroy(this,new Iv("other side closed",hr.getSock
Line truncated
|
||||
`;vht.sendHeaders.publish({request:e,headers:F,socket:n[_s]})}let w=s==="GET"||s==="HEAD"||d===null;A?(h[k5r]="100-continue",g=n.request(h,{endStream:w,signal:c}),g[AV]=!0,g.once("continue",z)):(g=n.request(h,{endStream:w,signal:c}),g[AV]=!0,z()),++n[Ol],g.setTimeout(r);let H=!1;return g.once("response",F=>{let{[sCe]:W,...U}=F;if(e.onResponseStarted(),H=!0,e.aborted){g.removeAllListeners("data");return}e.onHeaders(Number(W),iCe(U),g.resume.bind(g),"")===!1&&g.pause()}),g.on("data",F=>{e.onData(F)===!1&&g.pause()}),g.once("end",()=>{g.removeAllListeners("data"),H?(!e.aborted&&!e.completed&&e.onComplete({}),t[KC][t[Xd]++]=null,t[Lg]()):(m(new jC("HTTP/2: stream half-closed (remote)")),t[KC][t[Xd]++]=null,t[ACe]=t[Xd],t[Lg]())}),g.once("close",()=>{g.removeAllListeners("data"),n[Ol]-=1,n[Ol]===0&&n.unref()}),g.once("error",function(F){g.removeAllListeners("data"),m(F)}),g.once("frameError",(F,W)=>{g.removeAllListeners("data"),m(new jC(`HTTP/2: "frameError" received - type ${F}, code ${W}`))}),g.on("aborted",()=>{g.removeAllListeners("data")}),g.on("timeout",()=>{let F=new jC(`HTTP/2: "stream timeout after ${r}"`);g.removeAllListeners("data"),n[Ol]-=1,n[Ol]===0&&n.unref(),m(F)}),g.once("trailers",F=>{e.aborted||e.completed||e.onComplete(F)}),!0;function z(){!d||y===0?_ht(m,g,null,t,e,t[_s],y,I):hr.isBuffer(d)?_ht(m,g,d,t,e,t[_s],y,I):hr.isBlobLike(d)?typeof d.stream=="function"?Oht(m,g,d.stream(),t,e,t[_s],y,I):$5r(m,g,d,t,e,t[_s],y,I):hr.isStream(d)?Z5r(m,t[_s],I,g,d,t,e,y):hr.isIterable(d)?Oht(m,g,d,t,e,t[_s],y,I):Hl(!1)}}function _ht(t,e,r,n,s,i,o,a){try{r!=null&&hr.isBuffer(r)&&(Hl(o===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),s.onBodySent(r)),a||(i[lV]=!0),s.onRequestSent(),n[Lg]()}catch(A){t(A)}}function Z5r(t,e,r,n,s,i,o,a){Hl(a!==0||i[Bv]===0,"stream body cannot be pipelined");let A=B5r(s,n,u=>{u?(hr.destroy(A,u),t(u)):(hr.removeAllListeners(A),o.onRequestSent(),r||(e[lV]=!0),i[Lg]())});hr.addListener(A,"data",c);function c(u){o.onBodySent(u)}}async function $5r(t,e,r,n,s,i,o,a){Hl(o===r.size,"blob body must have content length");try{if(o!=null&&o!==r.size)throw new oCe;let A=Buffer.from(await r.arrayBuffer());e.cork(),e.write(A),e.uncork(),e.end(),s.onBodySent(A),s.onRequestSent(),a||(i[lV]=!0),n[Lg]()}catch(A){t(A)}}async function Oht(t,e,r,n,s,i,o,a){Hl(o!==0||n[Bv]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let l=A;A=null,l()}}let u=()=>new Promise((l,d)=>{Hl(A===null),i[cu]?d(i[cu]):A=l});e.on("close",c).on("drain",c);try{for await(let l of r){if(i[cu])throw i[cu];let d=e.write(l);s.onBodySent(l),d||await u()}e.end(),s.onRequestSent(),a||(i[lV]=!0),n[Lg]()}catch(l){t(l)}finally{e.off("close",c).off("drain",c)}}Hht.exports=L5r});var tI=f((IGn,Xht)=>{"use strict";var om=B("node:assert"),Wht=B("node:net"),Qv=B("node:http"),xQ=Wt(),{ClientStats:e6r}=aEe(),{channels:DD}=YC(),t6r=udt(),r6r=CD(),{InvalidArgumentError:us,InformationalError:n6r,ClientDestroyedError:s6r}=or(),i6r=ID(),{kUrl:Ug,kServerName:eI,kClient:o6r,kBusy:lCe,kConnect:a6r,kResuming:TQ,kRunning:Nv,kPending:Sv,kSize:yv,kQueue:Zd,kConnected:A6r,kConnecting:xD,kNeedDrain:ZC,kKeepAliveDefaultTimeout:Ght,kHostHeader:c6r,kPendingIdx:$d,kRunningIdx:am,kError:u6r,kPipelining:dV,kKeepAliveTimeoutValue:l6r,kMaxHeadersSize:d6r,kKeepAliveMaxTimeout:h6r,kKeepAliveTimeoutThreshold:g6r,kHeadersTimeout:f6r,kBodyTimeout:p6r,kStrictContentLength:m6r,kConnector:bv,kMaxRequests:dCe,kCounter:E6r,kClose:C6r,kDestroy:I6r,kDispatch:B6r,kLocalAddress:wv,kMaxResponseSize:Q6r,kOnError:y6r,kHTTPContext:bi,kMaxConcurrentStreams:b6r,kHTTP2InitialWindowSize:w6r,kHTTP2ConnectionWindowSize:N6r,kResume:$C,kPingInterval:S6r}=Mn(),R6r=Fht(),D6r=qht(),XC=Symbol("kClosedResolve"),x6r=Qv&&Qv.maxHeaderSize&&Number.isInteger(Qv.maxHeaderSize)&&Qv.maxHeaderSize>0?()=>Qv.maxHeaderSize:()=>{throw new us("http module not available or http.maxHeaderSize invalid")},Yht=()=>{};function zht(t){return t[dV]??t[bi]?.defaultPipelining??1}var hCe=class extends r6r{constructor(e,{maxHeaderSize:r,headersTimeout:n,socketTimeout:s,requestTimeout:i,connectTimeout:o,bodyTimeout:a,idleTimeout:A,keepAlive:c,keepAliveTimeout:u,maxKeepAliveTimeout:l,keepAliveMaxTimeout:d,keepAliveTimeoutThreshold:h,socketPath:g,pipelining:p,tls:C,strictContentLength:m,maxCachedSessions:I,connect:y,maxRequestsPerClient:w,localAddress:H,maxResponseSize:z,autoSelectFamily:F,autoSelectFamilyAttemptTimeout:W,maxConcurrentStreams:U,allowH2:ee,useH2c:oe,initialWindowSize:Z,connectionWindowSize:he,pingInterval:Se}={}){if(c!==void 0)throw new us("unsupported keepAlive, use pipelining=0 instead");if(s!==void 0)throw new us("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(i!==void 0)throw new us("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(A!==void 0)throw new us("unsupported idleTimeout, use keepAliveTimeout instead");if(l!==void 0)throw new us("unsupported maxKeepAliveTimeout, use keepAliveMaxT
Line truncated
|
||||
`,this[p6r]=a??3e5,this[f6r]=n??3e5,this[m6r]=m??!0,this[dCe]=w,this[XC]=null,this[Q6r]=z>-1?z:-1,this[bi]=null,this[b6r]=U??100,this[w6r]=Z??262144,this[N6r]=he??524288,this[S6r]=Se??6e4,this[Zd]=[],this[am]=0,this[$d]=0,this[$C]=Je=>gCe(this,Je),this[y6r]=Je=>jht(this,Je)}get pipelining(){return this[dV]}set pipelining(e){this[dV]=e,this[$C](!0)}get stats(){return new e6r(this)}get[Sv](){return this[Zd].length-this[$d]}get[Nv](){return this[$d]-this[am]}get[yv](){return this[Zd].length-this[am]}get[A6r](){return!!this[bi]&&!this[xD]&&!this[bi].destroyed}get[lCe](){return!!(this[bi]?.busy(null)||this[yv]>=(zht(this)||1)||this[Sv]>0)}[a6r](e){Kht(this),this.once("connect",e)}[B6r](e,r){let n=new t6r(this[Ug].origin,e,r);return this[Zd].push(n),this[TQ]||(xQ.bodyLength(n.body)==null&&xQ.isIterable(n.body)?(this[TQ]=1,queueMicrotask(()=>gCe(this))):this[$C](!0)),this[TQ]&&this[ZC]!==2&&this[lCe]&&(this[ZC]=2),this[ZC]<2}[C6r](){return new Promise(e=>{this[yv]?this[XC]=e:e(null)})}[I6r](e){return new Promise(r=>{let n=this[Zd].splice(this[$d]);for(let i=0;i<n.length;i++){let o=n[i];xQ.errorRequest(this,o,e)}let s=()=>{this[XC]&&(this[XC](),this[XC]=null),r(null)};this[bi]?(this[bi].destroy(e,s),this[bi]=null):queueMicrotask(s),this[$C]()})}};function jht(t,e){if(t[Nv]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){om(t[$d]===t[am]);let r=t[Zd].splice(t[am]);for(let n=0;n<r.length;n++){let s=r[n];xQ.errorRequest(t,s,e)}om(t[yv]===0)}}function Kht(t){om(!t[xD]),om(!t[bi]);let{host:e,hostname:r,protocol:n,port:s}=t[Ug];if(r[0]==="["){let i=r.indexOf("]");om(i!==-1);let o=r.substring(1,i);om(Wht.isIPv6(o)),r=o}t[xD]=!0,DD.beforeConnect.hasSubscribers&&DD.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[bi]?.version,servername:t[eI],localAddress:t[wv]},connector:t[bv]}),t[bv]({host:e,hostname:r,protocol:n,port:s,servername:t[eI],localAddress:t[wv]},(i,o)=>{if(i){Jht(t,i,{host:e,hostname:r,protocol:n,port:s}),t[$C]();return}if(t.destroyed){xQ.destroy(o.on("error",Yht),new s6r),t[$C]();return}om(o);try{t[bi]=o.alpnProtocol==="h2"?D6r(t,o):R6r(t,o)}catch(a){o.destroy().on("error",Yht),Jht(t,a,{host:e,hostname:r,protocol:n,port:s}),t[$C]();return}t[xD]=!1,o[E6r]=0,o[dCe]=t[dCe],o[o6r]=t,o[u6r]=null,DD.connected.hasSubscribers&&DD.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[bi]?.version,servername:t[eI],localAddress:t[wv]},connector:t[bv],socket:o}),t.emit("connect",t[Ug],[t]),t[$C]()})}function Jht(t,e,{host:r,hostname:n,protocol:s,port:i}){if(!t.destroyed){if(t[xD]=!1,DD.connectError.hasSubscribers&&DD.connectError.publish({connectParams:{host:r,hostname:n,protocol:s,port:i,version:t[bi]?.version,servername:t[eI],localAddress:t[wv]},connector:t[bv],error:e}),e.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(om(t[Nv]===0);t[Sv]>0&&t[Zd][t[$d]].servername===t[eI];){let o=t[Zd][t[$d]++];xQ.errorRequest(t,o,e)}else jht(t,e);t.emit("connectionError",t[Ug],[t],e)}}function Vht(t){t[ZC]=0,t.emit("drain",t[Ug],[t])}function gCe(t,e){t[TQ]!==2&&(t[TQ]=2,T6r(t,e),t[TQ]=0,t[am]>256&&(t[Zd].splice(0,t[am]),t[$d]-=t[am],t[am]=0))}function T6r(t,e){for(;;){if(t.destroyed){om(t[Sv]===0);return}if(t[XC]&&!t[yv]){t[XC](),t[XC]=null;return}if(t[bi]&&t[bi].resume(),t[lCe])t[ZC]=2;else if(t[ZC]===2){e?(t[ZC]=1,queueMicrotask(()=>Vht(t))):Vht(t);continue}if(t[Sv]===0||t[Nv]>=(zht(t)||1))return;let r=t[Zd][t[$d]];if(t[Ug].protocol==="https:"&&t[eI]!==r.servername){if(t[Nv]>0)return;t[eI]=r.servername,t[bi]?.destroy(new n6r("servername changed"),()=>{t[bi]=null,gCe(t)})}if(t[xD])return;if(!t[bi]){Kht(t);return}if(t[bi].destroyed||t[bi].busy(r))return;!r.aborted&&t[bi].write(r)?t[$d]++:t[Zd].splice(t[$d],1)}}Xht.exports=hCe});var fCe=f((QGn,Zht)=>{"use strict";var hV=class{bottom=0;top=0;list=new Array(2048).fill(void 0);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)}};Zht.exports=class{constructor(){this.head=this.tail=new hV}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new hV),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next,e.next=null),r}}});var gV=f((yGn,agt)=>{"use strict";var{PoolStats:k6r}=aEe(),F6r=CD(),M6r=fCe(),{kConnected:pCe,kSize:$ht,kRunning:egt,kPending:tgt,kQueued:Rv,kBusy:v6r,kFree:L6r,kUrl:U6r,kClose:P6r,kDestroy:_6r,kDispatch:O6r}=Mn(),Do=Symbol("clients"),cA=Symbol("needDrain"),Dv=Symbol("queue"),mCe=Symbol("closed resolve"),ECe=Symbol("onDrain"),rgt=Symbol("onConnect"),ngt=Symbol("onDisconnect"),sgt=Symbol("onConnectionError"),CCe=Symbol("get dispatcher"),igt=Symbol("add client"),ogt=Symbol("remove client"),ICe=class extends F6r{[Dv]=new M6r;[Rv]=0;[Do]=[];[cA]=!1;[ECe](e,r,n){let s=this[Dv],i=!1;for(;!i;){let o=s.shi
Line truncated
|
||||
`,"latin1"),r!==null&&n!==r){if(s[KX])throw new dE;process.emitWarning(new dE)}e[Cs].timeout&&e[Cs].timeoutType===zI&&e[Cs].timeout.refresh&&e[Cs].timeout.refresh(),s[Bf]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[Qf]=!1,e&&(et(s[$n]<=1,"pipeline should only contain this request"),n(e))}};Mve.exports=U6t});var qve=E((f6r,Yve)=>{"use strict";var cA=B("node:assert"),{pipeline:J6t}=B("node:stream"),It=ct(),{RequestContentLengthMismatchError:n$,RequestAbortedError:W6t,SocketError:BN,InformationalError:yf,InvalidArgumentError:z6t}=Et(),{kUrl:IN,kReset:GL,kClient:jo,kRunning:QN,kPending:j6t,kQueue:bf,kPendingIdx:o$,kRunningIdx:fc,kError:Ko,kSocket:ns,kStrictContentLength:K6t,kOnError:jI,kMaxConcurrentStreams:OL,kPingInterval:vve,kHTTP2Session:Rd,kHTTP2InitialWindowSize:Z6t,kHTTP2ConnectionWindowSize:X6t,kResume:qu,kSize:$6t,kHTTPContext:a$,kClosed:i$,kBodyTimeout:e5t,kEnableConnectProtocol:mN,kRemoteSettings:CN,kHTTP2Stream:PL,kHTTP2SessionState:A$}=Br(),{channels:Lve}=mf(),AA=Symbol("open streams"),_ve,HL;try{HL=B("node:http2")}catch{HL={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:t5t,HTTP2_HEADER_METHOD:Pve,HTTP2_HEADER_PATH:Ove,HTTP2_HEADER_SCHEME:t$,HTTP2_HEADER_CONTENT_LENGTH:r5t,HTTP2_HEADER_EXPECT:s5t,HTTP2_HEADER_STATUS:r$,HTTP2_HEADER_PROTOCOL:n5t,NGHTTP2_REFUSED_STREAM:i5t,NGHTTP2_CANCEL:o5t}}=HL;function s$(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}function a5t(t,e){t[ns]=e;let r=t[Z6t],s=t[X6t],n=HL.connect(t[IN],{createConnection:()=>e,peerMaxConcurrentStreams:t[OL],settings:{enablePush:!1,...r!=null?{initialWindowSize:r}:null}});return t[ns]=e,n[AA]=0,n[jo]=t,n[ns]=e,n[A$]={ping:{interval:t[vve]===0?null:setInterval(l5t,t[vve],n).unref()}},n[mN]=!1,n[CN]=!1,s&&It.addListener(n,"connect",c5t.bind(n,s)),It.addListener(n,"error",d5t),It.addListener(n,"frameError",h5t),It.addListener(n,"end",f5t),It.addListener(n,"goaway",g5t),It.addListener(n,"close",p5t),It.addListener(n,"remoteSettings",u5t),n.unref(),t[Rd]=n,e[Rd]=n,It.addListener(e,"error",m5t),It.addListener(e,"end",C5t),It.addListener(e,"close",E5t),e[i$]=!1,e.on("close",I5t),{version:"h2",defaultPipelining:1/0,write(i){return Q5t(t,i)},resume(){A5t(t)},destroy(i,o){e[i$]?queueMicrotask(o):e.destroy(i).on("close",o)},get destroyed(){return e.destroyed},busy(i){if(i!=null)if(t[QN]>0){if(i.idempotent===!1||(i.upgrade==="websocket"||i.method==="CONNECT")&&n[CN]===!1||It.bodyLength(i.body)!==0&&(It.isStream(i.body)||It.isAsyncIterable(i.body)||It.isFormDataLike(i.body)))return!0}else return(i.upgrade==="websocket"||i.method==="CONNECT")&&n[CN]===!1;return!1}}}function A5t(t){let e=t[ns];e?.destroyed===!1&&(t[$6t]===0||t[OL]===0?(e.unref(),t[Rd].unref()):(e.ref(),t[Rd].ref()))}function c5t(t){try{typeof this.setLocalWindowSize=="function"&&this.setLocalWindowSize(t)}catch{}}function u5t(t){if(this[jo][OL]=t.maxConcurrentStreams??this[jo][OL],this[CN]===!0&&this[mN]===!0&&t.enableConnectProtocol===!1){let e=new yf("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441");this[ns][Ko]=e,this[jo][jI](e);return}this[mN]=t.enableConnectProtocol??this[mN],this[CN]=!0,this[jo][qu]()}function l5t(t){let e=t[A$];if((t.closed||t.destroyed)&&e.ping.interval!=null){clearInterval(e.ping.interval),e.ping.interval=null;return}t.ping(r.bind(t));function r(s,n){let i=this[jo],o=this[jo];if(s!=null){let a=new yf(`HTTP/2: "PING" errored - type ${s.message}`);o[Ko]=a,i[jI](a)}else i.emit("ping",n)}}function d5t(t){cA(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[ns][Ko]=t,this[jo][jI](t)}function h5t(t,e,r){if(r===0){let s=new yf(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[ns][Ko]=s,this[jo][jI](s)}}function f5t(){let t=new BN("other side closed",It.getSocketInfo(this[ns]));this.destroy(t),It.destroy(this[ns],t)}function g5t(t){let e=this[Ko]||new BN(`HTTP/2: "GOAWAY" frame received with code ${t}`,It.getSocketInfo(this[ns])),r=this[jo];if(r[ns]=null,r[a$]=null,this.close(),this[Rd]=null,It.destroy(this[ns],e),r[fc]<r[bf].length){let s=r[bf][r[fc]];r[bf][r[fc]++]=null,It.errorRequest(r,s,e),r[o$]=r[fc]}cA(r[QN]===0),r.emit("disconnect",r[IN],[r],e),r.emit("connectionError",r[IN],[r],e),r[qu]()}function p5t(){let{[jo]:t,[A$]:e}=this,{[ns]:r}=t,s=this[ns][Ko]||this[Ko]||new BN("closed",It.getSocketInfo(r));if(t[ns]=null,t[a$]=null,e.ping.interval!=null&&(clearInterval(e.ping.interval),e.ping.interval=null),t.destroyed){cA(t[j6t]===0);let n=t[bf].splice(t[fc]);for(let i=0;i<n.length;i++){let o=n[i];It.errorRequest(t,o,s)}}}function E5t(){let t=this[Ko]||new BN("closed",It.getSocketInfo(this)),e=this[Rd][jo];e[ns]=null,e[a$]=null,this[Rd]!==null&&this[Rd].destroy(t),e[o$]=e[fc],cA(e[QN]===0),e.emit("disconnect",e[IN],[e],t),e[qu]()}function m5t(t){cA(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Ko]=t,this[jo][jI](t)}function C5t(){It.destroy(this,new BN("other side closed",It.getSocketInfo(this)))}func
Line truncated
|
||||
`;Lve.sendHeaders.publish({request:e,headers:x,socket:s[ns]})}let b=n==="GET"||n==="HEAD"||d===null;A?(h[s5t]="100-continue",f=s.request(h,{endStream:b,signal:c}),f[PL]=!0,f.once("continue",q)):(f=s.request(h,{endStream:b,signal:c}),f[PL]=!0,q()),++s[AA],f.setTimeout(r);let U=!1;return f.once("response",x=>{let{[r$]:P,...F}=x;if(e.onResponseStarted(),U=!0,e.aborted){f.removeAllListeners("data");return}e.onHeaders(Number(P),s$(F),f.resume.bind(f),"")===!1&&f.pause()}),f.on("data",x=>{e.onData(x)===!1&&f.pause()}),f.once("end",()=>{f.removeAllListeners("data"),U?(!e.aborted&&!e.completed&&e.onComplete({}),t[bf][t[fc]++]=null,t[qu]()):(m(new yf("HTTP/2: stream half-closed (remote)")),t[bf][t[fc]++]=null,t[o$]=t[fc],t[qu]())}),f.once("close",()=>{f.removeAllListeners("data"),s[AA]-=1,s[AA]===0&&s.unref()}),f.once("error",function(x){f.removeAllListeners("data"),m(x)}),f.once("frameError",(x,P)=>{f.removeAllListeners("data"),m(new yf(`HTTP/2: "frameError" received - type ${x}, code ${P}`))}),f.on("aborted",()=>{f.removeAllListeners("data")}),f.on("timeout",()=>{let x=new yf(`HTTP/2: "stream timeout after ${r}"`);f.removeAllListeners("data"),s[AA]-=1,s[AA]===0&&s.unref(),m(x)}),f.once("trailers",x=>{e.aborted||e.completed||e.onComplete(x)}),!0;function q(){!d||Q===0?Hve(m,f,null,t,e,t[ns],Q,I):It.isBuffer(d)?Hve(m,f,d,t,e,t[ns],Q,I):It.isBlobLike(d)?typeof d.stream=="function"?Gve(m,f,d.stream(),t,e,t[ns],Q,I):b5t(m,f,d,t,e,t[ns],Q,I):It.isStream(d)?y5t(m,t[ns],I,f,d,t,e,Q):It.isIterable(d)?Gve(m,f,d,t,e,t[ns],Q,I):cA(!1)}}function Hve(t,e,r,s,n,i,o,a){try{r!=null&&It.isBuffer(r)&&(cA(o===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),n.onBodySent(r)),a||(i[GL]=!0),n.onRequestSent(),s[qu]()}catch(A){t(A)}}function y5t(t,e,r,s,n,i,o,a){cA(a!==0||i[QN]===0,"stream body cannot be pipelined");let A=J6t(n,s,u=>{u?(It.destroy(A,u),t(u)):(It.removeAllListeners(A),o.onRequestSent(),r||(e[GL]=!0),i[qu]())});It.addListener(A,"data",c);function c(u){o.onBodySent(u)}}async function b5t(t,e,r,s,n,i,o,a){cA(o===r.size,"blob body must have content length");try{if(o!=null&&o!==r.size)throw new n$;let A=Buffer.from(await r.arrayBuffer());e.cork(),e.write(A),e.uncork(),e.end(),n.onBodySent(A),n.onRequestSent(),a||(i[GL]=!0),s[qu]()}catch(A){t(A)}}async function Gve(t,e,r,s,n,i,o,a){cA(o!==0||s[QN]===0,"iterator body cannot be pipelined");let A=null;function c(){if(A){let l=A;A=null,l()}}let u=()=>new Promise((l,d)=>{cA(A===null),i[Ko]?d(i[Ko]):A=l});e.on("close",c).on("drain",c);try{for await(let l of r){if(i[Ko])throw i[Ko];let d=e.write(l);n.onBodySent(l),d||await u()}e.end(),n.onRequestSent(),a||(i[GL]=!0),s[qu]()}catch(l){t(l)}finally{e.off("close",c).off("drain",c)}}Yve.exports=a5t});var Rf=E((g6r,$ve)=>{"use strict";var Td=B("node:assert"),jve=B("node:net"),yN=B("node:http"),hE=ct(),{ClientStats:w5t}=iX(),{channels:KI}=mf(),S5t=dUe(),N5t=OI(),{InvalidArgumentError:Mr,InformationalError:D5t,ClientDestroyedError:R5t}=Et(),T5t=HI(),{kUrl:Vu,kServerName:Df,kClient:x5t,kBusy:c$,kConnect:k5t,kResuming:fE,kRunning:NN,kPending:DN,kSize:bN,kQueue:gc,kConnected:F5t,kConnecting:ZI,kNeedDrain:Sf,kKeepAliveDefaultTimeout:Vve,kHostHeader:M5t,kPendingIdx:pc,kRunningIdx:xd,kError:U5t,kPipelining:YL,kKeepAliveTimeoutValue:v5t,kMaxHeadersSize:L5t,kKeepAliveMaxTimeout:_5t,kKeepAliveTimeoutThreshold:P5t,kHeadersTimeout:O5t,kBodyTimeout:H5t,kStrictContentLength:G5t,kConnector:wN,kMaxRequests:u$,kCounter:Y5t,kClose:q5t,kDestroy:V5t,kDispatch:J5t,kLocalAddress:SN,kMaxResponseSize:W5t,kOnError:z5t,kHTTPContext:ks,kMaxConcurrentStreams:j5t,kHTTP2InitialWindowSize:K5t,kHTTP2ConnectionWindowSize:Z5t,kResume:Nf,kPingInterval:X5t}=Br(),$5t=Uve(),e9t=qve(),wf=Symbol("kClosedResolve"),t9t=yN&&yN.maxHeaderSize&&Number.isInteger(yN.maxHeaderSize)&&yN.maxHeaderSize>0?()=>yN.maxHeaderSize:()=>{throw new Mr("http module not available or http.maxHeaderSize invalid")},Jve=()=>{};function Kve(t){return t[YL]??t[ks]?.defaultPipelining??1}var l$=class extends N5t{constructor(e,{maxHeaderSize:r,headersTimeout:s,socketTimeout:n,requestTimeout:i,connectTimeout:o,bodyTimeout:a,idleTimeout:A,keepAlive:c,keepAliveTimeout:u,maxKeepAliveTimeout:l,keepAliveMaxTimeout:d,keepAliveTimeoutThreshold:h,socketPath:f,pipelining:p,tls:C,strictContentLength:m,maxCachedSessions:I,connect:Q,maxRequestsPerClient:b,localAddress:U,maxResponseSize:q,autoSelectFamily:x,autoSelectFamilyAttemptTimeout:P,maxConcurrentStreams:F,allowH2:W,useH2c:$,initialWindowSize:ee,connectionWindowSize:ae,pingInterval:Be}={}){if(c!==void 0)throw new Mr("unsupported keepAlive, use pipelining=0 instead");if(n!==void 0)throw new Mr("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(i!==void 0)throw new Mr("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(A!==void 0)throw new Mr("unsupported idleTimeout, use keepAliveTimeout instead");if(l!==void 0)throw new Mr("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout in
Line truncated
|
||||
`,this[H5t]=a??3e5,this[O5t]=s??3e5,this[G5t]=m??!0,this[u$]=b,this[wf]=null,this[W5t]=q>-1?q:-1,this[ks]=null,this[j5t]=F??100,this[K5t]=ee??262144,this[Z5t]=ae??524288,this[X5t]=Be??6e4,this[gc]=[],this[xd]=0,this[pc]=0,this[Nf]=Me=>d$(this,Me),this[z5t]=Me=>Zve(this,Me)}get pipelining(){return this[YL]}set pipelining(e){this[YL]=e,this[Nf](!0)}get stats(){return new w5t(this)}get[DN](){return this[gc].length-this[pc]}get[NN](){return this[pc]-this[xd]}get[bN](){return this[gc].length-this[xd]}get[F5t](){return!!this[ks]&&!this[ZI]&&!this[ks].destroyed}get[c$](){return!!(this[ks]?.busy(null)||this[bN]>=(Kve(this)||1)||this[DN]>0)}[k5t](e){Xve(this),this.once("connect",e)}[J5t](e,r){let s=new S5t(this[Vu].origin,e,r);return this[gc].push(s),this[fE]||(hE.bodyLength(s.body)==null&&hE.isIterable(s.body)?(this[fE]=1,queueMicrotask(()=>d$(this))):this[Nf](!0)),this[fE]&&this[Sf]!==2&&this[c$]&&(this[Sf]=2),this[Sf]<2}[q5t](){return new Promise(e=>{this[bN]?this[wf]=e:e(null)})}[V5t](e){return new Promise(r=>{let s=this[gc].splice(this[pc]);for(let i=0;i<s.length;i++){let o=s[i];hE.errorRequest(this,o,e)}let n=()=>{this[wf]&&(this[wf](),this[wf]=null),r(null)};this[ks]?(this[ks].destroy(e,n),this[ks]=null):queueMicrotask(n),this[Nf]()})}};function Zve(t,e){if(t[NN]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Td(t[pc]===t[xd]);let r=t[gc].splice(t[xd]);for(let s=0;s<r.length;s++){let n=r[s];hE.errorRequest(t,n,e)}Td(t[bN]===0)}}function Xve(t){Td(!t[ZI]),Td(!t[ks]);let{host:e,hostname:r,protocol:s,port:n}=t[Vu];if(r[0]==="["){let i=r.indexOf("]");Td(i!==-1);let o=r.substring(1,i);Td(jve.isIPv6(o)),r=o}t[ZI]=!0,KI.beforeConnect.hasSubscribers&&KI.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[ks]?.version,servername:t[Df],localAddress:t[SN]},connector:t[wN]}),t[wN]({host:e,hostname:r,protocol:s,port:n,servername:t[Df],localAddress:t[SN]},(i,o)=>{if(i){Wve(t,i,{host:e,hostname:r,protocol:s,port:n}),t[Nf]();return}if(t.destroyed){hE.destroy(o.on("error",Jve),new R5t),t[Nf]();return}Td(o);try{t[ks]=o.alpnProtocol==="h2"?e9t(t,o):$5t(t,o)}catch(a){o.destroy().on("error",Jve),Wve(t,a,{host:e,hostname:r,protocol:s,port:n}),t[Nf]();return}t[ZI]=!1,o[Y5t]=0,o[u$]=t[u$],o[x5t]=t,o[U5t]=null,KI.connected.hasSubscribers&&KI.connected.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[ks]?.version,servername:t[Df],localAddress:t[SN]},connector:t[wN],socket:o}),t.emit("connect",t[Vu],[t]),t[Nf]()})}function Wve(t,e,{host:r,hostname:s,protocol:n,port:i}){if(!t.destroyed){if(t[ZI]=!1,KI.connectError.hasSubscribers&&KI.connectError.publish({connectParams:{host:r,hostname:s,protocol:n,port:i,version:t[ks]?.version,servername:t[Df],localAddress:t[SN]},connector:t[wN],error:e}),e.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Td(t[NN]===0);t[DN]>0&&t[gc][t[pc]].servername===t[Df];){let o=t[gc][t[pc]++];hE.errorRequest(t,o,e)}else Zve(t,e);t.emit("connectionError",t[Vu],[t],e)}}function zve(t){t[Sf]=0,t.emit("drain",t[Vu],[t])}function d$(t,e){t[fE]!==2&&(t[fE]=2,r9t(t,e),t[fE]=0,t[xd]>256&&(t[gc].splice(0,t[xd]),t[pc]-=t[xd],t[xd]=0))}function r9t(t,e){for(;;){if(t.destroyed){Td(t[DN]===0);return}if(t[wf]&&!t[bN]){t[wf](),t[wf]=null;return}if(t[ks]&&t[ks].resume(),t[c$])t[Sf]=2;else if(t[Sf]===2){e?(t[Sf]=1,queueMicrotask(()=>zve(t))):zve(t);continue}if(t[DN]===0||t[NN]>=(Kve(t)||1))return;let r=t[gc][t[pc]];if(t[Vu].protocol==="https:"&&t[Df]!==r.servername){if(t[NN]>0)return;t[Df]=r.servername,t[ks]?.destroy(new D5t("servername changed"),()=>{t[ks]=null,d$(t)})}if(t[ZI])return;if(!t[ks]){Xve(t);return}if(t[ks].destroyed||t[ks].busy(r))return;!r.aborted&&t[ks].write(r)?t[pc]++:t[gc].splice(t[pc],1)}}$ve.exports=l$});var h$=E((E6r,eLe)=>{"use strict";var qL=class{bottom=0;top=0;list=new Array(2048).fill(void 0);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)}};eLe.exports=class{constructor(){this.head=this.tail=new qL}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new qL),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next,e.next=null),r}}});var VL=E((m6r,cLe)=>{"use strict";var{PoolStats:s9t}=iX(),n9t=OI(),i9t=h$(),{kConnected:f$,kSize:tLe,kRunning:rLe,kPending:sLe,kQueued:RN,kBusy:o9t,kFree:a9t,kUrl:A9t,kClose:c9t,kDestroy:u9t,kDispatch:l9t}=Br(),Qn=Symbol("clients"),Ni=Symbol("needDrain"),TN=Symbol("queue"),g$=Symbol("closed resolve"),p$=Symbol("onDrain"),nLe=Symbol("onConnect"),iLe=Symbol("onDisconnect"),oLe=Symbol("onConnectionError"),E$=Symbol("get dispatcher"),aLe=Symbol("add client"),ALe=Symbol("remove client"),m$=class extends n9t{[TN]=new i9t;[RN]=0;[Qn]=[];[Ni]=!1;[p$](e,r,s){let n=this[TN],i=!1;for(;!i;){let o=n.shift();if(!o)break;th
Line truncated
|
||||
|
||||
${e.format(r)}`.trim():`${r.length} interceptors are pending:
|
||||
|
||||
${e.format(r)}`.trim())}};ppt.exports=kIe});var MIe=f((XGn,Ipt)=>{"use strict";var{InvalidArgumentError:CVr}=or(),{runtimeFeatures:IVr}=nm();function BVr(t={}){let{ignoreHeaders:e=[],excludeHeaders:r=[],matchHeaders:n=[],caseSensitive:s=!1}=t;return{ignore:new Set(e.map(i=>s?i:i.toLowerCase())),exclude:new Set(r.map(i=>s?i:i.toLowerCase())),match:new Set(n.map(i=>s?i:i.toLowerCase()))}}var mpt=IVr.has("crypto")?B("node:crypto"):null,QVr=mpt?.hash?t=>mpt.hash("sha256",t,"base64url"):t=>Buffer.from(t).toString("base64url");function Cpt(t){return Array.isArray(t)&&(t.length&1)===0}function yVr(t=[]){return t.length===0?()=>!1:function(r){let n;for(let s of t)if(typeof s=="string"){if(n||(n=r.toLowerCase()),n.includes(s.toLowerCase()))return!0}else if(s instanceof RegExp&&s.test(r))return!0;return!1}}function bVr(t){let e={};if(!t)return e;if(Cpt(t)){for(let r=0;r<t.length;r+=2){let n=t[r],s=t[r+1];if(n&&s!==void 0){let i=Buffer.isBuffer(n)?n.toString():n,o=Buffer.isBuffer(s)?s.toString():s;e[i.toLowerCase()]=o}}return e}if(t&&typeof t=="object")for(let[r,n]of Object.entries(t))r&&typeof r=="string"&&(e[r.toLowerCase()]=Array.isArray(n)?n.join(", "):String(n));return e}var Ept=["record","playback","update"];function wVr(t){if(!Ept.includes(t))throw new CVr(`Invalid snapshot mode: ${t}. Must be one of: ${Ept.join(", ")}`)}Ipt.exports={createHeaderFilters:BVr,hashId:QVr,isUndiciHeaders:Cpt,normalizeHeaders:bVr,isUrlExcludedFactory:yVr,validateSnapshotMode:wVr}});var Dpt=f((ZGn,Rpt)=>{"use strict";var{writeFile:NVr,readFile:SVr,mkdir:RVr}=B("node:fs/promises"),{dirname:DVr,resolve:Bpt}=B("node:path"),{setTimeout:xVr,clearTimeout:Qpt}=B("node:timers"),{InvalidArgumentError:ypt,UndiciError:TVr}=or(),{hashId:kVr,isUrlExcludedFactory:FVr,normalizeHeaders:bpt,createHeaderFilters:wpt}=MIe();function Hv(t,e,r={}){let n=new URL(t.path,t.origin),s=t._normalizedHeaders||bpt(t.headers);return t._normalizedHeaders||(t._normalizedHeaders=s),{method:t.method||"GET",url:r.matchQuery!==!1?n.toString():`${n.origin}${n.pathname}`,headers:Npt(s,e,r),body:r.matchBody!==!1&&t.body?String(t.body):""}}function Npt(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,s={},{ignore:i,exclude:o,match:a}=e;for(let[A,c]of Object.entries(t)){let u=n?A:A.toLowerCase();o.has(u)||i.has(u)||a.size!==0&&!a.has(u)||(s[u]=c)}return s}function Spt(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,s={},{exclude:i}=e;for(let[o,a]of Object.entries(t)){let A=n?o:o.toLowerCase();i.has(A)||(s[A]=a)}return s}function qv(t){let e=[t.method,t.url];if(t.headers&&typeof t.headers=="object"){let n=Object.keys(t.headers).sort();for(let s of n){let i=Array.isArray(t.headers[s])?t.headers[s]:[t.headers[s]];e.push(s);for(let o of i.sort())e.push(String(o))}}e.push(t.body);let r=e.join("|");return kVr(r)}var vIe=class{#e;#t;#n=new Map;#r;#s=1/0;#i=!1;#a;constructor(e={}){this.#r=e.snapshotPath,this.#s=e.maxSnapshots||1/0,this.#i=e.autoFlush||!1,this.flushInterval=e.flushInterval||3e4,this._flushTimer=null,this.matchOptions={matchHeaders:e.matchHeaders||[],ignoreHeaders:e.ignoreHeaders||[],excludeHeaders:e.excludeHeaders||[],matchBody:e.matchBody!==!1,matchQuery:e.matchQuery!==!1,caseSensitive:e.caseSensitive||!1},this.#a=wpt(this.matchOptions),this.shouldRecord=e.shouldRecord||(()=>!0),this.shouldPlayback=e.shouldPlayback||(()=>!0),this.#t=FVr(e.excludeUrls),this.#i&&this.#r&&this.#o()}async record(e,r){if(!this.shouldRecord(e)||this.isUrlExcluded(e))return;let n=Hv(e,this.#a,this.matchOptions),s=qv(n),i=bpt(r.headers),o={statusCode:r.statusCode,headers:Spt(i,this.#a,this.matchOptions),body:Buffer.isBuffer(r.body)?r.body.toString("base64"):Buffer.from(String(r.body||"")).toString("base64"),trailers:r.trailers};if(this.#n.size>=this.#s&&!this.#n.has(s)){let A=this.#n.keys().next().value;this.#n.delete(A)}let a=this.#n.get(s);a&&a.responses?(a.responses.push(o),a.timestamp=new Date().toISOString()):this.#n.set(s,{request:n,responses:[o],callCount:0,timestamp:new Date().toISOString()}),this.#i&&this.#r&&this.#c()}isUrlExcluded(e){let r=new URL(e.path,e.origin).toString();return this.#t(r)}findSnapshot(e){if(!this.shouldPlayback(e)||this.isUrlExcluded(e))return;let r=Hv(e,this.#a,this.matchOptions),n=qv(r),s=this.#n.get(n);if(!s)return;let i=s.callCount||0,o=Math.min(i,s.responses.length-1);return s.callCount=i+1,{...s,response:s.responses[o]}}async loadSnapshots(e){let r=e||this.#r;if(!r)throw new ypt("Snapshot path is required");try{let n=await SVr(Bpt(r),"utf8"),s=JSON.parse(n);if(Array.isArray(s)){this.#n.clear();for(let{hash:i,snapshot:o}of s)this.#n.set(i,o)}else this.#n=new Map(Object.entries(s))}catch(n){if(n.code==="ENOENT")this.#n.clear();else throw new TVr(`Failed to load snapshots from ${r}`,{cause:n})}}async saveSnapshots(e){let r=e||this.#r;if(!r)throw new ypt("Snapshot path is required");let n=Bpt(r);await RVr(DVr(n),{recursive:!0});let s=Array.from(this.#n.entries()).map(([i,o])=>({hash:i,snapshot:o}));await NVr(n,JS
Line truncated
|
||||
${e.format(r)}`.trim())}};mPe.exports=Tee});var kee=E((J6r,QPe)=>{"use strict";var{InvalidArgumentError:qqt}=Et(),{runtimeFeatures:Vqt}=Nd();function Jqt(t={}){let{ignoreHeaders:e=[],excludeHeaders:r=[],matchHeaders:s=[],caseSensitive:n=!1}=t;return{ignore:new Set(e.map(i=>n?i:i.toLowerCase())),exclude:new Set(r.map(i=>n?i:i.toLowerCase())),match:new Set(s.map(i=>n?i:i.toLowerCase()))}}var CPe=Vqt.has("crypto")?B("node:crypto"):null,Wqt=CPe?.hash?t=>CPe.hash("sha256",t,"base64url"):t=>Buffer.from(t).toString("base64url");function BPe(t){return Array.isArray(t)&&(t.length&1)===0}function zqt(t=[]){return t.length===0?()=>!1:function(r){let s;for(let n of t)if(typeof n=="string"){if(s||(s=r.toLowerCase()),s.includes(n.toLowerCase()))return!0}else if(n instanceof RegExp&&n.test(r))return!0;return!1}}function jqt(t){let e={};if(!t)return e;if(BPe(t)){for(let r=0;r<t.length;r+=2){let s=t[r],n=t[r+1];if(s&&n!==void 0){let i=Buffer.isBuffer(s)?s.toString():s,o=Buffer.isBuffer(n)?n.toString():n;e[i.toLowerCase()]=o}}return e}if(t&&typeof t=="object")for(let[r,s]of Object.entries(t))r&&typeof r=="string"&&(e[r.toLowerCase()]=Array.isArray(s)?s.join(", "):String(s));return e}var IPe=["record","playback","update"];function Kqt(t){if(!IPe.includes(t))throw new qqt(`Invalid snapshot mode: ${t}. Must be one of: ${IPe.join(", ")}`)}QPe.exports={createHeaderFilters:Jqt,hashId:Wqt,isUndiciHeaders:BPe,normalizeHeaders:jqt,isUrlExcludedFactory:zqt,validateSnapshotMode:Kqt}});var xPe=E((W6r,TPe)=>{"use strict";var{writeFile:Zqt,readFile:Xqt,mkdir:$qt}=B("node:fs/promises"),{dirname:eVt,resolve:yPe}=B("node:path"),{setTimeout:tVt,clearTimeout:bPe}=B("node:timers"),{InvalidArgumentError:wPe,UndiciError:rVt}=Et(),{hashId:sVt,isUrlExcludedFactory:nVt,normalizeHeaders:SPe,createHeaderFilters:NPe}=kee();function GN(t,e,r={}){let s=new URL(t.path,t.origin),n=t._normalizedHeaders||SPe(t.headers);return t._normalizedHeaders||(t._normalizedHeaders=n),{method:t.method||"GET",url:r.matchQuery!==!1?s.toString():`${s.origin}${s.pathname}`,headers:DPe(n,e,r),body:r.matchBody!==!1&&t.body?String(t.body):""}}function DPe(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:s=!1}=r,n={},{ignore:i,exclude:o,match:a}=e;for(let[A,c]of Object.entries(t)){let u=s?A:A.toLowerCase();o.has(u)||i.has(u)||a.size!==0&&!a.has(u)||(n[u]=c)}return n}function RPe(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:s=!1}=r,n={},{exclude:i}=e;for(let[o,a]of Object.entries(t)){let A=s?o:o.toLowerCase();i.has(A)||(n[A]=a)}return n}function YN(t){let e=[t.method,t.url];if(t.headers&&typeof t.headers=="object"){let s=Object.keys(t.headers).sort();for(let n of s){let i=Array.isArray(t.headers[n])?t.headers[n]:[t.headers[n]];e.push(n);for(let o of i.sort())e.push(String(o))}}e.push(t.body);let r=e.join("|");return sVt(r)}var Fee=class{#e;#t;#r=new Map;#s;#n=1/0;#i=!1;#a;constructor(e={}){this.#s=e.snapshotPath,this.#n=e.maxSnapshots||1/0,this.#i=e.autoFlush||!1,this.flushInterval=e.flushInterval||3e4,this._flushTimer=null,this.matchOptions={matchHeaders:e.matchHeaders||[],ignoreHeaders:e.ignoreHeaders||[],excludeHeaders:e.excludeHeaders||[],matchBody:e.matchBody!==!1,matchQuery:e.matchQuery!==!1,caseSensitive:e.caseSensitive||!1},this.#a=NPe(this.matchOptions),this.shouldRecord=e.shouldRecord||(()=>!0),this.shouldPlayback=e.shouldPlayback||(()=>!0),this.#t=nVt(e.excludeUrls),this.#i&&this.#s&&this.#o()}async record(e,r){if(!this.shouldRecord(e)||this.isUrlExcluded(e))return;let s=GN(e,this.#a,this.matchOptions),n=YN(s),i=SPe(r.headers),o={statusCode:r.statusCode,headers:RPe(i,this.#a,this.matchOptions),body:Buffer.isBuffer(r.body)?r.body.toString("base64"):Buffer.from(String(r.body||"")).toString("base64"),trailers:r.trailers};if(this.#r.size>=this.#n&&!this.#r.has(n)){let A=this.#r.keys().next().value;this.#r.delete(A)}let a=this.#r.get(n);a&&a.responses?(a.responses.push(o),a.timestamp=new Date().toISOString()):this.#r.set(n,{request:s,responses:[o],callCount:0,timestamp:new Date().toISOString()}),this.#i&&this.#s&&this.#c()}isUrlExcluded(e){let r=new URL(e.path,e.origin).toString();return this.#t(r)}findSnapshot(e){if(!this.shouldPlayback(e)||this.isUrlExcluded(e))return;let r=GN(e,this.#a,this.matchOptions),s=YN(r),n=this.#r.get(s);if(!n)return;let i=n.callCount||0,o=Math.min(i,n.responses.length-1);return n.callCount=i+1,{...n,response:n.responses[o]}}async loadSnapshots(e){let r=e||this.#s;if(!r)throw new wPe("Snapshot path is required");try{let s=await Xqt(yPe(r),"utf8"),n=JSON.parse(s);if(Array.isArray(n)){this.#r.clear();for(let{hash:i,snapshot:o}of n)this.#r.set(i,o)}else this.#r=new Map(Object.entries(n))}catch(s){if(s.code==="ENOENT")this.#r.clear();else throw new rVt(`Failed to load snapshots from ${r}`,{cause:s})}}async saveSnapshots(e){let r=e||this.#s;if(!r)throw new wPe("Snapshot path is required");let s=yPe(r);await $qt(eVt(s),{recursive:!0});let n=Array.from(this.#r.entries()).map(([i,o])=>({hash:i,snapshot:o}));await Zqt(s,JS
Line truncated
|
||||
PRAGMA journal_mode = WAL;
|
||||
PRAGMA synchronous = NORMAL;
|
||||
PRAGMA temp_store = memory;
|
||||
PRAGMA optimize;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS cacheInterceptorV${du} (
|
||||
CREATE TABLE IF NOT EXISTS cacheInterceptorV${$o} (
|
||||
-- Data specific to us
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
url TEXT NOT NULL,
|
||||
@@ -282,9 +179,9 @@ ${e.format(r)}`.trim())}};ppt.exports=kIe});var MIe=f((XGn,Ipt)=>{"use strict";v
|
||||
staleAt INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${du}_getValuesQuery ON cacheInterceptorV${du}(url, method, deleteAt);
|
||||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${du}_deleteByUrlQuery ON cacheInterceptorV${du}(deleteAt);
|
||||
`),this.#r=this.#n.prepare(`
|
||||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${$o}_getValuesQuery ON cacheInterceptorV${$o}(url, method, deleteAt);
|
||||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${$o}_deleteByUrlQuery ON cacheInterceptorV${$o}(deleteAt);
|
||||
`),this.#s=this.#r.prepare(`
|
||||
SELECT
|
||||
id,
|
||||
body,
|
||||
@@ -297,14 +194,14 @@ ${e.format(r)}`.trim())}};ppt.exports=kIe});var MIe=f((XGn,Ipt)=>{"use strict";v
|
||||
vary,
|
||||
cachedAt,
|
||||
staleAt
|
||||
FROM cacheInterceptorV${du}
|
||||
FROM cacheInterceptorV${$o}
|
||||
WHERE
|
||||
url = ?
|
||||
AND method = ?
|
||||
ORDER BY
|
||||
deleteAt ASC
|
||||
`),this.#s=this.#n.prepare(`
|
||||
UPDATE cacheInterceptorV${du} SET
|
||||
`),this.#n=this.#r.prepare(`
|
||||
UPDATE cacheInterceptorV${$o} SET
|
||||
body = ?,
|
||||
deleteAt = ?,
|
||||
statusCode = ?,
|
||||
@@ -316,8 +213,8 @@ ${e.format(r)}`.trim())}};ppt.exports=kIe});var MIe=f((XGn,Ipt)=>{"use strict";v
|
||||
staleAt = ?
|
||||
WHERE
|
||||
id = ?
|
||||
`),this.#i=this.#n.prepare(`
|
||||
INSERT INTO cacheInterceptorV${du} (
|
||||
`),this.#i=this.#r.prepare(`
|
||||
INSERT INTO cacheInterceptorV${$o} (
|
||||
url,
|
||||
method,
|
||||
body,
|
||||
@@ -331,46 +228,92 @@ ${e.format(r)}`.trim())}};ppt.exports=kIe});var MIe=f((XGn,Ipt)=>{"use strict";v
|
||||
cachedAt,
|
||||
staleAt
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
`),this.#o=this.#n.prepare(`DELETE FROM cacheInterceptorV${du} WHERE url = ?`),this.#A=this.#n.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV${du}`),this.#a=this.#n.prepare(`DELETE FROM cacheInterceptorV${du} WHERE deleteAt <= ?`),this.#c=this.#t===1/0?null:this.#n.prepare(`
|
||||
DELETE FROM cacheInterceptorV${du}
|
||||
`),this.#o=this.#r.prepare(`DELETE FROM cacheInterceptorV${$o} WHERE url = ?`),this.#A=this.#r.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV${$o}`),this.#a=this.#r.prepare(`DELETE FROM cacheInterceptorV${$o} WHERE deleteAt <= ?`),this.#c=this.#t===1/0?null:this.#r.prepare(`
|
||||
DELETE FROM cacheInterceptorV${$o}
|
||||
WHERE id IN (
|
||||
SELECT
|
||||
id
|
||||
FROM cacheInterceptorV${du}
|
||||
FROM cacheInterceptorV${$o}
|
||||
ORDER BY cachedAt DESC
|
||||
LIMIT ?
|
||||
)
|
||||
`)}close(){this.#n.close()}get(e){nBe(e);let r=this.#g(e);return r?{body:r.body?Buffer.from(r.body.buffer,r.body.byteOffset,r.body.byteLength):void 0,statusCode:r.statusCode,statusMessage:r.statusMessage,headers:r.headers?JSON.parse(r.headers):void 0,etag:r.etag?r.etag:void 0,vary:r.vary?JSON.parse(r.vary):void 0,cacheControlDirectives:r.cacheControlDirectives?JSON.parse(r.cacheControlDirectives):void 0,cachedAt:r.cachedAt,staleAt:r.staleAt,deleteAt:r.deleteAt}:void 0}set(e,r){nBe(e);let n=this.#h(e),s=Array.isArray(r.body)?Buffer.concat(r.body):r.body,i=s?.byteLength;if(i&&i>this.#e)return;let o=this.#g(e,!0);o?this.#s.run(s,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.cachedAt,r.staleAt,o.id):(this.#u(),this.#i.run(n,e.method,s,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.vary?JSON.stringify(r.vary):null,r.cachedAt,r.staleAt))}createWriteStream(e,r){nBe(e),hzr(r);let n=0,s=[],i=this;return new dzr({decodeStrings:!0,write(o,a,A){n+=o.byteLength,n<i.#e?s.push(o):this.destroy(),A()},final(o){i.set(e,{...r,body:s}),o()}})}delete(e){if(typeof e!="object")throw new TypeError(`expected key to be object, got ${typeof e}`);this.#o.run(this.#h(e))}#u(){if(Number.isFinite(this.#t)&&this.size<=this.#t)return 0;{let e=this.#a.run(Date.now()).changes;if(e)return e}{let e=this.#c?.run(Math.max(Math.floor(this.#t*.1),1)).changes;if(e)return e}return 0}get size(){let{total:e}=this.#A.get();return e}#h(e){return`${e.origin}/${e.path}`}#g(e,r=!1){let n=this.#h(e),{headers:s,method:i}=e,o=this.#r.all(n,i);if(o.length===0)return;let a=Date.now();for(let A of o){if(a>=A.deleteAt&&!r)return;let c=!0;if(A.vary){let u=JSON.parse(A.vary);for(let l in u)if(!gzr(s[l],u[l])){c=!1;break}}if(c)return A}}};function gzr(t,e){return t==null&&e==null?!0:t==null&&e!=null||t!=null&&e==null?!1:Array.isArray(t)&&Array.isArray(e)?t.length!==e.length?!1:t.every((r,n)=>r===e[n]):t===e}});var HQ=f((I8n,Mmt)=>{"use strict";var{kConstruct:fzr}=Mn(),{kEnumerableProperty:JD}=Wt(),{iteratorMixin:pzr,isValidHeaderName:Vv,isValidHeaderValue:Dmt}=au(),{webidl:Pr}=Ko(),iBe=B("node:assert"),JV=B("node:util");function Rmt(t){return t===10||t===13||t===9||t===32}function xmt(t){let e=0,r=t.length;for(;r>e&&Rmt(t.charCodeAt(r-1));)--r;for(;r>e&&Rmt(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}function Tmt(t,e){if(Array.isArray(e))for(let r=0;r<e.length;++r){let n=e[r];if(n.length!==2)throw Pr.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${n.length}.`});oBe(t,n[0],n[1])}else if(typeof e=="object"&&e!==null){let r=Object.keys(e);for(let n=0;n<r.length;++n)oBe(t,r[n],e[r[n]])}else throw Pr.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}function oBe(t,e,r){if(r=xmt(r),Vv(e)){if(!Dmt(r))throw Pr.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw Pr.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(Fmt(t)==="immutable")throw new TypeError("immutable");return WV(t).append(e,r,!1)}function mzr(t){let e=WV(t);if(!e)return[];if(e.sortedMap)return e.sortedMap;let r=[],n=e.toSortedArray(),s=e.cookies;if(s===null||s.length===1)return e.sortedMap=n;for(let i=0;i<n.length;++i){let{0:o,1:a}=n[i];if(o==="set-cookie")for(let A=0;A<s.length;++A)r.push([o,s[A]]);else r.push([o,a])}return e.sortedMap=r}function kmt(t,e){return t[0]<e[0]?-1:1}var VV=class t{cookies=null;sortedMap;headersMap;constructor(e){e instanceof t?(this.headersMap=new Map(e.headersMap),this.sortedMap=e.sortedMap,this.cookies=e.cookies===null?null:[...e.cookies]):(this.headersMap=new Map(e),this.sortedMap=null)}contains(e,r){return this.headersMap.has(r?e:e.toLowerCase())}clear(){this.headersMap.clear(),this.sortedMap=null,this.cookies=null}append(e,r,n){this.sortedMap=null;let s=n?e:e.toLowerCase(),i=this.headersMap.get(s);if(i){let o=s==="cookie"?"; ":", ";this.headersMap.set(s,{name:i.name,value:`${i.value}${o}${r}`})}else this.headersMap.set(s,{name:e,value:r});s==="set-cookie"&&(this.cookies??=[]).push(r)}set(e,r,n){this.sortedMap=null;let s=n?e:e.toLowerCase();s==="set-cookie"&&(this.cookies=[r]),this.headersMap.set(s,{name:e,value:r})}delete(e,r){this.sortedMap=null,r||(e=e.toLowerCase()),e==="set-cookie"&&(this.cookies=null),this.headersMap.delete(e)}get(e,r){return this.headersMap.get(r?e:e.toLowerCase())?.value??null}*[Symbol.iterator](){for(let{0:e,1:{value:r}}of this.headersMap)yield[e,r]}get entries(){let e={};if(this.headersMap.size!==0)for(let{name:r,value:n}of this.headersMap.values())e[r]=n;return e}rawValues(){return this.headersMap.values()}get entriesList(){let e=[];if(this.headersMa
Line truncated
|
||||
${i}`;break;case"retry":OCt(i)&&(r[s]=i);break;case"id":HCt(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&OCt(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id!==void 0&&HCt(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}}};qCt.exports={EventSourceStream:qBe}});var XCt=f((J8n,KCt)=>{"use strict";var{pipeline:FXr}=B("node:stream"),{fetching:MXr}=Xv(),{makeRequest:vXr}=WD(),{webidl:lA}=Ko(),{EventSourceStream:LXr}=GCt(),{parseMIMEType:UXr}=Ll(),{createFastMessageEvent:PXr}=EW(),{isNetworkError:YCt}=zv(),{kEnumerableProperty:jQ}=Wt(),{environmentSettingsObject:JCt}=au(),VCt=!1,WCt=3e3,nL=0,zCt=1,sL=2,_Xr="anonymous",OXr="use-credentials",nx=class t extends EventTarget{#e={open:null,error:null,message:null};#t;#n=!1;#r=nL;#s=null;#i=null;#a;#o;constructor(e,r={}){super(),lA.util.markAsUncloneable(this);let n="EventSource constructor";lA.argumentLengthCheck(arguments,1,n),VCt||(VCt=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=lA.converters.USVString(e),r=lA.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.node.dispatcher||r.dispatcher,this.#o={lastEventId:"",reconnectionTime:r.node.reconnectionTime};let s=JCt,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(A){throw new DOMException(A,"SyntaxError")}this.#t=i.href;let o=_Xr;r.withCredentials===!0&&(o=OXr,this.#n=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=JCt.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#s=vXr(a),this.#A()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#A(){if(this.#r===sL)return;this.#r=nL;let e={request:this.#s,dispatcher:this.#a},r=n=>{if(!YCt(n))return this.#c()};e.processResponseEndOfBody=r,e.processResponse=n=>{if(YCt(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let s=n.headersList.get("content-type",!0),i=s!==null?UXr(s):"failure",o=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||o===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=zCt,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let a=new LXr({eventSourceSettings:this.#o,push:A=>{this.dispatchEvent(PXr(A.type,A.options))}});FXr(n.body.stream,a,A=>{A?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=MXr(e)}#c(){this.#r!==sL&&(this.#r=nL,this.dispatchEvent(new Event("error")),setTimeout(()=>{this.#r===nL&&(this.#o.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#A())},this.#o.reconnectionTime)?.unref())}close(){lA.brandCheck(this,t),this.#r!==sL&&(this.#r=sL,this.#i.abort(),this.#s=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open);let r=lA.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("open",r),this.#e.open=e):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message);let r=lA.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("message",r),this.#e.message=e):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error);let r=lA.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("error",r),this.#e.error=e):this.#e.error=null}},jCt={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:nL,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:zCt,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:sL,writable:!1}};Object.defineProperties(nx,jCt);Object.defineProperties(nx.prototype,jCt);Object.defineProperties(nx.prototype,{close:jQ,onerror:jQ,onmessage:jQ,onopen:jQ,readyState:jQ,url:jQ,withCredentials:jQ});lA.converters.EventSourceInitDict=lA.dictionaryConverter([{key:"withCredentials",converter:lA.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:lA.converters.any},{key:"node",converter:lA.dictionaryConverter([{key:"reconnectionTime",converter:lA.converters["unsigned long"],defaultValue:()=>WCt},{key:"dispatcher",converter:lA.converters.any}]),defaultValue:()=>({})}]);KCt.exports={EventSource:nx,defaultReconnectionTime:WCt}});var nIt=f((V8n,Oe)=>{"use strict";var HXr=tI(),$Ct=sv(),qXr=TD(),GXr=fgt(),YXr=Cgt(),JXr=MQ(),VXr=UCe(),WXr=Ggt(),zXr=jgt(),jXr=Zgt(),eIt=or(),kW=Wt(),{InvalidArgumentError:TW}=eIt,sx=Fft(),KXr=ID(),XXr=BIe(),{MockCallHistory:ZXr,Mock
Line truncated
|
||||
`)}close(){this.#r.close()}get(e){tte(e);let r=this.#f(e);return r?{body:r.body?Buffer.from(r.body.buffer,r.body.byteOffset,r.body.byteLength):void 0,statusCode:r.statusCode,statusMessage:r.statusMessage,headers:r.headers?JSON.parse(r.headers):void 0,etag:r.etag?r.etag:void 0,vary:r.vary?JSON.parse(r.vary):void 0,cacheControlDirectives:r.cacheControlDirectives?JSON.parse(r.cacheControlDirectives):void 0,cachedAt:r.cachedAt,staleAt:r.staleAt,deleteAt:r.deleteAt}:void 0}set(e,r){tte(e);let s=this.#h(e),n=Array.isArray(r.body)?Buffer.concat(r.body):r.body,i=n?.byteLength;if(i&&i>this.#e)return;let o=this.#f(e,!0);o?this.#n.run(n,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.cachedAt,r.staleAt,o.id):(this.#u(),this.#i.run(s,e.method,n,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.vary?JSON.stringify(r.vary):null,r.cachedAt,r.staleAt))}createWriteStream(e,r){tte(e),_Jt(r);let s=0,n=[],i=this;return new LJt({decodeStrings:!0,write(o,a,A){s+=o.byteLength,s<i.#e?n.push(o):this.destroy(),A()},final(o){i.set(e,{...r,body:n}),o()}})}delete(e){if(typeof e!="object")throw new TypeError(`expected key to be object, got ${typeof e}`);this.#o.run(this.#h(e))}#u(){if(Number.isFinite(this.#t)&&this.size<=this.#t)return 0;{let e=this.#a.run(Date.now()).changes;if(e)return e}{let e=this.#c?.run(Math.max(Math.floor(this.#t*.1),1)).changes;if(e)return e}return 0}get size(){let{total:e}=this.#A.get();return e}#h(e){return`${e.origin}/${e.path}`}#f(e,r=!1){let s=this.#h(e),{headers:n,method:i}=e,o=this.#s.all(s,i);if(o.length===0)return;let a=Date.now();for(let A of o){if(a>=A.deleteAt&&!r)return;let c=!0;if(A.vary){let u=JSON.parse(A.vary);for(let l in u)if(!PJt(n[l],u[l])){c=!1;break}}if(c)return A}}};function PJt(t,e){return t==null&&e==null?!0:t==null&&e!=null||t!=null&&e==null?!1:Array.isArray(t)&&Array.isArray(e)?t.length!==e.length?!1:t.every((r,s)=>r===e[s]):t===e}});var bE=E((g5r,vOe)=>{"use strict";var{kConstruct:OJt}=Br(),{kEnumerableProperty:dB}=ct(),{iteratorMixin:HJt,isValidHeaderName:WN,isValidHeaderValue:xOe}=zo(),{webidl:Pt}=kn(),ste=B("node:assert"),Q_=B("node:util");function TOe(t){return t===10||t===13||t===9||t===32}function kOe(t){let e=0,r=t.length;for(;r>e&&TOe(t.charCodeAt(r-1));)--r;for(;r>e&&TOe(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}function FOe(t,e){if(Array.isArray(e))for(let r=0;r<e.length;++r){let s=e[r];if(s.length!==2)throw Pt.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${s.length}.`});nte(t,s[0],s[1])}else if(typeof e=="object"&&e!==null){let r=Object.keys(e);for(let s=0;s<r.length;++s)nte(t,r[s],e[r[s]])}else throw Pt.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}function nte(t,e,r){if(r=kOe(r),WN(e)){if(!xOe(r))throw Pt.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw Pt.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(UOe(t)==="immutable")throw new TypeError("immutable");return b_(t).append(e,r,!1)}function GJt(t){let e=b_(t);if(!e)return[];if(e.sortedMap)return e.sortedMap;let r=[],s=e.toSortedArray(),n=e.cookies;if(n===null||n.length===1)return e.sortedMap=s;for(let i=0;i<s.length;++i){let{0:o,1:a}=s[i];if(o==="set-cookie")for(let A=0;A<n.length;++A)r.push([o,n[A]]);else r.push([o,a])}return e.sortedMap=r}function MOe(t,e){return t[0]<e[0]?-1:1}var y_=class t{cookies=null;sortedMap;headersMap;constructor(e){e instanceof t?(this.headersMap=new Map(e.headersMap),this.sortedMap=e.sortedMap,this.cookies=e.cookies===null?null:[...e.cookies]):(this.headersMap=new Map(e),this.sortedMap=null)}contains(e,r){return this.headersMap.has(r?e:e.toLowerCase())}clear(){this.headersMap.clear(),this.sortedMap=null,this.cookies=null}append(e,r,s){this.sortedMap=null;let n=s?e:e.toLowerCase(),i=this.headersMap.get(n);if(i){let o=n==="cookie"?"; ":", ";this.headersMap.set(n,{name:i.name,value:`${i.value}${o}${r}`})}else this.headersMap.set(n,{name:e,value:r});n==="set-cookie"&&(this.cookies??=[]).push(r)}set(e,r,s){this.sortedMap=null;let n=s?e:e.toLowerCase();n==="set-cookie"&&(this.cookies=[r]),this.headersMap.set(n,{name:e,value:r})}delete(e,r){this.sortedMap=null,r||(e=e.toLowerCase()),e==="set-cookie"&&(this.cookies=null),this.headersMap.delete(e)}get(e,r){return this.headersMap.get(r?e:e.toLowerCase())?.value??null}*[Symbol.iterator](){for(let{0:e,1:{value:r}}of this.headersMap)yield[e,r]}get entries(){let e={};if(this.headersMap.size!==0)for(let{name:r,value:s}of this.headersMap.values())e[r]=s;return e}rawValues(){return this.headersMap.values()}get entriesList(){let e=[];if(this.headersMa
Line truncated
|
||||
${i}`;break;case"retry":G8e(i)&&(r[n]=i);break;case"id":Y8e(i)&&(r[n]=i);break;case"event":i.length>0&&(r[n]=i);break}}processEvent(e){e.retry&&G8e(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id!==void 0&&Y8e(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}}};q8e.exports={EventSourceStream:Ote}});var $8e=E((O5r,X8e)=>{"use strict";var{pipeline:nKt}=B("node:stream"),{fetching:iKt}=XN(),{makeRequest:oKt}=fB(),{webidl:Ri}=kn(),{EventSourceStream:aKt}=V8e(),{parseMIMEType:AKt}=nA(),{createFastMessageEvent:cKt}=j_(),{isNetworkError:J8e}=jN(),{kEnumerableProperty:kE}=ct(),{environmentSettingsObject:W8e}=zo(),z8e=!1,j8e=3e3,n1=0,K8e=1,i1=2,uKt="anonymous",lKt="use-credentials",bB=class t extends EventTarget{#e={open:null,error:null,message:null};#t;#r=!1;#s=n1;#n=null;#i=null;#a;#o;constructor(e,r={}){super(),Ri.util.markAsUncloneable(this);let s="EventSource constructor";Ri.argumentLengthCheck(arguments,1,s),z8e||(z8e=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Ri.converters.USVString(e),r=Ri.converters.EventSourceInitDict(r,s,"eventSourceInitDict"),this.#a=r.node.dispatcher||r.dispatcher,this.#o={lastEventId:"",reconnectionTime:r.node.reconnectionTime};let n=W8e,i;try{i=new URL(e,n.settingsObject.baseUrl),this.#o.origin=i.origin}catch(A){throw new DOMException(A,"SyntaxError")}this.#t=i.href;let o=uKt;r.withCredentials===!0&&(o=lKt,this.#r=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=W8e.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=oKt(a),this.#A()}get readyState(){return this.#s}get url(){return this.#t}get withCredentials(){return this.#r}#A(){if(this.#s===i1)return;this.#s=n1;let e={request:this.#n,dispatcher:this.#a},r=s=>{if(!J8e(s))return this.#c()};e.processResponseEndOfBody=r,e.processResponse=s=>{if(J8e(s))if(s.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let n=s.headersList.get("content-type",!0),i=n!==null?AKt(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.#s=K8e,this.dispatchEvent(new Event("open")),this.#o.origin=s.urlList[s.urlList.length-1].origin;let a=new aKt({eventSourceSettings:this.#o,push:A=>{this.dispatchEvent(cKt(A.type,A.options))}});nKt(s.body.stream,a,A=>{A?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=iKt(e)}#c(){this.#s!==i1&&(this.#s=n1,this.dispatchEvent(new Event("error")),setTimeout(()=>{this.#s===n1&&(this.#o.lastEventId.length&&this.#n.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#A())},this.#o.reconnectionTime)?.unref())}close(){Ri.brandCheck(this,t),this.#s!==i1&&(this.#s=i1,this.#i.abort(),this.#n=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open);let r=Ri.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("open",r),this.#e.open=e):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message);let r=Ri.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("message",r),this.#e.message=e):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error);let r=Ri.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("error",r),this.#e.error=e):this.#e.error=null}},Z8e={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:n1,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:K8e,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:i1,writable:!1}};Object.defineProperties(bB,Z8e);Object.defineProperties(bB.prototype,Z8e);Object.defineProperties(bB.prototype,{close:kE,onerror:kE,onmessage:kE,onopen:kE,readyState:kE,url:kE,withCredentials:kE});Ri.converters.EventSourceInitDict=Ri.dictionaryConverter([{key:"withCredentials",converter:Ri.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Ri.converters.any},{key:"node",converter:Ri.dictionaryConverter([{key:"reconnectionTime",converter:Ri.converters["unsigned long"],defaultValue:()=>j8e},{key:"dispatcher",converter:Ri.converters.any}]),defaultValue:()=>({})}]);X8e.exports={EventSource:bB,defaultReconnectionTime:j8e}});var i4e=E((H5r,Ee)=>{"use strict";var dKt=Rf(),t4e=iN(),hKt=XI(),fKt=ELe(),gKt=BLe(),pKt=EE(),EKt=U$(),mKt=VLe(),CKt=ZLe(),IKt=e_e(),r4e=Et(),cP=ct(),{InvalidArgumentError:AP}=r4e,wB=U_e(),BKt=HI(),QKt=Cee(),{MockCallHistory:yKt,MockC
Line truncated
|
||||
`).slice(1).join(`
|
||||
`);t.stack=r?`${r}
|
||||
${i}`:s.stack}Oe.exports.fetch=function(e,r=void 0){return cZr(e,r).catch(n=>{throw ZCt?rIt(n,ZCt):n&&typeof n=="object"&&Error.captureStackTrace(n,Oe.exports.fetch),n})};Oe.exports.Headers=HQ().Headers;Oe.exports.Response=zv().Response;Oe.exports.Request=WD().Request;Oe.exports.FormData=eV().FormData;var{setGlobalOrigin:uZr,getGlobalOrigin:lZr}=wEe();Oe.exports.setGlobalOrigin=uZr;Oe.exports.getGlobalOrigin=lZr;var{CacheStorage:dZr}=UEt(),{kConstruct:hZr}=Mn();Oe.exports.caches=new dZr(hZr);var{deleteCookie:gZr,getCookies:fZr,getSetCookies:pZr,setCookie:mZr,parseCookie:EZr}=KEt();Oe.exports.deleteCookie=gZr;Oe.exports.getCookies=fZr;Oe.exports.getSetCookies=pZr;Oe.exports.setCookie=mZr;Oe.exports.parseCookie=EZr;var{parseMIMEType:CZr,serializeAMimeType:IZr}=Ll();Oe.exports.parseMIMEType=CZr;Oe.exports.serializeAMimeType=IZr;var{CloseEvent:BZr,ErrorEvent:QZr,MessageEvent:yZr}=EW(),{WebSocket:bZr,ping:wZr}=DCt();Oe.exports.WebSocket=bZr;Oe.exports.CloseEvent=BZr;Oe.exports.ErrorEvent=QZr;Oe.exports.MessageEvent=yZr;Oe.exports.ping=wZr;Oe.exports.WebSocketStream=UCt().WebSocketStream;Oe.exports.WebSocketError=UBe().WebSocketError;Oe.exports.request=iL(sx.request);Oe.exports.stream=iL(sx.stream);Oe.exports.pipeline=iL(sx.pipeline);Oe.exports.connect=iL(sx.connect);Oe.exports.upgrade=iL(sx.upgrade);Oe.exports.MockClient=XXr;Oe.exports.MockCallHistory=ZXr;Oe.exports.MockCallHistoryLog=$Xr;Oe.exports.MockPool=tZr;Oe.exports.MockAgent=eZr;Oe.exports.SnapshotAgent=rZr;Oe.exports.mockErrors=nZr;var{EventSource:NZr}=XCt();Oe.exports.EventSource=NZr;function SZr(){globalThis.fetch=Oe.exports.fetch,globalThis.Headers=Oe.exports.Headers,globalThis.Response=Oe.exports.Response,globalThis.Request=Oe.exports.Request,globalThis.FormData=Oe.exports.FormData,globalThis.WebSocket=Oe.exports.WebSocket,globalThis.CloseEvent=Oe.exports.CloseEvent,globalThis.ErrorEvent=Oe.exports.ErrorEvent,globalThis.MessageEvent=Oe.exports.MessageEvent,globalThis.EventSource=Oe.exports.EventSource}Oe.exports.install=SZr});var oL=f(uI=>{"use strict";uI.removeLeadingAndTrailingHTTPWhitespace=t=>t.replace(/^[ \t\n\r]+/u,"").replace(/[ \t\n\r]+$/u,"");uI.removeTrailingHTTPWhitespace=t=>t.replace(/[ \t\n\r]+$/u,"");uI.isHTTPWhitespaceChar=t=>t===" "||t===" "||t===`
|
||||
`||t==="\r";uI.solelyContainsHTTPTokenCodePoints=t=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(t);uI.soleyContainsHTTPQuotedStringTokenCodePoints=t=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(t);uI.asciiLowercase=t=>t.replace(/[A-Z]/ug,e=>e.toLowerCase());uI.collectAnHTTPQuotedString=(t,e)=>{let r="";for(e++;;){for(;e<t.length&&t[e]!=='"'&&t[e]!=="\\";)r+=t[e],++e;if(e>=t.length)break;let n=t[e];if(++e,n==="\\"){if(e>=t.length){r+="\\";break}r+=t[e],++e}else break}return[r,e]}});var iIt=f((j8n,sIt)=>{"use strict";var{asciiLowercase:FW,solelyContainsHTTPTokenCodePoints:RZr,soleyContainsHTTPQuotedStringTokenCodePoints:DZr}=oL();sIt.exports=class{constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=FW(String(e)),this._map.get(e)}has(e){return e=FW(String(e)),this._map.has(e)}set(e,r){if(e=FW(String(e)),r=String(r),!RZr(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!DZr(r))throw new Error(`Invalid MIME type parameter value "${r}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,r)}clear(){this._map.clear()}delete(e){return e=FW(String(e)),this._map.delete(e)}forEach(e,r){this._map.forEach(e,r)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}});var AIt=f((K8n,aIt)=>{"use strict";var{removeLeadingAndTrailingHTTPWhitespace:xZr,removeTrailingHTTPWhitespace:oIt,isHTTPWhitespaceChar:TZr,solelyContainsHTTPTokenCodePoints:GBe,soleyContainsHTTPQuotedStringTokenCodePoints:kZr,asciiLowercase:YBe,collectAnHTTPQuotedString:FZr}=oL();aIt.exports=t=>{t=xZr(t);let e=0,r="";for(;e<t.length&&t[e]!=="/";)r+=t[e],++e;if(r.length===0||!GBe(r)||e>=t.length)return null;++e;let n="";for(;e<t.length&&t[e]!==";";)n+=t[e],++e;if(n=oIt(n),n.length===0||!GBe(n))return null;let s={type:YBe(r),subtype:YBe(n),parameters:new Map};for(;e<t.length;){for(++e;TZr(t[e]);)++e;let i="";for(;e<t.length&&t[e]!==";"&&t[e]!=="=";)i+=t[e],++e;if(i=YBe(i),e<t.length){if(t[e]===";")continue;++e}let o=null;if(t[e]==='"')for([o,e]=FZr(t,e);e<t.length&&t[e]!==";";)++e;else{for(o="";e<t.length&&t[e]!==";";)o+=t[e],++e;if(o=oIt(o),o==="")continue}i.length>0&&GBe(i)&&kZr(o)&&!s.parameters.has(i)&&s.parameters.set(i,o)}return s}});var uIt=f((X8n,cIt)=>{"use strict";var{solelyContainsHTTPTokenCodePoints:MZr}=oL();cIt.exports=t=>{let e=`${t.type}/${t.subtype}`;if(t.parameters.size===0)return e;for(let[r,n]of t.parameters)e+=";",e+=r,e+="=",(!MZr(n)||n.length===0)&&(n=n.replace(/(["\\])/ug,"\\$1"),n=`"${n}"`),e+=n;return e}});var gIt=f(($8n,hIt)=>{"use strict";var vZr=iIt(),LZr=AIt(),UZr=uIt(),{asciiLowercase:lIt,solelyContainsHTTPTokenCodePoints:dIt}=oL();hIt.exports=class{constructor(e){e=String(e);let r=LZr(e);if(r===null)throw new Error(`Could not parse MIME type string "${e}"`);this._type=r.type,this._subtype=r.subtype,this._parameters=new vZr(r.parameters)}static parse(e){try{return new this(e)}catch{return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(e=lIt(String(e)),e.length===0)throw new Error("Invalid type: must be a non-empty string");if(!dIt(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(e=lIt(String(e)),e.length===0)throw new Error("Invalid subtype: must be a non-empty string");if(!dIt(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return UZr(this)}isJavaScript({prohibitParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}default:return!1}}isXML(){return this._subtype==="xml"&&(this._type==="text"||this._type==="application")||this._subtype.endsWith("+xml")}isHTML(){return this._subtype==="html"&&this._type==="text"}}});var _It=f((o4n,a$r)=>{a$r.exports={name:"@actions/artifact",version:"6.1.0",preview:!0,description:"Actions artifact lib",keywords:["github","actions","artifact"],homepage:"https://github.com/actions/toolkit/tree/main/packages/artifact",license:"MIT",type:"module",main:"lib/artifact.js",types:"lib/artifact.d.ts",exports:{".":{types:"./lib/artifact.d.ts",import:"./lib/artifact.js"}},directories:{lib:"lib",test:"__tests__"},files:["lib","!.DS_Store"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/actions/toolkit.git",directory:"packages/artifact"},scripts:{"audit-moderate":"npm inLine truncated
|
||||
globstar while`,e,l,r,d,h),this.matchOne(e.slice(l),r.slice(d),n))return this.debug("globstar found match!",l,a,h),!0;if(h==="."||h===".."||!s.dot&&h.charAt(0)==="."){this.debug("dot detected!",e,l,r,d);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(n&&(this.debug(`
|
||||
>>> no match, partial?`,e,l,r,d),l===a))}var g;if(typeof c=="string"?(g=u===c,this.debug("string match",c,u,g)):(g=u.match(c),this.debug("pattern match",c,u,g)),!g)return!1}if(i===a&&o===A)return!0;if(i===a)return n;if(o===A)return i===a-1&&e[i]==="";throw new Error("wtf?")}braceExpand(){return Myt(this.pattern,this.options)}parse(e,r){Uj(e);let n=this.options;if(e==="**")if(n.noglobstar)e="*";else return uh;if(e==="")return"";let s="",i=!1,o=!1,a=[],A=[],c,u=!1,l=-1,d=-1,h,g,p,C=e.charAt(0)===".",m=n.dot||C,I=()=>C?"":m?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",y=F=>F.charAt(0)==="."?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",w=()=>{if(c){switch(c){case"*":s+=ONe,i=!0;break;case"?":s+=GNe,i=!0;break;default:s+="\\"+c;break}this.debug("clearStateChar %j %j",c,s),c=!1}};for(let F=0,W;F<e.length&&(W=e.charAt(F));F++){if(this.debug("%s %s %s %j",e,F,s,W),o){if(W==="/")return!1;Tyt[W]&&(s+="\\"),s+=W,o=!1;continue}switch(W){case"/":return!1;case"\\":if(u&&e.charAt(F+1)==="-"){s+=W;continue}w(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,F,s,W),u){this.debug(" in class"),W==="!"&&F===d+1&&(W="^"),s+=W;continue}this.debug("call clearStateChar %j",c),w(),c=W,n.noext&&w();continue;case"(":{if(u){s+="(";continue}if(!c){s+="\\(";continue}let U={type:c,start:F-1,reStart:s.length,open:xyt[c].open,close:xyt[c].close};this.debug(this.pattern," ",U),a.push(U),s+=U.open,U.start===0&&U.type!=="!"&&(C=!0,s+=y(e.slice(F+1))),this.debug("plType %j %j",c,s),c=!1;continue}case")":{let U=a[a.length-1];if(u||!U){s+="\\)";continue}a.pop(),w(),i=!0,g=U,s+=g.close,g.type==="!"&&A.push(Object.assign(g,{reEnd:s.length}));continue}case"|":{let U=a[a.length-1];if(u||!U){s+="\\|";continue}w(),s+="|",U.start===0&&U.type!=="!"&&(C=!0,s+=y(e.slice(F+1)));continue}case"[":if(w(),u){s+="\\"+W;continue}u=!0,d=F,l=s.length,s+=W;continue;case"]":if(F===d+1||!u){s+="\\"+W;continue}h=e.substring(d+1,F);try{RegExp("["+Hin(_in(h))+"]"),s+=W}catch{s=s.substring(0,l)+"(?:$.)"}i=!0,u=!1;continue;default:w(),Tyt[W]&&!(W==="^"&&u)&&(s+="\\"),s+=W;break}}for(u&&(h=e.slice(d+1),p=this.parse(h,HNe),s=s.substring(0,l)+"\\["+p[0],i=i||p[1]),g=a.pop();g;g=a.pop()){let F;F=s.slice(g.reStart+g.open.length),this.debug("setting tail",s,g),F=F.replace(/((?:\\{2}){0,64})(\\?)\|/g,(U,ee,oe)=>(oe||(oe="\\"),ee+ee+oe+"|")),this.debug(`tail=%j
|
||||
%s`,F,F,g,s);let W=g.type==="*"?ONe:g.type==="?"?GNe:"\\"+g.type;i=!0,s=s.slice(0,g.reStart)+W+"\\("+F}w(),o&&(s+="\\\\");let H=Lin[s.charAt(0)];for(let F=A.length-1;F>-1;F--){let W=A[F],U=s.slice(0,W.reStart),ee=s.slice(W.reStart,W.reEnd-8),oe=s.slice(W.reEnd),Z=s.slice(W.reEnd-8,W.reEnd)+oe,he=U.split(")").length,Se=U.split("(").length-he,Je=oe;for(let $t=0;$t<Se;$t++)Je=Je.replace(/\)[+*?]?/,"");oe=Je;let He=oe===""&&r!==HNe?"(?:$|\\/)":"";s=U+ee+oe+He+Z}if(s!==""&&i&&(s="(?=.)"+s),H&&(s=I()+s),r===HNe)return[s,i];if(n.nocase&&!i&&(i=e.toUpperCase()!==e.toLowerCase()),!i)return Pin(e);let z=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+s+"$",z),{_glob:e,_src:s})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?ONe:r.dot?Min:vin,s=r.nocase?"i":"",i=e.map(o=>(o=o.map(a=>typeof a=="string"?Oin(a):a===uh?uh:a._src).reduce((a,A)=>(a[a.length-1]===uh&&A===uh||a.push(A),a),[]),o.forEach((a,A)=>{a!==uh||o[A-1]===uh||(A===0?o.length>1?o[A+1]="(?:\\/|"+n+"\\/)?"+o[A+1]:o[A]=n:A===o.length-1?o[A-1]+="(?:\\/|"+n+")?":(o[A-1]+="(?:\\/|\\/"+n+"\\/)"+o[A+1],o[A+1]=uh))}),o.filter(a=>a!==uh).join("/"))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,s)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;qNe.sep!=="/"&&(e=e.split(qNe.sep).join("/")),e=e.split(kyt),this.debug(this.pattern,"split",e);let s=this.set;this.debug(this.pattern,"set",s);let i;for(let o=e.length-1;o>=0&&(i=e[o],!i);o--);for(let o=0;o<s.length;o++){let a=s[o],A=e;if(n.matchBase&&a.length===1&&(A=[i]),this.matchOne(A,a,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return Qu.defaults(e).Minimatch}};Qu.Minimatch=Sx});var Oyt=f((tns,_yt)=>{_yt.exports=Pyt;var VNe=B("fs"),{EventEmitter:qin}=B("events"),{Minimatch:JNe}=vyt(),{resolve:Gin}=B("path");function Yin(t,e){return new Promise((r,n)=>{VNe.readdir(t,{withFileTypes:!0},(s,i)=>{if(s)switch(s.code){case"ENOTDIR":e?n(s):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:n(s);break}else r(i)})})}function Lyt(t,e){return new Promise((r,n)=>{(e?VNe.stat:VNe.lstat)(t,(i,o)=>{i?i.code==="ENOENT"?r(e?Lyt(t,!1):null):r(null):r(o)})})}async function*Uyt(t,e,r,n,s,i){let o=await Yin(e+t,i);for(let a of o){let A=a.name;A===void 0&&(A=a,n=!0);let c=t+"/"+A,u=c.slice(1),l=e+"/"+u,d=null;(n||r)&&(d=await Lyt(l,r)),!d&&a.name!==void 0&&(d=a),d===null&&(d={isDirectory:()=>!1}),d.isDirectory()?s(u)||(yield{relative:u,absolute:l,stats:d},yield*Uyt(c,e,r,n,s,!1)):yield{relative:u,absolute:l,stats:d}}}async function*Jin(t,e,r,n){yield*Uyt("",t,e,r,n,!0)}function Vin(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var Pj=class extends qin{constructor(e,r,n){if(super(),typeof r=="function"&&(n=r,r=null),this.options=Vin(r||{}),this.matchers=[],this.options.pattern){let s=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=s.map(i=>new JNe(i,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let s=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=s.map(i=>new JNe(i,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let s=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=s.map(i=>new JNe(i,{dot:!0}))}this.iterator=Jin(Gin(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",s=>this._matches.push(this.options.absolute?s.absolute:s.relative)),this.on("error",s=>n(s)),this.on("end",()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let n=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(s=>s.match(n)))&&!this.ignoreMatchers.some(s=>s.match(n))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let n=e.value.relative,s=e.value.absolute;this.options.mark&&r&&(n+="/",s+="/"),this.options.stat?this.emit("match",{relative:n,absolute:s,stat:e.value.stats}):this.emit("match",{relative:n,absolute:s})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}
Line truncated
|
||||
`,T);T=te===-1?D.length:te}else if(G!==-1&&D[T]==="/"&&D[T+1]==="*"){let te=D.indexOf("*/",T);te!==-1?(T=te+2,G=D.indexOf("*/",T)):(S+=D[T],T++)}else S+=D[T],T++;return S}function Om(D){let S=jI(D.toString()),T=S.match(WI);if(T||(T=S.match(yT)),!T)throw new Error(`could not parse args in autoInject
|
||||
${i}`:n.stack}Ee.exports.fetch=function(e,r=void 0){return MKt(e,r).catch(s=>{throw e4e?n4e(s,e4e):s&&typeof s=="object"&&Error.captureStackTrace(s,Ee.exports.fetch),s})};Ee.exports.Headers=bE().Headers;Ee.exports.Response=jN().Response;Ee.exports.Request=fB().Request;Ee.exports.FormData=xL().FormData;var{setGlobalOrigin:UKt,getGlobalOrigin:vKt}=yX();Ee.exports.setGlobalOrigin=UKt;Ee.exports.getGlobalOrigin=vKt;var{CacheStorage:LKt}=P3e(),{kConstruct:_Kt}=Br();Ee.exports.caches=new LKt(_Kt);var{deleteCookie:PKt,getCookies:OKt,getSetCookies:HKt,setCookie:GKt,parseCookie:YKt}=X3e();Ee.exports.deleteCookie=PKt;Ee.exports.getCookies=OKt;Ee.exports.getSetCookies=HKt;Ee.exports.setCookie=GKt;Ee.exports.parseCookie=YKt;var{parseMIMEType:qKt,serializeAMimeType:VKt}=nA();Ee.exports.parseMIMEType=qKt;Ee.exports.serializeAMimeType=VKt;var{CloseEvent:JKt,ErrorEvent:WKt,MessageEvent:zKt}=j_(),{WebSocket:jKt,ping:KKt}=x8e();Ee.exports.WebSocket=jKt;Ee.exports.CloseEvent=JKt;Ee.exports.ErrorEvent=WKt;Ee.exports.MessageEvent=zKt;Ee.exports.ping=KKt;Ee.exports.WebSocketStream=P8e().WebSocketStream;Ee.exports.WebSocketError=Ute().WebSocketError;Ee.exports.request=o1(wB.request);Ee.exports.stream=o1(wB.stream);Ee.exports.pipeline=o1(wB.pipeline);Ee.exports.connect=o1(wB.connect);Ee.exports.upgrade=o1(wB.upgrade);Ee.exports.MockClient=QKt;Ee.exports.MockCallHistory=yKt;Ee.exports.MockCallHistoryLog=bKt;Ee.exports.MockPool=SKt;Ee.exports.MockAgent=wKt;Ee.exports.SnapshotAgent=NKt;Ee.exports.mockErrors=DKt;var{EventSource:ZKt}=$8e();Ee.exports.EventSource=ZKt;function XKt(){globalThis.fetch=Ee.exports.fetch,globalThis.Headers=Ee.exports.Headers,globalThis.Response=Ee.exports.Response,globalThis.Request=Ee.exports.Request,globalThis.FormData=Ee.exports.FormData,globalThis.WebSocket=Ee.exports.WebSocket,globalThis.CloseEvent=Ee.exports.CloseEvent,globalThis.ErrorEvent=Ee.exports.ErrorEvent,globalThis.MessageEvent=Ee.exports.MessageEvent,globalThis.EventSource=Ee.exports.EventSource}Ee.exports.install=XKt});var a1=E(_f=>{"use strict";_f.removeLeadingAndTrailingHTTPWhitespace=t=>t.replace(/^[ \t\n\r]+/u,"").replace(/[ \t\n\r]+$/u,"");_f.removeTrailingHTTPWhitespace=t=>t.replace(/[ \t\n\r]+$/u,"");_f.isHTTPWhitespaceChar=t=>t===" "||t===" "||t===`
|
||||
`||t==="\r";_f.solelyContainsHTTPTokenCodePoints=t=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(t);_f.soleyContainsHTTPQuotedStringTokenCodePoints=t=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(t);_f.asciiLowercase=t=>t.replace(/[A-Z]/ug,e=>e.toLowerCase());_f.collectAnHTTPQuotedString=(t,e)=>{let r="";for(e++;;){for(;e<t.length&&t[e]!=='"'&&t[e]!=="\\";)r+=t[e],++e;if(e>=t.length)break;let s=t[e];if(++e,s==="\\"){if(e>=t.length){r+="\\";break}r+=t[e],++e}else break}return[r,e]}});var a4e=E((q5r,o4e)=>{"use strict";var{asciiLowercase:uP,solelyContainsHTTPTokenCodePoints:$Kt,soleyContainsHTTPQuotedStringTokenCodePoints:eZt}=a1();o4e.exports=class{constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=uP(String(e)),this._map.get(e)}has(e){return e=uP(String(e)),this._map.has(e)}set(e,r){if(e=uP(String(e)),r=String(r),!$Kt(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!eZt(r))throw new Error(`Invalid MIME type parameter value "${r}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,r)}clear(){this._map.clear()}delete(e){return e=uP(String(e)),this._map.delete(e)}forEach(e,r){this._map.forEach(e,r)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}});var u4e=E((V5r,c4e)=>{"use strict";var{removeLeadingAndTrailingHTTPWhitespace:tZt,removeTrailingHTTPWhitespace:A4e,isHTTPWhitespaceChar:rZt,solelyContainsHTTPTokenCodePoints:Hte,soleyContainsHTTPQuotedStringTokenCodePoints:sZt,asciiLowercase:Gte,collectAnHTTPQuotedString:nZt}=a1();c4e.exports=t=>{t=tZt(t);let e=0,r="";for(;e<t.length&&t[e]!=="/";)r+=t[e],++e;if(r.length===0||!Hte(r)||e>=t.length)return null;++e;let s="";for(;e<t.length&&t[e]!==";";)s+=t[e],++e;if(s=A4e(s),s.length===0||!Hte(s))return null;let n={type:Gte(r),subtype:Gte(s),parameters:new Map};for(;e<t.length;){for(++e;rZt(t[e]);)++e;let i="";for(;e<t.length&&t[e]!==";"&&t[e]!=="=";)i+=t[e],++e;if(i=Gte(i),e<t.length){if(t[e]===";")continue;++e}let o=null;if(t[e]==='"')for([o,e]=nZt(t,e);e<t.length&&t[e]!==";";)++e;else{for(o="";e<t.length&&t[e]!==";";)o+=t[e],++e;if(o=A4e(o),o==="")continue}i.length>0&&Hte(i)&&sZt(o)&&!n.parameters.has(i)&&n.parameters.set(i,o)}return n}});var d4e=E((J5r,l4e)=>{"use strict";var{solelyContainsHTTPTokenCodePoints:iZt}=a1();l4e.exports=t=>{let e=`${t.type}/${t.subtype}`;if(t.parameters.size===0)return e;for(let[r,s]of t.parameters)e+=";",e+=r,e+="=",(!iZt(s)||s.length===0)&&(s=s.replace(/(["\\])/ug,"\\$1"),s=`"${s}"`),e+=s;return e}});var p4e=E((z5r,g4e)=>{"use strict";var oZt=a4e(),aZt=u4e(),AZt=d4e(),{asciiLowercase:h4e,solelyContainsHTTPTokenCodePoints:f4e}=a1();g4e.exports=class{constructor(e){e=String(e);let r=aZt(e);if(r===null)throw new Error(`Could not parse MIME type string "${e}"`);this._type=r.type,this._subtype=r.subtype,this._parameters=new oZt(r.parameters)}static parse(e){try{return new this(e)}catch{return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(e=h4e(String(e)),e.length===0)throw new Error("Invalid type: must be a non-empty string");if(!f4e(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(e=h4e(String(e)),e.length===0)throw new Error("Invalid subtype: must be a non-empty string");if(!f4e(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return AZt(this)}isJavaScript({prohibitParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}default:return!1}}isXML(){return this._subtype==="xml"&&(this._type==="text"||this._type==="application")||this._subtype.endsWith("+xml")}isHTML(){return this._subtype==="html"&&this._type==="text"}}});var O4e=E(Xs=>{"use strict";var Zte=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),HZt=Zte(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sync=t.isexe=void 0;var e=B("node:fs"),r=B("node:fs/promises"),s=async(a,A={})=>{let{ignoreErrors:c=!1}=A;try{return i(await(0,r.stat)(a),A)}catch(u){let l=u;if(c||l.code==="EACCES")return!1;throw l}};t.isexe=s;var n=(a,A={})=>{let{ignoreErrors:c=!1}=A;try{return i((0,e.statSync)(a),A)}catch(u){let l=u;if(c||l.code==="EACCES")return!1;throw l}};t.sync=n;var i=(a,A)=>a.isFile()&&o(a,A),o=(a,A)=>{let c=A.uid??process.getuid?.(),u=A.groups??process.getLine truncated
|
||||
globstar while`,e,l,r,d,h),this.matchOne(e.slice(l),r.slice(d),s))return this.debug("globstar found match!",l,a,h),!0;if(h==="."||h===".."||!n.dot&&h.charAt(0)==="."){this.debug("dot detected!",e,l,r,d);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(s&&(this.debug(`
|
||||
>>> no match, partial?`,e,l,r,d),l===a))}var f;if(typeof c=="string"?(f=u===c,this.debug("string match",c,u,f)):(f=u.match(c),this.debug("pattern match",c,u,f)),!f)return!1}if(i===a&&o===A)return!0;if(i===a)return s;if(o===A)return i===a-1&&e[i]==="";throw new Error("wtf?")}braceExpand(){return eGe(this.pattern,this.options)}parse(e,r){yP(e);let s=this.options;if(e==="**")if(s.noglobstar)e="*";else return Cc;if(e==="")return"";let n="",i=!1,o=!1,a=[],A=[],c,u=!1,l=-1,d=-1,h,f,p,C=e.charAt(0)===".",m=s.dot||C,I=()=>C?"":m?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",Q=x=>x.charAt(0)==="."?"":s.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",b=()=>{if(c){switch(c){case"*":n+=qre,i=!0;break;case"?":n+=Wre,i=!0;break;default:n+="\\"+c;break}this.debug("clearStateChar %j %j",c,n),c=!1}};for(let x=0,P;x<e.length&&(P=e.charAt(x));x++){if(this.debug("%s %s %s %j",e,x,n,P),o){if(P==="/")return!1;ZHe[P]&&(n+="\\"),n+=P,o=!1;continue}switch(P){case"/":return!1;case"\\":if(u&&e.charAt(x+1)==="-"){n+=P;continue}b(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,x,n,P),u){this.debug(" in class"),P==="!"&&x===d+1&&(P="^"),n+=P;continue}this.debug("call clearStateChar %j",c),b(),c=P,s.noext&&b();continue;case"(":{if(u){n+="(";continue}if(!c){n+="\\(";continue}let F={type:c,start:x-1,reStart:n.length,open:KHe[c].open,close:KHe[c].close};this.debug(this.pattern," ",F),a.push(F),n+=F.open,F.start===0&&F.type!=="!"&&(C=!0,n+=Q(e.slice(x+1))),this.debug("plType %j %j",c,n),c=!1;continue}case")":{let F=a[a.length-1];if(u||!F){n+="\\)";continue}a.pop(),b(),i=!0,f=F,n+=f.close,f.type==="!"&&A.push(Object.assign(f,{reEnd:n.length}));continue}case"|":{let F=a[a.length-1];if(u||!F){n+="\\|";continue}b(),n+="|",F.start===0&&F.type!=="!"&&(C=!0,n+=Q(e.slice(x+1)));continue}case"[":if(b(),u){n+="\\"+P;continue}u=!0,d=x,l=n.length,n+=P;continue;case"]":if(x===d+1||!u){n+="\\"+P;continue}h=e.substring(d+1,x);try{RegExp("["+PXt(LXt(h))+"]"),n+=P}catch{n=n.substring(0,l)+"(?:$.)"}i=!0,u=!1;continue;default:b(),ZHe[P]&&!(P==="^"&&u)&&(n+="\\"),n+=P;break}}for(u&&(h=e.slice(d+1),p=this.parse(h,Vre),n=n.substring(0,l)+"\\["+p[0],i=i||p[1]),f=a.pop();f;f=a.pop()){let x;x=n.slice(f.reStart+f.open.length),this.debug("setting tail",n,f),x=x.replace(/((?:\\{2}){0,64})(\\?)\|/g,(F,W,$)=>($||($="\\"),W+W+$+"|")),this.debug(`tail=%j
|
||||
%s`,x,x,f,n);let P=f.type==="*"?qre:f.type==="?"?Wre:"\\"+f.type;i=!0,n=n.slice(0,f.reStart)+P+"\\("+x}b(),o&&(n+="\\\\");let U=MXt[n.charAt(0)];for(let x=A.length-1;x>-1;x--){let P=A[x],F=n.slice(0,P.reStart),W=n.slice(P.reStart,P.reEnd-8),$=n.slice(P.reEnd),ee=n.slice(P.reEnd-8,P.reEnd)+$,ae=F.split(")").length,Be=F.split("(").length-ae,Me=$;for(let Mt=0;Mt<Be;Mt++)Me=Me.replace(/\)[+*?]?/,"");$=Me;let Pe=$===""&&r!==Vre?"(?:$|\\/)":"";n=F+W+$+Pe+ee}if(n!==""&&i&&(n="(?=.)"+n),U&&(n=I()+n),r===Vre)return[n,i];if(s.nocase&&!i&&(i=e.toUpperCase()!==e.toLowerCase()),!i)return vXt(e);let q=s.nocase?"i":"";try{return Object.assign(new RegExp("^"+n+"$",q),{_glob:e,_src:n})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,s=r.noglobstar?qre:r.dot?kXt:FXt,n=r.nocase?"i":"",i=e.map(o=>(o=o.map(a=>typeof a=="string"?_Xt(a):a===Cc?Cc:a._src).reduce((a,A)=>(a[a.length-1]===Cc&&A===Cc||a.push(A),a),[]),o.forEach((a,A)=>{a!==Cc||o[A-1]===Cc||(A===0?o.length>1?o[A+1]="(?:\\/|"+s+"\\/)?"+o[A+1]:o[A]=s:A===o.length-1?o[A-1]+="(?:\\/|"+s+")?":(o[A-1]+="(?:\\/|\\/"+s+"\\/)"+o[A+1],o[A+1]=Cc))}),o.filter(a=>a!==Cc).join("/"))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let s=this.options;Jre.sep!=="/"&&(e=e.split(Jre.sep).join("/")),e=e.split(XHe),this.debug(this.pattern,"split",e);let n=this.set;this.debug(this.pattern,"set",n);let i;for(let o=e.length-1;o>=0&&(i=e[o],!i);o--);for(let o=0;o<n.length;o++){let a=n[o],A=e;if(s.matchBase&&a.length===1&&(A=[i]),this.matchOne(A,a,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return ia.defaults(e).Minimatch}};ia.Minimatch=xB});var oGe=E((WYr,iGe)=>{iGe.exports=nGe;var Kre=B("fs"),{EventEmitter:OXt}=B("events"),{Minimatch:jre}=tGe(),{resolve:HXt}=B("path");function GXt(t,e){return new Promise((r,s)=>{Kre.readdir(t,{withFileTypes:!0},(n,i)=>{if(n)switch(n.code){case"ENOTDIR":e?s(n):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:s(n);break}else r(i)})})}function rGe(t,e){return new Promise((r,s)=>{(e?Kre.stat:Kre.lstat)(t,(i,o)=>{i?i.code==="ENOENT"?r(e?rGe(t,!1):null):r(null):r(o)})})}async function*sGe(t,e,r,s,n,i){let o=await GXt(e+t,i);for(let a of o){let A=a.name;A===void 0&&(A=a,s=!0);let c=t+"/"+A,u=c.slice(1),l=e+"/"+u,d=null;(s||r)&&(d=await rGe(l,r)),!d&&a.name!==void 0&&(d=a),d===null&&(d={isDirectory:()=>!1}),d.isDirectory()?n(u)||(yield{relative:u,absolute:l,stats:d},yield*sGe(c,e,r,s,n,!1)):yield{relative:u,absolute:l,stats:d}}}async function*YXt(t,e,r,s){yield*sGe("",t,e,r,s,!0)}function qXt(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var bP=class extends OXt{constructor(e,r,s){if(super(),typeof r=="function"&&(s=r,r=null),this.options=qXt(r||{}),this.matchers=[],this.options.pattern){let n=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=n.map(i=>new jre(i,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let n=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=n.map(i=>new jre(i,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let n=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=n.map(i=>new jre(i,{dot:!0}))}this.iterator=YXt(HXt(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,s&&(this._matches=[],this.on("match",n=>this._matches.push(this.options.absolute?n.absolute:n.relative)),this.on("error",n=>s(n)),this.on("end",()=>s(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let s=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(n=>n.match(s)))&&!this.ignoreMatchers.some(n=>n.match(s))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let s=e.value.relative,n=e.value.absolute;this.options.mark&&r&&(s+="/",n+="/"),this.options.stat?this.emit("match",{relative:s,absolute:n,stat:e.value.stats}):this.emit("match",{relative:s,absolute:n})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}):this
Line truncated
|
||||
`,S);S=H===-1?w.length:H}else if(M!==-1&&w[S]==="/"&&w[S+1]==="*"){let H=w.indexOf("*/",S);H!==-1?(S=H+2,M=w.indexOf("*/",S)):(y+=w[S],S++)}else y+=w[S],S++;return y}function kQ(w){let y=xQ(w.toString()),S=y.match(T3);if(S||(S=y.match(x3)),!S)throw new Error(`could not parse args in autoInject
|
||||
Source:
|
||||
`+S);let[,G]=T;return G.replace(/\s/g,"").split(zI).map(te=>te.replace(_m,"").trim())}function KI(D,S){var T={};return Object.keys(D).forEach(G=>{var te=D[G],se,ce=h(te),de=!ce&&te.length===1||ce&&te.length===0;if(Array.isArray(te))se=[...te],te=se.pop(),T[G]=se.concat(se.length>0?Ce:te);else if(de)T[G]=te;else{if(se=Om(te),te.length===0&&!ce&&se.length===0)throw new Error("autoInject task functions require explicit parameters.");ce||se.pop(),T[G]=se.concat(Ce)}function Ce(nt,vr){var Kr=se.map(_r=>nt[_r]);Kr.push(vr),C(te)(...Kr)}}),Ic(T,S)}class XI{constructor(){this.head=this.tail=null,this.length=0}removeLink(S){return S.prev?S.prev.next=S.next:this.head=S.next,S.next?S.next.prev=S.prev:this.tail=S.prev,S.prev=S.next=null,this.length-=1,S}empty(){for(;this.head;)this.shift();return this}insertAfter(S,T){T.prev=S,T.next=S.next,S.next?S.next.prev=T:this.tail=T,S.next=T,this.length+=1}insertBefore(S,T){T.prev=S.prev,T.next=S,S.prev?S.prev.next=T:this.head=T,S.prev=T,this.length+=1}unshift(S){this.head?this.insertBefore(this.head,S):ZI(this,S)}push(S){this.tail?this.insertAfter(this.tail,S):ZI(this,S)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var S=this.head;S;)yield S.data,S=S.next}remove(S){for(var T=this.head;T;){var{next:G}=T;S(T)&&this.removeLink(T),T=G}return this}}function ZI(D,S){D.length=1,D.head=D.tail=S}function Hm(D,S,T){if(S==null)S=1;else if(S===0)throw new RangeError("Concurrency must not be zero");var G=C(D),te=0,se=[];let ce={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function de(wt,tt){ce[wt].push(tt)}function Ce(wt,tt){let Nt=(...Or)=>{nt(wt,Nt),tt(...Or)};ce[wt].push(Nt)}function nt(wt,tt){if(!wt)return Object.keys(ce).forEach(Nt=>ce[Nt]=[]);if(!tt)return ce[wt]=[];ce[wt]=ce[wt].filter(Nt=>Nt!==tt)}function vr(wt,...tt){ce[wt].forEach(Nt=>Nt(...tt))}var Kr=!1;function _r(wt,tt,Nt,Or){if(Or!=null&&typeof Or!="function")throw new Error("task callback must be a function");Xr.started=!0;var fs,so;function Du(rB,...RT){if(rB)return Nt?so(rB):fs();if(RT.length<=1)return fs(RT[0]);fs(RT)}var Zy=Xr._createTaskItem(wt,Nt?Du:Or||Du);if(tt?Xr._tasks.unshift(Zy):Xr._tasks.push(Zy),Kr||(Kr=!0,c(()=>{Kr=!1,Xr.process()})),Nt||!Or)return new Promise((rB,RT)=>{fs=rB,so=RT})}function Ru(wt){return function(tt,...Nt){te-=1;for(var Or=0,fs=wt.length;Or<fs;Or++){var so=wt[Or],Du=se.indexOf(so);Du===0?se.shift():Du>0&&se.splice(Du,1),so.callback(tt,...Nt),tt!=null&&vr("error",tt,so.data)}te<=Xr.concurrency-Xr.buffer&&vr("unsaturated"),Xr.idle()&&vr("drain"),Xr.process()}}function Xy(wt){return wt.length===0&&Xr.idle()?(c(()=>vr("drain")),!0):!1}let tB=wt=>tt=>{if(!tt)return new Promise((Nt,Or)=>{Ce(wt,(fs,so)=>{if(fs)return Or(fs);Nt(so)})});nt(wt),de(wt,tt)};var ST=!1,Xr={_tasks:new XI,_createTaskItem(wt,tt){return{data:wt,callback:tt}},*[Symbol.iterator](){yield*Xr._tasks[Symbol.iterator]()},concurrency:S,payload:T,buffer:S/4,started:!1,paused:!1,push(wt,tt){return Array.isArray(wt)?Xy(wt)?void 0:wt.map(Nt=>_r(Nt,!1,!1,tt)):_r(wt,!1,!1,tt)},pushAsync(wt,tt){return Array.isArray(wt)?Xy(wt)?void 0:wt.map(Nt=>_r(Nt,!1,!0,tt)):_r(wt,!1,!0,tt)},kill(){nt(),Xr._tasks.empty()},unshift(wt,tt){return Array.isArray(wt)?Xy(wt)?void 0:wt.map(Nt=>_r(Nt,!0,!1,tt)):_r(wt,!0,!1,tt)},unshiftAsync(wt,tt){return Array.isArray(wt)?Xy(wt)?void 0:wt.map(Nt=>_r(Nt,!0,!0,tt)):_r(wt,!0,!0,tt)},remove(wt){Xr._tasks.remove(wt)},process(){if(!ST){for(ST=!0;!Xr.paused&&te<Xr.concurrency&&Xr._tasks.length;){var wt=[],tt=[],Nt=Xr._tasks.length;Xr.payload&&(Nt=Math.min(Nt,Xr.payload));for(var Or=0;Or<Nt;Or++){var fs=Xr._tasks.shift();wt.push(fs),se.push(fs),tt.push(fs.data)}te+=1,Xr._tasks.length===0&&vr("empty"),te===Xr.concurrency&&vr("saturated");var so=Z(Ru(wt));G(tt,so)}ST=!1}},length(){return Xr._tasks.length},running(){return te},workersList(){return se},idle(){return Xr._tasks.length+te===0},pause(){Xr.paused=!0},resume(){Xr.paused!==!1&&(Xr.paused=!1,c(Xr.process))}};return Object.defineProperties(Xr,{saturated:{writable:!1,value:tB("saturated")},unsaturated:{writable:!1,value:tB("unsaturated")},empty:{writable:!1,value:tB("empty")},drain:{writable:!1,value:tB("drain")},error:{writable:!1,value:tB("error")}}),Xr}function $I(D,S){return Hm(D,1,S)}function Uf(D,S,T){return Hm(D,S,T)}function BA(D,S,T,G){G=z(G);var te=C(T);return qn(D,(se,ce,de)=>{te(S,se,(Ce,nt)=>{S=nt,de(Ce)})},se=>G(se,S))}var QA=m(BA,4);function qm(...D){var S=D.map(C);return function(...T){var G=this,te=T[T.length-1];return typeof te=="function"?T.pop():te=od(),QA(S,T,(se,ce,de)=>{ce.apply(G,se.concat((Ce,...nt)=>{de(Ce,nt)}))},(se,ce)=>te(se,...ce)),te[id]}}function eB(...D){return qm(...D.reverse())}function Ke(D,S,T,G){return y(Se(S),D,T,G)}var $=m(Ke,4);function M(D,S,T,G){var te=C(T);return $(D,S,(se,ce)=>{te(se,(de,...Ce)=>de?ce(de):ce(de,Ce))},(se,ce)=>{for(var de=[],Ce=0;Ce<ce.length;Ce++)ce[Ce]&&(de=de.concat(...ce[Ce]));return
Line truncated
|
||||
GFS4: `),console.error(t)});Hs[Zo]||(Kyt=global[Zo]||[],Zyt(Hs,Kyt),Hs.close=(function(t){function e(r,n){return t.call(Hs,r,function(s){s||Xyt(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Gj,{value:t}),e})(Hs.close),Hs.closeSync=(function(t){function e(r){t.apply(Hs,arguments),Xyt()}return Object.defineProperty(e,Gj,{value:t}),e})(Hs.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){By(Hs[Zo]),B("assert").equal(Hs[Zo].length,0)}));var Kyt;global[Zo]||Zyt(global,Hs[Zo]);KNe.exports=zNe(ton(Hs));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Hs.__patched&&(KNe.exports=zNe(Hs),Hs.__patched=!0);function zNe(t){$in(t),t.gracefulify=zNe,t.createReadStream=H,t.createWriteStream=z;var e=t.readFile;t.readFile=r;function r(U,ee,oe){return typeof ee=="function"&&(oe=ee,ee=null),Z(U,ee,oe);function Z(he,Se,Je,He){return e(he,Se,function($t){$t&&($t.code==="EMFILE"||$t.code==="ENFILE")?Rx([Z,[he,Se,Je],$t,He||Date.now(),Date.now()]):typeof Je=="function"&&Je.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=s;function s(U,ee,oe,Z){return typeof oe=="function"&&(Z=oe,oe=null),he(U,ee,oe,Z);function he(Se,Je,He,$t,en){return n(Se,Je,He,function(er){er&&(er.code==="EMFILE"||er.code==="ENFILE")?Rx([he,[Se,Je,He,$t],er,en||Date.now(),Date.now()]):typeof $t=="function"&&$t.apply(this,arguments)})}}var i=t.appendFile;i&&(t.appendFile=o);function o(U,ee,oe,Z){return typeof oe=="function"&&(Z=oe,oe=null),he(U,ee,oe,Z);function he(Se,Je,He,$t,en){return i(Se,Je,He,function(er){er&&(er.code==="EMFILE"||er.code==="ENFILE")?Rx([he,[Se,Je,He,$t],er,en||Date.now(),Date.now()]):typeof $t=="function"&&$t.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=A);function A(U,ee,oe,Z){return typeof oe=="function"&&(Z=oe,oe=0),he(U,ee,oe,Z);function he(Se,Je,He,$t,en){return a(Se,Je,He,function(er){er&&(er.code==="EMFILE"||er.code==="ENFILE")?Rx([he,[Se,Je,He,$t],er,en||Date.now(),Date.now()]):typeof $t=="function"&&$t.apply(this,arguments)})}}var c=t.readdir;t.readdir=l;var u=/^v[0-5]\./;function l(U,ee,oe){typeof ee=="function"&&(oe=ee,ee=null);var Z=u.test(process.version)?function(Je,He,$t,en){return c(Je,he(Je,He,$t,en))}:function(Je,He,$t,en){return c(Je,He,he(Je,He,$t,en))};return Z(U,ee,oe);function he(Se,Je,He,$t){return function(en,er){en&&(en.code==="EMFILE"||en.code==="ENFILE")?Rx([Z,[Se,Je,He],en,$t||Date.now(),Date.now()]):(er&&er.sort&&er.sort(),typeof He=="function"&&He.call(this,en,er))}}}if(process.version.substr(0,4)==="v0.8"){var d=eon(t);m=d.ReadStream,y=d.WriteStream}var h=t.ReadStream;h&&(m.prototype=Object.create(h.prototype),m.prototype.open=I);var g=t.WriteStream;g&&(y.prototype=Object.create(g.prototype),y.prototype.open=w),Object.defineProperty(t,"ReadStream",{get:function(){return m},set:function(U){m=U},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return y},set:function(U){y=U},enumerable:!0,configurable:!0});var p=m;Object.defineProperty(t,"FileReadStream",{get:function(){return p},set:function(U){p=U},enumerable:!0,configurable:!0});var C=y;Object.defineProperty(t,"FileWriteStream",{get:function(){return C},set:function(U){C=U},enumerable:!0,configurable:!0});function m(U,ee){return this instanceof m?(h.apply(this,arguments),this):m.apply(Object.create(m.prototype),arguments)}function I(){var U=this;W(U.path,U.flags,U.mode,function(ee,oe){ee?(U.autoClose&&U.destroy(),U.emit("error",ee)):(U.fd=oe,U.emit("open",oe),U.read())})}function y(U,ee){return this instanceof y?(g.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function w(){var U=this;W(U.path,U.flags,U.mode,function(ee,oe){ee?(U.destroy(),U.emit("error",ee)):(U.fd=oe,U.emit("open",oe))})}function H(U,ee){return new t.ReadStream(U,ee)}function z(U,ee){return new t.WriteStream(U,ee)}var F=t.open;t.open=W;function W(U,ee,oe,Z){return typeof oe=="function"&&(Z=oe,oe=null),he(U,ee,oe,Z);function he(Se,Je,He,$t,en){return F(Se,Je,He,function(er,Ln){er&&(er.code==="EMFILE"||er.code==="ENFILE")?Rx([he,[Se,Je,He,$t],er,en||Date.now(),Date.now()]):typeof $t=="function"&&$t.apply(this,arguments)})}}return t}function Rx(t){By("ENQUEUE",t[0].name,t[1]),Hs[Zo].push(t),jNe()}var qj;function Xyt(){for(var t=Date.now(),e=0;e<Hs[Zo].length;++e)Hs[Zo][e].length>2&&(Hs[Zo][e][3]=t,Hs[Zo][e][4]=t);jNe()}function jNe(){if(clearTimeout(qj),qj=void 0,Hs[Zo].length!==0){var t=Hs[Zo].shift(),e=t[0],r=t[1],n=t[2],s=t[3],i=t[4];if(s===void 0)By("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-s>=6e4){By("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-i,A=Math.max(i-s,1),c=Math.min(A*1.2,100);a>=c?(By("RETRY",e.name,r),e.apply(null,r.concat([s]))):Hs[Zo].push(t)}qj===void 0&&(qj=setTimeout(jNe,0))}}});var Yj=f((ons,$yt)=>{"use strict";var yf=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";yf.writable=t=>yf(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=
Line truncated
|
||||
`;super(r),this.name="AggregateError",this.errors=e}};TNt.exports={AggregateError:kSe,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var FSe=f((pss,kNt)=>{"use strict";kNt.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let s=e.shift();return n==="f"?s.toFixed(6):n==="j"?JSON.stringify(s):n==="s"&&typeof s=="object"?`${s.constructor!==Object?s.constructor.name:""} {}`.trim():s.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var va=f((mss,vNt)=>{"use strict";var{format:wun,inspect:c7}=FSe(),{AggregateError:Nun}=xs(),Sun=globalThis.AggregateError||Nun,Run=Symbol("kIsNodeError"),Dun=["string","function","number","object","Function","Object","boolean","bigint","symbol"],xun=/^([A-Z][a-z0-9]*)+$/,Tun="__node_internal_",u7={};function by(t,e){if(!t)throw new u7.ERR_INTERNAL_ASSERTION(e)}function FNt(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function kun(t,e,r){if(typeof e=="function")return by(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return by(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:wun(e,...r)}function ea(t,e,r){r||(r=Error);class n extends r{constructor(...i){super(kun(t,e,i))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[Run]=!0,u7[t]=n}function MNt(t){let e=Tun+t.name;return Object.defineProperty(t,"name",{value:e}),t}function Fun(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new Sun([e,t],e.message);return r.code=e.code,r}return t||e}var MSe=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new u7.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};ea("ERR_ASSERTION","%s",Error);ea("ERR_INVALID_ARG_TYPE",(t,e,r)=>{by(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";let s=[],i=[],o=[];for(let A of e)by(typeof A=="string","All expected entries have to be of type string"),Dun.includes(A)?s.push(A.toLowerCase()):xun.test(A)?i.push(A):(by(A!=="object",'The value "object" should be written as "Object"'),o.push(A));if(i.length>0){let A=s.indexOf("object");A!==-1&&(s.splice(s,A,1),i.push("Object"))}if(s.length>0){switch(s.length){case 1:n+=`of type ${s[0]}`;break;case 2:n+=`one of type ${s[0]} or ${s[1]}`;break;defaulLine truncated
|
||||
globstar while`,e,d,r,h,g),this.matchOne(e.slice(d),r.slice(h),n))return this.debug("globstar found match!",d,A,g),!0;if(g==="."||g===".."||!s.dot&&g.charAt(0)==="."){this.debug("dot detected!",e,d,r,h);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(n&&(this.debug(`
|
||||
>>> no match, partial?`,e,d,r,h),d===A))}let p;if(typeof u=="string"?(p=l===u,this.debug("string match",u,l,p)):(p=u.test(l),this.debug("pattern match",u,l,p)),!p)return!1}if(o===A&&a===c)return!0;if(o===A)return n;if(a===c)return o===A-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return(0,et.braceExpand)(this.pattern,this.options)}parse(e){(0,Z7.assertValidPattern)(e);let r=this.options;if(e==="**")return et.GLOBSTAR;if(e==="")return"";let n,s=null;(n=e.match(oCn))?s=r.dot?ACn:aCn:(n=e.match(KEn))?s=(r.nocase?r.dot?eCn:$En:r.dot?ZEn:XEn)(n[1]):(n=e.match(cCn))?s=(r.nocase?r.dot?lCn:uCn:r.dot?dCn:hCn)(n):(n=e.match(tCn))?s=r.dot?nCn:rCn:(n=e.match(sCn))&&(s=iCn);let i=GTt.AST.fromGlob(e,this.options).toMMPattern();return s&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:s}),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,n=r.noglobstar?fCn:r.dot?pCn:mCn,s=new Set(r.nocase?["i"]:[]),i=e.map(A=>{let c=A.map(u=>{if(u instanceof RegExp)for(let l of u.flags.split(""))s.add(l);return typeof u=="string"?yCn(u):u===et.GLOBSTAR?et.GLOBSTAR:u._src});return c.forEach((u,l)=>{let d=c[l+1],h=c[l-1];u!==et.GLOBSTAR||h===et.GLOBSTAR||(h===void 0?d!==void 0&&d!==et.GLOBSTAR?c[l+1]="(?:\\/|"+n+"\\/)?"+d:c[l]=n:d===void 0?c[l-1]=h+"(?:\\/|"+n+")?":d!==et.GLOBSTAR&&(c[l-1]=h+"(?:\\/|\\/"+n+"\\/)"+d,c[l+1]=et.GLOBSTAR))}),c.filter(u=>u!==et.GLOBSTAR).join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];i="^"+o+i+a+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...s].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 n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let i=this.set;this.debug(this.pattern,"set",i);let o=s[s.length-1];if(!o)for(let a=s.length-2;!o&&a>=0;a--)o=s[a];for(let a=0;a<i.length;a++){let A=i[a],c=s;if(n.matchBase&&A.length===1&&(c=[o]),this.matchOne(c,A,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return et.minimatch.defaults(e).Minimatch}};et.Minimatch=Ly;var bCn=sDe();Object.defineProperty(et,"AST",{enumerable:!0,get:function(){return bCn.AST}});var wCn=iDe();Object.defineProperty(et,"escape",{enumerable:!0,get:function(){return wCn.escape}});var NCn=W7();Object.defineProperty(et,"unescape",{enumerable:!0,get:function(){return NCn.unescape}});et.minimatch.AST=GTt.AST;et.minimatch.Minimatch=Ly;et.minimatch.escape=WEn.escape;et.minimatch.unescape=zEn.unescape});var XTt=f(eK=>{"use strict";Object.defineProperty(eK,"__esModule",{value:!0});eK.LRUCache=void 0;var rT=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,zTt=new Set,oDe=typeof process=="object"&&process?process:{},jTt=(t,e,r,n)=>{typeof oDe.emitWarning=="function"?oDe.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},$7=globalThis.AbortController,WTt=globalThis.AbortSignal;if(typeof $7>"u"){WTt=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,s){this._onabort.push(s)}},$7=class{constructor(){e()}signal=new WTt;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let s of this.signal._onabort)s(n);this.signal.onabort?.(n)}}};let t=oDe.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,jTt("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 SCn=t=>!zTt.has(t),TI=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),KTt=t=>TI(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?nT:null:null,nT=class extends Array{constructor(e){super(e),this.fill(0)}},aDe=class t{heap;length;static#e=!1;static create(e){let r=KTt(e);if(!r)return[];t.#e=!0;let n=new t(e,r);return t.#e=!1,n}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},ADe=class t{#e;#t;#n;#r;#s;#i;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#o;#A;#c;#u;#h;#g;#f;#p;#y;#E;#b;#w;#I;#B;#Q;
Line truncated
|
||||
`)),e.linkname&&(r+=dxe(" linkpath="+e.linkname+`
|
||||
`));let n=e.pax;if(n)for(let s in n)r+=dxe(" "+s+"="+n[s]+`
|
||||
`);return zr.from(r)};fT.decodePax=function(e){let r={};for(;e.length;){let n=0;for(;n<e.length&&e[n]!==32;)n++;let s=parseInt(zr.toString(e.subarray(0,n)),10);if(!s)return r;let i=zr.toString(e.subarray(n+1,s-1)),o=i.indexOf("=");if(o===-1)return r;r[i.slice(0,o)]=i.slice(o+1),e=e.subarray(s)}return r};fT.encode=function(e){let r=zr.alloc(512),n=e.name,s="";if(e.typeflag===5&&n[n.length-1]!=="/"&&(n+="/"),zr.byteLength(n)!==n.length)return null;for(;zr.byteLength(n)>100;){let i=n.indexOf("/");if(i===-1)return null;s+=s?"/"+n.slice(0,i):n.slice(0,i),n=n.slice(i+1)}return zr.byteLength(n)>100||zr.byteLength(s)>155||e.linkname&&zr.byteLength(e.linkname)>100?null:(zr.write(r,n),zr.write(r,_I(e.mode&H0n,6),100),zr.write(r,_I(e.uid,6),108),zr.write(r,_I(e.gid,6),116),z0n(e.size,r,124),zr.write(r,_I(e.mtime.getTime()/1e3|0,11),136),r[156]=UK+V0n(e.type),e.linkname&&zr.write(r,e.linkname,157),zr.copy(r2t,r,dP),zr.copy(P0n,r,hxe),e.uname&&zr.write(r,e.uname,265),e.gname&&zr.write(r,e.gname,297),zr.write(r,_I(e.devmajor||0,6),329),zr.write(r,_I(e.devminor||0,6),337),s&&zr.write(r,s,345),zr.write(r,_I(s2t(r),6),148),r)};fT.decode=function(e,r,n){let s=e[156]===0?0:e[156]-UK,i=gT(e,0,100,r),o=PI(e,100,8),a=PI(e,108,8),A=PI(e,116,8),c=PI(e,124,12),u=PI(e,136,12),l=J0n(s),d=e[157]===0?null:gT(e,157,100,r),h=gT(e,265,32),g=gT(e,297,32),p=PI(e,329,8),C=PI(e,337,8),m=s2t(e);if(m===256)return null;if(m!==PI(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(q0n(e))e[345]&&(i=gT(e,345,155,r)+"/"+i);else if(!G0n(e)){if(!n)throw new Error("Invalid tar header: unknown format.")}return s===0&&i&&i[i.length-1]==="/"&&(s=5),{name:i,mode:o,uid:a,gid:A,size:c,mtime:new Date(1e3*u),type:l,linkname:d,uname:h,gname:g,devmajor:p,devminor:C,pax:null}};function q0n(t){return zr.equals(r2t,t.subarray(dP,dP+6))}function G0n(t){return zr.equals(_0n,t.subarray(dP,dP+6))&&zr.equals(O0n,t.subarray(hxe,hxe+2))}function Y0n(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function J0n(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function V0n(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function n2t(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n}function s2t(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function _I(t,e){return t=t.toString(8),t.length>e?U0n.slice(0,e)+" ":L0n.slice(0,e-t.length)+t+" "}function W0n(t,e,r){e[r]=128;for(let n=11;n>0;n--)e[r+n]=t&255,t=Math.floor(t/256)}function z0n(t,e,r){t.toString(8).length>11?W0n(t,e,r):zr.write(e,_I(t,11),r)}function j0n(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let r=[],n;for(n=t.length-1;n>0;n--){let o=t[n];e?r.push(o):r.push(255-o)}let s=0,i=r.length;for(n=0;n<i;n++)s+=r[n]*Math.pow(256,n);return e?s:-1*s}function PI(t,e,r){if(t=t.subarray(e,e+r),e=0,t[e]&128)return j0n(t);{for(;e<t.length&&t[e]===32;)e++;let n=Y0n(n2t(t,32,e,t.length),t.length,t.length);for(;e<n&&t[e]===0;)e++;return n===e?0:parseInt(zr.toString(t.subarray(e,n)),8)}}function gT(t,e,r,n){return zr.toString(t.subarray(e,n2t(t,0,e,e+r)),n)}function dxe(t){let e=zr.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t}});var c2t=f((Gos,A2t)=>{var{Writable:K0n,Readable:X0n,getStreamError:i2t}=lxe(),Z0n=KDe(),o2t=cT(),pT=gxe(),$0n=o2t.alloc(0),pxe=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new Z0n,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return $0n;let r=this._next(e);if(e===r.byteLength)return r;let n=[r];for(;(e-=r.byteLength)>0;)r=this._next(e),n.push(r);return o2t.concat(n)}_next(e){let r=this.queue.peek(),n=r.byteLength-this._offset;if(e>=n){let s=this._offset?r.subarray(this._offset,r.byteLength):r;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,s}return this.buffered-=e,this.shifted+=e,r.subarray(this._offset,this._offset+=e)}},mxe=class extends X0n{constructor(e,r,n){super(),this.header=r,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(i2t(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=a2t(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},Exe=class extends K
Line truncated
|
||||
`).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}function iPe(t,e){if(process.env.GITHUB_OUTPUT||"")return DT("OUTPUT",OP(t,e));process.stdout.write(xee.EOL),ad("set-output",{name:t},Eh(e))}function RB(t){process.exitCode=Dee.Failure,F1(t)}function DB(){return process.env.RUNNER_DEBUG==="1"}function Te(t){ad("debug",{},t)}function F1(t,e={}){ad("error",UP(e),t instanceof Error?t.toString():t)}function tr(t,e={}){ad("warning",UP(e),t instanceof Error?t.toString():t)}function oPe(t,e={}){ad("notice",UP(e),t instanceof Error?t.toString():t)}function pe(t){process.stdout.write(t+xee.EOL)}function g5t(t){XK("group",t)}function f5t(){XK("endgroup")}function tp(t,e){return h5t(this,void 0,void 0,function*(){g5t(t);let r;try{r=yield e()}finally{f5t()}return r})}function DA(t,e){if(process.env.GITHUB_STATE||"")return DT("STATE",OP(t,e));ad("save-state",{name:t},Eh(e))}function xB(t){return process.env[`STATE_${t}`]||""}import*as jBe from"fs";import*as KBe from"path";import*as LW from"os";var Vje=Xe(Z2(),1),CBr="[Cache was enabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#caching-build-state-between-jobs). Action attempted to both restore and save the Gradle User Home.",IBr="[Cache was read-only](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#using-the-cache-read-only). By default, the action will only write to the cache for Jobs running on the default branch.",BBr="[Cache was disabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#disabling-caching). Gradle User Home was not restored from or saved to the cache.",QBr="[Cache was set to write-only](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#using-the-cache-write-only). Gradle User Home was not restored from cache.",Wje="[Cache was disabled to avoid overwriting a pre-existing Gradle User Home](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#overwriting-an-existing-gradle-user-home). Gradle User Home was not restored from or saved to the cache.",Yje="[Cache cleanup](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#configuring-cache-cleanup) is always disabled when cache is read-only or disabled.",yBr="[Cache cleanup](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#configuring-cache-cleanup) was enabled. Stale files in Gradle User Home were purged before saving to the cache.",Jje="[Cache cleanup](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#configuring-cache-cleanup) was disabled via action parameter. No cleanup of Gradle User Home was performed.";var IY=class t{constructor(){this.cacheEntries=[];this.cacheReadOnly=!1;this.cacheWriteOnly=!1;this.cacheDisabled=!1;this.cacheStatusReason=CBr;this.cacheCleanupMessage=Jje}get fullyRestored(){return this.cacheEntries.every(e=>!e.wasRequestedButNotRestored())}get cacheStatus(){return Vje.isFeatureAvailable()?this.cacheDisabled?"disabled":this.cacheWriteOnly?"write-only":this.cacheReadOnly?"read-only":"enabled":"not available"}setReadOnly(e=IBr){this.cacheReadOnly=!0,this.cacheStatusReason=e,this.cacheCleanupMessage=Yje}setDisabled(e=BBr){this.cacheDisabled=!0,this.cacheStatusReason=e,this.cacheCleanupMessage=Yje}setWriteOnly(e=QBr){this.cacheWriteOnly=!0,this.cacheStatusReason=e}setCacheCleanupEnabled(){this.cacheCleanupMessage=yBr}setCacheCleanupDisabled(e=Jje){this.cacheCleanupMessage=e}entry(e){for(let n of this.cacheEntries)if(n.entryName===e)return n;let r=new BY(e);return this.cacheEntries.push(r),r}stringify(){return JSON.stringify(this)}static rehydrate(e){if(e==="")return new t;let r=Object.assign(new t,JSON.parse(e)),n=r.cacheEntries;for(let s=0;s<n.length;s++){let i=n[s];n[s]=Object.assign(new BY(i.entryName),i)}return r}},BY=class{constructor(e){this.entryName=e}wasRequestedButNotRestored(){return this.requestedKey!==void 0&&this.restoredKey===void 0}markRequested(e,r=[]){return this.requestedKey=e,this.requestedRestoreKeys=r,this}markRestored(e,r,n){return this.restoredKey=e,this.restoredSize=r,this.restoredTime=n,this}markNotRestored(e){return this.notRestored=e,this}markSaved(e,r,n){return this.savedKey=e,this.savedSize=r,this.savedTime=n,this}markAlreadyExists(e){return this.savedKey=e,this.savedSize=0,this}markNotSaved(e){return this.notSaved=e,this}};import*as YS from"fs";function Oue(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,Te(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,Te(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.matchDirectories=="boolean"&&(e.matchDirectories=t.matchDirectories,Te(`matchDirectories '${e.matchDirectories}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,Te(`omitBrokenSymbolicLine truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`));let s=e.split(`
|
||||
`).map(i=>i.trim());for(let i of s)!i||i.startsWith("#")||n.patterns.push(new rF(i));return n.searchPaths.push(...que(n.patterns)),n})}static stat(e,r,n){return Gue(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield YS.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Te(`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 s=yield YS.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let i=yield YS.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===i)){Te(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return s})}};import*as Yue from"crypto";import*as wY from"fs";import*as $je from"stream";import*as e7e from"util";import*as t7e from"path";var TBr=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})},kBr=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(o){return new Promise(function(a,A){o=t[i](o),s(a,A,o.done,o.value)})}}function s(i,o,a,A){Promise.resolve(A).then(function(c){i({value:c,done:a})},o)}};function r7e(t,e){return TBr(this,arguments,void 0,function*(r,n,s=!1){var i,o,a,A,c;let u=s?pe:Te,l=!1,d=n||((c=process.env.GITHUB_WORKSPACE)!==null&&c!==void 0?c:process.cwd()),h=Yue.createHash("sha256"),g=0;try{for(var p=!0,C=kBr(r.globGenerator()),m;m=yield C.next(),i=m.done,!i;p=!0){A=m.value,p=!1;let I=A;if(u(I),!I.startsWith(`${d}${t7e.sep}`)){u(`Ignore '${I}' since it is not under GITHUB_WORKSPACE.`);continue}if(wY.statSync(I).isDirectory()){u(`Skip directory '${I}'.`);continue}let y=Yue.createHash("sha256");yield e7e.promisify($je.pipeline)(wY.createReadStream(I),y),h.write(y.digest()),g++,l||(l=!0)}}catch(I){o={error:I}}finally{try{!p&&!i&&(a=C.return)&&(yield a.call(C))}finally{if(o)throw o.error}}return h.end(),l?(u(`Found ${g} files to hash.`),h.digest("hex")):(u("No matches found for glob"),"")})}var n7e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};function iC(t,e){return n7e(this,void 0,void 0,function*(){return yield yY.create(t,e)})}function s7e(t){return n7e(this,arguments,void 0,function*(e,r="",n,s=!1){let i=!0;n&&typeof n.followSymbolicLinks=="boolean"&&(i=n.followSymbolicLinks);let o=yield iC(e,{followSymbolicLinks:i});return r7e(o,r,s)})}import Jp from"path";import ic from"fs";import{readFileSync as FBr,existsSync as MBr}from"fs";import{EOL as vBr}from"os";var JS=class{constructor(){var e,r,n;if(this.payload={},process.env.GITHUB_EVENT_PATH)if(MBr(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse(FBr(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}));else{let s=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${s} does not exist${vBr}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:"https://api.github.com",this.serverUrl=(r=process.env.GITHUB_SERVER_URL)!==null&&r!==void 0?r:"https://github.com",this.graphqlUrl=(n=process.env.GITHUB_GRAPHQL_URL)!==null&&n!==void 0?n:"https://api.github.com/graphql"}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,r]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:r}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}};var gge=Xe(knt(),1),Fnt=Xe(uge(),1),r2r=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u
Line truncated
|
||||
`+y);let[,M]=S;return M.replace(/\s/g,"").split(kD).map(H=>H.replace(FD,"").trim())}function FQ(w,y){var S={};return Object.keys(w).forEach(M=>{var H=w[M],V,z=h(H),j=!z&&H.length===1||z&&H.length===0;if(Array.isArray(H))V=[...H],H=V.pop(),S[M]=V.concat(V.length>0?re:H);else if(j)S[M]=H;else{if(V=kQ(H),H.length===0&&!z&&V.length===0)throw new Error("autoInject task functions require explicit parameters.");z||V.pop(),S[M]=V.concat(re)}function re(De,Ut){var Kt=V.map(Ot=>De[Ot]);Kt.push(Ut),C(H)(...Kt)}}),TQ(S,y)}class MQ{constructor(){this.head=this.tail=null,this.length=0}removeLink(y){return y.prev?y.prev.next=y.next:this.head=y.next,y.next?y.next.prev=y.prev:this.tail=y.prev,y.prev=y.next=null,this.length-=1,y}empty(){for(;this.head;)this.shift();return this}insertAfter(y,S){S.prev=y,S.next=y.next,y.next?y.next.prev=S:this.tail=S,y.next=S,this.length+=1}insertBefore(y,S){S.prev=y.prev,S.next=y,y.prev?y.prev.next=S:this.head=S,y.prev=S,this.length+=1}unshift(y){this.head?this.insertBefore(this.head,y):UQ(this,y)}push(y){this.tail?this.insertAfter(this.tail,y):UQ(this,y)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var y=this.head;y;)yield y.data,y=y.next}remove(y){for(var S=this.head;S;){var{next:M}=S;y(S)&&this.removeLink(S),S=M}return this}}function UQ(w,y){w.length=1,w.head=w.tail=y}function pm(w,y,S){if(y==null)y=1;else if(y===0)throw new RangeError("Concurrency must not be zero");var M=C(w),H=0,V=[];let z={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function j(qe,we){z[qe].push(we)}function re(qe,we){let Ve=(...Ht)=>{De(qe,Ve),we(...Ht)};z[qe].push(Ve)}function De(qe,we){if(!qe)return Object.keys(z).forEach(Ve=>z[Ve]=[]);if(!we)return z[qe]=[];z[qe]=z[qe].filter(Ve=>Ve!==we)}function Ut(qe,...we){z[qe].forEach(Ve=>Ve(...we))}var Kt=!1;function Ot(qe,we,Ve,Ht){if(Ht!=null&&typeof Ht!="function")throw new Error("task callback must be a function");Zt.started=!0;var Or,sn;function da(hg,...GQ){if(hg)return Ve?sn(hg):Or();if(GQ.length<=1)return Or(GQ[0]);Or(GQ)}var Im=Zt._createTaskItem(qe,Ve?da:Ht||da);if(we?Zt._tasks.unshift(Im):Zt._tasks.push(Im),Kt||(Kt=!0,c(()=>{Kt=!1,Zt.process()})),Ve||!Ht)return new Promise((hg,GQ)=>{Or=hg,sn=GQ})}function la(qe){return function(we,...Ve){H-=1;for(var Ht=0,Or=qe.length;Ht<Or;Ht++){var sn=qe[Ht],da=V.indexOf(sn);da===0?V.shift():da>0&&V.splice(da,1),sn.callback(we,...Ve),we!=null&&Ut("error",we,sn.data)}H<=Zt.concurrency-Zt.buffer&&Ut("unsaturated"),Zt.idle()&&Ut("drain"),Zt.process()}}function Cm(qe){return qe.length===0&&Zt.idle()?(c(()=>Ut("drain")),!0):!1}let dg=qe=>we=>{if(!we)return new Promise((Ve,Ht)=>{re(qe,(Or,sn)=>{if(Or)return Ht(Or);Ve(sn)})});De(qe),j(qe,we)};var HQ=!1,Zt={_tasks:new MQ,_createTaskItem(qe,we){return{data:qe,callback:we}},*[Symbol.iterator](){yield*Zt._tasks[Symbol.iterator]()},concurrency:y,payload:S,buffer:y/4,started:!1,paused:!1,push(qe,we){return Array.isArray(qe)?Cm(qe)?void 0:qe.map(Ve=>Ot(Ve,!1,!1,we)):Ot(qe,!1,!1,we)},pushAsync(qe,we){return Array.isArray(qe)?Cm(qe)?void 0:qe.map(Ve=>Ot(Ve,!1,!0,we)):Ot(qe,!1,!0,we)},kill(){De(),Zt._tasks.empty()},unshift(qe,we){return Array.isArray(qe)?Cm(qe)?void 0:qe.map(Ve=>Ot(Ve,!0,!1,we)):Ot(qe,!0,!1,we)},unshiftAsync(qe,we){return Array.isArray(qe)?Cm(qe)?void 0:qe.map(Ve=>Ot(Ve,!0,!0,we)):Ot(qe,!0,!0,we)},remove(qe){Zt._tasks.remove(qe)},process(){if(!HQ){for(HQ=!0;!Zt.paused&&H<Zt.concurrency&&Zt._tasks.length;){var qe=[],we=[],Ve=Zt._tasks.length;Zt.payload&&(Ve=Math.min(Ve,Zt.payload));for(var Ht=0;Ht<Ve;Ht++){var Or=Zt._tasks.shift();qe.push(Or),V.push(Or),we.push(Or.data)}H+=1,Zt._tasks.length===0&&Ut("empty"),H===Zt.concurrency&&Ut("saturated");var sn=ee(la(qe));M(we,sn)}HQ=!1}},length(){return Zt._tasks.length},running(){return H},workersList(){return V},idle(){return Zt._tasks.length+H===0},pause(){Zt.paused=!0},resume(){Zt.paused!==!1&&(Zt.paused=!1,c(Zt.process))}};return Object.defineProperties(Zt,{saturated:{writable:!1,value:dg("saturated")},unsaturated:{writable:!1,value:dg("unsaturated")},empty:{writable:!1,value:dg("empty")},drain:{writable:!1,value:dg("drain")},error:{writable:!1,value:dg("error")}}),Zt}function vQ(w,y){return pm(w,1,y)}function Em(w,y,S){return pm(w,y,S)}function ua(w,y,S,M){M=q(M);var H=C(S);return vi(w,(V,z,j)=>{H(y,V,(re,De)=>{y=De,j(re)})},V=>M(V,y))}var BA=m(ua,4);function mm(...w){var y=w.map(C);return function(...S){var M=this,H=S[S.length-1];return typeof H=="function"?S.pop():H=Ql(),BA(y,S,(V,z,j)=>{z.apply(M,V.concat((re,...De)=>{j(re,De)}))},(V,z)=>H(V,...z)),H[Bl]}}function MD(...w){return mm(...w.reverse())}function Ne(w,y,S,M){return Q(Be(y),w,S,M)}var O=m(Ne,4);function D(w,y,S,M){var H=C(S);return O(w,y,(V,z)=>{H(V,(j,...re)=>j?z(j):z(j,re))},(V,z)=>{for(var j=[],re=0;re<z.length;re++)z[re]&&(j=j.concat(...z[re]));return M(V,j)})}var G=m(D,4);function K(w,y,S){return G(w,1/0,y,S)}var Z=m(K,3);function Ae(w,y,S){retur
Line truncated
|
||||
GFS4: `),console.error(t)});is[Mn]||(pGe=global[Mn]||[],mGe(is,pGe),is.close=(function(t){function e(r,s){return t.call(is,r,function(n){n||EGe(),typeof s=="function"&&s.apply(this,arguments)})}return Object.defineProperty(e,RP,{value:t}),e})(is.close),is.closeSync=(function(t){function e(r){t.apply(is,arguments),EGe()}return Object.defineProperty(e,RP,{value:t}),e})(is.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){PE(is[Mn]),B("assert").equal(is[Mn].length,0)}));var pGe;global[Mn]||mGe(global,is[Mn]);ese.exports=Xre($Xt(is));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!is.__patched&&(ese.exports=Xre(is),is.__patched=!0);function Xre(t){ZXt(t),t.gracefulify=Xre,t.createReadStream=U,t.createWriteStream=q;var e=t.readFile;t.readFile=r;function r(F,W,$){return typeof W=="function"&&($=W,W=null),ee(F,W,$);function ee(ae,Be,Me,Pe){return e(ae,Be,function(Mt){Mt&&(Mt.code==="EMFILE"||Mt.code==="ENFILE")?kB([ee,[ae,Be,Me],Mt,Pe||Date.now(),Date.now()]):typeof Me=="function"&&Me.apply(this,arguments)})}}var s=t.writeFile;t.writeFile=n;function n(F,W,$,ee){return typeof $=="function"&&(ee=$,$=null),ae(F,W,$,ee);function ae(Be,Me,Pe,Mt,Pr){return s(Be,Me,Pe,function(zt){zt&&(zt.code==="EMFILE"||zt.code==="ENFILE")?kB([ae,[Be,Me,Pe,Mt],zt,Pr||Date.now(),Date.now()]):typeof Mt=="function"&&Mt.apply(this,arguments)})}}var i=t.appendFile;i&&(t.appendFile=o);function o(F,W,$,ee){return typeof $=="function"&&(ee=$,$=null),ae(F,W,$,ee);function ae(Be,Me,Pe,Mt,Pr){return i(Be,Me,Pe,function(zt){zt&&(zt.code==="EMFILE"||zt.code==="ENFILE")?kB([ae,[Be,Me,Pe,Mt],zt,Pr||Date.now(),Date.now()]):typeof Mt=="function"&&Mt.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=A);function A(F,W,$,ee){return typeof $=="function"&&(ee=$,$=0),ae(F,W,$,ee);function ae(Be,Me,Pe,Mt,Pr){return a(Be,Me,Pe,function(zt){zt&&(zt.code==="EMFILE"||zt.code==="ENFILE")?kB([ae,[Be,Me,Pe,Mt],zt,Pr||Date.now(),Date.now()]):typeof Mt=="function"&&Mt.apply(this,arguments)})}}var c=t.readdir;t.readdir=l;var u=/^v[0-5]\./;function l(F,W,$){typeof W=="function"&&($=W,W=null);var ee=u.test(process.version)?function(Me,Pe,Mt,Pr){return c(Me,ae(Me,Pe,Mt,Pr))}:function(Me,Pe,Mt,Pr){return c(Me,Pe,ae(Me,Pe,Mt,Pr))};return ee(F,W,$);function ae(Be,Me,Pe,Mt){return function(Pr,zt){Pr&&(Pr.code==="EMFILE"||Pr.code==="ENFILE")?kB([ee,[Be,Me,Pe],Pr,Mt||Date.now(),Date.now()]):(zt&&zt.sort&&zt.sort(),typeof Pe=="function"&&Pe.call(this,Pr,zt))}}}if(process.version.substr(0,4)==="v0.8"){var d=XXt(t);m=d.ReadStream,Q=d.WriteStream}var h=t.ReadStream;h&&(m.prototype=Object.create(h.prototype),m.prototype.open=I);var f=t.WriteStream;f&&(Q.prototype=Object.create(f.prototype),Q.prototype.open=b),Object.defineProperty(t,"ReadStream",{get:function(){return m},set:function(F){m=F},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return Q},set:function(F){Q=F},enumerable:!0,configurable:!0});var p=m;Object.defineProperty(t,"FileReadStream",{get:function(){return p},set:function(F){p=F},enumerable:!0,configurable:!0});var C=Q;Object.defineProperty(t,"FileWriteStream",{get:function(){return C},set:function(F){C=F},enumerable:!0,configurable:!0});function m(F,W){return this instanceof m?(h.apply(this,arguments),this):m.apply(Object.create(m.prototype),arguments)}function I(){var F=this;P(F.path,F.flags,F.mode,function(W,$){W?(F.autoClose&&F.destroy(),F.emit("error",W)):(F.fd=$,F.emit("open",$),F.read())})}function Q(F,W){return this instanceof Q?(f.apply(this,arguments),this):Q.apply(Object.create(Q.prototype),arguments)}function b(){var F=this;P(F.path,F.flags,F.mode,function(W,$){W?(F.destroy(),F.emit("error",W)):(F.fd=$,F.emit("open",$))})}function U(F,W){return new t.ReadStream(F,W)}function q(F,W){return new t.WriteStream(F,W)}var x=t.open;t.open=P;function P(F,W,$,ee){return typeof $=="function"&&(ee=$,$=null),ae(F,W,$,ee);function ae(Be,Me,Pe,Mt,Pr){return x(Be,Me,Pe,function(zt,Gs){zt&&(zt.code==="EMFILE"||zt.code==="ENFILE")?kB([ae,[Be,Me,Pe,Mt],zt,Pr||Date.now(),Date.now()]):typeof Mt=="function"&&Mt.apply(this,arguments)})}}return t}function kB(t){PE("ENQUEUE",t[0].name,t[1]),is[Mn].push(t),$re()}var DP;function EGe(){for(var t=Date.now(),e=0;e<is[Mn].length;++e)is[Mn][e].length>2&&(is[Mn][e][3]=t,is[Mn][e][4]=t);$re()}function $re(){if(clearTimeout(DP),DP=void 0,is[Mn].length!==0){var t=is[Mn].shift(),e=t[0],r=t[1],s=t[2],n=t[3],i=t[4];if(n===void 0)PE("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-n>=6e4){PE("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,s)}else{var a=Date.now()-i,A=Math.max(i-n,1),c=Math.min(A*1.2,100);a>=c?(PE("RETRY",e.name,r),e.apply(null,r.concat([n]))):is[Mn].push(t)}DP===void 0&&(DP=setTimeout($re,0))}}});var TP=E((XYr,CGe)=>{"use strict";var al=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";al.writable=t=>al(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";al.readable=t=>al(t)&&t.readable!=
Line truncated
|
||||
`;super(r),this.name="AggregateError",this.errors=e}};Z5e.exports={AggregateError:vse,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var Lse=E((AVr,X5e)=>{"use strict";X5e.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,s]){let n=e.shift();return s==="f"?n.toFixed(6):s==="j"?JSON.stringify(n):s==="s"&&typeof n=="object"?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var ai=E((cVr,t9e)=>{"use strict";var{format:Qsr,inspect:jP}=Lse(),{AggregateError:ysr}=Kr(),bsr=globalThis.AggregateError||ysr,wsr=Symbol("kIsNodeError"),Ssr=["string","function","number","object","Function","Object","boolean","bigint","symbol"],Nsr=/^([A-Z][a-z0-9]*)+$/,Dsr="__node_internal_",KP={};function GE(t,e){if(!t)throw new KP.ERR_INTERNAL_ASSERTION(e)}function $5e(t){let e="",r=t.length,s=t[0]==="-"?1:0;for(;r>=s+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Rsr(t,e,r){if(typeof e=="function")return GE(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let s=(e.match(/%[dfijoOs]/g)||[]).length;return GE(s===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${s}).`),r.length===0?e:Qsr(e,...r)}function vn(t,e,r){r||(r=Error);class s extends r{constructor(...i){super(Rsr(t,e,i))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(s.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),s.prototype.code=t,s.prototype[wsr]=!0,KP[t]=s}function e9e(t){let e=Dsr+t.name;return Object.defineProperty(t,"name",{value:e}),t}function Tsr(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new bsr([e,t],e.message);return r.code=e.code,r}return t||e}var _se=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new KP.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};vn("ERR_ASSERTION","%s",Error);vn("ERR_INVALID_ARG_TYPE",(t,e,r)=>{GE(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let s="The ";t.endsWith(" argument")?s+=`${t} `:s+=`"${t}" ${t.includes(".")?"property":"argument"} `,s+="must be ";let n=[],i=[],o=[];for(let A of e)GE(typeof A=="string","All expected entries have to be of type string"),Ssr.includes(A)?n.push(A.toLowerCase()):Nsr.test(A)?i.push(A):(GE(A!=="object",'The value "object" should be written as "Object"'),o.push(A));if(i.length>0){let A=n.indexOf("object");A!==-1&&(n.splice(n,A,1),i.push("Object"))}if(n.length>0){switch(n.length){case 1:s+=`of type ${n[0]}`;break;case 2:s+=`one of type ${n[0]} or ${n[1]}`;break;defaulLine truncated
|
||||
globstar while`,e,d,r,h,f),this.matchOne(e.slice(d),r.slice(h),s))return this.debug("globstar found match!",d,A,f),!0;if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",e,d,r,h);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(s&&(this.debug(`
|
||||
>>> no match, partial?`,e,d,r,h),d===A))}let p;if(typeof u=="string"?(p=l===u,this.debug("string match",u,l,p)):(p=u.test(l),this.debug("pattern match",u,l,p)),!p)return!1}if(o===A&&a===c)return!0;if(o===A)return s;if(a===c)return o===A-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return(0,be.braceExpand)(this.pattern,this.options)}parse(e){(0,_O.assertValidPattern)(e);let r=this.options;if(e==="**")return be.GLOBSTAR;if(e==="")return"";let s,n=null;(s=e.match(idr))?n=r.dot?adr:odr:(s=e.match(jlr))?n=(r.nocase?r.dot?$lr:Xlr:r.dot?Zlr:Klr)(s[1]):(s=e.match(Adr))?n=(r.nocase?r.dot?udr:cdr:r.dot?ldr:ddr)(s):(s=e.match(edr))?n=r.dot?rdr:tdr:(s=e.match(sdr))&&(n=ndr);let i=cWe.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?fdr:r.dot?gdr:pdr,n=new Set(r.nocase?["i"]:[]),i=e.map(A=>{let c=A.map(u=>{if(u instanceof RegExp)for(let l of u.flags.split(""))n.add(l);return typeof u=="string"?Qdr(u):u===be.GLOBSTAR?be.GLOBSTAR:u._src});return c.forEach((u,l)=>{let d=c[l+1],h=c[l-1];u!==be.GLOBSTAR||h===be.GLOBSTAR||(h===void 0?d!==void 0&&d!==be.GLOBSTAR?c[l+1]="(?:\\/|"+s+"\\/)?"+d:c[l]=s:d===void 0?c[l-1]=h+"(?:\\/|"+s+")?":d!==be.GLOBSTAR&&(c[l-1]=h+"(?:\\/|\\/"+s+"\\/)"+d,c[l+1]=be.GLOBSTAR))}),c.filter(u=>u!==be.GLOBSTAR).join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];i="^"+o+i+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 A=i[a],c=n;if(s.matchBase&&A.length===1&&(c=[o]),this.matchOne(c,A,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return be.minimatch.defaults(e).Minimatch}};be.Minimatch=em;var ydr=Aie();Object.defineProperty(be,"AST",{enumerable:!0,get:function(){return ydr.AST}});var bdr=cie();Object.defineProperty(be,"escape",{enumerable:!0,get:function(){return bdr.escape}});var wdr=FO();Object.defineProperty(be,"unescape",{enumerable:!0,get:function(){return wdr.unescape}});be.minimatch.AST=cWe.AST;be.minimatch.Minimatch=em;be.minimatch.escape=Jlr.escape;be.minimatch.unescape=Wlr.unescape});var EWe=E(OO=>{"use strict";Object.defineProperty(OO,"__esModule",{value:!0});OO.LRUCache=void 0;var oQ=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,fWe=new Set,uie=typeof process=="object"&&process?process:{},gWe=(t,e,r,s)=>{typeof uie.emitWarning=="function"?uie.emitWarning(t,e,r,s):console.error(`[${r}] ${e}: ${t}`)},PO=globalThis.AbortController,hWe=globalThis.AbortSignal;if(typeof PO>"u"){hWe=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,n){this._onabort.push(n)}},PO=class{constructor(){e()}signal=new hWe;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=uie.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,gWe("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 Sdr=t=>!fWe.has(t),Kf=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),pWe=t=>Kf(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?aQ:null:null,aQ=class extends Array{constructor(e){super(e),this.fill(0)}},lie=class t{heap;length;static#e=!1;static create(e){let r=pWe(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]}},die=class t{#e;#t;#r;#s;#n;#i;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#o;#A;#c;#u;#h;#f;#g;#p;#y;#m;#b;#w;#I;#B;#Q;
Line truncated
|
||||
`)),e.linkname&&(r+=poe(" linkpath="+e.linkname+`
|
||||
`));let s=e.pax;if(s)for(let n in s)r+=poe(" "+n+"="+s[n]+`
|
||||
`);return Wt.from(r)};CQ.decodePax=function(e){let r={};for(;e.length;){let s=0;for(;s<e.length&&e[s]!==32;)s++;let n=parseInt(Wt.toString(e.subarray(0,s)),10);if(!n)return r;let i=Wt.toString(e.subarray(s+1,n-1)),o=i.indexOf("=");if(o===-1)return r;r[i.slice(0,o)]=i.slice(o+1),e=e.subarray(n)}return r};CQ.encode=function(e){let r=Wt.alloc(512),s=e.name,n="";if(e.typeflag===5&&s[s.length-1]!=="/"&&(s+="/"),Wt.byteLength(s)!==s.length)return null;for(;Wt.byteLength(s)>100;){let i=s.indexOf("/");if(i===-1)return null;n+=n?"/"+s.slice(0,i):s.slice(0,i),s=s.slice(i+1)}return Wt.byteLength(s)>100||Wt.byteLength(n)>155||e.linkname&&Wt.byteLength(e.linkname)>100?null:(Wt.write(r,s),Wt.write(r,ng(e.mode&Ogr,6),100),Wt.write(r,ng(e.uid,6),108),Wt.write(r,ng(e.gid,6),116),Wgr(e.size,r,124),Wt.write(r,ng(e.mtime.getTime()/1e3|0,11),136),r[156]=y3+Vgr(e.type),e.linkname&&Wt.write(r,e.linkname,157),Wt.copy(Q7e,r,bD),Wt.copy(Lgr,r,Eoe),e.uname&&Wt.write(r,e.uname,265),e.gname&&Wt.write(r,e.gname,297),Wt.write(r,ng(e.devmajor||0,6),329),Wt.write(r,ng(e.devminor||0,6),337),n&&Wt.write(r,n,345),Wt.write(r,ng(b7e(r),6),148),r)};CQ.decode=function(e,r,s){let n=e[156]===0?0:e[156]-y3,i=mQ(e,0,100,r),o=sg(e,100,8),a=sg(e,108,8),A=sg(e,116,8),c=sg(e,124,12),u=sg(e,136,12),l=qgr(n),d=e[157]===0?null:mQ(e,157,100,r),h=mQ(e,265,32),f=mQ(e,297,32),p=sg(e,329,8),C=sg(e,337,8),m=b7e(e);if(m===256)return null;if(m!==sg(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(Hgr(e))e[345]&&(i=mQ(e,345,155,r)+"/"+i);else if(!Ggr(e)){if(!s)throw new Error("Invalid tar header: unknown format.")}return n===0&&i&&i[i.length-1]==="/"&&(n=5),{name:i,mode:o,uid:a,gid:A,size:c,mtime:new Date(1e3*u),type:l,linkname:d,uname:h,gname:f,devmajor:p,devminor:C,pax:null}};function Hgr(t){return Wt.equals(Q7e,t.subarray(bD,bD+6))}function Ggr(t){return Wt.equals(_gr,t.subarray(bD,bD+6))&&Wt.equals(Pgr,t.subarray(Eoe,Eoe+2))}function Ygr(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function qgr(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function Vgr(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function y7e(t,e,r,s){for(;r<s;r++)if(t[r]===e)return r;return s}function b7e(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function ng(t,e){return t=t.toString(8),t.length>e?vgr.slice(0,e)+" ":Ugr.slice(0,e-t.length)+t+" "}function Jgr(t,e,r){e[r]=128;for(let s=11;s>0;s--)e[r+s]=t&255,t=Math.floor(t/256)}function Wgr(t,e,r){t.toString(8).length>11?Jgr(t,e,r):Wt.write(e,ng(t,11),r)}function zgr(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let r=[],s;for(s=t.length-1;s>0;s--){let o=t[s];e?r.push(o):r.push(255-o)}let n=0,i=r.length;for(s=0;s<i;s++)n+=r[s]*Math.pow(256,s);return e?n:-1*n}function sg(t,e,r){if(t=t.subarray(e,e+r),e=0,t[e]&128)return zgr(t);{for(;e<t.length&&t[e]===32;)e++;let s=Ygr(y7e(t,32,e,t.length),t.length,t.length);for(;e<s&&t[e]===0;)e++;return s===e?0:parseInt(Wt.toString(t.subarray(e,s)),8)}}function mQ(t,e,r,s){return Wt.toString(t.subarray(e,y7e(t,0,e,e+r)),s)}function poe(t){let e=Wt.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t}});var R7e=E((UWr,D7e)=>{var{Writable:jgr,Readable:Kgr,getStreamError:w7e}=goe(),Zgr=eoe(),S7e=hQ(),IQ=moe(),Xgr=S7e.alloc(0),Ioe=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new Zgr,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return Xgr;let r=this._next(e);if(e===r.byteLength)return r;let s=[r];for(;(e-=r.byteLength)>0;)r=this._next(e),s.push(r);return S7e.concat(s)}_next(e){let r=this.queue.peek(),s=r.byteLength-this._offset;if(e>=s){let n=this._offset?r.subarray(this._offset,r.byteLength):r;return this.queue.shift(),this._offset=0,this.buffered-=s,this.shifted+=s,n}return this.buffered-=e,this.shifted+=e,r.subarray(this._offset,this._offset+=e)}},Boe=class extends Kgr{constructor(e,r,s){super(),this.header=r,this.offset=s,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(w7e(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=N7e(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},Qoe=class extends j
Line truncated
|
||||
`).filter(s=>s!=="");return e&&e.trimWhitespace===!1?r:r.map(s=>s.trim())}function fpe(t,e){if(process.env.GITHUB_OUTPUT||"")return YQ("OUTPUT",sR(t,e));process.stdout.write(CG.EOL),yA("set-output",{name:t},Nc(e))}function _g(t){process.exitCode=mG.Failure,Gc(t)}function UA(){return process.env.RUNNER_DEBUG==="1"}function Y(t){yA("debug",{},t)}function Gc(t,e={}){yA("error",eR(e),t instanceof Error?t.toString():t)}function at(t,e={}){yA("warning",eR(e),t instanceof Error?t.toString():t)}function gpe(t,e={}){yA("notice",eR(e),t instanceof Error?t.toString():t)}function te(t){process.stdout.write(t+CG.EOL)}function Lut(t){H3("group",t)}function _ut(){H3("endgroup")}function Ax(t,e){return vut(this,void 0,void 0,function*(){Lut(t);let r;try{r=yield e()}finally{_ut()}return r})}function E0(t,e){if(process.env.GITHUB_STATE||"")return YQ("STATE",sR(t,e));yA("save-state",{name:t},Nc(e))}import*as Wte from"fs";import*as zte from"path";import*as hP from"os";import{readFileSync as Put,existsSync as Out}from"fs";import{EOL as Hut}from"os";var m0=class{constructor(){var e,r,s;if(this.payload={},process.env.GITHUB_EVENT_PATH)if(Out(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse(Put(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}));else{let n=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${n} does not exist${Hut}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:"https://api.github.com",this.serverUrl=(r=process.env.GITHUB_SERVER_URL)!==null&&r!==void 0?r:"https://github.com",this.graphqlUrl=(s=process.env.GITHUB_GRAPHQL_URL)!==null&&s!==void 0?s:"https://api.github.com/graphql"}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,r]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:r}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}};var Y9=le(Hye(),1),Gye=le(P9(),1),Ayt=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})};function Yye(t,e){if(!t&&!e.auth)throw new Error("Parameter token or opts.auth is required");if(t&&e.auth)throw new Error("Parameters token and opts.auth may not both be specified");return typeof e.auth=="string"?e.auth:`token ${t}`}function qye(t){return new Y9.HttpClient().getAgent(t)}function cyt(t){return new Y9.HttpClient().getAgentDispatcher(t)}function Vye(t){let e=cyt(t);return(s,n)=>Ayt(this,void 0,void 0,function*(){return(0,Gye.fetch)(s,Object.assign(Object.assign({},n),{dispatcher:e}))})}function Jye(){return process.env.GITHUB_API_URL||"https://api.github.com"}function uk(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:"<environment undetectable>"}function lk(t,e,r,s){if(typeof r!="function")throw new Error("method for before hook must be a function");return s||(s={}),Array.isArray(e)?e.reverse().reduce((n,i)=>lk.bind(null,t,i,n,s),r)():Promise.resolve().then(()=>t.registry[e]?t.registry[e].reduce((n,i)=>i.hook.bind(null,n,s),r)():r(s))}function Wye(t,e,r,s){let n=s;t.registry[r]||(t.registry[r]=[]),e==="before"&&(s=(i,o)=>Promise.resolve().then(n.bind(null,o)).then(i.bind(null,o))),e==="after"&&(s=(i,o)=>{let a;return Promise.resolve().then(i.bind(null,o)).then(A=>(a=A,n(a,o))).then(()=>a)}),e==="error"&&(s=(i,o)=>Promise.resolve().then(i.bind(null,o)).catch(a=>n(a,o))),t.registry[r].push({hook:s,orig:n})}function zye(t,e,r){if(!t.registry[e])return;let s=t.registry[e].map(n=>n.orig).indexOf(r);s!==-1&&t.registry[e].splice(s,1)}var jye=Function.bind,Kye=jye.bind(jye);function Zye(t,e,r){let s=Kye(zye,null).apply(null,r?[e,r]:[e]);t.api={remove:s},t.remove=s,["before","error","after","wrap"].forEach(n=>{let i=r?[e,n,r]:[e,n];t[n]=t.api[n]=Kye(Wye,null).apply(null,i)})}function lyt(){let t=Symbol("Singular"),e={registry:{}},r=lk.bind(null,e,t);return Zye(r,e,t),r}function dyt(){let t={registry:{}},e=lk.bind(null,t);return Zye(e,t),e}var Xye={Singular:lyt,Collection:dyt};var oY=le(rY(),1);var bbe=le(rY(),1);var ibt="0.0.0-developm
Line truncated
|
||||
`+t.errors.map(e=>` - ${e.message}`).join(`
|
||||
`)}var tFr=class extends Error{constructor(t,e,r){super(eFr(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},rFr=["method","baseUrl","url","headers","request","query","mediaType","operationName"],nFr=["query","method","url"],gst=/\/api\/v3\/?$/;function sFr(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(nFr.includes(o))return Promise.reject(new Error(`[@octokit/graphql] "${o}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((o,a)=>rFr.includes(a)?(o[a]=n[a],o):(o.variables||(o.variables={}),o.variables[a]=n[a],o),{}),i=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return gst.test(i)&&(s.url=i.replace(gst,"/api/graphql")),t(s).then(o=>{if(o.data.errors){let a={};for(let A of Object.keys(o.headers))a[A]=o.headers[A];throw new tFr(s,a,o.data)}return o.data.data})}function Rge(t,e){let r=t.defaults(e);return Object.assign((s,i)=>sFr(r,s,i),{defaults:Rge.bind(null,r),endpoint:r.endpoint})}var svn=Rge(fst.request,{headers:{"user-agent":`octokit-graphql.js/${$2r} ${S6()}`},method:"POST",url:"/graphql"});function pst(t){return Rge(t,{method:"POST",url:"/graphql"})}var Dge="(?:[a-zA-Z0-9_-]+)",mst="\\.",Est=new RegExp(`^${Dge}${mst}${Dge}${mst}${Dge}$`),iFr=Est.test.bind(Est);async function oFr(t){let e=iFr(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}function aFr(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function AFr(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=aFr(t),e(s)}var Cst=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(oFr.bind(null,e),{hook:AFr.bind(null,e)})};var xge="7.0.6";var Ist=()=>{},cFr=console.warn.bind(console),uFr=console.error.bind(console);function lFr(t={}){return typeof t.debug!="function"&&(t.debug=Ist),typeof t.info!="function"&&(t.info=Ist),typeof t.warn!="function"&&(t.warn=cFr),typeof t.error!="function"&&(t.error=uFr),t}var Bst=`octokit-core.js/${xge} ${S6()}`,T6=class{static VERSION=xge;static defaults(e){return class extends this{constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new Gnt.Collection,n={baseUrl:Tge.request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${Bst}`:Bst,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=Tge.request.defaults(n),this.graphql=pst(this.request).defaults(n),this.log=lFr(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=Cst(e.auth);r.wrap("request",i.hook),this.auth=i}let s=this.constructor;for(let i=0;i<s.plugins.length;++i)Object.assign(this,s.plugins[i](this,e))}request;graphql;log;hook;auth};var kge="17.0.0";var dFr={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
Line truncated
|
||||
See ${r.getDocumentationLink()}`;Fst.push(n),RB(n)}function Mst(){DA("deprecation-collector_deprecations",JSON.stringify(Pge)),DA("deprecation-collector_errors",JSON.stringify(Fst))}import*as v6 from"path";var Lst="GRADLE_ACTION_ID";var oQ=".setup-gradle",L6=class t{getDependencyGraphOption(){let e=Es("dependency-graph");switch(e.toLowerCase().trim()){case"disabled":return"disabled";case"generate":return"generate";case"generate-and-submit":return"generate-and-submit";case"generate-submit-and-upload":return"generate-submit-and-upload";case"generate-and-upload":return"generate-and-upload";case"download-and-submit":return"download-and-submit"}throw TypeError(`The value '${e}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-submit-and-upload, generate-and-upload, download-and-submit].`)}getDependencyGraphContinueOnFailure(){return Qg("dependency-graph-continue-on-failure",!0)}getArtifactRetentionDays(){let e=Es("artifact-retention-days");return RFr("artifact-retention-days",e,0)}getJobCorrelator(){return t.constructJobCorrelator(Qo.workflow,Qo.job,_ge())}getReportDirectory(){let e=Es("dependency-graph-report-dir");return v6.resolve(bC(),e)}getDownloadArtifactName(){return process.env.DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME}getExcludeProjects(){return iQ("dependency-graph-exclude-projects")}getIncludeProjects(){return iQ("dependency-graph-include-projects")}getExcludeConfigurations(){return iQ("dependency-graph-exclude-configurations")}getIncludeConfigurations(){return iQ("dependency-graph-include-configurations")}getPluginRepository(){return new U6}static constructJobCorrelator(e,r,n){let s=this.describeMatrix(n),i=s?`${e}-${r}-${s}`:`${e}-${r}`;return this.sanitize(i)}static describeMatrix(e){Te(`Got matrix json: ${e}`);let r=JSON.parse(e);return r?Object.values(r).join("-"):""}static sanitize(e){return e.replace(/[^a-zA-Z0-9_-\s]/g,"").replace(/\s+/g,"_").toLowerCase()}};var GR=class{isCacheDisabled(){return vst.isFeatureAvailable()?Qg("cache-disabled"):!0}isCacheReadOnly(){return!this.isCacheWriteOnly()&&Qg("cache-read-only")}isCacheWriteOnly(){return Qg("cache-write-only")}isCacheOverwriteExisting(){return Qg("cache-overwrite-existing")}isCacheStrictMatch(){return Qg("gradle-home-cache-strict-match")}isCacheCleanupEnabled(){if(this.isCacheReadOnly())return!1;let e=this.getCacheCleanupOption();return e==="always"||e==="on-success"}shouldPerformCacheCleanup(e){let r=this.getCacheCleanupOption();return r==="always"?!0:r==="on-success"?!e:!1}getCacheCleanupOption(){let e=aM("gradle-home-cache-cleanup");if(e!==void 0)return F6("The `gradle-home-cache-cleanup` input parameter has been replaced by `cache-cleanup`"),e?"always":"never";let r=Es("cache-cleanup");switch(r.toLowerCase().trim()){case"always":return"always";case"on-success":return"on-success";case"never":return"never"}throw TypeError(`The value '${r}' is not valid for cache-cleanup. Valid values are: [never, always, on-success].`)}getCacheEncryptionKey(){return Es("cache-encryption-key")}getCacheIncludes(){return Tee("gradle-home-cache-includes")}getCacheExcludes(){return Tee("gradle-home-cache-excludes")}};var qd=class t{static{this.DevelocityAccessKeyEnvVar="DEVELOCITY_ACCESS_KEY"}static{this.GradleEnterpriseAccessKeyEnvVar="GRADLE_ENTERPRISE_ACCESS_KEY"}getBuildScanPublishEnabled(){return Qg("build-scan-publish")&&this.verifyTermsOfUseAgreement()}getBuildScanTermsOfUseUrl(){return Es("build-scan-terms-of-use-url")}getBuildScanTermsOfUseAgree(){return Es("build-scan-terms-of-use-agree")}getDevelocityAccessKey(){return Es("develocity-access-key")||process.env[t.DevelocityAccessKeyEnvVar]||process.env[t.GradleEnterpriseAccessKeyEnvVar]||""}getDevelocityTokenExpiry(){return Es("develocity-token-expiry")}getDevelocityInjectionEnabled(){return aM("develocity-injection-enabled")}getDevelocityUrl(){return Es("develocity-url")}getDevelocityAllowUntrustedServer(){return aM("develocity-allow-untrusted-server")}getDevelocityCaptureFileFingerprints(){return aM("develocity-capture-file-fingerprints")}getDevelocityEnforceUrl(){return aM("develocity-enforce-url")}getDevelocityPluginVersion(){return Es("develocity-plugin-version")}getDevelocityCcudPluginVersion(){return Es("develocity-ccud-plugin-version")}getPluginRepository(){return new U6}verifyTermsOfUseAgreement(){return this.getBuildScanTermsOfUseUrl()!=="https://gradle.com/terms-of-service"&&this.getBuildScanTermsOfUseUrl()!=="https://gradle.com/help/legal-terms-of-use"||this.getBuildScanTermsOfUseAgree()!=="yes"?(tr("Terms of use at 'https://gradle.com/help/legal-terms-of-use' must be agreed in order to publish build scans."),!1):!0}},U6=class{getUrl(){return iQ("gradle-plugin-repository-url")}getUsername(){return iQ("gradle-plugin-repository-username")}getPassword(){return iQ("gradle-plugin-repository-password")}},P6=class{getGradleVersion(){return Es("gradle-version")}getBuildRootDirectory(){let e=bC(),r=Es("build-root-directory");return r===""?v6.re
Line truncated
|
||||
It is likely locked by another process. Output of 'jps -ml':
|
||||
${await kFr()}`),n;zo(`Attempt to delete ${t} failed. Will try again.`),await TFr(1e3)}}}async function TFr(t){return new Promise(e=>setTimeout(e,t))}async function kFr(){return(await ep("jps",["-lm"])).stdout}var FFr="v1",MFr="GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX",vFr="GRADLE_BUILD_ACTION_CACHE_KEY_ENVIRONMENT",LFr="GRADLE_BUILD_ACTION_CACHE_KEY_JOB",UFr="GRADLE_BUILD_ACTION_CACHE_KEY_JOB_INSTANCE",PFr="GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION",G6=class{constructor(e,r){this.key=e,this.restoreKeys=r}};function Hge(t,e){let s=`${`${process.env[MFr]||""}${Y6(t,FFr)}`}|${_Fr()}`,i=`${s}|${OFr()}`,o=`${i}[${HFr()}]`,a=`${o}-${qFr()}`;return e.isCacheStrictMatch()?new G6(a,[o]):new G6(a,[o,i,s])}function Y6(t,e){return`gradle-${t}-${e}`}function _Fr(){let t=process.env.RUNNER_OS||"",e=process.env.RUNNER_ARCH||"";return process.env[vFr]||`${t}-${e}`}function OFr(){return process.env[LFr]||Qo.job}function HFr(){let t=process.env[UFr];if(t)return t;let e=Qo.workflow,r=_ge();return Oge([e,r])}function qFr(){return process.env[PFr]||Qo.sha}import VR from"path";import BM from"fs";import*as Gd from"fs";import*as Yp from"path";var mat=Xe(rit(),1),uQ=Xe(n9(),1);import*as JR from"fs";import*as lat from"os";import*as RC from"path";var u9=Xe(Z2(),1);import{ok as iUr}from"assert";import*as bg from"path";import*as s9 from"fs";import*as SC from"path";var KLr=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})},{chmod:XLr,copyFile:ZLr,lstat:$Lr,mkdir:Vot,open:DLn,readdir:Wot,rename:eUr,rm:zot,rmdir:xLn,stat:Afe,symlink:tUr,unlink:rUr}=s9.promises,NC=process.platform==="win32";var TLn=s9.constants.O_RDONLY;function jot(t){if(t=nUr(t),!t)throw new Error('isRooted() parameter "p" cannot be empty');return NC?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}function cfe(t,e){return KLr(this,void 0,void 0,function*(){let r;try{r=yield Afe(t)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${s}`)}if(r&&r.isFile()){if(NC){let s=SC.extname(t).toUpperCase();if(e.some(i=>i.toUpperCase()===s))return t}else if(Jot(r))return t}let n=t;for(let s of e){t=n+s,r=void 0;try{r=yield Afe(t)}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${i}`)}if(r&&r.isFile()){if(NC){try{let i=SC.dirname(t),o=SC.basename(t).toUpperCase();for(let a of yield Wot(i))if(o===a.toUpperCase()){t=SC.join(i,a);break}}catch(i){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${i}`)}return t}else if(Jot(r))return t}}return""})}function nUr(t){return t=t||"",NC?(t=t.replace(/\//g,"\\"),t.replace(/\\\\+/g,"\\")):t.replace(/\/\/+/g,"/")}function Jot(t){return(t.mode&1)>0||(t.mode&8)>0&&process.getgid!==void 0&&t.gid===process.getgid()||(t.mode&64)>0&&process.getuid!==void 0&&t.uid===process.getuid()}var i9=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};function Kot(t){return i9(this,void 0,void 0,function*(){if(NC&&/[*"<>|]/.test(t))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield zot(t,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}})}function ufe(t){return i9(this,void 0,void 0,function*(){iUr(t,"a path argument must be provided"),yield Vot(t,{recursive:!0})})}function EM(t,e){return i9(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");if(e){let n=yield EM(t,!1);if(!n)throw NC?new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return n}let r=yield oUr(t);return r&&r.length>0?r[0]:""})}function oUr(t){return i9(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");let e=[];if(NC&&process.env.PATHEXT)for(let s of process.env.PATHEXT.split(bg.delimiter))s&&e.push(s);if(jot(t)){let s=yield cfe(t,e);return s?[s]:[]}if(t.includes(bg.sep))return[];let r=[];if(process.env.PATH)for(let s of process.env.PATH.split(bg.delimiter))s&&r.push(s);let n=[];for(let s of r){let i=yield cfe(bg.join(s,t),e)Line truncated
|
||||
`),r,[],s)?new QM(e,n,r):(pe(`Did not restore ${e} with key ${r} to ${n}`),new QM(e,n,void 0))}async extract(e){let r=this.getExtractedCacheEntryDefinitions();zo(`Extracting cache entries for ${this.extractorName}: ${JSON.stringify(r,null,2)}`);let n=this.loadExtractedCacheEntries(),s=[];for(let i of r){let o=i.artifactType,a=i.pattern;if(i.notCacheableReason){e.entry(a).markNotSaved(i.notCacheableReason);continue}let c=await(await iC(a,{implicitDescendants:!1})).glob();if(c.length===0){zo(`No files found to cache for ${o}`);continue}if(i.bundle)s.push(this.awaitForDebugging(this.saveExtractedCacheEntry(c,o,a,i.uniqueFileNames,n,e.entry(a))));else for(let u of c)s.push(this.awaitForDebugging(this.saveExtractedCacheEntry([u],o,u,i.uniqueFileNames,n,e.entry(u))))}this.saveMetadataForCacheResults(await Promise.all(s))}async saveExtractedCacheEntry(e,r,n,s,i,o){let a=s?this.createCacheKeyFromFileNames(r,e):await this.createCacheKeyFromFileContents(r,n);i.find(c=>c.artifactType===r&&c.pattern===n)?.cacheKey===a?(zo(`No change to previously restored ${r}. Not saving.`),o.markNotSaved("contents unchanged")):await q6(n.split(`
|
||||
`),a,o);for(let c of e)uM(c);return new QM(r,n,a)}createCacheKeyFromFileNames(e,r){let n=r.map(i=>VR.relative(this.gradleUserHome,i)),s=Ost(n);return zo(`Generating cache key for ${e} from file names: ${n}`),`${Y6(e,Eat)}-${s}`}async createCacheKeyFromFileContents(e,r){let n=await s7e(r);return zo(`Generating cache key for ${e} from files matching: ${r}`),`${Y6(e,Eat)}-${n}`}async awaitForDebugging(e){return AM()&&await e,e}loadExtractedCacheEntries(){let e=this.getCacheMetadataFile();if(!BM.existsSync(e))return[];let r=BM.readFileSync(e,"utf-8");return zo(`Loaded cache metadata for ${this.extractorName}: ${r}`),JSON.parse(r).entries}saveMetadataForCacheResults(e){let r=new Qfe;r.entries=e.filter(s=>s.cacheKey!==void 0);let n=JSON.stringify(r);zo(`Saving cache metadata for ${this.extractorName}: ${n}`),BM.writeFileSync(this.getCacheMetadataFile(),n,"utf-8")}getCacheMetadataFile(){let e=VR.resolve(this.gradleUserHome,oQ);return BM.mkdirSync(e,{recursive:!0}),VR.resolve(e,`${this.extractorName}-entry-metadata.json`)}},yM=class extends g9{constructor(e,r){super(e,"gradle-home",r)}async extract(e){return await this.deleteWrapperZips(),super.extract(e)}async deleteWrapperZips(){let e=VR.resolve(this.gradleUserHome,"wrapper/dists/*/*/*.zip"),r=await iC(e,{implicitDescendants:!1});for(let n of await r.glob())zo(`Deleting wrapper zip: ${n}`),await uM(n)}getExtractedCacheEntryDefinitions(){let e=(r,n,s)=>{let i=n.map(o=>{let a=o.endsWith("/"),A=VR.resolve(this.gradleUserHome,o);return a?`${A}/`:A}).join(`
|
||||
`);return new h9(r,i,s)};return[e("generated-gradle-jars",["caches/*/generated-gradle-jars/*.jar"],!1),e("wrapper-zips",["wrapper/dists/*/*/"],!1),e("java-toolchains",["jdks/*/"],!1),e("dependencies",["caches/modules-*/files-*/*/*/*/*"],!0),e("instrumented-jars",["caches/jars-*/*/"],!0),e("kotlin-dsl",["caches/*/kotlin-dsl/accessors/*/","caches/*/kotlin-dsl/scripts/*/"],!0),e("groovy-dsl",["caches/*/groovy-dsl/*/"],!0),e("transforms",["caches/transforms-4/*/","caches/*/transforms/*/"],!0)]}},bM=class extends g9{constructor(e,r){super(e,"configuration-cache",r)}async restore(e){if(!e.fullyRestored){this.markNotRestored(e,"Gradle User Home was not fully restored");return}if(!this.cacheConfig.getCacheEncryptionKey()){this.markNotRestored(e,"Encryption Key was not provided");return}return await super.restore(e)}markNotRestored(e,r){let n=this.loadExtractedCacheEntries();if(n.length>0){pe(`Not restoring configuration-cache state, as ${r}`);for(let s of n)e.entry(s.pattern).markNotRestored(r);this.saveMetadataForCacheResults([])}}async extract(e){if(!this.cacheConfig.getCacheEncryptionKey()){let r=this.getExtractedCacheEntryDefinitions();if(r.length>0){pe("Not saving configuration-cache state, as no encryption key was provided");for(let n of r)e.entry(n.pattern).markNotSaved("No encryption key provided")}return}await super.extract(e)}getExtractedCacheEntryDefinitions(){let e=this.getConfigCacheDirectoriesWithAssociatedBuildResults();return Object.entries(e).map(([r,n])=>{let s=new h9("configuration-cache",r,!0).withNonUniqueFileNames();return n.find(i=>!DC(i.gradleVersion,"8.6.0"))&&(pe(`Not saving config-cache data for ${r}. Configuration cache data is only saved for Gradle 8.6+`),s.notCacheableBecause("Configuration cache data only saved for Gradle 8.6+")),s})}getConfigCacheDirectoriesWithAssociatedBuildResults(){return Bfe().results.reduce((e,r)=>{let n=VR.resolve(r.rootProjectDir,".gradle/configuration-cache");return BM.existsSync(n)&&(e[n]||(e[n]=[]),e[n].push(r)),e},{})}};import Cat from"path";import vUr from"fs";import{fileURLToPath as LUr}from"url";function Iat(...t){let e=Cat.dirname(LUr(import.meta.url)),r=Cat.resolve(e,"..","..","..","sources","src","resources",...t);return vUr.readFileSync(r,"utf8")}function Bat(){let t=Object.entries(process.env).filter(([e])=>e.startsWith("JAVA_HOME_")&&process.env[e]).map(([e,r])=>({jdkVersion:e.match(/JAVA_HOME_(\d+)_/)?.[1]??null,jdkPath:r})).filter(e=>e.jdkVersion!==null);return t.length===0?null:`<?xml version="1.0" encoding="UTF-8"?>
|
||||
`)}var abt=class extends Error{constructor(t,e,r){super(obt(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},Abt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],cbt=["query","method","url"],ybe=/\/api\/v3\/?$/;function ubt(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(cbt.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)=>Abt.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 ybe.test(i)&&(n.url=i.replace(ybe,"/api/graphql")),t(n).then(o=>{if(o.data.errors){let a={};for(let A of Object.keys(o.headers))a[A]=o.headers[A];throw new abt(n,a,o.data)}return o.data.data})}function sY(t,e){let r=t.defaults(e);return Object.assign((n,i)=>ubt(r,n,i),{defaults:sY.bind(null,r),endpoint:r.endpoint})}var mBr=sY(bbe.request,{headers:{"user-agent":`octokit-graphql.js/${ibt} ${uk()}`},method:"POST",url:"/graphql"});function wbe(t){return sY(t,{method:"POST",url:"/graphql"})}var nY="(?:[a-zA-Z0-9_-]+)",Sbe="\\.",Nbe=new RegExp(`^${nY}${Sbe}${nY}${Sbe}${nY}$`),lbt=Nbe.test.bind(Nbe);async function dbt(t){let e=lbt(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 hbt(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function fbt(t,e,r,s){let n=e.endpoint.merge(r,s);return n.headers.authorization=hbt(t),e(n)}var Dbe=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(dbt.bind(null,e),{hook:fbt.bind(null,e)})};var iY="7.0.6";var Rbe=()=>{},gbt=console.warn.bind(console),pbt=console.error.bind(console);function Ebt(t={}){return typeof t.debug!="function"&&(t.debug=Rbe),typeof t.info!="function"&&(t.info=Rbe),typeof t.warn!="function"&&(t.warn=gbt),typeof t.error!="function"&&(t.error=pbt),t}var Tbe=`octokit-core.js/${iY} ${uk()}`,fk=class{static VERSION=iY;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 Xye.Collection,s={baseUrl:oY.request.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} ${Tbe}`:Tbe,e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=oY.request.defaults(s),this.graphql=wbe(this.request).defaults(s),this.log=Ebt(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=Dbe(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 aY="17.0.0";var mbt={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/{secr
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 Xb(i));return s.searchPaths.push(...gY(s.patterns)),s})}static stat(e,r,s){return BY(this,void 0,void 0,function*(){let n;if(r.followSymbolicLinks)try{n=yield CC.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Y(`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 CC.promises.lstat(e.path);if(n.isDirectory()&&r.followSymbolicLinks){let i=yield CC.promises.realpath(e.path);for(;s.length>=e.level;)s.pop();if(s.some(o=>o===i)){Y(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}s.push(i)}return n})}};var owt=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})};function Qk(t,e){return owt(this,void 0,void 0,function*(){return yield Ik.create(t,e)})}var sNe=le(aw(),1);import*as Lk from"crypto";import*as QC from"fs";import*as gp from"path";import*as nNe from"util";var Aw;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Aw||(Aw={}));var Ci;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Ci||(Ci={}));var Fo;(function(t){t.GNU="gnu",t.BSD="bsd"})(Fo||(Fo={}));var Uk=2,vk=5e3,HY=5e3,GY=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,rNe=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,cw="cache.tar",YY="manifest.txt",ryr=10*Math.pow(1024,3);var BC=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})},r1t=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,A){o=t[i](o),n(a,A,o.done,o.value)})}}function n(i,o,a,A){Promise.resolve(A).then(function(c){i({value:c,done:a})},o)}},s1t="1.0";function uw(){return BC(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=gp.join(s,"actions","temp")}let r=gp.join(e,Lk.randomUUID());return yield Lg(r),r})}function tu(t){return QC.statSync(t).size}function qY(t){return BC(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(),A=yield Qk(t.join(`
|
||||
`),{implicitDescendants:!1});try{for(var c=!0,u=r1t(A.globGenerator()),l;l=yield u.next(),e=l.done,!e;c=!0){n=l.value,c=!1;let h=gp.relative(a,n).replace(new RegExp(`\\${gp.sep}`,"g"),"/");Y(`Matched: ${h}`),h===""?o.push("."):o.push(`${h}`)}}catch(d){r={error:d}}finally{try{!c&&!e&&(s=u.return)&&(yield s.call(u))}finally{if(r)throw r.error}}return o})}function lw(t){return BC(this,void 0,void 0,function*(){return nNe.promisify(QC.unlink)(t)})}function iNe(t){return BC(this,arguments,void 0,function*(e,r=[]){let s="";r.push("--version"),Y(`Checking ${e} ${r.join(" ")}`);try{yield Hc(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:n=>s+=n.toString(),stderr:n=>s+=n.toString()}})}catch(n){Y(n.message)}return s=s.trim(),Y(s),s})}function dw(){return BC(this,void 0,void 0,function*(){let t=yield iNe("zstd",["--quiet"]),e=sNe.clean(t);return Y(`zstd version: ${e}`),t===""?Ci.Gzip:Ci.ZstdWithoutLong})}function Ph(t){return t===Ci.Gzip?Aw.Gzip:Aw.Zstd}function oNe(){return BC(this,void 0,void 0,function*(){return QC.existsSync(GY)?GY:(yield iNe("tar")).toLowerCase().includes("gnu tar")?yo("tar"):""})}function VY(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}function yC(t,e,r=!1){let s=t.slice();return e&&s.push(e),process.platform==="win32"&&!r&&s.push("windows-only"),s.push(s1t),Lk.createHash("sha256").update(s.join("|")).digest("hex")}function aNe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}import*as KC from"fs";import{URL as wFt}from"url";var ru=class extends Error{constructor(e){super(e),this.name="AbortError"}};import{EOL as n1t}from"node:os";import i1t from"node:util";import o1t from"node:process";function ANe(t,...e){o1t.stderr.write(`${i1t.format(t,...e)}${n1t}`)}var cNe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,lNe,JY=[],WY=[],Pk=[];cNe&&zY(cNe);var dNe=Object.assign(t=>hNe(t),{enable:zY,enabled:jY,disable:a1t,log:ANe});function zY(t){lNe=t,JY=[],WY=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?WY.push(r.substring(1)):JY.push(r);for(let r of Pk)r.enabled=jY(r.namespace)}function jY(t){if(t.endsWith("*"))return!0;for(let e of WY)if(uNe(t,e))return!1;for(let e of JY)if(uNe(t,e))return!0;return!1}function uNe(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let d=[],h="";for(let f of e)f==="*"&&h==="*"||(h=f,d.push(f));r=d.join("")}let s=0,n=0,i=r.length,o=t.length,a=-1,A=-1;for(;s<o&&n<i;)if(r[n]==="*"){if(a=n,n++,n===i)return!0;for(;t[s]!==r[n];)if(s++,s===o)return!1;A=s,s++,n++;continue}else if(r[n]===t[s])n++,s++;else if(a>=0){if(n=a+1,s=A+1,s===o)return!1;for(;t[s]!==r[n];)if(s++,s===o)return!1;A=s,s++,n++;continue}else return!1;let c=s===t.length,u=n===r.length,l=n===r.length-1&&r[n]==="*";return c&&(u||l)}function a1t(){let t=lNe||"";return zY(""),t}function hNe(t){let e=Object.assign(r,{enabled:jY(t),destroy:A1t,log:dNe.log,namespace:t,extend:c1t});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t} ${s[0]}`),e.log(...s))}return Pk.push(e),e}function A1t(){let t=Pk.indexOf(this);return t>=0?(Pk.splice(t,1),!0):!1}function c1t(t){let e=hNe(`${this.namespace}:${t}`);return e.log=this.log,e}var bC=dNe;var KY=["verbose","info","warning","error"],fNe={verbose:400,info:300,warning:200,error:100};function gNe(t,e){e.log=(...r)=>{t.log(...r)}}function pNe(t){return KY.includes(t)}function u1t(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,s,n=bC(t.namespace);n.log=(...u)=>{bC.log(...u)};function i(u){if(u&&!pNe(u))throw new Error(`Unknown log level '${u}'. Acceptable values: ${KY.join(",")}`);s=u;let l=[];for(let d of e)o(d)&&l.push(d.namespace);bC.enable(l.join(","))}r&&(pNe(r)?i(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${KY.join(", ")}.`));function o(u){return!!(s&&fNe[u.level]<=fNe[s])}function a(u,l){let d=Object.assign(u.extend(l),{level:l});if(gNe(u,d),o(d)){let h=bC.disable();bC.enable(h+","+d.namespace)}return e.add(d),d}function A(){return s}function c(u){let l=n.extend(u);return gNe(n,l),{error:a(l,"error"),warning:a(l,"warning"),info:a(l,"info"),verbose:a(l,"verbose")}}return{setLogLevel:i,getLogLevel:A,createClientLogger:c,logger:n}}var ENe=u1t({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"}),l1t=ENe.logger;function hw(t){return ENe.createClientLogger(t)}function Ok(t){return t.toLowerCase()}function*d1t(t){for(let e of t.values())yield[e.name,e.value]}var ZY=class{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(Ok(e),{name:e,value:String(r).trim()})}get(e){return this._headersMap.get(Ok(e))?.value}has(e){return this._headersMap.has(Ok(e))}delete(e){this._headersMap.delete(Ok(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let s of this._headersMap.values())r[s.name]=
Line truncated
|
||||
${p1t.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Yk(t){return t instanceof Ii?!0:Ep(t)&&t.name==="RestError"}function Ki(t,e){return Buffer.from(t,e)}import tq from"node:http";import rq from"node:https";import INe from"node:zlib";import{Transform as E1t}from"node:stream";var ka=hw("ts-http-runtime");var m1t={};function fw(t){return t&&typeof t.pipe=="function"}function BNe(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 QNe(t){return t&&typeof t.byteLength=="number"}var qk=class extends E1t{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}},sq=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new ru("The operation was aborted. Request has already been canceled.");s=c=>{c.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",s)}let n;e.timeout>0&&(n=setTimeout(()=>{let c=new jA;ka.info(`request to '${c.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 c=Q1t(a);c!==null&&e.headers.set("Content-Length",c)}let A;try{if(a&&e.onUploadProgress){let f=e.onUploadProgress,p=new qk(f);p.on("error",C=>{ka.error("Error in upload progress",C)}),fw(a)?a.pipe(p):p.end(a),a=p}let c=await this.makeRequest(e,r,a);n!==void 0&&clearTimeout(n);let u=C1t(c),d={status:c.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return c.resume(),d;A=o?I1t(c,u):c;let h=e.onDownloadProgress;if(h){let f=new qk(h);f.on("error",p=>{ka.error("Error in download progress",p)}),A.pipe(f),A=f}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=A:d.bodyAsText=await B1t(A),d}finally{if(e.abortSignal&&s){let c=Promise.resolve();fw(a)&&(c=BNe(a));let u=Promise.resolve();fw(A)&&(u=BNe(A)),Promise.all([c,u]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(l=>{ka.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((A,c)=>{let u=i?tq.request(a,A):rq.request(a,A);u.once("error",l=>{c(new Ii(l.message,{code:l.code??Ii.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new ru("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(l),c(l)}),s&&fw(s)?s.pipe(u):s?typeof s=="string"||Buffer.isBuffer(s)?u.end(s):QNe(s)?u.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(ka.error("Unrecognized body type",s),c(new Ii("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?tq.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new tq.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return rq.globalAgent;let n=e.tlsSettings??m1t,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(ka.info("No cached TLS Agent exist, creating a new Agent"),i=new rq.Agent({keepAlive:!s,...n}),this.cachedHttpsAgents.set(n,i)),i}}};function C1t(t){let e=Mo();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 I1t(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let s=INe.createGunzip();return t.pipe(s),s}else if(r==="deflate"){let s=INe.createInflate();return t.pipe(s),s}return t}function B1t(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 Ii(`Error reading response as text: ${n.message}`,{code:Ii.PARSE_ERROR}))})})}function Q1t(t){return t?Buffer.isBuffer(t)?t.length:fw(t)?null:QNe(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function yNe(){return new sq}function Vk(){return yNe()}var nq="logPolicy";function Jk(t={}){let e=t.logger??ka.info,r=new jA({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:nq,async sendRequest(s,n){if(!e.
Line truncated
|
||||
`;return e}function qDt(t){return t instanceof Uint8Array?t.byteLength:fF(t)?t.size===-1?void 0:t.size:void 0}function VDt(t){let e=0;for(let r of t){let s=qDt(r);if(s===void 0)return;e+=s}return e}async function JDt(t,e,r){let s=[Ki(`--${r}`,"utf-8"),...e.flatMap(i=>[Ki(`\r
|
||||
`,"utf-8"),Ki(YDt(i.headers),"utf-8"),Ki(`\r
|
||||
`,"utf-8"),i.body,Ki(`\r
|
||||
--${r}`,"utf-8")]),Ki(`--\r
|
||||
\r
|
||||
`,"utf-8")],n=VDt(s);n&&t.headers.set("Content-Length",n),t.body=await C1e(s)}var Ew="multipartPolicy",WDt=70,zDt=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function jDt(t){if(t.length>WDt)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!zDt.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function gF(){return{name:Ew,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?jDt(r):r=GDt(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await JDt(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function pF(){return Gk()}import{EOL as ZDt}from"node:os";import XDt from"node:util";import*as I1e from"node:process";function B1e(t,...e){I1e.stderr.write(`${XDt.format(t,...e)}${ZDt}`)}var Q1e=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,y1e,Qq=[],yq=[],EF=[];Q1e&&bq(Q1e);var b1e=Object.assign(t=>w1e(t),{enable:bq,enabled:wq,disable:$Dt,log:B1e});function bq(t){y1e=t,Qq=[],yq=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?yq.push(new RegExp(`^${s.substr(1)}$`)):Qq.push(new RegExp(`^${s}$`));for(let s of EF)s.enabled=wq(s.namespace)}function wq(t){if(t.endsWith("*"))return!0;for(let e of yq)if(e.test(t))return!1;for(let e of Qq)if(e.test(t))return!0;return!1}function $Dt(){let t=y1e||"";return bq(""),t}function w1e(t){let e=Object.assign(r,{enabled:wq(t),destroy:eRt,log:b1e.log,namespace:t,extend:tRt});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t} ${s[0]}`),e.log(...s))}return EF.push(e),e}function eRt(){let t=EF.indexOf(this);return t>=0?(EF.splice(t,1),!0):!1}function tRt(t){let e=w1e(`${this.namespace}:${t}`);return e.log=this.log,e}var xC=b1e;var N1e=new Set,mF=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,Sq,Nq=xC("azure");Nq.log=(...t)=>{xC.log(...t)};var Dq=["verbose","info","warning","error"];mF&&(T1e(mF)?rRt(mF):console.error(`AZURE_LOG_LEVEL set to unknown log level '${mF}'; logging is not enabled. Acceptable values: ${Dq.join(", ")}.`));function rRt(t){if(t&&!T1e(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${Dq.join(",")}`);Sq=t;let e=[];for(let r of N1e)R1e(r)&&e.push(r.namespace);xC.enable(e.join(","))}var S1e={verbose:400,info:300,warning:200,error:100};function va(t){let e=Nq.extend(t);return D1e(Nq,e),{error:CF(e,"error"),warning:CF(e,"warning"),info:CF(e,"info"),verbose:CF(e,"verbose")}}function D1e(t,e){e.log=(...r)=>{t.log(...r)}}function CF(t,e){let r=Object.assign(t.extend(e),{level:e});if(D1e(t,r),R1e(r)){let s=xC.disable();xC.enable(s+","+r.namespace)}return N1e.add(r),r}function R1e(t){return!!(Sq&&S1e[t.level]<=S1e[Sq])}function T1e(t){return Dq.includes(t)}var nu=va("core-rest-pipeline");function Rq(t={}){return Jk({logger:nu.info,...t})}var Tq=Wk;function xq(t={}){return zk(t)}import kq from"node:os";import Fq from"node:process";function x1e(){return"User-Agent"}async function k1e(t){if(Fq&&Fq.versions){let e=`${kq.type()} ${kq.release()}; ${kq.arch()}`,r=Fq.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 IF="1.22.2";function cRt(t){let e=[];for(let[r,s]of t){let n=s?`${r}/${s}`:r;e.push(n)}return e.join(" ")}function F1e(){return x1e()}async function BF(t){let e=new Map;e.set("core-rest-pipeline",IF),await k1e(e);let r=cRt(e);return t?`${t} ${r}`:r}var M1e=F1e(),U1e="userAgentPolicy";function Mq(t={}){let e=BF(t.userAgentPrefix);return{name:U1e,async sendRequest(r,s){return r.headers.has(M1e)||r.headers.set(M1e,await e),s(r)}}}var mw=class extends Error{constructor(e){super(e),this.name="AbortError"}};function Uq(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,o)=>{function a(){o(new mw(n??"The operation was aborted."))}function A(){s?.removeEventListener("abort",c)}function c(){r?.(),A(),a()}if(s?.aborted)return a();try{t(u=>{A(),i(u)},u=>{A(),o(u)})}catch(u){o(u)}s?.addEventListener("abort",c)})}var fRt="The delay was aborted.";function kC(t,e){let r,{abortSignal:s,abortErrorMsg:n}=e??{};return Uq(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:s,abortErrorMsg:n??fRt})}function Hh(t){if(Ep(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 v1e(t){return Ep(t)}function FC(){return pp()}var sr=Ip;var L1e=S
Line truncated
|
||||
`&&t[i]!=="\r";i++)A+=t[i];if(A=A.trim(),A[A.length-1]==="/"&&(A=A.substring(0,A.length-1),i--),!_Tt(A)){let l;return A.trim().length===0?l="Invalid space after '<'.":l="Tag '"+A+"' is an invalid name.",Ds("InvalidTag",l,Bi(t,i))}let c=FTt(t,i);if(c===!1)return Ds("InvalidAttr","Attributes for '"+A+"' have open quote.",Bi(t,i));let u=c.value;if(i=c.index,u[u.length-1]==="/"){let l=i-u.length;u=u.substring(0,u.length-1);let d=yDe(u,e);if(d===!0)s=!0;else return Ds(d.err.code,d.err.msg,Bi(t,l+d.err.line))}else if(a)if(c.tagClosed){if(u.trim().length>0)return Ds("InvalidTag","Closing tag '"+A+"' can't have attributes or invalid starting.",Bi(t,o));if(r.length===0)return Ds("InvalidTag","Closing tag '"+A+"' has not been opened.",Bi(t,o));{let l=r.pop();if(A!==l.tagName){let d=Bi(t,l.tagStartPos);return Ds("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+A+"'.",Bi(t,o))}r.length==0&&(n=!0)}}else return Ds("InvalidTag","Closing tag '"+A+"' doesn't have proper closing.",Bi(t,i));else{let l=yDe(u,e);if(l!==!0)return Ds(l.err.code,l.err.msg,Bi(t,i-u.length+l.err.line));if(n===!0)return Ds("InvalidXml","Multiple possible root nodes found.",Bi(t,i));e.unpairedTags.indexOf(A)!==-1||r.push({tagName:A,tagStartPos:o}),s=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=QDe(t,i);continue}else if(t[i+1]==="?"){if(i=BDe(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=vTt(t,i);if(l==-1)return Ds("InvalidChar","char '&' is not expected.",Bi(t,i));i=l}else if(n===!0&&!IDe(t[i]))return Ds("InvalidXml","Extra text at the end",Bi(t,i));t[i]==="<"&&i--}}else{if(IDe(t[i]))continue;return Ds("InvalidChar","char '"+t[i]+"' is not expected.",Bi(t,i))}if(s){if(r.length==1)return Ds("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Bi(t,r[0].tagStartPos));if(r.length>0)return Ds("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Ds("InvalidXml","Start tag expected.",1);return!0}function IDe(t){return t===" "||t===" "||t===`
|
||||
`||t==="\r"}function BDe(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 Ds("InvalidXml","XML declaration allowed only at the start of the document.",Bi(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function QDe(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 xTt='"',kTt="'";function FTt(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===xTt||t[e]===kTt)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 MTt=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function yDe(t,e){let r=FF(t,MTt),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return Ds("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",Tw(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return Ds("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",Tw(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return Ds("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",Tw(r[n]));let i=r[n][2];if(!LTt(i))return Ds("InvalidAttr","Attribute '"+i+"' is an invalid name.",Tw(r[n]));if(!s.hasOwnProperty(i))s[i]=1;else return Ds("InvalidAttr","Attribute '"+i+"' is repeated.",Tw(r[n]))}return!0}function UTt(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 vTt(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,UTt(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 Ds(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function LTt(t){return Rw(t)}function _Tt(t){return Rw(t)}function Bi(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Tw(t){return t.startIndex+t[1].length}var PTt={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1},bDe=function(t){return Object.assign({},PTt,t)};var UF;typeof Symbol!="function"?UF="@@xmlMetadata":UF=Symbol("XML Node Metadata");var _o=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][UF]={startIndex:r})}static getMetaDataSymbol(){return UF}};function lV(t,e){let r={};if(t[e+3]==="O"&&t[e+4]==="C"&&t[e+5]==="T"&&t[e+6]==="Y"&&t[e+7]==="P"&&t[e+8]==="E"){e=e+9;let s=1,n=!1,i=!1,o="";for(;e<t.length;e++)if(t[e]==="<"&&!i){if(n&>t(t,e)){e+=7;let a,A;[a,A,e]=OTt(t,e+1),A.indexOf("&")===-1&&(r[JTt(a)]={regx:RegExp(`&${a};`,"g"),val:A})}else if(n&&YTt(t,e))e+=8;else if(n&&qTt(t,e))e+=8;else if(n&&VTt(t,e))e+=9;else if(HTt)i=!0;else throw new Error("Invalid DOCTYPE");s++,o=""}else if(t[e]===">"){if(i?t[e-1]==="-"&&t[e-2]==="-"&&(i=!1,s--):s--,s===0)break}else t[e]==="["?n=!0:o+=t[e];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:e}}function OTt(t,e){let r="";for(;e<t.length&&t[e]!=="'"&&t[e]!=='"';e++)r+=t[e];if(r=r.trim(),r.indexOf(" ")!==-1)throw new Error("External entites are not supported");let s=t[e++],n="";for(;e<t.length&&t[e]!==s;e++)n+=t[e];return[r,n,e]}function HTt(t,e){return t[e+1]==="!"&&t[e+2]==="-"&&t[e+3]==="-"}function GTt(t,e){return t[e+1]==="!"&&t[e+2]==="E"&&t[e+3]==="N"&&t[e+4]==="T"&&t[e+5]==="I"&&t[e+6]==="T"&&t[e+7]==="Y"}function YTt(t,e){return t[e+1]==="!"&&t[e+2]==="E"&&t[e+3]==="L"&&t[e+4]==="E"&&t[e+5]==="M"&&t[e+6]==="E"&&t[e+7]==="N"&&t[e+8]==="T"}function qTt(t,e){return t[e+1]==="!"&&t[e+2]==="A"&&t[e+3]==="T"&&t[e+4]==="T"&&t[e+5]==="L"&&t[e+6]==="I"&&t[e+7]==="S"&&t[e+8]==="T"}function VTt(t,e){return t[e+1]==="!"&&t[e+2]==="N"&&Line truncated
|
||||
`);let e=new _o("!xml"),r=e,s="",n="";for(let i=0;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="/"){let a=bp(t,">",i,"Closing Tag is not closed."),A=t.substring(i+2,a).trim();if(this.options.removeNSPrefix){let l=A.indexOf(":");l!==-1&&(A=A.substr(l+1))}this.options.transformTagName&&(A=this.options.transformTagName(A)),r&&(s=this.saveTextToParentTag(s,r,n));let c=n.substring(n.lastIndexOf(".")+1);if(A&&this.options.unpairedTags.indexOf(A)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${A}>`);let u=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(u=n.lastIndexOf(".",n.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=n.lastIndexOf("."),n=n.substring(0,u),r=this.tagsNodeStack.pop(),s="",i=a}else if(t[i+1]==="?"){let a=hV(t,i,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,r,n),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){let A=new _o(a.tagName);A.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(A[":@"]=this.buildAttributesMap(a.tagExp,n,a.tagName)),this.addChild(r,A,n,i)}i=a.closeIndex+1}else if(t.substr(i+1,3)==="!--"){let a=bp(t,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){let A=t.substring(i+4,a-2);s=this.saveTextToParentTag(s,r,n),r.add(this.options.commentPropName,[{[this.options.textNodeName]:A}])}i=a}else if(t.substr(i+1,2)==="!D"){let a=lV(t,i);this.docTypeEntities=a.entities,i=a.i}else if(t.substr(i+1,2)==="!["){let a=bp(t,"]]>",i,"CDATA is not closed.")-2,A=t.substring(i+9,a);s=this.saveTextToParentTag(s,r,n);let c=this.parseTextData(A,r.tagname,n,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:A}]):r.add(this.options.textNodeName,c),i=a+2}else{let a=hV(t,i,this.options.removeNSPrefix),A=a.tagName,c=a.rawTagName,u=a.tagExp,l=a.attrExpPresent,d=a.closeIndex;this.options.transformTagName&&(A=this.options.transformTagName(A)),r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,n,!1));let h=r;h&&this.options.unpairedTags.indexOf(h.tagname)!==-1&&(r=this.tagsNodeStack.pop(),n=n.substring(0,n.lastIndexOf("."))),A!==e.tagname&&(n+=n?"."+A:A);let f=i;if(this.isItStopNode(this.options.stopNodes,n,A)){let p="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)A[A.length-1]==="/"?(A=A.substr(0,A.length-1),n=n.substr(0,n.length-1),u=A):u=u.substr(0,u.length-1),i=a.closeIndex;else if(this.options.unpairedTags.indexOf(A)!==-1)i=a.closeIndex;else{let m=this.readStopNodeData(t,c,d+1);if(!m)throw new Error(`Unexpected end of ${c}`);i=m.i,p=m.tagContent}let C=new _o(A);A!==u&&l&&(C[":@"]=this.buildAttributesMap(u,n,A)),p&&(p=this.parseTextData(p,A,n,!0,l,!0,!0)),n=n.substr(0,n.lastIndexOf(".")),C.add(this.options.textNodeName,p),this.addChild(r,C,n,f)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){A[A.length-1]==="/"?(A=A.substr(0,A.length-1),n=n.substr(0,n.length-1),u=A):u=u.substr(0,u.length-1),this.options.transformTagName&&(A=this.options.transformTagName(A));let p=new _o(A);A!==u&&l&&(p[":@"]=this.buildAttributesMap(u,n,A)),this.addChild(r,p,n,f),n=n.substr(0,n.lastIndexOf("."))}else{let p=new _o(A);this.tagsNodeStack.push(r),A!==u&&l&&(p[":@"]=this.buildAttributesMap(u,n,A)),this.addChild(r,p,n,f),r=p}s="",i=d}}else s+=t[i];return e.child};function nxt(t,e,r,s){this.options.captureMetaData||(s=void 0);let n=this.options.updateTag(e.tagname,r,e[":@"]);n===!1||(typeof n=="string"&&(e.tagname=n),t.addChild(e,s))}var ixt=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){let r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){let r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){let r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function oxt(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 axt(t,e,r){let s="*."+r;for(let n in t){let i=t[n];if(s===i||e===i)return!0}return!1}function Axt(t,e,r=">"){let s,n="";for(let i=e;i<t.length;i++){let o=t[i];if(s)o===s&&(s="");else if(o==='"'||o==="'")s=o;else if(o===r[0])if(r[1]){if(t[i+1]===r[1])return{data:n,index:i}}else return{data:n,index:i};else o===" "&&(o=" ");n+=o}}function bp(t,e,r,s){let n=t.indexOf(e,r);if(n===-1)throw new Error(s);return n+e.length-1}function hV(t,e,r,s=">"){let n=Axt(t,e+1,s);if(!n)return;let i=n.data,o=n.index,a=i.search(/\s/),A=i,c=!0;a!==-1&&(A=i.substring(0,a),i=i.substring(a+1).trimStart());let u=A;if(r){let l=A.indexOf(":");l!==-1&&(A=A.substr(l+1),c=A!==n.data.substr(l+1))}return{tagName:A,tagExp:i,closeIndex:o,attrExpPresent:c,rawTagName:u}}function cxt(t,e,r){let s=r,n=1;for(;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="/"){let i=bp(t,">",r,`${e} is not closed`);if(t.substringLine truncated
|
||||
`),NDe(t,e,"",r)}function NDe(t,e,r,s){let n="",i=!1;for(let o=0;o<t.length;o++){let a=t[o],A=hxt(a);if(A===void 0)continue;let c="";if(r.length===0?c=A:c=`${r}.${A}`,A===e.textNodeName){let f=a[A];fxt(c,e)||(f=e.tagValueProcessor(A,f),f=DDe(f,e)),i&&(n+=s),n+=f,i=!1;continue}else if(A===e.cdataPropName){i&&(n+=s),n+=`<![CDATA[${a[A][0][e.textNodeName]}]]>`,i=!1;continue}else if(A===e.commentPropName){n+=s+`<!--${a[A][0][e.textNodeName]}-->`,i=!0;continue}else if(A[0]==="?"){let f=SDe(a[":@"],e),p=A==="?xml"?"":s,C=a[A][0][e.textNodeName];C=C.length!==0?" "+C:"",n+=p+`<${A}${C}${f}?>`,i=!0;continue}let u=s;u!==""&&(u+=e.indentBy);let l=SDe(a[":@"],e),d=s+`<${A}${l}`,h=NDe(a[A],e,c,u);e.unpairedTags.indexOf(A)!==-1?e.suppressUnpairedNode?n+=d+">":n+=d+"/>":(!h||h.length===0)&&e.suppressEmptyNode?n+=d+"/>":h&&h.endsWith(">")?n+=d+`>${h}${s}</${A}>`:(n+=d+">",h&&s!==""&&(h.includes("/>")||h.includes("</"))?n+=s+e.indentBy+h+s:n+=h,n+=`</${A}>`),i=!0}return n}function hxt(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let s=e[r];if(t.hasOwnProperty(s)&&s!==":@")return s}}function SDe(t,e){let r="";if(t&&!e.ignoreAttributes)for(let s in t){if(!t.hasOwnProperty(s))continue;let n=e.attributeValueProcessor(s,t[s]);n=DDe(n,e),n===!0&&e.suppressBooleanAttributes?r+=` ${s.substr(e.attributeNamePrefix.length)}`:r+=` ${s.substr(e.attributeNamePrefix.length)}="${n}"`}return r}function fxt(t,e){t=t.substr(0,t.length-e.textNodeName.length-1);let r=t.substr(t.lastIndexOf(".")+1);for(let s in e.stopNodes)if(e.stopNodes[s]===t||e.stopNodes[s]==="*."+r)return!0;return!1}function DDe(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}var gxt={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};function KA(t){this.options=Object.assign({},gxt,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=xw(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=mxt),this.processTextOrObjNode=pxt,this.options.format?(this.indentate=Ext,this.tagEndChar=`>
|
||||
`,this.newLine=`
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}KA.prototype.build=function(t){return this.options.preserveOrder?EV(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)};KA.prototype.j2x=function(t,e,r){let s="",n="",i=r.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(typeof t[o]>"u")this.isAttribute(o)&&(n+="");else if(t[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?n+="":o[0]==="?"?n+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)n+=this.buildTextValNode(t[o],o,"",e);else if(typeof t[o]!="object"){let a=this.isAttribute(o);if(a&&!this.ignoreAttributesFn(a,i))s+=this.buildAttrPairStr(a,""+t[o]);else if(!a)if(o===this.options.textNodeName){let A=this.options.tagValueProcessor(o,""+t[o]);n+=this.replaceEntitiesValue(A)}else n+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){let a=t[o].length,A="",c="";for(let u=0;u<a;u++){let l=t[o][u];if(!(typeof l>"u"))if(l===null)o[0]==="?"?n+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(typeof l=="object")if(this.options.oneListGroup){let d=this.j2x(l,e+1,r.concat(o));A+=d.val,this.options.attributesGroupName&&l.hasOwnProperty(this.options.attributesGroupName)&&(c+=d.attrStr)}else A+=this.processTextOrObjNode(l,o,e,r);else if(this.options.oneListGroup){let d=this.options.tagValueProcessor(o,l);d=this.replaceEntitiesValue(d),A+=d}else A+=this.buildTextValNode(l,o,"",e)}this.options.oneListGroup&&(A=this.buildObjectNode(A,o,c,e)),n+=A}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){let a=Object.keys(t[o]),A=a.length;for(let c=0;c<A;c++)s+=this.buildAttrPairStr(a[c],""+t[o][a[c]])}else n+=this.processTextOrObjNode(t[o],o,e,r);return{attrStr:s,val:n}};KA.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'};function pxt(t,e,r,s){let n=this.j2x(t,r+1,s.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,r):this.buildObjectNode(n.val,e,n.attrStr,r)}KA.prototype.buildObjectNode=function(t,e,r,s){if(t==="")return e[0]==="?"?this.indentate(s)+"<"+e+r+"?"+this.tagEndChar:this.indentate(s)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let n="</"+e+this.tagEndChar,i="";return e[0]==="?"&&(i="?",n=""),(r||r==="")&&t.indexOf("<")===-1?this.indentate(s)+"<"+e+r+i+">"+t+n:this.options.commentPropName!==!1&&e===this.options.commentPropName&&i.length===0?this.indentate(s)+`<!--${t}-->`+this.newLine:this.indentate(s)+"<"+e+r+i+this.tagEndChar+t+this.indentate(s)+n}};KA.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e};KA.prototype.buildTextValNode=function(t,e,r,s){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(s)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(s)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(s)+"<"+e+r+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(e,t);return n=this.replaceEntitiesValue(n),n===""?this.indentate(s)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(s)+"<"+e+r+">"+n+"</"+e+this.tagEndChar}};KA.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){let r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};function Ext(t){return this.options.indentBy.repeat(t)}function mxt(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}var RDe={validate:MF};function kDe(t){var e;return{attributesGroupName:"$",textNodeName:(e=t.xmlCharKey)!==null&&e!==void 0?e:"_",ignoreAttributes:!1,suppressBooleanAttributes:!1}}function Cxt(t={}){var e,r;return Object.assign(Object.assign({},kDe(t)),{attributeNamePrefix:"@_",format:!0,suppressEmptyNode:!0,indentBy:"",rootNodeName:(e=t.rootName)!==null&&e!==void 0?e:"root",cdataPropName:(r=t.cdataPropName)!==null&&r!==void 0?r:"__cdata"})}function Ixt(t={}){return Object.assign(Object.assign({},kDe(t)),{parseAttributeValue:!1,parseTagValue:!1,attributeNamePrefix:"",stopNodes:t.stopNodes,processEntities:!0,trimValues:!1})}function vF(t,e={}){let r=Cxt(e),s=new KA(r),n={[r.rootNodeName]:t};return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${s.build(n)}`.replace(/\n/g,"")}async function mV(t,e={}){if(!t)throw new Error("Document is empty");let r=RDe.validate(t);if(r!==!0)throw r;let n=new LC(Ixt(e)).parse(t);if(Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),s=this.factory.computeHMACSHA256(r);return e.headers.set(nt.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${s}`),e}getHeaderValueToSign(e,r){let s=e.headers.get(r);return!s||r===nt.CONTENT_LENGTH&&s==="0"?"":s}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(n=>n.name.toLowerCase().startsWith(nt.PREFIX_FOR_STORAGE));r.sort((n,i)=>JF(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=YF(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=qF(e.url),i={};if(n){let o=[];for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)){let A=a.toLowerCase();i[A]=n[a],o.push(A)}o.sort();for(let a of o)s+=`
|
||||
${a}:${decodeURIComponent(i[a])}`}return s}};var ls=class extends Sp{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new vw(e,r,this)}computeHMACSHA256(e){return Dxt("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var Np=class extends Error{constructor(e){super(e),this.name="AbortError"}};var Js=va("storage-common");var La;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(La||(La={}));var Jh={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:La.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Rxt=new Np("The operation was aborted."),Lw=class extends au{retryOptions;constructor(e,r,s=Jh){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:Jh.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):Jh.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:Jh.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:Jh.maxRetryDelayInMs):Jh.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:Jh.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:Jh.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=GF(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=Vh(n.url,id.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(Js.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(Js.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 Js.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 Js.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 Js.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return Js.info(`RetryPolicy: Will retry for status code ${o}.`),!0}if(s&&s?.status>=400){let o=s.headers.get(nt.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')?(Js.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 La.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case La.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return Js.info(`RetryPolicy: Delay for ${n}ms`),VF(n,s,Rxt)}};var _w=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new Lw(e,r,this.retryOptions)}};var Txt="storageBrowserPolicy";function FDe(){return{name:Txt,async sendRequest(t,e){return sr||((t.method==="GET"||t.method==="HEAD")&&(t.url=Vh(t.url,id.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(nt.COOKIE),t.headers.delete(nt.CONTENT_LENGTH)),e(t)}}}var xxt="StorageCorrectContentLengthPolicy";function MDe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(nt.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:xxt,async sendRequest(e,r){return t(e),r(e)}}}var kxt="storageRetryPolicy",_C={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:La.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Fxt=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],Mxt=new Np("The operation was aborted.");function UDe(t={}){let e=t.retryPolicyType??_C.retryPolicyType,r=t.maxTries??_C.maxTries,s=t.retryDelayInMs??_C.retryDelayInMs,n=t.maxRetryDelayInMs??_C.maxRetryDelayInMs,i=t.secondaryHost??_C.secondaryHost,o=t.tryTimeoutInMs??_C.tryTimeoutInMs;function a({isPrimaryRetry:c,attempt:u,response:l,error:d}){if(u>=r)return Js.info(`RetryPolicy: Attempt(s) ${u} >= maxTries ${r}, no further try.`),!1;if(d){for(let h of Fxt)if(d.name.toUpperCase().includes(h)||d.message.toUpperCase().in
Line truncated
|
||||
`)+`
|
||||
`+s(i)+n(i),a=Uxt("sha256",t.accountKey).update(o,"utf8").digest("base64");i.headers.set(nt.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(i,o){let a=i.headers.get(o);return!a||o===nt.CONTENT_LENGTH&&a==="0"?"":a}function s(i){let o=[];for(let[A,c]of i.headers)A.toLowerCase().startsWith(nt.PREFIX_FOR_STORAGE)&&o.push({name:A,value:c});o.sort((A,c)=>JF(A.name.toLowerCase(),c.name.toLowerCase())),o=o.filter((A,c,u)=>!(c>0&&A.name.toLowerCase()===u[c-1].name.toLowerCase()));let a="";return o.forEach(A=>{a+=`${A.name.toLowerCase().trimRight()}:${A.value.trimLeft()}
|
||||
`}),a}function n(i){let o=YF(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let A=qF(i.url),c={};if(A){let u=[];for(let l in A)if(Object.prototype.hasOwnProperty.call(A,l)){let d=l.toLowerCase();c[d]=A[l],u.push(d)}u.sort();for(let l of u)a+=`
|
||||
${l}:${decodeURIComponent(c[l])}`}return a}return{name:vxt,async sendRequest(i,o){return e(i),o(i)}}}var Lxt="storageRequestFailureDetailsParserPolicy";function vDe(){return{name:Lxt,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}}}}import{createHmac as _xt}from"node:crypto";var WF=class{accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return _xt("sha256",this.key).update(e,"utf8").digest("base64")}};var zF="12.31.0",jF="2026-02-06";var KF="https://storage.azure.com/.default",od={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var ZA="",QV="*",Pxt=1*1024*1024;var Oxt=4*Pxt;var LDe="AES256",_De="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",PDe=["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"],ODe=["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"],HDe="BlobUsesCustomerSpecifiedEncryption",GDe="BlobDoesNotUseCustomerSpecifiedEncryption",YDe=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function ad(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 Pw=class{factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function Rs(t,e={}){t||(t=new Wr);let r=new Pw([],e);return r._credential=t,r}function Hxt(t){let e=[Gxt,qDe,Yxt,qxt,Vxt,Jxt,zxt];if(t.factories.length){let r=t.factories.filter(s=>!e.some(n=>n(s)));if(r.length){let s=r.some(n=>Wxt(n));return{wrappedPolicies:cV(r),afterRetry:s}}}}function yV(t){let{httpClient:e,...r}=t.options,s=t._coreHttpClient;s||(s=e?uV(e):IV(),t._coreHttpClient=s);let n=t._corePipeline;if(!n){let i=`azsdk-js-azure-storage-blob/${zF}`,o=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;n=yw({...r,loggingOptions:{additionalAllowedHeaderNames:PDe,additionalAllowedQueryParameters:ODe,logger:LF.info},userAgentOptions:{userAgentPrefix:o},serializationOptions:{stringifyXML:vF,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:mV,serializerOptions:{xml:{xmlCharKey:"#"}}}}),n.removePolicy({phase:"Retry"}),n.removePolicy({name:Pq}),n.addPolicy(MDe()),n.addPolicy(UDe(r.retryOptions),{phase:"Retry"}),n.addPolicy(vDe()),n.addPolicy(FDe());let a=Hxt(t);a&&n.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:"Retry"}:void 0);let A=bV(t);vo(A)?n.addPolicy(UC({credential:A,scopes:r.audience??
Line truncated
|
||||
`),i=e.computeHMACSHA256(n);return{sasQueryParameters:new rc(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 Gkt(t,e){if(t=vp(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=bu.parse(t.permissions.toString()).toString():n=wu.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?nr(t.startsOn,!1):"",t.expiresOn?nr(t.expiresOn,!1):"",Up(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?tc(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 rc(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 Ykt(t,e){if(t=vp(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=bu.parse(t.permissions.toString()).toString():n=wu.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?nr(t.startsOn,!1):"",t.expiresOn?nr(t.expiresOn,!1):"",Up(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?tc(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 rc(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 qkt(t,e){if(t=vp(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=bu.parse(t.permissions.toString()).toString():n=wu.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?nr(t.startsOn,!1):"",t.expiresOn?nr(t.expiresOn,!1):"",Up(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?nr(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?nr(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?tc(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 rc(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 Vkt(t,e){if(t=vp(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=bu.parse(t.permissions.toString()).toString():n=wu.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?nr(t.startsOn,!1):"",t.expiresOn?nr(t.expiresOn,!1):"",Up(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?nr(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?nr(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?tc(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 rc(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 Jkt(t,e){if(t=vp(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=bu.parse(t.permissions.toString()).toString():n=wu.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?nr(t.startsOn,!1):"",t.expiresOn?nr(t.expiresOn,!1):"",Up(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?nr(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?nr(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?tc(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 rc(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 Wkt(t,e){if(t=vp(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=bu.parse(t.permissions.toString()).toString():n=wu.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?nr(t.startsOn,!1):"",t.expiresOn?nr(t.expiresOn,!1):"",Up(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?nr(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?nr(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?tc(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 rc(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 Up(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}function vp(t){let e=t.version?t.version:jF;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 Zw=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=FC()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==ZA||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==ZA||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ye.withSpan("BlobLeaseClient-acquireLease",r,async s=>Le(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!==ZA||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==ZA||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ye.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=Le(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!==ZA||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==ZA||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ye.withSpan("BlobLeaseClient-releaseLease",e,async r=>Le(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!==ZA||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==ZA||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ye.withSpan("BlobLeaseClient-renewLease",e,async r=>this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.ab
Line truncated
|
||||
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};zC.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Pp=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Pp.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var iS=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var pFt=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})},Zz=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);te(`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 sTe(t,e,r){return pFt(this,void 0,void 0,function*(){var s;let n=new sc(t),i=n.getBlockBlobClient(),o=new Zz((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(),Y(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let A=yield i.uploadFile(e,a);if(A._response.status>=400)throw new qM(`uploadCacheArchiveSDK: upload failed with status code ${A._response.status}`);return A}catch(A){throw at(`uploadCacheArchiveSDK: internal error uploading cache archive: ${A.message}`),A}finally{o.stopDisplayTimer()}})}import*as iTe from"buffer";import*as Su from"fs";import*as oTe from"stream";import*as aTe from"util";var VM=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})};function JM(t){return t?t>=200&&t<300:!1}function EFt(t){return t?t>=500:!0}function mFt(t){return t?[Er.BadGateway,Er.ServiceUnavailable,Er.GatewayTimeout].includes(t):!1}function CFt(t){return VM(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function nTe(t,e,r){return VM(this,arguments,void 0,function*(s,n,i,o=Uk,a=vk,A=void 0){let c="",u=1;for(;u<=o;){let l,d,h=!1;try{l=yield n()}catch(f){A&&(l=A(f)),h=!0,c=f.message}if(l&&(d=i(l),!EFt(d)))return l;if(d&&(h=mFt(d),c=`Cache service responded with ${d}`),Y(`${s} - Attempt ${u} of ${o} failed with error: ${c}`),!h){Y(`${s} - Error is not retryable`);break}yield CFt(a),u++}throw Error(`${s} failed: ${c}`)})}function oS(t,e){return VM(this,arguments,void 0,function*(r,s,n=Uk,i=vk){return yield nTe(r,s,o=>o.statusCode,n,i,o=>{if(o instanceof Pc)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function jC(t,e){return VM(this,arguments,void 0,function*(r,s,n=Uk,i=vk){return yield nTe(r,s,o=>o.message.statusCode,n,i)})}var Ga=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})};function IFt(t,e){return Ga(this,void 0,void 0,function*(){yield aTe.promisify(oTe.pipeline)(t.message,e)})}var WM=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,Y(`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);te(`Received ${e} of ${this.contentLength} (${r}%), ${n} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e
Line truncated
|
||||
Other caches with similar key:`);for(let a of i?.artifactCaches||[])Y(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function t7(t,e,r){return eo(this,void 0,void 0,function*(){let s=new wFt(t),n=lTe(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield cTe(t,e,n):n.concurrentBlobDownloads?yield ATe(t,e,n):yield zM(t,e):yield zM(t,e)})}function mTe(t,e,r){return eo(this,void 0,void 0,function*(){let s=e7(),n=yC(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield oS("reserveCache",()=>eo(this,void 0,void 0,function*(){return s.postJson(AS("caches"),i)}))})}function pTe(t,e){return`bytes ${t}-${e}/*`}function RFt(t,e,r,s,n){return eo(this,void 0,void 0,function*(){Y(`Uploading chunk of size ${n-s+1} bytes at offset ${s} with content range: ${pTe(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":pTe(s,n)},o=yield jC(`uploadChunk (start: ${s}, end: ${n})`,()=>eo(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!JM(o.message.statusCode))throw new Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function TFt(t,e,r,s){return eo(this,void 0,void 0,function*(){let n=tu(r),i=AS(`caches/${e.toString()}`),o=KC.openSync(r,"r"),a=Xz(s),A=VY("uploadConcurrency",a.uploadConcurrency),c=VY("uploadChunkSize",a.uploadChunkSize),u=[...new Array(A).keys()];Y("Awaiting all uploads");let l=0;try{yield Promise.all(u.map(()=>eo(this,void 0,void 0,function*(){for(;l<n;){let d=Math.min(n-l,c),h=l,f=l+d-1;l+=c,yield RFt(t,i,()=>KC.createReadStream(r,{fd:o,start:h,end:f,autoClose:!1}).on("error",p=>{throw new Error(`Cache upload failed because file read failed with ${p.message}`)}),h,f)}})))}finally{KC.closeSync(o)}})}function xFt(t,e,r){return eo(this,void 0,void 0,function*(){let s={size:r};return yield oS("commitCache",()=>eo(this,void 0,void 0,function*(){return t.postJson(AS(`caches/${e.toString()}`),s)}))})}function r7(t,e,r,s){return eo(this,void 0,void 0,function*(){if(Xz(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield sTe(r,e,s)}else{let i=e7();Y("Upload cache"),yield TFt(i,t,e,s),Y("Commiting cache");let o=tu(e);te(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);let a=yield xFt(i,t,o);if(!JM(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);te("Cache saved successfully")}})}var lxe=le(W7(),1),xs=le(Ct(),1),Ho=le(Ct(),1),qp=le(Ct(),1),Vp=le(Ct(),1),Jp=le(Ct(),1);var Z7=le(Ct(),1),X7=le(Ct(),1),Axe=le(Ct(),1),cxe=le(Ct(),1),uxe=le(Ct(),1);var z7=le(Ct(),1),j7=le(Ct(),1),ixe=le(Ct(),1),oxe=le(Ct(),1),axe=le(Ct(),1),K7=class extends axe.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,oxe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,ixe.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,A]=e.tag();switch(a){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let c=s.readUnknownField;if(c==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${A}) for ${this.typeName}`);let u=e.skip(A);c!==!1&&(c===!0?j7.UnknownFieldHandler.onRead:c)(this.typeName,i,a,A,u)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,z7.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,z7.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?j7.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},UU=new K7;var $7=class extends uxe.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:()=>UU}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,cxe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Axe.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,A]=e.tag();switch(a){case 1:i.repositoryId=e.int64().toString();break;case 2:i.scope.push(UU.internalBinaryRead(e,e.uint32(),s));break;default:let c=s.readUnknownField;if(c==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${A}) for ${this.typeName}`);let u=e.skip(A);c!==!1&&(c===!0?X7.UnknownFieldHandler.onRead:c)(this.typeName,i,a,A,u)}}return i}internalBinaryWrite(e,r,s){e.repositoryId!=="0"&&r.tag(1,Z7.WireType.Varint).int64(e.repositoryId);for(let i=0;i<e.scope.length;i++)UU.internalBinaryWrite(e.scope[i],r.tag(2,Z7.WireType.LengthDelimited).fork(),s).join();let n=s.writeUnknownFields;return n!==!1&&(n==!0?X7.UnknownFieldHandler.onWrite
Line truncated
|
||||
`));let s=yield fj(r,"create");yield gj(s,t)})}var dI=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})},Yo=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},tf=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},_U=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function gxe(t){if(!t||t.length===0)throw new Yo("Path Validation Error: At least one directory or file path is required")}function mj(t){if(t.length>512)throw new Yo(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Yo(`Key Validation Error: ${t} cannot contain commas.`)}function pxe(){return aS()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function Exe(t,e,r,s){return dI(this,arguments,void 0,function*(n,i,o,a,A=!1){let c=aS();return Y(`Cache service version: ${c}`),gxe(n),c==="v2"?yield zUt(n,i,o,a,A):yield WUt(n,i,o,a,A)})}function WUt(t,e,r,s){return dI(this,arguments,void 0,function*(n,i,o,a,A=!1){o=o||[];let c=[i,...o];if(Y("Resolved Keys:"),Y(JSON.stringify(c)),c.length>10)throw new Yo("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of c)mj(d);let u=yield dw(),l="";try{let d=yield ETe(c,n,{compressionMethod:u,enableCrossOsArchive:A});if(!d?.archiveLocation)return;if(a?.lookupOnly)return te("Lookup only - skipping download"),d.cacheKey;l=bS.join(yield uw(),Ph(u)),Y(`Archive Path: ${l}`),yield t7(d.archiveLocation,l,a),UA()&&(yield yS(l,u));let h=tu(l);return te(`Cache Size: ~${Math.round(h/(1024*1024))} MB (${h} B)`),yield pj(l,u),te("Cache restored successfully"),d.cacheKey}catch(d){let h=d;if(h.name===Yo.name)throw d;h instanceof Pc&&typeof h.statusCode=="number"&&h.statusCode>=500?Gc(`Failed to restore: ${d.message}`):at(`Failed to restore: ${d.message}`)}finally{try{yield lw(l)}catch(d){Y(`Failed to delete archive: ${d}`)}}})}function zUt(t,e,r,s){return dI(this,arguments,void 0,function*(n,i,o,a,A=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let c=[i,...o];if(Y("Resolved Keys:"),Y(JSON.stringify(c)),c.length>10)throw new Yo("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of c)mj(l);let u="";try{let l=hj(),d=yield dw(),h={key:i,restoreKeys:o,version:yC(n,d,A)},f=yield l.GetCacheEntryDownloadURL(h);if(!f.ok){Y(`Cache not found for version ${h.version} of keys: ${c.join(", ")}`);return}if(h.key!==f.matchedKey?te(`Cache hit for restore-key: ${f.matchedKey}`):te(`Cache hit for: ${f.matchedKey}`),a?.lookupOnly)return te("Lookup only - skipping download"),f.matchedKey;u=bS.join(yield uw(),Ph(d)),Y(`Archive path: ${u}`),Y(`Starting download of archive to: ${u}`),yield t7(f.signedDownloadUrl,u,a);let C=tu(u);return te(`Cache Size: ~${Math.round(C/(1024*1024))} MB (${C} B)`),UA()&&(yield yS(u,d)),yield pj(u,d),te("Cache restored successfully"),f.matchedKey}catch(l){let d=l;if(d.name===Yo.name)throw l;d instanceof Pc&&typeof d.statusCode=="number"&&d.statusCode>=500?Gc(`Failed to restore: ${l.message}`):at(`Failed to restore: ${l.message}`)}finally{try{u&&(yield lw(u))}catch(l){Y(`Failed to delete archive: ${l}`)}}})}function mxe(t,e,r){return dI(this,arguments,void 0,function*(s,n,i,o=!1){let a=aS();return Y(`Cache service version: ${a}`),gxe(s),mj(n),a==="v2"?yield KUt(s,n,i,o):yield jUt(s,n,i,o)})}function jUt(t,e,r){return dI(this,arguments,void 0,function*(s,n,i,o=!1){var a,A,c,u,l;let d=yield dw(),h=-1,f=yield qY(s);if(Y("Cache Paths:"),Y(`${JSON.stringify(f)}`),f.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 p=yield uw(),C=bS.join(p,Ph(d));Y(`Archive Path: ${C}`);try{yield Ej(p,f,d),UA()&&(yield yS(C,d));let m=10*1024*1024*1024,I=tu(C);if(Y(`File Size: ${I}`),I>m&&!$z())throw new Error(`Cache size of ~${Math.round(I/(1024*1024))} MB (${I} B) is over the 10GB limit, not saving cache.`);Y("Reserving Cache");let Q=yield mTe(n,s,{compressionMethod:d,enableCrossOsArchive:o,cacheSize:I});if(!((a=Q?.result)===null||a===void 0)&&a.cacheId)h=(A=Q?.result)===null||A===void 0?void 0:A.cacheId;else throw Q?.statusCode===400?new Error((u=(c=Q?.error)===null||c===void 0?void 0:c.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(I/(1024*1024))} MB (${I} B) is over the data cap limit, not saving cache.`):new tf(`Unable to reserve cache with key ${n}, another job may be creating this cache. More details: ${(l=Q?.error)===null||l===void 0?void 0:l.message}`);Y(`Saving Cache (ID: ${h})`),yield r7(h,C,"",i)}catch(m){let I=m;if(I.name===Yo.name)throw m;I.name
Line truncated
|
||||
See ${r.getDocumentationLink()}`;Ixe.push(s),_g(s)}function Bxe(){E0("deprecation-collector_deprecations",JSON.stringify(Cj)),E0("deprecation-collector_errors",JSON.stringify(Ixe))}import*as GU from"path";var Qxe="GRADLE_ACTION_ID";var WU=".setup-gradle",YU=class t{getDependencyGraphOption(){let e=Yr("dependency-graph");switch(e.toLowerCase().trim()){case"disabled":return"disabled";case"generate":return"generate";case"generate-and-submit":return"generate-and-submit";case"generate-submit-and-upload":return"generate-submit-and-upload";case"generate-and-upload":return"generate-and-upload";case"download-and-submit":return"download-and-submit"}throw TypeError(`The value '${e}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-submit-and-upload, generate-and-upload, download-and-submit].`)}getDependencyGraphContinueOnFailure(){return ku("dependency-graph-continue-on-failure",!0)}getArtifactRetentionDays(){let e=Yr("artifact-retention-days");return tvt("artifact-retention-days",e,0)}getJobCorrelator(){return t.constructJobCorrelator(ji.workflow,ji.job,evt())}getReportDirectory(){let e=Yr("dependency-graph-report-dir");return GU.resolve(rf(),e)}getDownloadArtifactName(){return process.env.DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME}getExcludeProjects(){return Wp("dependency-graph-exclude-projects")}getIncludeProjects(){return Wp("dependency-graph-include-projects")}getExcludeConfigurations(){return Wp("dependency-graph-exclude-configurations")}getIncludeConfigurations(){return Wp("dependency-graph-include-configurations")}getPluginRepository(){return new qU}static constructJobCorrelator(e,r,s){let n=this.describeMatrix(s),i=n?`${e}-${r}-${n}`:`${e}-${r}`;return this.sanitize(i)}static describeMatrix(e){Y(`Got matrix json: ${e}`);let r=JSON.parse(e);return r?Object.values(r).join("-"):""}static sanitize(e){return e.replace(/[^a-zA-Z0-9_-\s]/g,"").replace(/\s+/g,"_").toLowerCase()}};var hI=class{isCacheDisabled(){return pxe()?ku("cache-disabled"):!0}isCacheReadOnly(){return!this.isCacheWriteOnly()&&ku("cache-read-only")}isCacheWriteOnly(){return ku("cache-write-only")}isCacheOverwriteExisting(){return ku("cache-overwrite-existing")}isCacheStrictMatch(){return ku("gradle-home-cache-strict-match")}getCacheCleanupOption(){let e=SS("gradle-home-cache-cleanup");if(e!==void 0)return OU("The `gradle-home-cache-cleanup` input parameter has been replaced by `cache-cleanup`"),e?"always".toString():"never".toString();let r=Yr("cache-cleanup");switch(r.toLowerCase().trim()){case"always":return"always".toString();case"on-success":return"on-success".toString();case"never":return"never".toString()}throw TypeError(`The value '${r}' is not valid for cache-cleanup. Valid values are: [never, always, on-success].`)}getCacheEncryptionKey(){return Yr("cache-encryption-key")}getCacheIncludes(){return IG("gradle-home-cache-includes")}getCacheExcludes(){return IG("gradle-home-cache-excludes")}};var oc=class t{static{this.DevelocityAccessKeyEnvVar="DEVELOCITY_ACCESS_KEY"}static{this.GradleEnterpriseAccessKeyEnvVar="GRADLE_ENTERPRISE_ACCESS_KEY"}getBuildScanPublishEnabled(){return ku("build-scan-publish")&&this.verifyTermsOfUseAgreement()}getBuildScanTermsOfUseUrl(){return Yr("build-scan-terms-of-use-url")}getBuildScanTermsOfUseAgree(){return Yr("build-scan-terms-of-use-agree")}getDevelocityAccessKey(){return Yr("develocity-access-key")||process.env[t.DevelocityAccessKeyEnvVar]||process.env[t.GradleEnterpriseAccessKeyEnvVar]||""}getDevelocityTokenExpiry(){return Yr("develocity-token-expiry")}getDevelocityInjectionEnabled(){return SS("develocity-injection-enabled")}getDevelocityUrl(){return Yr("develocity-url")}getDevelocityAllowUntrustedServer(){return SS("develocity-allow-untrusted-server")}getDevelocityCaptureFileFingerprints(){return SS("develocity-capture-file-fingerprints")}getDevelocityEnforceUrl(){return SS("develocity-enforce-url")}getDevelocityPluginVersion(){return Yr("develocity-plugin-version")}getDevelocityCcudPluginVersion(){return Yr("develocity-ccud-plugin-version")}getPluginRepository(){return new qU}verifyTermsOfUseAgreement(){return this.getBuildScanTermsOfUseUrl()!=="https://gradle.com/terms-of-service"&&this.getBuildScanTermsOfUseUrl()!=="https://gradle.com/help/legal-terms-of-use"||this.getBuildScanTermsOfUseAgree()!=="yes"?(at("Terms of use at 'https://gradle.com/help/legal-terms-of-use' must be agreed in order to publish build scans."),!1):!0}},qU=class{getUrl(){return Wp("gradle-plugin-repository-url")}getUsername(){return Wp("gradle-plugin-repository-username")}getPassword(){return Wp("gradle-plugin-repository-password")}},VU=class{getGradleVersion(){return Yr("gradle-version")}getBuildRootDirectory(){let e=rf(),r=Yr("build-root-directory");return r===""?GU.resolve(e):GU.resolve(e,r)}getDependencyResolutionTask(){return Yr("dependency-resolution-task")||":ForceDependencyResolutionPlugin_resolveAllDependencies"}getAdditionalArguments(){return Yr("additional-arguments
Line truncated
|
||||
${cvt}`}};async function Rxe(t){return t.isCacheDisabled()?new Bj:(await dvt(),new Qj(await uvt()))}async function uvt(){let t=lvt();return await import(ovt(t).href)}function lvt(){let t=import.meta.dirname,e=Dxe.resolve(t,"../../../sources/vendor/gradle-actions-caching/index.js");if(Nxe.existsSync(e))return e;throw new Error(`Unable to locate vendored cache library at ${e}.`)}async function dvt(){console.warn(Avt)}import KU from"fs";import Txe from"path";var ZU=class{constructor(e){this.cacheFile=Txe.resolve(e,WU,"valid-wrappers.json")}load(){if(KU.existsSync(this.cacheFile))try{return JSON.parse(KU.readFileSync(this.cacheFile,"utf-8"))}catch(e){at(`Failed to parse checksum cache file: ${e}`)}return[]}save(e){let r=[...new Set(e)];KU.mkdirSync(Txe.dirname(this.cacheFile),{recursive:!0}),KU.writeFileSync(this.cacheFile,JSON.stringify(r))}};var vxe=le(Mxe(),1);import*as Uxe from"util";import*as XU from"path";import*as $U from"fs";var mvt=Uxe.promisify($U.readdir);async function Lxe(t){return(await _xe(t)).filter(r=>(0,vxe.default)(r).endsWith("gradle-wrapper.jar")).map(r=>XU.relative(t,r)).sort((r,s)=>r.localeCompare(s))}async function _xe(t){let e=await mvt(t),r=await Promise.all(e.map(async s=>{let n=XU.resolve(t,s),i=$U.lstatSync(n,{throwIfNoEntry:!1});return i===void 0?[]:i.isDirectory()?_xe(n):new Promise(o=>o([n]))}));return Array.prototype.concat(...r)}var Ivt={_useHtmlParser2:!1};function fI(t,e){if(!t)return e??Ivt;let r={_useHtmlParser2:!!t.xmlMode,...e,...t};return t.xml?(r._useHtmlParser2=!0,r.xmlMode=!0,t.xml!==!0&&Object.assign(r,t.xml)):t.xmlMode&&(r._useHtmlParser2=!0),r}var Jj={};QA(Jj,{contains:()=>fv,extract:()=>fLt,html:()=>uLt,merge:()=>a2e,parseHTML:()=>dLt,root:()=>hLt,text:()=>$p,xml:()=>lLt});var Af={};QA(Af,{DocumentPosition:()=>za,append:()=>Jvt,appendChild:()=>Vvt,compareDocumentPosition:()=>s2e,existsOne:()=>t2e,filter:()=>CI,find:()=>uv,findAll:()=>Kvt,findOne:()=>lv,findOneChild:()=>jvt,getAttributeValue:()=>Hvt,getChildren:()=>mI,getElementById:()=>eLt,getElements:()=>$vt,getElementsByClassName:()=>tLt,getElementsByTagName:()=>Xp,getElementsByTagType:()=>rLt,getFeed:()=>Vj,getInnerHTML:()=>Ovt,getName:()=>Yvt,getOuterHTML:()=>$xe,getParent:()=>e2e,getSiblings:()=>Yj,getText:()=>av,hasAttrib:()=>Gvt,hasChildren:()=>Cr,innerText:()=>xS,isCDATA:()=>gI,isComment:()=>Zp,isDocument:()=>Wa,isTag:()=>Se,isText:()=>so,nextElementSibling:()=>Av,prepend:()=>zvt,prependChild:()=>Wvt,prevElementSibling:()=>cv,removeElement:()=>md,removeSubsets:()=>sLt,replaceElement:()=>qvt,testElement:()=>Xvt,textContent:()=>Ed,uniqueSort:()=>of});var Ja={};QA(Ja,{CDATA:()=>xj,Comment:()=>Nj,Directive:()=>Sj,Doctype:()=>kj,ElementType:()=>Lt,Root:()=>bj,Script:()=>Dj,Style:()=>Rj,Tag:()=>Tj,Text:()=>wj,isTag:()=>yj});var Lt;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(Lt||(Lt={}));function yj(t){return t.type===Lt.Tag||t.type===Lt.Script||t.type===Lt.Style}var bj=Lt.Root,wj=Lt.Text,Sj=Lt.Directive,Nj=Lt.Comment,Dj=Lt.Script,Rj=Lt.Style,Tj=Lt.Tag,xj=Lt.CDATA,kj=Lt.Doctype;var ev=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return pI(this,e)}},NS=class extends ev{constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},Mu=class extends NS{constructor(){super(...arguments),this.type=Lt.Text}get nodeType(){return 3}},zp=class extends NS{constructor(){super(...arguments),this.type=Lt.Comment}get nodeType(){return 8}},jp=class extends NS{constructor(e,r){super(r),this.name=e,this.type=Lt.Directive}get nodeType(){return 1}},DS=class extends ev{constructor(e){super(),this.children=e}get firstChild(){var e;return(e=this.children[0])!==null&&e!==void 0?e:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},RS=class extends DS{constructor(){super(...arguments),this.type=Lt.CDATA}get nodeType(){return 4}},qo=class extends DS{constructor(){super(...arguments),this.type=Lt.Root}get nodeType(){return 9}},Kp=class extends DS{constructor(e,r,s=[],n=e==="script"?Lt.Script:e==="style"?Lt.Style:Lt.Tag){super(s),this.name=e,this.attribs=r,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>{var r,s;return{name:e,value:this.attribs[e],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[e],prefix:(s=this["x-attribsPrefix"])===null||s===void 0?void 0:s[e]}})}};function Se(t){return yj(t)}function gI(t){return t.type===Lt.CDATA}function so(t){return t.type===
Line truncated
|
||||
`:av(t.children):gI(t)?av(t.children):so(t)?t.data:""}function Ed(t){return Array.isArray(t)?t.map(Ed).join(""):Cr(t)&&!Zp(t)?Ed(t.children):so(t)?t.data:""}function xS(t){return Array.isArray(t)?t.map(xS).join(""):Cr(t)&&(t.type===Lt.Tag||gI(t))?xS(t.children):so(t)?t.data:""}function mI(t){return Cr(t)?t.children:[]}function e2e(t){return t.parent||null}function Yj(t){let e=e2e(t);if(e!=null)return mI(e);let r=[t],{prev:s,next:n}=t;for(;s!=null;)r.unshift(s),{prev:s}=s;for(;n!=null;)r.push(n),{next:n}=n;return r}function Hvt(t,e){var r;return(r=t.attribs)===null||r===void 0?void 0:r[e]}function Gvt(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}function Yvt(t){return t.name}function Av(t){let{next:e}=t;for(;e!==null&&!Se(e);)({next:e}=e);return e}function cv(t){let{prev:e}=t;for(;e!==null&&!Se(e);)({prev:e}=e);return e}function md(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){let e=t.parent.children,r=e.lastIndexOf(t);r>=0&&e.splice(r,1)}t.next=null,t.prev=null,t.parent=null}function qvt(t,e){let r=e.prev=t.prev;r&&(r.next=e);let s=e.next=t.next;s&&(s.prev=e);let n=e.parent=t.parent;if(n){let i=n.children;i[i.lastIndexOf(t)]=e,t.parent=null}}function Vvt(t,e){if(md(e),e.next=null,e.parent=t,t.children.push(e)>1){let r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}function Jvt(t,e){md(e);let{parent:r}=t,s=t.next;if(e.next=s,e.prev=t,t.next=e,e.parent=r,s){if(s.prev=e,r){let n=r.children;n.splice(n.lastIndexOf(s),0,e)}}else r&&r.children.push(e)}function Wvt(t,e){if(md(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){let r=t.children[1];r.prev=e,e.next=r}else e.next=null}function zvt(t,e){md(e);let{parent:r}=t;if(r){let s=r.children;s.splice(s.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}function CI(t,e,r=!0,s=1/0){return uv(t,Array.isArray(e)?e:[e],r,s)}function uv(t,e,r,s){let n=[],i=[Array.isArray(e)?e:[e]],o=[0];for(;;){if(o[0]>=i[0].length){if(o.length===1)return n;i.shift(),o.shift();continue}let a=i[0][o[0]++];if(t(a)&&(n.push(a),--s<=0))return n;r&&Cr(a)&&a.children.length>0&&(o.unshift(0),i.unshift(a.children))}}function jvt(t,e){return e.find(t)}function lv(t,e,r=!0){let s=Array.isArray(e)?e:[e];for(let n=0;n<s.length;n++){let i=s[n];if(Se(i)&&t(i))return i;if(r&&Cr(i)&&i.children.length>0){let o=lv(t,i.children,!0);if(o)return o}}return null}function t2e(t,e){return(Array.isArray(e)?e:[e]).some(r=>Se(r)&&t(r)||Cr(r)&&t2e(t,r.children))}function Kvt(t,e){let r=[],s=[Array.isArray(e)?e:[e]],n=[0];for(;;){if(n[0]>=s[0].length){if(s.length===1)return r;s.shift(),n.shift();continue}let i=s[0][n[0]++];Se(i)&&t(i)&&r.push(i),Cr(i)&&i.children.length>0&&(n.unshift(0),s.unshift(i.children))}}var dv={tag_name(t){return typeof t=="function"?e=>Se(e)&&t(e.name):t==="*"?Se:e=>Se(e)&&e.name===t},tag_type(t){return typeof t=="function"?e=>t(e.type):e=>e.type===t},tag_contains(t){return typeof t=="function"?e=>so(e)&&t(e.data):e=>so(e)&&e.data===t}};function qj(t,e){return typeof e=="function"?r=>Se(r)&&e(r.attribs[t]):r=>Se(r)&&r.attribs[t]===e}function Zvt(t,e){return r=>t(r)||e(r)}function r2e(t){let e=Object.keys(t).map(r=>{let s=t[r];return Object.prototype.hasOwnProperty.call(dv,r)?dv[r](s):qj(r,s)});return e.length===0?null:e.reduce(Zvt)}function Xvt(t,e){let r=r2e(t);return r?r(e):!0}function $vt(t,e,r,s=1/0){let n=r2e(t);return n?CI(n,e,r,s):[]}function eLt(t,e,r=!0){return Array.isArray(e)||(e=[e]),lv(qj("id",t),e,r)}function Xp(t,e,r=!0,s=1/0){return CI(dv.tag_name(t),e,r,s)}function tLt(t,e,r=!0,s=1/0){return CI(qj("class",t),e,r,s)}function rLt(t,e,r=!0,s=1/0){return CI(dv.tag_type(t),e,r,s)}function sLt(t){let e=t.length;for(;--e>=0;){let r=t[e];if(e>0&&t.lastIndexOf(r,e-1)>=0){t.splice(e,1);continue}for(let s=r.parent;s;s=s.parent)if(t.includes(s)){t.splice(e,1);break}}return t}var za;(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})(za||(za={}));function s2e(t,e){let r=[],s=[];if(t===e)return 0;let n=Cr(t)?t:t.parent;for(;n;)r.unshift(n),n=n.parent;for(n=Cr(e)?e:e.parent;n;)s.unshift(n),n=n.parent;let i=Math.min(r.length,s.length),o=0;for(;o<i&&r[o]===s[o];)o++;if(o===0)return za.DISCONNECTED;let a=r[o-1],A=a.children,c=r[o],u=s[o];return A.indexOf(c)>A.indexOf(u)?a===e?za.FOLLOWING|za.CONTAINED_BY:za.FOLLOWING:a===t?za.PRECEDING|za.CONTAINS:za.PRECEDING}function of(t){return t=t.filter((e,r,s)=>!s.includes(e,r+1)),t.sort((e,r)=>{let s=s2e(e,r);return s&za.PRECEDING?-1:s&za.FOLLOWING?1:0}),t}function Vj(t){let e=hv(ALt,t);return e?e.name==="feed"?nLt(e):iLt(e):null}function nLt(t){var e;let r=t.children,s={type:"atom",items:Xp("entry",r).map(o=>{var a;let{children:A}=o,c={media:n2e(A)};no(c,"id","id",A),no(c,"title","title",A);let u=(a=hv("link",A))===null||a===void 0?void 0:a.attribs.href;u&&(c.link=u);let l=af("summary",A)||af("conten
Line truncated
|
||||
:is(button, input, select, textarea, optgroup, option)[disabled],
|
||||
optgroup[disabled] > option,
|
||||
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
|
||||
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var Za=le(cf(),1);var AK={};function cK(t,e){return t===Za.default.falseFunc?Za.default.falseFunc:r=>e.isTag(r)&&t(r)}function uK(t,e){let r=e.getSiblings(t);if(r.length<=1)return[];let s=r.indexOf(t);return s<0||s===r.length-1?[]:r.slice(s+1).filter(e.isTag)}function aK(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var oK=(t,e,r,s,n)=>{let i=n(e,aK(r),s);return i===Za.default.trueFunc?t:i===Za.default.falseFunc?Za.default.falseFunc:o=>i(o)&&t(o)},Sv={is:oK,matches:oK,where:oK,not(t,e,r,s,n){let i=n(e,aK(r),s);return i===Za.default.falseFunc?t:i===Za.default.trueFunc?Za.default.falseFunc:o=>!i(o)&&t(o)},has(t,e,r,s,n){let{adapter:i}=r,o=aK(r);o.relativeSelector=!0;let a=e.some(u=>u.some(_S))?[AK]:void 0,A=n(e,o,a);if(A===Za.default.falseFunc)return Za.default.falseFunc;let c=cK(A,i);if(a&&A!==Za.default.trueFunc){let{shouldTestNextSiblings:u=!1}=A;return l=>{if(!t(l))return!1;a[0]=l;let d=i.getChildren(l),h=u?[...d,...uK(l,i)]:d;return i.existsOne(c,h)}}return u=>t(u)&&i.existsOne(c,i.getChildren(u))}};function J2e(t,e,r,s,n){var i;let{name:o,data:a}=e;if(Array.isArray(a)){if(!(o in Sv))throw new Error(`Unknown pseudo-class :${o}(${a})`);return Sv[o](t,a,r,s,n)}let A=(i=r.pseudos)===null||i===void 0?void 0:i[o],c=typeof A=="string"?A:wv[o];if(typeof c=="string"){if(a!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let u=(0,V2e.parse)(c);return Sv.is(t,u,r,s,n)}if(typeof A=="function")return iK(A,o,a,1),u=>A(u,a)&&t(u);if(o in DI)return DI[o](t,a,r,s);if(o in OS){let u=OS[o];return iK(u,o,a,2),l=>u(l,r,a)&&t(l)}throw new Error(`Unknown pseudo-class :${o}`)}var Xa=le(SI(),1);function lK(t,e){let r=e.getParent(t);return r&&e.isTag(r)?r:null}function W2e(t,e,r,s,n){let{adapter:i,equals:o}=r;switch(e.type){case Xa.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Xa.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Xa.SelectorType.Attribute:{if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(e.name=e.name.toLowerCase()),H2e[e.action](t,e,r)}case Xa.SelectorType.Pseudo:return J2e(t,e,r,s,n);case Xa.SelectorType.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:a}=e;return(!r.xmlMode||r.lowerCaseTags)&&(a=a.toLowerCase()),function(c){return i.getName(c)===a&&t(c)}}case Xa.SelectorType.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(c){let u=c;for(;u=lK(u,i);)if(t(u))return!0;return!1};let a=new WeakSet;return function(c){let u=c;for(;u=lK(u,i);)if(!a.has(u)){if(i.isTag(u)&&t(u))return!0;a.add(u)}return!1}}case"_flexibleDescendant":return function(A){let c=A;do if(t(c))return!0;while(c=lK(c,i));return!1};case Xa.SelectorType.Parent:return function(A){return i.getChildren(A).some(c=>i.isTag(c)&&t(c))};case Xa.SelectorType.Child:return function(A){let c=i.getParent(A);return c!=null&&i.isTag(c)&&t(c)};case Xa.SelectorType.Sibling:return function(A){let c=i.getSiblings(A);for(let u=0;u<c.length;u++){let l=c[u];if(o(A,l))break;if(i.isTag(l)&&t(l))return!0}return!1};case Xa.SelectorType.Adjacent:return i.prevElementSibling?function(A){let c=i.prevElementSibling(A);return c!=null&&t(c)}:function(A){let c=i.getSiblings(A),u;for(let l=0;l<c.length;l++){let d=c[l];if(o(A,d))break;i.isTag(d)&&(u=d)}return!!u&&t(u)};case Xa.SelectorType.Universal:{if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}}function z2e(t,e,r){let s=Nv(t,e,r);return cK(s,e.adapter)}function Nv(t,e,r){let s=typeof t=="string"?(0,Ac.parse)(t):t;return Dv(s,e,r)}function j2e(t){return t.type===Ac.SelectorType.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(j2e)))}var $Lt={type:Ac.SelectorType.Descendant},e_t={type:"_flexibleDescendant"},t_t={type:Ac.SelectorType.Pseudo,name:"scope",data:null};function r_t(t,{adapter:e},r){let s=!!r?.every(n=>{let i=e.isTag(n)&&e.getParent(n);return n===AK||i&&e.isTag(i)});fo
Line truncated
|
||||
`)})):{name:n,value:i.replace(lke,`\r
|
||||
`)}}).toArray()}var NK={};QA(NK,{extract:()=>EPt});function pPt(t){var e;return typeof t=="string"?{selector:t,value:"textContent"}:{selector:t.selector,value:(e=t.value)!==null&&e!==void 0?e:"textContent"}}function EPt(t){let e={};for(let r in t){let s=t[r],n=Array.isArray(s),{selector:i,value:o}=pPt(n?s[0]:s),a=typeof o=="function"?o:typeof o=="string"?A=>this._make(A).prop(o):A=>this._make(A).extract(o);if(n)e[r]=this._findBySelector(i,Number.POSITIVE_INFINITY).map((A,c)=>a(c,r,e)).get();else{let A=this._findBySelector(i,1);e[r]=A.length>0?a(A[0],r,e):void 0}}return e}var df=class{constructor(e,r,s){if(this.length=0,this.options=s,this._root=r,e){for(let n=0;n<e.length;n++)this[n]=e[n];this.length=e.length}}};df.prototype.cheerio="[cheerio object]";df.prototype.splice=Array.prototype.splice;df.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(df.prototype,eK,yK,bK,wK,SK,NK);function dke(t,e){return function r(s,n,i=!0){if(s==null)throw new Error("cheerio.load() expects a string");let o=fI(n),a=t(s,o,i,null);class A extends df{_make(l,d){let h=c(l,d);return h.prevObject=this,h}_parse(l,d,h,f){return t(l,d,h,f)}_render(l){return e(l,this.options)}}function c(u,l,d=a,h){if(u&&ja(u))return u;let f=fI(h,o),p=typeof d=="string"?[t(d,f,!1,null)]:"length"in d?d:[d],C=ja(p)?p:new A(p,null,f);if(C._root=C,!u)return new A(void 0,C,f);let m=typeof u=="string"&&kS(u)?t(u,f,!1,null).children:mPt(u)?[u]:Array.isArray(u)?u:void 0,I=new A(m,C,f);if(m)return I;if(typeof u!="string")throw new TypeError("Unexpected type of selector");let Q=u,b=l?typeof l=="string"?kS(l)?new A([t(l,f,!1,null)],C,f):(Q=`${l} ${Q}`,C):ja(l)?l:new A(Array.isArray(l)?l:[l],C,f):C;return b?b.find(Q):I}return Object.assign(c,Jj,{load:r,_root:a,_options:o,fn:A.prototype,prototype:A.prototype}),c}}function mPt(t){return!!t.name||t.type===Ja.Root||t.type===Ja.Text||t.type===Ja.Comment}var CPt=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Rr="\uFFFD",N;(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(N||(N={}));var wi={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Mv(t){return t>=55296&&t<=57343}function hke(t){return t>=56320&&t<=57343}function fke(t,e){return(t-55296)*1024+9216+e}function Uv(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function vv(t){return t>=64976&&t<=65007||CPt.has(t)}var J;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keywo
Line truncated
|
||||
${t.toDisplayList(this.invalid)}`),this.valid.length>0&&(e.length>0&&(e+=`
|
||||
`),e+=`\u2713 Found known Gradle Wrapper JAR files:
|
||||
${t.toDisplayList(this.valid)}`),e}static toDisplayList(e){return` ${e.map(r=>r.toDisplayString()).join(`
|
||||
`)}`}},dP=class{constructor(e,r){this.path=e,this.checksum=r}toDisplayString(){return`${this.checksum} ${this.path}`}};var FE=class extends Error{constructor(e){e instanceof Error?(super(e.message),this.name=e.name,this.stack=e.stack):super(String(e))}};function b4e(t){if(t instanceof AggregateError){_g("Multiple errors returned");for(let e of t.errors)Gc(`Error ${t.errors.indexOf(e)}: ${e.message}`),e.stack&&te(e.stack)}else t instanceof FE?(_g(String(t)),t.stack&&te(t.stack)):(_g(String(t)),t instanceof Error&&t.stack&&te(t.stack))}async function w4e(t,e,r){if(!t.doValidateWrappers())return;let s=new ZU(r),n=process.env.ALLOWED_GRADLE_WRAPPER_CHECKSUMS?.split(",")||[],i=s.load(),o=await y4e(e,t.allowSnapshotWrappers(),n,i);if(o.isValid())await Ax("All Gradle Wrapper jars are valid",async()=>{Y(`Loaded previously validated checksums from cache: ${i.join(", ")}`),te(o.toDisplayString())});else throw te(o.toDisplayString()),new FE(`At least one Gradle Wrapper Jar failed validation!
|
||||
See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures
|
||||
${o.toDisplayString()}`);s.save(o.valid.map(a=>a.checksum))}import na from"fs";import ME from"path";function S4e(t,e,r){let s=ME.resolve(e,WU);na.mkdirSync(s,{recursive:!0}),BZt(e),QZt(t),UA()&&yZt(e),r&&Dn("GRADLE_ENCRYPTION_KEY",r)}function BZt(t){let e=ME.resolve(t,"init.d");na.mkdirSync(e,{recursive:!0});let r=["gradle-actions.build-result-capture.init.gradle","gradle-actions.build-result-capture-service.plugin.groovy","gradle-actions.github-dependency-graph.init.gradle","gradle-actions.github-dependency-graph-gradle-plugin-apply.groovy","gradle-actions.inject-develocity.init.gradle"];for(let s of r){let n=bZt("init-scripts",s),i=ME.resolve(e,s);na.writeFileSync(i,n)}}function QZt(t){let e=wZt();if(e==null)return;let r=ME.resolve(t,".m2"),s=ME.resolve(r,"toolchains.xml");if(!na.existsSync(s))na.mkdirSync(r,{recursive:!0}),na.writeFileSync(s,e),te(`Wrote default JDK locations to ${s}`);else{let n=na.readFileSync(s,"utf8"),i=SZt(n,e);na.writeFileSync(s,i),te(`Merged default JDK locations into ${s}`)}}function yZt(t){let e=`org.gradle.logging.level=info
|
||||
org.gradle.logging.stacktrace=all
|
||||
`,r=ME.resolve(t,"gradle.properties");if(na.existsSync(r)){te(`Merged --info and --stacktrace into existing ${r} file`);let s=na.readFileSync(r,"utf-8");na.writeFileSync(r,`${e}
|
||||
${s}`)}else te(`Created a new ${r} with --info and --stacktrace`),na.writeFileSync(r,e)}function bZt(...t){let e=import.meta.dirname,r=ME.resolve(e,"..","..","..","sources","src","resources",...t);return na.readFileSync(r,"utf8")}function wZt(){let t=Object.entries(process.env).filter(([e])=>e.startsWith("JAVA_HOME_")&&process.env[e]).map(([e,r])=>({jdkVersion:e.match(/JAVA_HOME_(\d+)_/)?.[1]??null,jdkPath:r})).filter(e=>e.jdkVersion!==null);return t.length===0?null:`<?xml version="1.0" encoding="UTF-8"?>
|
||||
<toolchains>
|
||||
<!-- JDK Toolchains installed by default on GitHub-hosted runners -->
|
||||
${t.map(({jdkVersion:e,jdkPath:r})=>` <toolchain>
|
||||
@@ -384,122 +327,57 @@ ${t.map(({jdkVersion:e,jdkPath:r})=>` <toolchain>
|
||||
</toolchain>`).join(`
|
||||
`)}
|
||||
</toolchains>
|
||||
`}function Qat(t,e){let r=e.split("<toolchains>").pop();return t.replace("</toolchains>",r)}var yat="restored-cache-key",f9=class{constructor(e,r,n){this.cacheName="home";this.cacheDescription="Gradle User Home";this.userHome=e,this.gradleUserHome=r,this.cacheConfig=n}init(){this.initializeGradleUserHome();let e=this.cacheConfig.getCacheEncryptionKey();e&&qi("GRADLE_ENCRYPTION_KEY",e)}cacheOutputExists(){let e=Jp.resolve(this.gradleUserHome,"caches");return ic.existsSync(e)?(zo(`Cache output exists at ${e}`),!0):!1}async restore(e){let r=e.entry(this.cacheDescription),n=Hge(this.cacheName,this.cacheConfig);zo(`Requesting ${this.cacheDescription} with
|
||||
key:${n.key}
|
||||
restoreKeys:[${n.restoreKeys}]`);let s=this.getCachePath(),i=await H6(s,n.key,n.restoreKeys,r);if(!i){pe(`${this.cacheDescription} cache not found. Will initialize empty.`);return}DA(yat,i.key);try{await this.afterRestore(e)}catch(o){tr(`Restore ${this.cacheDescription} failed in 'afterRestore': ${o}`)}}async afterRestore(e){await this.debugReportGradleUserHomeSize("as restored from cache"),await new yM(this.gradleUserHome,this.cacheConfig).restore(e),await new bM(this.gradleUserHome,this.cacheConfig).restore(e),await this.deleteExcludedPaths(),await this.debugReportGradleUserHomeSize("after restoring common artifacts")}async save(e){let r=Hge(this.cacheName,this.cacheConfig).key,n=xB(yat),s=e.entry(this.cacheDescription);if(n&&r===n){pe(`Cache hit occurred on the cache key ${r}, not saving cache.`);for(let o of e.cacheEntries)o===s?o.markNotSaved("cache key not changed"):o.markNotSaved(`referencing '${this.cacheDescription}' cache entry not saved`);return}try{await this.beforeSave(e)}catch(o){tr(`Save ${this.cacheDescription} failed in 'beforeSave': ${o}`);return}let i=this.getCachePath();await q6(i,r,s)}async beforeSave(e){await this.debugReportGradleUserHomeSize("before saving common artifacts"),await this.deleteExcludedPaths(),await Promise.all([new yM(this.gradleUserHome,this.cacheConfig).extract(e),new bM(this.gradleUserHome,this.cacheConfig).extract(e)]),await this.debugReportGradleUserHomeSize("after extracting common artifacts (only 'caches' and 'notifications' will be stored)")}async deleteExcludedPaths(){let e=this.cacheConfig.getCacheExcludes();e.push("caches/*/cc-keystore");let r=e.map(n=>Jp.resolve(this.gradleUserHome,n));for(let n of r){zo(`Removing excluded path: ${n}`);let s=await iC(n,{implicitDescendants:!1});for(let i of await s.glob())zo(`Removing excluded file: ${i}`),await uM(i)}}getCachePath(){let e=this.cacheConfig.getCacheIncludes();e.push(oQ);let r=e.map(n=>this.resolveCachePath(n));return zo(`Using cache paths: ${r}`),r}resolveCachePath(e){return e.startsWith("!")?`!${this.resolveCachePath(e.substring(1))}`:Jp.resolve(this.gradleUserHome,e)}initializeGradleUserHome(){let e=Jp.resolve(this.gradleUserHome,oQ);ic.mkdirSync(e,{recursive:!0}),this.copyInitScripts(),this.registerToolchains(),DB()&&this.configureInfoLogLevel()}copyInitScripts(){let e=Jp.resolve(this.gradleUserHome,"init.d");ic.mkdirSync(e,{recursive:!0});let r=["gradle-actions.build-result-capture.init.gradle","gradle-actions.build-result-capture-service.plugin.groovy","gradle-actions.github-dependency-graph.init.gradle","gradle-actions.github-dependency-graph-gradle-plugin-apply.groovy","gradle-actions.inject-develocity.init.gradle"];for(let n of r){let s=Iat("init-scripts",n),i=Jp.resolve(e,n);ic.writeFileSync(i,s)}}registerToolchains(){let e=Bat();if(e==null)return;let r=Jp.resolve(this.userHome,".m2"),n=Jp.resolve(r,"toolchains.xml");if(!ic.existsSync(n))ic.mkdirSync(r,{recursive:!0}),ic.writeFileSync(n,e),pe(`Wrote default JDK locations to ${n}`);else{let s=ic.readFileSync(n,"utf8"),i=Qat(s,e);ic.writeFileSync(n,i),pe(`Merged default JDK locations into ${n}`)}}configureInfoLogLevel(){let e=`org.gradle.logging.level=info
|
||||
org.gradle.logging.stacktrace=all
|
||||
`,r=Jp.resolve(this.gradleUserHome,"gradle.properties");if(ic.existsSync(r)){pe(`Merged --info and --stacktrace into existing ${r} file`);let n=ic.readFileSync(r,"utf-8");ic.writeFileSync(r,`${e}
|
||||
${n}`)}else pe(`Created a new ${r} with --info and --stacktrace`),ic.writeFileSync(r,e)}async debugReportGradleUserHomeSize(e){if(!AM()&&!DB()||!ic.existsSync(this.gradleUserHome))return;let r=await ep("du",["-h","-c","-t","5M"],{cwd:this.gradleUserHome,silent:!0,ignoreReturnCode:!0});pe(`Gradle User Home (directories >5M): ${e}`),pe(r.stdout.trimEnd().replace(/\t/g," ").split(`
|
||||
`).map(n=>` ${n}`).join(`
|
||||
`)),pe("-----------------------")}};import p9 from"fs";import wM from"path";var m9=class{constructor(e,r){this.gradleUserHome=e,this.tmpDir=r}async prepare(){let e=Date.now().toString();return DA("clean-timestamp",e),e}async forceCleanup(e){let r=await this.gradleExecutableForCleanup(e),n=xB("clean-timestamp");await this.forceCleanupFilesOlderThan(n,r)}async gradleExecutableForCleanup(e){let r=e.highestGradleVersion();if(r&&DC(r,"8.11"))try{let n=e.results.map(s=>this.findGradleWrapperScript(s)).filter(Boolean);return await pfe(r,n)}catch{pe(`Failed to provision Gradle ${r} for cache cleanup. Falling back to default version.`)}return await pfe("8.11")}findGradleWrapperScript(e){try{let r=gfe(e.rootProjectDir);return wM.resolve(e.rootProjectDir,r)}catch(r){return Te(`No Gradle Wrapper found for ${e.rootProjectName}: ${r}`),null}}async forceCleanupFilesOlderThan(e,r){let n=wM.resolve(this.tmpDir,"dummy-cleanup-project");p9.mkdirSync(n,{recursive:!0}),p9.writeFileSync(wM.resolve(n,"settings.gradle"),'rootProject.name = "dummy-cleanup-project"'),p9.writeFileSync(wM.resolve(n,"init.gradle"),`
|
||||
beforeSettings { settings ->
|
||||
def cleanupTime = ${e}
|
||||
|
||||
settings.caches {
|
||||
cleanup = Cleanup.ALWAYS
|
||||
|
||||
releasedWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||
snapshotWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||
downloadedResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||
createdResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||
buildCache.setRemoveUnusedEntriesOlderThan(cleanupTime)
|
||||
}
|
||||
}
|
||||
`),p9.writeFileSync(wM.resolve(n,"build.gradle"),'task("noop") {}'),await tp("Executing Gradle to clean up caches",async()=>{pe(`Cleaning up caches last used before ${e}`),await this.executeCleanupBuild(r,n)})}async executeCleanupBuild(e,r){let n=["-g",this.gradleUserHome,"-I","init.gradle","--info","--no-daemon","--no-scan","--build-cache","-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false","-DGRADLE_ACTIONS_SKIP_BUILD_RESULT_CAPTURE=true","noop"];await $f(e,n,{cwd:r})}};var yfe="GRADLE_BUILD_ACTION_CACHE_RESTORED";async function bat(t,e,r,n){if(process.env[yfe]){pe("Cache only restored on first action step.");return}qi(yfe,!0);let s=new f9(t,e,n);if(n.isCacheDisabled()){pe("Cache is disabled: will not restore state from previous builds."),s.init(),r.setDisabled();return}if(s.cacheOutputExists()){if(!n.isCacheOverwriteExisting()){pe("Gradle User Home already exists: will not restore from cache."),s.init(),r.setDisabled(Wje);return}pe("Gradle User Home already exists: will overwrite with cached contents.")}if(s.init(),DA(yfe,!0),n.isCacheCleanupEnabled()&&(pe("Preparing cache for cleanup."),await new m9(e,process.env.RUNNER_TEMP).prepare()),n.isCacheWriteOnly()){pe("Cache is write-only: will not restore from cache."),r.setWriteOnly();return}await tp("Restore Gradle state from cache",async()=>{await s.restore(r)})}async function Nat(t,e,r){if(t)try{Te("Fetching short-lived token...");let n=await OUr(t,e,r);if(n!=null&&!n.isEmpty()){Te("Got token(s), setting the access key env vars");let s=n.raw();jb(s),_Ur(s)}else wat()}catch(n){wat(),tr(`Failed to fetch short-lived token, reason: ${n}`)}}function _Ur(t){[qd.DevelocityAccessKeyEnvVar,qd.GradleEnterpriseAccessKeyEnvVar].forEach(e=>qi(e,t))}function wat(){tr("Failed to fetch short-lived token for Develocity"),process.env[qd.GradleEnterpriseAccessKeyEnvVar]&&F6(`The ${qd.GradleEnterpriseAccessKeyEnvVar} env var is deprecated`),process.env[qd.DevelocityAccessKeyEnvVar]&&tr(`The ${qd.DevelocityAccessKeyEnvVar} env var should be mapped to a short-lived token`)}async function OUr(t,e,r){let n=new Promise(a=>a(null)),s=E9.parse(t),i=new bfe(e);if(s==null)return n;let o=new Array;for(let a of s.keys)try{pe(`Requesting short-lived Develocity access token for ${a.hostname}`);let A=await i.fetchToken(`https://${a.hostname}`,a,r);o.push(A)}catch(A){pe(`Failed to obtain short-lived Develocity access token for ${a.hostname}: ${A}`)}return o.length>0?E9.of(o):n}var bfe=class{constructor(e){this.maxRetries=3;this.retryInterval=1e3;this.httpc=new Ga("gradle/actions/setup-gradle",void 0,{ignoreSslError:e})}async fetchToken(e,r,n){let s=n?`?expiresInHours=${n}`:"",i=e.endsWith("/")?e:`${e}/`,o={"Content-Type":"application/json",Authorization:`Bearer ${r.key}`},a=0;for(;a<this.maxRetries;){try{let A=`${i}api/auth/token${s}`;Te(`Attempt ${a} to fetch short lived token at ${A}`);let c=await this.httpc.post(A,"",o);if(c.message.statusCode===200){let u=await c.readBody();return new Promise(l=>l({hostname:r.hostname,key:u}))}if(a++,a===this.maxRetries)return new Promise((u,l)=>l(new Error(`Develocity short lived token request failed ${e} with status code ${c.message.statusCode}`)))}catch(A){if(a++,a===this.maxRetries)return new Promise((c,u)=>u(A))}await new Promise(A=>setTimeout(A,this.retryInterval))}return new Promise((A,c)=>c(new Error("Illegal state")))}},E9=class t{static{this.accessKeyRegexp=/^([^;=\s]+=\w+)(;[^;=\s]+=\w+)*$/}constructor(e){this.keys=e}static of(e){return new t(e)}static{this.keyDelimiter=";"}static{this.hostDelimiter="="}static parse(e){return this.isValid(e)?new t(e.split(this.keyDelimiter).map(r=>{let n=r.split(this.hostDelimiter);return{hostname:n[0],key:n[1]}})):null}isEmpty(){return this.keys.length===0}raw(){return this.keys.map(e=>`${e.hostname}${t.hostDelimiter}${e.key}`).join(t.keyDelimiter)}static isValid(e){return this.accessKeyRegexp.test(e)}};async function Sat(t){return xC("DEVELOCITY_INJECTION_INIT_SCRIPT_NAME","gradle-actions.inject-develocity.init.gradle"),xC("DEVELOCITY_INJECTION_CUSTOM_VALUE","gradle-actions"),wg("DEVELOCITY_INJECTION_ENABLED",t.getDevelocityInjectionEnabled()),wg("DEVELOCITY_INJECTION_URL",t.getDevelocityUrl()),wg("DEVELOCITY_INJECTION_ALLOW_UNTRUSTED_SERVER",t.getDevelocityAllowUntrustedServer()),wg("DEVELOCITY_INJECTION_CAPTURE_FILE_FINGERPRINTS",t.getDevelocityCaptureFileFingerprints()),wg("DEVELOCITY_INJECTION_ENFORCE_URL",t.getDevelocityEnforceUrl()),wg("DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION",t.getDevelocityPluginVersion()),wg("DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION",t.getDevelocityCcudPluginVersion()),wg("DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_URL",t.getPluginRepository().getUrl()),wg("DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_USERNAME",t.getPluginRepository().getUsername()),wg("DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_PASSWORD",t.getPluginRepository().getPassword()),t.getBuildScanPublishEnabled()&&(xC("DEVELOCITY_INJECTION_ENABLED","true"),xC("DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION","4.3.2"),xC("DEV
Line truncated
|
||||
`:x9(t.children):zR(t)?x9(t.children):oc(t)?t.data:""}function Wp(t){return Array.isArray(t)?t.map(Wp).join(""):kn(t)&&!gQ(t)?Wp(t.children):oc(t)?t.data:""}function xM(t){return Array.isArray(t)?t.map(xM).join(""):kn(t)&&(t.type===Lr.Tag||zR(t))?xM(t.children):oc(t)?t.data:""}function XR(t){return kn(t)?t.children:[]}function Zat(t){return t.parent||null}function Jfe(t){let e=Zat(t);if(e!=null)return XR(e);let r=[t],{prev:n,next:s}=t;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;s!=null;)r.push(s),{next:s}=s;return r}function pPr(t,e){var r;return(r=t.attribs)===null||r===void 0?void 0:r[e]}function mPr(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}function EPr(t){return t.name}function T9(t){let{next:e}=t;for(;e!==null&&!rt(e);)({next:e}=e);return e}function k9(t){let{prev:e}=t;for(;e!==null&&!rt(e);)({prev:e}=e);return e}function zp(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){let e=t.parent.children,r=e.lastIndexOf(t);r>=0&&e.splice(r,1)}t.next=null,t.prev=null,t.parent=null}function CPr(t,e){let r=e.prev=t.prev;r&&(r.next=e);let n=e.next=t.next;n&&(n.prev=e);let s=e.parent=t.parent;if(s){let i=s.children;i[i.lastIndexOf(t)]=e,t.parent=null}}function IPr(t,e){if(zp(e),e.next=null,e.parent=t,t.children.push(e)>1){let r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}function BPr(t,e){zp(e);let{parent:r}=t,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){let s=r.children;s.splice(s.lastIndexOf(n),0,e)}}else r&&r.children.push(e)}function QPr(t,e){if(zp(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){let r=t.children[1];r.prev=e,e.next=r}else e.next=null}function yPr(t,e){zp(e);let{parent:r}=t;if(r){let n=r.children;n.splice(n.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}function ZR(t,e,r=!0,n=1/0){return F9(t,Array.isArray(e)?e:[e],r,n)}function F9(t,e,r,n){let s=[],i=[Array.isArray(e)?e:[e]],o=[0];for(;;){if(o[0]>=i[0].length){if(o.length===1)return s;i.shift(),o.shift();continue}let a=i[0][o[0]++];if(t(a)&&(s.push(a),--n<=0))return s;r&&kn(a)&&a.children.length>0&&(o.unshift(0),i.unshift(a.children))}}function bPr(t,e){return e.find(t)}function M9(t,e,r=!0){let n=Array.isArray(e)?e:[e];for(let s=0;s<n.length;s++){let i=n[s];if(rt(i)&&t(i))return i;if(r&&kn(i)&&i.children.length>0){let o=M9(t,i.children,!0);if(o)return o}}return null}function $at(t,e){return(Array.isArray(e)?e:[e]).some(r=>rt(r)&&t(r)||kn(r)&&$at(t,r.children))}function wPr(t,e){let r=[],n=[Array.isArray(e)?e:[e]],s=[0];for(;;){if(s[0]>=n[0].length){if(n.length===1)return r;n.shift(),s.shift();continue}let i=n[0][s[0]++];rt(i)&&t(i)&&r.push(i),kn(i)&&i.children.length>0&&(s.unshift(0),n.unshift(i.children))}}var v9={tag_name(t){return typeof t=="function"?e=>rt(e)&&t(e.name):t==="*"?rt:e=>rt(e)&&e.name===t},tag_type(t){return typeof t=="function"?e=>t(e.type):e=>e.type===t},tag_contains(t){return typeof t=="function"?e=>oc(e)&&t(e.data):e=>oc(e)&&e.data===t}};function Vfe(t,e){return typeof e=="function"?r=>rt(r)&&e(r.attribs[t]):r=>rt(r)&&r.attribs[t]===e}function NPr(t,e){return r=>t(r)||e(r)}function eAt(t){let e=Object.keys(t).map(r=>{let n=t[r];return Object.prototype.hasOwnProperty.call(v9,r)?v9[r](n):Vfe(r,n)});return e.length===0?null:e.reduce(NPr)}function SPr(t,e){let r=eAt(t);return r?r(e):!0}function RPr(t,e,r,n=1/0){let s=eAt(t);return s?ZR(s,e,r,n):[]}function DPr(t,e,r=!0){return Array.isArray(e)||(e=[e]),M9(Vfe("id",t),e,r)}function fQ(t,e,r=!0,n=1/0){return ZR(v9.tag_name(t),e,r,n)}function xPr(t,e,r=!0,n=1/0){return ZR(Vfe("class",t),e,r,n)}function TPr(t,e,r=!0,n=1/0){return ZR(v9.tag_type(t),e,r,n)}function kPr(t){let e=t.length;for(;--e>=0;){let r=t[e];if(e>0&&t.lastIndexOf(r,e-1)>=0){t.splice(e,1);continue}for(let n=r.parent;n;n=n.parent)if(t.includes(n)){t.splice(e,1);break}}return t}var Nl;(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})(Nl||(Nl={}));function tAt(t,e){let r=[],n=[];if(t===e)return 0;let s=kn(t)?t:t.parent;for(;s;)r.unshift(s),s=s.parent;for(s=kn(e)?e:e.parent;s;)n.unshift(s),s=s.parent;let i=Math.min(r.length,n.length),o=0;for(;o<i&&r[o]===n[o];)o++;if(o===0)return Nl.DISCONNECTED;let a=r[o-1],A=a.children,c=r[o],u=n[o];return A.indexOf(c)>A.indexOf(u)?a===e?Nl.FOLLOWING|Nl.CONTAINED_BY:Nl.FOLLOWING:a===t?Nl.PRECEDING|Nl.CONTAINS:Nl.PRECEDING}function kC(t){return t=t.filter((e,r,n)=>!n.includes(e,r+1)),t.sort((e,r)=>{let n=tAt(e,r);return n&Nl.PRECEDING?-1:n&Nl.FOLLOWING?1:0}),t}function Wfe(t){let e=L9(UPr,t);return e?e.name==="feed"?FPr(e):MPr(e):null}function FPr(t){var e;let r=t.children,n={type:"atom",items:fQ("entry",r).map(o=>{var a;let{children:A}=o,c={media:rAt(A)};ac(c,"id","id",A),ac(c,"title","title",A);let u=(a=L9("link",A))===null||a===void 0?void 0:a.attribs.href;u&&(c.link=u);let l=FC("summary",A)||FC("
Line truncated
|
||||
:is(button, input, select, textarea, optgroup, option)[disabled],
|
||||
optgroup[disabled] > option,
|
||||
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
|
||||
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var Dl=Xe(vC(),1);var upe={};function lpe(t,e){return t===Dl.default.falseFunc?Dl.default.falseFunc:r=>e.isTag(r)&&t(r)}function dpe(t,e){let r=e.getSiblings(t);if(r.length<=1)return[];let n=r.indexOf(t);return n<0||n===r.length-1?[]:r.slice(n+1).filter(e.isTag)}function cpe(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var Ape=(t,e,r,n,s)=>{let i=s(e,cpe(r),n);return i===Dl.default.trueFunc?t:i===Dl.default.falseFunc?Dl.default.falseFunc:o=>i(o)&&t(o)},j9={is:Ape,matches:Ape,where:Ape,not(t,e,r,n,s){let i=s(e,cpe(r),n);return i===Dl.default.falseFunc?t:i===Dl.default.trueFunc?Dl.default.falseFunc:o=>!i(o)&&t(o)},has(t,e,r,n,s){let{adapter:i}=r,o=cpe(r);o.relativeSelector=!0;let a=e.some(u=>u.some(UM))?[upe]:void 0,A=s(e,o,a);if(A===Dl.default.falseFunc)return Dl.default.falseFunc;let c=lpe(A,i);if(a&&A!==Dl.default.trueFunc){let{shouldTestNextSiblings:u=!1}=A;return l=>{if(!t(l))return!1;a[0]=l;let d=i.getChildren(l),h=u?[...d,...dpe(l,i)]:d;return i.existsOne(c,h)}}return u=>t(u)&&i.existsOne(c,i.getChildren(u))}};function YAt(t,e,r,n,s){var i;let{name:o,data:a}=e;if(Array.isArray(a)){if(!(o in j9))throw new Error(`Unknown pseudo-class :${o}(${a})`);return j9[o](t,a,r,n,s)}let A=(i=r.pseudos)===null||i===void 0?void 0:i[o],c=typeof A=="string"?A:z9[o];if(typeof c=="string"){if(a!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let u=(0,GAt.parse)(c);return j9.is(t,u,r,n,s)}if(typeof A=="function")return ape(A,o,a,1),u=>A(u,a)&&t(u);if(o in aD)return aD[o](t,a,r,n);if(o in _M){let u=_M[o];return ape(u,o,a,2),l=>u(l,r,a)&&t(l)}throw new Error(`Unknown pseudo-class :${o}`)}var xl=Xe(iD(),1);function hpe(t,e){let r=e.getParent(t);return r&&e.isTag(r)?r:null}function JAt(t,e,r,n,s){let{adapter:i,equals:o}=r;switch(e.type){case xl.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case xl.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case xl.SelectorType.Attribute:{if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(e.name=e.name.toLowerCase()),_At[e.action](t,e,r)}case xl.SelectorType.Pseudo:return YAt(t,e,r,n,s);case xl.SelectorType.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:a}=e;return(!r.xmlMode||r.lowerCaseTags)&&(a=a.toLowerCase()),function(c){return i.getName(c)===a&&t(c)}}case xl.SelectorType.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(c){let u=c;for(;u=hpe(u,i);)if(t(u))return!0;return!1};let a=new WeakSet;return function(c){let u=c;for(;u=hpe(u,i);)if(!a.has(u)){if(i.isTag(u)&&t(u))return!0;a.add(u)}return!1}}case"_flexibleDescendant":return function(A){let c=A;do if(t(c))return!0;while(c=hpe(c,i));return!1};case xl.SelectorType.Parent:return function(A){return i.getChildren(A).some(c=>i.isTag(c)&&t(c))};case xl.SelectorType.Child:return function(A){let c=i.getParent(A);return c!=null&&i.isTag(c)&&t(c)};case xl.SelectorType.Sibling:return function(A){let c=i.getSiblings(A);for(let u=0;u<c.length;u++){let l=c[u];if(o(A,l))break;if(i.isTag(l)&&t(l))return!0}return!1};case xl.SelectorType.Adjacent:return i.prevElementSibling?function(A){let c=i.prevElementSibling(A);return c!=null&&t(c)}:function(A){let c=i.getSiblings(A),u;for(let l=0;l<c.length;l++){let d=c[l];if(o(A,d))break;i.isTag(d)&&(u=d)}return!!u&&t(u)};case xl.SelectorType.Universal:{if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}}function VAt(t,e,r){let n=K9(t,e,r);return lpe(n,e.adapter)}function K9(t,e,r){let n=typeof t=="string"?(0,Jd.parse)(t):t;return X9(n,e,r)}function WAt(t){return t.type===Jd.SelectorType.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(WAt)))}var R_r={type:Jd.SelectorType.Descendant},D_r={type:"_flexibleDescendant"},x_r={type:Jd.SelectorType.Pseudo,name:"scope",data:null};function T_r(t,{adapter:e},r){let n=!!r?.every(s=>{let i=e.isTag(s)&&e.getParent(s);return s===u
Line truncated
|
||||
`)})):{name:s,value:i.replace(cct,`\r
|
||||
`)}}).toArray()}var Dpe={};xu(Dpe,{extract:()=>VOr});function JOr(t){var e;return typeof t=="string"?{selector:t,value:"textContent"}:{selector:t.selector,value:(e=t.value)!==null&&e!==void 0?e:"textContent"}}function VOr(t){let e={};for(let r in t){let n=t[r],s=Array.isArray(n),{selector:i,value:o}=JOr(s?n[0]:n),a=typeof o=="function"?o:typeof o=="string"?A=>this._make(A).prop(o):A=>this._make(A).extract(o);if(s)e[r]=this._findBySelector(i,Number.POSITIVE_INFINITY).map((A,c)=>a(c,r,e)).get();else{let A=this._findBySelector(i,1);e[r]=A.length>0?a(A[0],r,e):void 0}}return e}var PC=class{constructor(e,r,n){if(this.length=0,this.options=n,this._root=r,e){for(let s=0;s<e.length;s++)this[s]=e[s];this.length=e.length}}};PC.prototype.cheerio="[cheerio object]";PC.prototype.splice=Array.prototype.splice;PC.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(PC.prototype,rpe,wpe,Npe,Spe,Rpe,Dpe);function uct(t,e){return function r(n,s,i=!0){if(n==null)throw new Error("cheerio.load() expects a string");let o=WR(s),a=t(n,o,i,null);class A extends PC{_make(l,d){let h=c(l,d);return h.prevObject=this,h}_parse(l,d,h,g){return t(l,d,h,g)}_render(l){return e(l,this.options)}}function c(u,l,d=a,h){if(u&&Sl(u))return u;let g=WR(h,o),p=typeof d=="string"?[t(d,g,!1,null)]:"length"in d?d:[d],C=Sl(p)?p:new A(p,null,g);if(C._root=C,!u)return new A(void 0,C,g);let m=typeof u=="string"&&TM(u)?t(u,g,!1,null).children:WOr(u)?[u]:Array.isArray(u)?u:void 0,I=new A(m,C,g);if(m)return I;if(typeof u!="string")throw new TypeError("Unexpected type of selector");let y=u,w=l?typeof l=="string"?TM(l)?new A([t(l,g,!1,null)],C,g):(y=`${l} ${y}`,C):Sl(l)?l:new A(Array.isArray(l)?l:[l],C,g):C;return w?w.find(y):I}return Object.assign(c,zfe,{load:r,_root:a,_options:o,fn:A.prototype,prototype:A.prototype}),c}}function WOr(t){return!!t.name||t.type===bl.Root||t.type===bl.Text||t.type===bl.Comment}var zOr=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Zn="\uFFFD",k;(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(k||(k={}));var aA={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function nJ(t){return t>=55296&&t<=57343}function lct(t){return t>=56320&&t<=57343}function dct(t,e){return(t-55296)*1024+9216+e}function sJ(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function iJ(t){return t>=64976&&t<=65007||zOr.has(t)}var Ae;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-pu
Line truncated
|
||||
${t.toDisplayList(this.invalid)}`),this.valid.length>0&&(e.length>0&&(e+=`
|
||||
`),e+=`\u2713 Found known Gradle Wrapper JAR files:
|
||||
${t.toDisplayList(this.valid)}`),e}static toDisplayList(e){return` ${e.map(r=>r.toDisplayString()).join(`
|
||||
`)}`}},vW=class{constructor(e,r){this.path=e,this.checksum=r}toDisplayString(){return`${this.checksum} ${this.path}`}};var KQ=class extends Error{constructor(e){e instanceof Error?(super(e.message),this.name=e.name,this.stack=e.stack):super(String(e))}};function QIt(t){if(t instanceof AggregateError){RB("Multiple errors returned");for(let e of t.errors)F1(`Error ${t.errors.indexOf(e)}: ${e.message}`),e.stack&&pe(e.stack)}else t instanceof KQ?(RB(String(t)),t.stack&&pe(t.stack)):(RB(String(t)),t instanceof Error&&t.stack&&pe(t.stack))}async function yIt(t,e,r){if(!t.doValidateWrappers())return;let n=new I9(r),s=process.env.ALLOWED_GRADLE_WRAPPER_CHECKSUMS?.split(",")||[],i=n.load(),o=await BIt(e,t.allowSnapshotWrappers(),s,i);if(o.isValid())await tp("All Gradle Wrapper jars are valid",async()=>{Te(`Loaded previously validated checksums from cache: ${i.join(", ")}`),pe(o.toDisplayString())});else throw pe(o.toDisplayString()),new KQ(`At least one Gradle Wrapper Jar failed validation!
|
||||
See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures
|
||||
${o.toDisplayString()}`);n.save(o.valid.map(a=>a.checksum))}var zBe="GRADLE_BUILD_ACTION_SETUP_COMPLETED",KZr="USER_HOME",XZr="GRADLE_USER_HOME",ZZr="CACHE_LISTENER";async function bIt(t,e,r){let n=await wIt(),s=await $Zr();if(process.env[zBe])return pe("Gradle setup only performed on first gradle/actions step in workflow."),!1;qi(zBe,!0),DA(zBe,!0),DA(KZr,n),DA(XZr,s);let i=new IY;return await bat(n,s,i,t),DA(ZZr,i.stringify()),await yIt(r,bC(),s),await Sat(e),!0}async function $Zr(){let t=process.env.GRADLE_USER_HOME;if(t){let r=bC();return KBe.resolve(r,t)}let e=KBe.resolve(await wIt(),".gradle");if(jBe.existsSync(e))return pe(`Gradle User Home already exists at ${e}`),qi("GRADLE_USER_HOME",e),e;if(LW.platform()==="win32"&&e.startsWith("C:\\")&&jBe.existsSync("D:\\a\\")){let r="D:\\a\\.gradle";return pe(`Setting GRADLE_USER_HOME to ${r} to leverage (potentially) faster drive.`),qi("GRADLE_USER_HOME",r),r}return qi("GRADLE_USER_HOME",e),e}async function wIt(){let t=await ep("java",["-XshowSettings:properties","-version"],{silent:!0}),e=/user\.home = (\S*)/i,r=t.stderr.match(e);if(r==null||r.length<=1)return pe("Could not determine user.home from java -version output. Using os.homedir()."),LW.homedir();let n=r[1];return Te(`Determined user.home from java -version output: '${n}'`),n}import t$r from"os";function aL(){return 8*1024*1024}function UW(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}function NIt(){let t=process.env.ACTIONS_RESULTS_URL;if(!t)throw new Error("Unable to get the ACTIONS_RESULTS_URL env variable");return new URL(t).origin}function ix(){let e=new URL(process.env.GITHUB_SERVER_URL||"https://github.com").hostname.trimEnd().toUpperCase(),r=e==="GITHUB.COM",n=e.endsWith(".GHE.COM"),s=e.endsWith(".LOCALHOST");return!r&&!n&&!s}function SIt(){let t=process.env.GITHUB_WORKSPACE;if(!t)throw new Error("Unable to get the GITHUB_WORKSPACE env variable");return t}function RIt(){let t=t$r.cpus().length,e=32;if(t>4){let n=16*t;e=n>300?300:n}let r=process.env.ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY;if(r){let n=parseInt(r);if(isNaN(n)||n<1)throw new Error("Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable");return n<e?(pe("Set concurrency based on the value set in ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY."),n):(pe(`ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY is higher than the cap of ${e} based on the number of cpus. Set it to the maximum value allowed.`),e)}return 5}function DIt(){let t=process.env.ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS;if(!t)return 3e5;let e=parseInt(t);if(isNaN(e))throw new Error("Invalid value set for ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS env variable");return e}function xIt(){let t=process.env.ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT||"1000",e=parseInt(t);if(isNaN(e)||e<1)throw new Error("Invalid value set for ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT env variable");return e}var XBe=Xe(lr(),1),ZBe=Xe(lr(),1),TIt=Xe(lr(),1),kIt=Xe(lr(),1),FIt=Xe(lr(),1),ox=Xe(lr(),1),MIt=Xe(lr(),1),$Be=class extends MIt.MessageType{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){let e=this.create(),r=Date.now();return e.seconds=ox.PbLong.from(Math.floor(r/1e3)).toString(),e.nanos=r%1e3*1e6,e}toDate(e){return new Date(ox.PbLong.from(e.seconds).toNumber()*1e3+Math.ceil(e.nanos/1e6))}fromDate(e){let r=this.create(),n=e.getTime();return r.seconds=ox.PbLong.from(Math.floor(n/1e3)).toString(),r.nanos=n%1e3*1e6,r}internalJsonWrite(e,r){let n=ox.PbLong.from(e.seconds).toNumber()*1e3;if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(e.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let s="Z";if(e.nanos>0){let i=(e.nanos+1e9).toString().substring(1);i.substring(3)==="000000"?s="."+i.substring(0,3)+"Z":i.substring(6)==="000"?s="."+i.substring(0,6)+"Z":s="."+i+"Z"}return new Date(n).toISOString().replace(".000Z",s)}internalJsonRead(e,r,n){if(typeof e!="string")throw new Error("Unable to parse Timestamp from JSON "+(0,FIt.typeofJsonValue)(e)+".");let s=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!s)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let i=Date.parse(s[1]+"-"+s[2]+"-"+s[3]+"T"+s[4]+":"+s[5]+":"+s[6]+(s[8]?s[8]:"Z"));if(Number.isNaN(i))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(i<Date.parse("0001-01-01T00:00:00Z")||i>Date.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return n||(n=this.create()),n.seconds=ox.PbLong.from(i/1e3).toString(),n.nanos=0,s[7]&&(n.nanos=parseInt("1"+s[7]+"0".repeat
Line truncated
|
||||
`," Line feed \\n"]]),UIt=new Map([...L0e,["\\"," Backslash \\"],["/"," Forward slash /"]]);function PIt(t){if(!t)throw new Error("Provided artifact name input during validation is empty");for(let[e,r]of UIt)if(t.includes(e))throw new Error(`The artifact name is not valid: ${t}. Contains the following character: ${r}
|
||||
`}function SZt(t,e){let r=e.split("<toolchains>").pop();return t.replace("</toolchains>",r)}var Jte="GRADLE_BUILD_ACTION_SETUP_COMPLETED",NZt="GRADLE_USER_HOME";async function N4e(t,e,r){let s=await D4e(),n=await RZt();return process.env[Jte]?(te("Gradle setup only performed on first gradle/actions step in workflow."),!1):(Dn(Jte,!0),E0(Jte,!0),E0(NZt,n),S4e(s,n,t.getCacheEncryptionKey()),await(await Rxe(t)).restore(n,DZt(t)),await w4e(r,rf(),n),await Sxe(e),!0)}function DZt(t){return{disabled:t.isCacheDisabled(),readOnly:t.isCacheReadOnly(),writeOnly:t.isCacheWriteOnly(),overwriteExisting:t.isCacheOverwriteExisting(),strictMatch:t.isCacheStrictMatch(),cleanup:t.getCacheCleanupOption(),encryptionKey:t.getCacheEncryptionKey()||void 0,includes:t.getCacheIncludes(),excludes:t.getCacheExcludes()}}async function RZt(){let t=process.env.GRADLE_USER_HOME;if(t){let r=rf();return zte.resolve(r,t)}let e=zte.resolve(await D4e(),".gradle");if(Wte.existsSync(e))return te(`Gradle User Home already exists at ${e}`),Dn("GRADLE_USER_HOME",e),e;if(hP.platform()==="win32"&&e.startsWith("C:\\")&&Wte.existsSync("D:\\a\\")){let r="D:\\a\\.gradle";return te(`Setting GRADLE_USER_HOME to ${r} to leverage (potentially) faster drive.`),Dn("GRADLE_USER_HOME",r),r}return Dn("GRADLE_USER_HOME",e),e}async function D4e(){let t=await Jy("java",["-XshowSettings:properties","-version"],{silent:!0}),e=/user\.home = (\S*)/i,r=t.stderr.match(e);if(r==null||r.length<=1)return te("Could not determine user.home from java -version output. Using os.homedir()."),hP.homedir();let s=r[1];return Y(`Determined user.home from java -version output: '${s}'`),s}import*as SB from"fs";import*as AHe from"os";import*as Pf from"path";import*as Kte from"crypto";import*as vE from"fs";var xZt=le(aw(),1);import*as A1 from"path";var pP=le(aw(),1);import*as T4e from"stream";import*as x4e from"util";import{ok as FZt}from"assert";var R4e=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})},fP=class{constructor(e,r,s){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(s),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,r){return R4e(this,void 0,void 0,function*(){let s=1;for(;s<this.maxAttempts;){try{return yield e()}catch(i){if(r&&!r(i))throw i;te(i.message)}let n=this.getSleepAmount();te(`Waiting ${n} seconds before trying again`),yield this.sleep(n),s++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return R4e(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e*1e3))})}};var UE=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})},gP=class extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}},MZt=process.platform==="win32",v9r=process.platform==="darwin",UZt="actions/tool-cache";function k4e(t,e,r,s){return UE(this,void 0,void 0,function*(){e=e||A1.join(M4e(),Kte.randomUUID()),yield Lg(A1.dirname(e)),Y(`Downloading ${t}`),Y(`Destination ${e}`);let n=3,i=jte("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=jte("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new fP(n,i,o).execute(()=>UE(this,void 0,void 0,function*(){return yield vZt(t,e||"",r,s)}),A=>!(A instanceof gP&&A.httpStatusCode&&A.httpStatusCode<500&&A.httpStatusCode!==408&&A.httpStatusCode!==429))})}function vZt(t,e,r,s){return UE(this,void 0,void 0,function*(){if(vE.existsSync(e))throw new Error(`Destination file path ${e} already exists`);let n=new cs(UZt,[],{allowRetries:!1});r&&(Y("set auth"),s===void 0&&(s={}),s.authorization=r);let i=yield n.get(t,s);if(i.message.statusCode!==200){let u=new gP(i.message.statusCode);throw Y(`Failed to download from "${t}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),u}let o=x4e.promisify(T4e.pipeline),A=jte("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>i.message)(),c=!1;try{return yield o(A,vE.createWriteStream(e)),Y("download complete"),c=!0,e}finally{if(!c){Y("download failed");try{yield npe(e)}catch(u){Y(`Failed to delete '${e}'. ${u.message}`)}}}})}function F4e(t,e){return UE(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'file' is required");return e=yield PZt(e),MZt?yield LZt(t,e):yield _Zt(t,e),e})}function LZt(t,e){return UE(this,void 0,void 0,function*(){let r=t.replace(/'/g,
Line truncated
|
||||
`," Line feed \\n"]]),yHe=new Map([...Pre,["\\"," Backslash \\"],["/"," Forward slash /"]]);function bHe(t){if(!t)throw new Error("Provided artifact name input during validation is empty");for(let[e,r]of yHe)if(t.includes(e))throw new Error(`The artifact name is not valid: ${t}. Contains the following character: ${r}
|
||||
|
||||
Invalid characters include: ${Array.from(UIt.values()).toString()}
|
||||
Invalid characters include: ${Array.from(yHe.values()).toString()}
|
||||
|
||||
These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);pe("Artifact name is valid!")}function U0e(t){if(!t)throw new Error("Provided file path input during validation is empty");for(let[e,r]of L0e)if(t.includes(e))throw new Error(`The path for one of the files in artifact is not valid: ${t}. Contains the following character: ${r}
|
||||
These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);te("Artifact name is valid!")}function Ore(t){if(!t)throw new Error("Provided file path input during validation is empty");for(let[e,r]of Pre)if(t.includes(e))throw new Error(`The path for one of the files in artifact is not valid: ${t}. Contains the following character: ${r}
|
||||
|
||||
Invalid characters include: ${Array.from(L0e.values()).toString()}
|
||||
Invalid characters include: ${Array.from(Pre.values()).toString()}
|
||||
|
||||
The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
|
||||
`)}var qIt=Xe(HIt(),1);function Kg(){return`@actions/artifact-${qIt.version}`}var _W=class extends Error{constructor(e=[]){let r="No files were found to upload";e.length>0&&(r+=`: ${e.join(", ")}`),super(r),this.files=e,this.name="FilesNotFoundError"}},dm=class extends Error{constructor(e){super(e),this.name="InvalidResponseError"}},hm=class extends Error{constructor(e="Artifact not found"){super(e),this.name="ArtifactNotFoundError"}},lI=class extends Error{constructor(e="@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES."){super(e),this.name="GHESNotSupportedError"}},gm=class extends Error{constructor(e){let r=`Unable to make request: ${e}
|
||||
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"}};gm.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var XQ=class extends Error{constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};XQ.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var ZQ=class extends Error{};ZQ.prototype.name="InvalidTokenError";function c$r(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function u$r(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return c$r(e)}catch{return atob(e)}}function GIt(t,e){if(typeof t!="string")throw new ZQ("Invalid token specified: must be a string");e||(e={});let r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new ZQ(`Invalid token specified: missing part #${r+1}`);let s;try{s=u$r(n)}catch(i){throw new ZQ(`Invalid token specified: invalid base64 for part #${r+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new ZQ(`Invalid token specified: invalid json for part #${r+1} (${i.message})`)}}var OW=new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims");function Xg(){let t=UW(),e=GIt(t);if(!e.scp)throw OW;let r=e.scp.split(" ");if(r.length===0)throw OW;for(let n of r){let s=n.split(":");if(s?.[0]!=="Actions.Results")continue;if(s.length!==3)throw OW;let i={workflowRunBackendId:s[1],workflowJobRunBackendId:s[2]};return Te(`Workflow Run Backend ID: ${i.workflowRunBackendId}`),Te(`Workflow Job Run Backend ID: ${i.workflowJobRunBackendId}`),i}throw OW}function YIt(t){if(t)try{let r=new URL(t).searchParams.get("sig");r&&(jb(r),jb(encodeURIComponent(r)))}catch(e){Te(`Failed to parse URL: ${t} ${e instanceof Error?e.message:String(e)}`)}}function JIt(t){if(typeof t!="object"||t===null){Te("body is not an object or is null");return}"signed_upload_url"in t&&typeof t.signed_upload_url=="string"&&YIt(t.signed_upload_url),"signed_url"in t&&typeof t.signed_url=="string"&&YIt(t.signed_url)}var HW=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})},P0e=class{constructor(e,r,n,s){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let i=UW();this.baseUrl=NIt(),r&&(this.maxAttempts=r),n&&(this.baseRetryIntervalMilliseconds=n),s&&(this.retryMultiplier=s),this.httpClient=new Ga(e,[new T1(i)])}request(e,r,n,s){return HW(this,void 0,void 0,function*(){let i=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;Te(`[Request] ${r} ${i}`);let o={"Content-Type":n};try{let{body:a}=yield this.retryableRequest(()=>HW(this,void 0,void 0,function*(){return this.httpClient.post(i,JSON.stringify(s),o)}));return a}catch(a){throw new Error(`Failed to ${r}: ${a.message}`)}})}retryableRequest(e){return HW(this,void 0,void 0,function*(){let r=0,n="",s="";for(;r<this.maxAttempts;){let i=!1;try{let a=yield e(),A=a.message.statusCode;s=yield a.readBody(),Te(`[Response] - ${a.message.statusCode}`),Te(`Headers: ${JSON.stringify(a.message.headers,null,2)}`);let c=JSON.parse(s);if(JIt(c),Te(`Body: ${JSON.stringify(c,null,2)}`),this.isSuccessStatusCode(A))return{response:a,body:c};if(i=this.isRetryableHttpStatusCode(A),n=`Failed request: (${A}) ${a.message.statusMessage}`,c.msg){if(XQ.isUsageErrorMessage(c.msg))throw new XQ;n=`${n}: ${c.msg}`}}catch(a){if(a instanceof SyntaxError&&Te(`Raw Body: ${s}`),a instanceof XQ)throw a;if(gm.isNetworkErrorCode(a?.code))throw new gm(a?.code);i=!0,n=a.message}if(!i)throw new Error(`Received non-retryable error: ${n}`);if(r+1===this.maxAttempts)throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${n}`);let o=this.getExponentialRetryTimeMilliseconds(r);pe(`Attempt ${r+1} of ${this.maxAttempts} failed with error: ${n}. Retrying request in ${o} ms...`),yield this.sleep(o),r++}throw new Error("Request failed")})}isSuccessStatusCode(e){return e?e>=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[ao.BadGateway,ao.GatewayTimeout,ao.InternalServerError,ao.ServiceUnavailable,ao.TooManyRequests].includes(e):!1}sleep(e){return HW(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw new Error("attempt should be a positive integer");if(e===0)return this.baseRetryIntervalMilliseconds;let r=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,e),n=r*this.retryMultiplier;return Math.trunc(Math.random()*(n-r)+r)}};function Zg(t){let e=new P0e(Kg(),t?.maxAttempts,t?.retryIntervalMs,t?.retryMultiplier);return new PW(e)}import*as Ax from"fs";import{normalize as VIt,resolve as WIt}from"path";function zIt(t){if(!Ax.existsSync
Line truncated
|
||||
${y$r.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function VW(t){return t instanceof dA?!0:ey(t)&&t.name==="RestError"}function mc(t,e){return Buffer.from(t,e)}import z0e from"node:http";import j0e from"node:https";import ABt from"node:zlib";import{Transform as b$r}from"node:stream";var Vl=cL("ts-http-runtime");var w$r={};function uL(t){return t&&typeof t.pipe=="function"}function cBt(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 uBt(t){return t&&typeof t.byteLength=="number"}var WW=class extends b$r{loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},K0e=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new $g("The operation was aborted. Request has already been canceled.");n=c=>{c.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let c=new rh;Vl.info(`request to '${c.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 c=D$r(a);c!==null&&e.headers.set("Content-Length",c)}let A;try{if(a&&e.onUploadProgress){let g=e.onUploadProgress,p=new WW(g);p.on("error",C=>{Vl.error("Error in upload progress",C)}),uL(a)?a.pipe(p):p.end(a),a=p}let c=await this.makeRequest(e,r,a);s!==void 0&&clearTimeout(s);let u=N$r(c),d={status:c.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return c.resume(),d;A=o?S$r(c,u):c;let h=e.onDownloadProgress;if(h){let g=new WW(h);g.on("error",p=>{Vl.error("Error in download progress",p)}),A.pipe(g),A=g}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=A:d.bodyAsText=await R$r(A),d}finally{if(e.abortSignal&&n){let c=Promise.resolve();uL(a)&&(c=cBt(a));let u=Promise.resolve();uL(A)&&(u=cBt(A)),Promise.all([c,u]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{Vl.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let s=new URL(e.url),i=s.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((A,c)=>{let u=i?z0e.request(a,A):j0e.request(a,A);u.once("error",l=>{c(new dA(l.message,{code:l.code??dA.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new $g("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(l),c(l)}),n&&uL(n)?n.pipe(u):n?typeof n=="string"||Buffer.isBuffer(n)?u.end(n):uBt(n)?u.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Vl.error("Unrecognized body type",n),c(new dA("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?z0e.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new z0e.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return j0e.globalAgent;let s=e.tlsSettings??w$r,i=this.cachedHttpsAgents.get(s);return i&&i.options.keepAlive===!n||(Vl.info("No cached TLS Agent exist, creating a new Agent"),i=new j0e.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,i)),i}}};function N$r(t){let e=mu();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}function S$r(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=ABt.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=ABt.createInflate();return t.pipe(n),n}return t}function R$r(t){return new Promise((e,r)=>{let n=[];t.on("data",s=>{Buffer.isBuffer(s)?n.push(s):n.push(Buffer.from(s))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",s=>{s&&s?.name==="AbortError"?r(s):r(new dA(`Error reading response as text: ${s.message}`,{code:dA.PARSE_ERROR}))})})}function D$r(t){return t?Buffer.isBuffer(t)?t.length:uL(t)?null:uBt(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function lBt(){return new K0e}function zW(){return lBt()}var X0e="logPolicy";function jW(t={}){let e=t.logger??Vl.info,r=new rh({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:X0e,async sendRequest
Line truncated
|
||||
`;return e}function $$r(t){return t instanceof Uint8Array?t.byteLength:Az(t)?t.size===-1?void 0:t.size:void 0}function een(t){let e=0;for(let r of t){let n=$$r(r);if(n===void 0)return;e+=n}return e}async function ten(t,e,r){let n=[mc(`--${r}`,"utf-8"),...e.flatMap(i=>[mc(`\r
|
||||
`,"utf-8"),mc(Z$r(i.headers),"utf-8"),mc(`\r
|
||||
`,"utf-8"),i.body,mc(`\r
|
||||
--${r}`,"utf-8")]),mc(`--\r
|
||||
\r
|
||||
`,"utf-8")],s=een(n);s&&t.headers.set("Content-Length",s),t.body=await MBt(n)}var dL="multipartPolicy",ren=70,nen=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function sen(t){if(t.length>ren)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!nen.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function cz(){return{name:dL,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,i,o]=s;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?sen(r):r=X$r(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await ten(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function uz(){return JW()}import{EOL as oen}from"node:os";import aen from"node:util";import*as vBt from"node:process";function LBt(t,...e){vBt.stderr.write(`${aen.format(t,...e)}${oen}`)}var UBt=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,PBt,cQe=[],uQe=[],lz=[];UBt&&lQe(UBt);var _Bt=Object.assign(t=>OBt(t),{enable:lQe,enabled:dQe,disable:Aen,log:LBt});function lQe(t){PBt=t,cQe=[],uQe=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?uQe.push(new RegExp(`^${n.substr(1)}$`)):cQe.push(new RegExp(`^${n}$`));for(let n of lz)n.enabled=dQe(n.namespace)}function dQe(t){if(t.endsWith("*"))return!0;for(let e of uQe)if(e.test(t))return!1;for(let e of cQe)if(e.test(t))return!0;return!1}function Aen(){let t=PBt||"";return lQe(""),t}function OBt(t){let e=Object.assign(r,{enabled:dQe(t),destroy:cen,log:_Bt.log,namespace:t,extend:uen});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return lz.push(e),e}function cen(){let t=lz.indexOf(this);return t>=0?(lz.splice(t,1),!0):!1}function uen(t){let e=OBt(`${this.namespace}:${t}`);return e.log=this.log,e}var lx=_Bt;var qBt=new Set,dz=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,hQe,gQe=lx("azure");gQe.log=(...t)=>{lx.log(...t)};var fQe=["verbose","info","warning","error"];dz&&(JBt(dz)?len(dz):console.error(`AZURE_LOG_LEVEL set to unknown log level '${dz}'; logging is not enabled. Acceptable values: ${fQe.join(", ")}.`));function len(t){if(t&&!JBt(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${fQe.join(",")}`);hQe=t;let e=[];for(let r of qBt)YBt(r)&&e.push(r.namespace);lx.enable(e.join(","))}var HBt={verbose:400,info:300,warning:200,error:100};function Wl(t){let e=gQe.extend(t);return GBt(gQe,e),{error:hz(e,"error"),warning:hz(e,"warning"),info:hz(e,"info"),verbose:hz(e,"verbose")}}function GBt(t,e){e.log=(...r)=>{t.log(...r)}}function hz(t,e){let r=Object.assign(t.extend(e),{level:e});if(GBt(t,r),YBt(r)){let n=lx.disable();lx.enable(n+","+r.namespace)}return qBt.add(r),r}function YBt(t){return!!(hQe&&HBt[t.level]<=HBt[hQe])}function JBt(t){return fQe.includes(t)}var ef=Wl("core-rest-pipeline");function pQe(t={}){return jW({logger:ef.info,...t})}var mQe=KW;function EQe(t={}){return XW(t)}import CQe from"node:os";import IQe from"node:process";function VBt(){return"User-Agent"}async function WBt(t){if(IQe&&IQe.versions){let e=`${CQe.type()} ${CQe.release()}; ${CQe.arch()}`,r=IQe.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 gz="1.22.2";function Een(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}function zBt(){return VBt()}async function fz(t){let e=new Map;e.set("core-rest-pipeline",gz),await WBt(e);let r=Een(e);return t?`${t} ${r}`:r}var jBt=zBt(),KBt="userAgentPolicy";function BQe(t={}){let e=fz(t.userAgentPrefix);return{name:KBt,async sendRequest(r,n){return r.headers.has(jBt)||r.headers.set(jBt,await e),n(r)}}}var hL=class extends Error{constructor(e){super(e),this.name="AbortError"}};function QQe(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((i,o)=>{function a(){o(new hL(s??"The operation was aborted."))}function A(){n?.removeEventListener("abort",c)}function c(){r?.(),A(),a()}if(n?.aborted)return a();try{t(u=>{A(),i(u)},u=>{A(),o(u)})}catch(u){o(u)}n?.addEventListener("abort",c)})}var yen="The delay was aborted.";function dx(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return QQe(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:n,abortErrorMsg:s??yen})}function dI(t){if(ey(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 XBt(t){return ey(t)}fun
Line truncated
|
||||
`&&t[i]!=="\r";i++)A+=t[i];if(A=A.trim(),A[A.length-1]==="/"&&(A=A.substring(0,A.length-1),i--),!Wtn(A)){let l;return A.trim().length===0?l="Invalid space after '<'.":l="Tag '"+A+"' is an invalid name.",wi("InvalidTag",l,hA(t,i))}let c=qtn(t,i);if(c===!1)return wi("InvalidAttr","Attributes for '"+A+"' have open quote.",hA(t,i));let u=c.value;if(i=c.index,u[u.length-1]==="/"){let l=i-u.length;u=u.substring(0,u.length-1);let d=L0t(u,e);if(d===!0)n=!0;else return wi(d.err.code,d.err.msg,hA(t,l+d.err.line))}else if(a)if(c.tagClosed){if(u.trim().length>0)return wi("InvalidTag","Closing tag '"+A+"' can't have attributes or invalid starting.",hA(t,o));if(r.length===0)return wi("InvalidTag","Closing tag '"+A+"' has not been opened.",hA(t,o));{let l=r.pop();if(A!==l.tagName){let d=hA(t,l.tagStartPos);return wi("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+A+"'.",hA(t,o))}r.length==0&&(s=!0)}}else return wi("InvalidTag","Closing tag '"+A+"' doesn't have proper closing.",hA(t,i));else{let l=L0t(u,e);if(l!==!0)return wi(l.err.code,l.err.msg,hA(t,i-u.length+l.err.line));if(s===!0)return wi("InvalidXml","Multiple possible root nodes found.",hA(t,i));e.unpairedTags.indexOf(A)!==-1||r.push({tagName:A,tagStartPos:o}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=v0t(t,i);continue}else if(t[i+1]==="?"){if(i=M0t(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=Jtn(t,i);if(l==-1)return wi("InvalidChar","char '&' is not expected.",hA(t,i));i=l}else if(s===!0&&!F0t(t[i]))return wi("InvalidXml","Extra text at the end",hA(t,i));t[i]==="<"&&i--}}else{if(F0t(t[i]))continue;return wi("InvalidChar","char '"+t[i]+"' is not expected.",hA(t,i))}if(n){if(r.length==1)return wi("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",hA(t,r[0].tagStartPos));if(r.length>0)return wi("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return wi("InvalidXml","Start tag expected.",1);return!0}function F0t(t){return t===" "||t===" "||t===`
|
||||
`||t==="\r"}function M0t(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let n=t.substr(r,e-r);if(e>5&&n==="xml")return wi("InvalidXml","XML declaration allowed only at the start of the document.",hA(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function v0t(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 Otn='"',Htn="'";function qtn(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===Otn||t[e]===Htn)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){s=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:s}}var Gtn=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function L0t(t,e){let r=wz(t,Gtn),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return wi("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",wL(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return wi("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",wL(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return wi("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",wL(r[s]));let i=r[s][2];if(!Vtn(i))return wi("InvalidAttr","Attribute '"+i+"' is an invalid name.",wL(r[s]));if(!n.hasOwnProperty(i))n[i]=1;else return wi("InvalidAttr","Attribute '"+i+"' is repeated.",wL(r[s]))}return!0}function Ytn(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 Jtn(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Ytn(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 wi(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Vtn(t){return bL(t)}function Wtn(t){return bL(t)}function hA(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function wL(t){return t.startIndex+t[1].length}var ztn={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1},U0t=function(t){return Object.assign({},ztn,t)};var Sz;typeof Symbol!="function"?Sz="@@xmlMetadata":Sz=Symbol("XML Node Metadata");var Iu=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][Sz]={startIndex:r})}static getMetaDataSymbol(){return Sz}};function ZQe(t,e){let r={};if(t[e+3]==="O"&&t[e+4]==="C"&&t[e+5]==="T"&&t[e+6]==="Y"&&t[e+7]==="P"&&t[e+8]==="E"){e=e+9;let n=1,s=!1,i=!1,o="";for(;e<t.length;e++)if(t[e]==="<"&&!i){if(s&&Xtn(t,e)){e+=7;let a,A;[a,A,e]=jtn(t,e+1),A.indexOf("&")===-1&&(r[trn(a)]={regx:RegExp(`&${a};`,"g"),val:A})}else if(s&&Ztn(t,e))e+=8;else if(s&&$tn(t,e))e+=8;else if(s&&ern(t,e))e+=9;else if(Ktn)i=!0;else throw new Error("Invalid DOCTYPE");n++,o=""}else if(t[e]===">"){if(i?t[e-1]==="-"&&t[e-2]==="-"&&(i=!1,n--):n--,n===0)break}else t[e]==="["?s=!0:o+=t[e];if(n!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:e}}function jtn(t,e){let r="";for(;e<t.length&&t[e]!=="'"&&t[e]!=='"';e++)r+=t[e];if(r=r.trim(),r.indexOf(" ")!==-1)throw new Error("External entites are not supported");let n=t[e++],s="";for(;e<t.length&&t[e]!==n;e++)s+=t[e];return[r,s,e]}function Ktn(t,e){return t[e+1]==="!"&&t[e+2]==="-"&&t[e+3]==="-"}function Xtn(t,e){return t[e+1]==="!"&&t[e+2]==="E"&&t[e+3]==="N"&&t[e+4]==="T"&&t[e+5]==="I"&&t[e+6]==="T"&&t[e+7]==="Y"}function Ztn(t,e){return t[e+1]==="!"&&t[e+2]==="E"&&t[e+3]==="L"&&t[e+4]==="E"&&t[e+5]==="M"&&t[e+6]==="E"&&t[e+7]==="N"&&t[e+8]==="T"}function $tn(t,e){return t[e+1]==="!"&&t[e+2]==="A"&&t[e+3]==="T"&&t[e+4]==="T"&&t[e+5]==="L"&&t[e+6]==="I"&&t[e+7]==="S"&&t[e+8]==="T"}function ern(t,e){return t[e+1]==="!"&&t[e+2]==="N"&Line truncated
|
||||
`);let e=new Iu("!xml"),r=e,n="",s="";for(let i=0;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="/"){let a=oy(t,">",i,"Closing Tag is not closed."),A=t.substring(i+2,a).trim();if(this.options.removeNSPrefix){let l=A.indexOf(":");l!==-1&&(A=A.substr(l+1))}this.options.transformTagName&&(A=this.options.transformTagName(A)),r&&(n=this.saveTextToParentTag(n,r,s));let c=s.substring(s.lastIndexOf(".")+1);if(A&&this.options.unpairedTags.indexOf(A)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${A}>`);let u=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(u=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=s.lastIndexOf("."),s=s.substring(0,u),r=this.tagsNodeStack.pop(),n="",i=a}else if(t[i+1]==="?"){let a=eye(t,i,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,s),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){let A=new Iu(a.tagName);A.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(A[":@"]=this.buildAttributesMap(a.tagExp,s,a.tagName)),this.addChild(r,A,s,i)}i=a.closeIndex+1}else if(t.substr(i+1,3)==="!--"){let a=oy(t,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){let A=t.substring(i+4,a-2);n=this.saveTextToParentTag(n,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:A}])}i=a}else if(t.substr(i+1,2)==="!D"){let a=ZQe(t,i);this.docTypeEntities=a.entities,i=a.i}else if(t.substr(i+1,2)==="!["){let a=oy(t,"]]>",i,"CDATA is not closed.")-2,A=t.substring(i+9,a);n=this.saveTextToParentTag(n,r,s);let c=this.parseTextData(A,r.tagname,s,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:A}]):r.add(this.options.textNodeName,c),i=a+2}else{let a=eye(t,i,this.options.removeNSPrefix),A=a.tagName,c=a.rawTagName,u=a.tagExp,l=a.attrExpPresent,d=a.closeIndex;this.options.transformTagName&&(A=this.options.transformTagName(A)),r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,s,!1));let h=r;h&&this.options.unpairedTags.indexOf(h.tagname)!==-1&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),A!==e.tagname&&(s+=s?"."+A:A);let g=i;if(this.isItStopNode(this.options.stopNodes,s,A)){let p="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)A[A.length-1]==="/"?(A=A.substr(0,A.length-1),s=s.substr(0,s.length-1),u=A):u=u.substr(0,u.length-1),i=a.closeIndex;else if(this.options.unpairedTags.indexOf(A)!==-1)i=a.closeIndex;else{let m=this.readStopNodeData(t,c,d+1);if(!m)throw new Error(`Unexpected end of ${c}`);i=m.i,p=m.tagContent}let C=new Iu(A);A!==u&&l&&(C[":@"]=this.buildAttributesMap(u,s,A)),p&&(p=this.parseTextData(p,A,s,!0,l,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),C.add(this.options.textNodeName,p),this.addChild(r,C,s,g)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){A[A.length-1]==="/"?(A=A.substr(0,A.length-1),s=s.substr(0,s.length-1),u=A):u=u.substr(0,u.length-1),this.options.transformTagName&&(A=this.options.transformTagName(A));let p=new Iu(A);A!==u&&l&&(p[":@"]=this.buildAttributesMap(u,s,A)),this.addChild(r,p,s,g),s=s.substr(0,s.lastIndexOf("."))}else{let p=new Iu(A);this.tagsNodeStack.push(r),A!==u&&l&&(p[":@"]=this.buildAttributesMap(u,s,A)),this.addChild(r,p,s,g),r=p}n="",i=d}}else n+=t[i];return e.child};function hrn(t,e,r,n){this.options.captureMetaData||(n=void 0);let s=this.options.updateTag(e.tagname,r,e[":@"]);s===!1||(typeof s=="string"&&(e.tagname=s),t.addChild(e,n))}var grn=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){let r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){let r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){let r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function frn(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function prn(t,e,r){let n="*."+r;for(let s in t){let i=t[s];if(n===i||e===i)return!0}return!1}function mrn(t,e,r=">"){let n,s="";for(let i=e;i<t.length;i++){let o=t[i];if(n)o===n&&(n="");else if(o==='"'||o==="'")n=o;else if(o===r[0])if(r[1]){if(t[i+1]===r[1])return{data:s,index:i}}else return{data:s,index:i};else o===" "&&(o=" ");s+=o}}function oy(t,e,r,n){let s=t.indexOf(e,r);if(s===-1)throw new Error(n);return s+e.length-1}function eye(t,e,r,n=">"){let s=mrn(t,e+1,n);if(!s)return;let i=s.data,o=s.index,a=i.search(/\s/),A=i,c=!0;a!==-1&&(A=i.substring(0,a),i=i.substring(a+1).trimStart());let u=A;if(r){let l=A.indexOf(":");l!==-1&&(A=A.substr(l+1),c=A!==s.data.substr(l+1))}return{tagName:A,tagExp:i,closeIndex:o,attrExpPresent:c,rawTagName:u}}function Ern(t,e,r){let n=r,s=1;for(;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="/"){let i=oy(t,">",r,`${e} is not closed`);if(t.substLine truncated
|
||||
`),O0t(t,e,"",r)}function O0t(t,e,r,n){let s="",i=!1;for(let o=0;o<t.length;o++){let a=t[o],A=Qrn(a);if(A===void 0)continue;let c="";if(r.length===0?c=A:c=`${r}.${A}`,A===e.textNodeName){let g=a[A];yrn(c,e)||(g=e.tagValueProcessor(A,g),g=H0t(g,e)),i&&(s+=n),s+=g,i=!1;continue}else if(A===e.cdataPropName){i&&(s+=n),s+=`<![CDATA[${a[A][0][e.textNodeName]}]]>`,i=!1;continue}else if(A===e.commentPropName){s+=n+`<!--${a[A][0][e.textNodeName]}-->`,i=!0;continue}else if(A[0]==="?"){let g=_0t(a[":@"],e),p=A==="?xml"?"":n,C=a[A][0][e.textNodeName];C=C.length!==0?" "+C:"",s+=p+`<${A}${C}${g}?>`,i=!0;continue}let u=n;u!==""&&(u+=e.indentBy);let l=_0t(a[":@"],e),d=n+`<${A}${l}`,h=O0t(a[A],e,c,u);e.unpairedTags.indexOf(A)!==-1?e.suppressUnpairedNode?s+=d+">":s+=d+"/>":(!h||h.length===0)&&e.suppressEmptyNode?s+=d+"/>":h&&h.endsWith(">")?s+=d+`>${h}${n}</${A}>`:(s+=d+">",h&&n!==""&&(h.includes("/>")||h.includes("</"))?s+=n+e.indentBy+h+n:s+=h,s+=`</${A}>`),i=!0}return s}function Qrn(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let n=e[r];if(t.hasOwnProperty(n)&&n!==":@")return n}}function _0t(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let s=e.attributeValueProcessor(n,t[n]);s=H0t(s,e),s===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${s}"`}return r}function yrn(t,e){t=t.substr(0,t.length-e.textNodeName.length-1);let r=t.substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function H0t(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){let n=e.entities[r];t=t.replace(n.regex,n.val)}return t}var brn={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};function nh(t){this.options=Object.assign({},brn,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=NL(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Srn),this.processTextOrObjNode=wrn,this.options.format?(this.indentate=Nrn,this.tagEndChar=`>
|
||||
`,this.newLine=`
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}nh.prototype.build=function(t){return this.options.preserveOrder?sye(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)};nh.prototype.j2x=function(t,e,r){let n="",s="",i=r.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(typeof t[o]>"u")this.isAttribute(o)&&(s+="");else if(t[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?s+="":o[0]==="?"?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)s+=this.buildTextValNode(t[o],o,"",e);else if(typeof t[o]!="object"){let a=this.isAttribute(o);if(a&&!this.ignoreAttributesFn(a,i))n+=this.buildAttrPairStr(a,""+t[o]);else if(!a)if(o===this.options.textNodeName){let A=this.options.tagValueProcessor(o,""+t[o]);s+=this.replaceEntitiesValue(A)}else s+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){let a=t[o].length,A="",c="";for(let u=0;u<a;u++){let l=t[o][u];if(!(typeof l>"u"))if(l===null)o[0]==="?"?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(typeof l=="object")if(this.options.oneListGroup){let d=this.j2x(l,e+1,r.concat(o));A+=d.val,this.options.attributesGroupName&&l.hasOwnProperty(this.options.attributesGroupName)&&(c+=d.attrStr)}else A+=this.processTextOrObjNode(l,o,e,r);else if(this.options.oneListGroup){let d=this.options.tagValueProcessor(o,l);d=this.replaceEntitiesValue(d),A+=d}else A+=this.buildTextValNode(l,o,"",e)}this.options.oneListGroup&&(A=this.buildObjectNode(A,o,c,e)),s+=A}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){let a=Object.keys(t[o]),A=a.length;for(let c=0;c<A;c++)n+=this.buildAttrPairStr(a[c],""+t[o][a[c]])}else s+=this.processTextOrObjNode(t[o],o,e,r);return{attrStr:n,val:s}};nh.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'};function wrn(t,e,r,n){let s=this.j2x(t,r+1,n.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,s.attrStr,r):this.buildObjectNode(s.val,e,s.attrStr,r)}nh.prototype.buildObjectNode=function(t,e,r,n){if(t==="")return e[0]==="?"?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let s="</"+e+this.tagEndChar,i="";return e[0]==="?"&&(i="?",s=""),(r||r==="")&&t.indexOf("<")===-1?this.indentate(n)+"<"+e+r+i+">"+t+s:this.options.commentPropName!==!1&&e===this.options.commentPropName&&i.length===0?this.indentate(n)+`<!--${t}-->`+this.newLine:this.indentate(n)+"<"+e+r+i+this.tagEndChar+t+this.indentate(n)+s}};nh.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e};nh.prototype.buildTextValNode=function(t,e,r,n){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(n)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),s===""?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+s+"</"+e+this.tagEndChar}};nh.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){let r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};function Nrn(t){return this.options.indentBy.repeat(t)}function Srn(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}var q0t={validate:Nz};function J0t(t){var e;return{attributesGroupName:"$",textNodeName:(e=t.xmlCharKey)!==null&&e!==void 0?e:"_",ignoreAttributes:!1,suppressBooleanAttributes:!1}}function Rrn(t={}){var e,r;return Object.assign(Object.assign({},J0t(t)),{attributeNamePrefix:"@_",format:!0,suppressEmptyNode:!0,indentBy:"",rootNodeName:(e=t.rootName)!==null&&e!==void 0?e:"root",cdataPropName:(r=t.cdataPropName)!==null&&r!==void 0?r:"__cdata"})}function Drn(t={}){return Object.assign(Object.assign({},J0t(t)),{parseAttributeValue:!1,parseTagValue:!1,attributeNamePrefix:"",stopNodes:t.stopNodes,processEntities:!0,trimValues:!1})}function Rz(t,e={}){let r=Rrn(e),n=new nh(r),s={[r.rootNodeName]:t};return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${n.build(s)}`.replace(/\n/g,"")}async function iye(t,e={}){if(!t)throw new Error("Document is empty");let r=q0t.validate(t);if(r!==!0)throw r;let s=new mx(Drn(e)).parse(t);iLine truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(qt.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===qt.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(s=>s.name.toLowerCase().startsWith(qt.PREFIX_FOR_STORAGE));r.sort((s,i)=>Pz(s.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((s,i,o)=>!(i>0&&s.name.toLowerCase()===o[i-1].name.toLowerCase()));let n="";return r.forEach(s=>{n+=`${s.name.toLowerCase().trimRight()}:${s.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=vz(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=Lz(e.url),i={};if(s){let o=[];for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){let A=a.toLowerCase();i[A]=s[a],o.push(A)}o.sort();for(let a of o)n+=`
|
||||
${a}:${decodeURIComponent(i[a])}`}return n}};var ci=class extends Ay{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new TL(e,r,this)}computeHMACSHA256(e){return Urn("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var cy=class extends Error{constructor(e){super(e),this.name="AbortError"}};var $i=Wl("storage-common");var zl;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(zl||(zl={}));var mI={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:zl.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Prn=new cy("The operation was aborted."),kL=class extends nf{retryOptions;constructor(e,r,n=mI){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:mI.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):mI.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:mI.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:mI.maxRetryDelayInMs):mI.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:mI.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:mI.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(s.url=Mz(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=pI(s.url,Em.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if($i.info(`RetryPolicy: =====> Try=${n} ${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(s),!this.shouldRetry(i,n,o))return o;r=r||!i&&o.status===404}catch(a){if($i.error(`RetryPolicy: Caught error, message: ${a.message}, code: ${a.code}`),!this.shouldRetry(i,n,o,a))throw a}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return $i.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(s){for(let o of i)if(s.name.toUpperCase().includes(o)||s.message.toUpperCase().includes(o)||s.code&&s.code.toString().toUpperCase()===o)return $i.info(`RetryPolicy: Network error ${o} found, will retry.`),!0}if(n||s){let o=n?n.status:s?s.statusCode:0;if(!e&&o===404)return $i.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return $i.info(`RetryPolicy: Will retry for status code ${o}.`),!0}if(n&&n?.status>=400){let o=n.headers.get(qt.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return s?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?($i.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let s=0;if(e)switch(this.retryOptions.retryPolicyType){case zl.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case zl.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return $i.info(`RetryPolicy: Delay for ${s}ms`),Uz(s,n,Prn)}};var FL=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new kL(e,r,this.retryOptions)}};var _rn="storageBrowserPolicy";function V0t(){return{name:_rn,async sendRequest(t,e){return un||((t.method==="GET"||t.method==="HEAD")&&(t.url=pI(t.url,Em.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(qt.COOKIE),t.headers.delete(qt.CONTENT_LENGTH)),e(t)}}}var Orn="StorageCorrectContentLengthPolicy";function W0t(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(qt.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:Orn,async sendRequest(e,r){return t(e),r(e)}}}var Hrn="storageRetryPolicy",Ex={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:zl.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},qrn=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],Grn=new cy("The operation was aborted.");function z0t(t={}){let e=t.retryPolicyType??Ex.retryPolicyType,r=t.maxTries??Ex.maxTries,n=t.retryDelayInMs??Ex.retryDelayInMs,s=t.maxRetryDelayInMs??Ex.maxRetryDelayInMs,i=t.secondaryHost??Ex.secondaryHost,o=t.tryTimeoutInMs??Ex.tryTimeoutInMs;function a({isPrimaryRetry:c,attempt:u,response:l,error:d}){if(u>=r)return $i.info(`RetryPolicy: Attempt(s) ${u} >= maxTries ${r}, no further try.`),!1;if(d){for(let h of qrn)if(d.name.toUpperCase().includes(h)||d.message.toUpperCase().in
Line truncated
|
||||
`)+`
|
||||
`+n(i)+s(i),a=Yrn("sha256",t.accountKey).update(o,"utf8").digest("base64");i.headers.set(qt.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(i,o){let a=i.headers.get(o);return!a||o===qt.CONTENT_LENGTH&&a==="0"?"":a}function n(i){let o=[];for(let[A,c]of i.headers)A.toLowerCase().startsWith(qt.PREFIX_FOR_STORAGE)&&o.push({name:A,value:c});o.sort((A,c)=>Pz(A.name.toLowerCase(),c.name.toLowerCase())),o=o.filter((A,c,u)=>!(c>0&&A.name.toLowerCase()===u[c-1].name.toLowerCase()));let a="";return o.forEach(A=>{a+=`${A.name.toLowerCase().trimRight()}:${A.value.trimLeft()}
|
||||
`}),a}function s(i){let o=vz(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let A=Lz(i.url),c={};if(A){let u=[];for(let l in A)if(Object.prototype.hasOwnProperty.call(A,l)){let d=l.toLowerCase();c[d]=A[l],u.push(d)}u.sort();for(let l of u)a+=`
|
||||
${l}:${decodeURIComponent(c[l])}`}return a}return{name:Jrn,async sendRequest(i,o){return e(i),o(i)}}}var Vrn="storageRequestFailureDetailsParserPolicy";function j0t(){return{name:Vrn,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}}}}import{createHmac as Wrn}from"node:crypto";var _z=class{accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return Wrn("sha256",this.key).update(e,"utf8").digest("base64")}};var Oz="12.31.0",Hz="2026-02-06";var qz="https://storage.azure.com/.default",Cm={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var sh="",cye="*",zrn=1*1024*1024;var jrn=4*zrn;var K0t="AES256",X0t="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Z0t=["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"],$0t=["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"],eQt="BlobUsesCustomerSpecifiedEncryption",tQt="BlobDoesNotUseCustomerSpecifiedEncryption",rQt=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Im(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 ML=class{factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function Ni(t,e={}){t||(t=new Rs);let r=new ML([],e);return r._credential=t,r}function Krn(t){let e=[Xrn,nQt,Zrn,$rn,enn,tnn,nnn];if(t.factories.length){let r=t.factories.filter(n=>!e.some(s=>s(n)));if(r.length){let n=r.some(s=>rnn(s));return{wrappedPolicies:KQe(r),afterRetry:n}}}}function uye(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?XQe(e):aye(),t._coreHttpClient=n);let s=t._corePipeline;if(!s){let i=`azsdk-js-azure-storage-blob/${Oz}`,o=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;s=EL({...r,loggingOptions:{additionalAllowedHeaderNames:Z0t,additionalAllowedQueryParameters:$0t,logger:Dz.info},userAgentOptions:{userAgentPrefix:o},serializationOptions:{stringifyXML:Rz,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:iye,serializerOptions:{xml:{xmlCharKey:"#"}}}}),s.removePolicy({phase:"Retry"}),s.removePolicy({name:NQe}),s.addPolicy(W0t()),s.addPolicy(z0t(r.retryOptions),{phase:"Retry"}),s.addPolicy(j0t()),s.addPolicy(V0t());let a=Krn(t);a&&s.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:"Retry"}:void 0);let A=lye(t);Eu(A)?s.addPolicy(fx({credential:A,scopes:r.au
Line truncated
|
||||
`),i=e.computeHMACSHA256(s);return{sasQueryParameters:new ch(t.version,i,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}function Xsn(t,e){if(t=Ey(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=Bf.parse(t.permissions.toString()).toString():s=Qf.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?ln(t.startsOn,!1):"",t.expiresOn?ln(t.expiresOn,!1):"",my(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ah(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ch(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function Zsn(t,e){if(t=Ey(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=Bf.parse(t.permissions.toString()).toString():s=Qf.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?ln(t.startsOn,!1):"",t.expiresOn?ln(t.expiresOn,!1):"",my(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ah(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ch(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}function $sn(t,e){if(t=Ey(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=Bf.parse(t.permissions.toString()).toString():s=Qf.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?ln(t.startsOn,!1):"",t.expiresOn?ln(t.expiresOn,!1):"",my(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?ln(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?ln(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ah(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ch(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}function ein(t,e){if(t=Ey(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=Bf.parse(t.permissions.toString()).toString():s=Qf.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?ln(t.startsOn,!1):"",t.expiresOn?ln(t.expiresOn,!1):"",my(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?ln(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?ln(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ah(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ch(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}function tin(t,e){if(t=Ey(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=Bf.parse(t.permissions.toString()).toString():s=Qf.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?ln(t.startsOn,!1):"",t.expiresOn?ln(t.expiresOn,!1):"",my(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?ln(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?ln(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ah(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ch(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}function rin(t,e){if(t=Ey(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=Bf.parse(t.permissions.toString()).toString():s=Qf.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?ln(t.startsOn,!1):"",t.expiresOn?ln(t.expiresOn,!1):"",my(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?ln(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?ln(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Ah(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ch(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}function my(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}function Ey(t){let e=t.version?t.version:Hz;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 VL=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=hx()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==sh||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==sh||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 $e.withSpan("BlobLeaseClient-acquireLease",r,async n=>gt(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==sh||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==sh||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 $e.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=gt(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,s})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==sh||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==sh||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 $e.withSpan("BlobLeaseClient-releaseLease",e,async r=>gt(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!==sh||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==sh||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 $e.withSpan("BlobLeaseClient-renewLease",e,async r=>this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.ab
Line truncated
|
||||
Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`);A.length>1&&tr("Multiple artifacts found, defaulting to first.");let c={workflowRunBackendId:A[0].workflowRunBackendId,workflowJobRunBackendId:A[0].workflowJobRunBackendId,name:A[0].name},{signedUrl:u}=yield n.GetSignedArtifactURL(c);pe(`Redirecting to blob download url: ${CFt(u)}`);try{pe(`Starting download of artifact to: ${r}`);let l=yield IFt(u,r,e?.skipDecompress);pe("Artifact download completed successfully."),e?.expectedHash&&e?.expectedHash!==l.sha256Digest&&(s=!0,Te(`Computed digest: ${l.sha256Digest}`),Te(`Expected digest: ${e.expectedHash}`))}catch(l){throw new Error(`Unable to download and extract artifact: ${l.message}`)}return{downloadPath:r,digestMismatch:s}})}function yFt(){return IT(this,arguments,void 0,function*(t=SIt()){return(yield KQn(t))?Te(`Artifact destination folder already exists: ${t}`):(Te(`Artifact destination folder does not exist, creating: ${t}`),yield gFt.mkdir(t,{recursive:!0})),t})}var ZQn=5,$Qn=[400,401,403,404,422];function BT(t,e=ZQn,r=$Qn){var n;if(e<=0)return[{enabled:!1},t.request];let s={enabled:!0};r.length>0&&(s.doNotRetry=r);let i=Object.assign(Object.assign({},t.request),{retries:e});return Te(`GitHub client configured with: (retries: ${i.retries}, retry-exempt-status-code: ${(n=s.doNotRetry)!==null&&n!==void 0?n:"octokit default: [400, 401, 403, 404, 422]"})`),[s,i]}var bFt="6.0.0";function jy(t){t.hook.wrap("request",(e,r)=>{t.log.debug("request",r);let n=Date.now(),s=t.request.endpoint.parse(r),i=s.url.replace(r.baseUrl,"");return e(r).then(o=>{let a=o.headers["x-github-request-id"];return t.log.info(`${s.method} ${i} - ${o.status} with id ${a} in ${Date.now()-n}ms`),o}).catch(o=>{let a=o.response?.headers["x-github-request-id"]||"UNKNOWN";throw t.log.error(`${s.method} ${i} - ${o.status} with id ${a} in ${Date.now()-n}ms`),o})})}jy.VERSION=bFt;var SFt=Xe(wFt(),1),RFt=Xe(yge(),1),eyn="0.0.0-development";async function NFt(t,e,r,n){if(!r.request||!r.request.request)throw r;if(r.status>=400&&!t.doNotRetry.includes(r.status)){let s=n.request.retries!=null?n.request.retries:t.retries,i=Math.pow((n.request.retryCount||0)+1,2);throw e.retry.retryRequest(r,s,i)}throw r}async function tyn(t,e,r,n){let s=new SFt.default;return s.on("failed",function(i,o){let a=~~i.request.request.retries,A=~~i.request.request.retryAfter;if(n.request.retryCount=o.retryCount+1,a>o.retryCount)return A*t.retryAfterBaseValue}),s.schedule(ryn.bind(null,t,e,r),n)}async function ryn(t,e,r,n){let s=await r(r,n);if(s.data&&s.data.errors&&s.data.errors.length>0&&/Something went wrong while executing your query/.test(s.data.errors[0].message)){let i=new RFt.RequestError(s.data.errors[0].message,500,{request:n,response:s});return NFt(t,e,i,n)}return s}function Ky(t,e){let r=Object.assign({enabled:!0,retryAfterBaseValue:1e3,doNotRetry:[400,401,403,404,410,422,451],retries:3},e.retry);return r.enabled&&(t.hook.error("request",NFt.bind(null,r,t)),t.hook.wrap("request",tyn.bind(null,r,t))),{retry:{retryRequest:(n,s,i)=>(n.request.request=Object.assign({},n.request.request,{retries:s,retryAfter:i}),n)}}}Ky.VERSION=eyn;var DFt=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};function HK(t,e,r,n,s){return DFt(this,void 0,void 0,function*(){var i;let[o,a]=BT(sQ),A={log:void 0,userAgent:Kg(),previews:void 0,retry:o,request:a},u=yield Hd(s,A,Ky,jy).request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}",{owner:r,repo:n,run_id:e,name:t});if(u.status!==200)throw new dm(`Invalid response from GitHub API: ${u.status} (${(i=u?.headers)===null||i===void 0?void 0:i["x-github-request-id"]})`);if(u.data.artifacts.length===0)throw new hm(`Artifact not found for name: ${t}
|
||||
`)}var DHe=le(NHe(),1);function nl(){return`@actions/artifact-${DHe.version}`}var IP=class extends Error{constructor(e=[]){let r="No files were found to upload";e.length>0&&(r+=`: ${e.join(", ")}`),super(r),this.files=e,this.name="FilesNotFoundError"}},vd=class extends Error{constructor(e){super(e),this.name="InvalidResponseError"}},Ld=class extends Error{constructor(e="Artifact not found"){super(e),this.name="ArtifactNotFoundError"}},Of=class extends Error{constructor(e="@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES."){super(e),this.name="GHESNotSupportedError"}},_d=class extends Error{constructor(e){let r=`Unable to make request: ${e}
|
||||
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"}};_d.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var LE=class extends Error{constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};LE.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var _E=class extends Error{};_E.prototype.name="InvalidTokenError";function BXt(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let s=r.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}function QXt(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return BXt(e)}catch{return atob(e)}}function RHe(t,e){if(typeof t!="string")throw new _E("Invalid token specified: must be a string");e||(e={});let r=e.header===!0?0:1,s=t.split(".")[r];if(typeof s!="string")throw new _E(`Invalid token specified: missing part #${r+1}`);let n;try{n=QXt(s)}catch(i){throw new _E(`Invalid token specified: invalid base64 for part #${r+1} (${i.message})`)}try{return JSON.parse(n)}catch(i){throw new _E(`Invalid token specified: invalid json for part #${r+1} (${i.message})`)}}var BP=new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims");function il(){let t=mP(),e=RHe(t);if(!e.scp)throw BP;let r=e.scp.split(" ");if(r.length===0)throw BP;for(let s of r){let n=s.split(":");if(n?.[0]!=="Actions.Results")continue;if(n.length!==3)throw BP;let i={workflowRunBackendId:n[1],workflowJobRunBackendId:n[2]};return Y(`Workflow Run Backend ID: ${i.workflowRunBackendId}`),Y(`Workflow Job Run Backend ID: ${i.workflowJobRunBackendId}`),i}throw BP}function THe(t){if(t)try{let r=new URL(t).searchParams.get("sig");r&&(MA(r),MA(encodeURIComponent(r)))}catch(e){Y(`Failed to parse URL: ${t} ${e instanceof Error?e.message:String(e)}`)}}function xHe(t){if(typeof t!="object"||t===null){Y("body is not an object or is null");return}"signed_upload_url"in t&&typeof t.signed_upload_url=="string"&&THe(t.signed_upload_url),"signed_url"in t&&typeof t.signed_url=="string"&&THe(t.signed_url)}var QP=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})},Hre=class{constructor(e,r,s,n){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let i=mP();this.baseUrl=dHe(),r&&(this.maxAttempts=r),s&&(this.baseRetryIntervalMilliseconds=s),n&&(this.retryMultiplier=n),this.httpClient=new cs(e,[new _l(i)])}request(e,r,s,n){return QP(this,void 0,void 0,function*(){let i=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;Y(`[Request] ${r} ${i}`);let o={"Content-Type":s};try{let{body:a}=yield this.retryableRequest(()=>QP(this,void 0,void 0,function*(){return this.httpClient.post(i,JSON.stringify(n),o)}));return a}catch(a){throw new Error(`Failed to ${r}: ${a.message}`)}})}retryableRequest(e){return QP(this,void 0,void 0,function*(){let r=0,s="",n="";for(;r<this.maxAttempts;){let i=!1;try{let a=yield e(),A=a.message.statusCode;n=yield a.readBody(),Y(`[Response] - ${a.message.statusCode}`),Y(`Headers: ${JSON.stringify(a.message.headers,null,2)}`);let c=JSON.parse(n);if(xHe(c),Y(`Body: ${JSON.stringify(c,null,2)}`),this.isSuccessStatusCode(A))return{response:a,body:c};if(i=this.isRetryableHttpStatusCode(A),s=`Failed request: (${A}) ${a.message.statusMessage}`,c.msg){if(LE.isUsageErrorMessage(c.msg))throw new LE;s=`${s}: ${c.msg}`}}catch(a){if(a instanceof SyntaxError&&Y(`Raw Body: ${n}`),a instanceof LE)throw a;if(_d.isNetworkErrorCode(a?.code))throw new _d(a?.code);i=!0,s=a.message}if(!i)throw new Error(`Received non-retryable error: ${s}`);if(r+1===this.maxAttempts)throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${s}`);let o=this.getExponentialRetryTimeMilliseconds(r);te(`Attempt ${r+1} of ${this.maxAttempts} failed with error: ${s}. Retrying request in ${o} ms...`),yield this.sleep(o),r++}throw new Error("Request failed")})}isSuccessStatusCode(e){return e?e>=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[Er.BadGateway,Er.GatewayTimeout,Er.InternalServerError,Er.ServiceUnavailable,Er.TooManyRequests].includes(e):!1}sleep(e){return QP(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw new Error("attempt should be a positive integer");if(e===0)return this.baseRetryIntervalMilliseconds;let r=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,e),s=r*this.retryMultiplier;return Math.trunc(Math.random()*(s-r)+r)}};function ol(t){let e=new Hre(nl(),t?.maxAttempts,t?.retryIntervalMs,t?.retryMultiplier);return new CP(e)}import*as TB from"fs";import{normalize as kHe,resolve as FHe}from"path";function MHe(t){if(!TB.existsSync(t))throw
Line truncated
|
||||
Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`);A.length>1&&at("Multiple artifacts found, defaulting to first.");let c={workflowRunBackendId:A[0].workflowRunBackendId,workflowJobRunBackendId:A[0].workflowJobRunBackendId,name:A[0].name},{signedUrl:u}=yield s.GetSignedArtifactURL(c);te(`Redirecting to blob download url: ${Pje(u)}`);try{te(`Starting download of artifact to: ${r}`);let l=yield Oje(u,r,e?.skipDecompress);te("Artifact download completed successfully."),e?.expectedHash&&e?.expectedHash!==l.sha256Digest&&(n=!0,Y(`Computed digest: ${l.sha256Digest}`),Y(`Expected digest: ${e.expectedHash}`))}catch(l){throw new Error(`Unable to download and extract artifact: ${l.message}`)}return{downloadPath:r,digestMismatch:n}})}function Yje(){return bQ(this,arguments,void 0,function*(t=hHe()){return(yield jpr(t))?Y(`Artifact destination folder already exists: ${t}`):(Y(`Artifact destination folder does not exist, creating: ${t}`),yield Mje.mkdir(t,{recursive:!0})),t})}var Zpr=5,Xpr=[400,401,403,404,422];function wQ(t,e=Zpr,r=Xpr){var s;if(e<=0)return[{enabled:!1},t.request];let n={enabled:!0};r.length>0&&(n.doNotRetry=r);let i=Object.assign(Object.assign({},t.request),{retries:e});return Y(`GitHub client configured with: (retries: ${i.retries}, retry-exempt-status-code: ${(s=n.doNotRetry)!==null&&s!==void 0?s:"octokit default: [400, 401, 403, 404, 422]"})`),[n,i]}var qje="6.0.0";function hm(t){t.hook.wrap("request",(e,r)=>{t.log.debug("request",r);let s=Date.now(),n=t.request.endpoint.parse(r),i=n.url.replace(r.baseUrl,"");return e(r).then(o=>{let a=o.headers["x-github-request-id"];return t.log.info(`${n.method} ${i} - ${o.status} with id ${a} in ${Date.now()-s}ms`),o}).catch(o=>{let a=o.response?.headers["x-github-request-id"]||"UNKNOWN";throw t.log.error(`${n.method} ${i} - ${o.status} with id ${a} in ${Date.now()-s}ms`),o})})}hm.VERSION=qje;var Wje=le(Vje(),1),zje=le(X9(),1),$pr="0.0.0-development";async function Jje(t,e,r,s){if(!r.request||!r.request.request)throw r;if(r.status>=400&&!t.doNotRetry.includes(r.status)){let n=s.request.retries!=null?s.request.retries:t.retries,i=Math.pow((s.request.retryCount||0)+1,2);throw e.retry.retryRequest(r,n,i)}throw r}async function eEr(t,e,r,s){let n=new Wje.default;return n.on("failed",function(i,o){let a=~~i.request.request.retries,A=~~i.request.request.retryAfter;if(s.request.retryCount=o.retryCount+1,a>o.retryCount)return A*t.retryAfterBaseValue}),n.schedule(tEr.bind(null,t,e,r),s)}async function tEr(t,e,r,s){let n=await r(r,s);if(n.data&&n.data.errors&&n.data.errors.length>0&&/Something went wrong while executing your query/.test(n.data.errors[0].message)){let i=new zje.RequestError(n.data.errors[0].message,500,{request:s,response:n});return Jje(t,e,i,s)}return n}function fm(t,e){let r=Object.assign({enabled:!0,retryAfterBaseValue:1e3,doNotRetry:[400,401,403,404,410,422,451],retries:3},e.retry);return r.enabled&&(t.hook.error("request",Jje.bind(null,r,t)),t.hook.wrap("request",eEr.bind(null,r,t))),{retry:{retryRequest:(s,n,i)=>(s.request.request=Object.assign({},s.request.request,{retries:n,retryAfter:i}),s)}}}fm.VERSION=$pr;var jje=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})};function N3(t,e,r,s,n){return jje(this,void 0,void 0,function*(){var i;let[o,a]=wQ(cp),A={log:void 0,userAgent:nl(),previews:void 0,retry:o,request:a},u=yield JA(n,A,fm,hm).request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}",{owner:r,repo:s,run_id:e,name:t});if(u.status!==200)throw new vd(`Invalid response from GitHub API: ${u.status} (${(i=u?.headers)===null||i===void 0?void 0:i["x-github-request-id"]})`);if(u.data.artifacts.length===0)throw new Ld(`Artifact not found for name: ${t}
|
||||
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let l=u.data.artifacts[0];return u.data.artifacts.length>1&&(l=u.data.artifacts.sort((d,h)=>h.id-d.id)[0],Te(`More than one artifact found for a single name, returning newest (id: ${l.id})`)),{artifact:{name:l.name,id:l.id,size:l.size_in_bytes,createdAt:l.created_at?new Date(l.created_at):void 0,digest:l.digest}}})}function xFt(t){return DFt(this,void 0,void 0,function*(){var e;let r=Zg(),{workflowRunBackendId:n,workflowJobRunBackendId:s}=Xg(),i={workflowRunBackendId:n,workflowJobRunBackendId:s,nameFilter:Da.create({value:t})},o=yield r.ListArtifacts(i);if(o.artifacts.length===0)throw new hm(`Artifact not found for name: ${t}
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let l=u.data.artifacts[0];return u.data.artifacts.length>1&&(l=u.data.artifacts.sort((d,h)=>h.id-d.id)[0],Y(`More than one artifact found for a single name, returning newest (id: ${l.id})`)),{artifact:{name:l.name,id:l.id,size:l.size_in_bytes,createdAt:l.created_at?new Date(l.created_at):void 0,digest:l.digest}}})}function Kje(t){return jje(this,void 0,void 0,function*(){var e;let r=ol(),{workflowRunBackendId:s,workflowJobRunBackendId:n}=il(),i={workflowRunBackendId:s,workflowJobRunBackendId:n,nameFilter:ri.create({value:t})},o=yield r.ListArtifacts(i);if(o.artifacts.length===0)throw new Ld(`Artifact not found for name: ${t}
|
||||
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let a=o.artifacts[0];return o.artifacts.length>1&&(a=o.artifacts.sort((A,c)=>Number(c.databaseId)-Number(A.databaseId))[0],Te(`More than one artifact found for a single name, returning newest (id: ${a.databaseId})`)),{artifact:{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?Ra.toDate(a.createdAt):void 0,digest:(e=a.digest)===null||e===void 0?void 0:e.value}}})}var TFt=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})};function kFt(t,e,r,n,s){return TFt(this,void 0,void 0,function*(){var i;let[o,a]=BT(sQ),A={log:void 0,userAgent:Kg(),previews:void 0,retry:o,request:a},c=Hd(s,A,Ky,jy),u=yield HK(t,e,r,n,s),l=yield c.rest.actions.deleteArtifact({owner:r,repo:n,artifact_id:u.artifact.id});if(l.status!==204)throw new dm(`Invalid response from GitHub API: ${l.status} (${(i=l?.headers)===null||i===void 0?void 0:i["x-github-request-id"]})`);return{id:u.artifact.id}})}function FFt(t){return TFt(this,void 0,void 0,function*(){let e=Zg(),{workflowRunBackendId:r,workflowJobRunBackendId:n}=Xg(),s={workflowRunBackendId:r,workflowJobRunBackendId:n,nameFilter:Da.create({value:t})},i=yield e.ListArtifacts(s);if(i.artifacts.length===0)throw new hm(`Artifact not found for name: ${t}`);let o=i.artifacts[0];i.artifacts.length>1&&(o=i.artifacts.sort((c,u)=>Number(u.databaseId)-Number(c.databaseId))[0],Te(`More than one artifact found for a single name, returning newest (id: ${o.databaseId})`));let a={workflowRunBackendId:o.workflowRunBackendId,workflowJobRunBackendId:o.workflowJobRunBackendId,name:o.name},A=yield e.DeleteArtifact(a);return pe(`Artifact '${t}' (ID: ${A.artifactId}) deleted`),{id:Number(A.artifactId)}})}var MFt=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})},qK=xIt(),GK=100,nyn=Math.ceil(qK/GK);function vFt(t,e,r,n){return MFt(this,arguments,void 0,function*(s,i,o,a,A=!1){pe(`Fetching artifact list for workflow run ${s} in repository ${i}/${o}`);let c=[],[u,l]=BT(sQ),d={log:void 0,userAgent:Kg(),previews:void 0,retry:u,request:l},h=Hd(a,d,Ky,jy),g=1,{data:p}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:i,repo:o,run_id:s,per_page:GK,page:g}),C=Math.ceil(p.total_count/GK),m=p.total_count;m>qK&&(tr(`Workflow run ${s} has ${m} artifacts, exceeding the limit of ${qK}. Results will be incomplete as only the first ${qK} artifacts will be returned`),C=nyn);for(let I of p.artifacts)c.push({name:I.name,id:I.id,size:I.size_in_bytes,createdAt:I.created_at?new Date(I.created_at):void 0,digest:I.digest});for(g++,g;g<=C;g++){Te(`Fetching page ${g} of artifact list`);let{data:I}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:i,repo:o,run_id:s,per_page:GK,page:g});for(let y of I.artifacts)c.push({name:y.name,id:y.id,size:y.size_in_bytes,createdAt:y.created_at?new Date(y.created_at):void 0,digest:y.digest})}return A&&(c=UFt(c)),pe(`Found ${c.length} artifact(s)`),{artifacts:c}})}function LFt(){return MFt(this,arguments,void 0,function*(t=!1){let e=Zg(),{workflowRunBackendId:r,workflowJobRunBackendId:n}=Xg(),s={workflowRunBackendId:r,workflowJobRunBackendId:n},o=(yield e.ListArtifacts(s)).artifacts.map(a=>{var A;return{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?Ra.toDate(a.createdAt):void 0,digest:(A=a.digest)===null||A===void 0?void 0:A.value}});return t&&(o=UFt(o)),pe(`Found ${o.length} artifact(s)`),{artifacts:o}})}function UFt(t){t.sort((n,s)=>s.id-n.id);let e=[],r=new Set;for(let n of t)r.has(n.name)||(e.push(n),r.add(n.name));return e}var EP=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(l){o(l)}}function A(u){try{c(n.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):s(u.value).then(a,A)}c((n=n.apply(t,e||[])).next())})},syn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r},QT=class{uploadArtifact(e,r,n,s){return EP(this,void 0,void 0,function*(){try{if(ix())throw new lI;return F2t(e,r,n,s)}catch(i){throw tr(`Artifact upload failed with error: ${i}.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let a=o.artifacts[0];return o.artifacts.length>1&&(a=o.artifacts.sort((A,c)=>Number(c.databaseId)-Number(A.databaseId))[0],Y(`More than one artifact found for a single name, returning newest (id: ${a.databaseId})`)),{artifact:{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?ti.toDate(a.createdAt):void 0,digest:(e=a.digest)===null||e===void 0?void 0:e.value}}})}var Zje=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})};function Xje(t,e,r,s,n){return Zje(this,void 0,void 0,function*(){var i;let[o,a]=wQ(cp),A={log:void 0,userAgent:nl(),previews:void 0,retry:o,request:a},c=JA(n,A,fm,hm),u=yield N3(t,e,r,s,n),l=yield c.rest.actions.deleteArtifact({owner:r,repo:s,artifact_id:u.artifact.id});if(l.status!==204)throw new vd(`Invalid response from GitHub API: ${l.status} (${(i=l?.headers)===null||i===void 0?void 0:i["x-github-request-id"]})`);return{id:u.artifact.id}})}function $je(t){return Zje(this,void 0,void 0,function*(){let e=ol(),{workflowRunBackendId:r,workflowJobRunBackendId:s}=il(),n={workflowRunBackendId:r,workflowJobRunBackendId:s,nameFilter:ri.create({value:t})},i=yield e.ListArtifacts(n);if(i.artifacts.length===0)throw new Ld(`Artifact not found for name: ${t}`);let o=i.artifacts[0];i.artifacts.length>1&&(o=i.artifacts.sort((c,u)=>Number(u.databaseId)-Number(c.databaseId))[0],Y(`More than one artifact found for a single name, returning newest (id: ${o.databaseId})`));let a={workflowRunBackendId:o.workflowRunBackendId,workflowJobRunBackendId:o.workflowJobRunBackendId,name:o.name},A=yield e.DeleteArtifact(a);return te(`Artifact '${t}' (ID: ${A.artifactId}) deleted`),{id:Number(A.artifactId)}})}var eKe=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})},D3=pHe(),R3=100,rEr=Math.ceil(D3/R3);function tKe(t,e,r,s){return eKe(this,arguments,void 0,function*(n,i,o,a,A=!1){te(`Fetching artifact list for workflow run ${n} in repository ${i}/${o}`);let c=[],[u,l]=wQ(cp),d={log:void 0,userAgent:nl(),previews:void 0,retry:u,request:l},h=JA(a,d,fm,hm),f=1,{data:p}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:i,repo:o,run_id:n,per_page:R3,page:f}),C=Math.ceil(p.total_count/R3),m=p.total_count;m>D3&&(at(`Workflow run ${n} has ${m} artifacts, exceeding the limit of ${D3}. Results will be incomplete as only the first ${D3} artifacts will be returned`),C=rEr);for(let I of p.artifacts)c.push({name:I.name,id:I.id,size:I.size_in_bytes,createdAt:I.created_at?new Date(I.created_at):void 0,digest:I.digest});for(f++,f;f<=C;f++){Y(`Fetching page ${f} of artifact list`);let{data:I}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:i,repo:o,run_id:n,per_page:R3,page:f});for(let Q of I.artifacts)c.push({name:Q.name,id:Q.id,size:Q.size_in_bytes,createdAt:Q.created_at?new Date(Q.created_at):void 0,digest:Q.digest})}return A&&(c=sKe(c)),te(`Found ${c.length} artifact(s)`),{artifacts:c}})}function rKe(){return eKe(this,arguments,void 0,function*(t=!1){let e=ol(),{workflowRunBackendId:r,workflowJobRunBackendId:s}=il(),n={workflowRunBackendId:r,workflowJobRunBackendId:s},o=(yield e.ListArtifacts(n)).artifacts.map(a=>{var A;return{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?ti.toDate(a.createdAt):void 0,digest:(A=a.digest)===null||A===void 0?void 0:A.value}});return t&&(o=sKe(o)),te(`Found ${o.length} artifact(s)`),{artifacts:o}})}function sKe(t){t.sort((s,n)=>n.id-s.id);let e=[],r=new Set;for(let s of t)r.has(s.name)||(e.push(s),r.add(s.name));return e}var TD=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(u){try{c(s.next(u))}catch(l){o(l)}}function A(u){try{c(s.throw(u))}catch(l){o(l)}}function c(u){u.done?i(u.value):n(u.value).then(a,A)}c((s=s.apply(t,e||[])).next())})},sEr=function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,s=Object.getOwnPropertySymbols(t);n<s.length;n++)e.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(t,s[n])&&(r[s[n]]=t[s[n]]);return r},SQ=class{uploadArtifact(e,r,s,n){return TD(this,void 0,void 0,function*(){try{if(NB())throw new Of;return $7e(e,r,s,n)}catch(i){throw at(`Artifact upload failed with error: ${i}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions is operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),i}})}downloadArtifact(e,r){return EP(this,void 0,void 0,function*(){try{if(ix())throw new lI;if(r?.findBy){let{findBy:{repositoryOwner:n,repositoryName:s,token:i}}=r,o=syn(r,["findBy"]);return BFt(e,n,s,i,o)}return QFt(e,r)}catch(n){throw tr(`Download Artifact failed with error: ${n}.
|
||||
If the error persists, please check whether Actions is operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),i}})}downloadArtifact(e,r){return TD(this,void 0,void 0,function*(){try{if(NB())throw new Of;if(r?.findBy){let{findBy:{repositoryOwner:s,repositoryName:n,token:i}}=r,o=sEr(r,["findBy"]);return Hje(e,s,n,i,o)}return Gje(e,r)}catch(s){throw at(`Download Artifact failed with error: ${s}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}listArtifacts(e){return EP(this,void 0,void 0,function*(){try{if(ix())throw new lI;if(e?.findBy){let{findBy:{workflowRunId:r,repositoryOwner:n,repositoryName:s,token:i}}=e;return vFt(r,n,s,i,e?.latest)}return LFt(e?.latest)}catch(r){throw tr(`Listing Artifacts failed with error: ${r}.
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),s}})}listArtifacts(e){return TD(this,void 0,void 0,function*(){try{if(NB())throw new Of;if(e?.findBy){let{findBy:{workflowRunId:r,repositoryOwner:s,repositoryName:n,token:i}}=e;return tKe(r,s,n,i,e?.latest)}return rKe(e?.latest)}catch(r){throw at(`Listing Artifacts failed with error: ${r}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),r}})}getArtifact(e,r){return EP(this,void 0,void 0,function*(){try{if(ix())throw new lI;if(r?.findBy){let{findBy:{workflowRunId:n,repositoryOwner:s,repositoryName:i,token:o}}=r;return HK(e,n,s,i,o)}return xFt(e)}catch(n){throw tr(`Get Artifact failed with error: ${n}.
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),r}})}getArtifact(e,r){return TD(this,void 0,void 0,function*(){try{if(NB())throw new Of;if(r?.findBy){let{findBy:{workflowRunId:s,repositoryOwner:n,repositoryName:i,token:o}}=r;return N3(e,s,n,i,o)}return Kje(e)}catch(s){throw at(`Get Artifact failed with error: ${s}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}deleteArtifact(e,r){return EP(this,void 0,void 0,function*(){try{if(ix())throw new lI;if(r?.findBy){let{findBy:{repositoryOwner:n,repositoryName:s,workflowRunId:i,token:o}}=r;return kFt(e,i,n,s,o)}return FFt(e)}catch(n){throw tr(`Delete Artifact failed with error: ${n}.
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),s}})}deleteArtifact(e,r){return TD(this,void 0,void 0,function*(){try{if(NB())throw new Of;if(r?.findBy){let{findBy:{repositoryOwner:s,repositoryName:n,workflowRunId:i,token:o}}=r;return Xje(e,i,s,n,o)}return $je(e)}catch(s){throw at(`Delete Artifact failed with error: ${s}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}};var MAs=new QT;import*as Fxe from"path";import Mxe from"fs";var iyn="dependency-graph_";async function PFt(t){let e=t.getDependencyGraphOption();if(e==="disabled"){qi("GITHUB_DEPENDENCY_GRAPH_ENABLED","false");return}if(e==="download-and-submit"){IA("DEPENDENCY_GRAPH_REPORT_DIR",t.getReportDirectory()),await oyn(t);return}pe("Enabling dependency graph generation"),qi("GITHUB_DEPENDENCY_GRAPH_ENABLED","true"),IA("GITHUB_DEPENDENCY_GRAPH_CONTINUE_ON_FAILURE",t.getDependencyGraphContinueOnFailure()),IA("GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR",t.getJobCorrelator()),IA("GITHUB_DEPENDENCY_GRAPH_JOB_ID",Qo.runId.toString()),IA("GITHUB_DEPENDENCY_GRAPH_REF",Qo.ref),IA("GITHUB_DEPENDENCY_GRAPH_SHA",myn()),IA("GITHUB_DEPENDENCY_GRAPH_WORKSPACE",bC()),IA("DEPENDENCY_GRAPH_REPORT_DIR",t.getReportDirectory()),IA("DEPENDENCY_GRAPH_EXCLUDE_PROJECTS",t.getExcludeProjects()),IA("DEPENDENCY_GRAPH_INCLUDE_PROJECTS",t.getIncludeProjects()),IA("DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS",t.getExcludeConfigurations()),IA("DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS",t.getIncludeConfigurations()),IA("GRADLE_PLUGIN_REPOSITORY_URL",t.getPluginRepository().getUrl()),IA("GRADLE_PLUGIN_REPOSITORY_USERNAME",t.getPluginRepository().getUsername()),IA("GRADLE_PLUGIN_REPOSITORY_PASSWORD",t.getPluginRepository().getPassword())}function IA(t,e){process.env[t]||e!==void 0&&qi(t,e)}async function oyn(t){if(Eyn()){pe("Dependency graph not supported in the ACT environment.");return}try{await cyn(await ayn(t))}catch(e){fyn(t,"download-and-submit",e)}}async function ayn(t){let e=Qo.payload.workflow_run?{token:O6(),workflowRunId:Qo.payload.workflow_run.id,repositoryName:Qo.repo.repo,repositoryOwner:Qo.repo.owner}:void 0,r=new QT,n=(await r.listArtifacts({latest:!0,findBy:e})).artifacts.filter(i=>i.name.startsWith(iyn)),s=t.getDownloadArtifactName();s&&(pe(`Filtering for artifacts ending with ${s}`),n=n.filter(i=>i.name.includes(s)));for(let i of n){let o=await r.downloadArtifact(i.id,{findBy:e});pe(`Downloading dependency-graph artifact ${i.name} to ${o.downloadPath}`)}return Ayn()}async function Ayn(){let r=(await(await iC(`${dyn()}/**/*.json`)).glob()).filter(n=>!hyn(n));return r.forEach(gyn),pe(`Found dependency graph files: ${r.join(", ")}`),r}async function cyn(t){if(t.length===0){pe("No dependency graph files found to submit.");return}for(let e of t)try{await lyn(e)}catch(r){throw r instanceof Error&&r.name==="HttpError"&&(r.message=uyn(e,r)),r}}function uyn(t,e){let n=`Dependency submission failed for ${_Ft(t)}.
|
||||
${e.message}`;return e.message==="Resource not accessible by integration"?`${n}
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),s}})}};var S7r=new SQ;import*as Loe from"path";import _oe from"fs";var nEr="dependency-graph_";async function nKe(t){let e=t.getDependencyGraphOption();if(e==="disabled"){Dn("GITHUB_DEPENDENCY_GRAPH_ENABLED","false");return}if(e==="download-and-submit"){Ui("DEPENDENCY_GRAPH_REPORT_DIR",t.getReportDirectory()),await iEr(t);return}te("Enabling dependency graph generation"),Dn("GITHUB_DEPENDENCY_GRAPH_ENABLED","true"),Ui("GITHUB_DEPENDENCY_GRAPH_CONTINUE_ON_FAILURE",t.getDependencyGraphContinueOnFailure()),Ui("GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR",t.getJobCorrelator()),Ui("GITHUB_DEPENDENCY_GRAPH_JOB_ID",ji.runId.toString()),Ui("GITHUB_DEPENDENCY_GRAPH_REF",ji.ref),Ui("GITHUB_DEPENDENCY_GRAPH_SHA",pEr()),Ui("GITHUB_DEPENDENCY_GRAPH_WORKSPACE",rf()),Ui("DEPENDENCY_GRAPH_REPORT_DIR",t.getReportDirectory()),Ui("DEPENDENCY_GRAPH_EXCLUDE_PROJECTS",t.getExcludeProjects()),Ui("DEPENDENCY_GRAPH_INCLUDE_PROJECTS",t.getIncludeProjects()),Ui("DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS",t.getExcludeConfigurations()),Ui("DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS",t.getIncludeConfigurations()),Ui("GRADLE_PLUGIN_REPOSITORY_URL",t.getPluginRepository().getUrl()),Ui("GRADLE_PLUGIN_REPOSITORY_USERNAME",t.getPluginRepository().getUsername()),Ui("GRADLE_PLUGIN_REPOSITORY_PASSWORD",t.getPluginRepository().getPassword())}function Ui(t,e){process.env[t]||e!==void 0&&Dn(t,e)}async function iEr(t){if(EEr()){te("Dependency graph not supported in the ACT environment.");return}try{await AEr(await oEr(t))}catch(e){fEr(t,"download-and-submit",e)}}async function oEr(t){let e=ji.payload.workflow_run?{token:zU(),workflowRunId:ji.payload.workflow_run.id,repositoryName:ji.repo.repo,repositoryOwner:ji.repo.owner}:void 0,r=new SQ,s=(await r.listArtifacts({latest:!0,findBy:e})).artifacts.filter(i=>i.name.startsWith(nEr)),n=t.getDownloadArtifactName();n&&(te(`Filtering for artifacts ending with ${n}`),s=s.filter(i=>i.name.includes(n)));for(let i of s){let o=await r.downloadArtifact(i.id,{findBy:e});te(`Downloading dependency-graph artifact ${i.name} to ${o.downloadPath}`)}return aEr()}async function aEr(){let r=(await(await Qk(`${lEr()}/**/*.json`)).glob()).filter(s=>!dEr(s));return r.forEach(hEr),te(`Found dependency graph files: ${r.join(", ")}`),r}async function AEr(t){if(t.length===0){te("No dependency graph files found to submit.");return}for(let e of t)try{await uEr(e)}catch(r){throw r instanceof Error&&r.name==="HttpError"&&(r.message=cEr(e,r)),r}}function cEr(t,e){let s=`Dependency submission failed for ${iKe(t)}.
|
||||
${e.message}`;return e.message==="Resource not accessible by integration"?`${s}
|
||||
Please ensure that the 'contents: write' permission is available for the workflow job.
|
||||
Note that this permission is never available for a 'pull_request' trigger from a repository fork.
|
||||
`:n}async function lyn(t){let e=pyn(),r=Mxe.readFileSync(t,"utf8"),n=JSON.parse(r);n.owner=Qo.repo.owner,n.repo=Qo.repo.repo;let s=await e.request("POST /repos/{owner}/{repo}/dependency-graph/snapshots",n),i=_Ft(t);oPe(`Submitted ${i}: ${s.data.message}`)}function dyn(){return process.env.DEPENDENCY_GRAPH_REPORT_DIR}function hyn(t){let e=`${t}.processed`;return Mxe.existsSync(e)}function gyn(t){let e=`${t}.processed`;Mxe.writeFileSync(e,"")}function fyn(t,e,r){if(!t.getDependencyGraphContinueOnFailure())throw new KQ(r);tr(`Failed to ${e} dependency graph. Will continue.
|
||||
${String(r)}`)}function pyn(){return Hd(O6())}function _Ft(t){let e=bC();return Fxe.relative(e,t)}function myn(){let t=Qo;return["pull_request","pull_request_comment","pull_request_review","pull_request_review_comment"].includes(t.eventName)?t.payload.pull_request.head.sha:t.sha}function Eyn(){return process.env.ACT!==void 0}async function Iyn(){try{oM()==="gradle/gradle-build-action"&&M6("The action `gradle/gradle-build-action` has been replaced by `gradle/actions/setup-gradle`"),Ust("gradle/actions/setup-gradle"),await bIt(new GR,new qd,new _6),await PFt(new L6);let t=new P6;t.verifyNoArguments(),await ffe(t.getGradleVersion()),Mst()}catch(t){QIt(t)}process.exit()}Iyn();export{Iyn as run};
|
||||
`:s}async function uEr(t){let e=gEr(),r=_oe.readFileSync(t,"utf8"),s=JSON.parse(r);s.owner=ji.repo.owner,s.repo=ji.repo.repo;let n=await e.request("POST /repos/{owner}/{repo}/dependency-graph/snapshots",s),i=iKe(t);gpe(`Submitted ${i}: ${n.data.message}`)}function lEr(){return process.env.DEPENDENCY_GRAPH_REPORT_DIR}function dEr(t){let e=`${t}.processed`;return _oe.existsSync(e)}function hEr(t){let e=`${t}.processed`;_oe.writeFileSync(e,"")}function fEr(t,e,r){if(!t.getDependencyGraphContinueOnFailure())throw new FE(r);at(`Failed to ${e} dependency graph. Will continue.
|
||||
${String(r)}`)}function gEr(){return JA(zU())}function iKe(t){let e=rf();return Loe.relative(e,t)}function pEr(){let t=ji;return["pull_request","pull_request_comment","pull_request_review","pull_request_review_comment"].includes(t.eventName)?t.payload.pull_request.head.sha:t.sha}function EEr(){return process.env.ACT!==void 0}async function CEr(){try{wS()==="gradle/gradle-build-action"&&HU("The action `gradle/gradle-build-action` has been replaced by `gradle/actions/setup-gradle`"),yxe("gradle/actions/setup-gradle"),await N4e(new hI,new oc,new JU),await nKe(new YU);let t=new VU;t.verifyNoArguments(),await $te(t.getGradleVersion()),Bxe()}catch(t){b4e(t)}process.exit()}CEr();export{CEr as run};
|
||||
/*! Bundled license information:
|
||||
|
||||
undici/lib/web/fetch/body.js:
|
||||
undici/lib/fetch/body.js:
|
||||
undici/lib/web/fetch/body.js:
|
||||
undici/lib/web/fetch/body.js:
|
||||
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
||||
|
||||
undici/lib/web/websocket/frame.js:
|
||||
undici/lib/websocket/frame.js:
|
||||
undici/lib/web/websocket/frame.js:
|
||||
undici/lib/web/websocket/frame.js:
|
||||
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
||||
|
||||
Reference in new issue
Block a user