Merge pull request #514 from crazy-max/subaction-matrix-typescript

move the matrix subaction to TypeScript
This commit is contained in:
CrazyMax authored and GitHub committed 2026-09-17 15:56:34 +02:00
commit b5f81af00e
15 files changed
+313 -90

No files matched your search

+3 -1
View File
@@ -19,7 +19,9 @@ updates:
- "dependencies"
- "bot"
- package-ecosystem: "npm"
directory: "/"
directories:
- "/"
- "/subaction/matrix"
schedule:
interval: "daily"
cooldown:
+2 -2
View File
@@ -44,12 +44,12 @@ jobs:
-
name: Commit and push dist
run: |
if [ -n "$(git status --porcelain -- dist)" ]; then
if [ -n "$(git status --porcelain -- dist subaction/matrix/dist)" ]; then
(
set -x
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add dist
git add dist subaction/matrix/dist
git commit -m "[dependabot skip] chore: update generated content"
git push
)
+6 -4
View File
@@ -40,10 +40,12 @@ RUN --mount=target=/context \
--mount=type=cache,target=/src/node_modules <<EOT
set -e
rsync -a /context/. .
rm -rf dist
yarn run build
rm -rf dist subaction/matrix/dist
yarn workspaces foreach --all run build
mkdir /out
cp -r dist /out
mkdir -p /out/subaction/matrix
cp -r subaction/matrix/dist /out/subaction/matrix
EOT
FROM scratch AS build-update
@@ -55,9 +57,9 @@ RUN --mount=target=/context \
set -e
rsync -a /context/. .
git add -A
rm -rf dist
rm -rf dist subaction/matrix/dist
cp -rf /out/* .
if [ -n "$(git status --porcelain -- dist)" ]; then
if [ -n "$(git status --porcelain -- dist subaction/matrix/dist)" ]; then
echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'
git status --porcelain -- dist
exit 1
Generated Vendored
+3 -2
View File
@@ -2629,11 +2629,12 @@ END OF TERMS AND CONDITIONS
-----------
The following npm package may be included in this product:
The following npm packages may be included in this product:
- @sigstore/verify@4.1.2
- docker-buildx-bake-matrix@unknown
This package contains the following license:
These packages each contain the following license:
Apache-2.0
+1 -1
View File
@@ -8,7 +8,7 @@ import eslintPluginPrettier from 'eslint-plugin-prettier';
export default defineConfig([
{
ignores: ['.yarn/**/*', 'coverage/**/*', 'dist/**/*']
ignores: ['.yarn/**/*', 'coverage/**/*', 'dist/**/*', 'subaction/matrix/dist/**/*']
},
js.configs.recommended,
...tseslint.configs['flat/recommended'],
+3
View File
@@ -10,6 +10,9 @@
"test": "vitest run",
"license": "generate-license-file --input package.json --output dist/licenses.txt --overwrite --ci --no-spinner --eol lf"
},
"workspaces": [
"subaction/matrix"
],
"repository": {
"type": "git",
"url": "git+https://github.com/docker/bake-action.git"
+2 -77
View File
@@ -20,82 +20,7 @@ inputs:
outputs:
matrix:
description: Matrix configuration
value: ${{ steps.generate.outputs.includes }}
runs:
using: composite
steps:
-
name: Generate
id: generate
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
INPUT_WORKDIR: ${{ inputs.workdir }}
INPUT_FILES: ${{ inputs.files }}
INPUT_TARGET: ${{ inputs.target }}
INPUT_FIELDS: ${{ inputs.fields }}
with:
script: |
function getInputList(name) {
return core.getInput(name) ? core.getInput(name).split(/[\r?\n,]+/).filter(x => x !== '') : [];
}
const workdir = core.getInput('workdir');
const files = getInputList('files');
const target = core.getInput('target');
const fields = getInputList('fields');
let def = {};
await core.group(`Parsing definition`, async () => {
let args = ['buildx', 'bake'];
for (const file of files) {
args.push('--file', file);
}
if (target) {
args.push(target);
}
args.push('--print');
const res = await exec.getExecOutput('docker', args, {
ignoreReturnCode: true,
silent: true,
cwd: workdir
});
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr);
}
def = JSON.parse(res.stdout.trim());
core.info(JSON.stringify(def, null, 2));
});
await core.group(`Generating matrix`, async () => {
const result = [];
for (const targetName of Object.keys(def.target)) {
const target = def.target[targetName];
const entry = { target: targetName };
if (fields.length === 0) {
result.push({ ...entry });
continue;
}
let fieldFound = false;
Object.keys(target).forEach(field => {
if (fields.includes(field)) {
fieldFound = true;
const value = target[field];
if (Array.isArray(value)) {
value.forEach((v) => {
entry[field] = v;
result.push({ ...entry });
});
} else {
entry[field] = value;
result.push({ ...entry });
}
}
});
if (!fieldFound) {
result.push({ ...entry });
}
}
core.info(JSON.stringify(result, null, 2));
core.setOutput('includes', JSON.stringify(result));
});
using: 'node24'
main: 'dist/index.cjs'
+159
View File
@@ -0,0 +1,159 @@
var UX=Object.create;var Om=Object.defineProperty;var qX=Object.getOwnPropertyDescriptor;var GX=Object.getOwnPropertyNames;var HX=Object.getPrototypeOf,zX=Object.prototype.hasOwnProperty;var o=(t,e)=>Om(t,"name",{value:e,configurable:!0});var f=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),VX=(t,e)=>{for(var r in e)Om(t,r,{get:e[r],enumerable:!0})},YX=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of GX(e))!zX.call(t,n)&&n!==r&&Om(t,n,{get:()=>e[n],enumerable:!(s=qX(e,n))||s.enumerable});return t};var w=(t,e,r)=>(r=t!=null?UX(HX(t)):{},YX(e||!t||!t.__esModule?Om(r,"default",{value:t,enumerable:!0}):r,t));var l_=f(Lc=>{"use strict";var SLe=require("net"),jX=require("tls"),fB=require("http"),o_=require("https"),KX=require("events"),RLe=require("assert"),XX=require("util");Lc.httpOverHttp=ZX;Lc.httpsOverHttp=eZ;Lc.httpOverHttps=tZ;Lc.httpsOverHttps=rZ;function ZX(t){var e=new Bi(t);return e.request=fB.request,e}o(ZX,"httpOverHttp");function eZ(t){var e=new Bi(t);return e.request=fB.request,e.createSocket=a_,e.defaultPort=443,e}o(eZ,"httpsOverHttp");function tZ(t){var e=new Bi(t);return e.request=o_.request,e}o(tZ,"httpOverHttps");function rZ(t){var e=new Bi(t);return e.request=o_.request,e.createSocket=a_,e.defaultPort=443,e}o(rZ,"httpsOverHttps");function Bi(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||fB.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(s,n,i,a){for(var c=c_(n,i,a),l=0,u=e.requests.length;l<u;++l){var A=e.requests[l];if(A.host===c.host&&A.port===c.port){e.requests.splice(l,1),A.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)},"onFree"))}o(Bi,"TunnelingAgent");XX.inherits(Bi,KX.EventEmitter);Bi.prototype.addRequest=o(function(e,r,s,n){var i=this,a=gB({request:e},i.options,c_(r,s,n));if(i.sockets.length>=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);function l(){i.emit("free",c,a)}o(l,"onFree");function u(A){i.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}o(u,"onCloseOrRemove")})},"addRequest");Bi.prototype.createSocket=o(function(e,r){var s=this,n={};s.sockets.push(n);var i=gB({},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")),po("making CONNECT request");var a=s.request(i);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",A),a.end();function c(d){d.upgrade=!0}o(c,"onResponse");function l(d,p,m){process.nextTick(function(){u(d,p,m)})}o(l,"onUpgrade");function u(d,p,m){if(a.removeAllListeners(),p.removeAllListeners(),d.statusCode!==200){po("tunneling socket could not be established, statusCode=%d",d.statusCode),p.destroy();var h=new Error("tunneling socket could not be established, statusCode="+d.statusCode);h.code="ECONNRESET",e.request.emit("error",h),s.removeSocket(n);return}if(m.length>0){po("got illegal response body from proxy"),p.destroy();var h=new Error("got illegal response body from proxy");h.code="ECONNRESET",e.request.emit("error",h),s.removeSocket(n);return}return po("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=p,r(p)}o(u,"onConnect");function A(d){a.removeAllListeners(),po(`tunneling socket could not be established, cause=%s
`,d.message,d.stack);var p=new Error("tunneling socket could not be established, cause="+d.message);p.code="ECONNRESET",e.request.emit("error",p),s.removeSocket(n)}o(A,"onError")},"createSocket");Bi.prototype.removeSocket=o(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var s=this.requests.shift();s&&this.createSocket(s,function(n){s.request.onSocket(n)})}},"removeSocket");function a_(t,e){var r=this;Bi.prototype.createSocket.call(r,t,function(s){var n=t.request.getHeader("host"),i=gB({},r.options,{socket:s,servername:n?n.replace(/:.*$/,""):t.host}),a=jX.connect(0,i);r.sockets[r.sockets.indexOf(s)]=a,e(a)})}o(a_,"createSecureSocket");function c_(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}o(c_,"toOptions");function gB(t){for(var e=1,r=arguments.length;e<r;++e){var s=arguments[e];if(typeof s=="object")for(var n=Object.keys(s),i=0,a=n.length;i<a;++i){var c=n[i];s[c]!==void 0&&(t[c]=s[c])}}return t}o(gB,"mergeOptions");var po;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?po=o(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):po=o(function(){},"debug");Lc.debug=po});var AA=f((PLe,u_)=>{u_.exports=l_()});var ze=f((kLe,A_)=>{A_.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 Ie=f((DLe,L_)=>{"use strict";var d_=Symbol.for("undici.error.UND_ERR"),Ve=class extends Error{static{o(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[d_]===!0}[d_]=!0},p_=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),EB=class extends Ve{static{o(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[p_]===!0}[p_]=!0},m_=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),yB=class extends Ve{static{o(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[m_]===!0}[m_]=!0},h_=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),CB=class extends Ve{static{o(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[h_]===!0}[h_]=!0},f_=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),IB=class extends Ve{static{o(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"} Line truncated
`)||t.includes("\r")||t.includes("\0"))===!1}o(WL,"isValidHeaderValue");function Eee(t,e){let{headersList:r}=e,s=(r.get("referrer-policy",!0)??"").split(","),n="";if(s.length>0)for(let i=s.length;i!==0;i--){let a=s[i-1].trim();if(ree.has(a)){n=a;break}}n!==""&&(t.referrerPolicy=n)}o(Eee,"setRequestReferrerPolicyOnRedirect");function yee(){return"allowed"}o(yee,"crossOriginResourcePolicyCheck");function Cee(){return"success"}o(Cee,"corsCheck");function Iee(){return"success"}o(Iee,"TAOCheck");function Bee(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}o(Bee,"appendFetchMetadata");function wee(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&&pw(t.origin)&&!pw(IA(t))&&(e=null);break;case"same-origin":ch(t,IA(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}o(wee,"appendRequestOriginHeader");function Yc(t,e){return t}o(Yc,"coarsenTime");function bee(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:Yc(t.domainLookupStartTime,r),domainLookupEndTime:Yc(t.domainLookupEndTime,r),connectionStartTime:Yc(t.connectionStartTime,r),connectionEndTime:Yc(t.connectionEndTime,r),secureConnectionStartTime:Yc(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}o(bee,"clampAndCoarsenConnectionTimingInfo");function Qee(t){return Yc(aee.now(),t)}o(Qee,"coarsenedSharedCurrentTime");function xee(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}o(xee,"createOpaqueTimingInfo");function jL(){return{referrerPolicy:"strict-origin-when-cross-origin"}}o(jL,"makePolicyContainer");function Nee(t){return{referrerPolicy:t.referrerPolicy}}o(Nee,"clonePolicyContainer");function See(t){let e=t.referrerPolicy;pa(e);let r=null;if(t.referrer==="client"){let c=zL();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let s=dw(r),n=dw(r,!0);s.toString().length>4096&&(s=n);let i=ch(t,s),a=CA(s)&&!CA(t.url);switch(e){case"origin":return n??dw(r,!0);case"unsafe-url":return s;case"same-origin":return i?n:"no-referrer";case"origin-when-cross-origin":return i?s:n;case"strict-origin-when-cross-origin":{let c=IA(t);return ch(s,c)?s:CA(s)&&!CA(c)?"no-referrer":n}default:return a?"no-referrer":n}}o(See,"determineRequestsReferrer");function dw(t,e){return pa(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}o(dw,"stripURLForReferrer");function CA(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let s=new URL(r);return!!(s.protocol==="https:"||s.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(s.hostname)||s.hostname==="localhost"||s.hostname.includes("localhost.")||s.hostname.endsWith(".localhost"))}}o(CA,"isURLPotentiallyTrustworthy");function Ree(t,e){if(ah===void 0)return!0;let r=KL(e);if(r==="no metadata"||r.length===0)return!0;let s=vee(r),n=Pee(r,s);for(let i of n){let a=i.algo,c=i.hash,l=ah.createHash(a).update(t).digest("base64");if(l[l.length-1]==="="&&(l[l.length-2]==="="?l=l.slice(0,-2):l=l.slice(0,-1)),kee(l,c))return!0}return!1}o(Ree,"bytesMatch");var Tee=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function KL(t){let e=[],r=!0;for(let s of t.split(" ")){r=!1;let n=Tee.exec(s);if(n===null||n.groups===void 0||n.groups.algo===void 0)continue;let i=n.groups.algo.toLowerCase();YL.includes(i)&&e.push(n.groups)}return r===!0?"no metadata":e}o(KL,"parseMetadata");function vee(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let s=t[r];if(s.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;s.algo[3]==="3"&&(e="sha384")}}return e}o(vee,"getStrongestMetadata");function Pee(t,e){if(t.length===1)return t;let r=0;for(let s=0;s<t.length;++s)t[s].algo===e&&(t[r++]=t[s]);return t.length=r,t}o(Pee,"filterMetadataListByAlgorithm");function kee(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}o(kee,"compareBase64Mixed");function Dee(t){}o(Dee,"tryUpgradeReque Line truncated
`);function fte(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}o(fte,"isAsciiString");function gte(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let s=t.charCodeAt(r);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||s===39||s===45||s===95))return!1}return!0}o(gte,"validateBoundary");function Ete(t,e){uh(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let s=Buffer.from(`--${r}`,"utf8"),n=[],i={position:0};for(;t[i.position]===13&&t[i.position+1]===10;)i.position+=2;let a=t.length;for(;t[a-1]===10&&t[a-2]===13;)a-=2;for(a!==t.length&&(t=t.subarray(0,a));;){if(t.subarray(i.position,i.position+s.length).equals(s))i.position+=s.length;else return"failure";if(i.position===t.length-2&&Ah(t,mte,i)||i.position===t.length-4&&Ah(t,hte,i))return n;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let c=yte(t,i);if(c==="failure")return"failure";let{name:l,filename:u,contentType:A,encoding:d}=c;i.position+=2;let p;{let h=t.indexOf(s.subarray(2),i.position);if(h===-1)return"failure";p=t.subarray(i.position,h-4),i.position+=p.length,d==="base64"&&(p=Buffer.from(p.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let m;u!==null?(A??="text/plain",fte(A)||(A=""),m=new dte([p],u,{type:A})):m=ate(Buffer.from(p)),uh(uM(l)),uh(typeof m=="string"&&uM(m)||lte(m)),n.push(ute(l,m,u))}}o(Ete,"multipartFormDataParser");function yte(t,e){let r=null,s=null,n=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:s,contentType:n,encoding:i};let a=Jc(c=>c!==10&&c!==13&&c!==58,t,e);if(a=Cw(a,!0,!0,c=>c===9||c===32),!cte.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,Jc(c=>c===32||c===9,t,e),ote(a)){case"content-disposition":{if(r=s=null,!Ah(t,pte,e)||(e.position+=17,r=pM(t,e),r===null))return"failure";if(Ah(t,dM,e)){let c=e.position+dM.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,s=pM(t,e),s===null))return"failure"}break}case"content-type":{let c=Jc(l=>l!==10&&l!==13,t,e);c=Cw(c,!1,!0,l=>l===9||l===32),n=AM(c);break}case"content-transfer-encoding":{let c=Jc(l=>l!==10&&l!==13,t,e);c=Cw(c,!1,!0,l=>l===9||l===32),i=AM(c);break}default:Jc(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}o(yte,"parseMultipartFormDataHeaders");function pM(t,e){uh(t[e.position-1]===34);let r=Jc(s=>s!==10&&s!==13&&s!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}o(pM,"parseMultipartFormDataName");function Jc(t,e,r){let s=r.position;for(;s<e.length&&t(e[s]);)++s;return e.subarray(r.position,r.position=s)}o(Jc,"collectASequenceOfBytes");function Cw(t,e,r,s){let n=0,i=t.length-1;if(e)for(;n<t.length&&s(t[n]);)n++;if(r)for(;i>0&&s(t[i]);)i--;return n===0&&i===t.length-1?t:t.subarray(n,i+1)}o(Cw,"removeChars");function Ah(t,e,r){if(t.length<e.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[r.position+s])return!1;return!0}o(Ah,"bufferStartsWith");mM.exports={multipartFormDataParser:Ete,validateBoundary:gte}});var Kc=f((CMe,QM)=>{"use strict";var bA=de(),{ReadableStreamFrom:Cte,isBlobLike:fM,isReadableStreamLike:Ite,readableStreamClose:Bte,createDeferredPromise:wte,fullyReadBody:bte,extractMimeType:Qte,utf8DecodeBytes:yM}=Hr(),{FormData:gM}=wA(),{kState:jc}=mo(),{webidl:xte}=qt(),{Blob:Nte}=require("node:buffer"),Iw=require("node:assert"),{isErrored:CM,isDisturbed:Ste}=require("node:stream"),{isArrayBuffer:Rte}=require("node:util/types"),{serializeAMimeType:Tte}=Ir(),{multipartFormDataParser:vte}=hM(),Bw;try{let t=require("node:crypto");Bw=o(e=>t.randomInt(0,e),"random")}catch{Bw=o(t=>Math.floor(Math.random(t)),"random")}var dh=new TextEncoder;function Pte(){}o(Pte,"noop");var IM=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,BM;IM&&(BM=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!Ste(e)&&!CM(e)&&e.cancel("Response object has been garbage collected").catch(Pte)}));function wM(t,e=!1){let r=null;t instanceof ReadableStream?r=t:fM(t)?r=t.stream():r=new ReadableStream({async pull(l){let u=typeof n=="string"?dh.encode(n):n;u.byteLength&&l.enqueue(u),queueMicrotask(()=>Bte(l))},start(){},type:"bytes"}),Iw(Ite(r));let s=null,n=null,i=null,a=null;if(typeof t=="string")n=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)n=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(Rte(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(bA.isFormDataLike(t)){let l=`----formdata-undici-0${`${Bw(1e11)}`.padStart(11,"0")}`,u=`--${l}\r
Content-Disposition: form-data`;let A=o(C=>C.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),d=o(C=>C.replace(/\r?\n|\r/g,`\r
`),"normalizeLinefeeds"),p=[],m=new Uint8Array([13,10]);i=0;let h=!1;for(let[C,E]of t)if(typeof E=="string"){let y=dh.encode(u+`; name="${A(d(C))}"\r
\r
${d(E)}\r
`);p.push(y),i+=y.byteLength}else{let y=dh.encode(`${u}; name="${A(d(C))}"`+(E.name?`; filename="${A(E.name)}"`:"")+`\r
Content-Type: ${E.type||"application/octet-stream"}\r
\r
`);p.push(y,E,m),typeof E.size=="number"?i+=y.byteLength+E.size+m.byteLength:h=!0}let g=dh.encode(`--${l}--\r
`);p.push(g),i+=g.byteLength,h&&(i=null),n=t,s=o(async function*(){for(let C of p)C.stream?yield*C.stream():yield C},"action"),a=`multipart/form-data; boundary=${l}`}else if(fM(t))n=t,i=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(bA.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Cte(t)}if((typeof n=="string"||bA.isBuffer(n))&&(i=Buffer.byteLength(n)),s!=null){let l;r=new ReadableStream({async start(){l=s(t)[Symbol.asyncIterator]()},async pull(u){let{value:A,done:d}=await l.next();if(d)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!CM(r)){let p=new Uint8Array(A);p.byteLength&&u.enqueue(p)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:n,length:i},a]}o(wM,"extractBody");function kte(t,e=!1){return t instanceof ReadableStream&&(Iw(!bA.isDisturbed(t),"The body has already been consumed."),Iw(!t.locked,"The stream is locked.")),wM(t,e)}o(kte,"safelyExtractBody");function Dte(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}o(Dte,"cloneBody");function _te(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(_te,"throwIfAborted");function Lte(t){return{blob(){return Wc(this,r=>{let s=EM(this);return s===null?s="":s&&(s=Tte(s)),new Nte([r],{type:s})},t)},arrayBuffer(){return Wc(this,r=>new Uint8Array(r).buffer,t)},text(){return Wc(this,yM,t)},json(){return Wc(this,Fte,t)},formData(){return Wc(this,r=>{let s=EM(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=vte(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new gM;return i[jc]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new gM;for(let[a,c]of n)i.append(a,c);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Wc(this,r=>new Uint8Array(r),t)}}}o(Lte,"bodyMixinMethods");function Mte(t){Object.assign(t.prototype,Lte(t))}o(Mte,"mixinBody");async function Wc(t,e,r){if(xte.brandCheck(t,r),bM(t))throw new TypeError("Body is unusable: Body has already been read");_te(t[jc]);let s=wte(),n=o(a=>s.reject(a),"errorSteps"),i=o(a=>{try{s.resolve(e(a))}catch(c){n(c)}},"successSteps");return t[jc].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await bte(t[jc].body,i,n),s.promise)}o(Wc,"consumeBody");function bM(t){let e=t[jc].body;return e!=null&&(e.stream.locked||bA.isDisturbed(e.stream))}o(bM,"bodyUnusable");function Fte(t){return JSON.parse(yM(t))}o(Fte,"parseJSONFromBytes");function EM(t){let e=t[jc].headersList,r=Qte(e);return r==="failure"?null:r}o(EM,"bodyMimeType");QM.exports={extractBody:wM,safelyExtractBody:kte,cloneBody:Dte,mixinBody:Mte,streamRegistry:BM,hasFinalizationRegistry:IM,bodyUnusable:bM}});var qM=f((BMe,UM)=>{"use strict";var J=require("node:assert"),K=de(),{channels:xM}=Fc(),ww=nw(),{RequestContentLengthMismatchError:ma,ResponseContentLengthMismatchError:NM,RequestAbortedError:_M,InvalidArgumentError:Ote,HeadersTimeoutError:Ute,HeadersOverflowError:qte,SocketError:Xc,InformationalError:Zc,BodyTimeoutError:Gte,HTTPParserError:Hte,ResponseExceededMaxSizeError:zte}=Ie(),{kUrl:LM,kReset:Br,kClient:fh,kParser:Fe,kBlocking:NA,kRunning:yt,kPending:MM,kSize:SM,kWriting:ho,kQueue:js,kNoRef:QA,kKeepAliveDefaultTimeout:Vte,kHostHeader:Yte,kPendingIdx:$te,kRunningIdx:Es,kError:sr,kPipelining:gh,kSocket:ha,kKeepAliveTimeoutValue:yh,kMaxHeadersSize:bw,kKeepAliveMaxTimeout:Jte,kKeepAliveTimeoutThreshold:Wte,kHeadersTimeout:jte,kBodyTimeout:Kte,kStrictContentLength:Nw,kMaxRequests:RM,kCounter:Xte,kMaxResponseSize:Zte,kOnError:TM,kResume:Si,kHTTPContext:FM}=ze(),zr=BL(),vM=Buffer.alloc(0),ph=Buffer[Symbol.species],mh=K.addListener,ere=K.removeAllListeners,fa=Symbol("kIdleSocketValidation"),el=Symbol("kIdleSocketValidationTimeout"),vw=Symbol("kSocketUsed"),Qw;async function tre(){let t=process.env.JEST_WORKER_ID?aw():void 0,e;try{e=await WebAssembly.compile(QL())}catch{e=await WebAssembly.compile(t||aw())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:o((r,s,n)=>0,"wasm_on_url"),wasm_on_status:o((r,s,n)=>{J(Ze.ptr===r);let i=s-xn+Qn.byteOffset;return Ze.onStatus(new ph(Qn.buffer,i,n))||0},"wasm_on_status"),wasm_on_message_begin:o(r=>(J(Ze.ptr===r),Ze.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:o((r,s,n)=>{J(Ze.ptr===r);let i=s-xn+Qn.byteOffset;return Ze.onHeaderField(new ph(Qn.buffer,i,n))||0},"wasm_on_header_field"),wasm_on_header_value:o((r,s,n)=>{J(Ze.ptr===r);let i=s-xn+Qn.byteOffset;return Ze.onHeaderValue(new ph(Qn.buffer,i,n))||0},"wasm_on_header_value"),wasm_on_headers_complete:o((r,s,n,i)=>(J(Ze.ptr===r),Ze.onHeadersComplete(s,!!n,!!i)||0),"wasm_on_headers_complete"),wasm_on_body:o((r,s,n)=>{J(Ze.ptr===r);let i=s-xn+Qn.byteOffset;return Ze.onBo Line truncated
`;if(typeof n=="string"?g+=`host: ${n}\r
`:g+=t[Yte],i?g+=`connection: upgrade\r
upgrade: ${i}\r
`:t[gh]&&!m[Br]?g+=`connection: keep-alive\r
`:g+=`connection: close\r
`,Array.isArray(u))for(let C=0;C<u.length;C+=2){let E=u[C+0],y=u[C+1];if(Array.isArray(y))for(let I=0;I<y.length;I++)g+=`${E}: ${y[I]}\r
`;else g+=`${E}: ${y}\r
`}return xM.sendHeaders.hasSubscribers&&xM.sendHeaders.publish({request:e,headers:g,socket:m}),!l||p===0?kM(h,null,t,e,m,A,g,d):K.isBuffer(l)?kM(h,l,t,e,m,A,g,d):K.isBlobLike(l)?typeof l.stream=="function"?DM(h,l.stream(),t,e,m,A,g,d):lre(h,l,t,e,m,A,g,d):K.isStream(l)?cre(h,l,t,e,m,A,g,d):K.isIterable(l)?DM(h,l,t,e,m,A,g,d):J(!1),!0}o(are,"writeH1");function cre(t,e,r,s,n,i,a,c){J(i!==0||r[yt]===0,"stream body cannot be pipelined");let l=!1,u=new Ch({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:c,header:a}),A=o(function(h){if(!l)try{!u.write(h)&&this.pause&&this.pause()}catch(g){K.destroy(this,g)}},"onData"),d=o(function(){l||e.resume&&e.resume()},"onDrain"),p=o(function(){if(queueMicrotask(()=>{e.removeListener("error",m)}),!l){let h=new _M;queueMicrotask(()=>m(h))}},"onClose"),m=o(function(h){if(!l){if(l=!0,J(n.destroyed||n[ho]&&r[yt]<=1),n.off("drain",d).off("error",m),e.removeListener("data",A).removeListener("end",m).removeListener("close",p),!h)try{u.end()}catch(g){h=g}u.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?K.destroy(e,h):K.destroy(e)}},"onFinished");e.on("data",A).on("end",m).on("error",m).on("close",p),e.resume&&e.resume(),n.on("drain",d).on("error",m),e.errorEmitted??e.errored?setImmediate(()=>m(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>m(null)),(e.closeEmitted??e.closed)&&setImmediate(p)}o(cre,"writeStream");function kM(t,e,r,s,n,i,a,c){try{e?K.isBuffer(e)&&(J(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${a}content-length: ${i}\r
\r
`,"latin1"),n.write(e),n.uncork(),s.onBodySent(e),!c&&s.reset!==!1&&(n[Br]=!0)):i===0?n.write(`${a}content-length: 0\r
\r
`,"latin1"):(J(i===null,"no body must not have content length"),n.write(`${a}\r
`,"latin1")),s.onRequestSent(),r[Si]()}catch(l){t(l)}}o(kM,"writeBuffer");async function lre(t,e,r,s,n,i,a,c){J(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new ma;let l=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${a}content-length: ${i}\r
\r
`,"latin1"),n.write(l),n.uncork(),s.onBodySent(l),s.onRequestSent(),!c&&s.reset!==!1&&(n[Br]=!0),r[Si]()}catch(l){t(l)}}o(lre,"writeBlob");async function DM(t,e,r,s,n,i,a,c){J(i!==0||r[yt]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let p=l;l=null,p()}}o(u,"onDrain");let A=o(()=>new Promise((p,m)=>{J(l===null),n[sr]?m(n[sr]):l=p}),"waitForDrain");n.on("close",u).on("drain",u);let d=new Ch({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:c,header:a});try{for await(let p of e){if(n[sr])throw n[sr];d.write(p)||await A()}d.end()}catch(p){d.destroy(p)}finally{n.off("close",u).off("drain",u)}}o(DM,"writeIterable");var Ch=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:s,contentLength:n,client:i,expectsPayload:a,header:c}){this.socket=r,this.request=s,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[ho]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[sr])throw r[sr];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(n!==null&&a+u>n){if(i[Nw])throw new ma;process.emitWarning(new ma)}r.cork(),a===0&&(!c&&s.reset!==!1&&(r[Br]=!0),n===null?r.write(`${l}transfer-encoding: chunked\r
`,"latin1"):r.write(`${l}content-length: ${n}\r
\r
`,"latin1")),n===null&&r.write(`\r
${u.toString(16)}\r
`,"latin1"),this.bytesWritten+=u;let A=r.write(e);return r.uncork(),s.onBodySent(e),A||r[Fe].timeout&&r[Fe].timeoutType===tl&&r[Fe].timeout.refresh&&r[Fe].timeout.refresh(),A}end(){let{socket:e,contentLength:r,client:s,bytesWritten:n,expectsPayload:i,header:a,request:c}=this;if(c.onRequestSent(),e[ho]=!1,e[sr])throw e[sr];if(!e.destroyed){if(n===0?i?e.write(`${a}content-length: 0\r
\r
`,"latin1"):e.write(`${a}\r
`,"latin1"):r===null&&e.write(`\r
0\r
\r
`,"latin1"),r!==null&&n!==r){if(s[Nw])throw new ma;process.emitWarning(new ma)}e[Fe].timeout&&e[Fe].timeoutType===tl&&e[Fe].timeout.refresh&&e[Fe].timeout.refresh(),s[Si]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[ho]=!1,e&&(J(s[yt]<=1,"pipeline should only contain this request"),n(e))}};UM.exports=sre});var WM=f((bMe,JM)=>{"use strict";var ys=require("node:assert"),{pipeline:ure}=require("node:stream"),fe=de(),{RequestContentLengthMismatchError:Pw,RequestAbortedError:GM,SocketError:SA,InformationalError:kw}=Ie(),{kUrl:Ih,kReset:wh,kClient:rl,kRunning:bh,kPending:Are,kQueue:fo,kPendingIdx:Dw,kRunningIdx:Ks,kError:Zs,kSocket:Dt,kStrictContentLength:dre,kOnError:_w,kMaxConcurrentStreams:$M,kHTTP2Session:Xs,kResume:go,kSize:pre,kHTTPContext:mre}=ze(),Ri=Symbol("open streams"),HM,zM=!1,Bh;try{Bh=require("node:http2")}catch{Bh={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:hre,HTTP2_HEADER_METHOD:fre,HTTP2_HEADER_PATH:gre,HTTP2_HEADER_SCHEME:Ere,HTTP2_HEADER_CONTENT_LENGTH:yre,HTTP2_HEADER_EXPECT:Cre,HTTP2_HEADER_STATUS:Ire}}=Bh;function Bre(t){let e=[];for(let[r,s]of Object.entries(t))if(Array.isArray(s))for(let n of s)e.push(Buffer.from(r),Buffer.from(n));else e.push(Buffer.from(r),Buffer.from(s));return e}o(Bre,"parseH2Headers");async function wre(t,e){t[Dt]=e,zM||(zM=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=Bh.connect(t[Ih],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[$M]});r[Ri]=0,r[rl]=t,r[Dt]=e,fe.addListener(r,"error",Qre),fe.addListener(r,"frameError",xre),fe.addListener(r,"end",Nre),fe.addListener(r,"goaway",Sre),fe.addListener(r,"close",function(){let{[rl]:n}=this,{[Dt]:i}=n,a=this[Dt][Zs]||this[Zs]||new SA("closed",fe.getSocketInfo(i));if(n[Xs]=null,n.destroyed){ys(n[Are]===0);let c=n[fo].splice(n[Ks]);for(let l=0;l<c.length;l++){let u=c[l];fe.errorRequest(n,u,a)}}}),r.unref(),t[Xs]=r,e[Xs]=r,fe.addListener(e,"error",function(n){ys(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Zs]=n,this[rl][_w](n)}),fe.addListener(e,"end",function(){fe.destroy(this,new SA("other side closed",fe.getSocketInfo(this)))}),fe.addListener(e,"close",function(){let n=this[Zs]||new SA("closed",fe.getSocketInfo(this));t[Dt]=null,this[Xs]!=null&&this[Xs].destroy(n),t[Dw]=t[Ks],ys(t[bh]===0),t.emit("disconnect",t[Ih],[t],n),t[go]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return Tre(t,...n)},resume(){bre(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}o(wre,"connectH2");function bre(t){let e=t[Dt];e?.destroyed===!1&&(t[pre]===0&&t[$M]===0?(e.unref(),t[Xs].unref()):(e.ref(),t[Xs].ref()))}o(bre,"resumeH2");function Qre(t){ys(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Dt][Zs]=t,this[rl][_w](t)}o(Qre,"onHttp2SessionError");function xre(t,e,r){if(r===0){let s=new kw(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Dt][Zs]=s,this[rl][_w](s)}}o(xre,"onHttp2FrameError");function Nre(){let t=new SA("other side closed",fe.getSocketInfo(this[Dt]));this.destroy(t),fe.destroy(this[Dt],t)}o(Nre,"onHttp2SessionEnd");function Sre(t){let e=this[Zs]||new SA(`HTTP/2: "GOAWAY" frame received with code ${t}`,fe.getSocketInfo(this)),r=this[rl];if(r[Dt]=null,r[mre]=null,this[Xs]!=null&&(this[Xs].destroy(e),this[Xs]=null),fe.destroy(this[Dt],e),r[Ks]<r[fo].length){let s=r[fo][r[Ks]];r[fo][r[Ks]++]=null,fe.errorRequest(r,s,e),r[Dw]=r[Ks]}ys(r[bh]===0),r.emit("disconnect",r[Ih],[r],e),r[go]()}o(Sre,"onHTTP2GoAway");function Rre(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(Rre,"shouldSendContentLength");function Tre(t,e){let r=t[Xs],{method:s,path:n,host:i,upgrade:a,expectContinue:c,signal:l,headers:u}=e,{body:A}=e;if(a)return fe.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let d={};for(let B=0;B<u.length;B+=2){let N=u[B+0],S=u[B+1];if(Array.isArray(S))for(let U=0;U<S.length;U++)d[N]?d[N]+=`,${S[U]}`:d[N]=S[U];else d[N]=S}let p,{hostname:m,port:h}=t[Ih];d[hre]=i||`${m}${h?`:${h}`:""}`,d[fre]=s;let g=o(B=>{e.aborted||e.completed||(B=B||new GM,fe.errorRequest(t,e,B),p!=null&&fe.destroy(p,B),fe.destroy(A,B),t[fo][t[Ks]++]=null,t[go]())},"abort");try{e.onConnect(g)}catch(B){fe.errorRequest(t,e,B)}if(e.aborted)return!1;if(s==="CONNECT")return r.ref(),p=r.request(d,{endStream:!1,signal:l}),p.id&&!p.pending?(e.onUpgrade(null,null,p),++r[Ri],t[fo][t[Ks]++]=null):p.once("ready",()=>{e.onUpgrade(null,null,p),++r[Ri],t[fo][t[Ks]++]=null}),p.once("close",()=>{r[Ri]-=1,r[Ri]===0&&r.unref()}),!0;d[gre]=n,d[Ere]="https";let C=s==="PUT"||s==="POST"||s==="PATCH";A&&typeof A.read=="function"&&A.read(0);let E=fe.bodyLength(A);if(fe.isFormDataLike(A)){HM??=Kc().extractBody;let[B,N]=HM(A);d["content-type"]=N,A=B.stream,E=B.length}if(E==null&&(E=e.contentLength),(E===0||!C)&&(E=null),Rre(s)&&E>0&&e.contentLength!=null&&e.contentLength!==E){if(t[dre])return fe.errorRequest(t,e,n Line truncated
`,this[rse]=l??3e5,this[tse]=n??3e5,this[sse]=y??!0,this[nse]=B,this[Ow]=S,this[yo]=null,this[lse]=he>-1?he:-1,this[Ase]=Te??100,this[ut]=null,this[en]=[],this[vi]=0,this[tn]=0,this[PA]=se=>qw(this,se),this[use]=se=>aF(this,se)}get pipelining(){return this[Sh]}set pipelining(e){this[Sh]=e,this[PA](!0)}get[_A](){return this[en].length-this[tn]}get[DA](){return this[tn]-this[vi]}get[kA](){return this[en].length-this[vi]}get[Jre](){return!!this[ut]&&!this[nl]&&!this[ut].destroyed}get[Fw](){return!!(this[ut]?.busy(null)||this[kA]>=(oF(this)||1)||this[_A]>0)}[$re](e){cF(this),this.once("connect",e)}[cse](e,r){let s=e.origin||this[Sn].origin,n=new qre(s,e,r);return this[en].push(n),this[Ea]||(ga.bodyLength(n.body)==null&&ga.isIterable(n.body)?(this[Ea]=1,queueMicrotask(()=>qw(this))):this[PA](!0)),this[Ea]&&this[Co]!==2&&this[Fw]&&(this[Co]=2),this[Co]<2}async[ose](){return new Promise(e=>{this[kA]?this[yo]=e:e(null)})}async[ase](e){return new Promise(r=>{let s=this[en].splice(this[tn]);for(let i=0;i<s.length;i++){let a=s[i];ga.errorRequest(this,a,e)}let n=o(()=>{this[yo]&&(this[yo](),this[yo]=null),r(null)},"callback");this[ut]?(this[ut].destroy(e,n),this[ut]=null):queueMicrotask(n),this[PA]()})}},mse=Nh();function aF(t,e){if(t[DA]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Ti(t[tn]===t[vi]);let r=t[en].splice(t[vi]);for(let s=0;s<r.length;s++){let n=r[s];ga.errorRequest(t,n,e)}Ti(t[kA]===0)}}o(aF,"onError");async function cF(t){Ti(!t[nl]),Ti(!t[ut]);let{host:e,hostname:r,protocol:s,port:n}=t[Sn];if(r[0]==="["){let i=r.indexOf("]");Ti(i!==-1);let a=r.substring(1,i);Ti(iF.isIP(a)),r=a}t[nl]=!0,sl.beforeConnect.hasSubscribers&&sl.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[ut]?.version,servername:t[Eo],localAddress:t[vA]},connector:t[TA]});try{let i=await new Promise((a,c)=>{t[TA]({host:e,hostname:r,protocol:s,port:n,servername:t[Eo],localAddress:t[vA]},(l,u)=>{l?c(l):a(u)})});if(t.destroyed){ga.destroy(i.on("error",sF),new zre);return}Ti(i);try{t[ut]=i.alpnProtocol==="h2"?await pse(t,i):await dse(t,i)}catch(a){throw i.destroy().on("error",sF),a}t[nl]=!1,i[ise]=0,i[Ow]=t[Ow],i[Yre]=t,i[jre]=null,sl.connected.hasSubscribers&&sl.connected.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[ut]?.version,servername:t[Eo],localAddress:t[vA]},connector:t[TA],socket:i}),t.emit("connect",t[Sn],[t])}catch(i){if(t.destroyed)return;if(t[nl]=!1,sl.connectError.hasSubscribers&&sl.connectError.publish({connectParams:{host:e,hostname:r,protocol:s,port:n,version:t[ut]?.version,servername:t[Eo],localAddress:t[vA]},connector:t[TA],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Ti(t[DA]===0);t[_A]>0&&t[en][t[tn]].servername===t[Eo];){let a=t[en][t[tn]++];ga.errorRequest(t,a,i)}else aF(t,i);t.emit("connectionError",t[Sn],[t],i)}t[PA]()}o(cF,"connect");function nF(t){t[Co]=0,t.emit("drain",t[Sn],[t])}o(nF,"emitDrain");function qw(t,e){t[Ea]!==2&&(t[Ea]=2,hse(t,e),t[Ea]=0,t[vi]>256&&(t[en].splice(0,t[vi]),t[tn]-=t[vi],t[vi]=0))}o(qw,"resume");function hse(t,e){for(;;){if(t.destroyed){Ti(t[_A]===0);return}if(t[yo]&&!t[kA]){t[yo](),t[yo]=null;return}if(t[ut]&&t[ut].resume(),t[Fw])t[Co]=2;else if(t[Co]===2){e?(t[Co]=1,queueMicrotask(()=>nF(t))):nF(t);continue}if(t[_A]===0||t[DA]>=(oF(t)||1))return;let r=t[en][t[tn]];if(t[Sn].protocol==="https:"&&t[Eo]!==r.servername){if(t[DA]>0)return;t[Eo]=r.servername,t[ut]?.destroy(new Hre("servername changed"),()=>{t[ut]=null,qw(t)})}if(t[nl])return;if(!t[ut]){cF(t);return}if(t[ut].destroyed||t[ut].busy(r))return;!r.aborted&&t[ut].write(r)?t[tn]++:t[en].splice(t[tn],1)}}o(hse,"_resume");lF.exports=Uw});var Gw=f((kMe,uF)=>{"use strict";var Rh=class{static{o(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};uF.exports=class{static{o(this,"FixedQueue")}constructor(){this.head=this.tail=new Rh}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Rh),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var dF=f((_Me,AF)=>{var{kFree:fse,kConnected:gse,kPending:Ese,kQueued:yse,kRunning:Cse,kSize:Ise}=ze(),ya=Symbol("pool"),Hw=class{static{o(this,"PoolStats")}constructor(e){this[ya]=e}get connected(){return this[ya][gse]}get free(){return this[ya][fse]}get pending(){return this[ya][Ese]}get queued(){return this[ya][yse]}get running(){return this[ya][Cse]}get size(){return this[ya][Ise]}};AF.exports=Hw});var Ww=f((MMe,BF)=>{"use strict";var Bse=Gc(),wse=Gw(),{kConnected:zw,kSize:pF,kRunning:mF,kPending:hF,kQueued:LA,kBusy:bse,kFree:Qse,kUrl:xse,kClose:Nse,kDestroy:Sse,kDispatch:Rse}=ze(),Tse=dF(),wr=Symbol("cl Line truncated
${s.count} ${s.noun} ${s.is} pending:
${e.format(r)}
`.trim())}};RU.exports=Wb});var $h=f((_Fe,DU)=>{"use strict";var vU=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:roe}=Ie(),soe=al();kU()===void 0&&PU(new soe);function PU(t){if(!t||typeof t.dispatch!="function")throw new roe("Argument agent must implement Agent");Object.defineProperty(globalThis,vU,{value:t,writable:!0,enumerable:!1,configurable:!1})}o(PU,"setGlobalDispatcher");function kU(){return globalThis[vU]}o(kU,"getGlobalDispatcher");DU.exports={setGlobalDispatcher:PU,getGlobalDispatcher:kU}});var Jh=f((FFe,_U)=>{"use strict";_U.exports=class{static{o(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var MU=f((UFe,LU)=>{"use strict";var noe=xh();LU.exports=t=>{let e=t?.maxRedirections;return r=>o(function(n,i){let{maxRedirections:a=e,...c}=n;if(!a)return r(n,i);let l=new noe(r,a,n,i);return r(c,l)},"redirectInterceptor")}});var OU=f((GFe,FU)=>{"use strict";var ioe=Mh();FU.exports=t=>e=>o(function(s,n){return e(s,new ioe({...s,retryOptions:{...t,...s.retryOptions}},{handler:n,dispatch:e}))},"retryInterceptor")});var qU=f((zFe,UU)=>{"use strict";var ooe=de(),{InvalidArgumentError:aoe,RequestAbortedError:coe}=Ie(),loe=Jh(),jb=class extends loe{static{o(this,"DumpHandler")}#e=1024*1024;#t=null;#r=!1;#i=!1;#n=0;#s=null;#o=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new aoe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#o=r}onConnect(e){this.#t=e,this.#o.onConnect(this.#a.bind(this))}#a(e){this.#i=!0,this.#s=e}onHeaders(e,r,s,n){let a=ooe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new coe(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#i?!0:this.#o.onHeaders(e,r,s,n)}onError(e){this.#r||(e=this.#s??e,this.#o.onError(e))}onData(e){return this.#n=this.#n+e.length,this.#n>=this.#e&&(this.#r=!0,this.#i?this.#o.onError(this.#s):this.#o.onComplete([])),!0}onComplete(e){if(!this.#r){if(this.#i){this.#o.onError(this.reason);return}this.#o.onComplete(e)}}};function uoe({maxSize:t}={maxSize:1024*1024}){return e=>o(function(s,n){let{dumpMaxSize:i=t}=s,a=new jb({maxSize:i},n);return e(s,a)},"Intercept")}o(uoe,"createDumpInterceptor");UU.exports=uoe});var zU=f((YFe,HU)=>{"use strict";var{isIP:Aoe}=require("node:net"),{lookup:doe}=require("node:dns"),poe=Jh(),{InvalidArgumentError:fl,InformationalError:moe}=Ie(),GU=Math.pow(2,31)-1,Kb=class{static{o(this,"DNSInstance")}#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.#i,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,(a,c)=>{if(a||c==null||c.length===0){s(a??new moe("No DNS entries found"));return}this.setRecords(e,c);let l=this.#r.get(e.hostname),u=this.pick(e,l,i.affinity),A;typeof u.port=="number"?A=`:${u.port}`:e.port!==""?A=`:${e.port}`:A="",s(null,`${e.protocol}//${u.family===6?`[${u.address}]`:u.address}${A}`)});else{let a=this.pick(e,n,i.affinity);if(a==null){this.#r.delete(e.hostname),this.runLookup(e,r,s);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",s(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#i(e,r,s){doe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(n,i)=>{if(n)return s(n);let a=new Map;for(let c of i)a.set(`${c.address}:${c.family}`,c);s(null,a.values())})}#n(e,r,s){let n=null,{records:i,offset:a}=r,c;if(this.dualStack?(s==null&&(a==null||a===GU?(r.offset=0,s=4):(r.offset++,s=(r.offset&1)===1?6:4)),i[s]!=null&&i[s].ips.length>0?c=i[s]:c=i[s===4?6:4]):c=i[s],c==null||c.ips.length===0)return n;c.offset==null||c.offset===GU?c.offset=0:c.offset++;let l=c.offset%c.ips.length;return n=c.ips[l]??null,n==null?n:Date.now()-n.timestamp>n.ttl?(c.ips.splice(l,1),this.pick(e,r,s)):n}setRecords(e,r){let s=Date.now(),n={records:{4:null,6:null}};for(let i of r){i.timestamp=s,typeof i.ttl=="number"?i.ttl=Math.min(i.ttl,this.#e):i.ttl=this.#e;let a=n.records[i.family]??{ips:[]};a.ips.push(i),n.records[i.family]=a}this.#r.set(e.hostname,n)}getHandler(e,r){return new Xb(this,e,r)}},Xb=class extends poe{static{o(this,"DNSDispatchHandler")}#e=null;#t=null;#r=null Line truncated
${a}`;return}if(_f(e,n,Nue)){Sue(e,i)&&(r.retry=e.toString("utf8",i));return}if(_f(e,n,xue)){Rue(e,i)&&(r.id=e.toString("utf8",i));return}if(_f(e,n,Que)){let a=e.toString("utf8",i);a.length>0&&(r.event=a)}}processEvent(e){e.retry&&Cue(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Iue(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,this.event.event=void 0,this.event.id=void 0,this.event.retry=void 0}hasPendingEvent(){return this.event.data!==void 0||this.event.event!==void 0||this.event.id!==void 0||this.event.retry!==void 0}hasCurrentByte(){return this.chunkIndex<this.chunks.length&&this.pos<this.chunks[this.chunkIndex].length}currentByte(){return this.chunks[this.chunkIndex][this.pos]}consumeCurrentByte(){this.advanceCursor(),this.syncLineStartToCursor()}advanceCursor(){for(this.pos++;this.chunkIndex<this.chunks.length&&this.pos>=this.chunks[this.chunkIndex].length;)this.chunkIndex++,this.pos=0}syncLineStartToCursor(){this.lineChunkIndex=this.chunkIndex,this.linePos=this.pos,this.dropConsumedChunks()}dropConsumedChunks(){for(;this.lineChunkIndex>0;)this.chunks.shift(),this.lineChunkIndex--,this.chunkIndex--;this.chunkIndex===this.chunks.length&&(this.chunks.length=0,this.chunkIndex=0,this.pos=0,this.lineChunkIndex=0,this.linePos=0)}readLine(){if(this.lineChunkIndex===this.chunkIndex)return this.chunks[this.chunkIndex].subarray(this.linePos,this.pos);let e=[],r=0;for(let s=this.lineChunkIndex;s<=this.chunkIndex;s++){let n=this.chunks[s],i=s===this.lineChunkIndex?this.linePos:0,a=s===this.chunkIndex?this.pos:n.length,c=n.subarray(i,a);r+=c.length,e.push(c)}return Buffer.concat(e,r)}peekBufferedByte(e){let r=this.lineChunkIndex,s=this.linePos;for(;r<this.chunks.length;){let n=this.chunks[r],i=n.length-s;if(e<i)return n[s+e];e-=i,r++,s=0}}discardLeadingBytes(e){for(;e>0&&this.lineChunkIndex<this.chunks.length;){let s=this.chunks[this.lineChunkIndex].length-this.linePos;e<s?(this.linePos+=e,e=0):(e-=s,this.lineChunkIndex++,this.linePos=0)}this.chunkIndex=this.lineChunkIndex,this.pos=this.linePos,this.dropConsumedChunks()}handleBOM(){let e=this.peekBufferedByte(0),r=this.peekBufferedByte(1),s=this.peekBufferedByte(2);return r===void 0?(e===Tl[0]||(this.checkBOM=!1),!0):s===void 0?e===Tl[0]&&r===Tl[1]?!0:(this.checkBOM=!1,!1):(e===Tl[0]&&r===Tl[1]&&s===Tl[2]&&this.discardLeadingBytes(3),this.checkBOM=!1,!this.hasCurrentByte())}};Bq.exports={EventSourceStream:qQ}});var vq=f((WOe,Tq)=>{"use strict";var{pipeline:Tue}=require("node:stream"),{fetching:vue}=jA(),{makeRequest:Pue}=yl(),{webidl:_i}=qt(),{EventSourceStream:kue}=wq(),{parseMIMEType:Due}=Ir(),{createFastMessageEvent:_ue}=Ql(),{isNetworkError:bq}=JA(),{delay:Lue}=OQ(),{kEnumerableProperty:_a}=de(),{environmentSettingsObject:Qq}=Hr(),xq=!1,Nq=3e3,ud=0,Sq=1,Ad=2,Mue="anonymous",Fue="use-credentials",vl=class t extends EventTarget{static{o(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#r=!1;#i=ud;#n=null;#s=null;#o;#a;constructor(e,r={}){super(),_i.util.markAsUncloneable(this);let s="EventSource constructor";_i.argumentLengthCheck(arguments,1,s),xq||(xq=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=_i.converters.USVString(e,s,"url"),r=_i.converters.EventSourceInitDict(r,s,"eventSourceInitDict"),this.#o=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:Nq};let n=Qq,i;try{i=new URL(e,n.settingsObject.baseUrl),this.#a.origin=i.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#t=i.href;let a=Mue;r.withCredentials&&(a=Fue,this.#r=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=Qq.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#n=Pue(c),this.#l()}get readyState(){return this.#i}get url(){return this.#t}get withCredentials(){return this.#r}#l(){if(this.#i===Ad)return;this.#i=ud;let e={request:this.#n,dispatcher:this.#o},r=o(s=>{bq(s)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=s=>{if(bq(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?Due(n):"failure",a=i!=="failure"&&i.essence==="text/event-stream";if(s.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#i=Sq,this.dispatchEvent(new Event("open")),this.#a.origin=s.urlList[s.urlList.length-1].origin;let c=new kue({eventSourceSettings:this.#a,push:o(l=>{this.dispatchEvent(_ue(l.type,l.options))},"push")});Tue(s.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#s=vu Line truncated
%s`,N,N,y,s);var S=y.type==="*"?Ox:y.type==="?"?Fx:"\\"+y.type;n=!0,s=s.slice(0,y.reStart)+S+"\\("+N}h(),i&&(s+="\\\\");var U=!1;switch(s.charAt(0)){case"[":case".":case"(":U=!0}for(var he=c.length-1;he>-1;he--){var Se=c[he],Qe=s.slice(0,Se.reStart),Te=s.slice(Se.reStart,Se.reEnd-8),Ae=s.slice(Se.reEnd-8,Se.reEnd),_e=s.slice(Se.reEnd);Ae+=_e;var se=Qe.split("(").length-1,tr=_e;for(g=0;g<se;g++)tr=tr.replace(/\)[+*?]?/,"");_e=tr;var z="";_e===""&&e!==ig&&(z="$");var xe=Qe+Te+_e+z+Ae;s=xe}if(s!==""&&n&&(s="(?=.)"+s),U&&(s=p+s),e===ig)return[s,n];if(!n)return mhe(t);var Cn=r.nocase?"i":"";try{var uo=new RegExp("^"+s+"$",Cn)}catch{return new RegExp("$.")}return uo._glob=t,uo._src=s,uo}o(dhe,"parse");es.makeRe=function(t,e){return new Gt(t,e||{}).makeRe()};Gt.prototype.makeRe=phe;function phe(){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?Ox:e.dot?ihe:ohe,s=e.nocase?"i":"",n=t.map(function(i){return i.map(function(a){return a===Ux?r:typeof a=="string"?hhe(a):a._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,s)}catch{this.regexp=!1}return this.regexp}o(phe,"makeRe");es.match=function(t,e,r){r=r||{};var s=new Gt(e,r);return t=t.filter(function(n){return s.match(n)}),s.options.nonull&&!t.length&&t.push(e),t};Gt.prototype.match=o(function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var s=this.options;vd.sep!=="/"&&(e=e.split(vd.sep).join("/")),e=e.split(Pz),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,a;for(a=e.length-1;a>=0&&(i=e[a],!i);a--);for(a=0;a<n.length;a++){var c=n[a],l=e;s.matchBase&&c.length===1&&(l=[i]);var u=this.matchOne(l,c,r);if(u)return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate},"match");Gt.prototype.matchOne=function(t,e,r){var s=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,i=0,a=t.length,c=e.length;n<a&&i<c;n++,i++){this.debug("matchOne loop");var l=e[i],u=t[n];if(this.debug(e,l,u),l===!1)return!1;if(l===Ux){this.debug("GLOBSTAR",[e,l,u]);var A=n,d=i+1;if(d===c){for(this.debug("** at the end");n<a;n++)if(t[n]==="."||t[n]===".."||!s.dot&&t[n].charAt(0)===".")return!1;return!0}for(;A<a;){var p=t[A];if(this.debug(`
globstar while`,t,A,e,d,p),this.matchOne(t.slice(A),e.slice(d),r))return this.debug("globstar found match!",A,a,p),!0;if(p==="."||p===".."||!s.dot&&p.charAt(0)==="."){this.debug("dot detected!",t,A,e,d);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(r&&(this.debug(`
>>> no match, partial?`,t,A,e,d),A===a))}var m;if(typeof l=="string"?(m=u===l,this.debug("string match",l,u,m)):(m=u.match(l),this.debug("pattern match",l,u,m)),!m)return!1}if(n===a&&i===c)return!0;if(n===a)return r;if(i===c)return n===a-1&&t[n]==="";throw new Error("wtf?")};function mhe(t){return t.replace(/\\(.)/g,"$1")}o(mhe,"globUnescape");function hhe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(hhe,"regExpEscape")});var Vl=f((_Ge,Oz)=>{"use strict";var whe="2.0.0",bhe=Number.MAX_SAFE_INTEGER||9007199254740991,Qhe=16,xhe=250,Nhe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Oz.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Qhe,MAX_SAFE_BUILD_LENGTH:xhe,MAX_SAFE_INTEGER:bhe,RELEASE_TYPES:Nhe,SEMVER_SPEC_VERSION:whe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Dd=f((LGe,Uz)=>{"use strict";var She=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Uz.exports=She});var Yl=f((_n,qz)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Gx,MAX_SAFE_BUILD_LENGTH:Rhe,MAX_LENGTH:The}=Vl(),vhe=Dd();_n=qz.exports={};var Phe=_n.re=[],khe=_n.safeRe=[],L=_n.src=[],Dhe=_n.safeSrc=[],M=_n.t={},_he=0,Hx="[a-zA-Z0-9-]",Lhe=[["\\s",1],["\\d",The],[Hx,Rhe]],Mhe=o(t=>{for(let[e,r]of Lhe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),ie=o((t,e,r)=>{let s=Mhe(e),n=_he++;vhe(t,n,e),M[t]=n,L[n]=e,Dhe[n]=s,Phe[n]=new RegExp(e,r?"g":void 0),khe[n]=new RegExp(s,r?"g":void 0)},"createToken");ie("NUMERICIDENTIFIER","0|[1-9]\\d*");ie("NUMERICIDENTIFIERLOOSE","\\d+");ie("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Hx}*`);ie("MAINVERSION",`(${L[M.NUMERICIDENTIFIER]})\\.(${L[M.NUMERICIDENTIFIER]})\\.(${L[M.NUMERICIDENTIFIER]})`);ie("MAINVERSIONLOOSE",`(${L[M.NUMERICIDENTIFIERLOOSE]})\\.(${L[M.NUMERICIDENTIFIERLOOSE]})\\.(${L[M.NUMERICIDENTIFIERLOOSE]})`);ie("PRERELEASEIDENTIFIER",`(?:${L[M.NONNUMERICIDENTIFIER]}|${L[M.NUMERICIDENTIFIER]})`);ie("PRERELEASEIDENTIFIERLOOSE",`(?:${L[M.NONNUMERICIDENTIFIER]}|${L[M.NUMERICIDENTIFIERLOOSE]})`);ie("PRERELEASE",`(?:-(${L[M.PRERELEASEIDENTIFIER]}(?:\\.${L[M.PRERELEASEIDENTIFIER]})*))`);ie("PRERELEASELOOSE",`(?:-?(${L[M.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${L[M.PRERELEASEIDENTIFIERLOOSE]})*))`);ie("BUILDIDENTIFIER",`${Hx}+`);ie("BUILD",`(?:\\+(${L[M.BUILDIDENTIFIER]}(?:\\.${L[M.BUILDIDENTIFIER]})*))`);ie("FULLPLAIN",`v?${L[M.MAINVERSION]}${L[M.PRERELEASE]}?${L[M.BUILD]}?`);ie("FULL",`^${L[M.FULLPLAIN]}$`);ie("LOOSEPLAIN",`[v=\\s]*${L[M.MAINVERSIONLOOSE]}${L[M.PRERELEASELOOSE]}?${L[M.BUILD]}?`);ie("LOOSE",`^${L[M.LOOSEPLAIN]}$`);ie("GTLT","((?:<|>)?=?)");ie("XRANGEIDENTIFIERLOOSE",`${L[M.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);ie("XRANGEIDENTIFIER",`${L[M.NUMERICIDENTIFIER]}|x|X|\\*`);ie("XRANGEPLAIN",`[v=\\s]*(${L[M.XRANGEIDENTIFIER]})(?:\\.(${L[M.XRANGEIDENTIFIER]})(?:\\.(${L[M.XRANGEIDENTIFIER]})(?:${L[M.PRERELEASE]})?${L[M.BUILD]}?)?)?`);ie("XRANGEPLAINLOOSE",`[v=\\s]*(${L[M.XRANGEIDENTIFIERLOOSE]})(?:\\.(${L[M.XRANGEIDENTIFIERLOOSE]})(?:\\.(${L[M.XRANGEIDENTIFIERLOOSE]})(?:${L[M.PRERELEASELOOSE]})?${L[M.BUILD]}?)?)?`);ie("XRANGE",`^${L[M.GTLT]}\\s*${L[M.XRANGEPLAIN]}$`);ie("XRANGELOOSE",`^${L[M.GTLT]}\\s*${L[M.XRANGEPLAINLOOSE]}$`);ie("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Gx}})(?:\\.(\\d{1,${Gx}}))?(?:\\.(\\d{1,${Gx}}))?`);ie("COERCE",`${L[M.COERCEPLAIN]}(?:$|[^\\d])`);ie("COERCEFULL",L[M.COERCEPLAIN]+`(?:${L[M.PRERELEASE]})?(?:${L[M.BUILD]})?(?:$|[^\\d])`);ie("COERCERTL",L[M.COERCE],!0);ie("COERCERTLFULL",L[M.COERCEFULL],!0);ie("LONETILDE","(?:~>?)");ie("TILDETRIM",`(\\s*)${L[M.LONETILDE]}\\s+`,!0);_n.tildeTrimReplace="$1~";ie("TILDE",`^${L[M.LONETILDE]}${L[M.XRANGEPLAIN]}$`);ie("TILDELOOSE",`^${L[M.LONETILDE]}${L[M.XRANGEPLAINLOOSE]}$`);ie("LONECARET","(?:\\^)");ie("CARETTRIM",`(\\s*)${L[M.LONECARET]}\\s+`,!0);_n.caretTrimReplace="$1^";ie("CARET",`^${L[M.LONECARET]}${L[M.XRANGEPLAIN]}$`);ie("CARETLOOSE",`^${L[M.LONECARET]}${L[M.XRANGEPLAINLOOSE]}$`);ie("COMPARATORLOOSE",`^${L[M.GTLT]}\\s*(${L[M.LOOSEPLAIN]})$|^$`);ie("COMPARATOR",`^${L[M.GTLT]}\\s*(${L[M.FULLPLAIN]})$|^$`);ie("COMPARATORTRIM",`(\\s*)${L[M.GTLT]}\\s*(${L[M.LOOSEPLAIN]}|${L[M.XRANGEPLAIN]})`,!0);_n.comparatorTrimReplace="$1$2$3";ie("HYPHENRANGE",`^\\s*(${L[M.XRANGEPLAIN]})\\s+-\\s+(${L[M.XRANGEPLAIN]})\\s*$`);ie("HYPHENRANGELOOSE",`^\\s*(${L[M.XRANGEPLAINLOOSE]})\\s+-\\s+(${L[M.XRANGEPLAINLOOSE]})\\s*$`);ie("STAR","(<|>)?=?\\s*\\*");ie("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");ie("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var lg=f((FGe,Gz)=>{"use strict";var Fhe=Object.freeze({loose:!0}),Ohe=Object.freeze({}),Uhe=o(t=>t?typeof t!="object"?Fhe:t:Ohe,"parseOptions");Gz.exports=Uhe});var zx=f((UGe,Vz)=>{"use strict";var Hz=/^[0-9]+$/,zz=o((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Hz.test(t),s=Hz.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},"compareIdentifiers"),qhe=o((t,e)=>zz(e,t),"rcompareIdentifiers");Vz Line truncated
`).join(`
`+i),t.push(n+"m+"+Wg.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=xye()+e+" "+t[0]}o(Qye,"formatArgs");function xye(){return Vt.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(xye,"getDate");function Nye(...t){return process.stderr.write(Jg.format(...t)+`
`)}o(Nye,"log");function Sye(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(Sye,"save");function Rye(){return process.env.DEBUG}o(Rye,"load");function Tye(t){t.inspectOpts={};let e=Object.keys(Vt.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Vt.inspectOpts[e[r]]}o(Tye,"init");Wg.exports=P0()(Vt);var{formatters:Q$}=Wg.exports;Q$.o=function(t){return this.inspectOpts.colors=this.useColors,Jg.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};Q$.O=function(t){return this.inspectOpts.colors=this.useColors,Jg.inspect(t,this.inspectOpts)}});var jg=f((NYe,_0)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?_0.exports=y$():_0.exports=x$()});var R$=f(Tr=>{"use strict";var vye=Tr&&Tr.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Pye=Tr&&Tr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),N$=Tr&&Tr.__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 Pye(e,t),e};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.req=Tr.json=Tr.toBuffer=void 0;var kye=N$(require("http")),Dye=N$(require("https"));async function S$(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}o(S$,"toBuffer");Tr.toBuffer=S$;async function _ye(t){let r=(await S$(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=` (input: ${r})`,n}}o(_ye,"json");Tr.json=_ye;function Lye(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?Dye:kye).request(t,e),n=new Promise((i,a)=>{s.once("response",i).once("error",a).end()});return s.then=n.then.bind(n),s}o(Lye,"req");Tr.req=Lye});var k$=f(ns=>{"use strict";var v$=ns&&ns.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Mye=ns&&ns.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),P$=ns&&ns.__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)&&v$(e,t,r);return Mye(e,t),e},Fye=ns&&ns.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&v$(e,t,r)};Object.defineProperty(ns,"__esModule",{value:!0});ns.Agent=void 0;var Oye=P$(require("net")),T$=P$(require("http")),Uye=require("https");Fye(R$(),ns);var On=Symbol("AgentBaseInternalState"),L0=class extends T$.Agent{static{o(this,"Agent")}constructor(e){super(e),this[On]={}}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 Oye.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)?Uye.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,s){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(n),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,n)).then(c=>{if(this.decrementSockets(i,a),c instanceof T$.Agent)try{return c.addRequest(e,n)}catch(l){return s(l)}this[On].currentSocket=c,super.createSocket(e,r,s)},c=>{this.decrementSockets(i,a),s(c)})}createConnection(){let e=this[On].currentSocket;if(this[On].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[On].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[On]&&(this[On].defaultPort=e)}get protocol(){return this[On].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[On]&&(this[On].protocol=e)}};ns.Agent=L0});var D$=f(ru=>{"use strict";var qye=ru&&ru.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ru,"__esModule",{value:!0});ru.parseProxyResponse=void 0;var Gye=qye(jg()),Kg=(0,Gye.default)("https-proxy-agent:parse-proxy-response");function Hye(t){return new Promise((e,r)=>{let s=0,n=[];function i(){let A=t.read();A?u(A):t.once("readable",i)}o(i,"read");function a(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",i)}o(a,"cleanup");function c(){a(),Kg("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function l(A){a(),Kg("onerror %o",A),r(A)}o(l,"onerror");function u(A){n.push(A),s+=A.length;let d=Buffer.concat(n,s),p=d.indexOf(`\r
\r
`);if(p===-1){Kg("have not received end of HTTP headers yet..."),i();return}let m=d.slice(0,p).toString("ascii").split(`\r
`),h=m.shift();if(!h)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=h.split(" "),C=+g[1],E=g.slice(2).join(" "),y={};for(let I of m){if(!I)continue;let B=I.indexOf(":");if(B===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${I}"`));let N=I.slice(0,B).toLowerCase(),S=I.slice(B+1).trimStart(),U=y[N];typeof U=="string"?y[N]=[U,S]:Array.isArray(U)?U.push(S):y[N]=S}Kg("got proxy server response: %o %o",h,y),a(),e({connect:{statusCode:C,statusText:E,headers:y},buffered:d})}o(u,"ondata"),t.on("error",l),t.on("end",c),i()})}o(Hye,"parseProxyResponse");ru.parseProxyResponse=Hye});var U$=f(vs=>{"use strict";var zye=vs&&vs.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Vye=vs&&vs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),F$=vs&&vs.__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)&&zye(e,t,r);return Vye(e,t),e},O$=vs&&vs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vs,"__esModule",{value:!0});vs.HttpsProxyAgent=void 0;var Xg=F$(require("net")),_$=F$(require("tls")),Yye=O$(require("assert")),$ye=O$(jg()),Jye=k$(),Wye=require("url"),jye=D$(),Wd=(0,$ye.default)("https-proxy-agent"),L$=o(t=>t.servername===void 0&&t.host&&!Xg.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),Zg=class extends Jye.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new Wye.URL(e):e,this.proxyHeaders=r?.headers??{},Wd("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?M$(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:"?(Wd("Creating `tls.Socket`: %o",this.connectOpts),n=_$.connect(L$(this.connectOpts))):(Wd("Creating `net.Socket`: %o",this.connectOpts),n=Xg.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=Xg.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
`;if(s.username||s.password){let p=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}i.Host=`${a}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(i))c+=`${p}: ${i[p]}\r
`;let l=(0,jye.parseProxyResponse)(n);n.write(`${c}\r
`);let{connect:u,buffered:A}=await l;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",Kye),r.secureEndpoint?(Wd("Upgrading socket connection to TLS"),_$.connect({...M$(L$(r),"host","path","port"),socket:n})):n;n.destroy();let d=new Xg.Socket({writable:!1});return d.readable=!0,e.once("socket",p=>{Wd("Replaying proxy buffer for failed request"),(0,Yye.default)(p.listenerCount("data")>0),p.push(A),p.push(null)}),d}};Zg.protocols=["http","https"];vs.HttpsProxyAgent=Zg;function Kye(t){t.resume()}o(Kye,"resume");function M$(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(M$,"omit")});var H$=f(vr=>{"use strict";var Xye=vr&&vr.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Zye=vr&&vr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),q$=vr&&vr.__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)&&Xye(e,t,r);return Zye(e,t),e};Object.defineProperty(vr,"__esModule",{value:!0});vr.req=vr.json=vr.toBuffer=void 0;var eCe=q$(require("http")),tCe=q$(require("https"));async function G$(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}o(G$,"toBuffer");vr.toBuffer=G$;async function rCe(t){let r=(await G$(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=` (input: ${r})`,n}}o(rCe,"json");vr.json=rCe;function sCe(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?tCe:eCe).request(t,e),n=new Promise((i,a)=>{s.once("response",i).once("error",a).end()});return s.then=n.then.bind(n),s}o(sCe,"req");vr.req=sCe});var $$=f(is=>{"use strict";var V$=is&&is.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),nCe=is&&is.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Y$=is&&is.__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)&&V$(e,t,r);return nCe(e,t),e},iCe=is&&is.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&V$(e,t,r)};Object.defineProperty(is,"__esModule",{value:!0});is.Agent=void 0;var oCe=Y$(require("net")),z$=Y$(require("http")),aCe=require("https");iCe(H$(),is);var Un=Symbol("AgentBaseInternalState"),M0=class extends z$.Agent{static{o(this,"Agent")}constructor(e){super(e),this[Un]={}}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 oCe.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let s=this.sockets[e],n=s.indexOf(r);n!==-1&&(s.splice(n,1),this.totalSocketCount--,s.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?aCe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,s){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(n),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,n)).then(c=>{if(this.decrementSockets(i,a),c instanceof z$.Agent)return c.addRequest(e,n);this[Un].currentSocket=c,super.createSocket(e,r,s)},c=>{this.decrementSockets(i,a),s(c)})}createConnection(){let e=this[Un].currentSocket;if(this[Un].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Un].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Un]&&(this[Un].defaultPort=e)}get protocol(){return this[Un].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Un]&&(this[Un].protocol=e)}};is.Agent=M0});var j$=f(Ps=>{"use strict";var cCe=Ps&&Ps.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),lCe=Ps&&Ps.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),W$=Ps&&Ps.__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)&&cCe(e,t,r);return lCe(e,t),e},uCe=Ps&&Ps.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.HttpProxyAgent=void 0;var ACe=W$(require("net")),dCe=W$(require("tls")),pCe=uCe(jg()),mCe=require("events"),hCe=$$(),J$=require("url"),su=(0,pCe.default)("http-proxy-agent"),eE=class extends hCe.Agent{static{o(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new J$.URL(e):e,this.proxyHeaders=r?.headers??{},su("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?fCe(r,"headers"):null,host:s,port:n}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:s}=this,n=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",a=`${n}//${i}`,c=new J$.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let l=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(s.username||s.password){let u=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;l["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}l["Proxy-Connection"]||(l["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let u of Object.keys(l)){let A=l[u];A&&e.setHeader(u,A)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let s,n;su("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(su("Patching connection write() output buffer with updated header"),s=e.outputData[0].data,n=s.indexOf(`\r
\r
`)+4,e.outputData[0].data=e._header+s.substring(n),su("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(su("Creating `tls.Socket`: %o",this.connectOpts),i=dCe.connect(this.connectOpts)):(su("Creating `net.Socket`: %o",this.connectOpts),i=ACe.connect(this.connectOpts)),await(0,mCe.once)(i,"connect"),i}};eE.protocols=["http","https"];Ps.HttpProxyAgent=eE;function fCe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(fCe,"omit")});var EJ=f(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.state=void 0;mE.state={instrumenterImplementation:void 0}});var _J=f(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.state=void 0;yE.state={operationRequestMap:new WeakMap}});var p4=f(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var LQe=require("os"),MQe=require("util");function FQe(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}o(FQe,"_interopDefaultLegacy");var OQe=FQe(MQe);function UQe(t,...e){process.stderr.write(`${OQe.default.format(t,...e)}${LQe.EOL}`)}o(UQe,"log");var s4=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,i4,hv=[],fv=[],Fy=[];s4&&gv(s4);var o4=Object.assign(t=>a4(t),{enable:gv,enabled:Ev,disable:qQe,log:UQe});function gv(t){i4=t,hv=[],fv=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?fv.push(new RegExp(`^${s.substr(1)}$`)):hv.push(new RegExp(`^${s}$`));for(let s of Fy)s.enabled=Ev(s.namespace)}o(gv,"enable");function Ev(t){if(t.endsWith("*"))return!0;for(let e of fv)if(e.test(t))return!1;for(let e of hv)if(e.test(t))return!0;return!1}o(Ev,"enabled");function qQe(){let t=i4||"";return gv(""),t}o(qQe,"disable");function a4(t){let e=Object.assign(r,{enabled:Ev(t),destroy:GQe,log:o4.log,namespace:t,extend:HQe});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t} ${s[0]}`),e.log(...s))}return o(r,"debug"),Fy.push(e),e}o(a4,"createDebugger");function GQe(){let t=Fy.indexOf(this);return t>=0?(Fy.splice(t,1),!0):!1}o(GQe,"destroy");function HQe(t){let e=a4(`${this.namespace}:${t}`);return e.log=this.log,e}o(HQe,"extend");var Lp=o4,c4=new Set,Ly=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,Oy,Uy=Lp("azure");Uy.log=(...t)=>{Lp.log(...t)};var yv=["verbose","info","warning","error"];Ly&&(d4(Ly)?l4(Ly):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Ly}'; logging is not enabled. Acceptable values: ${yv.join(", ")}.`));function l4(t){if(t&&!d4(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${yv.join(",")}`);Oy=t;let e=[];for(let r of c4)A4(r)&&e.push(r.namespace);Lp.enable(e.join(","))}o(l4,"setLogLevel");function zQe(){return Oy}o(zQe,"getLogLevel");var n4={verbose:400,info:300,warning:200,error:100};function VQe(t){let e=Uy.extend(t);return u4(Uy,e),{error:My(e,"error"),warning:My(e,"warning"),info:My(e,"info"),verbose:My(e,"verbose")}}o(VQe,"createClientLogger");function u4(t,e){e.log=(...r)=>{t.log(...r)}}o(u4,"patchLogMethod");function My(t,e){let r=Object.assign(t.extend(e),{level:e});if(u4(t,r),A4(r)){let s=Lp.disable();Lp.enable(s+","+r.namespace)}return c4.add(r),r}o(My,"createLogger");function A4(t){return!!(Oy&&n4[t.level]<=n4[Oy])}o(A4,"shouldEnable");function d4(t){return yv.includes(t)}o(d4,"isAzureLogLevel");Iu.AzureLogger=Uy;Iu.createClientLogger=VQe;Iu.getLogLevel=zQe;Iu.setLogLevel=l4});var Bv=f(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});var Bu=new WeakMap,qy=new WeakMap,Mp=class t{static{o(this,"AbortSignal")}constructor(){this.onabort=null,Bu.set(this,[]),qy.set(this,!1)}get aborted(){if(!qy.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return qy.get(this)}static get none(){return new t}addEventListener(e,r){if(!Bu.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Bu.get(this).push(r)}removeEventListener(e,r){if(!Bu.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=Bu.get(this),n=s.indexOf(r);n>-1&&s.splice(n,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function m4(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=Bu.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),qy.set(t,!0)}o(m4,"abortSignal");var Cv=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},Iv=class{static{o(this,"AbortController")}constructor(e){if(this._signal=new Mp,!!e){Array.isArray(e)||(e=arguments);for(let r of e)r.aborted?this.abort():r.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){m4(this._signal)}static timeout(e){let r=new Mp,s=setTimeout(m4,e,r);return typeof s.unref=="function"&&s.unref(),r}};Fp.AbortController=Iv;Fp.AbortError=Cv;Fp.AbortSignal=Mp});var y4=f(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});var YQe Line truncated
Polling from: ${r.config.operationLocation}
Operation status: ${A}
Polling status: ${w4.includes(A)?"Stopped":"Running"}`),A==="succeeded"){let d=a(u,r);if(d!==void 0)return{response:await e(d).catch(I4({state:r,stateProxy:s,isOperationError:c})),status:A}}return{response:u,status:A}}o(Ixe,"pollOperationHelper");async function N4(t){let{poll:e,state:r,stateProxy:s,options:n,getOperationStatus:i,getResourceLocation:a,getOperationLocation:c,isOperationError:l,withOperationLocation:u,getPollingInterval:A,processResult:d,getError:p,updateState:m,setDelay:h,isDone:g,setErrorAsResult:C}=t,{operationLocation:E}=r.config;if(E!==void 0){let{response:y,status:I}=await Ixe({poll:e,getOperationStatus:i,state:r,stateProxy:s,operationLocation:E,getResourceLocation:a,isOperationError:l,options:n});if(Q4({status:I,response:y,state:r,stateProxy:s,isDone:g,processResult:d,getError:p,setErrorAsResult:C}),!w4.includes(I)){let B=A?.(y);B&&h(B);let N=c?.(y,r);if(N!==void 0){let S=E!==N;r.config.operationLocation=N,u?.(N,S)}else u?.(E,!1)}m?.(r,y)}}o(N4,"pollOperation");function S4(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}o(S4,"getOperationLocationPollingUrl");function R4(t){return t.headers.location}o(R4,"getLocationHeader");function T4(t){return t.headers["operation-location"]}o(T4,"getOperationLocationHeader");function v4(t){return t.headers["azure-asyncoperation"]}o(v4,"getAzureAsyncOperationHeader");function Bxe(t){var e;let{location:r,requestMethod:s,requestPath:n,resourceLocationConfig:i}=t;switch(s){case"PUT":return n;case"DELETE":return;case"PATCH":return(e=a())!==null&&e!==void 0?e:n;default:return a()}function a(){switch(i){case"azure-async-operation":return;case"original-uri":return n;default:return r}}o(a,"getDefault")}o(Bxe,"findResourceLocation");function P4(t){let{rawResponse:e,requestMethod:r,requestPath:s,resourceLocationConfig:n}=t,i=T4(e),a=v4(e),c=S4({operationLocation:i,azureAsyncOperation:a}),l=R4(e),u=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:Bxe({requestMethod:u,location:l,requestPath:s,resourceLocationConfig:n})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:u==="PUT"&&s?{mode:"Body",operationLocation:s}:void 0}o(P4,"inferLroMode");function k4(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 kv(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 mc.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(k4,"transformStatus");function wxe(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return k4({status:r,statusCode:t.statusCode})}o(wxe,"getStatus");function bxe(t){var e,r;let{properties:s,provisioningState:n}=(e=t.body)!==null&&e!==void 0?e:{},i=(r=s?.provisioningState)!==null&&r!==void 0?r:n;return k4({status:i,statusCode:t.statusCode})}o(bxe,"getProvisioningState");function kv(t){return t===202?"running":t<300?"succeeded":"failed"}o(kv,"toOperationStatus");function D4({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?Qxe(new Date(e)):r*1e3}}o(D4,"parseRetryAfter");function _4(t){let e=t.flatResponse.error;if(!e){mc.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){mc.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}o(_4,"getErrorFromResponse");function Qxe(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}o(Qxe,"calculatePollingIntervalFromDate");function L4(t){let{response:e,state:r,operationLocation:s}=t;function n(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return kv(e.rawResponse.statusCode);case"Body":return Dv(e,r);default:return"running"}}o(n,"helper");let i=n();return i==="running"&&s===void 0?"succeeded":i}o(L4,"getStatusFromInitialResponse");async function xxe(t){let{stateProxy:e,resourceLocationConfig:r,processResult:s,lro:n,setErrorAsResult:i}=t;return x4({init:o(async()=>{let a=await n.sendInitialRequest(),c=P4({rawResponse:a.rawResponse,requestPath:n.requestPath,requestMethod:n.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},"init"),stateProxy:e,processResult:s?({flatResponse:a},c)=>s(a,c):({flatResponse:a})=>a,getOperationStatus:L4,setErrorAsResult:i})}o(xxe,"initHttpOperation");function M4({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r==Line truncated
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(n){case 0:a=i,n=1;break;case 1:r[s++]=a<<2|(i&48)>>4,a=i,n=2;break;case 2:r[s++]=(a&15)<<4|(i&60)>>2,a=i,n=3;break;case 3:r[s++]=(a&3)<<6|i,n=0;break}}if(n==1)throw Error("invalid base64 string.");return r.subarray(0,s)}o(l0e,"base64decode");Su.base64decode=l0e;function u0e(t){let e="",r=0,s,n=0;for(let i=0;i<t.length;i++)switch(s=t[i],r){case 0:e+=eo[s>>2],n=(s&3)<<4,r=1;break;case 1:e+=eo[n|s>>4],n=(s&15)<<2,r=2;break;case 2:e+=eo[n|s>>6],e+=eo[s&63],r=0;break}return r&&(e+=eo[n],e+="=",r==1&&(e+="=")),e}o(u0e,"base64encode");Su.base64encode=u0e});var f8=f(oC=>{"use strict";Object.defineProperty(oC,"__esModule",{value:!0});oC.utf8read=void 0;var Vv=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function A0e(t){if(t.length<1)return"";let e=0,r=[],s=[],n=0,i,a=t.length;for(;e<a;)i=t[e++],i<128?s[n++]=i:i>191&&i<224?s[n++]=(i&31)<<6|t[e++]&63:i>239&&i<365?(i=((i&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,s[n++]=55296+(i>>10),s[n++]=56320+(i&1023)):s[n++]=(i&15)<<12|(t[e++]&63)<<6|t[e++]&63,n>8191&&(r.push(Vv(s)),n=0);return r.length?(n&&r.push(Vv(s.slice(0,n))),r.join("")):Vv(s.slice(0,n))}o(A0e,"utf8read");oC.utf8read=A0e});var Yp=f(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.WireType=di.mergeBinaryOptions=di.UnknownFieldHandler=void 0;var d0e;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,s,n,i,a)=>{(e(s)?s[t.symbol]:s[t.symbol]=[]).push({no:n,wireType:i,data:a})},t.onWrite=(r,s,n)=>{for(let{no:i,wireType:a,data:c}of t.list(s))n.tag(i,a).raw(c)},t.list=(r,s)=>{if(e(r)){let n=r[t.symbol];return s?n.filter(i=>i.no==s):n}return[]},t.last=(r,s)=>t.list(r,s).slice(-1)[0];let e=o(r=>r&&Array.isArray(r[t.symbol]),"is")})(d0e=di.UnknownFieldHandler||(di.UnknownFieldHandler={}));function p0e(t,e){return Object.assign(Object.assign({},t),e)}o(p0e,"mergeBinaryOptions");di.mergeBinaryOptions=p0e;var m0e;(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"})(m0e=di.WireType||(di.WireType={}))});var cC=f(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.varint32read=Fr.varint32write=Fr.int64toString=Fr.int64fromString=Fr.varint64write=Fr.varint64read=void 0;function h0e(){let t=0,e=0;for(let s=0;s<28;s+=7){let n=this.buf[this.pos++];if(t|=(n&127)<<s,(n&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let s=3;s<=31;s+=7){let n=this.buf[this.pos++];if(e|=(n&127)<<s,(n&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(h0e,"varint64read");Fr.varint64read=h0e;function f0e(t,e,r){for(let i=0;i<28;i=i+7){let a=t>>>i,c=!(!(a>>>7)&&e==0),l=(c?a|128:a)&255;if(r.push(l),!c)return}let s=t>>>28&15|(e&7)<<4,n=e>>3!=0;if(r.push((n?s|128:s)&255),!!n){for(let i=3;i<31;i=i+7){let a=e>>>i,c=!!(a>>>7),l=(c?a|128:a)&255;if(r.push(l),!c)return}r.push(e>>>31&1)}}o(f0e,"varint64write");Fr.varint64write=f0e;var aC=65536*65536;function g0e(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,s=0,n=0;function i(a,c){let l=Number(t.slice(a,c));n*=r,s=s*r+l,s>=aC&&(n=n+(s/aC|0),s=s%aC)}return o(i,"add1e6digit"),i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,s,n]}o(g0e,"int64fromString");Fr.int64fromString=g0e;function E0e(t,e){if(e>>>0<=2097151)return""+(aC*e+(t>>>0));let r=t&16777215,s=(t>>>24|e<<8)>>>0&16777215,n=e>>16&65535,i=r+s*6777216+n*6710656,a=s+n*8147497,c=n*2,l=1e7;i>=l&&(a+=Math.floor(i/l),i%=l),a>=l&&(c+=Math.floor(a/l),a%=l);function u(A,d){let p=A?String(A):"";return d?"0000000".slice(p.length)+p:p}return o(u,"decimalFrom1e7"),u(c,0)+u(a,c)+u(i,1)}o(E0e,"int64toString");Fr.int64toString=E0e;function y0e(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}o(y0e,"varint32write");Fr.varint32write=y0e;function C0e(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(C0e,"varint32read");Fr.varint32read=C0e});var ta=f(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.PbLong=ea.PbULong=ea.detectBi=void 0;var $p=cC(),De;function g8(){let t=new DataView(new ArrayBuffer(8));De=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" Line truncated
`)}};_C.RpcError=EP});var CP=f(MC=>{"use strict";Object.defineProperty(MC,"__esModule",{value:!0});MC.mergeRpcOptions=void 0;var W8=ht();function GNe(t,e){if(!e)return t;let r={};LC(t,r),LC(e,r);for(let s of Object.keys(e)){let n=e[s];switch(s){case"jsonOptions":r.jsonOptions=W8.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=W8.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},LC(t.meta,r.meta),LC(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(n):n.concat();break}}return r}o(GNe,"mergeRpcOptions");MC.mergeRpcOptions=GNe;function LC(t,e){if(!t)return;let r=e;for(let[s,n]of Object.entries(t))n instanceof Date?r[s]=new Date(n.getTime()):Array.isArray(n)?r[s]=n.concat():r[s]=n}o(LC,"copy")});var BP=f(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});yc.Deferred=yc.DeferredState=void 0;var hi;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(hi=yc.DeferredState||(yc.DeferredState={}));var IP=class{static{o(this,"Deferred")}constructor(e=!0){this._state=hi.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!==hi.PENDING)throw new Error(`cannot resolve ${hi[this.state].toLowerCase()}`);this._resolve(e),this._state=hi.RESOLVED}reject(e){if(this.state!==hi.PENDING)throw new Error(`cannot reject ${hi[this.state].toLowerCase()}`);this._reject(e),this._state=hi.REJECTED}resolvePending(e){this._state===hi.PENDING&&this.resolve(e)}rejectPending(e){this._state===hi.PENDING&&this.reject(e)}};yc.Deferred=IP});var bP=f(FC=>{"use strict";Object.defineProperty(FC,"__esModule",{value:!0});FC.RpcOutputStreamController=void 0;var j8=BP(),Cc=ht(),wP=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let s=r.indexOf(e);s>=0&&r.splice(s,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,s){Cc.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){Cc.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){Cc.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(){Cc.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:o(()=>{let e=this._itState;Cc.assert(e,"bad state"),Cc.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 j8.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let s=r.p;Cc.assert(s.state==j8.DeferredState.PENDING,"iterator contract broken"),"value"in e?s.resolve(e):s.reject(e),delete r.p}else r.q.push(e)}};FC.RpcOutputStreamController=wP});var xP=f(_u=>{"use strict";var HNe=_u&&_u.__awaiter||function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){try{u(s.throw(A))}catch(d){a(d)}}o(l,"rejected");function u(A){A.done?i(A.value):n(A.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})};Object.defineProperty(_u,"__esModule",{value:!0});_u.UnaryCall=void 0;var QP=class{static{o(this,"UnaryCall")}constructor(e,r,s,n,i,a,c){this.method=e,this.requestHeaders=r,this.request=s,this.headers=n,this.response=i,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(s=>e?Promise.resolve(e(s)):s,s=>r?Promise.resolve(r(s)):Promise.reject(s))}promiseFinished(){return HNe(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}})}};_u.UnaryCall=QP});var SP=f(Lu=>{"use strict";var zNe=Lu&&Lu.__awaiter||function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){t Line truncated
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(WPe,"logUnexpecedPropertyAccessOnce");function jPe(){Object.keys(II).forEach(function(t){delete II[t]})}o(jPe,"resetLoggedProperties")});var wI=f(yi=>{"use strict";yi.__esModule=!0;yi.HandlebarsEnvironment=Jk;function l6(t){return t&&t.__esModule?t:{default:t}}o(l6,"_interopRequireDefault");var Nc=Er(),KPe=hs(),Yk=l6(KPe),XPe=Gk(),ZPe=i6(),eke=zk(),BI=l6(eke),tke=Vk(),rke="4.7.9";yi.VERSION=rke;var ske=8;yi.COMPILER_REVISION=ske;var nke=7;yi.LAST_COMPATIBLE_COMPILER_REVISION=nke;var ike={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};yi.REVISION_CHANGES=ike;var $k="[object Object]";function Jk(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},XPe.registerDefaultHelpers(this),ZPe.registerDefaultDecorators(this)}o(Jk,"HandlebarsEnvironment");Jk.prototype={constructor:Jk,logger:BI.default,log:BI.default.log,registerHelper:o(function(e,r){if(Nc.toString.call(e)===$k){if(r)throw new Yk.default("Arg not supported with multiple helpers");Nc.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:o(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:o(function(e,r){if(Nc.toString.call(e)===$k)Nc.extend(this.partials,e);else{if(typeof r>"u")throw new Yk.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:o(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:o(function(e,r){if(Nc.toString.call(e)===$k){if(r)throw new Yk.default("Arg not supported with multiple decorators");Nc.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){tke.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var oke=BI.default.log;yi.log=oke;yi.createFrame=Nc.createFrame;yi.logger=BI.default});var A6=f((bI,u6)=>{"use strict";bI.__esModule=!0;function Wk(t){this.string=t}o(Wk,"SafeString");Wk.prototype.toString=Wk.prototype.toHTML=function(){return""+this.string};bI.default=Wk;u6.exports=bI.default});var d6=f(jk=>{"use strict";jk.__esModule=!0;jk.wrapHelper=ake;function ake(t,e){if(typeof t!="function")return t;var r=o(function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=e(n),t.apply(this,arguments)},"wrapper");return r}o(ake,"wrapHelper")});var E6=f(ia=>{"use strict";ia.__esModule=!0;ia.checkRevision=pke;ia.template=mke;ia.wrapProgram=QI;ia.resolvePartial=hke;ia.invokePartial=fke;ia.noop=f6;function cke(t){return t&&t.__esModule?t:{default:t}}o(cke,"_interopRequireDefault");function lke(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(lke,"_interopRequireWildcard");var uke=Er(),Wu=lke(uke),Ake=hs(),no=cke(Ake),io=wI(),p6=Gk(),dke=d6(),m6=Vk();function pke(t){var e=t&&t[0]||1,r=io.COMPILER_REVISION;if(!(e>=io.LAST_COMPATIBLE_COMPILER_REVISION&&e<=io.COMPILER_REVISION))if(e<io.LAST_COMPATIBLE_COMPILER_REVISION){var s=io.REVISION_CHANGES[r],n=io.REVISION_CHANGES[e];throw new no.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+n+").")}else throw new no.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}o(pke,"checkRevision");function mke(t,e){if(!e)throw new no.default("No environment passed to template");if(!t||!t.main)throw new no.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function s(a,c,l){l.hash&&(c=Wu.extend({},c,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,c,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var u=e.VM.invokePartial.call(this,a,c,l);if(u==null&&e.compile&&(l.partials[l.name]=e.compile(a,t.compilerOptions,e),u=l.partials[l.name](c,l)),u!=null){if(l.indent){for(var A=u.split(`
`),d=0,p=A.length;d<p&&!(!A[d]&&d+1===p);d++)A[d]=l.indent+A[d];u=A.join(`
`)}return u}else throw new no.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}o(s,"invokePartialWrapper");var n={strict:o(function(c,l,u){if(!c||!(l in c))throw new no.default('"'+l+'" not defined in '+c,{loc:u});return n.lookupProperty(c,l)},"strict"),lookupProperty:o(function(c,l){var u=c[l];if(u==null||Object.prototype.hasOwnProperty.call(c,l)||m6.resultIsAllowed(u,n.protoAccessControl,l))return u},"lookupProperty"),lookup:o(function(c,l){for(var u=c.length,A=0;A<u;A++){var d=c[A]&&n.lookupProperty(c[A],l);if(d!=null)return d}},"lookup"),lambda:o(function(c,l){return typeof c=="function"?c.call(l):c},"lambda"),escapeExpression:Wu.escapeExpression,invokePartial:s,fn:o(function(c){var l=t[c];return l.decorator=t[c+"_d"],l},"fn"),programs:[],program:o(function(c,l,u,A,d){var p=this.programs[c],m=this.fn(c);return l||d||A||u?p=QI(this,c,m,l,u,A,d):p||(p=this.programs[c]=QI(this,c,m)),p},"program"),data:o(function(c,l){for(;c&&l--;)c=c._parent;return c},"data"),mergeIfNeeded:o(function(c,l){var u=c||l;return c&&l&&c!==l&&(u=Wu.extend({},l,c)),u},"mergeIfNeeded"),nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function i(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=c.data;i._setup(c),!c.partial&&t.useData&&(l=gke(a,l));var u=void 0,A=t.useBlockParams?[]:void 0;t.useDepths&&(c.depths?u=a!=c.depths[0]?[a].concat(c.depths):c.depths:u=[a]);function d(p){return""+t.main(n,p,n.helpers,n.partials,l,A,u)}return o(d,"main"),d=g6(t.main,d,n,c.depths||[],l,A),d(a,c)}return o(i,"ret"),i.isTop=!0,i._setup=function(a){if(a.partial)n.protoAccessControl=a.protoAccessControl,n.helpers=a.helpers,n.partials=a.partials,n.decorators=a.decorators,n.hooks=a.hooks;else{var c={};h6(c,e.helpers,n),h6(c,a.helpers,n),n.helpers=c,t.usePartial&&(n.partials=n.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(n.decorators=Wu.extend({},e.decorators,a.decorators)),n.hooks={},n.protoAccessControl=m6.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||r;p6.moveHelperToHooks(n,"helperMissing",l),p6.moveHelperToHooks(n,"blockHelperMissing",l)}},i._child=function(a,c,l,u){if(t.useBlockParams&&!l)throw new no.default("must pass block params");if(t.useDepths&&!u)throw new no.default("must pass parent depths");return QI(n,a,t[a],c,0,l,u)},i}o(mke,"template");function QI(t,e,r,s,n,i,a){function c(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],A=a;return a&&l!=a[0]&&!(l===t.nullContext&&a[0]===null)&&(A=[l].concat(a)),r(t,l,t.helpers,t.partials,u.data||s,i&&[u.blockParams].concat(i),A)}return o(c,"prog"),c=g6(r,c,t,a,s,i),c.program=e,c.depth=a?a.length:0,c.blockParams=n||0,c}o(QI,"wrapProgram");function hke(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=xI(r.partials,t)):r.name==="@partial-block"?t=xI(r.data,"partial-block"):t=xI(r.partials,r.name),t}o(hke,"resolvePartial");function fke(t,e,r){var s=xI(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var n=void 0;if(r.fn&&r.fn!==f6&&(function(){r.data=io.createFrame(r.data);var i=r.fn;n=r.data["partial-block"]=o(function(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=io.createFrame(l.data),l.data["partial-block"]=s,i(c,l)},"partialBlockWrapper"),i.partials&&(r.partials=Wu.extend({},r.partials,i.partials))})(),t===void 0&&n&&(t=n),t===void 0)throw new no.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}o(fke,"invokePartial");function f6(){return""}o(f6,"noop");function xI(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}o(xI,"lookupOwnProperty");function gke(t,e){return(!e||!("root"in e))&&(e=e?io.createFrame(e):{},e.root=t),e}o(gke,"initData");function g6(t,e,r,s,n,i){if(t.decorator){var a={};e=t.decorator(e,a,r,s&&s[0],n,i,s),Wu.extend(e,a)}return e}o(g6,"executeDecorators");function h6(t,e,r){e&&Object.keys(e).forEach(function(s){var n=e[s];t[s]=Eke(n,r)})}o(h6,"addHelpers");function Eke(t,e){var r=e.lookupProperty;return dke.wrapHelper(t,function(s){return s.lookupProperty=r,s})}o(Eke,"passLookupPropertyOption")});var Kk=f((NI,y6)=>{"use strict";NI.__esModule=!0;NI.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};y6.exports=NI.default});var b6=f((SI,w6)=>{"use strict";SI.__esModule=!0;function Zk(t){return t&&t.__esModule?t:{default:t}}o(Zk,"_interopRequireDefault");function eD(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(eD,"_interopRequireWildcard");var yke=wI(),C6=eD(yke),Cke=A6(),Ike=Zk(Cke),Bke=hs(),wke=Zk(Bke),bke=Er(),Xk=eD(bke),Qke=E6(),I6=eD(Qke),xke=Kk() Line truncated
`+this.lexer.showPosition()+`
Expecting `+se.join(", ")+", got '"+(this.terminals_[B]||B)+"'":tr="Parse error on line "+(d+1)+": Unexpected "+(B==1?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(tr,{text:this.lexer.match,token:this.terminals_[B]||B,line:this.lexer.yylineno,loc:C,expected:se})}}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+B);switch(U[0]){case 1:a.push(B),c.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(U[1]),B=null,N?(B=N,N=null):(p=this.lexer.yyleng,A=this.lexer.yytext,d=this.lexer.yylineno,C=this.lexer.yylloc,m>0&&m--);break;case 2:if(Ae=this.productions_[U[1]][1],Qe.$=c[c.length-Ae],Qe._$={first_line:l[l.length-(Ae||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(Ae||1)].first_column,last_column:l[l.length-1].last_column},E&&(Qe._$.range=[l[l.length-(Ae||1)].range[0],l[l.length-1].range[1]]),Se=this.performAction.call(Qe,A,p,d,this.yy,U[1],c,l),typeof Se<"u")return Se;Ae&&(a=a.slice(0,-1*Ae*2),c=c.slice(0,-1*Ae),l=l.slice(0,-1*Ae)),a.push(this.productions_[U[1]][0]),c.push(Qe.$),l.push(Qe._$),_e=u[a[a.length-2]][a[a.length-1]],a.push(_e);break;case 3:return!0}}return!0},"parse")},e=(function(){var s={EOF:1,parseError:o(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:o(function(i){return this._input=i,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===l.length?this.yylloc.first_column:0)+l[l.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-a]),this},"unput"),more:o(function(){return this._more=!0,this},"more"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
`+a+"^"},"showPosition"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,l,u,A;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),p=0;p<d.length&&(c=this._input.match(this.rules[d[p]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,l=p,!this.options.flex)));p++);return a?(A=a[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],i=this.performAction.call(this,this.yy,this,d[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var i=this.next();return typeof i<"u"?i:this.lex()},"lex"),begin:o(function(i){this.conditionStack.push(i)},"begin"),popState:o(function(){return this.conditionStack.pop()},"popState"),_currentRules:o(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:o(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:o(function(i){this.begin(i)},"begin")};return s.options={},s.performAction=o(function(i,a,c,l){function u(d,p){return a.yytext=a.yytext.substring(d,a.yyleng-p+d)}o(u,"strip");var A=l;switch(c){case 0:if(a.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),s.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],s.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},s})();t.lexer=e;function r(){this.yy={}}return o(r,"Parser"),r.prototype=t,t.Parser=r,new r})();TI.default=Ske;N6.exports=TI.default});var DI=f((kI,v6)=>{"use strict";kI.__esModule=!0;function Rke(t){return t&&t.__esModule?t:{default:t}}o(Rke,"_interopRequireDefault");var Tke=hs(),rD=Rke(Tke);function vI(){this.parents=[]}o(vI,"Visitor");vI.prototype={constructor:vI,mutating:!1,acceptKey:o(function(e,r){var s=this.accept(e[r]);if(this.mutating){if(s&&!vI.prototype[s.type])throw new rD.default('Unexpected node type "'+s.type+'" found when accepting '+r+" on "+e.type);e[r]=s}},"acceptKey"),acceptRequired:o(function(e,r){if(this.acceptKey(e,r),!e[r])throw new rD.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:o(function(e){for(var r=0,s=e.length;r<s;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,s--)},"acceptArray"),accept:o(function(e){if(e){if(!this[e.type])throw new rD.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},"accept"),Program:o(function(e){this.acceptArray(e.body)},"Program"),MustacheStatement:PI,Decorator:PI,BlockStatement:R6,DecoratorBlock:R6,PartialStatement:T6,PartialBlockStatement:o(function(e){T6.call(this,e),this.acceptKey(e,"program")},"PartialBlockStatement"),ContentStatement:o(function(){},"ContentStatement"),CommentStatement:o(function(){},"CommentStatement"),SubExpression:PI,PathExpression:o(function(){},"PathExpression"),StrLine truncated
`])}),e},"merge"),each:o(function(e){for(var r=0,s=this.source.length;r<s;r++)e(this.source[r])},"each"),empty:o(function(){var e=this.currentLocation||{start:{}};return new vc(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:o(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof vc?e:(e=bD(e,this,r),new vc(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:o(function(e,r,s){return s=this.generateList(s),this.wrap([e,r?"."+r+"(":"(",s,")"])},"functionCall"),quotedString:o(function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:o(function(e){var r=this,s=[];Object.keys(e).forEach(function(i){var a=bD(e[i],r);a!=="undefined"&&s.push([r.quotedString(i),":",a])});var n=this.generateList(s);return n.prepend("{"),n.add("}"),n},"objectLiteral"),generateList:o(function(e){for(var r=this.empty(),s=0,n=e.length;s<n;s++)s&&r.add(","),r.add(bD(e[s],this));return r},"generateList"),generateArray:o(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};GI.default=dK;pK.exports=GI.default});var yK=f((HI,EK)=>{"use strict";HI.__esModule=!0;function gK(t){return t&&t.__esModule?t:{default:t}}o(gK,"_interopRequireDefault");var hK=wI(),NDe=hs(),xD=gK(NDe),SDe=Er(),RDe=mK(),fK=gK(RDe);function tA(t){this.value=t}o(tA,"Literal");function rA(){}o(rA,"JavaScriptCompiler");rA.prototype={nameLookup:o(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:o(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:o(function(){var e=hK.COMPILER_REVISION,r=hK.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:o(function(e,r,s){return SDe.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:s?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:o(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:o(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:o(function(e,r,s,n){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!n,this.name=this.environment.name,this.isChild=!!s,this.context=s||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var i=e.opcodes,a=void 0,c=void 0,l=void 0,u=void 0;for(l=0,u=i.length;l<u;l++)a=i[l],this.source.currentLocation=a.loc,c=c||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=c,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new xD.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
`]),this.decorators.push("return fn;"),n?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
`),this.decorators.push(`}
`),this.decorators=this.decorators.merge()));var A=this.createFunctionContext(n);if(this.isChild)return A;var d={compiler:this.compilerInfo(),main:A};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var p=this.context,m=p.programs,h=p.decorators;for(l=0,u=m.length;l<u;l++)d[l]=m[l],h[l]&&(d[l+"_d"]=h[l],d.useDecorators=!0);return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),n?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),r.srcName?(d=d.toStringWithSourceMap({file:r.destName}),d.map=d.map&&d.map.toString()):d=d.toString()),d},"compile"),preamble:o(function(){this.lastContext=0,this.source=new fK.default(this.options.srcName),this.decorators=new fK.default(this.options.srcName)},"preamble"),createFunctionContext:o(function(e){var r=this,s="",n=this.stackVars.concat(this.registers.list);n.length>0&&(s+=", "+n.join(", "));var i=0;Object.keys(this.aliases).forEach(function(l){var u=r.aliases[l];u.children&&u.referenceCount>1&&(s+=", alias"+ ++i+"="+l,u.children[0]="alias"+i)}),this.lookupPropertyFunctionIsUsed&&(s+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var c=this.mergeSource(s);return e?(a.push(c),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
`,c,"}"])},"createFunctionContext"),mergeSource:o(function(e){var r=this.environment.isSimple,s=!this.forceBuffer,n=void 0,i=void 0,a=void 0,c=void 0;return this.source.each(function(l){l.appendToBuffer?(a?l.prepend(" + "):a=l,c=l):(a&&(i?a.prepend("buffer += "):n=!0,c.add(";"),a=c=void 0),i=!0,r||(s=!1))}),s?a?(a.prepend("return "),c.add(";")):i||this.source.push('return "";'):(e+=", buffer = "+(n?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),c.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(n?"":`;
`)),this.source.merge()},"mergeSource"),lookupPropertyFunctionVarDeclaration:o(function(){return`
lookupProperty = container.lookupProperty || function(parent, propertyName) {
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
return parent[propertyName];
}
return undefined
}
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:o(function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),s=[this.contextName(0)];this.setupHelperArgs(e,0,s);var n=this.popStack();s.splice(1,0,n),this.push(this.source.functionCall(r,"call",s))},"blockValue"),ambiguousBlockValue:o(function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var s=this.topStack();r.splice(1,0,s),this.pushSource(["if (!",this.lastHelper,") { ",s," = ",this.source.functionCall(e,"call",r),"}"])},"ambiguousBlockValue"),appendContent:o(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:o(function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},"append"),appendEscaped:o(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:o(function(e){this.lastContext=e},"getContext"),pushContext:o(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:o(function(e,r,s,n){var i=0;!n&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[i++])):this.pushContext(),this.resolvePath("context",e,i,r,s)},"lookupOnContext"),lookupBlockParam:o(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:o(function(e,r,s){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,s)},"lookupData"),resolvePath:o(function(e,r,s,n,i){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(TDe(this.options.strict&&i,this,r,s,e));return}for(var c=r.length,l=o(function(A){a.replaceStack(function(d){var p=a.nameLookup(d,r[A],e);return n?[" && ",p]:[" != null ? ",p," : ",d]})},"_loop"),u=s;u<c;u++)l(u)},"resolvePath"),resolvePossibleLambda:o(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:o(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:o(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:o(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:o(function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},"popHash"),pushString:o(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:o(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:o(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:o(function(e,r){var s=this.nameLookup("decorators",r,"decorator"),n=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",s,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",n])," || fn;"])},"registerDecorator"),invokeHelper:o(function(e,r,s){var n=this.popStack(),i=this.setupHelper(e,r),a=[];s&&a.push(i.name),a.push(n),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var c=["(",this.itemsSeparatedBy(a,"||"),")"],l=this.source.functionCall(c,"call",i.callParams);this.push(l)},"invokeHelper"),itemsSeparatedBy:o(function(e,r){var s=[];s.push(e[0]);for(var n=1;n<e.length;n++)s.push(r,e[n]);return s},"itemsSeparatedBy"),invokeKnownHelper:o(function(e,r){var s=this.setupHelper(e,r);this.push(this.source.functionCall(s.name,"call",s.callParams))},"invokeKnownHelper"),invokeAmbiguous:o(function(e,r){this.useRegister("helper");var s=this.popStack();this.emptyHash();var n=this.setupHelper(0,e,r),i=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",i," || ",s,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,n.paramsInit?["),(",n.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("h Line truncated
`,e};ct.prototype.Program=function(t){var e="",r=t.body,s=void 0,n=void 0;if(t.blockParams){var i="BLOCK PARAMS: [";for(s=0,n=t.blockParams.length;s<n;s++)i+=" "+t.blockParams[s];i+=" ]",e+=this.pad(i)}for(s=0,n=r.length;s<n;s++)e+=this.accept(r[s]);return this.padding--,e};ct.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};ct.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};ct.prototype.BlockStatement=ct.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};ct.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};ct.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};ct.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};ct.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};ct.prototype.SubExpression=function(t){for(var e=t.params,r=[],s=void 0,n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return e="["+r.join(", ")+"]",s=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+s};ct.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};ct.prototype.StringLiteral=function(t){return'"'+t.value+'"'};ct.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};ct.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};ct.prototype.UndefinedLiteral=function(){return"UNDEFINED"};ct.prototype.NullLiteral=function(){return"NULL"};ct.prototype.Hash=function(t){for(var e=t.pairs,r=[],s=0,n=e.length;s<n;s++)r.push(this.accept(e[s]));return"HASH{"+r.join(", ")+"}"};ct.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var NK=f((uut,xK)=>{var YI=BK().default,QK=wK();YI.PrintVisitor=QK.PrintVisitor;YI.print=QK.print;xK.exports=YI;function bK(t,e){var r=require("fs"),s=r.readFileSync(e,"utf8");t.exports=YI.compile(s)}o(bK,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=bK,require.extensions[".hbs"]=bK)});var qK=f(KI=>{"use strict";Object.defineProperty(KI,"__esModule",{value:!0});KI.getProxyUrl=WDe;KI.checkBypass=UK;function WDe(t){let e=t.protocol==="https:";if(UK(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new jI(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new jI(`http://${r}`)}else return}o(WDe,"getProxyUrl");function UK(t){if(!t.hostname)return!1;let e=t.hostname;if(jDe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let s;t.port?s=Number(t.port):t.protocol==="http:"?s=80:t.protocol==="https:"&&(s=443);let n=[t.hostname.toUpperCase()];typeof s=="number"&&n.push(`${n[0]}:${s}`);for(let i of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(i==="*"||n.some(a=>a===i||a.endsWith(`.${i}`)||i.startsWith(".")&&a.endsWith(`${i}`)))return!0;return!1}o(UK,"checkBypass");function jDe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(jDe,"isLoopbackAddress");var jI=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}});var HK=f(je=>{"use strict";var KDe=je&&je.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),XDe=je&&je.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),tB=je&&je.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n<s.length;n++)s[n]!=="default"&&KDe(r,e,s[n]);return XDe(r,e),r}})(),gt=je&&je._ 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 Pd(i));return s.searchPaths.push(...Dx(s.patterns)),s})}static stat(e,r,s){return qx(this,void 0,void 0,function*(){let n;if(r.followSymbolicLinks)try{n=yield zl.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){xs(`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 zl.promises.lstat(e.path);if(n.isDirectory()&&r.followSymbolicLinks){let i=yield zl.promises.realpath(e.path);for(;s.length>=e.level;)s.pop();if(s.some(a=>a===i)){xs(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}s.push(i)}return n})}};var Ihe=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){try{u(s.throw(A))}catch(d){a(d)}}o(l,"rejected");function u(A){A.done?i(A.value):n(A.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})};function Fz(t,e){return Ihe(this,void 0,void 0,function*(){return yield ag.create(t,e)})}o(Fz,"create");var bg=w(require("crypto"),1),Jl=w(require("fs"),1),za=w(require("path"),1),vY=w(RY(),1),PY=w(require("util"),1);var Od;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Od||(Od={}));var Ar;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Ar||(Ar={}));var ts;(function(t){t.GNU="gnu",t.BSD="bsd"})(ts||(ts={}));var Ig=2,Bg=5e3,c0=5e3,l0=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,TY=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,Ud="cache.tar",u0="manifest.txt",mze=10*Math.pow(1024,3),wg="cache read denied:";var $l=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){try{u(s.throw(A))}catch(d){a(d)}}o(l,"rejected");function u(A){A.done?i(A.value):n(A.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},SEe=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(i){r[i]=t[i]&&function(a){return new Promise(function(c,l){a=t[i](a),n(c,l,a.done,a.value)})}}function n(i,a,c,l){Promise.resolve(l).then(function(u){i({value:u,done:c})},a)}},REe="1.0";function qd(){return $l(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=za.join(s,"actions","temp")}let r=za.join(e,bg.randomUUID());return yield Fa(r),r})}o(qd,"createTempDirectory");function Ln(t){return Jl.statSync(t).size}o(Ln,"getArchiveFileSizeInBytes");function A0(t){return $l(this,void 0,void 0,function*(){var e,r,s,n,i;let a=[],c=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),l=yield Fz(t.join(`
`),{implicitDescendants:!1});try{for(var u=!0,A=SEe(l.globGenerator()),d;d=yield A.next(),e=d.done,!e;u=!0){n=d.value,u=!1;let m=za.relative(c,n).replace(new RegExp(`\\${za.sep}`,"g"),"/");b(`Matched: ${m}`),m===""?a.push("."):a.push(`${m}`)}}catch(p){r={error:p}}finally{try{!u&&!e&&(s=A.return)&&(yield s.call(A))}finally{if(r)throw r.error}}return a})}o(A0,"resolvePaths");function Gd(t){return $l(this,void 0,void 0,function*(){return PY.promisify(Jl.unlink)(t)})}o(Gd,"unlinkFile");function kY(t){return $l(this,arguments,void 0,function*(e,r=[]){let s="";r.push("--version"),b(`Checking ${e} ${r.join(" ")}`);try{yield Po(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:o(n=>s+=n.toString(),"stdout"),stderr:o(n=>s+=n.toString(),"stderr")}})}catch(n){b(n.message)}return s=s.trim(),b(s),s})}o(kY,"getVersion");function Hd(){return $l(this,void 0,void 0,function*(){let t=yield kY("zstd",["--quiet"]),e=vY.clean(t);return b(`zstd version: ${e}`),t===""?Ar.Gzip:Ar.ZstdWithoutLong})}o(Hd,"getCompressionMethod");function Uo(t){return t===Ar.Gzip?Od.Gzip:Od.Zstd}o(Uo,"getCacheFileName");function DY(){return $l(this,void 0,void 0,function*(){return Jl.existsSync(l0)?l0:(yield kY("tar")).toLowerCase().includes("gnu tar")?Nr("tar"):""})}o(DY,"getGnuTarPathOnWindows");function d0(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(d0,"assertDefined");function Wl(t,e,r=!1){let s=t.slice();return e&&s.push(e),process.platform==="win32"&&!r&&s.push("windows-only"),s.push(REe),bg.createHash("sha256").update(s.join("|")).digest("hex")}o(Wl,"getCacheVersion");function _Y(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(_Y,"getRuntimeToken");var Vd=w(require("http"),1),h0=w(require("https"),1);function p0(t){let e=t.protocol==="https:";if(TEe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new xg(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new xg(`http://${r}`)}else return}o(p0,"getProxyUrl");function TEe(t){if(!t.hostname)return!1;let e=t.hostname;if(vEe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let s;t.port?s=Number(t.port):t.protocol==="http:"?s=80:t.protocol==="https:"&&(s=443);let n=[t.hostname.toUpperCase()];typeof s=="number"&&n.push(`${n[0]}:${s}`);for(let i of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(i==="*"||n.some(a=>a===i||a.endsWith(`.${i}`)||i.startsWith(".")&&a.endsWith(`${i}`)))return!0;return!1}o(TEe,"checkBypass");function vEe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(vEe,"isLoopbackAddress");var xg=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var qo=w(AA(),1),LY=w(kl(),1);var At=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){try{u(s.throw(A))}catch(d){a(d)}}o(l,"rejected");function u(A){A.done?i(A.value):n(A.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},et;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(et||(et={}));var dr;(function(t){t.Accept="accept",t.ContentType="content-type"})(dr||(dr={}));var Oi;(function(t){t.ApplicationJson="application/json"})(Oi||(Oi={}));var kEe=[et.MovedPermanently,et.ResourceMoved,et.SeeOther,et.TemporaryRedirect,et.PermanentRedirect],DEe=[et.BadGateway,et.ServiceUnavailable,et.GatewayTimeout],_Ee=["OPTIONS","GET","DELETE","HEAD"],LEe=10,MEe=5,Mn=class t extends Error{static{o(this,"HttpClientError")}constructor(e,r) Line truncated
${YEe.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Pg(t){return t instanceof pr?!0:Ya(t)&&t.name==="RestError"}o(Pg,"isRestError");function Rr(t,e){return Buffer.from(t,e)}o(Rr,"stringToUint8Array");var kg=w(require("node:http"),1),Dg=w(require("node:https"),1),Q0=w(require("node:zlib"),1),e$=require("node:stream");var Rs=Yd("ts-http-runtime");var $Ee={};function $d(t){return t&&typeof t.pipe=="function"}o($d,"isReadableStream");function ZY(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}o(ZY,"isStreamComplete");function t$(t){return t&&typeof t.byteLength=="number"}o(t$,"isArrayBuffer");var _g=class extends e$.Transform{static{o(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,s){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),s()}catch(n){s(n)}}constructor(e){super(),this.progressCallback=e}},x0=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new Fn("The operation was aborted. Request has already been canceled.");s=o(u=>{u.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",s)}let n;e.timeout>0&&(n=setTimeout(()=>{let u=new ln;Rs.info(`request to '${u.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),a=i?.includes("gzip")||i?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let u=KEe(c);u!==null&&e.headers.set("Content-Length",u)}let l;try{if(c&&e.onUploadProgress){let h=e.onUploadProgress,g=new _g(h);g.on("error",C=>{Rs.error("Error in upload progress",C)}),$d(c)?c.pipe(g):g.end(c),c=g}let u=await this.makeRequest(e,r,c);n!==void 0&&clearTimeout(n);let A=JEe(u),p={status:u.statusCode??0,headers:A,request:e};if(e.method==="HEAD")return u.resume(),p;l=a?WEe(u,A):u;let m=e.onDownloadProgress;if(m){let h=new _g(m);h.on("error",g=>{Rs.error("Error in download progress",g)}),l.pipe(h),l=h}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(p.status)?p.readableStreamBody=l:p.bodyAsText=await jEe(l),p}finally{if(e.abortSignal&&s){let u=Promise.resolve();$d(c)&&(u=ZY(c));let A=Promise.resolve();$d(l)&&(A=ZY(l)),Promise.all([u,A]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(d=>{Rs.warning("Error when cleaning up abortListener on httpRequest",d)})}}}makeRequest(e,r,s){let n=new URL(e.url),i=n.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,i),hostname:n.hostname,path:`${n.pathname}${n.search}`,port:n.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((l,u)=>{let A=i?kg.default.request(c,l):Dg.default.request(c,l);A.once("error",d=>{u(new pr(d.message,{code:d.code??pr.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let d=new Fn("The operation was aborted. Rejecting from abort signal callback while making request.");A.destroy(d),u(d)}),s&&$d(s)?s.pipe(A):s?typeof s=="string"||Buffer.isBuffer(s)?A.end(s):t$(s)?A.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(Rs.error("Unrecognized body type",s),u(new pr("Unrecognized body type"))):A.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?kg.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new kg.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return Dg.default.globalAgent;let n=e.tlsSettings??$Ee,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(Rs.info("No cached TLS Agent exist, creating a new Agent"),i=new Dg.default.Agent({keepAlive:!s,...n}),this.cachedHttpsAgents.set(n,i)),i}}};function JEe(t){let e=rs();for(let r of Object.keys(t.headers)){let s=t.headers[r];Array.isArray(s)?s.length>0&&e.set(r,s[0]):s&&e.set(r,s)}return e}o(JEe,"getResponseHeaders");function WEe(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let s=Q0.default.createGunzip();return t.pipe(s),s}else if(r==="deflate"){let s=Q0.default.createInflate();return t.pipe(s),s}return t}o(WEe,"getDecodedResponseStream");function jEe(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 pr(`Error reading response as text: ${n.message}`,{code:pr.PARSE_ERROR}))})})}o(jEe,"streamToText");function KEe(t){return t?Buffer.isBuffer(t)?t.length:$d(t)?nul Line truncated
`;return e}o(SCe,"encodeHeaders");function RCe(t){return t instanceof Uint8Array?t.byteLength:iE(t)?t.size===-1?void 0:t.size:void 0}o(RCe,"getLength");function TCe(t){let e=0;for(let r of t){let s=RCe(r);if(s===void 0)return;e+=s}return e}o(TCe,"getTotalLength");async function vCe(t,e,r){let s=[Rr(`--${r}`,"utf-8"),...e.flatMap(i=>[Rr(`\r
`,"utf-8"),Rr(SCe(i.headers),"utf-8"),Rr(`\r
`,"utf-8"),i.body,Rr(`\r
--${r}`,"utf-8")]),Rr(`--\r
\r
`,"utf-8")],n=TCe(s);n&&t.headers.set("Content-Length",n),t.body=await oJ(s)}o(vCe,"buildRequestBody");var jd="multipartPolicy",PCe=70,kCe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function DCe(t){if(t.length>PCe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!kCe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}o(DCe,"assertValidBoundary");function aE(){return{name:jd,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,s=t.headers.get("Content-Type")??"multipart/mixed",n=s.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!n)throw new Error(`Got multipart request body, but content-type header was not multipart: ${s}`);let[,i,a]=n;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?DCe(r):r=NCe(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await vCe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(aE,"multipartPolicy");function cE(){return vg()}o(cE,"createEmptyPipeline");var aJ=Sg({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),d3e=aJ.logger;function qn(t){return aJ.createClientLogger(t)}o(qn,"createClientLogger");var Gn=qn("core-rest-pipeline");function z0(t={}){return Mg({logger:Gn.info,...t})}o(z0,"logPolicy");var V0=Fg;function Y0(t={}){return Og(t)}o(Y0,"redirectPolicy");var lE=w(require("node:os"),1),uE=w(require("node:process"),1);function cJ(){return"User-Agent"}o(cJ,"getHeaderName");async function lJ(t){if(uE.default&&uE.default.versions){let e=`${lE.default.type()} ${lE.default.release()}; ${lE.default.arch()}`,r=uE.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}o(lJ,"setPlatformSpecificData");var AE="1.22.2";function GCe(t){let e=[];for(let[r,s]of t){let n=s?`${r}/${s}`:r;e.push(n)}return e.join(" ")}o(GCe,"getUserAgentString");function uJ(){return cJ()}o(uJ,"getUserAgentHeaderName");async function dE(t){let e=new Map;e.set("core-rest-pipeline",AE),await lJ(e);let r=GCe(e);return t?`${t} ${r}`:r}o(dE,"getUserAgentValue");var AJ=uJ(),dJ="userAgentPolicy";function $0(t={}){let e=dE(t.userAgentPrefix);return{name:dJ,async sendRequest(r,s){return r.headers.has(AJ)||r.headers.set(AJ,await e),s(r)}}}o($0,"userAgentPolicy");var os=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function J0(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,a)=>{function c(){a(new os(n??"The operation was aborted."))}o(c,"rejectOnAbort");function l(){s?.removeEventListener("abort",u)}o(l,"removeListeners");function u(){r?.(),l(),c()}if(o(u,"onAbort"),s?.aborted)return c();try{t(A=>{l(),i(A)},A=>{l(),a(A)})}catch(A){a(A)}s?.addEventListener("abort",u)})}o(J0,"createAbortablePromise");var $Ce="The delay was aborted.";function Kd(t,e){let r,{abortSignal:s,abortErrorMsg:n}=e??{};return J0(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:s,abortErrorMsg:n??$Ce})}o(Kd,"delay");function Ho(t){if(Ya(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}o(Ho,"getErrorMessage");function pJ(t){return Ya(t)}o(pJ,"isError");function nu(){return Va()}o(nu,"randomUUID");var we=Wa;var mJ=Symbol("rawContent");function j0(t){return typeof t[mJ]=="function"}o(j0,"hasRawContent");function hJ(t){return j0(t)?t[mJ]():t}o(hJ,"getRawContent");var pE=jd;function K0(){let t=aE();return{name:pE,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)j0(s.body)&&(s.body=hJ(s.body));return t.sendRequest(e,r)},"sendRequest")}}o(K0,"multipartPolicy");var X0=Ug;function Z0(){return qg()}o(Z0,"decompressResponsePolicy");function eN(t={}){return zg(t)}o(eN,"defaultRetryPolicy");function tN(){return Vg()}o(tN,"formDataPolicy");function zo(t){return O0(t)}o(zo,"getDefaultProxySettings");function rN(t,e){return rE(t,e)}o(rN,"proxyPolicy");var fJ="setClientRequestIdPolicy";function sN(t="x-ms-client-request-id"){return{name:fJ,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}o(sN,"setClientRequestIdPolicy");function nN(t){return sE(t)}o(nN,"agentPolicy");function iN(t){return nE(t)}o(iN,"tlsPolicy");var iu={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function gJ(t={}){let e=new oN(t.parentContext);return t.span&&(e=e.setValue(iu.span,t.span)),t.namespace&&(e=e.setValue(iu.namespace,t.namespace)),e}o(gJ,"createTracingContext");var oN=class t{static{o(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e instanceof t?new Map(e._context Line truncated
`&&t[i]!=="\r";i++)l+=t[i];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),i--),!gBe(l)){let d;return l.trim().length===0?d="Invalid space after '<'.":d="Tag '"+l+"' is an invalid name.",dt("InvalidTag",d,mr(t,i))}let u=dBe(t,i);if(u===!1)return dt("InvalidAttr","Attributes for '"+l+"' have open quote.",mr(t,i));let A=u.value;if(i=u.index,A[A.length-1]==="/"){let d=i-A.length;A=A.substring(0,A.length-1);let p=e3(A,e);if(p===!0)s=!0;else return dt(p.err.code,p.err.msg,mr(t,d+p.err.line))}else if(c)if(u.tagClosed){if(A.trim().length>0)return dt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",mr(t,a));if(r.length===0)return dt("InvalidTag","Closing tag '"+l+"' has not been opened.",mr(t,a));{let d=r.pop();if(l!==d.tagName){let p=mr(t,d.tagStartPos);return dt("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+l+"'.",mr(t,a))}r.length==0&&(n=!0)}}else return dt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",mr(t,i));else{let d=e3(A,e);if(d!==!0)return dt(d.err.code,d.err.msg,mr(t,i-A.length+d.err.line));if(n===!0)return dt("InvalidXml","Multiple possible root nodes found.",mr(t,i));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:a}),s=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=ZJ(t,i);continue}else if(t[i+1]==="?"){if(i=XJ(t,++i),i.err)return i}else break;else if(t[i]==="&"){let d=hBe(t,i);if(d==-1)return dt("InvalidChar","char '&' is not expected.",mr(t,i));i=d}else if(n===!0&&!KJ(t[i]))return dt("InvalidXml","Extra text at the end",mr(t,i));t[i]==="<"&&i--}}else{if(KJ(t[i]))continue;return dt("InvalidChar","char '"+t[i]+"' is not expected.",mr(t,i))}if(s){if(r.length==1)return dt("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",mr(t,r[0].tagStartPos));if(r.length>0)return dt("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return dt("InvalidXml","Start tag expected.",1);return!0}o(xE,"validate");function KJ(t){return t===" "||t===" "||t===`
`||t==="\r"}o(KJ,"isWhiteSpace");function XJ(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 dt("InvalidXml","XML declaration allowed only at the start of the document.",mr(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(XJ,"readPI");function ZJ(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}o(ZJ,"readCommentAndCDATA");var uBe='"',ABe="'";function dBe(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===uBe||t[e]===ABe)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){n=!0;break}r+=t[e]}return s!==""?!1:{value:r,index:e,tagClosed:n}}o(dBe,"readAttributeStr");var pBe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function e3(t,e){let r=bE(t,pBe),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return dt("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",lp(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return dt("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",lp(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return dt("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",lp(r[n]));let i=r[n][2];if(!fBe(i))return dt("InvalidAttr","Attribute '"+i+"' is an invalid name.",lp(r[n]));if(!Object.prototype.hasOwnProperty.call(s,i))s[i]=1;else return dt("InvalidAttr","Attribute '"+i+"' is repeated.",lp(r[n]))}return!0}o(e3,"validateAttributeString");function mBe(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}o(mBe,"validateNumberAmpersand");function hBe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,mBe(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}o(hBe,"validateAmpersand");function dt(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o(dt,"getErrorObject");function fBe(t){return bN(t)}o(fBe,"validateAttrName");function gBe(t){return bN(t)}o(gBe,"validateTagName");function mr(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(mr,"getLineNumberForPosition");function lp(t){return t.startIndex+t[1].length}o(lp,"getPositionFromMatch");var t3={amp:"&",AMP:"&",lt:"<",LT:"<",gt:">",GT:">",quot:'"',QUOT:'"',apos:"'",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",lsquor:"\u201A",rsquor:"\u2019",ldquor:"\u201E",bdquo:"\u201E",comma:",",period:".",colon:":",semi:";",excl:"!",quest:"?",num:"#",dollar:"$",percent:"%",amp:"&",ast:"*",commat:"@",lowbar:"_",verbar:"|",vert:"|",sol:"/",bsol:"\\",lbrace:"{",rbrace:"}",lbrack:"[",rbrack:"]",lpar:"(",rpar:")",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",COPY:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",REG:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",half:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",div:"\xF7",divide:"\xF7"},r3={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntilde:"\xF1",Ograve:"\xD2",ograve:"\xF2",Oacute:"\xD3",oacute:"\xF3",Ocirc:"\xD4",ocirc:"\xF4",Otilde:"\xD5",otilde:"\xF5",Ouml:"\xD6",ouml:"\xF6",Oslash:"\xD8",oslash:"\xF8",Ugrave:"\xD9",ugrave:"\xF9",Uacute:"\xDA",uacute:"\xFA",Ucirc:"\xDB",ucirc:"\xFB",Uuml:"\xDC",uuml:"\xFC",Yacute:"\xDD",yacute:"\xFD",THORN:"\xDE",thorn:"\xFE",szlig:"\xDF",yuml:"\xFF",Yuml:"\u0178"},s3={Amacr:"\u0100",amacr:"\u0101",Abreve:"\u0102",abreve:"\u0103",Aogon:"\u0104",aogon:"\u0105",Cacute:"\u0106",cacute:"\u0107",Ccirc:"\u0108",ccirc:"\u0109",Cdot:"\u010A",cdot:"\u010B",Ccaron:"\u010C",ccaron:"\u010D",Dcaron:"\u010E",dcaron:"\u010F",Dstrok:"\u0110",dstrok:"\u0111",Emacr:"\u0112",emacr:"\u0113",Ecaron:"\u011A",ecaron:"\u011B",Edot:"\u0116",edot:"\u0117",Eogon:"\u0118",eogon:"\u0119",Gcirc:"\u011C",gcirc:"\u011D",Gbreve:"\u011E",gbreve:"\u011F",Gdot:"\u0120",gdot:"\u0121",Gcedil:"\u0122",Hcirc:"\u0124",hcirc:"\u0125",HstLine truncated
`);let e=new kr("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,i=new dp(n.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let u=t.charCodeAt(c+1);if(u===47){let A=uu(t,">",c,"Closing Tag is not closed."),d=t.substring(c+2,A).trim();if(n.removeNSPrefix){let m=d.indexOf(":");m!==-1&&(d=d.substr(m+1))}d=PN(n.transformTagName,d,"",n).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let p=this.matcher.getCurrentTag();if(d&&n.unpairedTagsSet.has(d))throw new Error(`Unpaired tag can not be used as closing tag: </${d}>`);p&&n.unpairedTagsSet.has(p)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),s="",c=A}else if(u===63){let A=kN(t,c,!1,"?>");if(!A)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let d=this.buildAttributesMap(A.tagExp,this.matcher,A.tagName,!0);if(d){let p=d[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(p)||1),i.setXmlVersion(Number(p)||1)}if(!(n.ignoreDeclaration&&A.tagName==="?xml"||n.ignorePiTags)){let p=new kr(A.tagName);p.add(n.textNodeName,""),A.tagName!==A.tagExp&&A.attrExpPresent&&n.ignoreAttributes!==!0&&(p[":@"]=d),this.addChild(r,p,this.readonlyMatcher,c)}c=A.closeIndex+1}else if(u===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let A=uu(t,"-->",c+4,"Comment is not closed.");if(n.commentPropName){let d=t.substring(c+4,A-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(n.commentPropName,[{[n.textNodeName]:d}])}c=A}else if(u===33&&t.charCodeAt(c+2)===68){let A=i.readDocType(t,c);this.entityDecoder.addInputEntities(A.entities),c=A.i}else if(u===33&&t.charCodeAt(c+2)===91){let A=uu(t,"]]>",c,"CDATA is not closed.")-2,d=t.substring(c+9,A);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let p=this.parseTextData(d,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);p==null&&(p=""),n.cdataPropName?r.add(n.cdataPropName,[{[n.textNodeName]:d}]):r.add(n.textNodeName,p),c=A+2}else{let A=kN(t,c,n.removeNSPrefix);if(!A){let S=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${S}"`)}let d=A.tagName,p=A.rawTagName,m=A.tagExp,h=A.attrExpPresent,g=A.closeIndex;if({tagName:d,tagExp:m}=PN(n.transformTagName,d,m,n),n.strictReservedNames&&(d===n.commentPropName||d===n.cdataPropName||d===n.textNodeName||d===n.attributesGroupName))throw new Error(`Invalid tag name: ${d}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher,!1));let C=r;C&&n.unpairedTagsSet.has(C.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;m.length>0&&m.lastIndexOf("/")===m.length-1&&(E=!0,d[d.length-1]==="/"?(d=d.substr(0,d.length-1),m=d):m=m.substr(0,m.length-1),h=d!==m);let y=null,I={},B;B=UBe(p),d!==e.tagname&&this.matcher.push(d,{},B),d!==m&&h&&(y=this.buildAttributesMap(m,this.matcher,d),y&&(I=OBe(y,n))),d!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=c;if(this.isCurrentNodeStopNode){let S="";if(E)c=A.closeIndex;else if(n.unpairedTagsSet.has(d))c=A.closeIndex;else{let he=this.readStopNodeData(t,p,g+1);if(!he)throw new Error(`Unexpected end of ${p}`);c=he.i,S=he.tagContent}let U=new kr(d);y&&(U[":@"]=y),U.add(n.textNodeName,S),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,U,this.readonlyMatcher,N)}else{if(E){({tagName:d,tagExp:m}=PN(n.transformTagName,d,m,n));let S=new kr(d);y&&(S[":@"]=y),this.addChild(r,S,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(n.unpairedTagsSet.has(d)){let S=new kr(d);y&&(S[":@"]=y),this.addChild(r,S,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=A.closeIndex;continue}else{let S=new kr(d);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),y&&(S[":@"]=y),this.addChild(r,S,this.readonlyMatcher,N),r=S}s="",c=g}}}else s+=t[c];return e.child},"parseXml");function YBe(t,e,r,s){this.options.captureMetaData||(s=void 0);let n=this.options.jPath?r.toString():r,i=this.options.updateTag(e.tagname,n,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,s))}o(YBe,"addChild");function $Be(t,e,r){let s=this.options.processEntities;if(!s||!s.enabled)return t;if(s.allowedTags){let n=this.options.jPath?r.toString():r;if(!(Array.isArray(s.allowedTags)?s.allowedTags.includes(e):s.allowedTags(e,n)))return t}if(s.tagFilter){let n=this.options.jPath?r.toString():r;if(!s.tagFilter(e,n))return t}return this.entityDecoder.decode(t)}o($Be,"replaceEntitiesValue");function JBe(t,e,r,s){return t&&(s===void 0&&(s=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,s),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}o(JBe,"saveTextToParentTag");function WBe(){return this.stopNodeExpressionsLine truncated
`;function nwe(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(ON(r)==="?xml"){let n=r[":@"];if(n){let i=e.attributeNamePrefix+"version";if(n[i])return n[i]}}return"1.0"}o(nwe,"detectXmlVersionFromArray");function w3(t,e,r,s,n){return!r.sanitizeName||ec(t,{xmlVersion:n})?t:r.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()})}o(w3,"resolveTagName");function FN(t,e){let r="";e.format&&(r=swe);let s=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let a=0;a<e.stopNodes.length;a++){let c=e.stopNodes[a];typeof c=="string"?s.push(new ls(c)):c instanceof ls&&s.push(c)}let n=nwe(t,e),i=new Vn;return b3(t,e,r,i,s,n)}o(FN,"toXml");function b3(t,e,r,s,n,i){let a="",c=!1;if(e.maxNestedTags&&s.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let l=t.toString();return l=MN(l,e),l}return""}for(let l=0;l<t.length;l++){let u=t[l],A=ON(u);if(A===void 0)continue;let p=A===e.textNodeName||A===e.cdataPropName||A===e.commentPropName||A[0]==="?"?A:w3(A,!1,e,s,i),m=iwe(u[":@"],e);s.push(p,m);let h=awe(s,n);if(p===e.textNodeName){let I=u[A];h||(I=e.tagValueProcessor(p,I),I=MN(I,e)),c&&(a+=r),a+=I,c=!1,s.pop();continue}else if(p===e.cdataPropName){c&&(a+=r);let I=u[A][0][e.textNodeName],B=vE(I);a+=`<![CDATA[${B}]]>`,c=!1,s.pop();continue}else if(p===e.commentPropName){let I=u[A][0][e.textNodeName],B=TE(I);a+=r+`<!--${B}-->`,c=!0,s.pop();continue}else if(p[0]==="?"){let I=B3(u[":@"],e,h,s,i);a+=(p==="?xml"?"":r)+`<${p}${I}?>`,c=!0,s.pop();continue}let g=r;g!==""&&(g+=e.indentBy);let C=B3(u[":@"],e,h,s,i),E=r+`<${p}${C}`,y;h?y=Q3(u[A],e):y=b3(u[A],e,g,s,n,i),e.unpairedTags.indexOf(p)!==-1?e.suppressUnpairedNode?a+=E+">":a+=E+"/>":(!y||y.length===0)&&e.suppressEmptyNode?a+=E+"/>":y&&y.endsWith(">")?a+=E+`>${y}${r}</${p}>`:(a+=E+">",y&&r!==""&&(y.includes("/>")||y.includes("</"))?a+=r+e.indentBy+y+r:a+=y,a+=`</${p}>`),c=!0,s.pop()}return a}o(b3,"arrToStr");function iwe(t,e){if(!t||e.ignoreAttributes)return null;let r={},s=!1;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=n.startsWith(e.attributeNamePrefix)?n.substr(e.attributeNamePrefix.length):n;r[i]=$o(t[n]),s=!0}return s?r:null}o(iwe,"extractAttributeValues");function Q3(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let s=0;s<t.length;s++){let n=t[s],i=ON(n);if(i===e.textNodeName)r+=n[i];else if(i===e.cdataPropName)r+=n[i][0][e.textNodeName];else if(i===e.commentPropName)r+=n[i][0][e.textNodeName];else{if(i&&i[0]==="?")continue;if(i){let a=owe(n[":@"],e),c=Q3(n[i],e);!c||c.length===0?r+=`<${i}${a}/>`:r+=`<${i}${a}>${c}</${i}>`}}}return r}o(Q3,"getRawContent");function owe(t,e){let r="";if(t&&!e.ignoreAttributes)for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let n=t[s];n===!0&&e.suppressBooleanAttributes?r+=` ${s.substr(e.attributeNamePrefix.length)}`:r+=` ${s.substr(e.attributeNamePrefix.length)}="${$o(n)}"`}return r}o(owe,"attr_to_str_raw");function ON(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let s=e[r];if(Object.prototype.hasOwnProperty.call(t,s)&&s!==":@")return s}}o(ON,"propName");function B3(t,e,r,s,n){let i="";if(t&&!e.ignoreAttributes)for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=a.substr(e.attributeNamePrefix.length),l=r?c:w3(c,!0,e,s,n),u;r?u=t[a]:(u=e.attributeValueProcessor(a,t[a]),u=MN(u,e)),u===!0&&e.suppressBooleanAttributes?i+=` ${l}`:i+=` ${l}="${$o(u)}"`}return i}o(B3,"attr_to_str");function awe(t,e){if(!e||e.length===0)return!1;for(let r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}o(awe,"checkStopNode");function MN(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){let s=e.entities[r];t=t.replace(s.regex,s.val)}return t}o(MN,"replaceEntitiesValue");function UN(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}o(UN,"getIgnoreAttributesFn");var cwe={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:o(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:o(function(t,e){return e},"attributeValueProcessor"),preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function _r(t){if(this.options=Object.assign({},cwe,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.oLine truncated
`,this.newLine=`
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}o(_r,"Builder");function lwe(t,e){let r=t["?xml"];if(r&&typeof r=="object"){if(e.attributesGroupName&&r[e.attributesGroupName]){let n=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(n)return n}let s=r[e.attributeNamePrefix+"version"];if(s)return s}return"1.0"}o(lwe,"detectXmlVersionFromObj");function qN(t,e,r,s,n){return!r.sanitizeName||ec(t,{xmlVersion:n})?t:r.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()})}o(qN,"resolveTagName");_r.prototype.build=function(t){if(this.options.preserveOrder)return FN(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new Vn,r=lwe(t,this.options);return this.j2x(t,0,e,r).val}};_r.prototype.j2x=function(t,e,r,s){let n="",i="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let a=this.options.jPath?r.toString():r,c=this.checkStopNode(r);for(let l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;let A=l===this.options.textNodeName||l===this.options.cdataPropName||l===this.options.commentPropName||this.options.attributesGroupName&&l===this.options.attributesGroupName||this.isAttribute(l)||l[0]==="?"?l:qN(l,!1,this.options,r,s);if(typeof t[l]>"u")this.isAttribute(l)&&(i+="");else if(t[l]===null)this.isAttribute(l)||A===this.options.cdataPropName||A===this.options.commentPropName?i+="":A[0]==="?"?i+=this.indentate(e)+"<"+A+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+A+"/"+this.tagEndChar;else if(t[l]instanceof Date)i+=this.buildTextValNode(t[l],A,"",e,r);else if(typeof t[l]!="object"){let d=this.isAttribute(l);if(d&&!this.ignoreAttributesFn(d,a)){let p=qN(d,!0,this.options,r,s);n+=this.buildAttrPairStr(p,""+t[l],c)}else if(!d)if(l===this.options.textNodeName){let p=this.options.tagValueProcessor(l,""+t[l]);i+=this.replaceEntitiesValue(p)}else{r.push(A);let p=this.checkStopNode(r);if(r.pop(),p){let m=""+t[l];m===""?i+=this.indentate(e)+"<"+A+this.closeTag(A)+this.tagEndChar:i+=this.indentate(e)+"<"+A+">"+m+"</"+A+this.tagEndChar}else i+=this.buildTextValNode(t[l],A,"",e,r)}}else if(Array.isArray(t[l])){let d=t[l].length,p="",m="";for(let h=0;h<d;h++){let g=t[l][h];if(!(typeof g>"u"))if(g===null)A[0]==="?"?i+=this.indentate(e)+"<"+A+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+A+"/"+this.tagEndChar;else if(typeof g=="object")if(this.options.oneListGroup){r.push(A);let C=this.j2x(g,e+1,r,s);r.pop(),p+=C.val,this.options.attributesGroupName&&g.hasOwnProperty(this.options.attributesGroupName)&&(m+=C.attrStr)}else p+=this.processTextOrObjNode(g,A,e,r,s);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor(A,g);C=this.replaceEntitiesValue(C),p+=C}else{r.push(A);let C=this.checkStopNode(r);if(r.pop(),C){let E=""+g;E===""?p+=this.indentate(e)+"<"+A+this.closeTag(A)+this.tagEndChar:p+=this.indentate(e)+"<"+A+">"+E+"</"+A+this.tagEndChar}else p+=this.buildTextValNode(g,A,"",e,r)}}this.options.oneListGroup&&(p=this.buildObjectNode(p,A,m,e)),i+=p}else if(this.options.attributesGroupName&&l===this.options.attributesGroupName){let d=Object.keys(t[l]),p=d.length;for(let m=0;m<p;m++){let h=qN(d[m],!0,this.options,r,s);n+=this.buildAttrPairStr(h,""+t[l][d[m]],c)}}else i+=this.processTextOrObjNode(t[l],A,e,r,s)}return{attrStr:n,val:i}};_r.prototype.buildAttrPairStr=function(t,e,r){return r||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+$o(e)+'"'};function uwe(t,e,r,s,n){let i=this.extractAttributes(t);if(s.push(e,i),this.checkStopNode(s)){let l=this.buildRawContent(t),u=this.buildAttributesForStopNode(t);return s.pop(),this.buildObjectNode(l,e,u,r)}let c=this.j2x(t,r+1,s,n);return s.pop(),e[0]==="?"?this.buildTextValNode("",e,c.attrStr,r,s):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,c.attrStr,r,s):this.buildObjectNode(c.val,e,c.attrStr,r)}o(uwe,"processTextOrObjNode");_r.prototype.extractAttributes=function(t){if(!t||typeof t!="object")return null;let e={},r=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let s=t[this.options.attributesGroupName];for(let n in s){if(!Object.prototype.hasOwnProperty.call(s,n))continue;let i=n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):n;e[i]=$o(s[n]),r=!0}}else for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let n=this.isAttribute(s);n&&(e[n]=$o(t[s]),r=!0)}return r?e:null};_r.prototype.buildRawContent=function(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return String(t);if(t[this.options.textNodeName]!==void 0)return t[this.options.textNodeName];let e="";for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||this.isAttribute(r)||this.options.attributesGroupName&&r===this.o Line truncated
`)+`
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),s=this.factory.computeHMACSHA256(r);return e.headers.set(te.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${s}`),e}getHeaderValueToSign(e,r){let s=e.headers.get(r);return!s||r===te.CONTENT_LENGTH&&s==="0"?"":s}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(n=>n.name.toLowerCase().startsWith(te.PREFIX_FOR_STORAGE));r.sort((n,i)=>GE(n.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((n,i,a)=>!(i>0&&n.name.toLowerCase()===a[i-1].name.toLowerCase()));let s="";return r.forEach(n=>{s+=`${n.name.toLowerCase().trimRight()}:${n.value.trimLeft()}
`}),s}getCanonicalizedResourceString(e){let r=OE(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=UE(e.url),i={};if(n){let a=[];for(let c in n)if(Object.prototype.hasOwnProperty.call(n,c)){let l=c.toLowerCase();i[l]=n[c],a.push(l)}a.sort();for(let c of a)s+=`
${c}:${decodeURIComponent(i[c])}`}return s}};var tt=class extends sc{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new gp(e,r,this)}computeHMACSHA256(e){return(0,k3.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var xt=qn("storage-common");var ks;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(ks||(ks={}));var Wo={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:ks.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},ywe=new os("The operation was aborted."),Ep=class extends Yn{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,s=Wo){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:Wo.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):Wo.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:Wo.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:Wo.maxRetryDelayInMs):Wo.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:Wo.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:Wo.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=FE(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=Jo(n.url,zi.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(xt.info(`RetryPolicy: =====> Try=${s} ${i?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(n),!this.shouldRetry(i,s,a))return a;r=r||!i&&a.status===404}catch(c){if(xt.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(i,s,a,c))throw c}return await this.delay(i,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,n){if(r>=this.retryOptions.maxTries)return xt.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(n){for(let a of i)if(n.name.toUpperCase().includes(a)||n.message.toUpperCase().includes(a)||n.code&&n.code.toString().toUpperCase()===a)return xt.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(s||n){let a=s?s.status:n?n.statusCode:0;if(!e&&a===404)return xt.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return xt.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(s&&s?.status>=400){let a=s.headers.get(te.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return n?.code==="PARSE_ERROR"&&n?.message.startsWith('Error "Error: Unclosed root tag')?(xt.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 ks.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case ks.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return xt.info(`RetryPolicy: Delay for ${n}ms`),qE(n,s,ywe)}};var yp=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new Ep(e,r,this.retryOptions)}};var Cwe="storageBrowserPolicy";function D3(){return{name:Cwe,async sendRequest(t,e){return we||((t.method==="GET"||t.method==="HEAD")&&(t.url=Jo(t.url,zi.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(te.COOKIE),t.headers.delete(te.CONTENT_LENGTH)),e(t)}}}o(D3,"storageBrowserPolicy");var Iwe="StorageCorrectContentLengthPolicy";function _3(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(te.CONTENT_LENGTH,Buffer.byteLength(e.body))}return o(t,"correctContentLength"),{name:Iwe,async sendRequest(e,r){return t(e),r(e)}}}o(_3,"storageCorrectContentLengthPolicy");var Bwe="storageRetryPolicy",du={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:ks.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},wwe=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],bwe=new os("The operation was aborted.");function L3(t={}){let e=t.retryPolicyType??du.retryPolicyType,r=t.maxTries??du.maxTries,s=t.retryDelayInMs??du.retryDelayInMs,n=t.maxRetryDelayInMs??du.maxRetryDelayInMs,i=t.secondaryHost??du.secondaryHost,a=t.tryTimeoutInMs??du.tryTimeoutInMs;function c({isPrimaryRetry:u,attempt:A,response:d,error:p}){if(A>=r)return xt.inf Line truncated
`)+`
`+s(i)+n(i),c=(0,M3.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");i.headers.set(te.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}o(e,"signRequest");function r(i,a){let c=i.headers.get(a);return!c||a===te.CONTENT_LENGTH&&c==="0"?"":c}o(r,"getHeaderValueToSign");function s(i){let a=[];for(let[l,u]of i.headers)l.toLowerCase().startsWith(te.PREFIX_FOR_STORAGE)&&a.push({name:l,value:u});a.sort((l,u)=>GE(l.name.toLowerCase(),u.name.toLowerCase())),a=a.filter((l,u,A)=>!(u>0&&l.name.toLowerCase()===A[u-1].name.toLowerCase()));let c="";return a.forEach(l=>{c+=`${l.name.toLowerCase().trimRight()}:${l.value.trimLeft()}
`}),c}o(s,"getCanonicalizedHeadersString");function n(i){let a=OE(i.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=UE(i.url),u={};if(l){let A=[];for(let d in l)if(Object.prototype.hasOwnProperty.call(l,d)){let p=d.toLowerCase();u[p]=l[d],A.push(p)}A.sort();for(let d of A)c+=`
${d}:${decodeURIComponent(u[d])}`}return c}return o(n,"getCanonicalizedResourceString"),{name:Qwe,async sendRequest(i,a){return e(i),a(i)}}}o(YN,"storageSharedKeyCredentialPolicy");var xwe="storageRequestFailureDetailsParserPolicy";function F3(){return{name:xwe,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
`),r}}}}o(F3,"storageRequestFailureDetailsParserPolicy");var O3=require("node:crypto");var HE=class{static{o(this,"UserDelegationKeyCredential")}accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,O3.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var zE="12.31.0",VE="2026-02-06";var YE="https://storage.azure.com/.default",Vi={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var un="",$N="*",Nwe=1*1024*1024;var Swe=4*Nwe;var U3="AES256",q3="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",G3=["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"],H3=["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"],z3="BlobUsesCustomerSpecifiedEncryption",V3="BlobDoesNotUseCustomerSpecifiedEncryption",Y3=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Yi(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}o(Yi,"isPipelineLike");var Cp=class{static{o(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function pt(t,e={}){t||(t=new $e);let r=new Cp([],e);return r._credential=t,r}o(pt,"newPipeline");function Rwe(t){let e=[Twe,$3,vwe,Pwe,kwe,Dwe,Lwe];if(t.factories.length){let r=t.factories.filter(s=>!e.some(n=>n(s)));if(r.length){let s=r.some(n=>_we(n));return{wrappedPolicies:BN(r),afterRetry:s}}}}o(Rwe,"processDownlevelPipeline");function JN(t){let{httpClient:e,...r}=t.options,s=t._coreHttpClient;s||(s=e?wN(e):VN(),t._coreHttpClient=s);let n=t._corePipeline;if(!n){let i=`azsdk-js-azure-storage-blob/${zE}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;n=rp({...r,loggingOptions:{additionalAllowedHeaderNames:G3,additionalAllowedQueryParameters:H3,logger:kE.info},userAgentOptions:{userAgentPrefix:a},serializationOptions:{stringifyXML:PE,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:HN,serializerOptions:{xml:{xmlCharKey:"#"}}}}),n.removePolicy({phase:"Retry"}),n.removePolicy({name:X0}),n.addPolicy(_3()),n.addPolicy(L3(r.retryOptions),{phase:"Retry"}),n.addPo Line truncated
`),i=e.computeHMACSHA256(n);return{sasQueryParameters:new hn(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:n}}o(RQe,"generateBlobSASQueryParameters20150405");function TQe(t,e){if(t=dc(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=li.parse(t.permissions.toString()).toString():n=ui.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?be(t.startsOn,!1):"",t.expiresOn?be(t.expiresOn,!1):"",Ac(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?mn(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new hn(t.version,a,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(TQe,"generateBlobSASQueryParameters20181109");function vQe(t,e){if(t=dc(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=li.parse(t.permissions.toString()).toString():n=ui.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?be(t.startsOn,!1):"",t.expiresOn?be(t.expiresOn,!1):"",Ac(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?mn(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new hn(t.version,a,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}o(vQe,"generateBlobSASQueryParameters20201206");function PQe(t,e){if(t=dc(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=li.parse(t.permissions.toString()).toString():n=ui.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?be(t.startsOn,!1):"",t.expiresOn?be(t.expiresOn,!1):"",Ac(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?be(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?be(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?mn(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new hn(t.version,a,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}o(PQe,"generateBlobSASQueryParametersUDK20181109");function kQe(t,e){if(t=dc(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=li.parse(t.permissions.toString()).toString():n=ui.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?be(t.startsOn,!1):"",t.expiresOn?be(t.expiresOn,!1):"",Ac(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?be(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?be(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?mn(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new hn(t.version,a,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}o(kQe,"generateBlobSASQueryParametersUDK20200210");function DQe(t,e){if(t=dc(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=li.parse(t.permissions.toString()).toString():n=ui.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?be(t.startsOn,!1):"",t.expiresOn?be(t.expiresOn,!1):"",Ac(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?be(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?be(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?mn(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new hn(t.version,a,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}o(DQe,"generateBlobSASQueryParametersUDK20201206");function _Qe(t,e){if(t=dc(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=li.parse(t.permissions.toString()).toString():n=ui.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?be(t.startsOn,!1):"",t.expiresOn?be(t.expiresOn,!1):"",Ac(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?be(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?be(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?mn(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new hn(t.version,a,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}o(_Qe,"generateBlobSASQueryParametersUDK20250705");function Ac(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}o(Ac,"getCanonicalName");function dc(t){let e=t.version?t.version:VE;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(dc,"SASSignatureValuesSanityCheckAndAutofill");var Pp=class{static{o(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let s=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=s.container):(this._isContainer=!1,this._containerOrBlobOperation=s.blob),r||(r=nu()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==un||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==un||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 H.withSpan("BlobLeaseClient-acquireLease",r,async s=>$(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!==un||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==un||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 H.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=$(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!==un||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==un||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 H.withSpan("BlobLeaseClient-releaseLease",e,async r=>$(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!==un||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==un||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 ar 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"}};bu.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var fc=class extends Error{static{o(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};fc.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var Gp=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var Vxe=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){try{u(s.throw(A))}catch(d){a(d)}}o(l,"rejected");function u(A){A.done?i(A.value):n(A.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},Fv=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),s=Date.now()-this.startTime,n=(e/(1024*1024)/(s/1e3)).toFixed(1);re(`Sent ${e} of ${this.contentLength} (${r}%), ${n} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function j4(t,e,r){return Vxe(this,void 0,void 0,function*(){var s;let n=new Zi(t),i=n.getBlockBlobClient(),a=new Fv((s=r?.archiveSizeBytes)!==null&&s!==void 0?s:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),b(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let l=yield i.uploadFile(e,c);if(l._response.status>=400)throw new jy(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw Bt(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}o(j4,"uploadCacheArchiveSDK");var X4=w(require("buffer"),1),Ai=w(require("fs"),1),Z4=w(require("stream"),1),e8=w(require("util"),1);var Ky=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){try{u(s.throw(A))}catch(d){a(d)}}o(l,"rejected");function u(A){A.done?i(A.value):n(A.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})};function Xy(t){return t?t>=200&&t<300:!1}o(Xy,"isSuccessStatusCode");function Yxe(t){return t?t>=500:!0}o(Yxe,"isServerErrorStatusCode");function $xe(t){return t?[et.BadGateway,et.ServiceUnavailable,et.GatewayTimeout].includes(t):!1}o($xe,"isRetryableStatusCode");function Jxe(t){return Ky(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(Jxe,"sleep");function K4(t,e,r){return Ky(this,arguments,void 0,function*(s,n,i,a=Ig,c=Bg,l=void 0){let u="",A=1;for(;A<=a;){let d,p,m=!1;try{d=yield n()}catch(h){l&&(d=l(h)),m=!0,u=h.message}if(d&&(p=i(d),!Yxe(p)))return d;if(p&&(m=$xe(p),u=`Cache service responded with ${p}`),b(`${s} - Attempt ${A} of ${a} failed with error: ${u}`),!m){b(`${s} - Error is not retryable`);break}yield Jxe(c),A++}throw Error(`${s} failed: ${u}`)})}o(K4,"retry");function Hp(t,e){return Ky(this,arguments,void 0,function*(r,s,n=Ig,i=Bg){return yield K4(r,s,a=>a.statusCode,n,i,a=>{if(a instanceof Mn)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(Hp,"retryTypedResponse");function Qu(t,e){return Ky(this,arguments,void 0,function*(r,s,n=Ig,i=Bg){return yield K4(r,s,a=>a.message.statusCode,n,i)})}o(Qu,"retryHttpClientResponse");var Fs=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){try{u(s.throw(A))}catch(d){a(d)}}o(l,"rejected");function u(A){A.done?i(A.value):n(A.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})};function Wxe(t,e){return Fs(this,void 0,void 0,function*(){yield e8.promisify(Z4.pipeline)(t.message,e)})}o(Wxe,"pipeResponseToStream");var Zy=class{static{o(this,"DownloadProgress")}constructor(e){this.contentLength=e,this.segmentIndex=0,this.segmentSize=0,this.segmentOffset=0,this.receivedBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize,this.segmentIndex=this.segmentIndex+1,this.segmentSize=e,this.receivedBytes=0,b(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receive Line truncated
Other caches with similar key:`);for(let c of i?.artifactCaches||[])b(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}o(r0e,"printCachesListForDiagnostics");function Hv(t,e,r){return Mr(this,void 0,void 0,function*(){let s=new p8.URL(t),n=n8(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield r8(t,e,n):n.concurrentBlobDownloads?yield t8(t,e,n):yield eC(t,e):yield eC(t,e)})}o(Hv,"downloadCache");function h8(t,e,r){return Mr(this,void 0,void 0,function*(){let s=Gv(),n=Wl(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield Hp("reserveCache",()=>Mr(this,void 0,void 0,function*(){return s.postJson(Vp("caches"),i)}))})}o(h8,"reserveCache");function d8(t,e){return`bytes ${t}-${e}/*`}o(d8,"getContentRange");function s0e(t,e,r,s,n){return Mr(this,void 0,void 0,function*(){b(`Uploading chunk of size ${n-s+1} bytes at offset ${s} with content range: ${d8(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":d8(s,n)},a=yield Qu(`uploadChunk (start: ${s}, end: ${n})`,()=>Mr(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!Xy(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}o(s0e,"uploadChunk");function n0e(t,e,r,s){return Mr(this,void 0,void 0,function*(){let n=Ln(r),i=Vp(`caches/${e.toString()}`),a=xu.openSync(r,"r"),c=Ov(s),l=d0("uploadConcurrency",c.uploadConcurrency),u=d0("uploadChunkSize",c.uploadChunkSize),A=[...new Array(l).keys()];b("Awaiting all uploads");let d=0;try{yield Promise.all(A.map(()=>Mr(this,void 0,void 0,function*(){for(;d<n;){let p=Math.min(n-d,u),m=d,h=d+p-1;d+=u,yield s0e(t,i,()=>xu.createReadStream(r,{fd:a,start:m,end:h,autoClose:!1}).on("error",g=>{throw new Error(`Cache upload failed because file read failed with ${g.message}`)}),m,h)}})))}finally{xu.closeSync(a)}})}o(n0e,"uploadFile");function i0e(t,e,r){return Mr(this,void 0,void 0,function*(){let s={size:r};return yield Hp("commitCache",()=>Mr(this,void 0,void 0,function*(){return t.postJson(Vp(`caches/${e.toString()}`),s)}))})}o(i0e,"commitCache");function zv(t,e,r,s){return Mr(this,void 0,void 0,function*(){if(Ov(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield j4(r,e,s)}else{let i=Gv();b("Upload cache"),yield n0e(i,t,e,s),b("Commiting cache");let a=Ln(e);re(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield i0e(i,t,a);if(!Xy(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);re("Cache saved successfully")}})}o(zv,"saveCache");var l5=w(r5(),1),ft=w(ht(),1),ds=w(ht(),1),Ic=w(ht(),1),Bc=w(ht(),1),wc=w(ht(),1);var FP=w(ht(),1),OP=w(ht(),1),o5=w(ht(),1),a5=w(ht(),1),c5=w(ht(),1);var _P=w(ht(),1),LP=w(ht(),1),s5=w(ht(),1),n5=w(ht(),1),i5=w(ht(),1);var MP=class extends i5.MessageType{static{o(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,n5.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,s5.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let u=s.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${l}) for ${this.typeName}`);let A=e.skip(l);u!==!1&&(u===!0?LP.UnknownFieldHandler.onRead:u)(this.typeName,i,c,l,A)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,_P.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,_P.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?LP.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},qC=new MP;var UP=class extends c5.MessageType{static{o(this,"CacheMetadata$Type")}constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:o(()=>qC,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,a5.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,o5.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:i.repositoryId=e.int64().toString();break;case 2:i.scope.push(qC.internalBinaryRead(e,e.uint32(),s));break;default:let u=s.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${l}) for ${this.typeName}`);let A=e.skip(l);u!==!1&&(u===!0?OP.UnknownFieldHandler.onRead:u)(this.typeName,i,c,l,A)}}return i}internalBinaryWrite(e,r,s){e.repositoryId!=="0"&&r.tag(1,FP.WireTyp Line truncated
`));let s=yield tk(r,"create");yield rk(s,t)})}o(nk,"createTar");var Gu=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){try{u(s.throw(A))}catch(d){a(d)}}o(l,"rejected");function u(A){A.done?i(A.value):n(A.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},En=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},bc=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},ik="cache write denied:",VC=class t extends bc{static{o(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},p5=wg,YC=class t extends Error{static{o(this,"CacheReadDeniedError")}constructor(e){super(e),this.name="CacheReadDeniedError",Object.setPrototypeOf(this,t.prototype)}},$C=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function m5(t){if(!t||t.length===0)throw new En("Path Validation Error: At least one directory or file path is required")}o(m5,"checkPaths");function ok(t){if(t.length>512)throw new En(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new En(`Key Validation Error: ${t} cannot contain commas.`)}o(ok,"checkKey");function ak(){return zp()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(ak,"isFeatureAvailable");function h5(t,e,r,s){return Gu(this,arguments,void 0,function*(n,i,a,c,l=!1){let u=zp();b(`Cache service version: ${u}`),m5(n);let A=qv();if(!o8(A)){re(`Cache restore skipped: the effective cache-mode '${A}' does not permit reads.`),b(`Skipped restore for paths [${n.join(", ")}] with primary key '${i}'.`);return}return u==="v2"?yield CSe(n,i,a,c,l):yield ySe(n,i,a,c,l)})}o(h5,"restoreCache");function ySe(t,e,r,s){return Gu(this,arguments,void 0,function*(n,i,a,c,l=!1){var u;a=a||[];let A=[i,...a];if(b("Resolved Keys:"),b(JSON.stringify(A)),A.length>10)throw new En("Key Validation Error: Keys are limited to a maximum of 10.");for(let m of A)ok(m);let d=yield Hd(),p="";try{let m;try{m=yield m8(A,n,{compressionMethod:d,enableCrossOsArchive:l})}catch(g){let C=(u=g?.message)!==null&&u!==void 0?u:"";throw C.includes(p5)?new YC(C):g}if(!m?.archiveLocation)return;if(c?.lookupOnly)return re("Lookup only - skipping download"),m.cacheKey;p=am.join(yield qd(),Uo(d)),b(`Archive Path: ${p}`),yield Hv(m.archiveLocation,p,c),Ua()&&(yield om(p,d));let h=Ln(p);return re(`Cache Size: ~${Math.round(h/(1024*1024))} MB (${h} B)`),yield sk(p,d),re("Cache restored successfully"),m.cacheKey}catch(m){let h=m;if(h.name===En.name)throw m;h instanceof Mn&&typeof h.statusCode=="number"&&h.statusCode>=500?Ol(`Failed to restore: ${m.message}`):Bt(`Failed to restore: ${m.message}`)}finally{try{yield Gd(p)}catch(m){b(`Failed to delete archive: ${m}`)}}})}o(ySe,"restoreCacheV1");function CSe(t,e,r,s){return Gu(this,arguments,void 0,function*(n,i,a,c,l=!1){var u;c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let A=[i,...a];if(b("Resolved Keys:"),b(JSON.stringify(A)),A.length>10)throw new En("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of A)ok(p);let d="";try{let p=ek(),m=yield Hd(),h={key:i,restoreKeys:a,version:Wl(n,m,l)},g;try{g=yield p.GetCacheEntryDownloadURL(h)}catch(y){let I=(u=y?.message)!==null&&u!==void 0?u:"";throw I.includes(p5)?new YC(I):y}if(!g.ok){b(`Cache not found for version ${h.version} of keys: ${A.join(", ")}`);return}if(h.key!==g.matchedKey?re(`Cache hit for restore-key: ${g.matchedKey}`):re(`Cache hit for: ${g.matchedKey}`),c?.lookupOnly)return re("Lookup only - skipping download"),g.matchedKey;d=am.join(yield qd(),Uo(m)),b(`Archive path: ${d}`),b(`Starting download of archive to: ${d}`),yield Hv(g.signedDownloadUrl,d,c);let E=Ln(d);return re(`Cache Size: ~${Math.round(E/(1024*1024))} MB (${E} B)`),Ua()&&(yield om(d,m)),yield sk(d,m),re("Cache restored successfully"),g.matchedKey}catch(p){let m=p;if(m.name===En.name)throw p;m instanceof Mn&&typeof m.statusCode=="number"&&m.statusCode>=500?Ol(`Failed to restore: ${p.message}`):Bt(`Failed to restore: ${p.message}`)}finally{try{d&&(yield Gd(d))}catch(p){b(`Failed to delete archive: ${p}`)}}})}o(CSe,"restoreCacheV2");function ck(t,e,r){return Gu(this,arguments,void 0,function*(s,n,i,a=!1){let c=zp();b(`Cache service version: ${c}`),m5(s),ok(n);let l=qv();return a8(l)?c==="v2"?yield BSe(s,n,i,a):yield ISe(s,n,i,a):(re(`Cache save skipped: the effective cache-mode '${l}' does not permit writes.`),b(`Skipped save for paths [${s.join(", ")}] with key '${n}'.`),-1)})}o(ck,"saveCache");function ISe(t,e,r){return Gu(this,arguments,void 0 Line truncated
`,a).length:d,u?(c===null?0:c.length)+l.length:0,u?l.length+d:0);return p<m},"__needMoreData"),parse:o(function(s,n,i,a){let{bom:c,comment_no_infix:l,delimiter_auto:u,encoding:A,from_line:d,ltrim:p,max_record_size:m,raw:h,relax_quotes:g,rtrim:C,skip_empty_lines:E,to:y,to_line:I}=this.options,{comment:B,escape:N,quote:S,record_delimiter:U}=this.options,{bomSkipped:he,delimiterDiscovered:Se,delimiterBufPrevious:Qe,rawBuffer:Te,escapeIsQuote:Ae}=this.state;if(!Se&&u){let xe;if(Qe===void 0?xe=s:Qe!==void 0&&s===void 0?xe=Qe:xe=Buffer.concat([Qe,s]),s=void 0,n||xe.length>u.size)this.options.delimiter=[Buffer.from(TK(xe,this.options.delimiter_auto))],this.state.previousBuf=xe,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=xe;return}}let{previousBuf:_e}=this.state,se;if(_e===void 0)if(s===void 0){a();return}else se=s;else _e!==void 0&&s===void 0?se=_e:se=Buffer.concat([_e,s]);if(he===!1)if(c===!1)this.state.bomSkipped=!0;else if(se.length<3){if(n===!1){this.state.previousBuf=se;return}}else{for(let xe in iA)if(iA[xe].compare(se,0,iA[xe].length)===0){let Cn=iA[xe].length;this.state.bufBytesStart+=Cn,se=se.slice(Cn);let uo=nA({...this.original_options,encoding:xe});for(let Xe in uo)this.options[Xe]=uo[Xe];({comment:B,escape:N,quote:S}=this.options);break}this.state.bomSkipped=!0}let tr=se.length,z;for(z=0;z<tr&&!this.__needMoreData(z,tr,n);z++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),I!==-1&&this.info.lines>I){this.state.stop=!0,a();return}this.state.quoting===!1&&U.length===0&&this.__autoDiscoverRecordDelimiter(se,z)&&(U=this.options.record_delimiter);let xe=se[z];if(h===!0&&Te.append(xe),(xe===$De||xe===JDe)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(N!==null&&this.state.quoting===!0&&this.__isEscape(se,z,xe)&&z+N.length<tr)if(Ae){if(this.__isQuote(se,z+N.length)){this.state.escaping=!0,z+=N.length-1;continue}}else{this.state.escaping=!0,z+=N.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(se,z))if(this.state.quoting===!0){let Xe=se[z+S.length],In=C&&this.__isCharTrimable(se,z+S.length),Gr=B!==null&&this.__compareBytes(B,se,z+S.length,Xe),la=this.__isDelimiter(se,z+S.length,Xe),Fm=U.length===0?this.__autoDiscoverRecordDelimiter(se,z+S.length):this.__isRecordDelimiter(Xe,se,z+S.length);if(N!==null&&this.__isEscape(se,z,xe)&&this.__isQuote(se,z+N.length))z+=N.length-1;else if(!Xe||la||Fm||Gr||In){this.state.quoting=!1,this.state.wasQuoting=!0,z+=S.length-1;continue}else if(g===!1){let r_=this.__error(new me("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(Xe)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(r_!==void 0)return r_}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(S),z+=S.length-1}else if(this.state.field.length!==0){if(g===!1){let Xe=this.__infoField(),In=Object.keys(iA).map(la=>iA[la].equals(this.state.field.toString())?la:!1).filter(Boolean)[0],Gr=this.__error(new me("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(Xe.column)} at line ${Xe.lines}, value is ${JSON.stringify(this.state.field.toString(A))}`,In?`(${In} bom)`:void 0],this.options,Xe,{field:this.state.field}));if(Gr!==void 0)return Gr}}else{this.state.quoting=!0,z+=S.length-1;continue}if(this.state.quoting===!1){let Xe=this.__isRecordDelimiter(xe,se,z);if(Xe!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=d){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),z+=Xe-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,z+=Xe-1;continue}this.info.bytes=this.state.bufBytesStart+z;let la=this.__onField();if(la!==void 0)return la;this.info.bytes=this.state.bufBytesStart+z+Xe;let Fm=this.__onRecord(i);if(Fm!==void 0)return Fm;if(y!==-1&&this.info.records>=y){this.state.stop=!0,a();return}}this.state.commenting=!1,z+=Xe-1;continue}if(this.state.commenting)continue;if(B!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(B,se,z,xe)!==0){this.state.commenting=!0;continue}let In=this.__isDelimiter(se,z,xe);if(In!==0){this.info.bytes=this.state.bufBytesStart+z;let Gr=this.__onField();if(Gr!==void 0)return Gr;z+=In-1;continue}}}if(this.state.commenting===!1&&m!==0&&this.state.record_length+this.state.field.length>m)return this.__error(new me("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${m}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let Cn=p===!1||thi Line truncated
`,i),Buffer.from(`
`,i),Buffer.from("\r",i)];e:for(let c=0;c<a.length;c++){let l=a[c].length;for(let u=0;u<l;u++)if(a[c][u]!==s[n+u])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:o(function(s){let{encoding:n,raw:i,skip_records_with_error:a}=this.options,c=typeof s=="string"?new Error(s):s;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,i?this.state.rawBuffer.toString(n):void 0)}catch(l){return l}return}else return c},"__error"),__infoDataSet:o(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:o(function(){let{columns:s,raw:n,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:s===!0,index:this.state.record.length,raw:n?this.state.rawBuffer.toString(i):void 0}},"__infoRecord"),__infoField:o(function(){let{columns:s}=this.options,n=Array.isArray(s),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:n===!0?s.length>this.state.record.length?s[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var PK=o(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],s=JI(e),n=o(c=>{s.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),i=o(()=>{},"close"),a=s.parse(t,!0,n,i);if(a!==void 0)throw a;return r},"parse");var ao=class t{static{o(this,"Util")}static getInputList(e,r){return this.getList(Fl(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let s=[];if(e=="")return s;let n=PK(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let i of n)i.length==1?r?.ignoreComma?s.push(i[0]):s.push(...i[0].split(",")):r?.ignoreComma?s.push(i.join(",")):s.push(...i);return s.filter(i=>i).map(i=>r?.trimWhitespace===!1?i:i.trim())}static getInputNumber(e){let r=Fl(e);if(r)return parseInt(r)}static async asyncForEach(e,r){for(let s=0;s<e.length;s++)await r(e[s],s,e)}static isValidURL(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}static isValidRef(e){if(t.isValidURL(e))return!0;for(let r of["git://","github.com/","git@"])if(e.startsWith(r))return!0;return!1}static async powershellCommand(e,r){let s=await Nr("powershell",!0),n=e.replace(/'/g,"''"),i=[];if(r)for(let a in r)i.push(`-${a} '${r[a].replace(/'/g,"''")}'`);return{command:`"${s}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-EncodedCommand",Buffer.from(`& '${n}' ${i.join(" ")}`,"utf16le").toString("base64")]}}static isDirectory(e){try{return kK.default.lstatSync(e).isDirectory()}catch{}return!1}static trimPrefix(e,r){return!e||!r||e.indexOf(r)!==0?e:e.substring(r.length)}static trimSuffix(e,r){if(!e||!r)return e;let s=e.lastIndexOf(r);return s===-1||s+r.length!==e.length?e:e.substring(0,s)}static sleep(e){return new Promise(r=>setTimeout(r,e*1e3))}static hash(e){return vD.default.createHash("sha256").update(e).digest("hex")}static parseBool(e){if(e===void 0)return!1;switch(e){case"1":case"t":case"T":case"true":case"TRUE":case"True":return!0;case"0":case"f":case"F":case"false":case"FALSE":case"False":return!1;default:throw new Error(`parseBool syntax error: ${e}`)}}static parseBoolOrDefault(e,r=!1){try{return this.parseBool(e)}catch{return r}}static formatFileSize(e){if(e===0)return"0 Bytes";let r=1024,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,n)).toFixed(2))+" "+s[n]}static generateRandomString(e=10){return vD.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,s){return DK.default.compile(e,r)(s)}static stringToUnicodeEntities(e){return Array.from(e).map(r=>`&#x${r.charCodeAt(0).toString(16)};`).join("")}static countLines(e){return e.split(/\r\n|\r|\n/).length}static isPathRelativeTo(e,r){let s=Rm.default.resolve(e);return Rm.default.resolve(r).startsWith(s.endsWith(Rm.default.sep)?s:`${s}${Rm.default.sep}`)}static formatDuration(e){if(e===0)return"0s";let r=Math.floor(e/1e9),s=Math.floor(r/3600),n=Math.floor(r%3600/60),i=r%60,a=[];return s&&a.push(`${s}h`),n&&a.push(`${n}m`),(i||a.length===0)&&a.push(`${i}s`),a.join("")}};var vm=class t{static{o(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||Tm.default.join(_K.default.homedir(),".docker")}static configFile(){let e=Tm.default.join(t.configDir,"config.json");if(PD.default.existsSync(e))return JSON.parse(PD.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await Nr("docker",!0).then(e=>(b(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(b(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0}ca Line truncated
${s}`)},"onRetry")})}static isPullTransientError(e){return/Client\.Timeout exceeded|TLS handshake timeout|i\/o timeout|context deadline exceeded|request canceled|connection reset by peer|connection refused|connection timed out|temporary failure|unexpected EOF|\bEOF\b|server misbehaving/i.test(e)||/\b(500|502|503|504)\b/.test(e)||/\b(service unavailable|bad gateway|gateway timeout|internal server error)\b/i.test(e)}};var LX=w(require("crypto"),1);var WI=require("fs"),FK=require("os");var oA=class{static{o(this,"Context")}constructor(){var e,r,s;if(this.payload={},process.env.GITHUB_EVENT_PATH)if((0,WI.existsSync)(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse((0,WI.readFileSync)(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${FK.EOL}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:"https://api.github.com",this.serverUrl=(r=process.env.GITHUB_SERVER_URL)!==null&&r!==void 0?r:"https://github.com",this.graphqlUrl=(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 LD=w(HK(),1),zK=w(kl(),1);var a_e=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{u(s.next(A))}catch(d){a(d)}}o(c,"fulfilled");function l(A){try{u(s.throw(A))}catch(d){a(d)}}o(l,"rejected");function u(A){A.done?i(A.value):n(A.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})};function VK(t,e){if(!t&&!e.auth)throw new Error("Parameter token or opts.auth is required");if(t&&e.auth)throw new Error("Parameters token and opts.auth may not both be specified");return typeof e.auth=="string"?e.auth:`token ${t}`}o(VK,"getAuthString");function YK(t){return new LD.HttpClient().getAgent(t)}o(YK,"getProxyAgent");function c_e(t){return new LD.HttpClient().getAgentDispatcher(t)}o(c_e,"getProxyAgentDispatcher");function $K(t){let e=c_e(t);return o((s,n)=>a_e(this,void 0,void 0,function*(){return(0,zK.fetch)(s,Object.assign(Object.assign({},n),{dispatcher:e}))}),"proxyFetch")}o($K,"getProxyFetch");function JK(){return process.env.GITHUB_API_URL||"https://api.github.com"}o(JK,"getApiBaseUrl");function MD(t){var e;let r=(e=process.env.ACTIONS_ORCHESTRATION_ID)===null||e===void 0?void 0:e.trim();if(r){let n=`actions_orchestration_id/${r.replace(/[^a-z0-9_.-]/gi,"_")}`;return t?.includes(n)?t:`${t?`${t} `:""}${n}`}return t}o(MD,"getUserAgentWithOrchestrationId");function aa(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:"<environment undetectable>"}o(aa,"getUserAgent");function rB(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)=>rB.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))}o(rB,"register");function WK(t,e,r,s){let n=s;t.registry[r]||(t.registry[r]=[]),e==="before"&&(s=o((i,a)=>Promise.resolve().then(n.bind(null,a)).then(i.bind(null,a)),"hook")),e==="after"&&(s=o((i,a)=>{let c;return Promise.resolve().then(i.bind(null,a)).then(l=>(c=l,n(c,a))).then(()=>c)},"hook")),e==="error"&&(s=o((i,a)=>Promise.resolve().then(i.bind(null,a)).catch(c=>n(c,a)),"hook")),t.registry[r].push({hook:s,orig:n})}o(WK,"addHook");function jK(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)}o(jK,"removeHook");var KK=Function.bind,XK=KK.bind(KK);function ZK(t,e,r){let s=XK(jK,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]=XK(WK,null).apply(null,i)})}o(ZK,"bindApi");function u_e(){let t=Symbol("Singular"),e={registry:{}},r=rB.bind(null,e,t);return ZK(r,e,t),r}o(u_e,"Singular");function A_e(){let t={registry:{}},e=rB.bind(null,t);return ZK(e,t),e}o(A_e,"Co Line truncated
`+t.errors.map(e=>` - ${e.message}`).join(`
`)}o(U_e,"_buildMessageForResponseErrors");var q_e=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(U_e(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},G_e=["method","baseUrl","url","headers","request","query","mediaType","operationName"],H_e=["query","method","url"],IX=/\/api\/v3\/?$/;function z_e(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(H_e.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let s=typeof e=="string"?Object.assign({query:e},r):e,n=Object.keys(s).reduce((a,c)=>G_e.includes(c)?(a[c]=s[c],a):(a.variables||(a.variables={}),a.variables[c]=s[c],a),{}),i=s.baseUrl||t.endpoint.DEFAULTS.baseUrl;return IX.test(i)&&(n.url=i.replace(IX,"/api/graphql")),t(n).then(a=>{if(a.data.errors){let c={};for(let l of Object.keys(a.headers))c[l]=a.headers[l];throw new q_e(n,c,a.data)}return a.data.data})}o(z_e,"graphql");function HD(t,e){let r=t.defaults(e);return Object.assign(o((n,i)=>z_e(r,n,i),"newApi"),{defaults:HD.bind(null,r),endpoint:r.endpoint})}o(HD,"withDefaults");var OAt=HD(_m,{headers:{"user-agent":`octokit-graphql.js/${O_e} ${aa()}`},method:"POST",url:"/graphql"});function BX(t){return HD(t,{method:"POST",url:"/graphql"})}o(BX,"withCustomRequest");var zD="(?:[a-zA-Z0-9_-]+)",wX="\\.",bX=new RegExp(`^${zD}${wX}${zD}${wX}${zD}$`),V_e=bX.test.bind(bX);async function Y_e(t){let e=V_e(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),s=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":s?"user-to-server":"oauth"}}o(Y_e,"auth");function $_e(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}o($_e,"withAuthorizationPrefix");async function J_e(t,e,r,s){let n=e.endpoint.merge(r,s);return n.headers.authorization=$_e(t),e(n)}o(J_e,"hook");var QX=o(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(Y_e.bind(null,e),{hook:J_e.bind(null,e)})},"createTokenAuth2");var VD="7.0.6";var xX=o(()=>{},"noop"),W_e=console.warn.bind(console),j_e=console.error.bind(console);function K_e(t={}){return typeof t.debug!="function"&&(t.debug=xX),typeof t.info!="function"&&(t.info=xX),typeof t.warn!="function"&&(t.warn=W_e),typeof t.error!="function"&&(t.error=j_e),t}o(K_e,"createLogger");var NX=`octokit-core.js/${VD} ${aa()}`,oB=class{static{o(this,"Octokit")}static VERSION=VD;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}constructor(...s){let n=s[0]||{};if(typeof e=="function"){super(e(n));return}super(Object.assign({},e,n,n.userAgent&&e.userAgent?{userAgent:`${n.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{o(this,"NewOctokit")}static plugins=r.concat(e.filter(n=>!r.includes(n)))}}constructor(e={}){let r=new eX.Collection,s={baseUrl:_m.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} ${NX}`:NX,e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=_m.defaults(s),this.graphql=BX(this.request).defaults(s),this.log=K_e(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...a}=e,c=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=QX(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 YD="17.0.0";var X_e={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"],createHostedRunnerF Line truncated
More info: ${l.url}`);let m=l.range&&l.range.length>0?l.range[0]?.start.line:void 0,h=!1;for(let g of a)if(g.remote||g.path.endsWith(u)&&g.content===A){c.push({title:d,message:p,file:g.path,startLine:m}),h=!0;break}h||b(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${u}: ${d}`)}return c}};E5(async()=>{let t=Fl("workdir"),e=ao.getInputList("files"),r=Fl("target"),s=ao.getInputList("fields"),n=await fd("Parsing definition",async()=>{let i=["buildx","bake"];for(let l of e)i.push("--file",l);r&&i.push(r),i.push("--print");let a=await Oa("docker",i,{ignoreReturnCode:!0,silent:!0,cwd:t});if(a.exitCode!==0)throw new Error(`buildx bake failed with: ${uB.getErrorMessage(a.stderr)}`);let c=JSON.parse(a.stdout.trim());return re(JSON.stringify(c,null,2)),c});await fd("Generating matrix",async()=>{let i=[];for(let[a,c]of Object.entries(n.target)){let l={target:a};if(s.length===0){i.push(l);continue}let u=!1;Object.keys(c).forEach(A=>{if(s.includes(A)){u=!0;let d=c[A];Array.isArray(d)?d.forEach(p=>{l[A]=p,i.push({...l})}):(l[A]=d,i.push({...l}))}}),u||i.push(l)}re(JSON.stringify(i,null,2)),sG("matrix",JSON.stringify(i))})});
/*! Bundled license information:
undici/lib/web/fetch/body.js:
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
undici/lib/web/websocket/frame.js:
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
tmp/lib/tmp.js:
(*!
* Tmp
*
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
*
* MIT Licensed
*)
@octokit/request-error/dist-src/index.js:
(* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist *)
@octokit/request/dist-bundle/index.js:
(* v8 ignore next -- @preserve *)
(* v8 ignore else -- @preserve *)
*/
//# sourceMappingURL=index.cjs.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../node_modules/tunnel/lib/tunnel.js", "../../../node_modules/tunnel/index.js", "../../../node_modules/undici/lib/core/symbols.js", "../../../node_modules/undici/lib/core/errors.js", "../../../node_modules/undici/lib/core/constants.js", "../../../node_modules/undici/lib/core/tree.js", "../../../node_modules/undici/lib/core/util.js", "../../../node_modules/undici/lib/core/diagnostics.js", "../../../node_modules/undici/lib/core/request.js", "../../../node_modules/undici/lib/dispatcher/dispatcher.js", "../../../node_modules/undici/lib/dispatcher/dispatcher-base.js", "../../../node_modules/undici/lib/util/timers.js", "../../../node_modules/undici/lib/core/connect.js", "../../../node_modules/undici/lib/llhttp/utils.js", "../../../node_modules/undici/lib/llhttp/constants.js", "../../../node_modules/undici/lib/llhttp/llhttp-wasm.js", "../../../node_modules/undici/lib/llhttp/llhttp_simd-wasm.js", "../../../node_modules/undici/lib/web/fetch/constants.js", "../../../node_modules/undici/lib/web/fetch/global.js", "../../../node_modules/undici/lib/web/fetch/data-url.js", "../../../node_modules/undici/lib/web/fetch/webidl.js", "../../../node_modules/undici/lib/web/fetch/util.js", "../../../node_modules/undici/lib/web/fetch/symbols.js", "../../../node_modules/undici/lib/web/fetch/file.js", "../../../node_modules/undici/lib/web/fetch/formdata.js", "../../../node_modules/undici/lib/web/fetch/formdata-parser.js", "../../../node_modules/undici/lib/web/fetch/body.js", "../../../node_modules/undici/lib/dispatcher/client-h1.js", "../../../node_modules/undici/lib/dispatcher/client-h2.js", "../../../node_modules/undici/lib/handler/redirect-handler.js", "../../../node_modules/undici/lib/interceptor/redirect-interceptor.js", "../../../node_modules/undici/lib/dispatcher/client.js", "../../../node_modules/undici/lib/dispatcher/fixed-queue.js", "../../../node_modules/undici/lib/dispatcher/pool-stats.js", "../../../node_modules/undici/lib/dispatcher/pool-base.js", "../../../node_modules/undici/lib/dispatcher/pool.js", "../../../node_modules/undici/lib/dispatcher/balanced-pool.js", "../../../node_modules/undici/lib/dispatcher/agent.js", "../../../node_modules/undici/lib/dispatcher/proxy-agent.js", "../../../node_modules/undici/lib/dispatcher/env-http-proxy-agent.js", "../../../node_modules/undici/lib/handler/retry-handler.js", "../../../node_modules/undici/lib/dispatcher/retry-agent.js", "../../../node_modules/undici/lib/api/readable.js", "../../../node_modules/undici/lib/api/util.js", "../../../node_modules/undici/lib/api/api-request.js", "../../../node_modules/undici/lib/api/abort-signal.js", "../../../node_modules/undici/lib/api/api-stream.js", "../../../node_modules/undici/lib/api/api-pipeline.js", "../../../node_modules/undici/lib/api/api-upgrade.js", "../../../node_modules/undici/lib/api/api-connect.js", "../../../node_modules/undici/lib/api/index.js", "../../../node_modules/undici/lib/mock/mock-errors.js", "../../../node_modules/undici/lib/mock/mock-symbols.js", "../../../node_modules/undici/lib/mock/mock-utils.js", "../../../node_modules/undici/lib/mock/mock-interceptor.js", "../../../node_modules/undici/lib/mock/mock-client.js", "../../../node_modules/undici/lib/mock/mock-pool.js", "../../../node_modules/undici/lib/mock/pluralizer.js", "../../../node_modules/undici/lib/mock/pending-interceptors-formatter.js", "../../../node_modules/undici/lib/mock/mock-agent.js", "../../../node_modules/undici/lib/global.js", "../../../node_modules/undici/lib/handler/decorator-handler.js", "../../../node_modules/undici/lib/interceptor/redirect.js", "../../../node_modules/undici/lib/interceptor/retry.js", "../../../node_modules/undici/lib/interceptor/dump.js", "../../../node_modules/undici/lib/interceptor/dns.js", "../../../node_modules/undici/lib/web/fetch/headers.js", "../../../node_modules/undici/lib/web/fetch/response.js", "../../../node_modules/undici/lib/web/fetch/dispatcher-weakref.js", "../../../node_modules/undici/lib/web/fetch/request.js", "../../../node_modules/undici/lib/web/fetch/index.js", "../../../node_modules/undici/lib/web/fileapi/symbols.js", "../../../node_modules/undici/lib/web/fileapi/progressevent.js", "../../../node_modules/undici/lib/web/fileapi/encoding.js", "../../../node_modules/undici/lib/web/fileapi/util.js", "../../../node_modules/undici/lib/web/fileapi/filereader.js", "../../../node_modules/undici/lib/web/cache/symbols.js", "../../../node_modules/undici/lib/web/cache/util.js", "../../../node_modules/undici/lib/web/cache/cache.js", "../../../node_modules/undici/lib/web/cache/cachestorage.js", "../../../node_modules/undici/lib/web/cookies/constants.js", "../../../node_modules/undici/lib/web/cookies/util.js", "../../../node_modules/undici/lib/web/cookies/parse.js", "../../../node_modules/undici/lib/web/cookies/index.js", "../../../node_modules/undici/lib/web/websocket/events.js", "../../../node_modules/undici/lib/web/websocket/constants.js", "../../../node_modules/undici/lib/web/websocket/symbols.Line truncated
"sourcesContent": ["'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('Line truncated
"mappings": "ooBAAA,IAAAA,GAAAC,EAAAC,IAAA,cAEA,IAAIC,IAAM,QAAQ,KAAK,EACnBC,GAAM,QAAQ,KAAK,EACnBC,GAAO,QAAQ,MAAM,EACrBC,GAAQ,QAAQ,OAAO,EACvBC,GAAS,QAAQ,QAAQ,EACzBC,IAAS,QAAQ,QAAQ,EACzBC,GAAO,QAAQ,MAAM,EAGzBP,GAAQ,aAAeQ,GACvBR,GAAQ,cAAgBS,GACxBT,GAAQ,cAAgBU,GACxBV,GAAQ,eAAiBW,GAGzB,SAASH,GAAaI,EAAS,CAC7B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUV,GAAK,QACdU,CACT,CAJSE,EAAAP,GAAA,gBAMT,SAASC,GAAcG,EAAS,CAC9B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUV,GAAK,QACrBU,EAAM,aAAeG,GACrBH,EAAM,YAAc,IACbA,CACT,CANSE,EAAAN,GAAA,iBAQT,SAASC,GAAcE,EAAS,CAC9B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUT,GAAM,QACfS,CACT,CAJSE,EAAAL,GAAA,iBAMT,SAASC,GAAeC,EAAS,CAC/B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUT,GAAM,QACtBS,EAAM,aAAeG,GACrBH,EAAM,YAAc,IACbA,CACT,CANSE,EAAAJ,GAAA,kBAST,SAASG,GAAeF,EAAS,CAC/B,IAAIK,EAAO,KACXA,EAAK,QAAUL,GAAW,CAAC,EAC3BK,EAAK,aAAeA,EAAK,QAAQ,OAAS,CAAC,EAC3CA,EAAK,WAAaA,EAAK,QAAQ,YAAcd,GAAK,MAAM,kBACxDc,EAAK,SAAW,CAAC,EACjBA,EAAK,QAAU,CAAC,EAEhBA,EAAK,GAAG,OAAQF,EAAA,SAAgBG,EAAQC,EAAMC,EAAMC,EAAc,CAEhE,QADIT,EAAUU,GAAUH,EAAMC,EAAMC,CAAY,EACvCE,EAAI,EAAGC,EAAMP,EAAK,SAAS,OAAQM,EAAIC,EAAK,EAAED,EAAG,CACxD,IAAIE,EAAUR,EAAK,SAASM,CAAC,EAC7B,GAAIE,EAAQ,OAASb,EAAQ,MAAQa,EAAQ,OAASb,EAAQ,KAAM,CAGlEK,EAAK,SAAS,OAAOM,EAAG,CAAC,EACzBE,EAAQ,QAAQ,SAASP,CAAM,EAC/B,MACF,CACF,CACAA,EAAO,QAAQ,EACfD,EAAK,aAAaC,CAAM,CAC1B,EAdgB,SAcf,CACH,CAvBSH,EAAAD,GAAA,kBAwBTP,GAAK,SAASO,GAAgBT,GAAO,YAAY,EAEjDS,GAAe,UAAU,WAAaC,EAAA,SAAoBW,EAAKP,EAAMC,EAAMC,EAAc,CACvF,IAAIJ,EAAO,KACPL,EAAUe,GAAa,CAAC,QAASD,CAAG,EAAGT,EAAK,QAASK,GAAUH,EAAMC,EAAMC,CAAY,CAAC,EAE5F,GAAIJ,EAAK,QAAQ,QAAU,KAAK,WAAY,CAE1CA,EAAK,SAAS,KAAKL,CAAO,EAC1B,MACF,CAGAK,EAAK,aAAaL,EAAS,SAASM,EAAQ,CAC1CA,EAAO,GAAG,OAAQU,CAAM,EACxBV,EAAO,GAAG,QAASW,CAAe,EAClCX,EAAO,GAAG,cAAeW,CAAe,EACxCH,EAAI,SAASR,CAAM,EAEnB,SAASU,GAAS,CAChBX,EAAK,KAAK,OAAQC,EAAQN,CAAO,CACnC,CAFSG,EAAAa,EAAA,UAIT,SAASC,EAAgBC,EAAK,CAC5Bb,EAAK,aAAaC,CAAM,EACxBA,EAAO,eAAe,OAAQU,CAAM,EACpCV,EAAO,eAAe,QAASW,CAAe,EAC9CX,EAAO,eAAe,cAAeW,CAAe,CACtD,CALSd,EAAAc,EAAA,kBAMX,CAAC,CACH,EA5BsC,cA8BtCf,GAAe,UAAU,aAAeC,EAAA,SAAsBH,EAASmB,EAAI,CACzE,IAAId,EAAO,KACPe,EAAc,CAAC,EACnBf,EAAK,QAAQ,KAAKe,CAAW,EAE7B,IAAIC,EAAiBN,GAAa,CAAC,EAAGV,EAAK,aAAc,CACvD,OAAQ,UACR,KAAML,EAAQ,KAAO,IAAMA,EAAQ,KACnC,MAAO,GACP,QAAS,CACP,KAAMA,EAAQ,KAAO,IAAMA,EAAQ,IACrC,CACF,CAAC,EACGA,EAAQ,eACVqB,EAAe,aAAerB,EAAQ,cAEpCqB,EAAe,YACjBA,EAAe,QAAUA,EAAe,SAAW,CAAC,EACpDA,EAAe,QAAQ,qBAAqB,EAAI,SAC5C,IAAI,OAAOA,EAAe,SAAS,EAAE,SAAS,QAAQ,GAG5DC,GAAM,wBAAwB,EAC9B,IAAIC,EAAalB,EAAK,QAAQgB,CAAc,EAC5CE,EAAW,4BAA8B,GACzCA,EAAW,KAAK,WAAYC,CAAU,EACtCD,EAAW,KAAK,UAAWE,CAAS,EACpCF,EAAW,KAAK,UAAWG,CAAS,EACpCH,EAAW,KAAK,QAASI,CAAO,EAChCJ,EAAW,IAAI,EAEf,SAASC,EAAWI,EAAK,CAEvBA,EAAI,QAAU,EAChB,CAHSzB,EAAAqB,EAAA,cAKT,SAASC,EAAUG,EAAKtB,EAAQuB,EAAM,CAEpC,QAAQ,SAAS,UAAW,CAC1BH,EAAUE,EAAKtB,EAAQuB,CAAI,CAC7B,CAAC,CACH,CALS1B,EAAAsB,EAAA,aAOT,SAASC,EAAUE,EAAKtB,EAAQuB,EAAM,CAIpC,GAHAN,EAAW,mBAAmB,EAC9BjB,EAAO,mBAAmB,EAEtBsB,EAAI,aAAe,IAAK,CAC1BN,GAAM,2DACJM,EAAI,UAAU,EAChBtB,EAAO,QAAQ,EACf,IAAIwB,EAAQ,IAAI,MAAM,yDACJF,EAAI,UAAU,EAChCE,EAAM,KAAO,aACb9B,EAAQ,QAAQ,KAAK,QAAS8B,CAAK,EACnCzB,EAAK,aAAae,CAAW,EAC7B,MACF,CACA,GAAIS,EAAK,OAAS,EAAG,CACnBP,GAAM,sCAAsC,EAC5ChB,EAAO,QAAQ,EACf,IAAIwB,EAAQ,IAAI,MAAM,sCAAsC,EAC5DA,EAAM,KAAO,aACb9B,EAAQ,QAAQ,KAAK,QAAS8B,CAAK,EACnCzB,EAAK,aAAae,CAAW,EAC7B,MACF,CACA,OAAAE,GAAM,sCAAsC,EAC5CjB,EAAK,QAAQA,EAAK,QAAQ,QAAQe,CAAW,CAAC,EAAId,EAC3Ca,EAAGb,CAAM,CAClB,CA3BSH,EAAAuB,EAAA,aA6BT,SAASC,EAAQI,EAAO,CACtBR,EAAW,mBAAmB,EAE9BD,GAAM;AAAA,EACAS,EAAM,QAASA,EAAM,KAAK,EAChC,IAAID,EAAQ,IAAI,MAAM,oDACWC,EAAM,OAAO,EAC9CD,EAAM,KAAO,aACb9B,EAAQ,QAAQ,KAAK,QAAS8B,CAAK,EACnCzB,EAAK,aAAae,CAAW,CAC/B,CAVSjB,EAAAwB,EAAA,UAWX,EAnFwC,gBAqFxCzB,GAAe,UAAU,aAAeC,EAAA,SAAsBG,EAAQ,CACpE,IAAI0B,EAAM,KAAK,QAAQ,QAAQ1B,CAAM,EACrC,GAAI0B,IAAQ,GAGZ,MAAK,QAAQ,OAAOA,EAAK,CAAC,EAE1B,IAAInB,EAAU,KAAK,SAAS,MAAM,EAC9BA,GAGF,KAAK,aAAaA,EAAS,SAASP,EAAQ,CAC1CO,EAAQ,QAAQ,SAASP,CAAM,CACjC,CAAC,EAEL,EAfwC,gBAiBxC,SAASF,GAAmBJ,EAASmB,EAAI,CACvC,IAAId,EAAO,KACXH,GAAe,UAAU,aAAa,KAAKG,EAAML,EAAS,SAASM,EAAQ,CACzE,IAAI2B,EAAajC,EAAQ,QAAQ,UAAU,MAAM,EAC7CkC,EAAanB,GAAa,CAAC,EAAGV,EAAK,QAAS,CAC9C,OAAQC,EACR,WAAY2B,EAAaA,EAAW,QAAQ,OAAQ,EAAE,EAAIjC,EAAQ,IACpE,CAAC,EAGGmC,EAAe7C,GAAI,QAAQ,EAAG4C,CAAU,EAC5C7B,EAAK,QAAQA,EAAK,QAAQ,QAAQC,CAAM,CAAC,EAAI6B,EAC7ChB,EAAGgB,CAAY,CACjB,CAAC,CACH,CAdShC,EAAAC,GAAA,sBAiBT,SAASM,GAAUH,EAAMC,EAAMC,EAAc,CAC3C,OAAI,OAAOF,GAAS,SACX,CACL,KAAMA,EACN,KAAMC,EACN,aAAcC,CAChB,EAEKF,CACT,CATSJ,EAAAO,GAAA,aAWT,SAASK,GAAaqB,EAAQ,CAC5B,QAASzB,EAAI,EAAGC,EAAM,UAAU,OAAQD,EAAIC,EAAK,EAAED,EAAG,CACpD,IAAI0B,EAAY,UAAU1B,CAAC,EAC3B,GAAI,OAAO0B,GAAc,SAEvB,QADIC,EAAO,OAAO,KAAKD,CAAS,EACvBE,EAAI,EAAGC,EAASF,EAAK,OAAQC,EAAIC,EAAQ,EAAED,EAAG,CACrD,IAAIE,EAAIH,EAAKC,CAAC,EACVF,EAAUI,CAAC,IAAM,SACnBL,EAAOK,CAAC,EAAIJ,EAAUI,CAAC,EAE3B,CAEJ,CACA,OAAOL,CACT,CAdSjC,EAAAY,GAAA,gBAiBT,IAAIO,GACA,QAAQ,IAAI,YAAc,aAAa,KAAK,QAAQ,IAAI,UAAU,EACpEA,GAAQnB,EAAA,UAAW,CACjB,IAAIuC,EAAO,MAAM,UAAU,MAAM,KAAK,SAAS,EAC3C,OAAOA,EAAK,CAAC,GAAM,SACrBA,EAAK,CAAC,EAAI,WALine truncated
"names": ["require_tunnel", "__commonJSMin", "exports", "net", "tls", "http", "https", "events", "assert", "util", "httpOverHttp", "httpsOverHttp", "httpOverHttps", "httpsOverHttps", "options", "agent", "TunnelingAgent", "__name", "createSecureSocket", "self", "socket", "host", "port", "localAddress", "toOptions", "i", "len", "pending", "req", "mergeOptions", "onFree", "onCloseOrRemove", "err", "cb", "placeholder", "connectOptions", "debug", "connectReq", "onResponse", "onUpgrade", "onConnect", "onError", "res", "head", "error", "cause", "pos", "hostHeader", "tlsOptions", "secureSocket", "target", "overrides", "keys", "j", "keyLen", "k", "args", "require_tunnel", "__commonJSMin", "exports", "module", "require_symbols", "__commonJSMin", "exports", "module", "require_errors", "__commonJSMin", "exports", "module", "kUndiciError", "UndiciError", "__name", "message", "instance", "kConnectTimeoutError", "ConnectTimeoutError", "kHeadersTimeoutError", "HeadersTimeoutError", "kHeadersOverflowError", "HeadersOverflowError", "kBodyTimeoutError", "BodyTimeoutError", "kResponseStatusCodeError", "ResponseStatusCodeError", "statusCode", "headers", "body", "kInvalidArgumentError", "InvalidArgumentError", "kInvalidReturnValueError", "InvalidReturnValueError", "kAbortError", "AbortError", "kRequestAbortedError", "RequestAbortedError", "kInformationalError", "InformationalError", "kRequestContentLengthMismatchError", "RequestContentLengthMismatchError", "kResponseContentLengthMismatchError", "ResponseContentLengthMismatchError", "kClientDestroyedError", "ClientDestroyedError", "kClientClosedError", "ClientClosedError", "kSocketError", "SocketError", "socket", "kNotSupportedError", "NotSupportedError", "kBalancedPoolMissingUpstreamError", "BalancedPoolMissingUpstreamError", "kHTTPParserError", "HTTPParserError", "code", "data", "kResponseExceededMaxSizeError", "ResponseExceededMaxSizeError", "kRequestRetryError", "RequestRetryError", "kResponseError", "ResponseError", "kSecureProxyConnectionError", "SecureProxyConnectionError", "cause", "options", "kMessageSizeExceededError", "MessageSizeExceededError", "require_constants", "__commonJSMin", "exports", "module", "headerNameLowerCasedRecord", "wellknownHeaderNames", "i", "key", "lowerCasedKey", "require_tree", "__commonJSMin", "exports", "module", "wellknownHeaderNames", "headerNameLowerCasedRecord", "TstNode", "_TstNode", "__name", "key", "value", "index", "length", "node", "code", "keylength", "TernarySearchTree", "tree", "i", "require_util", "__commonJSMin", "exports", "module", "assert", "kDestroyed", "kBodyUsed", "kListeners", "kBody", "IncomingMessage", "stream", "net", "Blob", "nodeUtil", "stringify", "EE", "InvalidArgumentError", "headerNameLowerCasedRecord", "tree", "nodeMajor", "nodeMinor", "v", "BodyAsyncIterable", "__name", "body", "wrapRequestBody", "isStream", "bodyLength", "isIterable", "nop", "obj", "isBlobLike", "object", "sTag", "buildURL", "url", "queryParams", "stringified", "isValidPort", "port", "value", "isHttpOrHttpsPrefixed", "parseURL", "origin", "path", "parseOrigin", "getHostname", "host", "idx", "getServerName", "servername", "deepClone", "isAsyncIterable", "state", "isBuffer", "isDestroyed", "destroy", "err", "KEEPALIVE_TIMEOUT_EXPR", "parseKeepAliveTimeout", "val", "m", "headerNameToString", "bufferToLowerCasedHeaderName", "parseHeaders", "headers", "i", "key", "headersValue", "x", "parseRawHeaders", "len", "ret", "hasContentLength", "contentDispositionIdx", "kLen", "n", "buffer", "validateHandler", "handler", "method", "upgrade", "isDisturbed", "isErrored", "isReadable", "getSocketInfo", "socket", "ReadableStreamFrom", "iterable", "iterator", "controller", "done", "buf", "reason", "isFormDataLike", "addAbortListener", "signal", "listener", "hasToWellFormed", "hasIsWellFormed", "toUSVString", "isUSVString", "isTokenCharCode", "c", "isValidHTTPToken", "characters", "headerCharRegex", "isValidHeaderValue", "parseRangeHeader", "range", "addListener", "name", "removeAllListeners", "errorRequest", "client", "request", "kEnumerableProperty", "normalizedMethodRecordsBase", "normalizedMethodRecords", "require_diagnostics", "__commonJSMin", "exports", "module", "diagnosticsChannel", "util", "undiciDebugLog", "fetchDebuglog", "websocketDebuglog", "isClientSet", "channels", "debuglog", "evt", "version", "protocol", "port", "host", "error", "method", "path", "origin", "statusCode", "address", "websocket", "code", "reason", "err", "require_request", "__commonJSMin", "exports", "module", "InvalidArgumentError", "NotSupportedError", "assert", "isValidHTTPToken", "isValidHeaderValue", "isStream", "destroy", "isBuffer", "isFormDataLike", "isIterable", "isBlobLike", "buildURL", "validateHandler", "getServerName", "normalizedMethodRecords", "channels", "headerNameLowerCasedRecord", "invalidPathRegex", "kHandler", "Request", "__name", "origin", "path", "method", "body", "headers", "query", "idempotent", "blocking", "upgrade", "headersTimeout", "bodyTimeout", "resetLine truncated
}
+5
View File
@@ -0,0 +1,5 @@
This file was generated with the generate-license-file npm package!
https://www.npmjs.com/package/generate-license-file
This file was generated with the generate-license-file npm package!
https://www.npmjs.com/package/generate-license-file
+26
View File
@@ -0,0 +1,26 @@
{
"name": "docker-buildx-bake-matrix",
"description": "GitHub Action to generate a multi-dimension GitHub matrix from bake definition files",
"type": "module",
"main": "src/main.ts",
"scripts": {
"build": "esbuild src/main.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs --sourcemap --minify --keep-names && yarn run license",
"license": "generate-license-file --input package.json --output dist/licenses.txt --overwrite --ci --no-spinner --eol lf"
},
"repository": {
"type": "git",
"url": "git+https://github.com/docker/bake-action.git",
"directory": "subaction/matrix"
},
"author": "Docker Inc.",
"license": "Apache-2.0",
"dependencies": {
"@actions/core": "^3.0.1",
"@actions/exec": "^3.0.0",
"@docker/actions-toolkit": "^0.100.0"
},
"devDependencies": {
"esbuild": "^0.28.0",
"generate-license-file": "^4.1.1"
}
}
+80
View File
@@ -0,0 +1,80 @@
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as actionsToolkit from '@docker/actions-toolkit';
import {Buildx} from '@docker/actions-toolkit/lib/buildx/buildx.js';
import {Util} from '@docker/actions-toolkit/lib/util.js';
import {BakeDefinition, Target} from '@docker/actions-toolkit/lib/types/buildx/bake.js';
actionsToolkit.run(
// main
async () => {
const workdir = core.getInput('workdir');
const files = Util.getInputList('files');
const target = core.getInput('target');
const fields = Util.getInputList('fields');
const def = await core.group(`Parsing definition`, async () => {
const args = ['buildx', 'bake'];
for (const file of files) {
args.push('--file', file);
}
if (target) {
args.push(target);
}
args.push('--print');
const res = await exec.getExecOutput('docker', args, {
ignoreReturnCode: true,
silent: true,
cwd: workdir
});
if (res.exitCode !== 0) {
throw new Error(`buildx bake failed with: ${Buildx.getErrorMessage(res.stderr)}`);
}
const def: BakeDefinition = JSON.parse(res.stdout.trim());
core.info(JSON.stringify(def, null, 2));
return def;
});
await core.group(`Generating matrix`, async () => {
const result: Array<MatrixConfigEntry> = [];
for (const [targetName, target] of Object.entries(def.target)) {
const entry: MatrixConfigEntry = {target: targetName};
if (fields.length === 0) {
result.push(entry);
continue;
}
let fieldFound = false;
Object.keys(target).forEach(field => {
if (fields.includes(field)) {
fieldFound = true;
const value = target[field];
if (Array.isArray(value)) {
value.forEach(v => {
entry[field] = v;
result.push({...entry});
});
} else {
entry[field] = value;
result.push({...entry});
}
}
});
if (!fieldFound) {
result.push(entry);
}
}
core.info(JSON.stringify(result, null, 2));
core.setOutput('matrix', JSON.stringify(result));
});
}
);
type ArrayToSingleEntry<Type> = {
[Property in keyof Type]: Type[Property] extends Array<infer Entry> ? Entry : Type[Property];
};
type MatrixConfigEntry = Partial<ArrayToSingleEntry<Target>> & {
target: string;
};
+2 -1
View File
@@ -12,6 +12,7 @@
"useUnknownInCatchVariables": false,
},
"include": [
"src/**/*.ts"
"src/**/*.ts",
"subaction/matrix/src/**/*.ts"
]
}
+2 -2
View File
@@ -9,8 +9,8 @@ export default defineConfig({
coverage: {
provider: 'v8',
reporter: ['clover'],
include: ['src/**/*.ts'],
exclude: ['src/**/main.ts']
include: ['src/**/*.ts', 'subaction/matrix/src/**/*.ts'],
exclude: ['src/**/main.ts', 'subaction/matrix/src/**/main.ts']
}
}
});
+12
View File
@@ -2830,6 +2830,18 @@ __metadata:
languageName: node
linkType: hard
"docker-buildx-bake-matrix@workspace:subaction/matrix":
version: 0.0.0-use.local
resolution: "docker-buildx-bake-matrix@workspace:subaction/matrix"
dependencies:
"@actions/core": "npm:^3.0.1"
"@actions/exec": "npm:^3.0.0"
"@docker/actions-toolkit": "npm:^0.100.0"
esbuild: "npm:^0.28.0"
generate-license-file: "npm:^4.1.1"
languageName: unknown
linkType: soft
"docker-buildx-bake@workspace:.":
version: 0.0.0-use.local
resolution: "docker-buildx-bake@workspace:."