feat: implement wildcard resolution into the action (#93)
* feat: remove retry attempts * [autofix.ci] apply automated fixes * feat: get download url from github's api * [autofix.ci] apply automated fixes * fix: add token property to action definition & fix satisfies params * [autofix.ci] apply automated fixes * fix: getPlatform, getArchitecture + eversion * [autofix.ci] apply automated fixes * fix: duplicate v * [autofix.ci] apply automated fixes * fix: check if valid semver and add bun-v * [autofix.ci] apply automated fixes * refactor: wrap validation * [autofix.ci] apply automated fixes * ci(format): use bun bun install is rqeuired for patches * ci(format): use bun bun install is rqeuired for patches * [autofix.ci] apply automated fixes * feat: bring back support for sha downloads * [autofix.ci] apply automated fixes * fix: add bearer prefix for token * [autofix.ci] apply automated fixes * fix: proper error when artifact is not found * [autofix.ci] apply automated fixes * conflicts * autofix build * fix * fix * fix * fix * fix * autofix build * fix * [autofix.ci] apply automated fixes * fix * [autofix.ci] apply automated fixes * fix * [autofix.ci] apply automated fixes * fix * fix * [autofix.ci] apply automated fixes * fix * fix * [autofix.ci] apply automated fixes * fix: drop sha support for now * [autofix.ci] apply automated fixes * fix: filter tags * [autofix.ci] apply automated fixes * docs: token * docs: token * docs: token * refactor: cleanup * [autofix.ci] apply automated fixes * refactor: cleanup --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
b7a1c7ccf2
commit
8c296f9cb7
13 files changed
+389
-164
No files matched your search
@@ -1,28 +1,86 @@
|
||||
name: ⚖️ Compare Bun Version
|
||||
description: Compare the version of Bun to a specified version
|
||||
description: Compare the installed Bun version against a version specification.
|
||||
|
||||
inputs:
|
||||
bun-version:
|
||||
description: The version of Bun to compare against
|
||||
description: The version spec to compare against (e.g., '1.1.0', 'canary', '>1.2.0', '1.x').
|
||||
required: true
|
||||
default: "1.1.0"
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 🛠️ Get installed Bun version
|
||||
- name: 🛠️ Get installed Bun version and revision
|
||||
id: bun
|
||||
shell: bash
|
||||
run: |
|
||||
bun --version
|
||||
echo "version=$(bun --version)" >> $GITHUB_OUTPUT
|
||||
echo "version=$(bun --version | tr -d '\r\n')" >> $GITHUB_OUTPUT
|
||||
echo "revision=$(bun --revision 2>/dev/null || true)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: ⚖️ Compare versions
|
||||
shell: bash
|
||||
env:
|
||||
REQUESTED_SPEC: ${{ inputs.bun-version }}
|
||||
ACTUAL_VERSION: ${{ steps.bun.outputs.version }}
|
||||
ACTUAL_REVISION: ${{ steps.bun.outputs.revision }}
|
||||
run: |
|
||||
if [[ "${{ steps.bun.outputs.version }}" == "${{ inputs.bun-version }}" ]]; then
|
||||
echo "Version is ${{ inputs.bun-version }}"
|
||||
else
|
||||
echo "Expected version to be ${{ inputs.bun-version }}, got ${{ steps.bun.outputs.version }}"
|
||||
exit 1
|
||||
set -euo pipefail
|
||||
|
||||
# Function to compare two semantic versions (e.g., version_compare 1.2.3 1.10.0)
|
||||
# Returns: 0 if v1 == v2, 1 if v1 > v2, 2 if v1 < v2
|
||||
version_compare() {
|
||||
if [[ "$1" == "$2" ]]; then return 0; fi
|
||||
local lowest=$(printf '%s\n' "$1" "$2" | sort -V | head -n1)
|
||||
if [[ "$1" == "$lowest" ]]; then return 2; else return 1; fi
|
||||
}
|
||||
|
||||
echo "Requested spec: ${REQUESTED_SPEC}"
|
||||
echo "Actual version: ${ACTUAL_VERSION}"
|
||||
|
||||
# Case 1: 'latest' - always passes
|
||||
if [[ "${REQUESTED_SPEC}" == "latest" ]]; then
|
||||
echo "OK: Skipping explicit version check for 'latest'."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Case 2: 'canary' - check for 'canary' in revision or version string
|
||||
if [[ "${REQUESTED_SPEC}" == "canary" ]]; then
|
||||
if [[ "${ACTUAL_REVISION}" == *canary* ]] || [[ "${ACTUAL_VERSION}" == *canary* ]]; then
|
||||
echo "OK: Detected canary build (version: ${ACTUAL_VERSION}, revision: ${ACTUAL_REVISION:-n/a})."
|
||||
exit 0
|
||||
else
|
||||
echo "Error: Expected a canary build, but got ${ACTUAL_VERSION} (revision: ${ACTUAL_REVISION:-n/a})."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Case 3: Semver ranges (e.g., >1.0.0, <2, 1.x, 1.1.0)
|
||||
op_part=$(echo "${REQUESTED_SPEC}" | sed -E 's/^([><=]*).*/\1/')
|
||||
version_part=$(echo "${REQUESTED_SPEC}" | sed -E 's/^[><= ]*//')
|
||||
|
||||
op="${op_part:-==}"
|
||||
version_base="${version_part//.x/}"
|
||||
|
||||
# Handle wildcards like '1.x' or '1'
|
||||
if [[ "${version_part}" == *.x* ]] || { [[ ! "${version_part}" == *.* ]] && [[ "${op}" == "==" ]]; }; then
|
||||
if [[ "${ACTUAL_VERSION}" == "${version_base}" || "${ACTUAL_VERSION}" == "${version_base}".* ]]; then
|
||||
echo "OK: Version ${ACTUAL_VERSION} matches wildcard spec '${REQUESTED_SPEC}'."
|
||||
exit 0
|
||||
else
|
||||
echo "Error: Version ${ACTUAL_VERSION} does not match wildcard spec '${REQUESTED_SPEC}'."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Perform comparison for >, <, >=, <=, ==
|
||||
version_compare "${ACTUAL_VERSION}" "${version_part}" && result=0 || result=$?
|
||||
|
||||
case "${op}" in
|
||||
'==') if [[ ${result} -ne 0 ]]; then echo "Error: Expected version ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
'>') if [[ ${result} -ne 1 ]]; then echo "Error: Expected version > ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
'<') if [[ ${result} -ne 2 ]]; then echo "Error: Expected version < ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
'>=') if [[ ${result} -eq 2 ]]; then echo "Error: Expected version >= ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
'<=') if [[ ${result} -eq 1 ]]; then echo "Error: Expected version <= ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
*) echo "Error: Unsupported operator '${op}' in spec '${REQUESTED_SPEC}'." && exit 1 ;;
|
||||
esac
|
||||
|
||||
echo "OK: Version ${ACTUAL_VERSION} satisfies spec '${REQUESTED_SPEC}'."
|
||||
@@ -54,6 +54,10 @@ jobs:
|
||||
- latest
|
||||
- canary
|
||||
- "1.1.0"
|
||||
- "1.x"
|
||||
- "1"
|
||||
- "> 1.0.0"
|
||||
- "< 2"
|
||||
# https://github.com/oven-sh/setup-bun/issues/37
|
||||
# - "1.x"
|
||||
# - "1"
|
||||
@@ -78,6 +82,11 @@ jobs:
|
||||
run: |
|
||||
bun --version
|
||||
|
||||
- name: ⚖️ Verify Bun version
|
||||
uses: ./.github/actions/compare-bun-version
|
||||
with:
|
||||
bun-version: ${{ matrix.bun-version }}
|
||||
|
||||
setup-bun-from-file:
|
||||
name: setup-bun from (${{ matrix.os }}, ${{ matrix.file.name }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@@ -66,14 +66,15 @@ If you need to override the download URL, you can use the `bun-download-url` inp
|
||||
|
||||
## Inputs
|
||||
|
||||
| Name | Description | Default | Examples |
|
||||
| ------------------ | ----------------------------------------------------- | ----------- | ------------------------------------------------ |
|
||||
| `bun-version` | The version of Bun to download and install. | `latest` | `canary`, `1.0.0` |
|
||||
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions` |
|
||||
| `bun-download-url` | URL to download .zip file for Bun release | | |
|
||||
| `registry-url` | Registry URL where some private package is stored. | `undefined` | `"https://npm.pkg.github.com/"` |
|
||||
| `scope` | Scope for private packages. | `undefined` | `"@foo"`, `"@orgname"` |
|
||||
| `no-cache` | Disable caching of the downloaded executable. | `false` | `true`, `false` |
|
||||
| Name | Description | Default | Examples |
|
||||
| ------------------ | --------------------------------------------------------------------------------- | --------------------- | ------------------------------------------------ |
|
||||
| `bun-version` | The version of Bun to download and install. | `latest` | `canary`, `1.0.0`, `1.0.x` |
|
||||
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions` |
|
||||
| `bun-download-url` | URL to download .zip file for Bun release | | |
|
||||
| `registry-url` | Registry URL where some private package is stored. | `undefined` | `"https://npm.pkg.github.com/"` |
|
||||
| `scope` | Scope for private packages. | `undefined` | `"@foo"`, `"@orgname"` |
|
||||
| `no-cache` | Disable caching of the downloaded executable. | `false` | `true`, `false` |
|
||||
| `token` | Personal access token (PAT) used to fetch tags from the `oven-sh/bun` repository. | `${{ github.token }}` | `${{ secrets.GITHUB_TOKEN }}` |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@ inputs:
|
||||
type: boolean
|
||||
default: false
|
||||
description: Disable caching of bun executable.
|
||||
token:
|
||||
required: false
|
||||
default: ${{ github.token }}
|
||||
description: Personal access token (PAT) used to fetch tags from oven-sh/bun repository. Recommended for resolving wildcard/range versions to avoid GitHub API rate limiting.
|
||||
|
||||
outputs:
|
||||
bun-version:
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"@actions/io": "^1.1.2",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"compare-versions": "^6.1.1",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "^1.1.13",
|
||||
@@ -21,6 +22,9 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"compare-versions@6.1.1": "patches/compare-versions@6.1.1.patch",
|
||||
},
|
||||
"packages": {
|
||||
"@actions/cache": ["@actions/cache@4.0.3", "", { "dependencies": { "@actions/core": "^1.11.1", "@actions/exec": "^1.0.1", "@actions/glob": "^0.1.0", "@actions/http-client": "^2.1.1", "@actions/io": "^1.0.1", "@azure/abort-controller": "^1.1.0", "@azure/ms-rest-js": "^2.6.0", "@azure/storage-blob": "^12.13.0", "@protobuf-ts/plugin": "^2.9.4", "semver": "^6.3.1" } }, "sha512-SvrqFtYJ7I48A/uXNkoJrnukx5weQv1fGquhs3+4nkByZThBH109KTIqj5x/cGV7JGNvb8dLPVywUOqX1fjiXg=="],
|
||||
|
||||
@@ -144,6 +148,8 @@
|
||||
|
||||
"combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],
|
||||
|
||||
"compare-versions": ["compare-versions@6.1.1", "", {}, "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg=="],
|
||||
|
||||
"concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="],
|
||||
|
||||
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
|
||||
|
||||
+110
-109
@@ -1,31 +1,31 @@
|
||||
var MQe=Object.create;var $m=Object.defineProperty;var _Qe=Object.getOwnPropertyDescriptor;var OQe=Object.getOwnPropertyNames;var PQe=Object.getPrototypeOf,qQe=Object.prototype.hasOwnProperty;var a=(t,e)=>$m(t,"name",{value:e,configurable:!0});var Le=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),lI=(t,e)=>{for(var A in e)$m(t,A,{get:e[A],enumerable:!0})},Q_=(t,e,A,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of OQe(e))!qQe.call(t,i)&&i!==A&&$m(t,i,{get:()=>e[i],enumerable:!(r=_Qe(e,i))||r.enumerable});return t};var Nr=(t,e,A)=>(A=t!=null?MQe(PQe(t)):{},Q_(e||!t||!t.__esModule?$m(A,"default",{value:t,enumerable:!0}):A,t)),Zo=t=>Q_($m({},"__esModule",{value:!0}),t);var dI=E(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});vp.toCommandProperties=vp.toCommandValue=void 0;function HQe(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}a(HQe,"toCommandValue");vp.toCommandValue=HQe;function YQe(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}a(YQe,"toCommandProperties");vp.toCommandProperties=YQe});var w_=E(ws=>{"use strict";var GQe=ws&&ws.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),JQe=ws&&ws.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),VQe=ws&&ws.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&GQe(e,t,A);return JQe(e,t),e};Object.defineProperty(ws,"__esModule",{value:!0});ws.issue=ws.issueCommand=void 0;var WQe=VQe(require("os")),I_=dI();function y_(t,e,A){let r=new i4(t,e,A);process.stdout.write(r.toString()+WQe.EOL)}a(y_,"issueCommand");ws.issueCommand=y_;function zQe(t,e=""){y_(t,{},e)}a(zQe,"issue");ws.issue=zQe;var B_="::",i4=class{static{a(this,"Command")}constructor(e,A,r){e||(e="missing.command"),this.command=e,this.properties=A,this.message=r}toString(){let e=B_+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let A=!0;for(let r in this.properties)if(this.properties.hasOwnProperty(r)){let i=this.properties[r];i&&(A?A=!1:e+=",",e+=`${r}=${XQe(i)}`)}}return e+=`${B_}${jQe(this.message)}`,e}};function jQe(t){return(0,I_.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}a(jQe,"escapeData");function XQe(t){return(0,I_.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}a(XQe,"escapeProperty")});var R_=E(bs=>{"use strict";var ZQe=bs&&bs.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),KQe=bs&&bs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s4=bs&&bs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&ZQe(e,t,A);return KQe(e,t),e};Object.defineProperty(bs,"__esModule",{value:!0});bs.prepareKeyValueMessage=bs.issueFileCommand=void 0;var $Qe=s4(require("crypto")),b_=s4(require("fs")),n4=s4(require("os")),N_=dI();function eBe(t,e){let A=process.env[`GITHUB_${t}`];if(!A)throw new Error(`Unable to find environment variable for file command ${t}`);if(!b_.existsSync(A))throw new Error(`Missing file at path: ${A}`);b_.appendFileSync(A,`${(0,N_.toCommandValue)(e)}${n4.EOL}`,{encoding:"utf8"})}a(eBe,"issueFileCommand");bs.issueFileCommand=eBe;function tBe(t,e){let A=`ghadelimiter_${$Qe.randomUUID()}`,r=(0,N_.toCommandValue)(e);if(t.includes(A))throw new Error(`Unexpected input: name should not contain the delimiter "${A}"`);if(r.includes(A))throw new Error(`Unexpected input: value should not contain the delimiter "${A}"`);return`${t}<<${A}${n4.EOL}${r}${n4.EOL}${A}`}a(tBe,"prepareKeyValueMessage");bs.prepareKeyValueMessage=tBe});var S_=E(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});kp.checkBypass=kp.getProxyUrl=void 0;function ABe(t){let e=t.protocol==="https:";if(D_(t))return;let A=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(A)try{return new URL(A)}catch{if(!A.startsWith("http://")&&!A.startsWith("https://"))return new URL(`http://${A}`)}else return}a(ABe,"getProxyUrl");kp.getProxyUrl=ABe;function D_(t){if(!t.hostname)return!1;let e=t.hostname;if(rBe(e)Line truncated
|
||||
`,u.message,u.stack);var p=new Error("tunneling socket could not be established, cause="+u.message);p.code="ECONNRESET",e.request.emit("error",p),r.removeSocket(i)}a(d,"onError")},"createSocket");Ko.prototype.removeSocket=a(function(e){var A=this.sockets.indexOf(e);if(A!==-1){this.sockets.splice(A,1);var r=this.requests.shift();r&&this.createSocket(r,function(i){r.request.onSocket(i)})}},"removeSocket");function v_(t,e){var A=this;Ko.prototype.createSocket.call(A,t,function(r){var i=t.request.getHeader("host"),n=o4({},A.options,{socket:r,servername:i?i.replace(/:.*$/,""):t.host}),s=iBe.connect(0,n);A.sockets[A.sockets.indexOf(r)]=s,e(s)})}a(v_,"createSecureSocket");function k_(t,e,A){return typeof t=="string"?{host:t,port:e,localAddress:A}:t}a(k_,"toOptions");function o4(t){for(var e=1,A=arguments.length;e<A;++e){var r=arguments[e];if(typeof r=="object")for(var i=Object.keys(r),n=0,s=i.length;n<s;++n){var o=i[n];r[o]!==void 0&&(t[o]=r[o])}}return t}a(o4,"mergeOptions");var al;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?al=a(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"):al=a(function(){},"debug");Fp.debug=al});var eC=E((Rut,L_)=>{L_.exports=F_()});var Wt=E((Dut,U_)=>{U_.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"),kHeadersList:Symbol("headers list"),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"),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"),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"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable")}});var Pt=E((Sut,T_)=>{"use strict";var WA=class extends Error{static{a(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}},c4=class t extends WA{static{a(this,"ConnectTimeoutError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},l4=class t extends WA{static{a(this,"HeadersTimeoutError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},d4=class t extends WA{static{a(this,"HeadersOverflowError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},u4=class t extends WA{static{a(this,"BodyTimeoutError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},p4=class t extends WA{static{a(this,"ResponseStatusCodeError")}constructor(e,A,r,i){super(e),Error.captureStackTrace(this,t),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=i,this.status=A,this.statusCode=A,this.headers=r}},g4=class t extends WA{static{a(this,"InvalidArgumentError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="InvalidArgumentError
Line truncated
|
||||
var ZQe=Object.create;var AC=Object.defineProperty;var KQe=Object.getOwnPropertyDescriptor;var $Qe=Object.getOwnPropertyNames;var eBe=Object.getPrototypeOf,tBe=Object.prototype.hasOwnProperty;var a=(t,e)=>AC(t,"name",{value:e,configurable:!0});var Le=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gI=(t,e)=>{for(var A in e)AC(t,A,{get:e[A],enumerable:!0})},b_=(t,e,A,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of $Qe(e))!tBe.call(t,i)&&i!==A&&AC(t,i,{get:()=>e[i],enumerable:!(r=KQe(e,i))||r.enumerable});return t};var Nr=(t,e,A)=>(A=t!=null?ZQe(eBe(t)):{},b_(e||!t||!t.__esModule?AC(A,"default",{value:t,enumerable:!0}):A,t)),Zo=t=>b_(AC({},"__esModule",{value:!0}),t);var hI=E(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});kp.toCommandProperties=kp.toCommandValue=void 0;function ABe(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}a(ABe,"toCommandValue");kp.toCommandValue=ABe;function rBe(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}a(rBe,"toCommandProperties");kp.toCommandProperties=rBe});var S_=E(ws=>{"use strict";var iBe=ws&&ws.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),nBe=ws&&ws.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sBe=ws&&ws.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&iBe(e,t,A);return nBe(e,t),e};Object.defineProperty(ws,"__esModule",{value:!0});ws.issue=ws.issueCommand=void 0;var aBe=sBe(require("os")),R_=hI();function D_(t,e,A){let r=new c4(t,e,A);process.stdout.write(r.toString()+aBe.EOL)}a(D_,"issueCommand");ws.issueCommand=D_;function oBe(t,e=""){D_(t,{},e)}a(oBe,"issue");ws.issue=oBe;var N_="::",c4=class{static{a(this,"Command")}constructor(e,A,r){e||(e="missing.command"),this.command=e,this.properties=A,this.message=r}toString(){let e=N_+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let A=!0;for(let r in this.properties)if(this.properties.hasOwnProperty(r)){let i=this.properties[r];i&&(A?A=!1:e+=",",e+=`${r}=${lBe(i)}`)}}return e+=`${N_}${cBe(this.message)}`,e}};function cBe(t){return(0,R_.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}a(cBe,"escapeData");function lBe(t){return(0,R_.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}a(lBe,"escapeProperty")});var k_=E(bs=>{"use strict";var dBe=bs&&bs.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),uBe=bs&&bs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),d4=bs&&bs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&dBe(e,t,A);return uBe(e,t),e};Object.defineProperty(bs,"__esModule",{value:!0});bs.prepareKeyValueMessage=bs.issueFileCommand=void 0;var pBe=d4(require("crypto")),x_=d4(require("fs")),l4=d4(require("os")),v_=hI();function gBe(t,e){let A=process.env[`GITHUB_${t}`];if(!A)throw new Error(`Unable to find environment variable for file command ${t}`);if(!x_.existsSync(A))throw new Error(`Missing file at path: ${A}`);x_.appendFileSync(A,`${(0,v_.toCommandValue)(e)}${l4.EOL}`,{encoding:"utf8"})}a(gBe,"issueFileCommand");bs.issueFileCommand=gBe;function hBe(t,e){let A=`ghadelimiter_${pBe.randomUUID()}`,r=(0,v_.toCommandValue)(e);if(t.includes(A))throw new Error(`Unexpected input: name should not contain the delimiter "${A}"`);if(r.includes(A))throw new Error(`Unexpected input: value should not contain the delimiter "${A}"`);return`${t}<<${A}${l4.EOL}${r}${l4.EOL}${A}`}a(hBe,"prepareKeyValueMessage");bs.prepareKeyValueMessage=hBe});var L_=E(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});Fp.checkBypass=Fp.getProxyUrl=void 0;function EBe(t){let e=t.protocol==="https:";if(F_(t))return;let A=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(A)try{return new URL(A)}catch{if(!A.startsWith("http://")&&!A.startsWith("https://"))return new URL(`http://${A}`)}else return}a(EBe,"getProxyUrl");Fp.getProxyUrl=EBe;function F_(t){if(!t.hostname)return!1;let e=t.hostname;if(mBe(e)Line truncated
|
||||
`,u.message,u.stack);var p=new Error("tunneling socket could not be established, cause="+u.message);p.code="ECONNRESET",e.request.emit("error",p),r.removeSocket(i)}a(d,"onError")},"createSocket");Ko.prototype.removeSocket=a(function(e){var A=this.sockets.indexOf(e);if(A!==-1){this.sockets.splice(A,1);var r=this.requests.shift();r&&this.createSocket(r,function(i){r.request.onSocket(i)})}},"removeSocket");function T_(t,e){var A=this;Ko.prototype.createSocket.call(A,t,function(r){var i=t.request.getHeader("host"),n=p4({},A.options,{socket:r,servername:i?i.replace(/:.*$/,""):t.host}),s=CBe.connect(0,n);A.sockets[A.sockets.indexOf(r)]=s,e(s)})}a(T_,"createSecureSocket");function M_(t,e,A){return typeof t=="string"?{host:t,port:e,localAddress:A}:t}a(M_,"toOptions");function p4(t){for(var e=1,A=arguments.length;e<A;++e){var r=arguments[e];if(typeof r=="object")for(var i=Object.keys(r),n=0,s=i.length;n<s;++n){var o=i[n];r[o]!==void 0&&(t[o]=r[o])}}return t}a(p4,"mergeOptions");var al;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?al=a(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"):al=a(function(){},"debug");Lp.debug=al});var rC=E((Gut,O_)=>{O_.exports=__()});var Wt=E((Jut,P_)=>{P_.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"),kHeadersList:Symbol("headers list"),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"),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"),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"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable")}});var Pt=E((Vut,q_)=>{"use strict";var WA=class extends Error{static{a(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}},g4=class t extends WA{static{a(this,"ConnectTimeoutError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},h4=class t extends WA{static{a(this,"HeadersTimeoutError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},E4=class t extends WA{static{a(this,"HeadersOverflowError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},m4=class t extends WA{static{a(this,"BodyTimeoutError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},C4=class t extends WA{static{a(this,"ResponseStatusCodeError")}constructor(e,A,r,i){super(e),Error.captureStackTrace(this,t),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=i,this.status=A,this.statusCode=A,this.headers=r}},f4=class t extends WA{static{a(this,"InvalidArgumentError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="InvalidArgumentError
Line truncated
|
||||
\r
|
||||
`),zBe=/\r\n/g,jBe=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function Up(t){rO.call(this),t=t||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=AO(t,"maxHeaderPairs",2e3),this.maxHeaderSize=AO(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new VBe(WBe),this.ss.on("info",function(A,r,i,n){r&&!e.maxed&&(e.nread+n-i>=e.maxHeaderSize?(n=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=n-i,e.buffer+=r.toString("binary",i,n)),A&&e._finish()})}a(Up,"HeaderParser");JBe(Up,rO);Up.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};Up.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};Up.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",t)};Up.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split(zBe),e=t.length,A,r;for(var i=0;i<e;++i){if(t[i].length===0)continue;if((t[i][0]===" "||t[i][0]===" ")&&r){this.header[r][this.header[r].length-1]+=t[i];continue}let n=t[i].indexOf(":");if(n===-1||n===0)return;if(A=jBe.exec(t[i]),r=A[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(A[2]||""),++this.npairs===this.maxHeaderPairs)break}};iO.exports=Up});var L4=E((Yut,aO)=>{"use strict";var F4=require("node:stream").Writable,XBe=require("node:util").inherits,ZBe=v4(),sO=eO(),KBe=nO(),$Be=45,eIe=Buffer.from("-"),tIe=Buffer.from(`\r
|
||||
`),AIe=a(function(){},"EMPTY_FN");function Ca(t){if(!(this instanceof Ca))return new Ca(t);if(F4.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new KBe(t),this._hparser.on("header",function(A){e._inHeader=!1,e._part.emit("header",A)})}a(Ca,"Dicer");XBe(Ca,F4);Ca.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let A=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(A+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else F4.prototype.emit.apply(this,arguments)};Ca.prototype._write=function(t,e,A){if(!this._hparser&&!this._bparser)return A();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new sO(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(t);if(!this._inHeader&&r!==void 0&&r<t.length)t=t.slice(r);else return A()}this._firstWrite&&(this._bparser.push(tIe),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=A:A()};Ca.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Ca.prototype.setBoundary=function(t){let e=this;this._bparser=new ZBe(`\r
|
||||
--`+t),this._bparser.on("info",function(A,r,i,n){e._oninfo(A,r,i,n)})};Ca.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",AIe),this._part.resume())};Ca.prototype._oninfo=function(t,e,A,r){let i,n=this,s=0,o,c=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&A+s<r;)if(e[A+s]===$Be)++s,++this._dashes;else{this._dashes&&(i=eIe),this._dashes=0;break}if(this._dashes===2&&(A+s<r&&this.listenerCount("trailer")!==0&&this.emit("trailer",e.slice(A+s,r)),this.reset(),this._finished=!0,n._parts===0&&(n._realFinish=!0,n.emit("finish"),n._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new sO(this._partOpts),this._part._read=function(l){n._unpause()},this._isPreamble&&this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._isPreamble!==!0&&this.listenerCount("part")!==0?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&A<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(c=this._part.push(i)),c=this._part.push(e.slice(A,r)),c||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),o=this._hparser.push(e.slice(A,r)),!this._inHeader&&o!==void 0&&o<r&&this._oninfo(!1,e,A+o,r))),t&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:A!==r&&(++this._parts,this._part.on("end",function(){--n._parts===0&&(n._finished?(n._realFinish=!0,n.emit("finish"),n._realFinish=!1):n._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};Ca.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let t=this._cb;this._cb=void 0,t()}};aO.exports=Ca});var EI=E((U4,lO)=>{"use strict";var oO=new TextDecoder("utf-8"),cO=new Map([["utf-8",oO],["utf8",oO]]);function rIe(t){let e;for(;;)switch(t){case"utf-8":case"utf8":return AC.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return AC.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return AC.utf16le;case"base64":return AC.base64;default:if(e===void 0){e=!0,t=t.toLowerCase();continue}return AC.other.bind(t)}}a(rIe,"getDecoder");var AC={utf8:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.utf8Slice(0,t.length)),latin1:(t,e)=>t.length===0?"":typeof t=="string"?t:t.latin1Slice(0,t.length),utf16le:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.ucs2Slice(0,t.length)),base64:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.base64Slice(0,t.length)),other:(t,e)=>{if(t.length===0)return"";if(typeof t=="string"&&(t=Buffer.from(t,e)),cO.has(U4.toString()))try{return cO.get(U4).decode(t)}catch{}return typeof t=="string"?t:t.toString()}};function iIe(t,e,A){return t&&rIe(A)(t,e)}a(iIe,"decodeText");lO.exports=iIe});var M4=E((Vut,hO)=>{"use strict";var mI=EI(),dO=/%[a-fA-F0-9][a-fA-F0-9]/g,nIe={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"\x07","%08":"\b","%09":" ","%0a":`
|
||||
`),oIe=/\r\n/g,cIe=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function Tp(t){oO.call(this),t=t||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=aO(t,"maxHeaderPairs",2e3),this.maxHeaderSize=aO(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new sIe(aIe),this.ss.on("info",function(A,r,i,n){r&&!e.maxed&&(e.nread+n-i>=e.maxHeaderSize?(n=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=n-i,e.buffer+=r.toString("binary",i,n)),A&&e._finish()})}a(Tp,"HeaderParser");nIe(Tp,oO);Tp.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};Tp.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};Tp.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",t)};Tp.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split(oIe),e=t.length,A,r;for(var i=0;i<e;++i){if(t[i].length===0)continue;if((t[i][0]===" "||t[i][0]===" ")&&r){this.header[r][this.header[r].length-1]+=t[i];continue}let n=t[i].indexOf(":");if(n===-1||n===0)return;if(A=cIe.exec(t[i]),r=A[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(A[2]||""),++this.npairs===this.maxHeaderPairs)break}};cO.exports=Tp});var O4=E((spt,uO)=>{"use strict";var _4=require("node:stream").Writable,lIe=require("node:util").inherits,dIe=T4(),dO=nO(),uIe=lO(),pIe=45,gIe=Buffer.from("-"),hIe=Buffer.from(`\r
|
||||
`),EIe=a(function(){},"EMPTY_FN");function Ca(t){if(!(this instanceof Ca))return new Ca(t);if(_4.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new uIe(t),this._hparser.on("header",function(A){e._inHeader=!1,e._part.emit("header",A)})}a(Ca,"Dicer");lIe(Ca,_4);Ca.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let A=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(A+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else _4.prototype.emit.apply(this,arguments)};Ca.prototype._write=function(t,e,A){if(!this._hparser&&!this._bparser)return A();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new dO(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(t);if(!this._inHeader&&r!==void 0&&r<t.length)t=t.slice(r);else return A()}this._firstWrite&&(this._bparser.push(hIe),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=A:A()};Ca.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Ca.prototype.setBoundary=function(t){let e=this;this._bparser=new dIe(`\r
|
||||
--`+t),this._bparser.on("info",function(A,r,i,n){e._oninfo(A,r,i,n)})};Ca.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",EIe),this._part.resume())};Ca.prototype._oninfo=function(t,e,A,r){let i,n=this,s=0,o,c=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&A+s<r;)if(e[A+s]===pIe)++s,++this._dashes;else{this._dashes&&(i=gIe),this._dashes=0;break}if(this._dashes===2&&(A+s<r&&this.listenerCount("trailer")!==0&&this.emit("trailer",e.slice(A+s,r)),this.reset(),this._finished=!0,n._parts===0&&(n._realFinish=!0,n.emit("finish"),n._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new dO(this._partOpts),this._part._read=function(l){n._unpause()},this._isPreamble&&this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._isPreamble!==!0&&this.listenerCount("part")!==0?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&A<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(c=this._part.push(i)),c=this._part.push(e.slice(A,r)),c||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),o=this._hparser.push(e.slice(A,r)),!this._inHeader&&o!==void 0&&o<r&&this._oninfo(!1,e,A+o,r))),t&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:A!==r&&(++this._parts,this._part.on("end",function(){--n._parts===0&&(n._finished?(n._realFinish=!0,n.emit("finish"),n._realFinish=!1):n._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};Ca.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let t=this._cb;this._cb=void 0,t()}};uO.exports=Ca});var QI=E((P4,hO)=>{"use strict";var pO=new TextDecoder("utf-8"),gO=new Map([["utf-8",pO],["utf8",pO]]);function mIe(t){let e;for(;;)switch(t){case"utf-8":case"utf8":return nC.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return nC.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return nC.utf16le;case"base64":return nC.base64;default:if(e===void 0){e=!0,t=t.toLowerCase();continue}return nC.other.bind(t)}}a(mIe,"getDecoder");var nC={utf8:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.utf8Slice(0,t.length)),latin1:(t,e)=>t.length===0?"":typeof t=="string"?t:t.latin1Slice(0,t.length),utf16le:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.ucs2Slice(0,t.length)),base64:(t,e)=>t.length===0?"":(typeof t=="string"&&(t=Buffer.from(t,e)),t.base64Slice(0,t.length)),other:(t,e)=>{if(t.length===0)return"";if(typeof t=="string"&&(t=Buffer.from(t,e)),gO.has(P4.toString()))try{return gO.get(P4).decode(t)}catch{}return typeof t=="string"?t:t.toString()}};function CIe(t,e,A){return t&&mIe(A)(t,e)}a(CIe,"decodeText");hO.exports=CIe});var H4=E((cpt,QO)=>{"use strict";var BI=QI(),EO=/%[a-fA-F0-9][a-fA-F0-9]/g,fIe={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"\x07","%08":"\b","%09":" ","%0a":`
|
||||
`,"%0A":`
|
||||
`,"%0b":"\v","%0B":"\v","%0c":"\f","%0C":"\f","%0d":"\r","%0D":"\r","%0e":"","%0E":"","%0f":"","%0F":"","%10":"","%11":"","%12":"","%13":"","%14":"","%15":"","%16":"","%17":"","%18":"","%19":"","%1a":"","%1A":"","%1b":"\x1B","%1B":"\x1B","%1c":"","%1C":"","%1d":"","%1D":"","%1e":"","%1E":"","%1f":"","%1F":"","%20":" ","%21":"!","%22":'"',"%23":"#","%24":"$","%25":"%","%26":"&","%27":"'","%28":"(","%29":")","%2a":"*","%2A":"*","%2b":"+","%2B":"+","%2c":",","%2C":",","%2d":"-","%2D":"-","%2e":".","%2E":".","%2f":"/","%2F":"/","%30":"0","%31":"1","%32":"2","%33":"3","%34":"4","%35":"5","%36":"6","%37":"7","%38":"8","%39":"9","%3a":":","%3A":":","%3b":";","%3B":";","%3c":"<","%3C":"<","%3d":"=","%3D":"=","%3e":">","%3E":">","%3f":"?","%3F":"?","%40":"@","%41":"A","%42":"B","%43":"C","%44":"D","%45":"E","%46":"F","%47":"G","%48":"H","%49":"I","%4a":"J","%4A":"J","%4b":"K","%4B":"K","%4c":"L","%4C":"L","%4d":"M","%4D":"M","%4e":"N","%4E":"N","%4f":"O","%4F":"O","%50":"P","%51":"Q","%52":"R","%53":"S","%54":"T","%55":"U","%56":"V","%57":"W","%58":"X","%59":"Y","%5a":"Z","%5A":"Z","%5b":"[","%5B":"[","%5c":"\\","%5C":"\\","%5d":"]","%5D":"]","%5e":"^","%5E":"^","%5f":"_","%5F":"_","%60":"`","%61":"a","%62":"b","%63":"c","%64":"d","%65":"e","%66":"f","%67":"g","%68":"h","%69":"i","%6a":"j","%6A":"j","%6b":"k","%6B":"k","%6c":"l","%6C":"l","%6d":"m","%6D":"m","%6e":"n","%6E":"n","%6f":"o","%6F":"o","%70":"p","%71":"q","%72":"r","%73":"s","%74":"t","%75":"u","%76":"v","%77":"w","%78":"x","%79":"y","%7a":"z","%7A":"z","%7b":"{","%7B":"{","%7c":"|","%7C":"|","%7d":"}","%7D":"}","%7e":"~","%7E":"~","%7f":"\x7F","%7F":"\x7F","%80":"\x80","%81":"\x81","%82":"\x82","%83":"\x83","%84":"\x84","%85":"\x85","%86":"\x86","%87":"\x87","%88":"\x88","%89":"\x89","%8a":"\x8A","%8A":"\x8A","%8b":"\x8B","%8B":"\x8B","%8c":"\x8C","%8C":"\x8C","%8d":"\x8D","%8D":"\x8D","%8e":"\x8E","%8E":"\x8E","%8f":"\x8F","%8F":"\x8F","%90":"\x90","%91":"\x91","%92":"\x92","%93":"\x93","%94":"\x94","%95":"\x95","%96":"\x96","%97":"\x97","%98":"\x98","%99":"\x99","%9a":"\x9A","%9A":"\x9A","%9b":"\x9B","%9B":"\x9B","%9c":"\x9C","%9C":"\x9C","%9d":"\x9D","%9D":"\x9D","%9e":"\x9E","%9E":"\x9E","%9f":"\x9F","%9F":"\x9F","%a0":"\xA0","%A0":"\xA0","%a1":"\xA1","%A1":"\xA1","%a2":"\xA2","%A2":"\xA2","%a3":"\xA3","%A3":"\xA3","%a4":"\xA4","%A4":"\xA4","%a5":"\xA5","%A5":"\xA5","%a6":"\xA6","%A6":"\xA6","%a7":"\xA7","%A7":"\xA7","%a8":"\xA8","%A8":"\xA8","%a9":"\xA9","%A9":"\xA9","%aa":"\xAA","%Aa":"\xAA","%aA":"\xAA","%AA":"\xAA","%ab":"\xAB","%Ab":"\xAB","%aB":"\xAB","%AB":"\xAB","%ac":"\xAC","%Ac":"\xAC","%aC":"\xAC","%AC":"\xAC","%ad":"\xAD","%Ad":"\xAD","%aD":"\xAD","%AD":"\xAD","%ae":"\xAE","%Ae":"\xAE","%aE":"\xAE","%AE":"\xAE","%af":"\xAF","%Af":"\xAF","%aF":"\xAF","%AF":"\xAF","%b0":"\xB0","%B0":"\xB0","%b1":"\xB1","%B1":"\xB1","%b2":"\xB2","%B2":"\xB2","%b3":"\xB3","%B3":"\xB3","%b4":"\xB4","%B4":"\xB4","%b5":"\xB5","%B5":"\xB5","%b6":"\xB6","%B6":"\xB6","%b7":"\xB7","%B7":"\xB7","%b8":"\xB8","%B8":"\xB8","%b9":"\xB9","%B9":"\xB9","%ba":"\xBA","%Ba":"\xBA","%bA":"\xBA","%BA":"\xBA","%bb":"\xBB","%Bb":"\xBB","%bB":"\xBB","%BB":"\xBB","%bc":"\xBC","%Bc":"\xBC","%bC":"\xBC","%BC":"\xBC","%bd":"\xBD","%Bd":"\xBD","%bD":"\xBD","%BD":"\xBD","%be":"\xBE","%Be":"\xBE","%bE":"\xBE","%BE":"\xBE","%bf":"\xBF","%Bf":"\xBF","%bF":"\xBF","%BF":"\xBF","%c0":"\xC0","%C0":"\xC0","%c1":"\xC1","%C1":"\xC1","%c2":"\xC2","%C2":"\xC2","%c3":"\xC3","%C3":"\xC3","%c4":"\xC4","%C4":"\xC4","%c5":"\xC5","%C5":"\xC5","%c6":"\xC6","%C6":"\xC6","%c7":"\xC7","%C7":"\xC7","%c8":"\xC8","%C8":"\xC8","%c9":"\xC9","%C9":"\xC9","%ca":"\xCA","%Ca":"\xCA","%cA":"\xCA","%CA":"\xCA","%cb":"\xCB","%Cb":"\xCB","%cB":"\xCB","%CB":"\xCB","%cc":"\xCC","%Cc":"\xCC","%cC":"\xCC","%CC":"\xCC","%cd":"\xCD","%Cd":"\xCD","%cD":"\xCD","%CD":"\xCD","%ce":"\xCE","%Ce":"\xCE","%cE":"\xCE","%CE":"\xCE","%cf":"\xCF","%Cf":"\xCF","%cF":"\xCF","%CF":"\xCF","%d0":"\xD0","%D0":"\xD0","%d1":"\xD1","%D1":"\xD1","%d2":"\xD2","%D2":"\xD2","%d3":"\xD3","%D3":"\xD3","%d4":"\xD4","%D4":"\xD4","%d5":"\xD5","%D5":"\xD5","%d6":"\xD6","%D6":"\xD6","%d7":"\xD7","%D7":"\xD7","%d8":"\xD8","%D8":"\xD8","%d9":"\xD9","%D9":"\xD9","%da":"\xDA","%Da":"\xDA","%dA":"\xDA","%DA":"\xDA","%db":"\xDB","%Db":"\xDB","%dB":"\xDB","%DB":"\xDB","%dc":"\xDC","%Dc":"\xDC","%dC":"\xDC","%DC":"\xDC","%dd":"\xDD","%Dd":"\xDD","%dD":"\xDD","%DD":"\xDD","%de":"\xDE","%De":"\xDE","%dE":"\xDE","%DE":"\xDE","%df":"\xDF","%Df":"\xDF","%dF":"\xDF","%DF":"\xDF","%e0":"\xE0","%E0":"\xE0","%e1":"\xE1","%E1":"\xE1","%e2":"\xE2","%E2":"\xE2","%e3":"\xE3","%E3":"\xE3","%e4":"\xE4","%E4":"\xE4","%e5":"\xE5","%E5":"\xE5","%e6":"\xE6","%E6":"\xE6","%e7":"\xE7","%E7":"\xE7","%e8":"\xE8","%E8":"\xE8","%e9":"\xE9","%E9":"\xE9","%ea":"\xEA","%Ea":"\xEA","%eA":"\xEA","%EA":"\xEA","%eb":"\xEB","%Eb":"\xEB","%eB":"\xEB","%EB":"\xEB","%ec":"\xEC","%Ec":"\xEC","%eC":"\xEC","%EC":"\xEC","%ed":"\xED","%Ed":"\xED","%eD":"\xED","%ED":"\xED","%ee":"\xLine truncated
|
||||
`))}a(PO,"isValidHeaderValue");function i1e(t,e){let{headersList:A}=e,r=(A.get("referrer-policy")??"").split(","),i="";if(r.length>0)for(let n=r.length;n!==0;n--){let s=r[n-1].trim();if(GIe.has(s)){i=s;break}}i!==""&&(t.referrerPolicy=i)}a(i1e,"setRequestReferrerPolicyOnRedirect");function n1e(){return"allowed"}a(n1e,"crossOriginResourcePolicyCheck");function s1e(){return"success"}a(s1e,"corsCheck");function a1e(){return"success"}a(a1e,"TAOCheck");function o1e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e)}a(o1e,"appendFetchMetadata");function c1e(t){let e=t.origin;if(t.responseTainting==="cors"||t.mode==="websocket")e&&t.headersList.append("origin",e);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&J4(t.origin)&&!J4(sC(t))&&(e=null);break;case"same-origin":BI(t,sC(t))||(e=null);break;default:}e&&t.headersList.append("origin",e)}}a(c1e,"appendRequestOriginHeader");function l1e(t){return WIe.now()}a(l1e,"coarsenedSharedCurrentTime");function d1e(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}}a(d1e,"createOpaqueTimingInfo");function u1e(){return{referrerPolicy:"strict-origin-when-cross-origin"}}a(u1e,"makePolicyContainer");function p1e(t){return{referrerPolicy:t.referrerPolicy}}a(p1e,"clonePolicyContainer");function g1e(t){let e=t.referrerPolicy;Pp(e);let A=null;if(t.referrer==="client"){let o=VIe();if(!o||o.origin==="null")return"no-referrer";A=new URL(o)}else t.referrer instanceof URL&&(A=t.referrer);let r=Y4(A),i=Y4(A,!0);r.toString().length>4096&&(r=i);let n=BI(t,r),s=iC(r)&&!iC(t.url);switch(e){case"origin":return i??Y4(A,!0);case"unsafe-url":return r;case"same-origin":return n?i:"no-referrer";case"origin-when-cross-origin":return n?r:i;case"strict-origin-when-cross-origin":{let o=sC(t);return BI(r,o)?r:iC(r)&&!iC(o)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return s?"no-referrer":i}}a(g1e,"determineRequestsReferrer");function Y4(t,e){return Pp(t instanceof URL),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}a(Y4,"stripURLForReferrer");function iC(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(A){if(A==null||A==="null")return!1;let r=new URL(A);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}a(iC,"isURLPotentiallyTrustworthy");function h1e(t,e){if(nC===void 0)return!0;let A=m1e(e);if(A==="no metadata"||A.length===0)return!0;let r=A.sort((s,o)=>o.algo.localeCompare(s.algo)),i=r[0].algo,n=r.filter(s=>s.algo===i);for(let s of n){let o=s.algo,c=s.hash;c.endsWith("==")&&(c=c.slice(0,-2));let l=nC.createHash(o).update(t).digest("base64");if(l.endsWith("==")&&(l=l.slice(0,-2)),l===c)return!0;let d=nC.createHash(o).update(t).digest("base64url");if(d.endsWith("==")&&(d=d.slice(0,-2)),d===c)return!0}return!1}a(h1e,"bytesMatch");var E1e=/((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function m1e(t){let e=[],A=!0,r=nC.getHashes();for(let i of t.split(" ")){A=!1;let n=E1e.exec(i);if(n===null||n.groups===void 0)continue;let s=n.groups.algo;r.includes(s.toLowerCase())&&e.push(n.groups)}return A===!0?"no metadata":e}a(m1e,"parseMetadata");function C1e(t){}a(C1e,"tryUpgradeRequestToAPotentiallyTrustworthyURL");function BI(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}a(BI,"sameOrigin");function f1e(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}a(f1e,"createDeferredPromise");function Q1e(t){return t.controller.state==="aborted"}a(Q1e,"isAborted");function B1e(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(B1e,"isCancelled");var V4={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"};Object.setPrototypeOf(V4,null);function I1e(t){return V4[t.toLowerCase()]??t}a(I1e,"normalizeMethod");function y1e(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return Pp(typeof e=="string"),e}a(y1e,"serializeJavascriptValueToJSONString");var w1e=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function b1e(t,e,A){let r={index:0,kind:A,target:t},i={next(){if(Object.getPrototypeOf(this
Line truncated
|
||||
`||t===" "||t===" "}a(WO,"isHTTPWhiteSpace");function W4(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&WO(t[r]);r++);if(A)for(;i>0&&WO(t[i]);i--);return t.slice(r,i+1)}a(W4,"removeHTTPWhitespace");function zO(t){return t==="\r"||t===`
|
||||
`||t===" "||t==="\f"||t===" "}a(zO,"isASCIIWhitespace");function J1e(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&zO(t[r]);r++);if(A)for(;i>0&&zO(t[i]);i--);return t.slice(r,i+1)}a(J1e,"removeASCIIWhitespace");KO.exports={dataURLProcessor:q1e,URLSerializer:jO,collectASequenceOfCodePoints:wI,collectASequenceOfCodePointsFast:qp,stringPercentDecode:XO,parseMIMEType:z4,collectAnHTTPQuotedString:ZO,serializeAMimeType:G1e}});var bI=E((gpt,rP)=>{"use strict";var{Blob:tP,File:$O}=require("buffer"),{types:j4}=require("util"),{kState:Un}=ec(),{isBlobLike:AP}=Ns(),{webidl:It}=Di(),{parseMIMEType:V1e,serializeAMimeType:W1e}=fa(),{kEnumerableProperty:eP}=ct(),z1e=new TextEncoder,aC=class t extends tP{static{a(this,"File")}constructor(e,A,r={}){It.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=It.converters["sequence<BlobPart>"](e),A=It.converters.USVString(A),r=It.converters.FilePropertyBag(r);let i=A,n=r.type,s;e:{if(n){if(n=V1e(n),n==="failure"){n="";break e}n=W1e(n).toLowerCase()}s=r.lastModified}super(j1e(e,r),{type:n}),this[Un]={name:i,lastModified:s,type:n}}get name(){return It.brandCheck(this,t),this[Un].name}get lastModified(){return It.brandCheck(this,t),this[Un].lastModified}get type(){return It.brandCheck(this,t),this[Un].type}},X4=class t{static{a(this,"FileLike")}constructor(e,A,r={}){let i=A,n=r.type,s=r.lastModified??Date.now();this[Un]={blobLike:e,name:i,type:n,lastModified:s}}stream(...e){return It.brandCheck(this,t),this[Un].blobLike.stream(...e)}arrayBuffer(...e){return It.brandCheck(this,t),this[Un].blobLike.arrayBuffer(...e)}slice(...e){return It.brandCheck(this,t),this[Un].blobLike.slice(...e)}text(...e){return It.brandCheck(this,t),this[Un].blobLike.text(...e)}get size(){return It.brandCheck(this,t),this[Un].blobLike.size}get type(){return It.brandCheck(this,t),this[Un].blobLike.type}get name(){return It.brandCheck(this,t),this[Un].name}get lastModified(){return It.brandCheck(this,t),this[Un].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(aC.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:eP,lastModified:eP});It.converters.Blob=It.interfaceConverter(tP);It.converters.BlobPart=function(t,e){if(It.util.Type(t)==="Object"){if(AP(t))return It.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||j4.isAnyArrayBuffer(t))return It.converters.BufferSource(t,e)}return It.converters.USVString(t,e)};It.converters["sequence<BlobPart>"]=It.sequenceConverter(It.converters.BlobPart);It.converters.FilePropertyBag=It.dictionaryConverter([{key:"lastModified",converter:It.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:It.converters.DOMString,defaultValue:""},{key:"endings",converter:t=>(t=It.converters.DOMString(t),t=t.toLowerCase(),t!=="native"&&(t="transparent"),t),defaultValue:"transparent"}]);function j1e(t,e){let A=[];for(let r of t)if(typeof r=="string"){let i=r;e.endings==="native"&&(i=X1e(i)),A.push(z1e.encode(i))}else j4.isAnyArrayBuffer(r)||j4.isTypedArray(r)?r.buffer?A.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):A.push(new Uint8Array(r)):AP(r)&&A.push(r);return A}a(j1e,"processBlobParts");function X1e(t){let e=`
|
||||
`,"%0b":"\v","%0B":"\v","%0c":"\f","%0C":"\f","%0d":"\r","%0D":"\r","%0e":"","%0E":"","%0f":"","%0F":"","%10":"","%11":"","%12":"","%13":"","%14":"","%15":"","%16":"","%17":"","%18":"","%19":"","%1a":"","%1A":"","%1b":"\x1B","%1B":"\x1B","%1c":"","%1C":"","%1d":"","%1D":"","%1e":"","%1E":"","%1f":"","%1F":"","%20":" ","%21":"!","%22":'"',"%23":"#","%24":"$","%25":"%","%26":"&","%27":"'","%28":"(","%29":")","%2a":"*","%2A":"*","%2b":"+","%2B":"+","%2c":",","%2C":",","%2d":"-","%2D":"-","%2e":".","%2E":".","%2f":"/","%2F":"/","%30":"0","%31":"1","%32":"2","%33":"3","%34":"4","%35":"5","%36":"6","%37":"7","%38":"8","%39":"9","%3a":":","%3A":":","%3b":";","%3B":";","%3c":"<","%3C":"<","%3d":"=","%3D":"=","%3e":">","%3E":">","%3f":"?","%3F":"?","%40":"@","%41":"A","%42":"B","%43":"C","%44":"D","%45":"E","%46":"F","%47":"G","%48":"H","%49":"I","%4a":"J","%4A":"J","%4b":"K","%4B":"K","%4c":"L","%4C":"L","%4d":"M","%4D":"M","%4e":"N","%4E":"N","%4f":"O","%4F":"O","%50":"P","%51":"Q","%52":"R","%53":"S","%54":"T","%55":"U","%56":"V","%57":"W","%58":"X","%59":"Y","%5a":"Z","%5A":"Z","%5b":"[","%5B":"[","%5c":"\\","%5C":"\\","%5d":"]","%5D":"]","%5e":"^","%5E":"^","%5f":"_","%5F":"_","%60":"`","%61":"a","%62":"b","%63":"c","%64":"d","%65":"e","%66":"f","%67":"g","%68":"h","%69":"i","%6a":"j","%6A":"j","%6b":"k","%6B":"k","%6c":"l","%6C":"l","%6d":"m","%6D":"m","%6e":"n","%6E":"n","%6f":"o","%6F":"o","%70":"p","%71":"q","%72":"r","%73":"s","%74":"t","%75":"u","%76":"v","%77":"w","%78":"x","%79":"y","%7a":"z","%7A":"z","%7b":"{","%7B":"{","%7c":"|","%7C":"|","%7d":"}","%7D":"}","%7e":"~","%7E":"~","%7f":"\x7F","%7F":"\x7F","%80":"\x80","%81":"\x81","%82":"\x82","%83":"\x83","%84":"\x84","%85":"\x85","%86":"\x86","%87":"\x87","%88":"\x88","%89":"\x89","%8a":"\x8A","%8A":"\x8A","%8b":"\x8B","%8B":"\x8B","%8c":"\x8C","%8C":"\x8C","%8d":"\x8D","%8D":"\x8D","%8e":"\x8E","%8E":"\x8E","%8f":"\x8F","%8F":"\x8F","%90":"\x90","%91":"\x91","%92":"\x92","%93":"\x93","%94":"\x94","%95":"\x95","%96":"\x96","%97":"\x97","%98":"\x98","%99":"\x99","%9a":"\x9A","%9A":"\x9A","%9b":"\x9B","%9B":"\x9B","%9c":"\x9C","%9C":"\x9C","%9d":"\x9D","%9D":"\x9D","%9e":"\x9E","%9E":"\x9E","%9f":"\x9F","%9F":"\x9F","%a0":"\xA0","%A0":"\xA0","%a1":"\xA1","%A1":"\xA1","%a2":"\xA2","%A2":"\xA2","%a3":"\xA3","%A3":"\xA3","%a4":"\xA4","%A4":"\xA4","%a5":"\xA5","%A5":"\xA5","%a6":"\xA6","%A6":"\xA6","%a7":"\xA7","%A7":"\xA7","%a8":"\xA8","%A8":"\xA8","%a9":"\xA9","%A9":"\xA9","%aa":"\xAA","%Aa":"\xAA","%aA":"\xAA","%AA":"\xAA","%ab":"\xAB","%Ab":"\xAB","%aB":"\xAB","%AB":"\xAB","%ac":"\xAC","%Ac":"\xAC","%aC":"\xAC","%AC":"\xAC","%ad":"\xAD","%Ad":"\xAD","%aD":"\xAD","%AD":"\xAD","%ae":"\xAE","%Ae":"\xAE","%aE":"\xAE","%AE":"\xAE","%af":"\xAF","%Af":"\xAF","%aF":"\xAF","%AF":"\xAF","%b0":"\xB0","%B0":"\xB0","%b1":"\xB1","%B1":"\xB1","%b2":"\xB2","%B2":"\xB2","%b3":"\xB3","%B3":"\xB3","%b4":"\xB4","%B4":"\xB4","%b5":"\xB5","%B5":"\xB5","%b6":"\xB6","%B6":"\xB6","%b7":"\xB7","%B7":"\xB7","%b8":"\xB8","%B8":"\xB8","%b9":"\xB9","%B9":"\xB9","%ba":"\xBA","%Ba":"\xBA","%bA":"\xBA","%BA":"\xBA","%bb":"\xBB","%Bb":"\xBB","%bB":"\xBB","%BB":"\xBB","%bc":"\xBC","%Bc":"\xBC","%bC":"\xBC","%BC":"\xBC","%bd":"\xBD","%Bd":"\xBD","%bD":"\xBD","%BD":"\xBD","%be":"\xBE","%Be":"\xBE","%bE":"\xBE","%BE":"\xBE","%bf":"\xBF","%Bf":"\xBF","%bF":"\xBF","%BF":"\xBF","%c0":"\xC0","%C0":"\xC0","%c1":"\xC1","%C1":"\xC1","%c2":"\xC2","%C2":"\xC2","%c3":"\xC3","%C3":"\xC3","%c4":"\xC4","%C4":"\xC4","%c5":"\xC5","%C5":"\xC5","%c6":"\xC6","%C6":"\xC6","%c7":"\xC7","%C7":"\xC7","%c8":"\xC8","%C8":"\xC8","%c9":"\xC9","%C9":"\xC9","%ca":"\xCA","%Ca":"\xCA","%cA":"\xCA","%CA":"\xCA","%cb":"\xCB","%Cb":"\xCB","%cB":"\xCB","%CB":"\xCB","%cc":"\xCC","%Cc":"\xCC","%cC":"\xCC","%CC":"\xCC","%cd":"\xCD","%Cd":"\xCD","%cD":"\xCD","%CD":"\xCD","%ce":"\xCE","%Ce":"\xCE","%cE":"\xCE","%CE":"\xCE","%cf":"\xCF","%Cf":"\xCF","%cF":"\xCF","%CF":"\xCF","%d0":"\xD0","%D0":"\xD0","%d1":"\xD1","%D1":"\xD1","%d2":"\xD2","%D2":"\xD2","%d3":"\xD3","%D3":"\xD3","%d4":"\xD4","%D4":"\xD4","%d5":"\xD5","%D5":"\xD5","%d6":"\xD6","%D6":"\xD6","%d7":"\xD7","%D7":"\xD7","%d8":"\xD8","%D8":"\xD8","%d9":"\xD9","%D9":"\xD9","%da":"\xDA","%Da":"\xDA","%dA":"\xDA","%DA":"\xDA","%db":"\xDB","%Db":"\xDB","%dB":"\xDB","%DB":"\xDB","%dc":"\xDC","%Dc":"\xDC","%dC":"\xDC","%DC":"\xDC","%dd":"\xDD","%Dd":"\xDD","%dD":"\xDD","%DD":"\xDD","%de":"\xDE","%De":"\xDE","%dE":"\xDE","%DE":"\xDE","%df":"\xDF","%Df":"\xDF","%dF":"\xDF","%DF":"\xDF","%e0":"\xE0","%E0":"\xE0","%e1":"\xE1","%E1":"\xE1","%e2":"\xE2","%E2":"\xE2","%e3":"\xE3","%E3":"\xE3","%e4":"\xE4","%E4":"\xE4","%e5":"\xE5","%E5":"\xE5","%e6":"\xE6","%E6":"\xE6","%e7":"\xE7","%E7":"\xE7","%e8":"\xE8","%E8":"\xE8","%e9":"\xE9","%E9":"\xE9","%ea":"\xEA","%Ea":"\xEA","%eA":"\xEA","%EA":"\xEA","%eb":"\xEB","%Eb":"\xEB","%eB":"\xEB","%EB":"\xEB","%ec":"\xEC","%Ec":"\xEC","%eC":"\xEC","%EC":"\xEC","%ed":"\xED","%Ed":"\xED","%eD":"\xED","%ED":"\xED","%ee":"\xLine truncated
|
||||
`))}a(JO,"isValidHeaderValue");function C1e(t,e){let{headersList:A}=e,r=(A.get("referrer-policy")??"").split(","),i="";if(r.length>0)for(let n=r.length;n!==0;n--){let s=r[n-1].trim();if(i1e.has(s)){i=s;break}}i!==""&&(t.referrerPolicy=i)}a(C1e,"setRequestReferrerPolicyOnRedirect");function f1e(){return"allowed"}a(f1e,"crossOriginResourcePolicyCheck");function Q1e(){return"success"}a(Q1e,"corsCheck");function B1e(){return"success"}a(B1e,"TAOCheck");function I1e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e)}a(I1e,"appendFetchMetadata");function y1e(t){let e=t.origin;if(t.responseTainting==="cors"||t.mode==="websocket")e&&t.headersList.append("origin",e);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&X4(t.origin)&&!X4(cC(t))&&(e=null);break;case"same-origin":bI(t,cC(t))||(e=null);break;default:}e&&t.headersList.append("origin",e)}}a(y1e,"appendRequestOriginHeader");function w1e(t){return a1e.now()}a(w1e,"coarsenedSharedCurrentTime");function b1e(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}}a(b1e,"createOpaqueTimingInfo");function N1e(){return{referrerPolicy:"strict-origin-when-cross-origin"}}a(N1e,"makePolicyContainer");function R1e(t){return{referrerPolicy:t.referrerPolicy}}a(R1e,"clonePolicyContainer");function D1e(t){let e=t.referrerPolicy;qp(e);let A=null;if(t.referrer==="client"){let o=s1e();if(!o||o.origin==="null")return"no-referrer";A=new URL(o)}else t.referrer instanceof URL&&(A=t.referrer);let r=z4(A),i=z4(A,!0);r.toString().length>4096&&(r=i);let n=bI(t,r),s=aC(r)&&!aC(t.url);switch(e){case"origin":return i??z4(A,!0);case"unsafe-url":return r;case"same-origin":return n?i:"no-referrer";case"origin-when-cross-origin":return n?r:i;case"strict-origin-when-cross-origin":{let o=cC(t);return bI(r,o)?r:aC(r)&&!aC(o)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return s?"no-referrer":i}}a(D1e,"determineRequestsReferrer");function z4(t,e){return qp(t instanceof URL),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}a(z4,"stripURLForReferrer");function aC(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(A){if(A==null||A==="null")return!1;let r=new URL(A);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}a(aC,"isURLPotentiallyTrustworthy");function S1e(t,e){if(oC===void 0)return!0;let A=v1e(e);if(A==="no metadata"||A.length===0)return!0;let r=A.sort((s,o)=>o.algo.localeCompare(s.algo)),i=r[0].algo,n=r.filter(s=>s.algo===i);for(let s of n){let o=s.algo,c=s.hash;c.endsWith("==")&&(c=c.slice(0,-2));let l=oC.createHash(o).update(t).digest("base64");if(l.endsWith("==")&&(l=l.slice(0,-2)),l===c)return!0;let d=oC.createHash(o).update(t).digest("base64url");if(d.endsWith("==")&&(d=d.slice(0,-2)),d===c)return!0}return!1}a(S1e,"bytesMatch");var x1e=/((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function v1e(t){let e=[],A=!0,r=oC.getHashes();for(let i of t.split(" ")){A=!1;let n=x1e.exec(i);if(n===null||n.groups===void 0)continue;let s=n.groups.algo;r.includes(s.toLowerCase())&&e.push(n.groups)}return A===!0?"no metadata":e}a(v1e,"parseMetadata");function k1e(t){}a(k1e,"tryUpgradeRequestToAPotentiallyTrustworthyURL");function bI(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}a(bI,"sameOrigin");function F1e(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}a(F1e,"createDeferredPromise");function L1e(t){return t.controller.state==="aborted"}a(L1e,"isAborted");function U1e(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(U1e,"isCancelled");var Z4={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"};Object.setPrototypeOf(Z4,null);function T1e(t){return Z4[t.toLowerCase()]??t}a(T1e,"normalizeMethod");function M1e(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return qp(typeof e=="string"),e}a(M1e,"serializeJavascriptValueToJSONString");var _1e=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function O1e(t,e,A){let r={index:0,kind:A,target:t},i={next(){if(Object.getPrototypeOf(this
Line truncated
|
||||
`||t===" "||t===" "}a(KO,"isHTTPWhiteSpace");function K4(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&KO(t[r]);r++);if(A)for(;i>0&&KO(t[i]);i--);return t.slice(r,i+1)}a(K4,"removeHTTPWhitespace");function $O(t){return t==="\r"||t===`
|
||||
`||t===" "||t==="\f"||t===" "}a($O,"isASCIIWhitespace");function n0e(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&$O(t[r]);r++);if(A)for(;i>0&&$O(t[i]);i--);return t.slice(r,i+1)}a(n0e,"removeASCIIWhitespace");rP.exports={dataURLProcessor:t0e,URLSerializer:eP,collectASequenceOfCodePoints:DI,collectASequenceOfCodePointsFast:Hp,stringPercentDecode:tP,parseMIMEType:$4,collectAnHTTPQuotedString:AP,serializeAMimeType:i0e}});var SI=E((vpt,oP)=>{"use strict";var{Blob:sP,File:iP}=require("buffer"),{types:e6}=require("util"),{kState:Un}=ec(),{isBlobLike:aP}=Ns(),{webidl:It}=Di(),{parseMIMEType:s0e,serializeAMimeType:a0e}=fa(),{kEnumerableProperty:nP}=ct(),o0e=new TextEncoder,lC=class t extends sP{static{a(this,"File")}constructor(e,A,r={}){It.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=It.converters["sequence<BlobPart>"](e),A=It.converters.USVString(A),r=It.converters.FilePropertyBag(r);let i=A,n=r.type,s;e:{if(n){if(n=s0e(n),n==="failure"){n="";break e}n=a0e(n).toLowerCase()}s=r.lastModified}super(c0e(e,r),{type:n}),this[Un]={name:i,lastModified:s,type:n}}get name(){return It.brandCheck(this,t),this[Un].name}get lastModified(){return It.brandCheck(this,t),this[Un].lastModified}get type(){return It.brandCheck(this,t),this[Un].type}},t6=class t{static{a(this,"FileLike")}constructor(e,A,r={}){let i=A,n=r.type,s=r.lastModified??Date.now();this[Un]={blobLike:e,name:i,type:n,lastModified:s}}stream(...e){return It.brandCheck(this,t),this[Un].blobLike.stream(...e)}arrayBuffer(...e){return It.brandCheck(this,t),this[Un].blobLike.arrayBuffer(...e)}slice(...e){return It.brandCheck(this,t),this[Un].blobLike.slice(...e)}text(...e){return It.brandCheck(this,t),this[Un].blobLike.text(...e)}get size(){return It.brandCheck(this,t),this[Un].blobLike.size}get type(){return It.brandCheck(this,t),this[Un].blobLike.type}get name(){return It.brandCheck(this,t),this[Un].name}get lastModified(){return It.brandCheck(this,t),this[Un].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(lC.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:nP,lastModified:nP});It.converters.Blob=It.interfaceConverter(sP);It.converters.BlobPart=function(t,e){if(It.util.Type(t)==="Object"){if(aP(t))return It.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||e6.isAnyArrayBuffer(t))return It.converters.BufferSource(t,e)}return It.converters.USVString(t,e)};It.converters["sequence<BlobPart>"]=It.sequenceConverter(It.converters.BlobPart);It.converters.FilePropertyBag=It.dictionaryConverter([{key:"lastModified",converter:It.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:It.converters.DOMString,defaultValue:""},{key:"endings",converter:t=>(t=It.converters.DOMString(t),t=t.toLowerCase(),t!=="native"&&(t="transparent"),t),defaultValue:"transparent"}]);function c0e(t,e){let A=[];for(let r of t)if(typeof r=="string"){let i=r;e.endings==="native"&&(i=l0e(i)),A.push(o0e.encode(i))}else e6.isAnyArrayBuffer(r)||e6.isTypedArray(r)?r.buffer?A.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):A.push(new Uint8Array(r)):aP(r)&&A.push(r);return A}a(c0e,"processBlobParts");function l0e(t){let e=`
|
||||
`;return process.platform==="win32"&&(e=`\r
|
||||
`),t.replace(/\r?\n/g,e)}a(X1e,"convertLineEndingsNative");function Z1e(t){return $O&&t instanceof $O||t instanceof aC||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}a(Z1e,"isFileLike");rP.exports={File:aC,FileLike:X4,isFileLike:Z1e}});var RI=E((Ept,oP)=>{"use strict";var{isBlobLike:NI,toUSVString:K1e,makeIterator:Z4}=Ns(),{kState:di}=ec(),{File:aP,FileLike:iP,isFileLike:$1e}=bI(),{webidl:Ft}=Di(),{Blob:e0e,File:K4}=require("buffer"),nP=K4??aP,Hp=class t{static{a(this,"FormData")}constructor(e){if(e!==void 0)throw Ft.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[di]=[]}append(e,A,r=void 0){if(Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!NI(A))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=Ft.converters.USVString(e),A=NI(A)?Ft.converters.Blob(A,{strict:!1}):Ft.converters.USVString(A),r=arguments.length===3?Ft.converters.USVString(r):void 0;let i=sP(e,A,r);this[di].push(i)}delete(e){Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=Ft.converters.USVString(e),this[di]=this[di].filter(A=>A.name!==e)}get(e){Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=Ft.converters.USVString(e);let A=this[di].findIndex(r=>r.name===e);return A===-1?null:this[di][A].value}getAll(e){return Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=Ft.converters.USVString(e),this[di].filter(A=>A.name===e).map(A=>A.value)}has(e){return Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=Ft.converters.USVString(e),this[di].findIndex(A=>A.name===e)!==-1}set(e,A,r=void 0){if(Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!NI(A))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=Ft.converters.USVString(e),A=NI(A)?Ft.converters.Blob(A,{strict:!1}):Ft.converters.USVString(A),r=arguments.length===3?K1e(r):void 0;let i=sP(e,A,r),n=this[di].findIndex(s=>s.name===e);n!==-1?this[di]=[...this[di].slice(0,n),i,...this[di].slice(n+1).filter(s=>s.name!==e)]:this[di].push(i)}entries(){return Ft.brandCheck(this,t),Z4(()=>this[di].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return Ft.brandCheck(this,t),Z4(()=>this[di].map(e=>[e.name,e.value]),"FormData","key")}values(){return Ft.brandCheck(this,t),Z4(()=>this[di].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,A=globalThis){if(Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(A,[i,r,this])}};Hp.prototype[Symbol.iterator]=Hp.prototype.entries;Object.defineProperties(Hp.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function sP(t,e,A){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if($1e(e)||(e=e instanceof e0e?new nP([e],"blob",{type:e.type}):new iP(e,"blob",{type:e.type})),A!==void 0){let r={type:e.type,lastModified:e.lastModified};e=K4&&e instanceof K4||e instanceof aP?new nP([e],A,r):new iP(e,A,r)}return{name:t,value:e}}a(sP,"makeEntry");oP.exports={FormData:Hp}});var oC=E((Cpt,mP)=>{"use strict";var t0e=DO(),Yp=ct(),{ReadableStreamFrom:A0e,isBlobLike:cP,isReadableStreamLike:r0e,readableStreamClose:i0e,createDeferredPromise:n0e,fullyReadBody:s0e}=Ns(),{FormData:lP}=RI(),{kState:Ac}=ec(),{webidl:$4}=Di(),{DOMException:pP,structuredClone:a0e}=ll(),{Blob:o0e,File:c0e}=require("buffer"),{kBodyUsed:l0e}=Wt(),e6=require("assert"),{isErrored:d0e}=ct(),{isUint8Array:gP,isArrayBuffer:u0e}=require("util/types"),{File:p0e}=bI(),{parseMIMEType:g0e,serializeAMimeType:h0e}=fa(),tc=globalThis.ReadableStream,dP=c0e??p0e,DI=new TextEncoder,E0e=new TextDecoder;function hP(t,e=!1){tc||(tc=require("stream/web").ReadableStream);let A=null;t instanceof tc?A=t:cP(t)?A=t.stream():A=new tc({async pull(c){c.enqueue(typeof i=="string"?DI.encode(i):i),queueMicrotask(()=>i0e(c))},start(){},type:void 0}),e6(r0e(A));let r=null,i=null,n=null,s=null;if(typeof t=="string")i=t,s="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),s="application/x-www-form-urlencoded;charset=UTF-8";else if(u0e(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Yp.isFormDataLike(t)){let c=`----formdata-undici-0${`${Math.floor(Math.random()*1e11)}`.padStart(11,"0")}`,l=`--${c}\r
|
||||
`),t.replace(/\r?\n/g,e)}a(l0e,"convertLineEndingsNative");function d0e(t){return iP&&t instanceof iP||t instanceof lC||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}a(d0e,"isFileLike");oP.exports={File:lC,FileLike:t6,isFileLike:d0e}});var vI=E((Fpt,pP)=>{"use strict";var{isBlobLike:xI,toUSVString:u0e,makeIterator:A6}=Ns(),{kState:di}=ec(),{File:uP,FileLike:cP,isFileLike:p0e}=SI(),{webidl:Ft}=Di(),{Blob:g0e,File:r6}=require("buffer"),lP=r6??uP,Yp=class t{static{a(this,"FormData")}constructor(e){if(e!==void 0)throw Ft.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[di]=[]}append(e,A,r=void 0){if(Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!xI(A))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=Ft.converters.USVString(e),A=xI(A)?Ft.converters.Blob(A,{strict:!1}):Ft.converters.USVString(A),r=arguments.length===3?Ft.converters.USVString(r):void 0;let i=dP(e,A,r);this[di].push(i)}delete(e){Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=Ft.converters.USVString(e),this[di]=this[di].filter(A=>A.name!==e)}get(e){Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=Ft.converters.USVString(e);let A=this[di].findIndex(r=>r.name===e);return A===-1?null:this[di][A].value}getAll(e){return Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=Ft.converters.USVString(e),this[di].filter(A=>A.name===e).map(A=>A.value)}has(e){return Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=Ft.converters.USVString(e),this[di].findIndex(A=>A.name===e)!==-1}set(e,A,r=void 0){if(Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!xI(A))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=Ft.converters.USVString(e),A=xI(A)?Ft.converters.Blob(A,{strict:!1}):Ft.converters.USVString(A),r=arguments.length===3?u0e(r):void 0;let i=dP(e,A,r),n=this[di].findIndex(s=>s.name===e);n!==-1?this[di]=[...this[di].slice(0,n),i,...this[di].slice(n+1).filter(s=>s.name!==e)]:this[di].push(i)}entries(){return Ft.brandCheck(this,t),A6(()=>this[di].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return Ft.brandCheck(this,t),A6(()=>this[di].map(e=>[e.name,e.value]),"FormData","key")}values(){return Ft.brandCheck(this,t),A6(()=>this[di].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,A=globalThis){if(Ft.brandCheck(this,t),Ft.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(A,[i,r,this])}};Yp.prototype[Symbol.iterator]=Yp.prototype.entries;Object.defineProperties(Yp.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function dP(t,e,A){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(p0e(e)||(e=e instanceof g0e?new lP([e],"blob",{type:e.type}):new cP(e,"blob",{type:e.type})),A!==void 0){let r={type:e.type,lastModified:e.lastModified};e=r6&&e instanceof r6||e instanceof uP?new lP([e],A,r):new cP(e,A,r)}return{name:t,value:e}}a(dP,"makeEntry");pP.exports={FormData:Yp}});var dC=E((Upt,IP)=>{"use strict";var h0e=FO(),Gp=ct(),{ReadableStreamFrom:E0e,isBlobLike:gP,isReadableStreamLike:m0e,readableStreamClose:C0e,createDeferredPromise:f0e,fullyReadBody:Q0e}=Ns(),{FormData:hP}=vI(),{kState:Ac}=ec(),{webidl:i6}=Di(),{DOMException:CP,structuredClone:B0e}=ll(),{Blob:I0e,File:y0e}=require("buffer"),{kBodyUsed:w0e}=Wt(),n6=require("assert"),{isErrored:b0e}=ct(),{isUint8Array:fP,isArrayBuffer:N0e}=require("util/types"),{File:R0e}=SI(),{parseMIMEType:D0e,serializeAMimeType:S0e}=fa(),tc=globalThis.ReadableStream,EP=y0e??R0e,kI=new TextEncoder,x0e=new TextDecoder;function QP(t,e=!1){tc||(tc=require("stream/web").ReadableStream);let A=null;t instanceof tc?A=t:gP(t)?A=t.stream():A=new tc({async pull(c){c.enqueue(typeof i=="string"?kI.encode(i):i),queueMicrotask(()=>C0e(c))},start(){},type:void 0}),n6(m0e(A));let r=null,i=null,n=null,s=null;if(typeof t=="string")i=t,s="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),s="application/x-www-form-urlencoded;charset=UTF-8";else if(N0e(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Gp.isFormDataLike(t)){let c=`----formdata-undici-0${`${Math.floor(Math.random()*1e11)}`.padStart(11,"0")}`,l=`--${c}\r
|
||||
Content-Disposition: form-data`;let d=a(f=>f.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),u=a(f=>f.replace(/\r?\n|\r/g,`\r
|
||||
`),"normalizeLinefeeds"),p=[],g=new Uint8Array([13,10]);n=0;let h=!1;for(let[f,B]of t)if(typeof B=="string"){let b=DI.encode(l+`; name="${d(u(f))}"\r
|
||||
`),"normalizeLinefeeds"),p=[],g=new Uint8Array([13,10]);n=0;let h=!1;for(let[f,B]of t)if(typeof B=="string"){let b=kI.encode(l+`; name="${d(u(f))}"\r
|
||||
\r
|
||||
${u(B)}\r
|
||||
`);p.push(b),n+=b.byteLength}else{let b=DI.encode(`${l}; name="${d(u(f))}"`+(B.name?`; filename="${d(B.name)}"`:"")+`\r
|
||||
`);p.push(b),n+=b.byteLength}else{let b=kI.encode(`${l}; name="${d(u(f))}"`+(B.name?`; filename="${d(B.name)}"`:"")+`\r
|
||||
Content-Type: ${B.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);p.push(b,B,g),typeof B.size=="number"?n+=b.byteLength+B.size+g.byteLength:h=!0}let m=DI.encode(`--${c}--`);p.push(m),n+=m.byteLength,h&&(n=null),i=t,r=a(async function*(){for(let f of p)f.stream?yield*f.stream():yield f},"action"),s="multipart/form-data; boundary="+c}else if(cP(t))i=t,n=t.size,t.type&&(s=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Yp.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");A=t instanceof tc?t:A0e(t)}if((typeof i=="string"||Yp.isBuffer(i))&&(n=Buffer.byteLength(i)),r!=null){let c;A=new tc({async start(){c=r(t)[Symbol.asyncIterator]()},async pull(l){let{value:d,done:u}=await c.next();return u?queueMicrotask(()=>{l.close()}):d0e(A)||l.enqueue(new Uint8Array(d)),l.desiredSize>0},async cancel(l){await c.return()},type:void 0})}return[{stream:A,source:i,length:n},s]}a(hP,"extractBody");function m0e(t,e=!1){return tc||(tc=require("stream/web").ReadableStream),t instanceof tc&&(e6(!Yp.isDisturbed(t),"The body has already been consumed."),e6(!t.locked,"The stream is locked.")),hP(t,e)}a(m0e,"safelyExtractBody");function C0e(t){let[e,A]=t.stream.tee(),r=a0e(A,{transfer:[A]}),[,i]=r.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}a(C0e,"cloneBody");async function*uP(t){if(t)if(gP(t))yield t;else{let e=t.stream;if(Yp.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[l0e]=!0,yield*e}}a(uP,"consumeBody");function t6(t){if(t.aborted)throw new pP("The operation was aborted.","AbortError")}a(t6,"throwIfAborted");function f0e(t){return{blob(){return SI(this,A=>{let r=y0e(this);return r==="failure"?r="":r&&(r=h0e(r)),new o0e([A],{type:r})},t)},arrayBuffer(){return SI(this,A=>new Uint8Array(A).buffer,t)},text(){return SI(this,EP,t)},json(){return SI(this,I0e,t)},async formData(){$4.brandCheck(this,t),t6(this[Ac]);let A=this.headers.get("Content-Type");if(/multipart\/form-data/.test(A)){let r={};for(let[o,c]of this.headers)r[o.toLowerCase()]=c;let i=new lP,n;try{n=new t0e({headers:r,preservePath:!0})}catch(o){throw new pP(`${o}`,"AbortError")}n.on("field",(o,c)=>{i.append(o,c)}),n.on("file",(o,c,l,d,u)=>{let p=[];if(d==="base64"||d.toLowerCase()==="base64"){let g="";c.on("data",h=>{g+=h.toString().replace(/[\r\n]/gm,"");let m=g.length-g.length%4;p.push(Buffer.from(g.slice(0,m),"base64")),g=g.slice(m)}),c.on("end",()=>{p.push(Buffer.from(g,"base64")),i.append(o,new dP(p,l,{type:u}))})}else c.on("data",g=>{p.push(g)}),c.on("end",()=>{i.append(o,new dP(p,l,{type:u}))})});let s=new Promise((o,c)=>{n.on("finish",o),n.on("error",l=>c(new TypeError(l)))});if(this.body!==null)for await(let o of uP(this[Ac].body))n.write(o);return n.end(),await s,i}else if(/application\/x-www-form-urlencoded/.test(A)){let r;try{let n="",s=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let o of uP(this[Ac].body)){if(!gP(o))throw new TypeError("Expected Uint8Array chunk");n+=s.decode(o,{stream:!0})}n+=s.decode(),r=new URLSearchParams(n)}catch(n){throw Object.assign(new TypeError,{cause:n})}let i=new lP;for(let[n,s]of r)i.append(n,s);return i}else throw await Promise.resolve(),t6(this[Ac]),$4.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}a(f0e,"bodyMixinMethods");function Q0e(t){Object.assign(t.prototype,f0e(t))}a(Q0e,"mixinBody");async function SI(t,e,A){if($4.brandCheck(t,A),t6(t[Ac]),B0e(t[Ac].body))throw new TypeError("Body is unusable");let r=n0e(),i=a(s=>r.reject(s),"errorSteps"),n=a(s=>{try{r.resolve(e(s))}catch(o){i(o)}},"successSteps");return t[Ac].body==null?(n(new Uint8Array),r.promise):(await s0e(t[Ac].body,n,i),r.promise)}a(SI,"specConsumeBody");function B0e(t){return t!=null&&(t.stream.locked||Yp.isDisturbed(t.stream))}a(B0e,"bodyUnusable");function EP(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),E0e.decode(t))}a(EP,"utf8DecodeBytes");function I0e(t){return JSON.parse(EP(t))}a(I0e,"parseJSONFromBytes");function y0e(t){let{headersList:e}=t[Ac],A=e.get("content-type");return A===null?"failure":g0e(A)}a(y0e,"bodyMimeType");mP.exports={extractBody:hP,safelyExtractBody:m0e,cloneBody:C0e,mixinBody:Q0e}});var BP=E((Qpt,QP)=>{"use strict";var{InvalidArgumentError:zt,NotSupportedError:w0e}=Pt(),rc=require("assert"),{kHTTP2BuildRequest:b0e,kHTTP2CopyHeaders:N0e,kHTTP1BuildRequest:R0e}=Wt(),Zi=ct(),CP=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,fP=/[^\t\x20-\x7e\x80-\xff]/,D0e=/[^\u0021-\u00ff]/,Qa=Symbol("handler"),ir={},A6;try{let t=require("diagnostics_channel");ir.create=t.channel("undici:request:create"),ir.bodySent=t.channel("undici:request:bodySent"),ir.headers=t.channel("undici:request:headers"),ir.trailers=t.channel("undici:request:trailers"),ir.error=t.channel("undici:request:error")}catch{ir.create={hasSubscribers:!1},ir.bodySent={hasSubscribers:!1},ir.headers={hasSubscribers:!1},ir.trailers={hasSubscribers:!1},ir.error={hasSLine truncated
|
||||
`);p.push(b,B,g),typeof B.size=="number"?n+=b.byteLength+B.size+g.byteLength:h=!0}let m=kI.encode(`--${c}--`);p.push(m),n+=m.byteLength,h&&(n=null),i=t,r=a(async function*(){for(let f of p)f.stream?yield*f.stream():yield f},"action"),s="multipart/form-data; boundary="+c}else if(gP(t))i=t,n=t.size,t.type&&(s=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Gp.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");A=t instanceof tc?t:E0e(t)}if((typeof i=="string"||Gp.isBuffer(i))&&(n=Buffer.byteLength(i)),r!=null){let c;A=new tc({async start(){c=r(t)[Symbol.asyncIterator]()},async pull(l){let{value:d,done:u}=await c.next();return u?queueMicrotask(()=>{l.close()}):b0e(A)||l.enqueue(new Uint8Array(d)),l.desiredSize>0},async cancel(l){await c.return()},type:void 0})}return[{stream:A,source:i,length:n},s]}a(QP,"extractBody");function v0e(t,e=!1){return tc||(tc=require("stream/web").ReadableStream),t instanceof tc&&(n6(!Gp.isDisturbed(t),"The body has already been consumed."),n6(!t.locked,"The stream is locked.")),QP(t,e)}a(v0e,"safelyExtractBody");function k0e(t){let[e,A]=t.stream.tee(),r=B0e(A,{transfer:[A]}),[,i]=r.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}a(k0e,"cloneBody");async function*mP(t){if(t)if(fP(t))yield t;else{let e=t.stream;if(Gp.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[w0e]=!0,yield*e}}a(mP,"consumeBody");function s6(t){if(t.aborted)throw new CP("The operation was aborted.","AbortError")}a(s6,"throwIfAborted");function F0e(t){return{blob(){return FI(this,A=>{let r=M0e(this);return r==="failure"?r="":r&&(r=S0e(r)),new I0e([A],{type:r})},t)},arrayBuffer(){return FI(this,A=>new Uint8Array(A).buffer,t)},text(){return FI(this,BP,t)},json(){return FI(this,T0e,t)},async formData(){i6.brandCheck(this,t),s6(this[Ac]);let A=this.headers.get("Content-Type");if(/multipart\/form-data/.test(A)){let r={};for(let[o,c]of this.headers)r[o.toLowerCase()]=c;let i=new hP,n;try{n=new h0e({headers:r,preservePath:!0})}catch(o){throw new CP(`${o}`,"AbortError")}n.on("field",(o,c)=>{i.append(o,c)}),n.on("file",(o,c,l,d,u)=>{let p=[];if(d==="base64"||d.toLowerCase()==="base64"){let g="";c.on("data",h=>{g+=h.toString().replace(/[\r\n]/gm,"");let m=g.length-g.length%4;p.push(Buffer.from(g.slice(0,m),"base64")),g=g.slice(m)}),c.on("end",()=>{p.push(Buffer.from(g,"base64")),i.append(o,new EP(p,l,{type:u}))})}else c.on("data",g=>{p.push(g)}),c.on("end",()=>{i.append(o,new EP(p,l,{type:u}))})});let s=new Promise((o,c)=>{n.on("finish",o),n.on("error",l=>c(new TypeError(l)))});if(this.body!==null)for await(let o of mP(this[Ac].body))n.write(o);return n.end(),await s,i}else if(/application\/x-www-form-urlencoded/.test(A)){let r;try{let n="",s=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let o of mP(this[Ac].body)){if(!fP(o))throw new TypeError("Expected Uint8Array chunk");n+=s.decode(o,{stream:!0})}n+=s.decode(),r=new URLSearchParams(n)}catch(n){throw Object.assign(new TypeError,{cause:n})}let i=new hP;for(let[n,s]of r)i.append(n,s);return i}else throw await Promise.resolve(),s6(this[Ac]),i6.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}a(F0e,"bodyMixinMethods");function L0e(t){Object.assign(t.prototype,F0e(t))}a(L0e,"mixinBody");async function FI(t,e,A){if(i6.brandCheck(t,A),s6(t[Ac]),U0e(t[Ac].body))throw new TypeError("Body is unusable");let r=f0e(),i=a(s=>r.reject(s),"errorSteps"),n=a(s=>{try{r.resolve(e(s))}catch(o){i(o)}},"successSteps");return t[Ac].body==null?(n(new Uint8Array),r.promise):(await Q0e(t[Ac].body,n,i),r.promise)}a(FI,"specConsumeBody");function U0e(t){return t!=null&&(t.stream.locked||Gp.isDisturbed(t.stream))}a(U0e,"bodyUnusable");function BP(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),x0e.decode(t))}a(BP,"utf8DecodeBytes");function T0e(t){return JSON.parse(BP(t))}a(T0e,"parseJSONFromBytes");function M0e(t){let{headersList:e}=t[Ac],A=e.get("content-type");return A===null?"failure":D0e(A)}a(M0e,"bodyMimeType");IP.exports={extractBody:QP,safelyExtractBody:v0e,cloneBody:k0e,mixinBody:L0e}});var NP=E((Mpt,bP)=>{"use strict";var{InvalidArgumentError:zt,NotSupportedError:_0e}=Pt(),rc=require("assert"),{kHTTP2BuildRequest:O0e,kHTTP2CopyHeaders:P0e,kHTTP1BuildRequest:q0e}=Wt(),Zi=ct(),yP=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,wP=/[^\t\x20-\x7e\x80-\xff]/,H0e=/[^\u0021-\u00ff]/,Qa=Symbol("handler"),ir={},a6;try{let t=require("diagnostics_channel");ir.create=t.channel("undici:request:create"),ir.bodySent=t.channel("undici:request:bodySent"),ir.headers=t.channel("undici:request:headers"),ir.trailers=t.channel("undici:request:trailers"),ir.error=t.channel("undici:request:error")}catch{ir.create={hasSubscribers:!1},ir.bodySent={hasSubscribers:!1},ir.headers={hasSubscribers:!1},ir.trailers={hasSubscribers:!1},ir.error={hasSLine truncated
|
||||
`),this.body=f.stream,this.contentLength=f.length}else Zi.isBlobLike(i)&&this.contentType==null&&i.type&&(this.contentType=i.type,this.headers+=`content-type: ${i.type}\r
|
||||
`);Zi.validateHandler(m,r,l),this.servername=Zi.getServerName(this.host),this[Qa]=m,ir.create.hasSubscribers&&ir.create.publish({request:this})}onBodySent(e){if(this[Qa].onBodySent)try{return this[Qa].onBodySent(e)}catch(A){this.abort(A)}}onRequestSent(){if(ir.bodySent.hasSubscribers&&ir.bodySent.publish({request:this}),this[Qa].onRequestSent)try{return this[Qa].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(rc(!this.aborted),rc(!this.completed),this.error)e(this.error);else return this.abort=e,this[Qa].onConnect(e)}onHeaders(e,A,r,i){rc(!this.aborted),rc(!this.completed),ir.headers.hasSubscribers&&ir.headers.publish({request:this,response:{statusCode:e,headers:A,statusText:i}});try{return this[Qa].onHeaders(e,A,r,i)}catch(n){this.abort(n)}}onData(e){rc(!this.aborted),rc(!this.completed);try{return this[Qa].onData(e)}catch(A){return this.abort(A),!1}}onUpgrade(e,A,r){return rc(!this.aborted),rc(!this.completed),this[Qa].onUpgrade(e,A,r)}onComplete(e){this.onFinally(),rc(!this.aborted),this.completed=!0,ir.trailers.hasSubscribers&&ir.trailers.publish({request:this,trailers:e});try{return this[Qa].onComplete(e)}catch(A){this.onError(A)}}onError(e){if(this.onFinally(),ir.error.hasSubscribers&&ir.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Qa].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,A){return cC(this,e,A),this}static[R0e](e,A,r){return new t(e,A,r)}static[b0e](e,A,r){let i=A.headers;A={...A,headers:null};let n=new t(e,A,r);if(n.headers={},Array.isArray(i)){if(i.length%2!==0)throw new zt("headers array must be even");for(let s=0;s<i.length;s+=2)cC(n,i[s],i[s+1],!0)}else if(i&&typeof i=="object"){let s=Object.keys(i);for(let o=0;o<s.length;o++){let c=s[o];cC(n,c,i[c],!0)}}else if(i!=null)throw new zt("headers must be an object or an array");return n}static[N0e](e){let A=e.split(`\r
|
||||
`),r={};for(let i of A){let[n,s]=i.split(": ");s==null||s.length===0||(r[n]?r[n]+=`,${s}`:r[n]=s)}return r}};function Pd(t,e,A){if(e&&typeof e=="object")throw new zt(`invalid ${t} header`);if(e=e!=null?`${e}`:"",fP.exec(e)!==null)throw new zt(`invalid ${t} header`);return A?e:`${t}: ${e}\r
|
||||
`}a(Pd,"processHeaderValue");function cC(t,e,A,r=!1){if(A&&typeof A=="object"&&!Array.isArray(A))throw new zt(`invalid ${e} header`);if(A===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(fP.exec(A)!==null)throw new zt(`invalid ${e} header`);t.host=A}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(A,10),!Number.isFinite(t.contentLength))throw new zt("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=A,r?t.headers[e]=Pd(e,A,r):t.headers+=Pd(e,A);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new zt("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof A=="string"?A.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new zt("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new zt("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new zt("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new w0e("expect header not supported");if(CP.exec(e)===null)throw new zt("invalid header key");if(Array.isArray(A))for(let i=0;i<A.length;i++)r?t.headers[e]?t.headers[e]+=`,${Pd(e,A[i],r)}`:t.headers[e]=Pd(e,A[i],r):t.headers+=Pd(e,A[i]);else r?t.headers[e]=Pd(e,A,r):t.headers+=Pd(e,A)}}}a(cC,"processHeader");QP.exports=r6});var xI=E((Ipt,IP)=>{"use strict";var S0e=require("events"),i6=class extends S0e{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};IP.exports=i6});var dC=E((wpt,yP)=>{"use strict";var x0e=xI(),{ClientDestroyedError:n6,ClientClosedError:v0e,InvalidArgumentError:Gp}=Pt(),{kDestroy:k0e,kClose:F0e,kDispatch:s6,kInterceptors:qd}=Wt(),Jp=Symbol("destroyed"),lC=Symbol("closed"),ic=Symbol("onDestroyed"),Vp=Symbol("onClosed"),vI=Symbol("Intercepted Dispatch"),a6=class extends x0e{static{a(this,"DispatcherBase")}constructor(){super(),this[Jp]=!1,this[ic]=null,this[lC]=!1,this[Vp]=[]}get destroyed(){return this[Jp]}get closed(){return this[lC]}get interceptors(){return this[qd]}set interceptors(e){if(e){for(let A=e.length-1;A>=0;A--)if(typeof this[qd][A]!="function")throw new Gp("interceptor must be an function")}this[qd]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((n,s)=>n?i(n):r(s))});if(typeof e!="function")throw new Gp("invalid callback");if(this[Jp]){queueMicrotask(()=>e(new n6,null));return}if(this[lC]){this[Vp]?this[Vp].push(e):queueMicrotask(()=>e(null,null));return}this[lC]=!0,this[Vp].push(e);let A=a(()=>{let r=this[Vp];this[Vp]=null;for(let i=0;i<r.length;i++)r[i](null,null)},"onClosed");this[F0e]().then(()=>this.destroy()).then(()=>{queueMicrotask(A)})}destroy(e,A){if(typeof e=="function"&&(A=e,e=null),A===void 0)return new Promise((i,n)=>{this.destroy(e,(s,o)=>s?n(s):i(o))});if(typeof A!="function")throw new Gp("invalid callback");if(this[Jp]){this[ic]?this[ic].push(A):queueMicrotask(()=>A(null,null));return}e||(e=new n6),this[Jp]=!0,this[ic]=this[ic]||[],this[ic].push(A);let r=a(()=>{let i=this[ic];this[ic]=null;for(let n=0;n<i.length;n++)i[n](null,null)},"onDestroyed");this[k0e](e).then(()=>{queueMicrotask(r)})}[vI](e,A){if(!this[qd]||this[qd].length===0)return this[vI]=this[s6],this[s6](e,A);let r=this[s6].bind(this);for(let i=this[qd].length-1;i>=0;i--)r=this[qd][i](r);return this[vI]=r,r(e,A)}dispatch(e,A){if(!A||typeof A!="object")throw new Gp("handler must be an object");try{if(!e||typeof e!="object")throw new Gp("opts must be an object.");if(this[Jp]||this[ic])throw new n6;if(this[lC])throw new v0e;return this[vI](e,A)}catch(r){if(typeof A.onError!="function")throw new Gp("invalid onError method");return A.onError(r),!1}}};yP.exports=a6});var uC=E((Dpt,NP)=>{"use strict";var L0e=require("net"),wP=require("assert"),bP=ct(),{InvalidArgumentError:U0e,ConnectTimeoutError:T0e}=Pt(),o6,c6;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?c6=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(A=>{if(this._sessionCache.size<this._maxCachedSessions)return;let r=this._sessionCache.get(A);r!==void 0&&r.deref()===void 0&&this._sessionCache.delete(A)})}get(e){let A=this._sessionCache.get(e);return A?A.deref():null}set(e,A){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(A)),this._sessionRegistry.register(A,e))}}:c6=class{static{a(this,"SimpleSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,A){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:r}=this._sessionCache.keys().next();this._sessionCache.delete(r)}this._sessionCache.set(e,A)}}};function M0e({allowH2:t,maxCachedSessi
Line truncated
|
||||
`,this[YP]=c??3e5,this[HP]=i??3e5,this[CC]=b??!0,this[pye]=C,this[fC]=N,this[ul]=null,this[JP]=w>-1?w:-1,this[$a]="h1",this[Mn]=null,this[OI]=v?{openStreams:0,maxConcurrentStreams:x??100}:null,this[VP]=`${this[Vr].hostname}${this[Vr].port?`:${this[Vr].port}`:""}`,this[iA]=[],this[nA]=0,this[Tn]=0}get pipelining(){return this[gl]}set pipelining(e){this[gl]=e,_n(this,!0)}get[Gd](){return this[iA].length-this[Tn]}get[yA](){return this[Tn]-this[nA]}get[Yd](){return this[iA].length-this[nA]}get[uye](){return!!this[SA]&&!this[jp]&&!this[SA].destroyed}get[m6](){let e=this[SA];return e&&(e[Si]||e[sc]||e[Zp])||this[Yd]>=(this[gl]||1)||this[Gd]>0}[dye](e){XP(this),this.once("connect",e)}[Eye](e,A){let r=e.origin||this[Vr].origin,i=this[$a]==="h2"?E6[Cye](r,e,A):E6[Qye](r,e,A);return this[iA].push(i),this[Hd]||(Ce.bodyLength(i.body)==null&&Ce.isIterable(i.body)?(this[Hd]=1,process.nextTick(_n,this)):_n(this,!0)),this[Hd]&&this[pl]!==2&&this[m6]&&(this[pl]=2),this[pl]<2}async[gye](){return new Promise(e=>{this[Yd]?this[ul]=e:e(null)})}async[hye](e){return new Promise(A=>{let r=this[iA].splice(this[Tn]);for(let n=0;n<r.length;n++){let s=r[n];xi(this,s,e)}let i=a(()=>{this[ul]&&(this[ul](),this[ul]=null),A()},"callback");this[Mn]!=null&&(Ce.destroy(this[Mn],e),this[Mn]=null,this[OI]=null),this[SA]?Ce.destroy(this[SA].on("close",i),e):queueMicrotask(i),_n(this)})}};function Dye(t){re(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[SA][Wr]=t,YI(this[Ka],t)}a(Dye,"onHttp2SessionError");function Sye(t,e,A){let r=new Za(`HTTP/2: "frameError" received - type ${t}, code ${e}`);A===0&&(this[SA][Wr]=r,YI(this[Ka],r))}a(Sye,"onHttp2FrameError");function xye(){Ce.destroy(this,new Xp("other side closed")),Ce.destroy(this[SA],new Xp("other side closed"))}a(xye,"onHttp2SessionEnd");function vye(t){let e=this[Ka],A=new Za(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[SA]=null,e[Mn]=null,e.destroyed){re(this[Gd]===0);let r=e[iA].splice(e[nA]);for(let i=0;i<r.length;i++){let n=r[i];xi(this,n,A)}}else if(e[yA]>0){let r=e[iA][e[nA]];e[iA][e[nA]++]=null,xi(e,r,A)}e[Tn]=e[nA],re(e[yA]===0),e.emit("disconnect",e[Vr],[e],A),_n(e)}a(vye,"onHTTP2GoAway");var za=DP(),kye=LI(),Fye=Buffer.alloc(0);async function Lye(){let t=process.env.JEST_WORKER_ID?p6():void 0,e;try{e=await WebAssembly.compile(Buffer.from(UP(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||p6(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(A,r,i)=>0,wasm_on_status:(A,r,i)=>{re.strictEqual(hr.ptr,A);let n=r-Xa+ja.byteOffset;return hr.onStatus(new UI(ja.buffer,n,i))||0},wasm_on_message_begin:A=>(re.strictEqual(hr.ptr,A),hr.onMessageBegin()||0),wasm_on_header_field:(A,r,i)=>{re.strictEqual(hr.ptr,A);let n=r-Xa+ja.byteOffset;return hr.onHeaderField(new UI(ja.buffer,n,i))||0},wasm_on_header_value:(A,r,i)=>{re.strictEqual(hr.ptr,A);let n=r-Xa+ja.byteOffset;return hr.onHeaderValue(new UI(ja.buffer,n,i))||0},wasm_on_headers_complete:(A,r,i,n)=>(re.strictEqual(hr.ptr,A),hr.onHeadersComplete(r,!!i,!!n)||0),wasm_on_body:(A,r,i)=>{re.strictEqual(hr.ptr,A);let n=r-Xa+ja.byteOffset;return hr.onBody(new UI(ja.buffer,n,i))||0},wasm_on_message_complete:A=>(re.strictEqual(hr.ptr,A),hr.onMessageComplete()||0)}})}a(Lye,"lazyllhttp");var h6=null,Q6=Lye();Q6.catch();var hr=null,ja=null,TI=0,Xa=null,Kp=1,_I=2,B6=3,I6=class{static{a(this,"Parser")}constructor(e,A,{exports:r}){re(Number.isFinite(e[MI])&&e[MI]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(za.TYPE.RESPONSE),this.client=e,this.socket=A,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[MI],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[JP]}setTimeout(e,A){this.timeoutType=A,e!==this.timeoutValue?(g6.clearTimeout(this.timeout),e?(this.timeout=g6.setTimeout(Uye,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(re(this.ptr!=null),re(hr==null),this.llhttp.llhttp_resume(this.ptr),re(this.timeoutType===_I),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||Fye),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){re(this.ptr!=null),re(hr==null),re(!this.paused);let{socket:A,llhttp:r}=this;e.length>TI&&(Xa&&r.free(Xa),TI=Math.ceil(e.length/4096)*4096,Xa=r.malloc(TI)),new Uint8Array(r.memory.buffer,Xa,TI).set(e);try{let i;try{ja=e,hr=this,i=r.llhttp_execute(this.ptr,Xa,e.length)}catch(s){throw s}finally{hr=null,ja=null}let n=r.llhttp_get_error_pos(this.ptr)-Xa;if(i===za.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(n));else if(i===za.ERROR.PAUSED)this.paused=!0,A.unshift(e.slice(n));e
Line truncated
|
||||
`);Zi.validateHandler(m,r,l),this.servername=Zi.getServerName(this.host),this[Qa]=m,ir.create.hasSubscribers&&ir.create.publish({request:this})}onBodySent(e){if(this[Qa].onBodySent)try{return this[Qa].onBodySent(e)}catch(A){this.abort(A)}}onRequestSent(){if(ir.bodySent.hasSubscribers&&ir.bodySent.publish({request:this}),this[Qa].onRequestSent)try{return this[Qa].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(rc(!this.aborted),rc(!this.completed),this.error)e(this.error);else return this.abort=e,this[Qa].onConnect(e)}onHeaders(e,A,r,i){rc(!this.aborted),rc(!this.completed),ir.headers.hasSubscribers&&ir.headers.publish({request:this,response:{statusCode:e,headers:A,statusText:i}});try{return this[Qa].onHeaders(e,A,r,i)}catch(n){this.abort(n)}}onData(e){rc(!this.aborted),rc(!this.completed);try{return this[Qa].onData(e)}catch(A){return this.abort(A),!1}}onUpgrade(e,A,r){return rc(!this.aborted),rc(!this.completed),this[Qa].onUpgrade(e,A,r)}onComplete(e){this.onFinally(),rc(!this.aborted),this.completed=!0,ir.trailers.hasSubscribers&&ir.trailers.publish({request:this,trailers:e});try{return this[Qa].onComplete(e)}catch(A){this.onError(A)}}onError(e){if(this.onFinally(),ir.error.hasSubscribers&&ir.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Qa].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,A){return uC(this,e,A),this}static[q0e](e,A,r){return new t(e,A,r)}static[O0e](e,A,r){let i=A.headers;A={...A,headers:null};let n=new t(e,A,r);if(n.headers={},Array.isArray(i)){if(i.length%2!==0)throw new zt("headers array must be even");for(let s=0;s<i.length;s+=2)uC(n,i[s],i[s+1],!0)}else if(i&&typeof i=="object"){let s=Object.keys(i);for(let o=0;o<s.length;o++){let c=s[o];uC(n,c,i[c],!0)}}else if(i!=null)throw new zt("headers must be an object or an array");return n}static[P0e](e){let A=e.split(`\r
|
||||
`),r={};for(let i of A){let[n,s]=i.split(": ");s==null||s.length===0||(r[n]?r[n]+=`,${s}`:r[n]=s)}return r}};function qd(t,e,A){if(e&&typeof e=="object")throw new zt(`invalid ${t} header`);if(e=e!=null?`${e}`:"",wP.exec(e)!==null)throw new zt(`invalid ${t} header`);return A?e:`${t}: ${e}\r
|
||||
`}a(qd,"processHeaderValue");function uC(t,e,A,r=!1){if(A&&typeof A=="object"&&!Array.isArray(A))throw new zt(`invalid ${e} header`);if(A===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(wP.exec(A)!==null)throw new zt(`invalid ${e} header`);t.host=A}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(A,10),!Number.isFinite(t.contentLength))throw new zt("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=A,r?t.headers[e]=qd(e,A,r):t.headers+=qd(e,A);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new zt("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof A=="string"?A.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new zt("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new zt("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new zt("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new _0e("expect header not supported");if(yP.exec(e)===null)throw new zt("invalid header key");if(Array.isArray(A))for(let i=0;i<A.length;i++)r?t.headers[e]?t.headers[e]+=`,${qd(e,A[i],r)}`:t.headers[e]=qd(e,A[i],r):t.headers+=qd(e,A[i]);else r?t.headers[e]=qd(e,A,r):t.headers+=qd(e,A)}}}a(uC,"processHeader");bP.exports=o6});var LI=E((Opt,RP)=>{"use strict";var Y0e=require("events"),c6=class extends Y0e{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};RP.exports=c6});var gC=E((qpt,DP)=>{"use strict";var G0e=LI(),{ClientDestroyedError:l6,ClientClosedError:J0e,InvalidArgumentError:Jp}=Pt(),{kDestroy:V0e,kClose:W0e,kDispatch:d6,kInterceptors:Hd}=Wt(),Vp=Symbol("destroyed"),pC=Symbol("closed"),ic=Symbol("onDestroyed"),Wp=Symbol("onClosed"),UI=Symbol("Intercepted Dispatch"),u6=class extends G0e{static{a(this,"DispatcherBase")}constructor(){super(),this[Vp]=!1,this[ic]=null,this[pC]=!1,this[Wp]=[]}get destroyed(){return this[Vp]}get closed(){return this[pC]}get interceptors(){return this[Hd]}set interceptors(e){if(e){for(let A=e.length-1;A>=0;A--)if(typeof this[Hd][A]!="function")throw new Jp("interceptor must be an function")}this[Hd]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((n,s)=>n?i(n):r(s))});if(typeof e!="function")throw new Jp("invalid callback");if(this[Vp]){queueMicrotask(()=>e(new l6,null));return}if(this[pC]){this[Wp]?this[Wp].push(e):queueMicrotask(()=>e(null,null));return}this[pC]=!0,this[Wp].push(e);let A=a(()=>{let r=this[Wp];this[Wp]=null;for(let i=0;i<r.length;i++)r[i](null,null)},"onClosed");this[W0e]().then(()=>this.destroy()).then(()=>{queueMicrotask(A)})}destroy(e,A){if(typeof e=="function"&&(A=e,e=null),A===void 0)return new Promise((i,n)=>{this.destroy(e,(s,o)=>s?n(s):i(o))});if(typeof A!="function")throw new Jp("invalid callback");if(this[Vp]){this[ic]?this[ic].push(A):queueMicrotask(()=>A(null,null));return}e||(e=new l6),this[Vp]=!0,this[ic]=this[ic]||[],this[ic].push(A);let r=a(()=>{let i=this[ic];this[ic]=null;for(let n=0;n<i.length;n++)i[n](null,null)},"onDestroyed");this[V0e](e).then(()=>{queueMicrotask(r)})}[UI](e,A){if(!this[Hd]||this[Hd].length===0)return this[UI]=this[d6],this[d6](e,A);let r=this[d6].bind(this);for(let i=this[Hd].length-1;i>=0;i--)r=this[Hd][i](r);return this[UI]=r,r(e,A)}dispatch(e,A){if(!A||typeof A!="object")throw new Jp("handler must be an object");try{if(!e||typeof e!="object")throw new Jp("opts must be an object.");if(this[Vp]||this[ic])throw new l6;if(this[pC])throw new J0e;return this[UI](e,A)}catch(r){if(typeof A.onError!="function")throw new Jp("invalid onError method");return A.onError(r),!1}}};DP.exports=u6});var hC=E((Jpt,vP)=>{"use strict";var z0e=require("net"),SP=require("assert"),xP=ct(),{InvalidArgumentError:j0e,ConnectTimeoutError:X0e}=Pt(),p6,g6;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?g6=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(A=>{if(this._sessionCache.size<this._maxCachedSessions)return;let r=this._sessionCache.get(A);r!==void 0&&r.deref()===void 0&&this._sessionCache.delete(A)})}get(e){let A=this._sessionCache.get(e);return A?A.deref():null}set(e,A){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(A)),this._sessionRegistry.register(A,e))}}:g6=class{static{a(this,"SimpleSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,A){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:r}=this._sessionCache.keys().next();this._sessionCache.delete(r)}this._sessionCache.set(e,A)}}};function Z0e({allowH2:t,maxCachedSessi
Line truncated
|
||||
`,this[zP]=c??3e5,this[WP]=i??3e5,this[BC]=b??!0,this[Rye]=C,this[IC]=N,this[ul]=null,this[XP]=w>-1?w:-1,this[$a]="h1",this[Mn]=null,this[YI]=v?{openStreams:0,maxConcurrentStreams:x??100}:null,this[ZP]=`${this[Wr].hostname}${this[Wr].port?`:${this[Wr].port}`:""}`,this[iA]=[],this[nA]=0,this[Tn]=0}get pipelining(){return this[gl]}set pipelining(e){this[gl]=e,_n(this,!0)}get[Jd](){return this[iA].length-this[Tn]}get[yA](){return this[Tn]-this[nA]}get[Gd](){return this[iA].length-this[nA]}get[Nye](){return!!this[SA]&&!this[Xp]&&!this[SA].destroyed}get[I6](){let e=this[SA];return e&&(e[Si]||e[sc]||e[Kp])||this[Gd]>=(this[gl]||1)||this[Jd]>0}[bye](e){tq(this),this.once("connect",e)}[xye](e,A){let r=e.origin||this[Wr].origin,i=this[$a]==="h2"?B6[kye](r,e,A):B6[Lye](r,e,A);return this[iA].push(i),this[Yd]||(Ce.bodyLength(i.body)==null&&Ce.isIterable(i.body)?(this[Yd]=1,process.nextTick(_n,this)):_n(this,!0)),this[Yd]&&this[pl]!==2&&this[I6]&&(this[pl]=2),this[pl]<2}async[Dye](){return new Promise(e=>{this[Gd]?this[ul]=e:e(null)})}async[Sye](e){return new Promise(A=>{let r=this[iA].splice(this[Tn]);for(let n=0;n<r.length;n++){let s=r[n];xi(this,s,e)}let i=a(()=>{this[ul]&&(this[ul](),this[ul]=null),A()},"callback");this[Mn]!=null&&(Ce.destroy(this[Mn],e),this[Mn]=null,this[YI]=null),this[SA]?Ce.destroy(this[SA].on("close",i),e):queueMicrotask(i),_n(this)})}};function Hye(t){re(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[SA][zr]=t,WI(this[Ka],t)}a(Hye,"onHttp2SessionError");function Yye(t,e,A){let r=new Za(`HTTP/2: "frameError" received - type ${t}, code ${e}`);A===0&&(this[SA][zr]=r,WI(this[Ka],r))}a(Yye,"onHttp2FrameError");function Gye(){Ce.destroy(this,new Zp("other side closed")),Ce.destroy(this[SA],new Zp("other side closed"))}a(Gye,"onHttp2SessionEnd");function Jye(t){let e=this[Ka],A=new Za(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[SA]=null,e[Mn]=null,e.destroyed){re(this[Jd]===0);let r=e[iA].splice(e[nA]);for(let i=0;i<r.length;i++){let n=r[i];xi(this,n,A)}}else if(e[yA]>0){let r=e[iA][e[nA]];e[iA][e[nA]++]=null,xi(e,r,A)}e[Tn]=e[nA],re(e[yA]===0),e.emit("disconnect",e[Wr],[e],A),_n(e)}a(Jye,"onHTTP2GoAway");var za=FP(),Vye=_I(),Wye=Buffer.alloc(0);async function zye(){let t=process.env.JEST_WORKER_ID?C6():void 0,e;try{e=await WebAssembly.compile(Buffer.from(PP(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||C6(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(A,r,i)=>0,wasm_on_status:(A,r,i)=>{re.strictEqual(hr.ptr,A);let n=r-Xa+ja.byteOffset;return hr.onStatus(new OI(ja.buffer,n,i))||0},wasm_on_message_begin:A=>(re.strictEqual(hr.ptr,A),hr.onMessageBegin()||0),wasm_on_header_field:(A,r,i)=>{re.strictEqual(hr.ptr,A);let n=r-Xa+ja.byteOffset;return hr.onHeaderField(new OI(ja.buffer,n,i))||0},wasm_on_header_value:(A,r,i)=>{re.strictEqual(hr.ptr,A);let n=r-Xa+ja.byteOffset;return hr.onHeaderValue(new OI(ja.buffer,n,i))||0},wasm_on_headers_complete:(A,r,i,n)=>(re.strictEqual(hr.ptr,A),hr.onHeadersComplete(r,!!i,!!n)||0),wasm_on_body:(A,r,i)=>{re.strictEqual(hr.ptr,A);let n=r-Xa+ja.byteOffset;return hr.onBody(new OI(ja.buffer,n,i))||0},wasm_on_message_complete:A=>(re.strictEqual(hr.ptr,A),hr.onMessageComplete()||0)}})}a(zye,"lazyllhttp");var Q6=null,b6=zye();b6.catch();var hr=null,ja=null,PI=0,Xa=null,$p=1,HI=2,N6=3,R6=class{static{a(this,"Parser")}constructor(e,A,{exports:r}){re(Number.isFinite(e[qI])&&e[qI]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(za.TYPE.RESPONSE),this.client=e,this.socket=A,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[qI],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[XP]}setTimeout(e,A){this.timeoutType=A,e!==this.timeoutValue?(f6.clearTimeout(this.timeout),e?(this.timeout=f6.setTimeout(jye,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(re(this.ptr!=null),re(hr==null),this.llhttp.llhttp_resume(this.ptr),re(this.timeoutType===HI),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||Wye),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){re(this.ptr!=null),re(hr==null),re(!this.paused);let{socket:A,llhttp:r}=this;e.length>PI&&(Xa&&r.free(Xa),PI=Math.ceil(e.length/4096)*4096,Xa=r.malloc(PI)),new Uint8Array(r.memory.buffer,Xa,PI).set(e);try{let i;try{ja=e,hr=this,i=r.llhttp_execute(this.ptr,Xa,e.length)}catch(s){throw s}finally{hr=null,ja=null}let n=r.llhttp_get_error_pos(this.ptr)-Xa;if(i===za.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(n));else if(i===za.ERROR.PAUSED)this.paused=!0,A.unshift(e.slice(n));e
Line truncated
|
||||
`;return typeof n=="string"?h+=`host: ${n}\r
|
||||
`:h+=t[OP],s?h+=`connection: upgrade\r
|
||||
`:h+=t[GP],s?h+=`connection: upgrade\r
|
||||
upgrade: ${s}\r
|
||||
`:t[gl]&&!g[Si]?h+=`connection: keep-alive\r
|
||||
`:h+=`connection: close\r
|
||||
@@ -34,40 +34,40 @@ upgrade: ${s}\r
|
||||
`,"latin1"):(re(p===null,"no body must not have content length"),g.write(`${h}\r
|
||||
`,"latin1")),e.onRequestSent()):Ce.isBuffer(A)?(re(p===A.byteLength,"buffer body must have content length"),g.cork(),g.write(`${h}content-length: ${p}\r
|
||||
\r
|
||||
`,"latin1"),g.write(A),g.uncork(),e.onBodySent(A),e.onRequestSent(),d||(g[Si]=!0)):Ce.isBlobLike(A)?typeof A.stream=="function"?qI({body:A.stream(),client:t,request:e,socket:g,contentLength:p,header:h,expectsPayload:d}):$P({body:A,client:t,request:e,socket:g,contentLength:p,header:h,expectsPayload:d}):Ce.isStream(A)?KP({body:A,client:t,request:e,socket:g,contentLength:p,header:h,expectsPayload:d}):Ce.isIterable(A)?qI({body:A,client:t,request:e,socket:g,contentLength:p,header:h,expectsPayload:d}):re(!1),!0}a(Mye,"write");function _ye(t,e,A){let{body:r,method:i,path:n,host:s,upgrade:o,expectContinue:c,signal:l,headers:d}=A,u;if(typeof d=="string"?u=E6[fye](d.trim()):u=d,o)return xi(t,A,new Error("Upgrade not supported for H2")),!1;try{A.onConnect(b=>{A.aborted||A.completed||xi(t,A,b||new w6)})}catch(b){xi(t,A,b)}if(A.aborted)return!1;let p,g=t[OI];if(u[Bye]=s||t[VP],u[Iye]=i,i==="CONNECT")return e.ref(),p=e.request(u,{endStream:!1,signal:l}),p.id&&!p.pending?(A.onUpgrade(null,null,p),++g.openStreams):p.once("ready",()=>{A.onUpgrade(null,null,p),++g.openStreams}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),!0;u[yye]=n,u[wye]="https";let h=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let m=Ce.bodyLength(r);if(m==null&&(m=A.contentLength),(m===0||!h)&&(m=null),ZP(i)&&m>0&&A.contentLength!=null&&A.contentLength!==m){if(t[CC])return xi(t,A,new nc),!1;process.emitWarning(new nc)}m!=null&&(re(r,"no body must not have content length"),u[bye]=`${m}`),e.ref();let f=i==="GET"||i==="HEAD";return c?(u[Nye]="100-continue",p=e.request(u,{endStream:f,signal:l}),p.once("continue",B)):(p=e.request(u,{endStream:f,signal:l}),B()),++g.openStreams,p.once("response",b=>{let{[Rye]:I,...C}=b;A.onHeaders(Number(I),C,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{A.onComplete([])}),p.on("data",b=>{A.onData(b)===!1&&p.pause()}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),p.once("error",function(b){t[Mn]&&!t[Mn].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,Ce.destroy(p,b))}),p.once("frameError",(b,I)=>{let C=new Za(`HTTP/2: "frameError" received - type ${b}, code ${I}`);xi(t,A,C),t[Mn]&&!t[Mn].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,Ce.destroy(p,C))}),!0;function B(){r?Ce.isBuffer(r)?(re(m===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),A.onBodySent(r),A.onRequestSent()):Ce.isBlobLike(r)?typeof r.stream=="function"?qI({client:t,request:A,contentLength:m,h2stream:p,expectsPayload:h,body:r.stream(),socket:t[SA],header:""}):$P({body:r,client:t,request:A,contentLength:m,expectsPayload:h,h2stream:p,header:"",socket:t[SA]}):Ce.isStream(r)?KP({body:r,client:t,request:A,contentLength:m,expectsPayload:h,socket:t[SA],h2stream:p,header:""}):Ce.isIterable(r)?qI({body:r,client:t,request:A,contentLength:m,expectsPayload:h,header:"",h2stream:p,socket:t[SA]}):re(!1):A.onRequestSent()}a(B,"writeBodyH2")}a(_ye,"writeH2");function KP({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){if(re(n!==0||A[yA]===0,"stream body cannot be pipelined"),A[$a]==="h2"){let m=function(f){r.onBodySent(f)};a(m,"onPipeData");let h=tye(e,t,f=>{f?(Ce.destroy(e,f),Ce.destroy(t,f)):r.onRequestSent()});h.on("data",m),h.once("end",()=>{h.removeListener("data",m),Ce.destroy(h)});return}let c=!1,l=new HI({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s}),d=a(function(h){if(!c)try{!l.write(h)&&this.pause&&this.pause()}catch(m){Ce.destroy(this,m)}},"onData"),u=a(function(){c||e.resume&&e.resume()},"onDrain"),p=a(function(){if(c)return;let h=new w6;queueMicrotask(()=>g(h))},"onAbort"),g=a(function(h){if(!c){if(c=!0,re(i.destroyed||i[sc]&&A[yA]<=1),i.off("drain",u).off("error",g),e.removeListener("data",d).removeListener("end",g).removeListener("error",g).removeListener("close",p),!h)try{l.end()}catch(m){h=m}l.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?Ce.destroy(e,h):Ce.destroy(e)}},"onFinished");e.on("data",d).on("end",g).on("error",g).on("close",p),e.resume&&e.resume(),i.on("drain",u).on("error",g)}a(KP,"writeStream");async function $P({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){re(n===e.size,"blob body must have content length");let c=A[$a]==="h2";try{if(n!=null&&n!==e.size)throw new nc;let l=Buffer.from(await e.arrayBuffer());c?(t.cork(),t.write(l),t.uncork()):(i.cork(),i.write(`${s}content-length: ${n}\r
|
||||
`,"latin1"),g.write(A),g.uncork(),e.onBodySent(A),e.onRequestSent(),d||(g[Si]=!0)):Ce.isBlobLike(A)?typeof A.stream=="function"?JI({body:A.stream(),client:t,request:e,socket:g,contentLength:p,header:h,expectsPayload:d}):iq({body:A,client:t,request:e,socket:g,contentLength:p,header:h,expectsPayload:d}):Ce.isStream(A)?rq({body:A,client:t,request:e,socket:g,contentLength:p,header:h,expectsPayload:d}):Ce.isIterable(A)?JI({body:A,client:t,request:e,socket:g,contentLength:p,header:h,expectsPayload:d}):re(!1),!0}a(Zye,"write");function Kye(t,e,A){let{body:r,method:i,path:n,host:s,upgrade:o,expectContinue:c,signal:l,headers:d}=A,u;if(typeof d=="string"?u=B6[Fye](d.trim()):u=d,o)return xi(t,A,new Error("Upgrade not supported for H2")),!1;try{A.onConnect(b=>{A.aborted||A.completed||xi(t,A,b||new S6)})}catch(b){xi(t,A,b)}if(A.aborted)return!1;let p,g=t[YI];if(u[Uye]=s||t[ZP],u[Tye]=i,i==="CONNECT")return e.ref(),p=e.request(u,{endStream:!1,signal:l}),p.id&&!p.pending?(A.onUpgrade(null,null,p),++g.openStreams):p.once("ready",()=>{A.onUpgrade(null,null,p),++g.openStreams}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),!0;u[Mye]=n,u[_ye]="https";let h=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let m=Ce.bodyLength(r);if(m==null&&(m=A.contentLength),(m===0||!h)&&(m=null),Aq(i)&&m>0&&A.contentLength!=null&&A.contentLength!==m){if(t[BC])return xi(t,A,new nc),!1;process.emitWarning(new nc)}m!=null&&(re(r,"no body must not have content length"),u[Oye]=`${m}`),e.ref();let f=i==="GET"||i==="HEAD";return c?(u[Pye]="100-continue",p=e.request(u,{endStream:f,signal:l}),p.once("continue",B)):(p=e.request(u,{endStream:f,signal:l}),B()),++g.openStreams,p.once("response",b=>{let{[qye]:I,...C}=b;A.onHeaders(Number(I),C,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{A.onComplete([])}),p.on("data",b=>{A.onData(b)===!1&&p.pause()}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),p.once("error",function(b){t[Mn]&&!t[Mn].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,Ce.destroy(p,b))}),p.once("frameError",(b,I)=>{let C=new Za(`HTTP/2: "frameError" received - type ${b}, code ${I}`);xi(t,A,C),t[Mn]&&!t[Mn].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,Ce.destroy(p,C))}),!0;function B(){r?Ce.isBuffer(r)?(re(m===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),A.onBodySent(r),A.onRequestSent()):Ce.isBlobLike(r)?typeof r.stream=="function"?JI({client:t,request:A,contentLength:m,h2stream:p,expectsPayload:h,body:r.stream(),socket:t[SA],header:""}):iq({body:r,client:t,request:A,contentLength:m,expectsPayload:h,h2stream:p,header:"",socket:t[SA]}):Ce.isStream(r)?rq({body:r,client:t,request:A,contentLength:m,expectsPayload:h,socket:t[SA],h2stream:p,header:""}):Ce.isIterable(r)?JI({body:r,client:t,request:A,contentLength:m,expectsPayload:h,header:"",h2stream:p,socket:t[SA]}):re(!1):A.onRequestSent()}a(B,"writeBodyH2")}a(Kye,"writeH2");function rq({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){if(re(n!==0||A[yA]===0,"stream body cannot be pipelined"),A[$a]==="h2"){let m=function(f){r.onBodySent(f)};a(m,"onPipeData");let h=hye(e,t,f=>{f?(Ce.destroy(e,f),Ce.destroy(t,f)):r.onRequestSent()});h.on("data",m),h.once("end",()=>{h.removeListener("data",m),Ce.destroy(h)});return}let c=!1,l=new VI({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s}),d=a(function(h){if(!c)try{!l.write(h)&&this.pause&&this.pause()}catch(m){Ce.destroy(this,m)}},"onData"),u=a(function(){c||e.resume&&e.resume()},"onDrain"),p=a(function(){if(c)return;let h=new S6;queueMicrotask(()=>g(h))},"onAbort"),g=a(function(h){if(!c){if(c=!0,re(i.destroyed||i[sc]&&A[yA]<=1),i.off("drain",u).off("error",g),e.removeListener("data",d).removeListener("end",g).removeListener("error",g).removeListener("close",p),!h)try{l.end()}catch(m){h=m}l.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?Ce.destroy(e,h):Ce.destroy(e)}},"onFinished");e.on("data",d).on("end",g).on("error",g).on("close",p),e.resume&&e.resume(),i.on("drain",u).on("error",g)}a(rq,"writeStream");async function iq({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){re(n===e.size,"blob body must have content length");let c=A[$a]==="h2";try{if(n!=null&&n!==e.size)throw new nc;let l=Buffer.from(await e.arrayBuffer());c?(t.cork(),t.write(l),t.uncork()):(i.cork(),i.write(`${s}content-length: ${n}\r
|
||||
\r
|
||||
`,"latin1"),i.write(l),i.uncork()),r.onBodySent(l),r.onRequestSent(),o||(i[Si]=!0),_n(A)}catch(l){Ce.destroy(c?t:i,l)}}a($P,"writeBlob");async function qI({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){re(n!==0||A[yA]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let p=c;c=null,p()}}a(l,"onDrain");let d=a(()=>new Promise((p,g)=>{re(c===null),i[Wr]?g(i[Wr]):c=p}),"waitForDrain");if(A[$a]==="h2"){t.on("close",l).on("drain",l);try{for await(let p of e){if(i[Wr])throw i[Wr];let g=t.write(p);r.onBodySent(p),g||await d()}}catch(p){t.destroy(p)}finally{r.onRequestSent(),t.end(),t.off("close",l).off("drain",l)}return}i.on("close",l).on("drain",l);let u=new HI({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s});try{for await(let p of e){if(i[Wr])throw i[Wr];u.write(p)||await d()}u.end()}catch(p){u.destroy(p)}finally{i.off("close",l).off("drain",l)}}a(qI,"writeIterable");var HI=class{static{a(this,"AsyncWriter")}constructor({socket:e,request:A,contentLength:r,client:i,expectsPayload:n,header:s}){this.socket=e,this.request=A,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=n,this.header=s,e[sc]=!0}write(e){let{socket:A,request:r,contentLength:i,client:n,bytesWritten:s,expectsPayload:o,header:c}=this;if(A[Wr])throw A[Wr];if(A.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(i!==null&&s+l>i){if(n[CC])throw new nc;process.emitWarning(new nc)}A.cork(),s===0&&(o||(A[Si]=!0),i===null?A.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"),i.write(l),i.uncork()),r.onBodySent(l),r.onRequestSent(),o||(i[Si]=!0),_n(A)}catch(l){Ce.destroy(c?t:i,l)}}a(iq,"writeBlob");async function JI({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){re(n!==0||A[yA]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let p=c;c=null,p()}}a(l,"onDrain");let d=a(()=>new Promise((p,g)=>{re(c===null),i[zr]?g(i[zr]):c=p}),"waitForDrain");if(A[$a]==="h2"){t.on("close",l).on("drain",l);try{for await(let p of e){if(i[zr])throw i[zr];let g=t.write(p);r.onBodySent(p),g||await d()}}catch(p){t.destroy(p)}finally{r.onRequestSent(),t.end(),t.off("close",l).off("drain",l)}return}i.on("close",l).on("drain",l);let u=new VI({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s});try{for await(let p of e){if(i[zr])throw i[zr];u.write(p)||await d()}u.end()}catch(p){u.destroy(p)}finally{i.off("close",l).off("drain",l)}}a(JI,"writeIterable");var VI=class{static{a(this,"AsyncWriter")}constructor({socket:e,request:A,contentLength:r,client:i,expectsPayload:n,header:s}){this.socket=e,this.request=A,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=n,this.header=s,e[sc]=!0}write(e){let{socket:A,request:r,contentLength:i,client:n,bytesWritten:s,expectsPayload:o,header:c}=this;if(A[zr])throw A[zr];if(A.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(i!==null&&s+l>i){if(n[BC])throw new nc;process.emitWarning(new nc)}A.cork(),s===0&&(o||(A[Si]=!0),i===null?A.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"):A.write(`${c}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1")),i===null&&A.write(`\r
|
||||
${l.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=l;let d=A.write(e);return A.uncork(),r.onBodySent(e),d||A[DA].timeout&&A[DA].timeoutType===Kp&&A[DA].timeout.refresh&&A[DA].timeout.refresh(),d}end(){let{socket:e,contentLength:A,client:r,bytesWritten:i,expectsPayload:n,header:s,request:o}=this;if(o.onRequestSent(),e[sc]=!1,e[Wr])throw e[Wr];if(!e.destroyed){if(i===0?n?e.write(`${s}content-length: 0\r
|
||||
`,"latin1"),this.bytesWritten+=l;let d=A.write(e);return A.uncork(),r.onBodySent(e),d||A[DA].timeout&&A[DA].timeoutType===$p&&A[DA].timeout.refresh&&A[DA].timeout.refresh(),d}end(){let{socket:e,contentLength:A,client:r,bytesWritten:i,expectsPayload:n,header:s,request:o}=this;if(o.onRequestSent(),e[sc]=!1,e[zr])throw e[zr];if(!e.destroyed){if(i===0?n?e.write(`${s}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${s}\r
|
||||
`,"latin1"):A===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),A!==null&&i!==A){if(r[CC])throw new nc;process.emitWarning(new nc)}e[DA].timeout&&e[DA].timeoutType===Kp&&e[DA].timeout.refresh&&e[DA].timeout.refresh(),_n(r)}}destroy(e){let{socket:A,client:r}=this;A[sc]=!1,e&&(re(r[yA]<=1,"pipeline should only contain this request"),Ce.destroy(A,e))}};function xi(t,e,A){try{e.onError(A),re(e.aborted)}catch(r){t.emit("error",r)}}a(xi,"errorRequest");eq.exports=f6});var Aq=E((Hpt,tq)=>{"use strict";var GI=class{static{a(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)}};tq.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new GI}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new GI),this.head.push(e)}shift(){let e=this.tail,A=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),A}}});var iq=E((Gpt,rq)=>{var{kFree:Oye,kConnected:Pye,kPending:qye,kQueued:Hye,kRunning:Yye,kSize:Gye}=Wt(),Jd=Symbol("pool"),b6=class{static{a(this,"PoolStats")}constructor(e){this[Jd]=e}get connected(){return this[Jd][Pye]}get free(){return this[Jd][Oye]}get pending(){return this[Jd][qye]}get queued(){return this[Jd][Hye]}get running(){return this[Jd][Yye]}get size(){return this[Jd][Gye]}};rq.exports=b6});var v6=E((Vpt,gq)=>{"use strict";var Jye=dC(),Vye=Aq(),{kConnected:N6,kSize:nq,kRunning:sq,kPending:aq,kQueued:BC,kBusy:Wye,kFree:zye,kUrl:jye,kClose:Xye,kDestroy:Zye,kDispatch:Kye}=Wt(),$ye=iq(),Ki=Symbol("clients"),vi=Symbol("needDrain"),IC=Symbol("queue"),R6=Symbol("closed resolve"),D6=Symbol("onDrain"),oq=Symbol("onConnect"),cq=Symbol("onDisconnect"),lq=Symbol("onConnectionError"),S6=Symbol("get dispatcher"),uq=Symbol("add client"),pq=Symbol("remove client"),dq=Symbol("stats"),x6=class extends Jye{static{a(this,"PoolBase")}constructor(){super(),this[IC]=new Vye,this[Ki]=[],this[BC]=0;let e=this;this[D6]=a(function(r,i){let n=e[IC],s=!1;for(;!s;){let o=n.shift();if(!o)break;e[BC]--,s=!this.dispatch(o.opts,o.handler)}this[vi]=s,!this[vi]&&e[vi]&&(e[vi]=!1,e.emit("drain",r,[e,...i])),e[R6]&&n.isEmpty()&&Promise.all(e[Ki].map(o=>o.close())).then(e[R6])},"onDrain"),this[oq]=(A,r)=>{e.emit("connect",A,[e,...r])},this[cq]=(A,r,i)=>{e.emit("disconnect",A,[e,...r],i)},this[lq]=(A,r,i)=>{e.emit("connectionError",A,[e,...r],i)},this[dq]=new $ye(this)}get[Wye](){return this[vi]}get[N6](){return this[Ki].filter(e=>e[N6]).length}get[zye](){return this[Ki].filter(e=>e[N6]&&!e[vi]).length}get[aq](){let e=this[BC];for(let{[aq]:A}of this[Ki])e+=A;return e}get[sq](){let e=0;for(let{[sq]:A}of this[Ki])e+=A;return e}get[nq](){let e=this[BC];for(let{[nq]:A}of this[Ki])e+=A;return e}get stats(){return this[dq]}async[Xye](){return this[IC].isEmpty()?Promise.all(this[Ki].map(e=>e.close())):new Promise(e=>{this[R6]=e})}async[Zye](e){for(;;){let A=this[IC].shift();if(!A)break;A.handler.onError(e)}return Promise.all(this[Ki].map(A=>A.destroy(e)))}[Kye](e,A){let r=this[S6]();return r?r.dispatch(e,A)||(r[vi]=!0,this[vi]=!this[S6]()):(this[vi]=!0,this[IC].push({opts:e,handler:A}),this[BC]++),!this[vi]}[uq](e){return e.on("drain",this[D6]).on("connect",this[oq]).on("disconnect",this[cq]).on("connectionError",this[lq]),this[Ki].push(e),this[vi]&&process.nextTick(()=>{this[vi]&&this[D6](e[jye],[this,e])}),this}[pq](e){e.close(()=>{let A=this[Ki].indexOf(e);A!==-1&&this[Ki].splice(A,1)}),this[vi]=this[Ki].some(A=>!A[vi]&&A.closed!==!0&&A.destroyed!==!0)}};gq.exports={PoolBase:x6,kClients:Ki,kNeedDrain:vi,kAddClient:uq,kRemoveClient:pq,kGetDispatcher:S6}});var $p=E((zpt,Cq)=>{"use strict";var{PoolBase:e2e,kClients:hq,kNeedDrain:t2e,kAddClient:A2e,kGetDispatcher:r2e}=v6(),i2e=QC(),{InvalidArgumentError:k6}=Pt(),F6=ct(),{kUrl:Eq,kInterceptors:n2e}=Wt(),s2e=uC(),L6=Symbol("options"),U6=Symbol("connections"),mq=Symbol("factory");function a2e(t,e){return new i2e(t,e)}a(a2e,"defaultFactory");var T6=class extends e2e{static{a(this,"Pool")}constructor(e,{connections:A,factory:r=a2e,connect:i,connectTimeout:n,tls:s,maxCachedSessions:o,socketPath:c,autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d,allowH2:u,...p}={}){if(super(),A!=null&&(!Number.isFinite(A)||A<0))throw new k6("invalid connections");if(typeof r!="function")throw new k6("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new k6("connect must be a function or an object");typeof i!="function"&&(i=s2e({...s,maxCachedSessions:o,allowH2:u,socketPath:c,timeout:n,...F6.nodeHasAutoSelectFamily&&l?{autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d}:void 0,...i})),this[n2e]=p.interceptors&&p.interceptors.Pool&&Array.isArray(p.interceptors.Pool)?p.interceptors.Pool:[],this[U6]=A||null,this[Eq]=F6.parseOrigin(e),this[L6]={...F6.dee
Line truncated
|
||||
`,"latin1"),A!==null&&i!==A){if(r[BC])throw new nc;process.emitWarning(new nc)}e[DA].timeout&&e[DA].timeoutType===$p&&e[DA].timeout.refresh&&e[DA].timeout.refresh(),_n(r)}}destroy(e){let{socket:A,client:r}=this;A[sc]=!1,e&&(re(r[yA]<=1,"pipeline should only contain this request"),Ce.destroy(A,e))}};function xi(t,e,A){try{e.onError(A),re(e.aborted)}catch(r){t.emit("error",r)}}a(xi,"errorRequest");nq.exports=w6});var aq=E((ngt,sq)=>{"use strict";var zI=class{static{a(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)}};sq.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new zI}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new zI),this.head.push(e)}shift(){let e=this.tail,A=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),A}}});var cq=E((agt,oq)=>{var{kFree:$ye,kConnected:e2e,kPending:t2e,kQueued:A2e,kRunning:r2e,kSize:i2e}=Wt(),Vd=Symbol("pool"),x6=class{static{a(this,"PoolStats")}constructor(e){this[Vd]=e}get connected(){return this[Vd][e2e]}get free(){return this[Vd][$ye]}get pending(){return this[Vd][t2e]}get queued(){return this[Vd][A2e]}get running(){return this[Vd][r2e]}get size(){return this[Vd][i2e]}};oq.exports=x6});var T6=E((cgt,fq)=>{"use strict";var n2e=gC(),s2e=aq(),{kConnected:v6,kSize:lq,kRunning:dq,kPending:uq,kQueued:wC,kBusy:a2e,kFree:o2e,kUrl:c2e,kClose:l2e,kDestroy:d2e,kDispatch:u2e}=Wt(),p2e=cq(),Ki=Symbol("clients"),vi=Symbol("needDrain"),bC=Symbol("queue"),k6=Symbol("closed resolve"),F6=Symbol("onDrain"),pq=Symbol("onConnect"),gq=Symbol("onDisconnect"),hq=Symbol("onConnectionError"),L6=Symbol("get dispatcher"),mq=Symbol("add client"),Cq=Symbol("remove client"),Eq=Symbol("stats"),U6=class extends n2e{static{a(this,"PoolBase")}constructor(){super(),this[bC]=new s2e,this[Ki]=[],this[wC]=0;let e=this;this[F6]=a(function(r,i){let n=e[bC],s=!1;for(;!s;){let o=n.shift();if(!o)break;e[wC]--,s=!this.dispatch(o.opts,o.handler)}this[vi]=s,!this[vi]&&e[vi]&&(e[vi]=!1,e.emit("drain",r,[e,...i])),e[k6]&&n.isEmpty()&&Promise.all(e[Ki].map(o=>o.close())).then(e[k6])},"onDrain"),this[pq]=(A,r)=>{e.emit("connect",A,[e,...r])},this[gq]=(A,r,i)=>{e.emit("disconnect",A,[e,...r],i)},this[hq]=(A,r,i)=>{e.emit("connectionError",A,[e,...r],i)},this[Eq]=new p2e(this)}get[a2e](){return this[vi]}get[v6](){return this[Ki].filter(e=>e[v6]).length}get[o2e](){return this[Ki].filter(e=>e[v6]&&!e[vi]).length}get[uq](){let e=this[wC];for(let{[uq]:A}of this[Ki])e+=A;return e}get[dq](){let e=0;for(let{[dq]:A}of this[Ki])e+=A;return e}get[lq](){let e=this[wC];for(let{[lq]:A}of this[Ki])e+=A;return e}get stats(){return this[Eq]}async[l2e](){return this[bC].isEmpty()?Promise.all(this[Ki].map(e=>e.close())):new Promise(e=>{this[k6]=e})}async[d2e](e){for(;;){let A=this[bC].shift();if(!A)break;A.handler.onError(e)}return Promise.all(this[Ki].map(A=>A.destroy(e)))}[u2e](e,A){let r=this[L6]();return r?r.dispatch(e,A)||(r[vi]=!0,this[vi]=!this[L6]()):(this[vi]=!0,this[bC].push({opts:e,handler:A}),this[wC]++),!this[vi]}[mq](e){return e.on("drain",this[F6]).on("connect",this[pq]).on("disconnect",this[gq]).on("connectionError",this[hq]),this[Ki].push(e),this[vi]&&process.nextTick(()=>{this[vi]&&this[F6](e[c2e],[this,e])}),this}[Cq](e){e.close(()=>{let A=this[Ki].indexOf(e);A!==-1&&this[Ki].splice(A,1)}),this[vi]=this[Ki].some(A=>!A[vi]&&A.closed!==!0&&A.destroyed!==!0)}};fq.exports={PoolBase:U6,kClients:Ki,kNeedDrain:vi,kAddClient:mq,kRemoveClient:Cq,kGetDispatcher:L6}});var eg=E((dgt,yq)=>{"use strict";var{PoolBase:g2e,kClients:Qq,kNeedDrain:h2e,kAddClient:E2e,kGetDispatcher:m2e}=T6(),C2e=yC(),{InvalidArgumentError:M6}=Pt(),_6=ct(),{kUrl:Bq,kInterceptors:f2e}=Wt(),Q2e=hC(),O6=Symbol("options"),P6=Symbol("connections"),Iq=Symbol("factory");function B2e(t,e){return new C2e(t,e)}a(B2e,"defaultFactory");var q6=class extends g2e{static{a(this,"Pool")}constructor(e,{connections:A,factory:r=B2e,connect:i,connectTimeout:n,tls:s,maxCachedSessions:o,socketPath:c,autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d,allowH2:u,...p}={}){if(super(),A!=null&&(!Number.isFinite(A)||A<0))throw new M6("invalid connections");if(typeof r!="function")throw new M6("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new M6("connect must be a function or an object");typeof i!="function"&&(i=Q2e({...s,maxCachedSessions:o,allowH2:u,socketPath:c,timeout:n,..._6.nodeHasAutoSelectFamily&&l?{autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d}:void 0,...i})),this[f2e]=p.interceptors&&p.interceptors.Pool&&Array.isArray(p.interceptors.Pool)?p.interceptors.Pool:[],this[P6]=A||null,this[Bq]=_6.parseOrigin(e),this[O6]={..._6.dee
Line truncated
|
||||
${r.count} ${r.noun} ${r.is} pending:
|
||||
|
||||
${e.format(A)}
|
||||
`.trim())}};XH.exports=QS});var rY=E((Ogt,AY)=>{"use strict";var{kProxy:obe,kClose:cbe,kDestroy:lbe,kInterceptors:dbe}=Wt(),{URL:KH}=require("url"),$H=wC(),ube=$p(),pbe=dC(),{InvalidArgumentError:SC,RequestAbortedError:gbe}=Pt(),eY=uC(),RC=Symbol("proxy agent"),d1=Symbol("proxy client"),DC=Symbol("proxy headers"),BS=Symbol("request tls settings"),hbe=Symbol("proxy tls settings"),tY=Symbol("connect endpoint function");function Ebe(t){return t==="https:"?443:80}a(Ebe,"defaultProtocolPort");function mbe(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new SC("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}a(mbe,"buildProxyOptions");function Cbe(t,e){return new ube(t,e)}a(Cbe,"defaultFactory");var IS=class extends pbe{static{a(this,"ProxyAgent")}constructor(e){if(super(e),this[obe]=mbe(e),this[RC]=new $H(e),this[dbe]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new SC("Proxy opts.uri is mandatory");let{clientFactory:A=Cbe}=e;if(typeof A!="function")throw new SC("Proxy opts.clientFactory must be a function.");this[BS]=e.requestTls,this[hbe]=e.proxyTls,this[DC]=e.headers||{};let r=new KH(e.uri),{origin:i,port:n,host:s,username:o,password:c}=r;if(e.auth&&e.token)throw new SC("opts.auth cannot be used in combination with opts.token");e.auth?this[DC]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[DC]["proxy-authorization"]=e.token:o&&c&&(this[DC]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(o)}:${decodeURIComponent(c)}`).toString("base64")}`);let l=eY({...e.proxyTls});this[tY]=eY({...e.requestTls}),this[d1]=A(r,{connect:l}),this[RC]=new $H({...e,connect:async(d,u)=>{let p=d.host;d.port||(p+=`:${Ebe(d.protocol)}`);try{let{socket:g,statusCode:h}=await this[d1].connect({origin:i,port:n,path:p,signal:d.signal,headers:{...this[DC],host:s}});if(h!==200&&(g.on("error",()=>{}).destroy(),u(new gbe(`Proxy response (${h}) !== 200 when HTTP Tunneling`))),d.protocol!=="https:"){u(null,g);return}let m;this[BS]?m=this[BS].servername:m=d.servername,this[tY]({...d,servername:m,httpSocket:g},u)}catch(g){u(g)}}})}dispatch(e,A){let{host:r}=new KH(e.origin),i=fbe(e.headers);return Qbe(i),this[RC].dispatch({...e,headers:{...i,host:r}},A)}async[cbe](){await this[RC].close(),await this[d1].close()}async[lbe](){await this[RC].destroy(),await this[d1].destroy()}};function fbe(t){if(Array.isArray(t)){let e={};for(let A=0;A<t.length;A+=2)e[t[A]]=t[A+1];return e}return t}a(fbe,"buildHeaders");function Qbe(t){if(t&&Object.keys(t).find(A=>A.toLowerCase()==="proxy-authorization"))throw new SC("Proxy-Authorization should be sent in ProxyAgent constructor")}a(Qbe,"throwIfProxyAuthIsSent");AY.exports=IS});var oY=E((qgt,aY)=>{var Zd=require("assert"),{kRetryHandlerDefaultRetry:iY}=Wt(),{RequestRetryError:u1}=Pt(),{isDisturbed:nY,parseHeaders:Bbe,parseRangeHeader:sY}=ct();function Ibe(t){let e=Date.now();return new Date(t).getTime()-e}a(Ibe,"calculateRetryAfterHeader");var yS=class t{static{a(this,"RetryHandler")}constructor(e,A){let{retryOptions:r,...i}=e,{retry:n,maxRetries:s,maxTimeout:o,minTimeout:c,timeoutFactor:l,methods:d,errorCodes:u,retryAfter:p,statusCodes:g}=r??{};this.dispatch=A.dispatch,this.handler=A.handler,this.opts=i,this.abort=null,this.aborted=!1,this.retryOpts={retry:n??t[iY],retryAfter:p??!0,maxTimeout:o??30*1e3,timeout:c??500,timeoutFactor:l??2,maxRetries:s??5,methods:d??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:g??[500,502,503,504,429],errorCodes:u??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(h=>{this.aborted=!0,this.abort?this.abort(h):this.reason=h})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,A,r){this.handler.onUpgrade&&this.handler.onUpgrade(e,A,r)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[iY](e,{state:A,opts:r},i){let{statusCode:n,code:s,headers:o}=e,{method:c,retryOptions:l}=r,{maxRetries:d,timeout:u,maxTimeout:p,timeoutFactor:g,statusCodes:h,errorCodes:m,methods:f}=l,{counter:B,currentTimeout:b}=A;if(b=b!=null&&b>0?b:u,s&&s!=="UND_ERR_REQ_RETRY"&&s!=="UND_ERR_SOCKET"&&!m.includes(s)){i(e);return}if(Array.isArray(f)&&!f.includes(c)){i(e);return}if(n!=null&&Array.isArray(h)&&!h.includes(n)){i(e);return}if(B>d){i(e);return}let I=o!=null&&o["retry-after"];I&&(I=Number(I),I=isNaN(I)?Ibe(I):I*1e3);let C=I>0?Math.min(I,p):Math.min(b*g**B,p);A.currentTimeout=C,setTimeout(()=>i(null),C)}onHeaders(e,A,r,i){let n=Bbe(A);if(this.retryCount+=1,e>=300)return this.abort(new u1("Request failed",e,{headers:n,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,e!==206)return!0;let o=sY(n["content-range"]);if(!o)return this.abort(new u1("
Line truncated
|
||||
`.trim())}};tY.exports=bS});var oY=E((Aht,aY)=>{"use strict";var{kProxy:Ibe,kClose:ybe,kDestroy:wbe,kInterceptors:bbe}=Wt(),{URL:rY}=require("url"),iY=RC(),Nbe=eg(),Rbe=gC(),{InvalidArgumentError:kC,RequestAbortedError:Dbe}=Pt(),nY=hC(),xC=Symbol("proxy agent"),h1=Symbol("proxy client"),vC=Symbol("proxy headers"),NS=Symbol("request tls settings"),Sbe=Symbol("proxy tls settings"),sY=Symbol("connect endpoint function");function xbe(t){return t==="https:"?443:80}a(xbe,"defaultProtocolPort");function vbe(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new kC("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}a(vbe,"buildProxyOptions");function kbe(t,e){return new Nbe(t,e)}a(kbe,"defaultFactory");var RS=class extends Rbe{static{a(this,"ProxyAgent")}constructor(e){if(super(e),this[Ibe]=vbe(e),this[xC]=new iY(e),this[bbe]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new kC("Proxy opts.uri is mandatory");let{clientFactory:A=kbe}=e;if(typeof A!="function")throw new kC("Proxy opts.clientFactory must be a function.");this[NS]=e.requestTls,this[Sbe]=e.proxyTls,this[vC]=e.headers||{};let r=new rY(e.uri),{origin:i,port:n,host:s,username:o,password:c}=r;if(e.auth&&e.token)throw new kC("opts.auth cannot be used in combination with opts.token");e.auth?this[vC]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[vC]["proxy-authorization"]=e.token:o&&c&&(this[vC]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(o)}:${decodeURIComponent(c)}`).toString("base64")}`);let l=nY({...e.proxyTls});this[sY]=nY({...e.requestTls}),this[h1]=A(r,{connect:l}),this[xC]=new iY({...e,connect:async(d,u)=>{let p=d.host;d.port||(p+=`:${xbe(d.protocol)}`);try{let{socket:g,statusCode:h}=await this[h1].connect({origin:i,port:n,path:p,signal:d.signal,headers:{...this[vC],host:s}});if(h!==200&&(g.on("error",()=>{}).destroy(),u(new Dbe(`Proxy response (${h}) !== 200 when HTTP Tunneling`))),d.protocol!=="https:"){u(null,g);return}let m;this[NS]?m=this[NS].servername:m=d.servername,this[sY]({...d,servername:m,httpSocket:g},u)}catch(g){u(g)}}})}dispatch(e,A){let{host:r}=new rY(e.origin),i=Fbe(e.headers);return Lbe(i),this[xC].dispatch({...e,headers:{...i,host:r}},A)}async[ybe](){await this[xC].close(),await this[h1].close()}async[wbe](){await this[xC].destroy(),await this[h1].destroy()}};function Fbe(t){if(Array.isArray(t)){let e={};for(let A=0;A<t.length;A+=2)e[t[A]]=t[A+1];return e}return t}a(Fbe,"buildHeaders");function Lbe(t){if(t&&Object.keys(t).find(A=>A.toLowerCase()==="proxy-authorization"))throw new kC("Proxy-Authorization should be sent in ProxyAgent constructor")}a(Lbe,"throwIfProxyAuthIsSent");aY.exports=RS});var pY=E((iht,uY)=>{var Kd=require("assert"),{kRetryHandlerDefaultRetry:cY}=Wt(),{RequestRetryError:E1}=Pt(),{isDisturbed:lY,parseHeaders:Ube,parseRangeHeader:dY}=ct();function Tbe(t){let e=Date.now();return new Date(t).getTime()-e}a(Tbe,"calculateRetryAfterHeader");var DS=class t{static{a(this,"RetryHandler")}constructor(e,A){let{retryOptions:r,...i}=e,{retry:n,maxRetries:s,maxTimeout:o,minTimeout:c,timeoutFactor:l,methods:d,errorCodes:u,retryAfter:p,statusCodes:g}=r??{};this.dispatch=A.dispatch,this.handler=A.handler,this.opts=i,this.abort=null,this.aborted=!1,this.retryOpts={retry:n??t[cY],retryAfter:p??!0,maxTimeout:o??30*1e3,timeout:c??500,timeoutFactor:l??2,maxRetries:s??5,methods:d??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:g??[500,502,503,504,429],errorCodes:u??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(h=>{this.aborted=!0,this.abort?this.abort(h):this.reason=h})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,A,r){this.handler.onUpgrade&&this.handler.onUpgrade(e,A,r)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[cY](e,{state:A,opts:r},i){let{statusCode:n,code:s,headers:o}=e,{method:c,retryOptions:l}=r,{maxRetries:d,timeout:u,maxTimeout:p,timeoutFactor:g,statusCodes:h,errorCodes:m,methods:f}=l,{counter:B,currentTimeout:b}=A;if(b=b!=null&&b>0?b:u,s&&s!=="UND_ERR_REQ_RETRY"&&s!=="UND_ERR_SOCKET"&&!m.includes(s)){i(e);return}if(Array.isArray(f)&&!f.includes(c)){i(e);return}if(n!=null&&Array.isArray(h)&&!h.includes(n)){i(e);return}if(B>d){i(e);return}let I=o!=null&&o["retry-after"];I&&(I=Number(I),I=isNaN(I)?Tbe(I):I*1e3);let C=I>0?Math.min(I,p):Math.min(b*g**B,p);A.currentTimeout=C,setTimeout(()=>i(null),C)}onHeaders(e,A,r,i){let n=Ube(A);if(this.retryCount+=1,e>=300)return this.abort(new E1("Request failed",e,{headers:n,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,e!==206)return!0;let o=dY(n["content-range"]);if(!o)return this.abort(new E1("
Line truncated
|
||||
|
||||
Error Code : ${s.statusCode}
|
||||
|
||||
Error Message: ${s.message}`)})).result)===null||A===void 0?void 0:A.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return hJ(this,void 0,void 0,function*(){try{let A=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);A=`${A}&audience=${i}`}(0,EJ.debug)(`ID token url is ${A}`);let r=yield t.getCall(A);return(0,EJ.setSecret)(r),r}catch(A){throw new Error(`Error message: ${A.message}`)}})}};bg.OidcClient=u9});var E9=E(rn=>{"use strict";var p9=rn&&rn.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(rn,"__esModule",{value:!0});rn.summary=rn.markdownSummary=rn.SUMMARY_DOCS_URL=rn.SUMMARY_ENV_VAR=void 0;var m4e=require("os"),g9=require("fs"),{access:C4e,appendFile:f4e,writeFile:Q4e}=g9.promises;rn.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";rn.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var h9=class{static{a(this,"Summary")}constructor(){this._buffer=""}filePath(){return p9(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[rn.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${rn.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield C4e(e,g9.constants.R_OK|g9.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,A,r={}){let i=Object.entries(r).map(([n,s])=>` ${n}="${s}"`).join("");return A?`<${e}${i}>${A}</${e}>`:`<${e}${i}>`}write(e){return p9(this,void 0,void 0,function*(){let A=!!e?.overwrite,r=yield this.filePath();return yield(A?Q4e:f4e)(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return p9(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,A=!1){return this._buffer+=e,A?this.addEOL():this}addEOL(){return this.addRaw(m4e.EOL)}addCodeBlock(e,A){let r=Object.assign({},A&&{lang:A}),i=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(i).addEOL()}addList(e,A=!1){let r=A?"ol":"ul",i=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(r,i);return this.addRaw(n).addEOL()}addTable(e){let A=e.map(i=>{let n=i.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:o,data:c,colspan:l,rowspan:d}=s,u=o?"th":"td",p=Object.assign(Object.assign({},l&&{colspan:l}),d&&{rowspan:d});return this.wrap(u,c,p)}).join("");return this.wrap("tr",n)}).join(""),r=this.wrap("table",A);return this.addRaw(r).addEOL()}addDetails(e,A){let r=this.wrap("details",this.wrap("summary",e)+A);return this.addRaw(r).addEOL()}addImage(e,A,r){let{width:i,height:n}=r||{},s=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n}),o=this.wrap("img",null,Object.assign({src:e,alt:A},s));return this.addRaw(o).addEOL()}addHeading(e,A){let r=`h${A}`,i=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",n=this.wrap(i,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,A){let r=Object.assign({},A&&{cite:A}),i=this.wrap("blockquote",e,r);return this.addRaw(i).addEOL()}addLink(e,A){let r=this.wrap("a",e,{href:A});return this.addRaw(r).addEOL()}},CJ=new h9;rn.markdownSummary=CJ;rn.summary=CJ});var fJ=E(nn=>{"use strict";var B4e=nn&&nn.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),I4e=nn&&nn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),y4e=nn&&nn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&B4e(e,t,A);return I4e(e,t),e};Object.defineProperty(nn,"__esModule",{value:!0});nn.toPlatformPath=nn.toWin32Path=nn.toPosixPath=void 0;var w4e=y4e(require("path"));function b4e(t){return t.replace(/[\\]/g,"/")}a(b4e,"toPosixPath");nn.toPosixPath=b4e;function N4e(t){return t.replace(/[/]/g,"\\")}a(N4e,"toWin32Path");nn.toWin32Path=N4e;function R4e(t){return t.replace(/[/\\]/g,w4e.sep)}a(R4e,"toPlatformPath");nn.toPlatformPath=R4e});var C9=E(oe=>{"use strict";var D4e=oe&&oe.__createBinding||(Object.create?functioLine truncated
|
||||
`);return{name:e,version:A}}),"getLinuxInfo");lt.platform=MJ.default.platform();lt.arch=MJ.default.arch();lt.isWindows=lt.platform==="win32";lt.isMacOS=lt.platform==="darwin";lt.isLinux=lt.platform==="linux";function s6e(){return a0(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield lt.isWindows?r6e():lt.isMacOS?i6e():n6e()),{platform:lt.platform,arch:lt.arch,isWindows:lt.isWindows,isMacOS:lt.isMacOS,isLinux:lt.isLinux})})}a(s6e,"getDetails");lt.getDetails=s6e});var hi=E(ie=>{"use strict";var a6e=ie&&ie.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),o6e=ie&&ie.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),y9=ie&&ie.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&a6e(e,t,A);return o6e(e,t),e},OJ=ie&&ie.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(ie,"__esModule",{value:!0});ie.platform=ie.toPlatformPath=ie.toWin32Path=ie.toPosixPath=ie.markdownSummary=ie.summary=ie.getIDToken=ie.getState=ie.saveState=ie.group=ie.endGroup=ie.startGroup=ie.info=ie.notice=ie.warning=ie.error=ie.debug=ie.isDebug=ie.setFailed=ie.setCommandEcho=ie.setOutput=ie.getBooleanInput=ie.getMultilineInput=ie.getInput=ie.addPath=ie.setSecret=ie.exportVariable=ie.ExitCode=void 0;var Fs=w_(),iu=R_(),Dg=dI(),PJ=y9(require("os")),c6e=y9(require("path")),l6e=mJ(),I9;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(I9||(ie.ExitCode=I9={}));function d6e(t,e){let A=(0,Dg.toCommandValue)(e);if(process.env[t]=A,process.env.GITHUB_ENV||"")return(0,iu.issueFileCommand)("ENV",(0,iu.prepareKeyValueMessage)(t,e));(0,Fs.issueCommand)("set-env",{name:t},A)}a(d6e,"exportVariable");ie.exportVariable=d6e;function u6e(t){(0,Fs.issueCommand)("add-mask",{},t)}a(u6e,"setSecret");ie.setSecret=u6e;function p6e(t){process.env.GITHUB_PATH||""?(0,iu.issueFileCommand)("PATH",t):(0,Fs.issueCommand)("add-path",{},t),process.env.PATH=`${t}${c6e.delimiter}${process.env.PATH}`}a(p6e,"addPath");ie.addPath=p6e;function w9(t,e){let A=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!A)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?A:A.trim()}a(w9,"getInput");ie.getInput=w9;function g6e(t,e){let A=w9(t,e).split(`
|
||||
`).filter(r=>r!=="");return e&&e.trimWhitespace===!1?A:A.map(r=>r.trim())}a(g6e,"getMultilineInput");ie.getMultilineInput=g6e;function h6e(t,e){let A=["true","True","TRUE"],r=["false","False","FALSE"],i=w9(t,e);if(A.includes(i))return!0;if(r.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}a(h6e,"getBooleanInput");ie.getBooleanInput=h6e;function E6e(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,iu.issueFileCommand)("OUTPUT",(0,iu.prepareKeyValueMessage)(t,e));process.stdout.write(PJ.EOL),(0,Fs.issueCommand)("set-output",{name:t},(0,Dg.toCommandValue)(e))}a(E6e,"setOutput");ie.setOutput=E6e;function m6e(t){(0,Fs.issue)("echo",t?"on":"off")}a(m6e,"setCommandEcho");ie.setCommandEcho=m6e;function C6e(t){process.exitCode=I9.Failure,qJ(t)}a(C6e,"setFailed");ie.setFailed=C6e;function f6e(){return process.env.RUNNER_DEBUG==="1"}a(f6e,"isDebug");ie.isDebug=f6e;function Q6e(t){(0,Fs.issueCommand)("debug",{},t)}a(Q6e,"debug");ie.debug=Q6e;function qJ(t,e={}){(0,Fs.issueCommand)("error",(0,Dg.toCommandProperties)(e),t instanceof Error?t.toString():t)}a(qJ,"error");ie.error=qJ;function B6e(t,e={}){(0,Fs.issueCommand)("warning",(0,Dg.toCommandProperties)(e),t instanceof Error?t.toString():t)}a(B6e,"warning");ie.warning=B6e;function I6e(t,e={}){(0,Fs.issueCommand)("notice",(0,Dg.toCommandProperties)(e),t instanceof Error?t.toString():t)}a(I6e,"notice");ie.notice=I6e;function y6e(t){process.stdout.write(t+PJ.EOL)}a(y6e,"info");ie.info=y6e;function HJ(t){(0,Fs.issue)("group",t)}a(HJ,"startGroup");ie.startGroup=HJ;function YJ(){(0,Fs.issue)("endgroup")}a(YJ,"endGroup");ie.endGroup=YJ;function w6e(t,e){return OJ(this,void 0,void 0,function*(){HJ(t);let A;try{A=yield e()}finally{YJ()}return A})}a(w6e,"group");ie.group=w6e;function b6e(t,e){if(process.env.GITHUB_STATE||"")return(0,iu.issueFileCommand)("STATE",(0,iu.prepareKeyValueMessage)(t,e));(0,Fs.issueCommand)("save-state",{name:t},(0,Dg.toCommandValue)(e))}a(b6e,"saveState");ie.saveState=b6e;function N6e(t){return process.env[`STATE_${t}`]||""}a(N6e,"getState");ie.getState=N6e;function R6e(t){return OJ(this,void 0,void 0,function*(){return yield l6e.OidcClient.getIDToken(t)})}a(R6e,"getIDToken");ie.getIDToken=R6e;var D6e=E9();Object.defineProperty(ie,"summary",{enumerable:!0,get:function(){return D6e.summary}});var S6e=E9();Object.defineProperty(ie,"markdownSummary",{enumerable:!0,get:function(){return S6e.markdownSummary}});var b9=fJ();Object.defineProperty(ie,"toPosixPath",{enumerable:!0,get:function(){return b9.toPosixPath}});Object.defineProperty(ie,"toWin32Path",{enumerable:!0,get:function(){return b9.toWin32Path}});Object.defineProperty(ie,"toPlatformPath",{enumerable:!0,get:function(){return b9.toPlatformPath}});ie.platform=y9(_J())});var o0=E(Sg=>{"use strict";Object.defineProperty(Sg,"__esModule",{value:!0});Sg.toCommandProperties=Sg.toCommandValue=void 0;function x6e(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}a(x6e,"toCommandValue");Sg.toCommandValue=x6e;function v6e(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}a(v6e,"toCommandProperties");Sg.toCommandProperties=v6e});var WJ=E(Ls=>{"use strict";var k6e=Ls&&Ls.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),F6e=Ls&&Ls.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),L6e=Ls&&Ls.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&k6e(e,t,A);return F6e(e,t),e};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.issue=Ls.issueCommand=void 0;var U6e=L6e(require("os")),JJ=o0();function VJ(t,e,A){let r=new N9(t,e,A);process.stdout.write(r.toString()+U6e.EOL)}a(VJ,"issueCommand");Ls.issueCommand=VJ;function T6e(t,e=""){VJ(t,{},e)}a(T6e,"issue");Ls.issue=T6e;var GJ="::",N9=class{static{a(this,"Command")}constructor(e,A,r){e||(e="missing.command"),this.command=e,this.properties=A,this.message=r}toString(){let e=GJ+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let A=!0;for(let r in this.properties)if(this.properties.hasOwnProperty(r)){let i=this.properties[r];i&&(A?A=!1:e+=",",e+=`${r}=${_6e(i)}`)}}return e+=`${GJ}${M6e(this.message)}`,e}};function M6e(t){return JJ.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}a(M6e,"escapeData");function _6e(t){return JJ.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}a(_6e,"escapeProperty")});function GC(){return c0>l0.length-16&&(zJ.default.randomFillSync(l0),c0=0),l0.slice(c0,c0+=16)}var zJ,l0,c0,R9=Le(()=>{zJ=Nr(require("crypto")),l0=new Uint8Array(256),c0=l0.length;a(GC,"rng")});var jJ,XJ=Le(()=>{jJ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function O6e(t){return typeof t=="string"&&jJ.test(t)}var Il,JC=Le(()=>{XJ();a(O6e,"validate");Il=O6e});fLine truncated
|
||||
Error Message: ${s.message}`)})).result)===null||A===void 0?void 0:A.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return QJ(this,void 0,void 0,function*(){try{let A=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);A=`${A}&audience=${i}`}(0,BJ.debug)(`ID token url is ${A}`);let r=yield t.getCall(A);return(0,BJ.setSecret)(r),r}catch(A){throw new Error(`Error message: ${A.message}`)}})}};Ng.OidcClient=m9});var B9=E(rn=>{"use strict";var C9=rn&&rn.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(rn,"__esModule",{value:!0});rn.summary=rn.markdownSummary=rn.SUMMARY_DOCS_URL=rn.SUMMARY_ENV_VAR=void 0;var v4e=require("os"),f9=require("fs"),{access:k4e,appendFile:F4e,writeFile:L4e}=f9.promises;rn.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";rn.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var Q9=class{static{a(this,"Summary")}constructor(){this._buffer=""}filePath(){return C9(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[rn.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${rn.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield k4e(e,f9.constants.R_OK|f9.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,A,r={}){let i=Object.entries(r).map(([n,s])=>` ${n}="${s}"`).join("");return A?`<${e}${i}>${A}</${e}>`:`<${e}${i}>`}write(e){return C9(this,void 0,void 0,function*(){let A=!!e?.overwrite,r=yield this.filePath();return yield(A?L4e:F4e)(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return C9(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,A=!1){return this._buffer+=e,A?this.addEOL():this}addEOL(){return this.addRaw(v4e.EOL)}addCodeBlock(e,A){let r=Object.assign({},A&&{lang:A}),i=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(i).addEOL()}addList(e,A=!1){let r=A?"ol":"ul",i=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(r,i);return this.addRaw(n).addEOL()}addTable(e){let A=e.map(i=>{let n=i.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:o,data:c,colspan:l,rowspan:d}=s,u=o?"th":"td",p=Object.assign(Object.assign({},l&&{colspan:l}),d&&{rowspan:d});return this.wrap(u,c,p)}).join("");return this.wrap("tr",n)}).join(""),r=this.wrap("table",A);return this.addRaw(r).addEOL()}addDetails(e,A){let r=this.wrap("details",this.wrap("summary",e)+A);return this.addRaw(r).addEOL()}addImage(e,A,r){let{width:i,height:n}=r||{},s=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n}),o=this.wrap("img",null,Object.assign({src:e,alt:A},s));return this.addRaw(o).addEOL()}addHeading(e,A){let r=`h${A}`,i=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",n=this.wrap(i,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,A){let r=Object.assign({},A&&{cite:A}),i=this.wrap("blockquote",e,r);return this.addRaw(i).addEOL()}addLink(e,A){let r=this.wrap("a",e,{href:A});return this.addRaw(r).addEOL()}},yJ=new Q9;rn.markdownSummary=yJ;rn.summary=yJ});var wJ=E(nn=>{"use strict";var U4e=nn&&nn.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),T4e=nn&&nn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),M4e=nn&&nn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&U4e(e,t,A);return T4e(e,t),e};Object.defineProperty(nn,"__esModule",{value:!0});nn.toPlatformPath=nn.toWin32Path=nn.toPosixPath=void 0;var _4e=M4e(require("path"));function O4e(t){return t.replace(/[\\]/g,"/")}a(O4e,"toPosixPath");nn.toPosixPath=O4e;function P4e(t){return t.replace(/[/]/g,"\\")}a(P4e,"toWin32Path");nn.toWin32Path=P4e;function q4e(t){return t.replace(/[/\\]/g,_4e.sep)}a(q4e,"toPlatformPath");nn.toPlatformPath=q4e});var y9=E(oe=>{"use strict";var H4e=oe&&oe.__createBinding||(Object.create?functioLine truncated
|
||||
`);return{name:e,version:A}}),"getLinuxInfo");lt.platform=HJ.default.platform();lt.arch=HJ.default.arch();lt.isWindows=lt.platform==="win32";lt.isMacOS=lt.platform==="darwin";lt.isLinux=lt.platform==="linux";function Q6e(){return d0(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield lt.isWindows?m6e():lt.isMacOS?C6e():f6e()),{platform:lt.platform,arch:lt.arch,isWindows:lt.isWindows,isMacOS:lt.isMacOS,isLinux:lt.isLinux})})}a(Q6e,"getDetails");lt.getDetails=Q6e});var hi=E(ie=>{"use strict";var B6e=ie&&ie.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),I6e=ie&&ie.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),D9=ie&&ie.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&B6e(e,t,A);return I6e(e,t),e},GJ=ie&&ie.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(ie,"__esModule",{value:!0});ie.platform=ie.toPlatformPath=ie.toWin32Path=ie.toPosixPath=ie.markdownSummary=ie.summary=ie.getIDToken=ie.getState=ie.saveState=ie.group=ie.endGroup=ie.startGroup=ie.info=ie.notice=ie.warning=ie.error=ie.debug=ie.isDebug=ie.setFailed=ie.setCommandEcho=ie.setOutput=ie.getBooleanInput=ie.getMultilineInput=ie.getInput=ie.addPath=ie.setSecret=ie.exportVariable=ie.ExitCode=void 0;var Fs=S_(),nu=k_(),Sg=hI(),JJ=D9(require("os")),y6e=D9(require("path")),w6e=IJ(),R9;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(R9||(ie.ExitCode=R9={}));function b6e(t,e){let A=(0,Sg.toCommandValue)(e);if(process.env[t]=A,process.env.GITHUB_ENV||"")return(0,nu.issueFileCommand)("ENV",(0,nu.prepareKeyValueMessage)(t,e));(0,Fs.issueCommand)("set-env",{name:t},A)}a(b6e,"exportVariable");ie.exportVariable=b6e;function N6e(t){(0,Fs.issueCommand)("add-mask",{},t)}a(N6e,"setSecret");ie.setSecret=N6e;function R6e(t){process.env.GITHUB_PATH||""?(0,nu.issueFileCommand)("PATH",t):(0,Fs.issueCommand)("add-path",{},t),process.env.PATH=`${t}${y6e.delimiter}${process.env.PATH}`}a(R6e,"addPath");ie.addPath=R6e;function S9(t,e){let A=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!A)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?A:A.trim()}a(S9,"getInput");ie.getInput=S9;function D6e(t,e){let A=S9(t,e).split(`
|
||||
`).filter(r=>r!=="");return e&&e.trimWhitespace===!1?A:A.map(r=>r.trim())}a(D6e,"getMultilineInput");ie.getMultilineInput=D6e;function S6e(t,e){let A=["true","True","TRUE"],r=["false","False","FALSE"],i=S9(t,e);if(A.includes(i))return!0;if(r.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}a(S6e,"getBooleanInput");ie.getBooleanInput=S6e;function x6e(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,nu.issueFileCommand)("OUTPUT",(0,nu.prepareKeyValueMessage)(t,e));process.stdout.write(JJ.EOL),(0,Fs.issueCommand)("set-output",{name:t},(0,Sg.toCommandValue)(e))}a(x6e,"setOutput");ie.setOutput=x6e;function v6e(t){(0,Fs.issue)("echo",t?"on":"off")}a(v6e,"setCommandEcho");ie.setCommandEcho=v6e;function k6e(t){process.exitCode=R9.Failure,VJ(t)}a(k6e,"setFailed");ie.setFailed=k6e;function F6e(){return process.env.RUNNER_DEBUG==="1"}a(F6e,"isDebug");ie.isDebug=F6e;function L6e(t){(0,Fs.issueCommand)("debug",{},t)}a(L6e,"debug");ie.debug=L6e;function VJ(t,e={}){(0,Fs.issueCommand)("error",(0,Sg.toCommandProperties)(e),t instanceof Error?t.toString():t)}a(VJ,"error");ie.error=VJ;function U6e(t,e={}){(0,Fs.issueCommand)("warning",(0,Sg.toCommandProperties)(e),t instanceof Error?t.toString():t)}a(U6e,"warning");ie.warning=U6e;function T6e(t,e={}){(0,Fs.issueCommand)("notice",(0,Sg.toCommandProperties)(e),t instanceof Error?t.toString():t)}a(T6e,"notice");ie.notice=T6e;function M6e(t){process.stdout.write(t+JJ.EOL)}a(M6e,"info");ie.info=M6e;function WJ(t){(0,Fs.issue)("group",t)}a(WJ,"startGroup");ie.startGroup=WJ;function zJ(){(0,Fs.issue)("endgroup")}a(zJ,"endGroup");ie.endGroup=zJ;function _6e(t,e){return GJ(this,void 0,void 0,function*(){WJ(t);let A;try{A=yield e()}finally{zJ()}return A})}a(_6e,"group");ie.group=_6e;function O6e(t,e){if(process.env.GITHUB_STATE||"")return(0,nu.issueFileCommand)("STATE",(0,nu.prepareKeyValueMessage)(t,e));(0,Fs.issueCommand)("save-state",{name:t},(0,Sg.toCommandValue)(e))}a(O6e,"saveState");ie.saveState=O6e;function P6e(t){return process.env[`STATE_${t}`]||""}a(P6e,"getState");ie.getState=P6e;function q6e(t){return GJ(this,void 0,void 0,function*(){return yield w6e.OidcClient.getIDToken(t)})}a(q6e,"getIDToken");ie.getIDToken=q6e;var H6e=B9();Object.defineProperty(ie,"summary",{enumerable:!0,get:function(){return H6e.summary}});var Y6e=B9();Object.defineProperty(ie,"markdownSummary",{enumerable:!0,get:function(){return Y6e.markdownSummary}});var x9=wJ();Object.defineProperty(ie,"toPosixPath",{enumerable:!0,get:function(){return x9.toPosixPath}});Object.defineProperty(ie,"toWin32Path",{enumerable:!0,get:function(){return x9.toWin32Path}});Object.defineProperty(ie,"toPlatformPath",{enumerable:!0,get:function(){return x9.toPlatformPath}});ie.platform=D9(YJ())});var u0=E(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});xg.toCommandProperties=xg.toCommandValue=void 0;function G6e(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}a(G6e,"toCommandValue");xg.toCommandValue=G6e;function J6e(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}a(J6e,"toCommandProperties");xg.toCommandProperties=J6e});var KJ=E(Ls=>{"use strict";var V6e=Ls&&Ls.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),W6e=Ls&&Ls.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),z6e=Ls&&Ls.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&V6e(e,t,A);return W6e(e,t),e};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.issue=Ls.issueCommand=void 0;var j6e=z6e(require("os")),XJ=u0();function ZJ(t,e,A){let r=new v9(t,e,A);process.stdout.write(r.toString()+j6e.EOL)}a(ZJ,"issueCommand");Ls.issueCommand=ZJ;function X6e(t,e=""){ZJ(t,{},e)}a(X6e,"issue");Ls.issue=X6e;var jJ="::",v9=class{static{a(this,"Command")}constructor(e,A,r){e||(e="missing.command"),this.command=e,this.properties=A,this.message=r}toString(){let e=jJ+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let A=!0;for(let r in this.properties)if(this.properties.hasOwnProperty(r)){let i=this.properties[r];i&&(A?A=!1:e+=",",e+=`${r}=${K6e(i)}`)}}return e+=`${jJ}${Z6e(this.message)}`,e}};function Z6e(t){return XJ.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}a(Z6e,"escapeData");function K6e(t){return XJ.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}a(K6e,"escapeProperty")});function WC(){return p0>g0.length-16&&($J.default.randomFillSync(g0),p0=0),g0.slice(p0,p0+=16)}var $J,g0,p0,k9=Le(()=>{$J=Nr(require("crypto")),g0=new Uint8Array(256),p0=g0.length;a(WC,"rng")});var eV,tV=Le(()=>{eV=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function $6e(t){return typeof t=="string"&&eV.test(t)}var Il,zC=Le(()=>{tV();a($6e,"validate");Il=$6e});fLine truncated
|
||||
\r
|
||||
`),qSe=/\r\n/g,HSe=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function kg(t){VV.call(this),t=t||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=JV(t,"maxHeaderPairs",2e3),this.maxHeaderSize=JV(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new OSe(PSe),this.ss.on("info",function(A,r,i,n){r&&!e.maxed&&(e.nread+n-i>=e.maxHeaderSize?(n=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=n-i,e.buffer+=r.toString("binary",i,n)),A&&e._finish()})}a(kg,"HeaderParser");_Se(kg,VV);kg.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};kg.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};kg.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",t)};kg.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split(qSe),e=t.length,A,r;for(var i=0;i<e;++i){if(t[i].length===0)continue;if((t[i][0]===" "||t[i][0]===" ")&&r){this.header[r][this.header[r].length-1]+=t[i];continue}let n=t[i].indexOf(":");if(n===-1||n===0)return;if(A=HSe.exec(t[i]),r=A[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(A[2]||""),++this.npairs===this.maxHeaderPairs)break}};WV.exports=kg});var ix=E((bmt,XV)=>{"use strict";var rx=require("node:stream").Writable,YSe=require("node:util").inherits,GSe=tx(),jV=YV(),JSe=zV(),VSe=45,WSe=Buffer.from("-"),zSe=Buffer.from(`\r
|
||||
`),jSe=a(function(){},"EMPTY_FN");function wa(t){if(!(this instanceof wa))return new wa(t);if(rx.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new JSe(t),this._hparser.on("header",function(A){e._inHeader=!1,e._part.emit("header",A)})}a(wa,"Dicer");YSe(wa,rx);wa.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let A=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(A+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else rx.prototype.emit.apply(this,arguments)};wa.prototype._write=function(t,e,A){if(!this._hparser&&!this._bparser)return A();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new jV(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(t);if(!this._inHeader&&r!==void 0&&r<t.length)t=t.slice(r);else return A()}this._firstWrite&&(this._bparser.push(zSe),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=A:A()};wa.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};wa.prototype.setBoundary=function(t){let e=this;this._bparser=new GSe(`\r
|
||||
--`+t),this._bparser.on("info",function(A,r,i,n){e._oninfo(A,r,i,n)})};wa.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",jSe),this._part.resume())};wa.prototype._oninfo=function(t,e,A,r){let i,n=this,s=0,o,c=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&A+s<r;)if(e[A+s]===VSe)++s,++this._dashes;else{this._dashes&&(i=WSe),this._dashes=0;break}if(this._dashes===2&&(A+s<r&&this._events.trailer&&this.emit("trailer",e.slice(A+s,r)),this.reset(),this._finished=!0,n._parts===0&&(n._realFinish=!0,n.emit("finish"),n._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new jV(this._partOpts),this._part._read=function(l){n._unpause()},this._isPreamble&&this._events.preamble?this.emit("preamble",this._part):this._isPreamble!==!0&&this._events.part?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&A<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(c=this._part.push(i)),c=this._part.push(e.slice(A,r)),c||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),o=this._hparser.push(e.slice(A,r)),!this._inHeader&&o!==void 0&&o<r&&this._oninfo(!1,e,A+o,r))),t&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:A!==r&&(++this._parts,this._part.on("end",function(){--n._parts===0&&(n._finished?(n._realFinish=!0,n.emit("finish"),n._realFinish=!1):n._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};wa.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let t=this._cb;this._cb=void 0,t()}};XV.exports=wa});var C0=E((Rmt,KV)=>{"use strict";var ZV=new TextDecoder("utf-8"),m0=new Map([["utf-8",ZV],["utf8",ZV]]);function XSe(t,e,A){if(t)if(m0.has(A))try{return m0.get(A).decode(Buffer.from(t,e))}catch{}else try{return m0.set(A,new TextDecoder(A)),m0.get(A).decode(Buffer.from(t,e))}catch{}return t}a(XSe,"decodeText");KV.exports=XSe});var nx=E((Smt,tW)=>{"use strict";var f0=C0(),$V=/%([a-fA-F0-9]{2})/g;function eW(t,e){return String.fromCharCode(parseInt(e,16))}a(eW,"encodedReplacer");function ZSe(t){let e=[],A="key",r="",i=!1,n=!1,s=0,o="";for(var c=0,l=t.length;c<l;++c){let d=t[c];if(d==="\\"&&i)if(n)n=!1;else{n=!0;continue}else if(d==='"')if(n)n=!1;else{i?(i=!1,A="key"):i=!0;continue}else if(n&&i&&(o+="\\"),n=!1,(A==="charset"||A==="lang")&&d==="'"){A==="charset"?(A="lang",r=o.substring(1)):A="value",o="";continue}else if(A==="key"&&(d==="*"||d==="=")&&e.length){d==="*"?A="charset":A="value",e[s]=[o,void 0],o="";continue}else if(!i&&d===";"){A="key",r?(o.length&&(o=f0(o.replace($V,eW),"binary",r)),r=""):o.length&&(o=f0(o,"binary","utf8")),e[s]===void 0?e[s]=o:e[s][1]=o,o="",++s;continue}else if(!i&&(d===" "||d===" "))continue;o+=d}return r&&o.length?o=f0(o.replace($V,eW),"binary",r):o&&(o=f0(o,"binary","utf8")),e[s]===void 0?o&&(e[s]=o):e[s][1]=o,e}a(ZSe,"parseParams");tW.exports=ZSe});var rW=E((vmt,AW)=>{"use strict";AW.exports=a(function(e){if(typeof e!="string")return"";for(var A=e.length-1;A>=0;--A)switch(e.charCodeAt(A)){case 47:case 92:return e=e.slice(A+1),e===".."||e==="."?"":e}return e===".."||e==="."?"":e},"basename")});var aW=E((Fmt,sW)=>{"use strict";var{Readable:nW}=require("node:stream"),{inherits:KSe}=require("node:util"),$Se=ix(),iW=nx(),e9e=C0(),t9e=rW(),su=E0(),A9e=/^boundary$/i,r9e=/^form-data$/i,i9e=/^charset$/i,n9e=/^filename$/i,s9e=/^name$/i;Q0.detect=/^multipart\/form-data/i;function Q0(t,e){let A,r,i=this,n,s=e.limits,o=e.isPartAFile||((v,x,L)=>x==="application/octet-stream"||L!==void 0),c=e.parsedConType||[],l=e.defCharset||"utf8",d=e.preservePath,u={highWaterMark:e.fileHwm};for(A=0,r=c.length;A<r;++A)if(Array.isArray(c[A])&&A9e.test(c[A][0])){n=c[A][1];break}function p(){N===0&&k&&!t._done&&(k=!1,i.end())}if(a(p,"checkFinished"),typeof n!="string")throw new Error("Multipart: Boundary not found");let g=su(s,"fieldSize",1*1024*1024),h=su(s,"fileSize",1/0),m=su(s,"files",1/0),f=su(s,"fields",1/0),B=su(s,"parts",1/0),b=su(s,"headerPairs",2e3),I=su(s,"headerSize",80*1024),C=0,Q=0,N=0,S,w,k=!1;this._needDrain=!1,this._pause=!1,this._cb=void 0,this._nparts=0,this._boy=t;let D={boundary:n,maxHeaderPairs:b,maxHeaderSize:I,partHwm:u.highWaterMark,highWaterMark:e.highWaterMark};this.parser=new $Se(D),this.parser.on("drain",function(){if(i._needDrain=!1,i._cb&&!i._pause){let v=i._cb;i._cb=void 0,v()}}).on("part",a(function v(x){if(++i._nparts>B)return i.parser.removeListener("part",v),i.parser.on("part",Fg),t.hitPartsLimit=!0,t.emit("partsLimit"),Fg(x);if(w){let L=w;L.emit("end"),L.removeAllListeners("end")}x.on("header",function(L){let q,le,_,rt,Se,vt,ht=0;if(L["content-type"]&&(_=iW(L["content-type"][0]),_[0])){for(q=_[0].toLowerCase(),A=0,r=_.length;A<r;++A)if(i9e.test(_[A][0])){rt=_[A][1].toLowerCase();break}}if(q===void 0&&(q="text/plain"),rt===void 0&&(rt=l),L["content-disposition"]){if(_=iW(L["content-disposition"][0]),!r9e.test(_[0
Line truncated
|
||||
`))}a(fW,"isValidHeaderValue");function j9e(t,e){let{headersList:A}=e,r=(A.get("referrer-policy")??"").split(","),i="";if(r.length>0)for(let n=r.length;n!==0;n--){let s=r[n-1].trim();if(T9e.includes(s)){i=s;break}}i!==""&&(t.referrerPolicy=i)}a(j9e,"setRequestReferrerPolicyOnRedirect");function X9e(){return"allowed"}a(X9e,"crossOriginResourcePolicyCheck");function Z9e(){return"success"}a(Z9e,"corsCheck");function K9e(){return"success"}a(K9e,"TAOCheck");function $9e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e)}a($9e,"appendFetchMetadata");function exe(t){let e=t.origin;if(t.responseTainting==="cors"||t.mode==="websocket")e&&t.headersList.append("origin",e);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&px(t.origin)&&!px(KC(t))&&(e=null);break;case"same-origin":I0(t,KC(t))||(e=null);break;default:}e&&t.headersList.append("origin",e)}}a(exe,"appendRequestOriginHeader");function txe(t){return _9e.now()}a(txe,"coarsenedSharedCurrentTime");function Axe(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}}a(Axe,"createOpaqueTimingInfo");function rxe(){return{referrerPolicy:"strict-origin-when-cross-origin"}}a(rxe,"makePolicyContainer");function ixe(t){return{referrerPolicy:t.referrerPolicy}}a(ixe,"clonePolicyContainer");function nxe(t){let e=t.referrerPolicy;Mg(e);let A=null;if(t.referrer==="client"){let o=M9e();if(!o||o.origin==="null")return"no-referrer";A=new URL(o)}else t.referrer instanceof URL&&(A=t.referrer);let r=dx(A),i=dx(A,!0);r.toString().length>4096&&(r=i);let n=I0(t,r),s=XC(r)&&!XC(t.url);switch(e){case"origin":return i??dx(A,!0);case"unsafe-url":return r;case"same-origin":return n?i:"no-referrer";case"origin-when-cross-origin":return n?r:i;case"strict-origin-when-cross-origin":{let o=KC(t);return I0(r,o)?r:XC(r)&&!XC(o)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return s?"no-referrer":i}}a(nxe,"determineRequestsReferrer");function dx(t,e){return Mg(t instanceof URL),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}a(dx,"stripURLForReferrer");function XC(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(A){if(A==null||A==="null")return!1;let r=new URL(A);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}a(XC,"isURLPotentiallyTrustworthy");function sxe(t,e){if(ZC===void 0)return!0;let A=oxe(e);if(A==="no metadata"||A.length===0)return!0;let r=A.sort((s,o)=>o.algo.localeCompare(s.algo)),i=r[0].algo,n=r.filter(s=>s.algo===i);for(let s of n){let o=s.algo,c=s.hash;c.endsWith("==")&&(c=c.slice(0,-2));let l=ZC.createHash(o).update(t).digest("base64");if(l.endsWith("==")&&(l=l.slice(0,-2)),l===c)return!0;let d=ZC.createHash(o).update(t).digest("base64url");if(d.endsWith("==")&&(d=d.slice(0,-2)),d===c)return!0}return!1}a(sxe,"bytesMatch");var axe=/((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function oxe(t){let e=[],A=!0,r=ZC.getHashes();for(let i of t.split(" ")){A=!1;let n=axe.exec(i);if(n===null||n.groups===void 0)continue;let s=n.groups.algo;r.includes(s.toLowerCase())&&e.push(n.groups)}return A===!0?"no metadata":e}a(oxe,"parseMetadata");function cxe(t){}a(cxe,"tryUpgradeRequestToAPotentiallyTrustworthyURL");function I0(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}a(I0,"sameOrigin");function lxe(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}a(lxe,"createDeferredPromise");function dxe(t){return t.controller.state==="aborted"}a(dxe,"isAborted");function uxe(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(uxe,"isCancelled");function pxe(t){return/^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(t)?t.toUpperCase():t}a(pxe,"normalizeMethod");function gxe(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return Mg(typeof e=="string"),e}a(gxe,"serializeJavascriptValueToJSONString");var hxe=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Exe(t,e,A){let r={index:0,kind:A,target:t},i={next(){if(Object.getPrototypeOf(this)!==i)throw new TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let{index:n,kind:s,target:o}=r,c=o(),l=c.len
Line truncated
|
||||
`||t===" "||t===" "}a(NW,"isHTTPWhiteSpace");function gx(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&NW(t[r]);r++);if(A)for(;i>0&&NW(t[i]);i--);return t.slice(r,i+1)}a(gx,"removeHTTPWhitespace");function RW(t){return t==="\r"||t===`
|
||||
`||t===" "||t==="\f"||t===" "}a(RW,"isASCIIWhitespace");function Txe(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&RW(t[r]);r++);if(A)for(;i>0&&RW(t[i]);i--);return t.slice(r,i+1)}a(Txe,"removeASCIIWhitespace");vW.exports={dataURLProcessor:kxe,URLSerializer:DW,collectASequenceOfCodePoints:b0,collectASequenceOfCodePointsFast:_g,stringPercentDecode:SW,parseMIMEType:hx,collectAnHTTPQuotedString:xW,serializeAMimeType:Uxe}});var N0=E((Zmt,TW)=>{"use strict";var{Blob:LW,File:kW}=require("buffer"),{types:Ex}=require("util"),{kState:Jn}=uc(),{isBlobLike:UW}=Ts(),{webidl:wt}=Ui(),{parseMIMEType:Mxe,serializeAMimeType:_xe}=ba(),{kEnumerableProperty:FW}=dt(),$C=class t extends LW{static{a(this,"File")}constructor(e,A,r={}){wt.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=wt.converters["sequence<BlobPart>"](e),A=wt.converters.USVString(A),r=wt.converters.FilePropertyBag(r);let i=A,n=r.type,s;e:{if(n){if(n=Mxe(n),n==="failure"){n="";break e}n=_xe(n).toLowerCase()}s=r.lastModified}super(Oxe(e,r),{type:n}),this[Jn]={name:i,lastModified:s,type:n}}get name(){return wt.brandCheck(this,t),this[Jn].name}get lastModified(){return wt.brandCheck(this,t),this[Jn].lastModified}get type(){return wt.brandCheck(this,t),this[Jn].type}},mx=class t{static{a(this,"FileLike")}constructor(e,A,r={}){let i=A,n=r.type,s=r.lastModified??Date.now();this[Jn]={blobLike:e,name:i,type:n,lastModified:s}}stream(...e){return wt.brandCheck(this,t),this[Jn].blobLike.stream(...e)}arrayBuffer(...e){return wt.brandCheck(this,t),this[Jn].blobLike.arrayBuffer(...e)}slice(...e){return wt.brandCheck(this,t),this[Jn].blobLike.slice(...e)}text(...e){return wt.brandCheck(this,t),this[Jn].blobLike.text(...e)}get size(){return wt.brandCheck(this,t),this[Jn].blobLike.size}get type(){return wt.brandCheck(this,t),this[Jn].blobLike.type}get name(){return wt.brandCheck(this,t),this[Jn].name}get lastModified(){return wt.brandCheck(this,t),this[Jn].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties($C.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:FW,lastModified:FW});wt.converters.Blob=wt.interfaceConverter(LW);wt.converters.BlobPart=function(t,e){if(wt.util.Type(t)==="Object"){if(UW(t))return wt.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||Ex.isAnyArrayBuffer(t))return wt.converters.BufferSource(t,e)}return wt.converters.USVString(t,e)};wt.converters["sequence<BlobPart>"]=wt.sequenceConverter(wt.converters.BlobPart);wt.converters.FilePropertyBag=wt.dictionaryConverter([{key:"lastModified",converter:wt.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:wt.converters.DOMString,defaultValue:""},{key:"endings",converter:t=>(t=wt.converters.DOMString(t),t=t.toLowerCase(),t!=="native"&&(t="transparent"),t),defaultValue:"transparent"}]);function Oxe(t,e){let A=[];for(let r of t)if(typeof r=="string"){let i=r;e.endings==="native"&&(i=Pxe(i)),A.push(new TextEncoder().encode(i))}else Ex.isAnyArrayBuffer(r)||Ex.isTypedArray(r)?r.buffer?A.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):A.push(new Uint8Array(r)):UW(r)&&A.push(r);return A}a(Oxe,"processBlobParts");function Pxe(t){let e=`
|
||||
`),t9e=/\r\n/g,A9e=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function Fg(t){ZV.call(this),t=t||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=XV(t,"maxHeaderPairs",2e3),this.maxHeaderSize=XV(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new $Se(e9e),this.ss.on("info",function(A,r,i,n){r&&!e.maxed&&(e.nread+n-i>=e.maxHeaderSize?(n=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=n-i,e.buffer+=r.toString("binary",i,n)),A&&e._finish()})}a(Fg,"HeaderParser");KSe(Fg,ZV);Fg.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};Fg.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};Fg.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",t)};Fg.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split(t9e),e=t.length,A,r;for(var i=0;i<e;++i){if(t[i].length===0)continue;if((t[i][0]===" "||t[i][0]===" ")&&r){this.header[r][this.header[r].length-1]+=t[i];continue}let n=t[i].indexOf(":");if(n===-1||n===0)return;if(A=A9e.exec(t[i]),r=A[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(A[2]||""),++this.npairs===this.maxHeaderPairs)break}};KV.exports=Fg});var cx=E((Hmt,tW)=>{"use strict";var ox=require("node:stream").Writable,r9e=require("node:util").inherits,i9e=sx(),eW=zV(),n9e=$V(),s9e=45,a9e=Buffer.from("-"),o9e=Buffer.from(`\r
|
||||
`),c9e=a(function(){},"EMPTY_FN");function wa(t){if(!(this instanceof wa))return new wa(t);if(ox.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new n9e(t),this._hparser.on("header",function(A){e._inHeader=!1,e._part.emit("header",A)})}a(wa,"Dicer");r9e(wa,ox);wa.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let A=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(A+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else ox.prototype.emit.apply(this,arguments)};wa.prototype._write=function(t,e,A){if(!this._hparser&&!this._bparser)return A();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new eW(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(t);if(!this._inHeader&&r!==void 0&&r<t.length)t=t.slice(r);else return A()}this._firstWrite&&(this._bparser.push(o9e),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=A:A()};wa.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};wa.prototype.setBoundary=function(t){let e=this;this._bparser=new i9e(`\r
|
||||
--`+t),this._bparser.on("info",function(A,r,i,n){e._oninfo(A,r,i,n)})};wa.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",c9e),this._part.resume())};wa.prototype._oninfo=function(t,e,A,r){let i,n=this,s=0,o,c=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&A+s<r;)if(e[A+s]===s9e)++s,++this._dashes;else{this._dashes&&(i=a9e),this._dashes=0;break}if(this._dashes===2&&(A+s<r&&this._events.trailer&&this.emit("trailer",e.slice(A+s,r)),this.reset(),this._finished=!0,n._parts===0&&(n._realFinish=!0,n.emit("finish"),n._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new eW(this._partOpts),this._part._read=function(l){n._unpause()},this._isPreamble&&this._events.preamble?this.emit("preamble",this._part):this._isPreamble!==!0&&this._events.part?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&A<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(c=this._part.push(i)),c=this._part.push(e.slice(A,r)),c||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),o=this._hparser.push(e.slice(A,r)),!this._inHeader&&o!==void 0&&o<r&&this._oninfo(!1,e,A+o,r))),t&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:A!==r&&(++this._parts,this._part.on("end",function(){--n._parts===0&&(n._finished?(n._realFinish=!0,n.emit("finish"),n._realFinish=!1):n._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};wa.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let t=this._cb;this._cb=void 0,t()}};tW.exports=wa});var I0=E((Gmt,rW)=>{"use strict";var AW=new TextDecoder("utf-8"),B0=new Map([["utf-8",AW],["utf8",AW]]);function l9e(t,e,A){if(t)if(B0.has(A))try{return B0.get(A).decode(Buffer.from(t,e))}catch{}else try{return B0.set(A,new TextDecoder(A)),B0.get(A).decode(Buffer.from(t,e))}catch{}return t}a(l9e,"decodeText");rW.exports=l9e});var lx=E((Vmt,sW)=>{"use strict";var y0=I0(),iW=/%([a-fA-F0-9]{2})/g;function nW(t,e){return String.fromCharCode(parseInt(e,16))}a(nW,"encodedReplacer");function d9e(t){let e=[],A="key",r="",i=!1,n=!1,s=0,o="";for(var c=0,l=t.length;c<l;++c){let d=t[c];if(d==="\\"&&i)if(n)n=!1;else{n=!0;continue}else if(d==='"')if(n)n=!1;else{i?(i=!1,A="key"):i=!0;continue}else if(n&&i&&(o+="\\"),n=!1,(A==="charset"||A==="lang")&&d==="'"){A==="charset"?(A="lang",r=o.substring(1)):A="value",o="";continue}else if(A==="key"&&(d==="*"||d==="=")&&e.length){d==="*"?A="charset":A="value",e[s]=[o,void 0],o="";continue}else if(!i&&d===";"){A="key",r?(o.length&&(o=y0(o.replace(iW,nW),"binary",r)),r=""):o.length&&(o=y0(o,"binary","utf8")),e[s]===void 0?e[s]=o:e[s][1]=o,o="",++s;continue}else if(!i&&(d===" "||d===" "))continue;o+=d}return r&&o.length?o=y0(o.replace(iW,nW),"binary",r):o&&(o=y0(o,"binary","utf8")),e[s]===void 0?o&&(e[s]=o):e[s][1]=o,e}a(d9e,"parseParams");sW.exports=d9e});var oW=E((zmt,aW)=>{"use strict";aW.exports=a(function(e){if(typeof e!="string")return"";for(var A=e.length-1;A>=0;--A)switch(e.charCodeAt(A)){case 47:case 92:return e=e.slice(A+1),e===".."||e==="."?"":e}return e===".."||e==="."?"":e},"basename")});var uW=E((Xmt,dW)=>{"use strict";var{Readable:lW}=require("node:stream"),{inherits:u9e}=require("node:util"),p9e=cx(),cW=lx(),g9e=I0(),h9e=oW(),au=Q0(),E9e=/^boundary$/i,m9e=/^form-data$/i,C9e=/^charset$/i,f9e=/^filename$/i,Q9e=/^name$/i;w0.detect=/^multipart\/form-data/i;function w0(t,e){let A,r,i=this,n,s=e.limits,o=e.isPartAFile||((v,x,L)=>x==="application/octet-stream"||L!==void 0),c=e.parsedConType||[],l=e.defCharset||"utf8",d=e.preservePath,u={highWaterMark:e.fileHwm};for(A=0,r=c.length;A<r;++A)if(Array.isArray(c[A])&&E9e.test(c[A][0])){n=c[A][1];break}function p(){N===0&&k&&!t._done&&(k=!1,i.end())}if(a(p,"checkFinished"),typeof n!="string")throw new Error("Multipart: Boundary not found");let g=au(s,"fieldSize",1*1024*1024),h=au(s,"fileSize",1/0),m=au(s,"files",1/0),f=au(s,"fields",1/0),B=au(s,"parts",1/0),b=au(s,"headerPairs",2e3),I=au(s,"headerSize",80*1024),C=0,Q=0,N=0,S,w,k=!1;this._needDrain=!1,this._pause=!1,this._cb=void 0,this._nparts=0,this._boy=t;let D={boundary:n,maxHeaderPairs:b,maxHeaderSize:I,partHwm:u.highWaterMark,highWaterMark:e.highWaterMark};this.parser=new p9e(D),this.parser.on("drain",function(){if(i._needDrain=!1,i._cb&&!i._pause){let v=i._cb;i._cb=void 0,v()}}).on("part",a(function v(x){if(++i._nparts>B)return i.parser.removeListener("part",v),i.parser.on("part",Lg),t.hitPartsLimit=!0,t.emit("partsLimit"),Lg(x);if(w){let L=w;L.emit("end"),L.removeAllListeners("end")}x.on("header",function(L){let q,le,_,rt,Se,vt,ht=0;if(L["content-type"]&&(_=cW(L["content-type"][0]),_[0])){for(q=_[0].toLowerCase(),A=0,r=_.length;A<r;++A)if(C9e.test(_[A][0])){rt=_[A][1].toLowerCase();break}}if(q===void 0&&(q="text/plain"),rt===void 0&&(rt=l),L["content-disposition"]){if(_=cW(L["content-disposition"][0]),!m9e.test(_[0
Line truncated
|
||||
`))}a(wW,"isValidHeaderValue");function cxe(t,e){let{headersList:A}=e,r=(A.get("referrer-policy")??"").split(","),i="";if(r.length>0)for(let n=r.length;n!==0;n--){let s=r[n-1].trim();if(X9e.includes(s)){i=s;break}}i!==""&&(t.referrerPolicy=i)}a(cxe,"setRequestReferrerPolicyOnRedirect");function lxe(){return"allowed"}a(lxe,"crossOriginResourcePolicyCheck");function dxe(){return"success"}a(dxe,"corsCheck");function uxe(){return"success"}a(uxe,"TAOCheck");function pxe(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e)}a(pxe,"appendFetchMetadata");function gxe(t){let e=t.origin;if(t.responseTainting==="cors"||t.mode==="websocket")e&&t.headersList.append("origin",e);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&Cx(t.origin)&&!Cx(tf(t))&&(e=null);break;case"same-origin":N0(t,tf(t))||(e=null);break;default:}e&&t.headersList.append("origin",e)}}a(gxe,"appendRequestOriginHeader");function hxe(t){return K9e.now()}a(hxe,"coarsenedSharedCurrentTime");function Exe(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}}a(Exe,"createOpaqueTimingInfo");function mxe(){return{referrerPolicy:"strict-origin-when-cross-origin"}}a(mxe,"makePolicyContainer");function Cxe(t){return{referrerPolicy:t.referrerPolicy}}a(Cxe,"clonePolicyContainer");function fxe(t){let e=t.referrerPolicy;_g(e);let A=null;if(t.referrer==="client"){let o=Z9e();if(!o||o.origin==="null")return"no-referrer";A=new URL(o)}else t.referrer instanceof URL&&(A=t.referrer);let r=Ex(A),i=Ex(A,!0);r.toString().length>4096&&(r=i);let n=N0(t,r),s=$C(r)&&!$C(t.url);switch(e){case"origin":return i??Ex(A,!0);case"unsafe-url":return r;case"same-origin":return n?i:"no-referrer";case"origin-when-cross-origin":return n?r:i;case"strict-origin-when-cross-origin":{let o=tf(t);return N0(r,o)?r:$C(r)&&!$C(o)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return s?"no-referrer":i}}a(fxe,"determineRequestsReferrer");function Ex(t,e){return _g(t instanceof URL),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}a(Ex,"stripURLForReferrer");function $C(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(A){if(A==null||A==="null")return!1;let r=new URL(A);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}a($C,"isURLPotentiallyTrustworthy");function Qxe(t,e){if(ef===void 0)return!0;let A=Ixe(e);if(A==="no metadata"||A.length===0)return!0;let r=A.sort((s,o)=>o.algo.localeCompare(s.algo)),i=r[0].algo,n=r.filter(s=>s.algo===i);for(let s of n){let o=s.algo,c=s.hash;c.endsWith("==")&&(c=c.slice(0,-2));let l=ef.createHash(o).update(t).digest("base64");if(l.endsWith("==")&&(l=l.slice(0,-2)),l===c)return!0;let d=ef.createHash(o).update(t).digest("base64url");if(d.endsWith("==")&&(d=d.slice(0,-2)),d===c)return!0}return!1}a(Qxe,"bytesMatch");var Bxe=/((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function Ixe(t){let e=[],A=!0,r=ef.getHashes();for(let i of t.split(" ")){A=!1;let n=Bxe.exec(i);if(n===null||n.groups===void 0)continue;let s=n.groups.algo;r.includes(s.toLowerCase())&&e.push(n.groups)}return A===!0?"no metadata":e}a(Ixe,"parseMetadata");function yxe(t){}a(yxe,"tryUpgradeRequestToAPotentiallyTrustworthyURL");function N0(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}a(N0,"sameOrigin");function wxe(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}a(wxe,"createDeferredPromise");function bxe(t){return t.controller.state==="aborted"}a(bxe,"isAborted");function Nxe(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(Nxe,"isCancelled");function Rxe(t){return/^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(t)?t.toUpperCase():t}a(Rxe,"normalizeMethod");function Dxe(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return _g(typeof e=="string"),e}a(Dxe,"serializeJavascriptValueToJSONString");var Sxe=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function xxe(t,e,A){let r={index:0,kind:A,target:t},i={next(){if(Object.getPrototypeOf(this)!==i)throw new TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let{index:n,kind:s,target:o}=r,c=o(),l=c.len
Line truncated
|
||||
`||t===" "||t===" "}a(vW,"isHTTPWhiteSpace");function fx(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&vW(t[r]);r++);if(A)for(;i>0&&vW(t[i]);i--);return t.slice(r,i+1)}a(fx,"removeHTTPWhitespace");function kW(t){return t==="\r"||t===`
|
||||
`||t===" "||t==="\f"||t===" "}a(kW,"isASCIIWhitespace");function Xxe(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&kW(t[r]);r++);if(A)for(;i>0&&kW(t[i]);i--);return t.slice(r,i+1)}a(Xxe,"removeASCIIWhitespace");TW.exports={dataURLProcessor:Vxe,URLSerializer:FW,collectASequenceOfCodePoints:S0,collectASequenceOfCodePointsFast:Og,stringPercentDecode:LW,parseMIMEType:Qx,collectAnHTTPQuotedString:UW,serializeAMimeType:jxe}});var x0=E((gCt,qW)=>{"use strict";var{Blob:OW,File:MW}=require("buffer"),{types:Bx}=require("util"),{kState:Jn}=uc(),{isBlobLike:PW}=Ts(),{webidl:wt}=Ui(),{parseMIMEType:Zxe,serializeAMimeType:Kxe}=ba(),{kEnumerableProperty:_W}=dt(),Af=class t extends OW{static{a(this,"File")}constructor(e,A,r={}){wt.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=wt.converters["sequence<BlobPart>"](e),A=wt.converters.USVString(A),r=wt.converters.FilePropertyBag(r);let i=A,n=r.type,s;e:{if(n){if(n=Zxe(n),n==="failure"){n="";break e}n=Kxe(n).toLowerCase()}s=r.lastModified}super($xe(e,r),{type:n}),this[Jn]={name:i,lastModified:s,type:n}}get name(){return wt.brandCheck(this,t),this[Jn].name}get lastModified(){return wt.brandCheck(this,t),this[Jn].lastModified}get type(){return wt.brandCheck(this,t),this[Jn].type}},Ix=class t{static{a(this,"FileLike")}constructor(e,A,r={}){let i=A,n=r.type,s=r.lastModified??Date.now();this[Jn]={blobLike:e,name:i,type:n,lastModified:s}}stream(...e){return wt.brandCheck(this,t),this[Jn].blobLike.stream(...e)}arrayBuffer(...e){return wt.brandCheck(this,t),this[Jn].blobLike.arrayBuffer(...e)}slice(...e){return wt.brandCheck(this,t),this[Jn].blobLike.slice(...e)}text(...e){return wt.brandCheck(this,t),this[Jn].blobLike.text(...e)}get size(){return wt.brandCheck(this,t),this[Jn].blobLike.size}get type(){return wt.brandCheck(this,t),this[Jn].blobLike.type}get name(){return wt.brandCheck(this,t),this[Jn].name}get lastModified(){return wt.brandCheck(this,t),this[Jn].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(Af.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:_W,lastModified:_W});wt.converters.Blob=wt.interfaceConverter(OW);wt.converters.BlobPart=function(t,e){if(wt.util.Type(t)==="Object"){if(PW(t))return wt.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||Bx.isAnyArrayBuffer(t))return wt.converters.BufferSource(t,e)}return wt.converters.USVString(t,e)};wt.converters["sequence<BlobPart>"]=wt.sequenceConverter(wt.converters.BlobPart);wt.converters.FilePropertyBag=wt.dictionaryConverter([{key:"lastModified",converter:wt.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:wt.converters.DOMString,defaultValue:""},{key:"endings",converter:t=>(t=wt.converters.DOMString(t),t=t.toLowerCase(),t!=="native"&&(t="transparent"),t),defaultValue:"transparent"}]);function $xe(t,e){let A=[];for(let r of t)if(typeof r=="string"){let i=r;e.endings==="native"&&(i=eve(i)),A.push(new TextEncoder().encode(i))}else Bx.isAnyArrayBuffer(r)||Bx.isTypedArray(r)?r.buffer?A.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):A.push(new Uint8Array(r)):PW(r)&&A.push(r);return A}a($xe,"processBlobParts");function eve(t){let e=`
|
||||
`;return process.platform==="win32"&&(e=`\r
|
||||
`),t.replace(/\r?\n/g,e)}a(Pxe,"convertLineEndingsNative");function qxe(t){return kW&&t instanceof kW||t instanceof $C||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}a(qxe,"isFileLike");TW.exports={File:$C,FileLike:mx,isFileLike:qxe}});var D0=E(($mt,qW)=>{"use strict";var{isBlobLike:R0,toUSVString:Hxe,makeIterator:Cx}=Ts(),{kState:Ei}=uc(),{File:PW,FileLike:MW,isFileLike:Yxe}=N0(),{webidl:Lt}=Ui(),{Blob:Gxe,File:fx}=require("buffer"),_W=fx??PW,Og=class t{static{a(this,"FormData")}constructor(e){if(e!==void 0)throw Lt.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[Ei]=[]}append(e,A,r=void 0){if(Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!R0(A))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=Lt.converters.USVString(e),A=R0(A)?Lt.converters.Blob(A,{strict:!1}):Lt.converters.USVString(A),r=arguments.length===3?Lt.converters.USVString(r):void 0;let i=OW(e,A,r);this[Ei].push(i)}delete(e){Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=Lt.converters.USVString(e),this[Ei]=this[Ei].filter(A=>A.name!==e)}get(e){Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=Lt.converters.USVString(e);let A=this[Ei].findIndex(r=>r.name===e);return A===-1?null:this[Ei][A].value}getAll(e){return Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=Lt.converters.USVString(e),this[Ei].filter(A=>A.name===e).map(A=>A.value)}has(e){return Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=Lt.converters.USVString(e),this[Ei].findIndex(A=>A.name===e)!==-1}set(e,A,r=void 0){if(Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!R0(A))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=Lt.converters.USVString(e),A=R0(A)?Lt.converters.Blob(A,{strict:!1}):Lt.converters.USVString(A),r=arguments.length===3?Hxe(r):void 0;let i=OW(e,A,r),n=this[Ei].findIndex(s=>s.name===e);n!==-1?this[Ei]=[...this[Ei].slice(0,n),i,...this[Ei].slice(n+1).filter(s=>s.name!==e)]:this[Ei].push(i)}entries(){return Lt.brandCheck(this,t),Cx(()=>this[Ei].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return Lt.brandCheck(this,t),Cx(()=>this[Ei].map(e=>[e.name,e.value]),"FormData","key")}values(){return Lt.brandCheck(this,t),Cx(()=>this[Ei].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,A=globalThis){if(Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(A,[i,r,this])}};Og.prototype[Symbol.iterator]=Og.prototype.entries;Object.defineProperties(Og.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function OW(t,e,A){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(Yxe(e)||(e=e instanceof Gxe?new _W([e],"blob",{type:e.type}):new MW(e,"blob",{type:e.type})),A!==void 0){let r={type:e.type,lastModified:e.lastModified};e=fx&&e instanceof fx||e instanceof PW?new _W([e],A,r):new MW(e,A,r)}return{name:t,value:e}}a(OW,"makeEntry");qW.exports={FormData:Og}});var ef=E((tCt,XW)=>{"use strict";var Jxe=gW(),Pg=dt(),{ReadableStreamFrom:Vxe,isBlobLike:HW,isReadableStreamLike:Wxe,readableStreamClose:zxe,createDeferredPromise:jxe,fullyReadBody:Xxe}=Ts(),{FormData:YW}=D0(),{kState:gc}=uc(),{webidl:Qx}=Ui(),{DOMException:VW,structuredClone:Zxe}=Nl(),{Blob:Kxe,File:$xe}=require("buffer"),{kBodyUsed:eve}=hA(),Bx=require("assert"),{isErrored:tve}=dt(),{isUint8Array:WW,isArrayBuffer:Ave}=require("util/types"),{File:rve}=N0(),{parseMIMEType:ive,serializeAMimeType:nve}=ba(),pc=globalThis.ReadableStream,GW=$xe??rve;function zW(t,e=!1){pc||(pc=require("stream/web").ReadableStream);let A=null;t instanceof pc?A=t:HW(t)?A=t.stream():A=new pc({async pull(c){c.enqueue(typeof i=="string"?new TextEncoder().encode(i):i),queueMicrotask(()=>zxe(c))},start(){},type:void 0}),Bx(Wxe(A));let r=null,i=null,n=null,s=null;if(typeof t=="string")i=t,s="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),s="application/x-www-form-urlencoded;charset=UTF-8";else if(Ave(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Pg.isFormDataLike(t)){let c=`----formdata-undici-0${`${Math.floor(Math.random()*1e11)}`.padStart(11,"0")}`,l=`--${c}\r
|
||||
`),t.replace(/\r?\n/g,e)}a(eve,"convertLineEndingsNative");function tve(t){return MW&&t instanceof MW||t instanceof Af||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}a(tve,"isFileLike");qW.exports={File:Af,FileLike:Ix,isFileLike:tve}});var k0=E((ECt,VW)=>{"use strict";var{isBlobLike:v0,toUSVString:Ave,makeIterator:yx}=Ts(),{kState:Ei}=uc(),{File:JW,FileLike:HW,isFileLike:rve}=x0(),{webidl:Lt}=Ui(),{Blob:ive,File:wx}=require("buffer"),YW=wx??JW,Pg=class t{static{a(this,"FormData")}constructor(e){if(e!==void 0)throw Lt.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[Ei]=[]}append(e,A,r=void 0){if(Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!v0(A))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=Lt.converters.USVString(e),A=v0(A)?Lt.converters.Blob(A,{strict:!1}):Lt.converters.USVString(A),r=arguments.length===3?Lt.converters.USVString(r):void 0;let i=GW(e,A,r);this[Ei].push(i)}delete(e){Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=Lt.converters.USVString(e),this[Ei]=this[Ei].filter(A=>A.name!==e)}get(e){Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=Lt.converters.USVString(e);let A=this[Ei].findIndex(r=>r.name===e);return A===-1?null:this[Ei][A].value}getAll(e){return Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=Lt.converters.USVString(e),this[Ei].filter(A=>A.name===e).map(A=>A.value)}has(e){return Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=Lt.converters.USVString(e),this[Ei].findIndex(A=>A.name===e)!==-1}set(e,A,r=void 0){if(Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!v0(A))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=Lt.converters.USVString(e),A=v0(A)?Lt.converters.Blob(A,{strict:!1}):Lt.converters.USVString(A),r=arguments.length===3?Ave(r):void 0;let i=GW(e,A,r),n=this[Ei].findIndex(s=>s.name===e);n!==-1?this[Ei]=[...this[Ei].slice(0,n),i,...this[Ei].slice(n+1).filter(s=>s.name!==e)]:this[Ei].push(i)}entries(){return Lt.brandCheck(this,t),yx(()=>this[Ei].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return Lt.brandCheck(this,t),yx(()=>this[Ei].map(e=>[e.name,e.value]),"FormData","key")}values(){return Lt.brandCheck(this,t),yx(()=>this[Ei].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,A=globalThis){if(Lt.brandCheck(this,t),Lt.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(A,[i,r,this])}};Pg.prototype[Symbol.iterator]=Pg.prototype.entries;Object.defineProperties(Pg.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function GW(t,e,A){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(rve(e)||(e=e instanceof ive?new YW([e],"blob",{type:e.type}):new HW(e,"blob",{type:e.type})),A!==void 0){let r={type:e.type,lastModified:e.lastModified};e=wx&&e instanceof wx||e instanceof JW?new YW([e],A,r):new HW(e,A,r)}return{name:t,value:e}}a(GW,"makeEntry");VW.exports={FormData:Pg}});var rf=E((CCt,tz)=>{"use strict";var nve=fW(),qg=dt(),{ReadableStreamFrom:sve,isBlobLike:WW,isReadableStreamLike:ave,readableStreamClose:ove,createDeferredPromise:cve,fullyReadBody:lve}=Ts(),{FormData:zW}=k0(),{kState:gc}=uc(),{webidl:bx}=Ui(),{DOMException:ZW,structuredClone:dve}=Nl(),{Blob:uve,File:pve}=require("buffer"),{kBodyUsed:gve}=hA(),Nx=require("assert"),{isErrored:hve}=dt(),{isUint8Array:KW,isArrayBuffer:Eve}=require("util/types"),{File:mve}=x0(),{parseMIMEType:Cve,serializeAMimeType:fve}=ba(),pc=globalThis.ReadableStream,jW=pve??mve;function $W(t,e=!1){pc||(pc=require("stream/web").ReadableStream);let A=null;t instanceof pc?A=t:WW(t)?A=t.stream():A=new pc({async pull(c){c.enqueue(typeof i=="string"?new TextEncoder().encode(i):i),queueMicrotask(()=>ove(c))},start(){},type:void 0}),Nx(ave(A));let r=null,i=null,n=null,s=null;if(typeof t=="string")i=t,s="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),s="application/x-www-form-urlencoded;charset=UTF-8";else if(Eve(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(qg.isFormDataLike(t)){let c=`----formdata-undici-0${`${Math.floor(Math.random()*1e11)}`.padStart(11,"0")}`,l=`--${c}\r
|
||||
Content-Disposition: form-data`;let d=a(B=>B.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),u=a(B=>B.replace(/\r?\n|\r/g,`\r
|
||||
`),"normalizeLinefeeds"),p=new TextEncoder,g=[],h=new Uint8Array([13,10]);n=0;let m=!1;for(let[B,b]of t)if(typeof b=="string"){let I=p.encode(l+`; name="${d(u(B))}"\r
|
||||
\r
|
||||
@@ -75,98 +75,98 @@ ${u(b)}\r
|
||||
`);g.push(I),n+=I.byteLength}else{let I=p.encode(`${l}; name="${d(u(B))}"`+(b.name?`; filename="${d(b.name)}"`:"")+`\r
|
||||
Content-Type: ${b.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);g.push(I,b,h),typeof b.size=="number"?n+=I.byteLength+b.size+h.byteLength:m=!0}let f=p.encode(`--${c}--`);g.push(f),n+=f.byteLength,m&&(n=null),i=t,r=a(async function*(){for(let B of g)B.stream?yield*B.stream():yield B},"action"),s="multipart/form-data; boundary="+c}else if(HW(t))i=t,n=t.size,t.type&&(s=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Pg.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");A=t instanceof pc?t:Vxe(t)}if((typeof i=="string"||Pg.isBuffer(i))&&(n=Buffer.byteLength(i)),r!=null){let c;A=new pc({async start(){c=r(t)[Symbol.asyncIterator]()},async pull(l){let{value:d,done:u}=await c.next();return u?queueMicrotask(()=>{l.close()}):tve(A)||l.enqueue(new Uint8Array(d)),l.desiredSize>0},async cancel(l){await c.return()},type:void 0})}return[{stream:A,source:i,length:n},s]}a(zW,"extractBody");function sve(t,e=!1){return pc||(pc=require("stream/web").ReadableStream),t instanceof pc&&(Bx(!Pg.isDisturbed(t),"The body has already been consumed."),Bx(!t.locked,"The stream is locked.")),zW(t,e)}a(sve,"safelyExtractBody");function ave(t){let[e,A]=t.stream.tee(),r=Zxe(A,{transfer:[A]}),[,i]=r.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}a(ave,"cloneBody");async function*JW(t){if(t)if(WW(t))yield t;else{let e=t.stream;if(Pg.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[eve]=!0,yield*e}}a(JW,"consumeBody");function Ix(t){if(t.aborted)throw new VW("The operation was aborted.","AbortError")}a(Ix,"throwIfAborted");function ove(t){return{blob(){return S0(this,A=>{let r=uve(this);return r==="failure"?r="":r&&(r=nve(r)),new Kxe([A],{type:r})},t)},arrayBuffer(){return S0(this,A=>new Uint8Array(A).buffer,t)},text(){return S0(this,jW,t)},json(){return S0(this,dve,t)},async formData(){Qx.brandCheck(this,t),Ix(this[gc]);let A=this.headers.get("Content-Type");if(/multipart\/form-data/.test(A)){let r={};for(let[o,c]of this.headers)r[o.toLowerCase()]=c;let i=new YW,n;try{n=new Jxe({headers:r,preservePath:!0})}catch(o){throw new VW(`${o}`,"AbortError")}n.on("field",(o,c)=>{i.append(o,c)}),n.on("file",(o,c,l,d,u)=>{let p=[];if(d==="base64"||d.toLowerCase()==="base64"){let g="";c.on("data",h=>{g+=h.toString().replace(/[\r\n]/gm,"");let m=g.length-g.length%4;p.push(Buffer.from(g.slice(0,m),"base64")),g=g.slice(m)}),c.on("end",()=>{p.push(Buffer.from(g,"base64")),i.append(o,new GW(p,l,{type:u}))})}else c.on("data",g=>{p.push(g)}),c.on("end",()=>{i.append(o,new GW(p,l,{type:u}))})});let s=new Promise((o,c)=>{n.on("finish",o),n.on("error",l=>c(new TypeError(l)))});if(this.body!==null)for await(let o of JW(this[gc].body))n.write(o);return n.end(),await s,i}else if(/application\/x-www-form-urlencoded/.test(A)){let r;try{let n="",s=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let o of JW(this[gc].body)){if(!WW(o))throw new TypeError("Expected Uint8Array chunk");n+=s.decode(o,{stream:!0})}n+=s.decode(),r=new URLSearchParams(n)}catch(n){throw Object.assign(new TypeError,{cause:n})}let i=new YW;for(let[n,s]of r)i.append(n,s);return i}else throw await Promise.resolve(),Ix(this[gc]),Qx.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}a(ove,"bodyMixinMethods");function cve(t){Object.assign(t.prototype,ove(t))}a(cve,"mixinBody");async function S0(t,e,A){if(Qx.brandCheck(t,A),Ix(t[gc]),lve(t[gc].body))throw new TypeError("Body is unusable");let r=jxe(),i=a(s=>r.reject(s),"errorSteps"),n=a(s=>{try{r.resolve(e(s))}catch(o){i(o)}},"successSteps");return t[gc].body==null?(n(new Uint8Array),r.promise):(await Xxe(t[gc].body,n,i),r.promise)}a(S0,"specConsumeBody");function lve(t){return t!=null&&(t.stream.locked||Pg.isDisturbed(t.stream))}a(lve,"bodyUnusable");function jW(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),new TextDecoder().decode(t))}a(jW,"utf8DecodeBytes");function dve(t){return JSON.parse(jW(t))}a(dve,"parseJSONFromBytes");function uve(t){let{headersList:e}=t[gc],A=e.get("content-type");return A===null?"failure":ive(A)}a(uve,"bodyMimeType");XW.exports={extractBody:zW,safelyExtractBody:sve,cloneBody:ave,mixinBody:cve}});var ez=E((rCt,$W)=>{"use strict";var{InvalidArgumentError:Zt,NotSupportedError:pve}=Xt(),hc=require("assert"),{kHTTP2BuildRequest:gve,kHTTP2CopyHeaders:hve,kHTTP1BuildRequest:Eve}=hA(),Vn=dt(),ZW=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,KW=/[^\t\x20-\x7e\x80-\xff]/,mve=/[^\u0021-\u00ff]/,Ec=Symbol("handler"),ar={},yx;try{let t=require("diagnostics_channel");ar.create=t.channel("undici:request:create"),ar.bodySent=t.channel("undici:request:bodySent"),ar.headers=t.channel("undici:request:headers"),ar.trailers=t.channel("undici:request:trailers"),ar.error=t.channel("undici:request:error")}catch{ar.create={hasSubscribers:!1},ar.bodySent={hasSubscribers:!1},ar.headers={hasSubscribers:!1},ar.trailers={hasSubscribers:!1},aLine truncated
|
||||
`);g.push(I,b,h),typeof b.size=="number"?n+=I.byteLength+b.size+h.byteLength:m=!0}let f=p.encode(`--${c}--`);g.push(f),n+=f.byteLength,m&&(n=null),i=t,r=a(async function*(){for(let B of g)B.stream?yield*B.stream():yield B},"action"),s="multipart/form-data; boundary="+c}else if(WW(t))i=t,n=t.size,t.type&&(s=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(qg.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");A=t instanceof pc?t:sve(t)}if((typeof i=="string"||qg.isBuffer(i))&&(n=Buffer.byteLength(i)),r!=null){let c;A=new pc({async start(){c=r(t)[Symbol.asyncIterator]()},async pull(l){let{value:d,done:u}=await c.next();return u?queueMicrotask(()=>{l.close()}):hve(A)||l.enqueue(new Uint8Array(d)),l.desiredSize>0},async cancel(l){await c.return()},type:void 0})}return[{stream:A,source:i,length:n},s]}a($W,"extractBody");function Qve(t,e=!1){return pc||(pc=require("stream/web").ReadableStream),t instanceof pc&&(Nx(!qg.isDisturbed(t),"The body has already been consumed."),Nx(!t.locked,"The stream is locked.")),$W(t,e)}a(Qve,"safelyExtractBody");function Bve(t){let[e,A]=t.stream.tee(),r=dve(A,{transfer:[A]}),[,i]=r.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}a(Bve,"cloneBody");async function*XW(t){if(t)if(KW(t))yield t;else{let e=t.stream;if(qg.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[gve]=!0,yield*e}}a(XW,"consumeBody");function Rx(t){if(t.aborted)throw new ZW("The operation was aborted.","AbortError")}a(Rx,"throwIfAborted");function Ive(t){return{blob(){return F0(this,A=>{let r=Nve(this);return r==="failure"?r="":r&&(r=fve(r)),new uve([A],{type:r})},t)},arrayBuffer(){return F0(this,A=>new Uint8Array(A).buffer,t)},text(){return F0(this,ez,t)},json(){return F0(this,bve,t)},async formData(){bx.brandCheck(this,t),Rx(this[gc]);let A=this.headers.get("Content-Type");if(/multipart\/form-data/.test(A)){let r={};for(let[o,c]of this.headers)r[o.toLowerCase()]=c;let i=new zW,n;try{n=new nve({headers:r,preservePath:!0})}catch(o){throw new ZW(`${o}`,"AbortError")}n.on("field",(o,c)=>{i.append(o,c)}),n.on("file",(o,c,l,d,u)=>{let p=[];if(d==="base64"||d.toLowerCase()==="base64"){let g="";c.on("data",h=>{g+=h.toString().replace(/[\r\n]/gm,"");let m=g.length-g.length%4;p.push(Buffer.from(g.slice(0,m),"base64")),g=g.slice(m)}),c.on("end",()=>{p.push(Buffer.from(g,"base64")),i.append(o,new jW(p,l,{type:u}))})}else c.on("data",g=>{p.push(g)}),c.on("end",()=>{i.append(o,new jW(p,l,{type:u}))})});let s=new Promise((o,c)=>{n.on("finish",o),n.on("error",l=>c(new TypeError(l)))});if(this.body!==null)for await(let o of XW(this[gc].body))n.write(o);return n.end(),await s,i}else if(/application\/x-www-form-urlencoded/.test(A)){let r;try{let n="",s=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let o of XW(this[gc].body)){if(!KW(o))throw new TypeError("Expected Uint8Array chunk");n+=s.decode(o,{stream:!0})}n+=s.decode(),r=new URLSearchParams(n)}catch(n){throw Object.assign(new TypeError,{cause:n})}let i=new zW;for(let[n,s]of r)i.append(n,s);return i}else throw await Promise.resolve(),Rx(this[gc]),bx.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}a(Ive,"bodyMixinMethods");function yve(t){Object.assign(t.prototype,Ive(t))}a(yve,"mixinBody");async function F0(t,e,A){if(bx.brandCheck(t,A),Rx(t[gc]),wve(t[gc].body))throw new TypeError("Body is unusable");let r=cve(),i=a(s=>r.reject(s),"errorSteps"),n=a(s=>{try{r.resolve(e(s))}catch(o){i(o)}},"successSteps");return t[gc].body==null?(n(new Uint8Array),r.promise):(await lve(t[gc].body,n,i),r.promise)}a(F0,"specConsumeBody");function wve(t){return t!=null&&(t.stream.locked||qg.isDisturbed(t.stream))}a(wve,"bodyUnusable");function ez(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),new TextDecoder().decode(t))}a(ez,"utf8DecodeBytes");function bve(t){return JSON.parse(ez(t))}a(bve,"parseJSONFromBytes");function Nve(t){let{headersList:e}=t[gc],A=e.get("content-type");return A===null?"failure":Cve(A)}a(Nve,"bodyMimeType");tz.exports={extractBody:$W,safelyExtractBody:Qve,cloneBody:Bve,mixinBody:yve}});var nz=E((QCt,iz)=>{"use strict";var{InvalidArgumentError:Zt,NotSupportedError:Rve}=Xt(),hc=require("assert"),{kHTTP2BuildRequest:Dve,kHTTP2CopyHeaders:Sve,kHTTP1BuildRequest:xve}=hA(),Vn=dt(),Az=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,rz=/[^\t\x20-\x7e\x80-\xff]/,vve=/[^\u0021-\u00ff]/,Ec=Symbol("handler"),ar={},Dx;try{let t=require("diagnostics_channel");ar.create=t.channel("undici:request:create"),ar.bodySent=t.channel("undici:request:bodySent"),ar.headers=t.channel("undici:request:headers"),ar.trailers=t.channel("undici:request:trailers"),ar.error=t.channel("undici:request:error")}catch{ar.create={hasSubscribers:!1},ar.bodySent={hasSubscribers:!1},ar.headers={hasSubscribers:!1},ar.trailers={hasSubscribers:!1},aLine truncated
|
||||
`),this.body=f.stream,this.contentLength=f.length}else Vn.isBlobLike(i)&&this.contentType==null&&i.type&&(this.contentType=i.type,this.headers+=`content-type: ${i.type}\r
|
||||
`);Vn.validateHandler(m,r,l),this.servername=Vn.getServerName(this.host),this[Ec]=m,ar.create.hasSubscribers&&ar.create.publish({request:this})}onBodySent(e){if(this[Ec].onBodySent)try{this[Ec].onBodySent(e)}catch(A){this.onError(A)}}onRequestSent(){ar.bodySent.hasSubscribers&&ar.bodySent.publish({request:this})}onConnect(e){return hc(!this.aborted),hc(!this.completed),this[Ec].onConnect(e)}onHeaders(e,A,r,i){return hc(!this.aborted),hc(!this.completed),ar.headers.hasSubscribers&&ar.headers.publish({request:this,response:{statusCode:e,headers:A,statusText:i}}),this[Ec].onHeaders(e,A,r,i)}onData(e){return hc(!this.aborted),hc(!this.completed),this[Ec].onData(e)}onUpgrade(e,A,r){return hc(!this.aborted),hc(!this.completed),this[Ec].onUpgrade(e,A,r)}onComplete(e){return hc(!this.aborted),this.completed=!0,ar.trailers.hasSubscribers&&ar.trailers.publish({request:this,trailers:e}),this[Ec].onComplete(e)}onError(e){if(ar.error.hasSubscribers&&ar.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Ec].onError(e)}addHeader(e,A){return tf(this,e,A),this}static[Eve](e,A,r){return new t(e,A,r)}static[gve](e,A,r){let i=A.headers;A={...A,headers:null};let n=new t(e,A,r);if(n.headers={},Array.isArray(i)){if(i.length%2!==0)throw new Zt("headers array must be even");for(let s=0;s<i.length;s+=2)tf(n,i[s],i[s+1],!0)}else if(i&&typeof i=="object"){let s=Object.keys(i);for(let o=0;o<s.length;o++){let c=s[o];tf(n,c,i[c],!0)}}else if(i!=null)throw new Zt("headers must be an object or an array");return n}static[hve](e){let A=e.split(`\r
|
||||
`),r={};for(let i of A){let[n,s]=i.split(": ");s==null||s.length===0||(r[n]?r[n]+=`,${s}`:r[n]=s)}return r}};function au(t,e,A){if(e&&typeof e=="object")throw new Zt(`invalid ${t} header`);if(e=e!=null?`${e}`:"",KW.exec(e)!==null)throw new Zt(`invalid ${t} header`);return A?e:`${t}: ${e}\r
|
||||
`}a(au,"processHeaderValue");function tf(t,e,A,r=!1){if(A&&typeof A=="object"&&!Array.isArray(A))throw new Zt(`invalid ${e} header`);if(A===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(KW.exec(A)!==null)throw new Zt(`invalid ${e} header`);t.host=A}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(A,10),!Number.isFinite(t.contentLength))throw new Zt("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=A,r?t.headers[e]=au(e,A,r):t.headers+=au(e,A);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new Zt("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof A=="string"?A.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new Zt("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new Zt("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new Zt("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new pve("expect header not supported");if(ZW.exec(e)===null)throw new Zt("invalid header key");if(Array.isArray(A))for(let i=0;i<A.length;i++)r?t.headers[e]?t.headers[e]+=`,${au(e,A[i],r)}`:t.headers[e]=au(e,A[i],r):t.headers+=au(e,A[i]);else r?t.headers[e]=au(e,A,r):t.headers+=au(e,A)}}}a(tf,"processHeader");$W.exports=wx});var x0=E((nCt,tz)=>{"use strict";var Cve=require("events"),bx=class extends Cve{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};tz.exports=bx});var rf=E((aCt,Az)=>{"use strict";var fve=x0(),{ClientDestroyedError:Nx,ClientClosedError:Qve,InvalidArgumentError:qg}=Xt(),{kDestroy:Bve,kClose:Ive,kDispatch:Rx,kInterceptors:ou}=hA(),Hg=Symbol("destroyed"),Af=Symbol("closed"),mc=Symbol("onDestroyed"),Yg=Symbol("onClosed"),v0=Symbol("Intercepted Dispatch"),Dx=class extends fve{static{a(this,"DispatcherBase")}constructor(){super(),this[Hg]=!1,this[mc]=null,this[Af]=!1,this[Yg]=[]}get destroyed(){return this[Hg]}get closed(){return this[Af]}get interceptors(){return this[ou]}set interceptors(e){if(e){for(let A=e.length-1;A>=0;A--)if(typeof this[ou][A]!="function")throw new qg("interceptor must be an function")}this[ou]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((n,s)=>n?i(n):r(s))});if(typeof e!="function")throw new qg("invalid callback");if(this[Hg]){queueMicrotask(()=>e(new Nx,null));return}if(this[Af]){this[Yg]?this[Yg].push(e):queueMicrotask(()=>e(null,null));return}this[Af]=!0,this[Yg].push(e);let A=a(()=>{let r=this[Yg];this[Yg]=null;for(let i=0;i<r.length;i++)r[i](null,null)},"onClosed");this[Ive]().then(()=>this.destroy()).then(()=>{queueMicrotask(A)})}destroy(e,A){if(typeof e=="function"&&(A=e,e=null),A===void 0)return new Promise((i,n)=>{this.destroy(e,(s,o)=>s?n(s):i(o))});if(typeof A!="function")throw new qg("invalid callback");if(this[Hg]){this[mc]?this[mc].push(A):queueMicrotask(()=>A(null,null));return}e||(e=new Nx),this[Hg]=!0,this[mc]=this[mc]||[],this[mc].push(A);let r=a(()=>{let i=this[mc];this[mc]=null;for(let n=0;n<i.length;n++)i[n](null,null)},"onDestroyed");this[Bve](e).then(()=>{queueMicrotask(r)})}[v0](e,A){if(!this[ou]||this[ou].length===0)return this[v0]=this[Rx],this[Rx](e,A);let r=this[Rx].bind(this);for(let i=this[ou].length-1;i>=0;i--)r=this[ou][i](r);return this[v0]=r,r(e,A)}dispatch(e,A){if(!A||typeof A!="object")throw new qg("handler must be an object");try{if(!e||typeof e!="object")throw new qg("opts must be an object.");if(this[Hg]||this[mc])throw new Nx;if(this[Af])throw new Qve;return this[v0](e,A)}catch(r){if(typeof A.onError!="function")throw new qg("invalid onError method");return A.onError(r),!1}}};Az.exports=Dx});var nf=E((dCt,nz)=>{"use strict";var yve=require("net"),rz=require("assert"),iz=dt(),{InvalidArgumentError:wve,ConnectTimeoutError:bve}=Xt(),Sx,xx;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?xx=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(A=>{if(this._sessionCache.size<this._maxCachedSessions)return;let r=this._sessionCache.get(A);r!==void 0&&r.deref()===void 0&&this._sessionCache.delete(A)})}get(e){let A=this._sessionCache.get(e);return A?A.deref():null}set(e,A){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(A)),this._sessionRegistry.register(A,e))}}:xx=class{static{a(this,"SimpleSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,A){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:r}=this._sessionCache.keys().next();this._sessionCache.delete(r)}this._sessionCache.set(e,A)}}};function Nve({allowH2:t,maxCachedSessi
Line truncated
|
||||
`,this[Iz]=c??3e5,this[Bz]=i??3e5,this[df]=b??!0,this[A3e]=C,this[uf]=N,this[Dl]=null,this[wz]=w>-1?w:-1,this[go]="h1",this[zn]=null,this[O0]=v?{openStreams:0,maxConcurrentStreams:x??100}:null,this[bz]=`${this[Zr].hostname}${this[Zr].port?`:${this[Zr].port}`:""}`,this[aA]=[],this[oA]=0,this[Wn]=0}get pipelining(){return this[xl]}set pipelining(e){this[xl]=e,jn(this,!0)}get[du](){return this[aA].length-this[Wn]}get[wA](){return this[Wn]-this[oA]}get[lu](){return this[aA].length-this[oA]}get[t3e](){return!!this[kA]&&!this[Vg]&&!this[kA].destroyed}get[_x](){let e=this[kA];return e&&(e[Ti]||e[fc]||e[zg])||this[lu]>=(this[xl]||1)||this[du]>0}[e3e](e){Sz(this),this.once("connect",e)}[n3e](e,A){let r=e.origin||this[Zr].origin,i=this[go]==="h2"?Mx[a3e](r,e,A):Mx[c3e](r,e,A);return this[aA].push(i),this[cu]||(ge.bodyLength(i.body)==null&&ge.isIterable(i.body)?(this[cu]=1,process.nextTick(jn,this)):jn(this,!0)),this[cu]&&this[Sl]!==2&&this[_x]&&(this[Sl]=2),this[Sl]<2}async[r3e](){return new Promise(e=>{this[lu]?this[Dl]=e:e(null)})}async[i3e](e){return new Promise(A=>{let r=this[aA].splice(this[Wn]);for(let n=0;n<r.length;n++){let s=r[n];$r(this,s,e)}let i=a(()=>{this[Dl]&&(this[Dl](),this[Dl]=null),A()},"callback");this[zn]!=null&&(ge.destroy(this[zn],e),this[zn]=null,this[O0]=null),this[kA]?ge.destroy(this[kA].on("close",i),e):queueMicrotask(i),jn(this)})}};function m3e(t){te(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[kA][Kr]=t,Y0(this[po],t)}a(m3e,"onHttp2SessionError");function C3e(t,e,A){let r=new uo(`HTTP/2: "frameError" received - type ${t}, code ${e}`);A===0&&(this[kA][Kr]=r,Y0(this[po],r))}a(C3e,"onHttp2FrameError");function f3e(){ge.destroy(this,new Wg("other side closed")),ge.destroy(this[kA],new Wg("other side closed"))}a(f3e,"onHttp2SessionEnd");function Q3e(t){let e=this[po],A=new uo(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[kA]=null,e[zn]=null,e.destroyed){te(this[du]===0);let r=e[aA].splice(e[oA]);for(let i=0;i<r.length;i++){let n=r[i];$r(this,n,A)}}else if(e[wA]>0){let r=e[aA][e[oA]];e[aA][e[oA]++]=null,$r(e,r,A)}e[Wn]=e[oA],te(e[wA]===0),e.emit("disconnect",e[Zr],[e],A),jn(e)}a(Q3e,"onHTTP2GoAway");var oo=az(),B3e=L0(),I3e=Buffer.alloc(0);async function y3e(){let t=process.env.JEST_WORKER_ID?Lx():void 0,e;try{e=await WebAssembly.compile(Buffer.from(gz(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||Lx(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(A,r,i)=>0,wasm_on_status:(A,r,i)=>{te.strictEqual(Er.ptr,A);let n=r-lo+co.byteOffset;return Er.onStatus(new U0(co.buffer,n,i))||0},wasm_on_message_begin:A=>(te.strictEqual(Er.ptr,A),Er.onMessageBegin()||0),wasm_on_header_field:(A,r,i)=>{te.strictEqual(Er.ptr,A);let n=r-lo+co.byteOffset;return Er.onHeaderField(new U0(co.buffer,n,i))||0},wasm_on_header_value:(A,r,i)=>{te.strictEqual(Er.ptr,A);let n=r-lo+co.byteOffset;return Er.onHeaderValue(new U0(co.buffer,n,i))||0},wasm_on_headers_complete:(A,r,i,n)=>(te.strictEqual(Er.ptr,A),Er.onHeadersComplete(r,!!i,!!n)||0),wasm_on_body:(A,r,i)=>{te.strictEqual(Er.ptr,A);let n=r-lo+co.byteOffset;return Er.onBody(new U0(co.buffer,n,i))||0},wasm_on_message_complete:A=>(te.strictEqual(Er.ptr,A),Er.onMessageComplete()||0)}})}a(y3e,"lazyllhttp");var Tx=null,qx=y3e();qx.catch();var Er=null,co=null,T0=0,lo=null,jg=1,_0=2,Hx=3,Yx=class{static{a(this,"Parser")}constructor(e,A,{exports:r}){te(Number.isFinite(e[M0])&&e[M0]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(oo.TYPE.RESPONSE),this.client=e,this.socket=A,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[M0],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[wz]}setTimeout(e,A){this.timeoutType=A,e!==this.timeoutValue?(Ux.clearTimeout(this.timeout),e?(this.timeout=Ux.setTimeout(w3e,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(te(this.ptr!=null),te(Er==null),this.llhttp.llhttp_resume(this.ptr),te(this.timeoutType===_0),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||I3e),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){te(this.ptr!=null),te(Er==null),te(!this.paused);let{socket:A,llhttp:r}=this;e.length>T0&&(lo&&r.free(lo),T0=Math.ceil(e.length/4096)*4096,lo=r.malloc(T0)),new Uint8Array(r.memory.buffer,lo,T0).set(e);try{let i;try{co=e,Er=this,i=r.llhttp_execute(this.ptr,lo,e.length)}catch(s){throw s}finally{Er=null,co=null}let n=r.llhttp_get_error_pos(this.ptr)-lo;if(i===oo.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(n));else if(i===oo.ERROR.PAUSED)this.paused=!0,A.unshift(e.slice(n));e
Line truncated
|
||||
`);Vn.validateHandler(m,r,l),this.servername=Vn.getServerName(this.host),this[Ec]=m,ar.create.hasSubscribers&&ar.create.publish({request:this})}onBodySent(e){if(this[Ec].onBodySent)try{this[Ec].onBodySent(e)}catch(A){this.onError(A)}}onRequestSent(){ar.bodySent.hasSubscribers&&ar.bodySent.publish({request:this})}onConnect(e){return hc(!this.aborted),hc(!this.completed),this[Ec].onConnect(e)}onHeaders(e,A,r,i){return hc(!this.aborted),hc(!this.completed),ar.headers.hasSubscribers&&ar.headers.publish({request:this,response:{statusCode:e,headers:A,statusText:i}}),this[Ec].onHeaders(e,A,r,i)}onData(e){return hc(!this.aborted),hc(!this.completed),this[Ec].onData(e)}onUpgrade(e,A,r){return hc(!this.aborted),hc(!this.completed),this[Ec].onUpgrade(e,A,r)}onComplete(e){return hc(!this.aborted),this.completed=!0,ar.trailers.hasSubscribers&&ar.trailers.publish({request:this,trailers:e}),this[Ec].onComplete(e)}onError(e){if(ar.error.hasSubscribers&&ar.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Ec].onError(e)}addHeader(e,A){return nf(this,e,A),this}static[xve](e,A,r){return new t(e,A,r)}static[Dve](e,A,r){let i=A.headers;A={...A,headers:null};let n=new t(e,A,r);if(n.headers={},Array.isArray(i)){if(i.length%2!==0)throw new Zt("headers array must be even");for(let s=0;s<i.length;s+=2)nf(n,i[s],i[s+1],!0)}else if(i&&typeof i=="object"){let s=Object.keys(i);for(let o=0;o<s.length;o++){let c=s[o];nf(n,c,i[c],!0)}}else if(i!=null)throw new Zt("headers must be an object or an array");return n}static[Sve](e){let A=e.split(`\r
|
||||
`),r={};for(let i of A){let[n,s]=i.split(": ");s==null||s.length===0||(r[n]?r[n]+=`,${s}`:r[n]=s)}return r}};function ou(t,e,A){if(e&&typeof e=="object")throw new Zt(`invalid ${t} header`);if(e=e!=null?`${e}`:"",rz.exec(e)!==null)throw new Zt(`invalid ${t} header`);return A?e:`${t}: ${e}\r
|
||||
`}a(ou,"processHeaderValue");function nf(t,e,A,r=!1){if(A&&typeof A=="object"&&!Array.isArray(A))throw new Zt(`invalid ${e} header`);if(A===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(rz.exec(A)!==null)throw new Zt(`invalid ${e} header`);t.host=A}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(A,10),!Number.isFinite(t.contentLength))throw new Zt("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=A,r?t.headers[e]=ou(e,A,r):t.headers+=ou(e,A);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new Zt("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof A=="string"?A.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new Zt("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new Zt("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new Zt("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new Rve("expect header not supported");if(Az.exec(e)===null)throw new Zt("invalid header key");if(Array.isArray(A))for(let i=0;i<A.length;i++)r?t.headers[e]?t.headers[e]+=`,${ou(e,A[i],r)}`:t.headers[e]=ou(e,A[i],r):t.headers+=ou(e,A[i]);else r?t.headers[e]=ou(e,A,r):t.headers+=ou(e,A)}}}a(nf,"processHeader");iz.exports=Sx});var L0=E((ICt,sz)=>{"use strict";var kve=require("events"),xx=class extends kve{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};sz.exports=xx});var af=E((wCt,az)=>{"use strict";var Fve=L0(),{ClientDestroyedError:vx,ClientClosedError:Lve,InvalidArgumentError:Hg}=Xt(),{kDestroy:Uve,kClose:Tve,kDispatch:kx,kInterceptors:cu}=hA(),Yg=Symbol("destroyed"),sf=Symbol("closed"),mc=Symbol("onDestroyed"),Gg=Symbol("onClosed"),U0=Symbol("Intercepted Dispatch"),Fx=class extends Fve{static{a(this,"DispatcherBase")}constructor(){super(),this[Yg]=!1,this[mc]=null,this[sf]=!1,this[Gg]=[]}get destroyed(){return this[Yg]}get closed(){return this[sf]}get interceptors(){return this[cu]}set interceptors(e){if(e){for(let A=e.length-1;A>=0;A--)if(typeof this[cu][A]!="function")throw new Hg("interceptor must be an function")}this[cu]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((n,s)=>n?i(n):r(s))});if(typeof e!="function")throw new Hg("invalid callback");if(this[Yg]){queueMicrotask(()=>e(new vx,null));return}if(this[sf]){this[Gg]?this[Gg].push(e):queueMicrotask(()=>e(null,null));return}this[sf]=!0,this[Gg].push(e);let A=a(()=>{let r=this[Gg];this[Gg]=null;for(let i=0;i<r.length;i++)r[i](null,null)},"onClosed");this[Tve]().then(()=>this.destroy()).then(()=>{queueMicrotask(A)})}destroy(e,A){if(typeof e=="function"&&(A=e,e=null),A===void 0)return new Promise((i,n)=>{this.destroy(e,(s,o)=>s?n(s):i(o))});if(typeof A!="function")throw new Hg("invalid callback");if(this[Yg]){this[mc]?this[mc].push(A):queueMicrotask(()=>A(null,null));return}e||(e=new vx),this[Yg]=!0,this[mc]=this[mc]||[],this[mc].push(A);let r=a(()=>{let i=this[mc];this[mc]=null;for(let n=0;n<i.length;n++)i[n](null,null)},"onDestroyed");this[Uve](e).then(()=>{queueMicrotask(r)})}[U0](e,A){if(!this[cu]||this[cu].length===0)return this[U0]=this[kx],this[kx](e,A);let r=this[kx].bind(this);for(let i=this[cu].length-1;i>=0;i--)r=this[cu][i](r);return this[U0]=r,r(e,A)}dispatch(e,A){if(!A||typeof A!="object")throw new Hg("handler must be an object");try{if(!e||typeof e!="object")throw new Hg("opts must be an object.");if(this[Yg]||this[mc])throw new vx;if(this[sf])throw new Lve;return this[U0](e,A)}catch(r){if(typeof A.onError!="function")throw new Hg("invalid onError method");return A.onError(r),!1}}};az.exports=Fx});var of=E((DCt,lz)=>{"use strict";var Mve=require("net"),oz=require("assert"),cz=dt(),{InvalidArgumentError:_ve,ConnectTimeoutError:Ove}=Xt(),Lx,Ux;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?Ux=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(A=>{if(this._sessionCache.size<this._maxCachedSessions)return;let r=this._sessionCache.get(A);r!==void 0&&r.deref()===void 0&&this._sessionCache.delete(A)})}get(e){let A=this._sessionCache.get(e);return A?A.deref():null}set(e,A){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(A)),this._sessionRegistry.register(A,e))}}:Ux=class{static{a(this,"SimpleSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,A){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:r}=this._sessionCache.keys().next();this._sessionCache.delete(r)}this._sessionCache.set(e,A)}}};function Pve({allowH2:t,maxCachedSessi
Line truncated
|
||||
`,this[Rz]=c??3e5,this[Nz]=i??3e5,this[gf]=b??!0,this[E3e]=C,this[hf]=N,this[Dl]=null,this[Sz]=w>-1?w:-1,this[go]="h1",this[zn]=null,this[Y0]=v?{openStreams:0,maxConcurrentStreams:x??100}:null,this[xz]=`${this[Kr].hostname}${this[Kr].port?`:${this[Kr].port}`:""}`,this[aA]=[],this[oA]=0,this[Wn]=0}get pipelining(){return this[xl]}set pipelining(e){this[xl]=e,jn(this,!0)}get[uu](){return this[aA].length-this[Wn]}get[wA](){return this[Wn]-this[oA]}get[du](){return this[aA].length-this[oA]}get[h3e](){return!!this[kA]&&!this[Wg]&&!this[kA].destroyed}get[Yx](){let e=this[kA];return e&&(e[Ti]||e[fc]||e[jg])||this[du]>=(this[xl]||1)||this[uu]>0}[g3e](e){Lz(this),this.once("connect",e)}[f3e](e,A){let r=e.origin||this[Kr].origin,i=this[go]==="h2"?Hx[B3e](r,e,A):Hx[y3e](r,e,A);return this[aA].push(i),this[lu]||(ge.bodyLength(i.body)==null&&ge.isIterable(i.body)?(this[lu]=1,process.nextTick(jn,this)):jn(this,!0)),this[lu]&&this[Sl]!==2&&this[Yx]&&(this[Sl]=2),this[Sl]<2}async[m3e](){return new Promise(e=>{this[du]?this[Dl]=e:e(null)})}async[C3e](e){return new Promise(A=>{let r=this[aA].splice(this[Wn]);for(let n=0;n<r.length;n++){let s=r[n];ei(this,s,e)}let i=a(()=>{this[Dl]&&(this[Dl](),this[Dl]=null),A()},"callback");this[zn]!=null&&(ge.destroy(this[zn],e),this[zn]=null,this[Y0]=null),this[kA]?ge.destroy(this[kA].on("close",i),e):queueMicrotask(i),jn(this)})}};function v3e(t){te(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[kA][$r]=t,W0(this[po],t)}a(v3e,"onHttp2SessionError");function k3e(t,e,A){let r=new uo(`HTTP/2: "frameError" received - type ${t}, code ${e}`);A===0&&(this[kA][$r]=r,W0(this[po],r))}a(k3e,"onHttp2FrameError");function F3e(){ge.destroy(this,new zg("other side closed")),ge.destroy(this[kA],new zg("other side closed"))}a(F3e,"onHttp2SessionEnd");function L3e(t){let e=this[po],A=new uo(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[kA]=null,e[zn]=null,e.destroyed){te(this[uu]===0);let r=e[aA].splice(e[oA]);for(let i=0;i<r.length;i++){let n=r[i];ei(this,n,A)}}else if(e[wA]>0){let r=e[aA][e[oA]];e[aA][e[oA]++]=null,ei(e,r,A)}e[Wn]=e[oA],te(e[wA]===0),e.emit("disconnect",e[Kr],[e],A),jn(e)}a(L3e,"onHTTP2GoAway");var oo=uz(),U3e=_0(),T3e=Buffer.alloc(0);async function M3e(){let t=process.env.JEST_WORKER_ID?Ox():void 0,e;try{e=await WebAssembly.compile(Buffer.from(fz(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||Ox(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(A,r,i)=>0,wasm_on_status:(A,r,i)=>{te.strictEqual(Er.ptr,A);let n=r-lo+co.byteOffset;return Er.onStatus(new O0(co.buffer,n,i))||0},wasm_on_message_begin:A=>(te.strictEqual(Er.ptr,A),Er.onMessageBegin()||0),wasm_on_header_field:(A,r,i)=>{te.strictEqual(Er.ptr,A);let n=r-lo+co.byteOffset;return Er.onHeaderField(new O0(co.buffer,n,i))||0},wasm_on_header_value:(A,r,i)=>{te.strictEqual(Er.ptr,A);let n=r-lo+co.byteOffset;return Er.onHeaderValue(new O0(co.buffer,n,i))||0},wasm_on_headers_complete:(A,r,i,n)=>(te.strictEqual(Er.ptr,A),Er.onHeadersComplete(r,!!i,!!n)||0),wasm_on_body:(A,r,i)=>{te.strictEqual(Er.ptr,A);let n=r-lo+co.byteOffset;return Er.onBody(new O0(co.buffer,n,i))||0},wasm_on_message_complete:A=>(te.strictEqual(Er.ptr,A),Er.onMessageComplete()||0)}})}a(M3e,"lazyllhttp");var qx=null,Vx=M3e();Vx.catch();var Er=null,co=null,P0=0,lo=null,Xg=1,H0=2,Wx=3,zx=class{static{a(this,"Parser")}constructor(e,A,{exports:r}){te(Number.isFinite(e[q0])&&e[q0]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(oo.TYPE.RESPONSE),this.client=e,this.socket=A,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[q0],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[Sz]}setTimeout(e,A){this.timeoutType=A,e!==this.timeoutValue?(Px.clearTimeout(this.timeout),e?(this.timeout=Px.setTimeout(_3e,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(te(this.ptr!=null),te(Er==null),this.llhttp.llhttp_resume(this.ptr),te(this.timeoutType===H0),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||T3e),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){te(this.ptr!=null),te(Er==null),te(!this.paused);let{socket:A,llhttp:r}=this;e.length>P0&&(lo&&r.free(lo),P0=Math.ceil(e.length/4096)*4096,lo=r.malloc(P0)),new Uint8Array(r.memory.buffer,lo,P0).set(e);try{let i;try{co=e,Er=this,i=r.llhttp_execute(this.ptr,lo,e.length)}catch(s){throw s}finally{Er=null,co=null}let n=r.llhttp_get_error_pos(this.ptr)-lo;if(i===oo.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(n));else if(i===oo.ERROR.PAUSED)this.paused=!0,A.unshift(e.slice(n));e
Line truncated
|
||||
`;return typeof n=="string"?g+=`host: ${n}\r
|
||||
`:g+=t[Cz],s?g+=`connection: upgrade\r
|
||||
`:g+=t[yz],s?g+=`connection: upgrade\r
|
||||
upgrade: ${s}\r
|
||||
`:t[xl]&&!p[Ti]?g+=`connection: keep-alive\r
|
||||
`:g+=`connection: close\r
|
||||
`,o&&(g+=o),mi.sendHeaders.hasSubscribers&&mi.sendHeaders.publish({request:e,headers:g,socket:p}),A?ge.isBuffer(A)?(te(u===A.byteLength,"buffer body must have content length"),p.cork(),p.write(`${g}content-length: ${u}\r
|
||||
\r
|
||||
`,"latin1"),p.write(A),p.uncork(),e.onBodySent(A),e.onRequestSent(),d||(p[Ti]=!0)):ge.isBlobLike(A)?typeof A.stream=="function"?q0({body:A.stream(),client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):vz({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):ge.isStream(A)?xz({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):ge.isIterable(A)?q0({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):te(!1):(u===0?p.write(`${g}content-length: 0\r
|
||||
`,"latin1"),p.write(A),p.uncork(),e.onBodySent(A),e.onRequestSent(),d||(p[Ti]=!0)):ge.isBlobLike(A)?typeof A.stream=="function"?J0({body:A.stream(),client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):Tz({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):ge.isStream(A)?Uz({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):ge.isIterable(A)?J0({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):te(!1):(u===0?p.write(`${g}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(te(u===null,"no body must not have content length"),p.write(`${g}\r
|
||||
`,"latin1")),e.onRequestSent()),!0}a(N3e,"write");function R3e(t,e,A){let{body:r,method:i,path:n,host:s,upgrade:o,expectContinue:c,signal:l,headers:d}=A,u;if(typeof d=="string"?u=Mx[o3e](d.trim()):u=d,o)return $r(t,A,new Error("Upgrade not supported for H2")),!1;try{A.onConnect(b=>{A.aborted||A.completed||$r(t,A,b||new Jx)})}catch(b){$r(t,A,b)}if(A.aborted)return!1;let p,g=t[O0];if(u[l3e]=s||t[bz],u[d3e]=i,i==="CONNECT")return e.ref(),p=e.request(u,{endStream:!1,signal:l}),p.id&&!p.pending?(A.onUpgrade(null,null,p),++g.openStreams):p.once("ready",()=>{A.onUpgrade(null,null,p),++g.openStreams}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),!0;u[u3e]=n,u[p3e]="https";let h=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let m=ge.bodyLength(r);if(m==null&&(m=A.contentLength),(m===0||!h)&&(m=null),A.contentLength!=null&&A.contentLength!==m){if(t[df])return $r(t,A,new Cc),!1;process.emitWarning(new Cc)}m!=null&&(te(r,"no body must not have content length"),u[g3e]=`${m}`),e.ref();let f=i==="GET"||i==="HEAD";return c?(u[h3e]="100-continue",p=e.request(u,{endStream:f,signal:l}),p.once("continue",B)):(p=e.request(u,{endStream:f,signal:l}),B()),++g.openStreams,p.once("response",b=>{A.onHeaders(Number(b[E3e]),b,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{A.onComplete([])}),p.on("data",b=>{A.onData(b)===!1&&p.pause()}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),p.once("error",function(b){t[zn]&&!t[zn].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,ge.destroy(p,b))}),p.once("frameError",(b,I)=>{let C=new uo(`HTTP/2: "frameError" received - type ${b}, code ${I}`);$r(t,A,C),t[zn]&&!t[zn].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,ge.destroy(p,C))}),!0;function B(){r?ge.isBuffer(r)?(te(m===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),A.onBodySent(r),A.onRequestSent()):ge.isBlobLike(r)?typeof r.stream=="function"?q0({client:t,request:A,contentLength:m,h2stream:p,expectsPayload:h,body:r.stream(),socket:t[kA],header:""}):vz({body:r,client:t,request:A,contentLength:m,expectsPayload:h,h2stream:p,header:"",socket:t[kA]}):ge.isStream(r)?xz({body:r,client:t,request:A,contentLength:m,expectsPayload:h,socket:t[kA],h2stream:p,header:""}):ge.isIterable(r)?q0({body:r,client:t,request:A,contentLength:m,expectsPayload:h,header:"",h2stream:p,socket:t[kA]}):te(!1):A.onRequestSent()}a(B,"writeBodyH2")}a(R3e,"writeH2");function xz({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){if(te(n!==0||A[wA]===0,"stream body cannot be pipelined"),A[go]==="h2"){let m=function(f){r.onBodySent(f)};a(m,"onPipeData");let h=Gve(e,t,f=>{f?(ge.destroy(e,f),ge.destroy(t,f)):r.onRequestSent()});h.on("data",m),h.once("end",()=>{h.removeListener("data",m),ge.destroy(h)});return}let c=!1,l=new H0({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s}),d=a(function(h){if(!c)try{!l.write(h)&&this.pause&&this.pause()}catch(m){ge.destroy(this,m)}},"onData"),u=a(function(){c||e.resume&&e.resume()},"onDrain"),p=a(function(){g(new Jx)},"onAbort"),g=a(function(h){if(!c){if(c=!0,te(i.destroyed||i[fc]&&A[wA]<=1),i.off("drain",u).off("error",g),e.removeListener("data",d).removeListener("end",g).removeListener("error",g).removeListener("close",p),!h)try{l.end()}catch(m){h=m}l.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?ge.destroy(e,h):ge.destroy(e)}},"onFinished");e.on("data",d).on("end",g).on("error",g).on("close",p),e.resume&&e.resume(),i.on("drain",u).on("error",g)}a(xz,"writeStream");async function vz({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){te(n===e.size,"blob body must have content length");let c=A[go]==="h2";try{if(n!=null&&n!==e.size)throw new Cc;let l=Buffer.from(await e.arrayBuffer());c?(t.cork(),t.write(l),t.uncork()):(i.cork(),i.write(`${s}content-length: ${n}\r
|
||||
`,"latin1")),e.onRequestSent()),!0}a(P3e,"write");function q3e(t,e,A){let{body:r,method:i,path:n,host:s,upgrade:o,expectContinue:c,signal:l,headers:d}=A,u;if(typeof d=="string"?u=Hx[I3e](d.trim()):u=d,o)return ei(t,A,new Error("Upgrade not supported for H2")),!1;try{A.onConnect(b=>{A.aborted||A.completed||ei(t,A,b||new Xx)})}catch(b){ei(t,A,b)}if(A.aborted)return!1;let p,g=t[Y0];if(u[w3e]=s||t[xz],u[b3e]=i,i==="CONNECT")return e.ref(),p=e.request(u,{endStream:!1,signal:l}),p.id&&!p.pending?(A.onUpgrade(null,null,p),++g.openStreams):p.once("ready",()=>{A.onUpgrade(null,null,p),++g.openStreams}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),!0;u[N3e]=n,u[R3e]="https";let h=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let m=ge.bodyLength(r);if(m==null&&(m=A.contentLength),(m===0||!h)&&(m=null),A.contentLength!=null&&A.contentLength!==m){if(t[gf])return ei(t,A,new Cc),!1;process.emitWarning(new Cc)}m!=null&&(te(r,"no body must not have content length"),u[D3e]=`${m}`),e.ref();let f=i==="GET"||i==="HEAD";return c?(u[S3e]="100-continue",p=e.request(u,{endStream:f,signal:l}),p.once("continue",B)):(p=e.request(u,{endStream:f,signal:l}),B()),++g.openStreams,p.once("response",b=>{A.onHeaders(Number(b[x3e]),b,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{A.onComplete([])}),p.on("data",b=>{A.onData(b)===!1&&p.pause()}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),p.once("error",function(b){t[zn]&&!t[zn].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,ge.destroy(p,b))}),p.once("frameError",(b,I)=>{let C=new uo(`HTTP/2: "frameError" received - type ${b}, code ${I}`);ei(t,A,C),t[zn]&&!t[zn].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,ge.destroy(p,C))}),!0;function B(){r?ge.isBuffer(r)?(te(m===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),A.onBodySent(r),A.onRequestSent()):ge.isBlobLike(r)?typeof r.stream=="function"?J0({client:t,request:A,contentLength:m,h2stream:p,expectsPayload:h,body:r.stream(),socket:t[kA],header:""}):Tz({body:r,client:t,request:A,contentLength:m,expectsPayload:h,h2stream:p,header:"",socket:t[kA]}):ge.isStream(r)?Uz({body:r,client:t,request:A,contentLength:m,expectsPayload:h,socket:t[kA],h2stream:p,header:""}):ge.isIterable(r)?J0({body:r,client:t,request:A,contentLength:m,expectsPayload:h,header:"",h2stream:p,socket:t[kA]}):te(!1):A.onRequestSent()}a(B,"writeBodyH2")}a(q3e,"writeH2");function Uz({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){if(te(n!==0||A[wA]===0,"stream body cannot be pipelined"),A[go]==="h2"){let m=function(f){r.onBodySent(f)};a(m,"onPipeData");let h=i3e(e,t,f=>{f?(ge.destroy(e,f),ge.destroy(t,f)):r.onRequestSent()});h.on("data",m),h.once("end",()=>{h.removeListener("data",m),ge.destroy(h)});return}let c=!1,l=new V0({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s}),d=a(function(h){if(!c)try{!l.write(h)&&this.pause&&this.pause()}catch(m){ge.destroy(this,m)}},"onData"),u=a(function(){c||e.resume&&e.resume()},"onDrain"),p=a(function(){g(new Xx)},"onAbort"),g=a(function(h){if(!c){if(c=!0,te(i.destroyed||i[fc]&&A[wA]<=1),i.off("drain",u).off("error",g),e.removeListener("data",d).removeListener("end",g).removeListener("error",g).removeListener("close",p),!h)try{l.end()}catch(m){h=m}l.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?ge.destroy(e,h):ge.destroy(e)}},"onFinished");e.on("data",d).on("end",g).on("error",g).on("close",p),e.resume&&e.resume(),i.on("drain",u).on("error",g)}a(Uz,"writeStream");async function Tz({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){te(n===e.size,"blob body must have content length");let c=A[go]==="h2";try{if(n!=null&&n!==e.size)throw new Cc;let l=Buffer.from(await e.arrayBuffer());c?(t.cork(),t.write(l),t.uncork()):(i.cork(),i.write(`${s}content-length: ${n}\r
|
||||
\r
|
||||
`,"latin1"),i.write(l),i.uncork()),r.onBodySent(l),r.onRequestSent(),o||(i[Ti]=!0),jn(A)}catch(l){ge.destroy(c?t:i,l)}}a(vz,"writeBlob");async function q0({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){te(n!==0||A[wA]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let p=c;c=null,p()}}a(l,"onDrain");let d=a(()=>new Promise((p,g)=>{te(c===null),i[Kr]?g(i[Kr]):c=p}),"waitForDrain");if(A[go]==="h2"){t.on("close",l).on("drain",l);try{for await(let p of e){if(i[Kr])throw i[Kr];let g=t.write(p);r.onBodySent(p),g||await d()}}catch(p){t.destroy(p)}finally{r.onRequestSent(),t.end(),t.off("close",l).off("drain",l)}return}i.on("close",l).on("drain",l);let u=new H0({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s});try{for await(let p of e){if(i[Kr])throw i[Kr];u.write(p)||await d()}u.end()}catch(p){u.destroy(p)}finally{i.off("close",l).off("drain",l)}}a(q0,"writeIterable");var H0=class{static{a(this,"AsyncWriter")}constructor({socket:e,request:A,contentLength:r,client:i,expectsPayload:n,header:s}){this.socket=e,this.request=A,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=n,this.header=s,e[fc]=!0}write(e){let{socket:A,request:r,contentLength:i,client:n,bytesWritten:s,expectsPayload:o,header:c}=this;if(A[Kr])throw A[Kr];if(A.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(i!==null&&s+l>i){if(n[df])throw new Cc;process.emitWarning(new Cc)}A.cork(),s===0&&(o||(A[Ti]=!0),i===null?A.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"),i.write(l),i.uncork()),r.onBodySent(l),r.onRequestSent(),o||(i[Ti]=!0),jn(A)}catch(l){ge.destroy(c?t:i,l)}}a(Tz,"writeBlob");async function J0({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){te(n!==0||A[wA]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let p=c;c=null,p()}}a(l,"onDrain");let d=a(()=>new Promise((p,g)=>{te(c===null),i[$r]?g(i[$r]):c=p}),"waitForDrain");if(A[go]==="h2"){t.on("close",l).on("drain",l);try{for await(let p of e){if(i[$r])throw i[$r];let g=t.write(p);r.onBodySent(p),g||await d()}}catch(p){t.destroy(p)}finally{r.onRequestSent(),t.end(),t.off("close",l).off("drain",l)}return}i.on("close",l).on("drain",l);let u=new V0({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s});try{for await(let p of e){if(i[$r])throw i[$r];u.write(p)||await d()}u.end()}catch(p){u.destroy(p)}finally{i.off("close",l).off("drain",l)}}a(J0,"writeIterable");var V0=class{static{a(this,"AsyncWriter")}constructor({socket:e,request:A,contentLength:r,client:i,expectsPayload:n,header:s}){this.socket=e,this.request=A,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=n,this.header=s,e[fc]=!0}write(e){let{socket:A,request:r,contentLength:i,client:n,bytesWritten:s,expectsPayload:o,header:c}=this;if(A[$r])throw A[$r];if(A.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(i!==null&&s+l>i){if(n[gf])throw new Cc;process.emitWarning(new Cc)}A.cork(),s===0&&(o||(A[Ti]=!0),i===null?A.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"):A.write(`${c}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1")),i===null&&A.write(`\r
|
||||
${l.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=l;let d=A.write(e);return A.uncork(),r.onBodySent(e),d||A[vA].timeout&&A[vA].timeoutType===jg&&A[vA].timeout.refresh&&A[vA].timeout.refresh(),d}end(){let{socket:e,contentLength:A,client:r,bytesWritten:i,expectsPayload:n,header:s,request:o}=this;if(o.onRequestSent(),e[fc]=!1,e[Kr])throw e[Kr];if(!e.destroyed){if(i===0?n?e.write(`${s}content-length: 0\r
|
||||
`,"latin1"),this.bytesWritten+=l;let d=A.write(e);return A.uncork(),r.onBodySent(e),d||A[vA].timeout&&A[vA].timeoutType===Xg&&A[vA].timeout.refresh&&A[vA].timeout.refresh(),d}end(){let{socket:e,contentLength:A,client:r,bytesWritten:i,expectsPayload:n,header:s,request:o}=this;if(o.onRequestSent(),e[fc]=!1,e[$r])throw e[$r];if(!e.destroyed){if(i===0?n?e.write(`${s}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${s}\r
|
||||
`,"latin1"):A===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),A!==null&&i!==A){if(r[df])throw new Cc;process.emitWarning(new Cc)}e[vA].timeout&&e[vA].timeoutType===jg&&e[vA].timeout.refresh&&e[vA].timeout.refresh(),jn(r)}}destroy(e){let{socket:A,client:r}=this;A[fc]=!1,e&&(te(r[wA]<=1,"pipeline should only contain this request"),ge.destroy(A,e))}};function $r(t,e,A){try{e.onError(A),te(e.aborted)}catch(r){t.emit("error",r)}}a($r,"errorRequest");kz.exports=Px});var Lz=E((bCt,Fz)=>{"use strict";var G0=class{static{a(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)}};Fz.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new G0}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new G0),this.head.push(e)}shift(){let e=this.tail,A=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),A}}});var Tz=E((RCt,Uz)=>{var{kFree:D3e,kConnected:S3e,kPending:x3e,kQueued:v3e,kRunning:k3e,kSize:F3e}=hA(),uu=Symbol("pool"),Vx=class{static{a(this,"PoolStats")}constructor(e){this[uu]=e}get connected(){return this[uu][S3e]}get free(){return this[uu][D3e]}get pending(){return this[uu][x3e]}get queued(){return this[uu][v3e]}get running(){return this[uu][k3e]}get size(){return this[uu][F3e]}};Uz.exports=Vx});var Kx=E((SCt,Vz)=>{"use strict";var L3e=rf(),U3e=Lz(),{kConnected:Wx,kSize:Mz,kRunning:_z,kPending:Oz,kQueued:gf,kBusy:T3e,kFree:M3e,kUrl:_3e,kClose:O3e,kDestroy:P3e,kDispatch:q3e}=hA(),H3e=Tz(),cn=Symbol("clients"),Mi=Symbol("needDrain"),hf=Symbol("queue"),zx=Symbol("closed resolve"),jx=Symbol("onDrain"),Pz=Symbol("onConnect"),qz=Symbol("onDisconnect"),Hz=Symbol("onConnectionError"),Xx=Symbol("get dispatcher"),Gz=Symbol("add client"),Jz=Symbol("remove client"),Yz=Symbol("stats"),Zx=class extends L3e{static{a(this,"PoolBase")}constructor(){super(),this[hf]=new U3e,this[cn]=[],this[gf]=0;let e=this;this[jx]=a(function(r,i){let n=e[hf],s=!1;for(;!s;){let o=n.shift();if(!o)break;e[gf]--,s=!this.dispatch(o.opts,o.handler)}this[Mi]=s,!this[Mi]&&e[Mi]&&(e[Mi]=!1,e.emit("drain",r,[e,...i])),e[zx]&&n.isEmpty()&&Promise.all(e[cn].map(o=>o.close())).then(e[zx])},"onDrain"),this[Pz]=(A,r)=>{e.emit("connect",A,[e,...r])},this[qz]=(A,r,i)=>{e.emit("disconnect",A,[e,...r],i)},this[Hz]=(A,r,i)=>{e.emit("connectionError",A,[e,...r],i)},this[Yz]=new H3e(this)}get[T3e](){return this[Mi]}get[Wx](){return this[cn].filter(e=>e[Wx]).length}get[M3e](){return this[cn].filter(e=>e[Wx]&&!e[Mi]).length}get[Oz](){let e=this[gf];for(let{[Oz]:A}of this[cn])e+=A;return e}get[_z](){let e=0;for(let{[_z]:A}of this[cn])e+=A;return e}get[Mz](){let e=this[gf];for(let{[Mz]:A}of this[cn])e+=A;return e}get stats(){return this[Yz]}async[O3e](){return this[hf].isEmpty()?Promise.all(this[cn].map(e=>e.close())):new Promise(e=>{this[zx]=e})}async[P3e](e){for(;;){let A=this[hf].shift();if(!A)break;A.handler.onError(e)}return Promise.all(this[cn].map(A=>A.destroy(e)))}[q3e](e,A){let r=this[Xx]();return r?r.dispatch(e,A)||(r[Mi]=!0,this[Mi]=!this[Xx]()):(this[Mi]=!0,this[hf].push({opts:e,handler:A}),this[gf]++),!this[Mi]}[Gz](e){return e.on("drain",this[jx]).on("connect",this[Pz]).on("disconnect",this[qz]).on("connectionError",this[Hz]),this[cn].push(e),this[Mi]&&process.nextTick(()=>{this[Mi]&&this[jx](e[_3e],[this,e])}),this}[Jz](e){e.close(()=>{let A=this[cn].indexOf(e);A!==-1&&this[cn].splice(A,1)}),this[Mi]=this[cn].some(A=>!A[Mi]&&A.closed!==!0&&A.destroyed!==!0)}};Vz.exports={PoolBase:Zx,kClients:cn,kNeedDrain:Mi,kAddClient:Gz,kRemoveClient:Jz,kGetDispatcher:Xx}});var Xg=E((vCt,Xz)=>{"use strict";var{PoolBase:Y3e,kClients:Wz,kNeedDrain:G3e,kAddClient:J3e,kGetDispatcher:V3e}=Kx(),W3e=pf(),{InvalidArgumentError:$x}=Xt(),ev=dt(),{kUrl:zz,kInterceptors:z3e}=hA(),j3e=nf(),tv=Symbol("options"),Av=Symbol("connections"),jz=Symbol("factory");function X3e(t,e){return new W3e(t,e)}a(X3e,"defaultFactory");var rv=class extends Y3e{static{a(this,"Pool")}constructor(e,{connections:A,factory:r=X3e,connect:i,connectTimeout:n,tls:s,maxCachedSessions:o,socketPath:c,autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d,allowH2:u,...p}={}){if(super(),A!=null&&(!Number.isFinite(A)||A<0))throw new $x("invalid connections");if(typeof r!="function")throw new $x("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new $x("connect must be a function or an object");typeof i!="function"&&(i=j3e({...s,maxCachedSessions:o,allowH2:u,socketPath:c,timeout:n??1e4,...ev.nodeHasAutoSelectFamily&&l?{autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d}:void 0,...i})),this[z3e]=p.interceptors&&p.interceptors.Pool&&Array.isArray(p.interceptors.Pool)?p.interceptors.Pool:[],this[Av]=A||null,this[zz]=ev.parseOrigin(e),this[tv]={...e
Line truncated
|
||||
`,"latin1"),A!==null&&i!==A){if(r[gf])throw new Cc;process.emitWarning(new Cc)}e[vA].timeout&&e[vA].timeoutType===Xg&&e[vA].timeout.refresh&&e[vA].timeout.refresh(),jn(r)}}destroy(e){let{socket:A,client:r}=this;A[fc]=!1,e&&(te(r[wA]<=1,"pipeline should only contain this request"),ge.destroy(A,e))}};function ei(t,e,A){try{e.onError(A),te(e.aborted)}catch(r){t.emit("error",r)}}a(ei,"errorRequest");Mz.exports=Jx});var Oz=E((HCt,_z)=>{"use strict";var z0=class{static{a(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)}};_z.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new z0}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new z0),this.head.push(e)}shift(){let e=this.tail,A=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),A}}});var qz=E((GCt,Pz)=>{var{kFree:H3e,kConnected:Y3e,kPending:G3e,kQueued:J3e,kRunning:V3e,kSize:W3e}=hA(),pu=Symbol("pool"),Zx=class{static{a(this,"PoolStats")}constructor(e){this[pu]=e}get connected(){return this[pu][Y3e]}get free(){return this[pu][H3e]}get pending(){return this[pu][G3e]}get queued(){return this[pu][J3e]}get running(){return this[pu][V3e]}get size(){return this[pu][W3e]}};Pz.exports=Zx});var rv=E((VCt,Zz)=>{"use strict";var z3e=af(),j3e=Oz(),{kConnected:Kx,kSize:Hz,kRunning:Yz,kPending:Gz,kQueued:mf,kBusy:X3e,kFree:Z3e,kUrl:K3e,kClose:$3e,kDestroy:e8e,kDispatch:t8e}=hA(),A8e=qz(),cn=Symbol("clients"),Mi=Symbol("needDrain"),Cf=Symbol("queue"),$x=Symbol("closed resolve"),ev=Symbol("onDrain"),Jz=Symbol("onConnect"),Vz=Symbol("onDisconnect"),Wz=Symbol("onConnectionError"),tv=Symbol("get dispatcher"),jz=Symbol("add client"),Xz=Symbol("remove client"),zz=Symbol("stats"),Av=class extends z3e{static{a(this,"PoolBase")}constructor(){super(),this[Cf]=new j3e,this[cn]=[],this[mf]=0;let e=this;this[ev]=a(function(r,i){let n=e[Cf],s=!1;for(;!s;){let o=n.shift();if(!o)break;e[mf]--,s=!this.dispatch(o.opts,o.handler)}this[Mi]=s,!this[Mi]&&e[Mi]&&(e[Mi]=!1,e.emit("drain",r,[e,...i])),e[$x]&&n.isEmpty()&&Promise.all(e[cn].map(o=>o.close())).then(e[$x])},"onDrain"),this[Jz]=(A,r)=>{e.emit("connect",A,[e,...r])},this[Vz]=(A,r,i)=>{e.emit("disconnect",A,[e,...r],i)},this[Wz]=(A,r,i)=>{e.emit("connectionError",A,[e,...r],i)},this[zz]=new A8e(this)}get[X3e](){return this[Mi]}get[Kx](){return this[cn].filter(e=>e[Kx]).length}get[Z3e](){return this[cn].filter(e=>e[Kx]&&!e[Mi]).length}get[Gz](){let e=this[mf];for(let{[Gz]:A}of this[cn])e+=A;return e}get[Yz](){let e=0;for(let{[Yz]:A}of this[cn])e+=A;return e}get[Hz](){let e=this[mf];for(let{[Hz]:A}of this[cn])e+=A;return e}get stats(){return this[zz]}async[$3e](){return this[Cf].isEmpty()?Promise.all(this[cn].map(e=>e.close())):new Promise(e=>{this[$x]=e})}async[e8e](e){for(;;){let A=this[Cf].shift();if(!A)break;A.handler.onError(e)}return Promise.all(this[cn].map(A=>A.destroy(e)))}[t8e](e,A){let r=this[tv]();return r?r.dispatch(e,A)||(r[Mi]=!0,this[Mi]=!this[tv]()):(this[Mi]=!0,this[Cf].push({opts:e,handler:A}),this[mf]++),!this[Mi]}[jz](e){return e.on("drain",this[ev]).on("connect",this[Jz]).on("disconnect",this[Vz]).on("connectionError",this[Wz]),this[cn].push(e),this[Mi]&&process.nextTick(()=>{this[Mi]&&this[ev](e[K3e],[this,e])}),this}[Xz](e){e.close(()=>{let A=this[cn].indexOf(e);A!==-1&&this[cn].splice(A,1)}),this[Mi]=this[cn].some(A=>!A[Mi]&&A.closed!==!0&&A.destroyed!==!0)}};Zz.exports={PoolBase:Av,kClients:cn,kNeedDrain:Mi,kAddClient:jz,kRemoveClient:Xz,kGetDispatcher:tv}});var Zg=E((zCt,tj)=>{"use strict";var{PoolBase:r8e,kClients:Kz,kNeedDrain:i8e,kAddClient:n8e,kGetDispatcher:s8e}=rv(),a8e=Ef(),{InvalidArgumentError:iv}=Xt(),nv=dt(),{kUrl:$z,kInterceptors:o8e}=hA(),c8e=of(),sv=Symbol("options"),av=Symbol("connections"),ej=Symbol("factory");function l8e(t,e){return new a8e(t,e)}a(l8e,"defaultFactory");var ov=class extends r8e{static{a(this,"Pool")}constructor(e,{connections:A,factory:r=l8e,connect:i,connectTimeout:n,tls:s,maxCachedSessions:o,socketPath:c,autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d,allowH2:u,...p}={}){if(super(),A!=null&&(!Number.isFinite(A)||A<0))throw new iv("invalid connections");if(typeof r!="function")throw new iv("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new iv("connect must be a function or an object");typeof i!="function"&&(i=c8e({...s,maxCachedSessions:o,allowH2:u,socketPath:c,timeout:n??1e4,...nv.nodeHasAutoSelectFamily&&l?{autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d}:void 0,...i})),this[o8e]=p.interceptors&&p.interceptors.Pool&&Array.isArray(p.interceptors.Pool)?p.interceptors.Pool:[],this[av]=A||null,this[$z]=nv.parseOrigin(e),this[sv]={...n
Line truncated
|
||||
${r.count} ${r.noun} ${r.is} pending:
|
||||
|
||||
${e.format(A)}
|
||||
`.trim())}};DX.exports=qv});var UX=E((Ift,LX)=>{"use strict";var{kProxy:Z5e,kClose:K5e,kDestroy:$5e,kInterceptors:eke}=hA(),{URL:xX}=require("url"),vX=mf(),tke=Xg(),Ake=rf(),{InvalidArgumentError:Bf,RequestAbortedError:rke}=Xt(),kX=nf(),Qf=Symbol("proxy agent"),cy=Symbol("proxy client"),ly=Symbol("proxy headers"),Hv=Symbol("request tls settings"),ike=Symbol("proxy tls settings"),FX=Symbol("connect endpoint function");function nke(t){return t==="https:"?443:80}a(nke,"defaultProtocolPort");function ske(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new Bf("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}a(ske,"buildProxyOptions");function ake(t,e){return new tke(t,e)}a(ake,"defaultFactory");var Yv=class extends Ake{static{a(this,"ProxyAgent")}constructor(e){if(super(e),this[Z5e]=ske(e),this[Qf]=new vX(e),this[eke]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new Bf("Proxy opts.uri is mandatory");let{clientFactory:A=ake}=e;if(typeof A!="function")throw new Bf("Proxy opts.clientFactory must be a function.");if(this[Hv]=e.requestTls,this[ike]=e.proxyTls,this[ly]=e.headers||{},e.auth&&e.token)throw new Bf("opts.auth cannot be used in combination with opts.token");e.auth?this[ly]["proxy-authorization"]=`Basic ${e.auth}`:e.token&&(this[ly]["proxy-authorization"]=e.token);let r=new xX(e.uri),{origin:i,port:n,host:s}=r,o=kX({...e.proxyTls});this[FX]=kX({...e.requestTls}),this[cy]=A(r,{connect:o}),this[Qf]=new vX({...e,connect:async(c,l)=>{let d=c.host;c.port||(d+=`:${nke(c.protocol)}`);try{let{socket:u,statusCode:p}=await this[cy].connect({origin:i,port:n,path:d,signal:c.signal,headers:{...this[ly],host:s}});if(p!==200&&(u.on("error",()=>{}).destroy(),l(new rke("Proxy response !== 200 when HTTP Tunneling"))),c.protocol!=="https:"){l(null,u);return}let g;this[Hv]?g=this[Hv].servername:g=c.servername,this[FX]({...c,servername:g,httpSocket:u},l)}catch(u){l(u)}}})}dispatch(e,A){let{host:r}=new xX(e.origin),i=oke(e.headers);return cke(i),this[Qf].dispatch({...e,headers:{...i,host:r}},A)}async[K5e](){await this[Qf].close(),await this[cy].close()}async[$5e](){await this[Qf].destroy(),await this[cy].destroy()}};function oke(t){if(Array.isArray(t)){let e={};for(let A=0;A<t.length;A+=2)e[t[A]]=t[A+1];return e}return t}a(oke,"buildHeaders");function cke(t){if(t&&Object.keys(t).find(A=>A.toLowerCase()==="proxy-authorization"))throw new Bf("Proxy-Authorization should be sent in ProxyAgent constructor")}a(cke,"throwIfProxyAuthIsSent");LX.exports=Yv});var sh=E((wft,OX)=>{"use strict";var TX=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:lke}=Xt(),dke=mf();_X()===void 0&&MX(new dke);function MX(t){if(!t||typeof t.dispatch!="function")throw new lke("Argument agent must implement Agent");Object.defineProperty(globalThis,TX,{value:t,writable:!0,enumerable:!1,configurable:!1})}a(MX,"setGlobalDispatcher");function _X(){return globalThis[TX]}a(_X,"getGlobalDispatcher");OX.exports={setGlobalDispatcher:MX,getGlobalDispatcher:_X}});var qX=E((Rft,PX)=>{"use strict";PX.exports=class{static{a(this,"DecoratorHandler")}constructor(e){this.handler=e}onConnect(...e){return this.handler.onConnect(...e)}onError(...e){return this.handler.onError(...e)}onUpgrade(...e){return this.handler.onUpgrade(...e)}onHeaders(...e){return this.handler.onHeaders(...e)}onData(...e){return this.handler.onData(...e)}onComplete(...e){return this.handler.onComplete(...e)}onBodySent(...e){return this.handler.onBodySent(...e)}}});var fu=E((Sft,JX)=>{"use strict";var{kHeadersList:ln}=hA(),{kGuard:Cu}=uc(),{kEnumerableProperty:Eo}=dt(),{makeIterator:Gv,isValidHeaderName:If,isValidHeaderValue:HX}=Ts(),{webidl:Ze}=Ui(),uke=require("assert"),dn=Symbol("headers map"),un=Symbol("headers map sorted");function YX(t){let e=t.length;for(;/[\r\n\t ]/.test(t.charAt(--e)););return t.slice(0,e+1).replace(/^[\r\n\t ]+/,"")}a(YX,"headerValueNormalize");function GX(t,e){if(Array.isArray(e))for(let A of e){if(A.length!==2)throw Ze.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${A.length}.`});t.append(A[0],A[1])}else if(typeof e=="object"&&e!==null)for(let[A,r]of Object.entries(e))t.append(A,r);else throw Ze.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}a(GX,"fill");var dy=class t{static{a(this,"HeadersList")}cookies=null;constructor(e){e instanceof t?(this[dn]=new Map(e[dn]),this[un]=e[un],this.cookies=e.cookies):(this[dn]=new Map(e),this[un]=null)}contains(e){return e=e.toLowerCase(),this[dn].has(e)}clear(){this[dn].clear(),this[un]=null,this.cookies=null}append(e,A){this[un]=null;let r=e.toLowerCase(),i=this[dn].get(r);if(i){let n=r==="cookie"?"; ":", ";this[dn].set(r,{name:i.name,value:`${i.value}${n}${A}`})}else this[dn].set(r,{name:e,value:A});r==="set-cookie"
Line truncated
|
||||
`.trim())}};FX.exports=Vv});var PX=E((Oft,OX)=>{"use strict";var{kProxy:dke,kClose:uke,kDestroy:pke,kInterceptors:gke}=hA(),{URL:UX}=require("url"),TX=Qf(),hke=Zg(),Eke=af(),{InvalidArgumentError:wf,RequestAbortedError:mke}=Xt(),MX=of(),yf=Symbol("proxy agent"),py=Symbol("proxy client"),gy=Symbol("proxy headers"),Wv=Symbol("request tls settings"),Cke=Symbol("proxy tls settings"),_X=Symbol("connect endpoint function");function fke(t){return t==="https:"?443:80}a(fke,"defaultProtocolPort");function Qke(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new wf("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}a(Qke,"buildProxyOptions");function Bke(t,e){return new hke(t,e)}a(Bke,"defaultFactory");var zv=class extends Eke{static{a(this,"ProxyAgent")}constructor(e){if(super(e),this[dke]=Qke(e),this[yf]=new TX(e),this[gke]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new wf("Proxy opts.uri is mandatory");let{clientFactory:A=Bke}=e;if(typeof A!="function")throw new wf("Proxy opts.clientFactory must be a function.");if(this[Wv]=e.requestTls,this[Cke]=e.proxyTls,this[gy]=e.headers||{},e.auth&&e.token)throw new wf("opts.auth cannot be used in combination with opts.token");e.auth?this[gy]["proxy-authorization"]=`Basic ${e.auth}`:e.token&&(this[gy]["proxy-authorization"]=e.token);let r=new UX(e.uri),{origin:i,port:n,host:s}=r,o=MX({...e.proxyTls});this[_X]=MX({...e.requestTls}),this[py]=A(r,{connect:o}),this[yf]=new TX({...e,connect:async(c,l)=>{let d=c.host;c.port||(d+=`:${fke(c.protocol)}`);try{let{socket:u,statusCode:p}=await this[py].connect({origin:i,port:n,path:d,signal:c.signal,headers:{...this[gy],host:s}});if(p!==200&&(u.on("error",()=>{}).destroy(),l(new mke("Proxy response !== 200 when HTTP Tunneling"))),c.protocol!=="https:"){l(null,u);return}let g;this[Wv]?g=this[Wv].servername:g=c.servername,this[_X]({...c,servername:g,httpSocket:u},l)}catch(u){l(u)}}})}dispatch(e,A){let{host:r}=new UX(e.origin),i=Ike(e.headers);return yke(i),this[yf].dispatch({...e,headers:{...i,host:r}},A)}async[uke](){await this[yf].close(),await this[py].close()}async[pke](){await this[yf].destroy(),await this[py].destroy()}};function Ike(t){if(Array.isArray(t)){let e={};for(let A=0;A<t.length;A+=2)e[t[A]]=t[A+1];return e}return t}a(Ike,"buildHeaders");function yke(t){if(t&&Object.keys(t).find(A=>A.toLowerCase()==="proxy-authorization"))throw new wf("Proxy-Authorization should be sent in ProxyAgent constructor")}a(yke,"throwIfProxyAuthIsSent");OX.exports=zv});var ah=E((qft,GX)=>{"use strict";var qX=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:wke}=Xt(),bke=Qf();YX()===void 0&&HX(new bke);function HX(t){if(!t||typeof t.dispatch!="function")throw new wke("Argument agent must implement Agent");Object.defineProperty(globalThis,qX,{value:t,writable:!0,enumerable:!1,configurable:!1})}a(HX,"setGlobalDispatcher");function YX(){return globalThis[qX]}a(YX,"getGlobalDispatcher");GX.exports={setGlobalDispatcher:HX,getGlobalDispatcher:YX}});var VX=E((Gft,JX)=>{"use strict";JX.exports=class{static{a(this,"DecoratorHandler")}constructor(e){this.handler=e}onConnect(...e){return this.handler.onConnect(...e)}onError(...e){return this.handler.onError(...e)}onUpgrade(...e){return this.handler.onUpgrade(...e)}onHeaders(...e){return this.handler.onHeaders(...e)}onData(...e){return this.handler.onData(...e)}onComplete(...e){return this.handler.onComplete(...e)}onBodySent(...e){return this.handler.onBodySent(...e)}}});var Qu=E((Vft,XX)=>{"use strict";var{kHeadersList:ln}=hA(),{kGuard:fu}=uc(),{kEnumerableProperty:Eo}=dt(),{makeIterator:jv,isValidHeaderName:bf,isValidHeaderValue:WX}=Ts(),{webidl:Ze}=Ui(),Nke=require("assert"),dn=Symbol("headers map"),un=Symbol("headers map sorted");function zX(t){let e=t.length;for(;/[\r\n\t ]/.test(t.charAt(--e)););return t.slice(0,e+1).replace(/^[\r\n\t ]+/,"")}a(zX,"headerValueNormalize");function jX(t,e){if(Array.isArray(e))for(let A of e){if(A.length!==2)throw Ze.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${A.length}.`});t.append(A[0],A[1])}else if(typeof e=="object"&&e!==null)for(let[A,r]of Object.entries(e))t.append(A,r);else throw Ze.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}a(jX,"fill");var hy=class t{static{a(this,"HeadersList")}cookies=null;constructor(e){e instanceof t?(this[dn]=new Map(e[dn]),this[un]=e[un],this.cookies=e.cookies):(this[dn]=new Map(e),this[un]=null)}contains(e){return e=e.toLowerCase(),this[dn].has(e)}clear(){this[dn].clear(),this[un]=null,this.cookies=null}append(e,A){this[un]=null;let r=e.toLowerCase(),i=this[dn].get(r);if(i){let n=r==="cookie"?"; ":", ";this[dn].set(r,{name:i.name,value:`${i.value}${n}${A}`})}else this[dn].set(r,{name:e,value:A});r==="set-cookie"
Line truncated
|
||||
|
||||
Error Code : ${s.statusCode}
|
||||
|
||||
Error Message: ${s.message}`)})).result)===null||A===void 0?void 0:A.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return YK(this,void 0,void 0,function*(){try{let A=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);A=`${A}&audience=${i}`}GK.debug(`ID token url is ${A}`);let r=yield t.getCall(A);return GK.setSecret(r),r}catch(A){throw new Error(`Error message: ${A.message}`)}})}};Qh.OidcClient=L3});var _3=E(hn=>{"use strict";var U3=hn&&hn.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(hn,"__esModule",{value:!0});hn.summary=hn.markdownSummary=hn.SUMMARY_DOCS_URL=hn.SUMMARY_ENV_VAR=void 0;var KUe=require("os"),T3=require("fs"),{access:$Ue,appendFile:eTe,writeFile:tTe}=T3.promises;hn.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";hn.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var M3=class{static{a(this,"Summary")}constructor(){this._buffer=""}filePath(){return U3(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[hn.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${hn.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield $Ue(e,T3.constants.R_OK|T3.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,A,r={}){let i=Object.entries(r).map(([n,s])=>` ${n}="${s}"`).join("");return A?`<${e}${i}>${A}</${e}>`:`<${e}${i}>`}write(e){return U3(this,void 0,void 0,function*(){let A=!!e?.overwrite,r=yield this.filePath();return yield(A?tTe:eTe)(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return U3(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,A=!1){return this._buffer+=e,A?this.addEOL():this}addEOL(){return this.addRaw(KUe.EOL)}addCodeBlock(e,A){let r=Object.assign({},A&&{lang:A}),i=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(i).addEOL()}addList(e,A=!1){let r=A?"ol":"ul",i=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(r,i);return this.addRaw(n).addEOL()}addTable(e){let A=e.map(i=>{let n=i.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:o,data:c,colspan:l,rowspan:d}=s,u=o?"th":"td",p=Object.assign(Object.assign({},l&&{colspan:l}),d&&{rowspan:d});return this.wrap(u,c,p)}).join("");return this.wrap("tr",n)}).join(""),r=this.wrap("table",A);return this.addRaw(r).addEOL()}addDetails(e,A){let r=this.wrap("details",this.wrap("summary",e)+A);return this.addRaw(r).addEOL()}addImage(e,A,r){let{width:i,height:n}=r||{},s=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n}),o=this.wrap("img",null,Object.assign({src:e,alt:A},s));return this.addRaw(o).addEOL()}addHeading(e,A){let r=`h${A}`,i=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",n=this.wrap(i,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,A){let r=Object.assign({},A&&{cite:A}),i=this.wrap("blockquote",e,r);return this.addRaw(i).addEOL()}addLink(e,A){let r=this.wrap("a",e,{href:A});return this.addRaw(r).addEOL()}},VK=new M3;hn.markdownSummary=VK;hn.summary=VK});var WK=E(En=>{"use strict";var ATe=En&&En.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),rTe=En&&En.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iTe=En&&En.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&ATe(e,t,A);return rTe(e,t),e};Object.defineProperty(En,"__esModule",{value:!0});En.toPlatformPath=En.toWin32Path=En.toPosixPath=void 0;var nTe=iTe(require("path"));function sTe(t){return t.replace(/[\\]/g,"/")}a(sTe,"toPosixPath");En.toPosixPath=sTe;function aTe(t){return t.replace(/[/]/g,"\\")}a(aTe,"toWin32Path");En.toWin32Path=aTe;function oTe(t){return t.replace(/[/\\]/g,nTe.sep)}a(oTe,"toPlatformPath");En.toPlatformPath=oTe});var $y=E(de=>{"use strict";var cTe=de&&de.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===voiLine truncated
|
||||
`).filter(r=>r!=="");return e&&e.trimWhitespace===!1?A:A.map(r=>r.trim())}a(ETe,"getMultilineInput");de.getMultilineInput=ETe;function mTe(t,e){let A=["true","True","TRUE"],r=["false","False","FALSE"],i=O3(t,e);if(A.includes(i))return!0;if(r.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}a(mTe,"getBooleanInput");de.getBooleanInput=mTe;function CTe(t,e){if(process.env.GITHUB_OUTPUT||"")return bu.issueFileCommand("OUTPUT",bu.prepareKeyValueMessage(t,e));process.stdout.write(XK.EOL),Ys.issueCommand("set-output",{name:t},Bh.toCommandValue(e))}a(CTe,"setOutput");de.setOutput=CTe;function fTe(t){Ys.issue("echo",t?"on":"off")}a(fTe,"setCommandEcho");de.setCommandEcho=fTe;function QTe(t){process.exitCode=ZK.Failure,KK(t)}a(QTe,"setFailed");de.setFailed=QTe;function BTe(){return process.env.RUNNER_DEBUG==="1"}a(BTe,"isDebug");de.isDebug=BTe;function ITe(t){Ys.issueCommand("debug",{},t)}a(ITe,"debug");de.debug=ITe;function KK(t,e={}){Ys.issueCommand("error",Bh.toCommandProperties(e),t instanceof Error?t.toString():t)}a(KK,"error");de.error=KK;function yTe(t,e={}){Ys.issueCommand("warning",Bh.toCommandProperties(e),t instanceof Error?t.toString():t)}a(yTe,"warning");de.warning=yTe;function wTe(t,e={}){Ys.issueCommand("notice",Bh.toCommandProperties(e),t instanceof Error?t.toString():t)}a(wTe,"notice");de.notice=wTe;function bTe(t){process.stdout.write(t+XK.EOL)}a(bTe,"info");de.info=bTe;function $K(t){Ys.issue("group",t)}a($K,"startGroup");de.startGroup=$K;function e$(){Ys.issue("endgroup")}a(e$,"endGroup");de.endGroup=e$;function NTe(t,e){return jK(this,void 0,void 0,function*(){$K(t);let A;try{A=yield e()}finally{e$()}return A})}a(NTe,"group");de.group=NTe;function RTe(t,e){if(process.env.GITHUB_STATE||"")return bu.issueFileCommand("STATE",bu.prepareKeyValueMessage(t,e));Ys.issueCommand("save-state",{name:t},Bh.toCommandValue(e))}a(RTe,"saveState");de.saveState=RTe;function DTe(t){return process.env[`STATE_${t}`]||""}a(DTe,"getState");de.getState=DTe;function STe(t){return jK(this,void 0,void 0,function*(){return yield uTe.OidcClient.getIDToken(t)})}a(STe,"getIDToken");de.getIDToken=STe;var xTe=_3();Object.defineProperty(de,"summary",{enumerable:!0,get:function(){return xTe.summary}});var vTe=_3();Object.defineProperty(de,"markdownSummary",{enumerable:!0,get:function(){return vTe.markdownSummary}});var P3=WK();Object.defineProperty(de,"toPosixPath",{enumerable:!0,get:function(){return P3.toPosixPath}});Object.defineProperty(de,"toWin32Path",{enumerable:!0,get:function(){return P3.toWin32Path}});Object.defineProperty(de,"toPlatformPath",{enumerable:!0,get:function(){return P3.toPlatformPath}})});var t$=E(Qo=>{"use strict";var kTe=Qo&&Qo.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),FTe=Qo&&Qo.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),LTe=Qo&&Qo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&kTe(e,t,A);return FTe(e,t),e};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.getOptions=void 0;var q3=LTe($y());function UTe(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,q3.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,q3.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,q3.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}a(UTe,"getOptions");Qo.getOptions=UTe});var t2=E(FA=>{"use strict";var TTe=FA&&FA.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),MTe=FA&&FA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_Te=FA&&FA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&TTe(e,t,A);return MTe(e,t),e},OTe=FA&&FA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(FA,"__esModule",{value:!0});FA.safeTrimTrailingSeparator=FA.normalizeSeparators=FA.hasRoot=FA.hasAbsoluteRoot=FA.ensureAbsoluteRoot=FA.dirname=void 0;var e2=_Te(require("path")),Nu=OTe(require("assert")),Ml=process.platform==="win32";function PTe(t){if(t=Y3(t),Ml&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=e2.dirname(t);return Ml&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=Y3(e)),e}a(PTe,"dirname");FA.dirname=PTe;function qTe(t,e){if(Nu.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),Nu.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),H3(e))return e;if(Ml){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let A=process.cwd();returnLine truncated
|
||||
%s`,Q,Q,b,r);var N=b.type==="*"?W3:b.type==="?"?V3:"\\"+b.type;i=!0,r=r.slice(0,b.reStart)+N+"\\("+Q}h(),n&&(r+="\\\\");var S=!1;switch(r.charAt(0)){case"[":case".":case"(":S=!0}for(var w=o.length-1;w>-1;w--){var k=o[w],D=r.slice(0,k.reStart),v=r.slice(k.reStart,k.reEnd-8),x=r.slice(k.reEnd-8,k.reEnd),L=r.slice(k.reEnd);x+=L;var q=D.split("(").length-1,le=L;for(m=0;m<q;m++)le=le.replace(/\)[+*?]?/,"");L=le;var _="";L===""&&e!==r2&&(_="$");var rt=D+v+L+_+x;r=rt}if(r!==""&&i&&(r="(?=.)"+r),S&&(r=p+r),e===r2)return[r,i];if(!i)return E7e(t);var Se=A.nocase?"i":"";try{var vt=new RegExp("^"+r+"$",Se)}catch{return new RegExp("$.")}return vt._glob=t,vt._src=r,vt}a(g7e,"parse");As.makeRe=function(t,e){return new ei(t,e||{}).makeRe()};ei.prototype.makeRe=h7e;function h7e(){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,A=e.noglobstar?W3:e.dot?a7e:o7e,r=e.nocase?"i":"",i=t.map(function(n){return n.map(function(s){return s===z3?A:typeof s=="string"?m7e(s):s._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,r)}catch{this.regexp=!1}return this.regexp}a(h7e,"makeRe");As.match=function(t,e,A){A=A||{};var r=new ei(e,A);return t=t.filter(function(i){return r.match(i)}),r.options.nonull&&!t.length&&t.push(e),t};ei.prototype.match=a(function(e,A){if(typeof A>"u"&&(A=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&A)return!0;var r=this.options;Mf.sep!=="/"&&(e=e.split(Mf.sep).join("/")),e=e.split(I$),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var n,s;for(s=e.length-1;s>=0&&(n=e[s],!n);s--);for(s=0;s<i.length;s++){var o=i[s],c=e;r.matchBase&&o.length===1&&(c=[n]);var l=this.matchOne(c,o,A);if(l)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate},"match");ei.prototype.matchOne=function(t,e,A){var r=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,n=0,s=t.length,o=e.length;i<s&&n<o;i++,n++){this.debug("matchOne loop");var c=e[n],l=t[i];if(this.debug(e,c,l),c===!1)return!1;if(c===z3){this.debug("GLOBSTAR",[e,c,l]);var d=i,u=n+1;if(u===o){for(this.debug("** at the end");i<s;i++)if(t[i]==="."||t[i]===".."||!r.dot&&t[i].charAt(0)===".")return!1;return!0}for(;d<s;){var p=t[d];if(this.debug(`
|
||||
Error Message: ${s.message}`)})).result)===null||A===void 0?void 0:A.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return zK(this,void 0,void 0,function*(){try{let A=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);A=`${A}&audience=${i}`}jK.debug(`ID token url is ${A}`);let r=yield t.getCall(A);return jK.setSecret(r),r}catch(A){throw new Error(`Error message: ${A.message}`)}})}};Bh.OidcClient=O3});var Y3=E(hn=>{"use strict";var P3=hn&&hn.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(hn,"__esModule",{value:!0});hn.summary=hn.markdownSummary=hn.SUMMARY_DOCS_URL=hn.SUMMARY_ENV_VAR=void 0;var uTe=require("os"),q3=require("fs"),{access:pTe,appendFile:gTe,writeFile:hTe}=q3.promises;hn.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";hn.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var H3=class{static{a(this,"Summary")}constructor(){this._buffer=""}filePath(){return P3(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[hn.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${hn.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield pTe(e,q3.constants.R_OK|q3.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,A,r={}){let i=Object.entries(r).map(([n,s])=>` ${n}="${s}"`).join("");return A?`<${e}${i}>${A}</${e}>`:`<${e}${i}>`}write(e){return P3(this,void 0,void 0,function*(){let A=!!e?.overwrite,r=yield this.filePath();return yield(A?hTe:gTe)(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return P3(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,A=!1){return this._buffer+=e,A?this.addEOL():this}addEOL(){return this.addRaw(uTe.EOL)}addCodeBlock(e,A){let r=Object.assign({},A&&{lang:A}),i=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(i).addEOL()}addList(e,A=!1){let r=A?"ol":"ul",i=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(r,i);return this.addRaw(n).addEOL()}addTable(e){let A=e.map(i=>{let n=i.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:o,data:c,colspan:l,rowspan:d}=s,u=o?"th":"td",p=Object.assign(Object.assign({},l&&{colspan:l}),d&&{rowspan:d});return this.wrap(u,c,p)}).join("");return this.wrap("tr",n)}).join(""),r=this.wrap("table",A);return this.addRaw(r).addEOL()}addDetails(e,A){let r=this.wrap("details",this.wrap("summary",e)+A);return this.addRaw(r).addEOL()}addImage(e,A,r){let{width:i,height:n}=r||{},s=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n}),o=this.wrap("img",null,Object.assign({src:e,alt:A},s));return this.addRaw(o).addEOL()}addHeading(e,A){let r=`h${A}`,i=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",n=this.wrap(i,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,A){let r=Object.assign({},A&&{cite:A}),i=this.wrap("blockquote",e,r);return this.addRaw(i).addEOL()}addLink(e,A){let r=this.wrap("a",e,{href:A});return this.addRaw(r).addEOL()}},ZK=new H3;hn.markdownSummary=ZK;hn.summary=ZK});var KK=E(En=>{"use strict";var ETe=En&&En.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),mTe=En&&En.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CTe=En&&En.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&ETe(e,t,A);return mTe(e,t),e};Object.defineProperty(En,"__esModule",{value:!0});En.toPlatformPath=En.toWin32Path=En.toPosixPath=void 0;var fTe=CTe(require("path"));function QTe(t){return t.replace(/[\\]/g,"/")}a(QTe,"toPosixPath");En.toPosixPath=QTe;function BTe(t){return t.replace(/[/]/g,"\\")}a(BTe,"toWin32Path");En.toWin32Path=BTe;function ITe(t){return t.replace(/[/\\]/g,fTe.sep)}a(ITe,"toPlatformPath");En.toPlatformPath=ITe});var r2=E(de=>{"use strict";var yTe=de&&de.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===voiLine truncated
|
||||
`).filter(r=>r!=="");return e&&e.trimWhitespace===!1?A:A.map(r=>r.trim())}a(xTe,"getMultilineInput");de.getMultilineInput=xTe;function vTe(t,e){let A=["true","True","TRUE"],r=["false","False","FALSE"],i=G3(t,e);if(A.includes(i))return!0;if(r.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}a(vTe,"getBooleanInput");de.getBooleanInput=vTe;function kTe(t,e){if(process.env.GITHUB_OUTPUT||"")return Nu.issueFileCommand("OUTPUT",Nu.prepareKeyValueMessage(t,e));process.stdout.write(t$.EOL),Ys.issueCommand("set-output",{name:t},Ih.toCommandValue(e))}a(kTe,"setOutput");de.setOutput=kTe;function FTe(t){Ys.issue("echo",t?"on":"off")}a(FTe,"setCommandEcho");de.setCommandEcho=FTe;function LTe(t){process.exitCode=A$.Failure,r$(t)}a(LTe,"setFailed");de.setFailed=LTe;function UTe(){return process.env.RUNNER_DEBUG==="1"}a(UTe,"isDebug");de.isDebug=UTe;function TTe(t){Ys.issueCommand("debug",{},t)}a(TTe,"debug");de.debug=TTe;function r$(t,e={}){Ys.issueCommand("error",Ih.toCommandProperties(e),t instanceof Error?t.toString():t)}a(r$,"error");de.error=r$;function MTe(t,e={}){Ys.issueCommand("warning",Ih.toCommandProperties(e),t instanceof Error?t.toString():t)}a(MTe,"warning");de.warning=MTe;function _Te(t,e={}){Ys.issueCommand("notice",Ih.toCommandProperties(e),t instanceof Error?t.toString():t)}a(_Te,"notice");de.notice=_Te;function OTe(t){process.stdout.write(t+t$.EOL)}a(OTe,"info");de.info=OTe;function i$(t){Ys.issue("group",t)}a(i$,"startGroup");de.startGroup=i$;function n$(){Ys.issue("endgroup")}a(n$,"endGroup");de.endGroup=n$;function PTe(t,e){return e$(this,void 0,void 0,function*(){i$(t);let A;try{A=yield e()}finally{n$()}return A})}a(PTe,"group");de.group=PTe;function qTe(t,e){if(process.env.GITHUB_STATE||"")return Nu.issueFileCommand("STATE",Nu.prepareKeyValueMessage(t,e));Ys.issueCommand("save-state",{name:t},Ih.toCommandValue(e))}a(qTe,"saveState");de.saveState=qTe;function HTe(t){return process.env[`STATE_${t}`]||""}a(HTe,"getState");de.getState=HTe;function YTe(t){return e$(this,void 0,void 0,function*(){return yield NTe.OidcClient.getIDToken(t)})}a(YTe,"getIDToken");de.getIDToken=YTe;var GTe=Y3();Object.defineProperty(de,"summary",{enumerable:!0,get:function(){return GTe.summary}});var JTe=Y3();Object.defineProperty(de,"markdownSummary",{enumerable:!0,get:function(){return JTe.markdownSummary}});var J3=KK();Object.defineProperty(de,"toPosixPath",{enumerable:!0,get:function(){return J3.toPosixPath}});Object.defineProperty(de,"toWin32Path",{enumerable:!0,get:function(){return J3.toWin32Path}});Object.defineProperty(de,"toPlatformPath",{enumerable:!0,get:function(){return J3.toPlatformPath}})});var s$=E(Qo=>{"use strict";var VTe=Qo&&Qo.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),WTe=Qo&&Qo.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zTe=Qo&&Qo.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&VTe(e,t,A);return WTe(e,t),e};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.getOptions=void 0;var V3=zTe(r2());function jTe(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,V3.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,V3.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,V3.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}a(jTe,"getOptions");Qo.getOptions=jTe});var n2=E(FA=>{"use strict";var XTe=FA&&FA.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),ZTe=FA&&FA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KTe=FA&&FA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&XTe(e,t,A);return ZTe(e,t),e},$Te=FA&&FA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(FA,"__esModule",{value:!0});FA.safeTrimTrailingSeparator=FA.normalizeSeparators=FA.hasRoot=FA.hasAbsoluteRoot=FA.ensureAbsoluteRoot=FA.dirname=void 0;var i2=KTe(require("path")),Ru=$Te(require("assert")),Ml=process.platform==="win32";function e7e(t){if(t=z3(t),Ml&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=i2.dirname(t);return Ml&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=z3(e)),e}a(e7e,"dirname");FA.dirname=e7e;function t7e(t,e){if(Ru.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),Ru.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),W3(e))return e;if(Ml){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let A=process.cwd();returnLine truncated
|
||||
%s`,Q,Q,b,r);var N=b.type==="*"?K3:b.type==="?"?Z3:"\\"+b.type;i=!0,r=r.slice(0,b.reStart)+N+"\\("+Q}h(),n&&(r+="\\\\");var S=!1;switch(r.charAt(0)){case"[":case".":case"(":S=!0}for(var w=o.length-1;w>-1;w--){var k=o[w],D=r.slice(0,k.reStart),v=r.slice(k.reStart,k.reEnd-8),x=r.slice(k.reEnd-8,k.reEnd),L=r.slice(k.reEnd);x+=L;var q=D.split("(").length-1,le=L;for(m=0;m<q;m++)le=le.replace(/\)[+*?]?/,"");L=le;var _="";L===""&&e!==a2&&(_="$");var rt=D+v+L+_+x;r=rt}if(r!==""&&i&&(r="(?=.)"+r),S&&(r=p+r),e===a2)return[r,i];if(!i)return x7e(t);var Se=A.nocase?"i":"";try{var vt=new RegExp("^"+r+"$",Se)}catch{return new RegExp("$.")}return vt._glob=t,vt._src=r,vt}a(D7e,"parse");As.makeRe=function(t,e){return new ti(t,e||{}).makeRe()};ti.prototype.makeRe=S7e;function S7e(){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,A=e.noglobstar?K3:e.dot?B7e:I7e,r=e.nocase?"i":"",i=t.map(function(n){return n.map(function(s){return s===$3?A:typeof s=="string"?v7e(s):s._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,r)}catch{this.regexp=!1}return this.regexp}a(S7e,"makeRe");As.match=function(t,e,A){A=A||{};var r=new ti(e,A);return t=t.filter(function(i){return r.match(i)}),r.options.nonull&&!t.length&&t.push(e),t};ti.prototype.match=a(function(e,A){if(typeof A>"u"&&(A=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&A)return!0;var r=this.options;Pf.sep!=="/"&&(e=e.split(Pf.sep).join("/")),e=e.split(R$),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var n,s;for(s=e.length-1;s>=0&&(n=e[s],!n);s--);for(s=0;s<i.length;s++){var o=i[s],c=e;r.matchBase&&o.length===1&&(c=[n]);var l=this.matchOne(c,o,A);if(l)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate},"match");ti.prototype.matchOne=function(t,e,A){var r=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,n=0,s=t.length,o=e.length;i<s&&n<o;i++,n++){this.debug("matchOne loop");var c=e[n],l=t[i];if(this.debug(e,c,l),c===!1)return!1;if(c===$3){this.debug("GLOBSTAR",[e,c,l]);var d=i,u=n+1;if(u===o){for(this.debug("** at the end");i<s;i++)if(t[i]==="."||t[i]===".."||!r.dot&&t[i].charAt(0)===".")return!1;return!0}for(;d<s;){var p=t[d];if(this.debug(`
|
||||
globstar while`,t,d,e,u,p),this.matchOne(t.slice(d),e.slice(u),A))return this.debug("globstar found match!",d,s,p),!0;if(p==="."||p===".."||!r.dot&&p.charAt(0)==="."){this.debug("dot detected!",t,d,e,u);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(A&&(this.debug(`
|
||||
>>> no match, partial?`,t,d,e,u),d===s))}var g;if(typeof c=="string"?(g=l===c,this.debug("string match",c,l,g)):(g=l.match(c),this.debug("pattern match",c,l,g)),!g)return!1}if(i===s&&n===o)return!0;if(i===s)return A;if(n===o)return i===s-1&&t[i]==="";throw new Error("wtf?")};function E7e(t){return t.replace(/\\(.)/g,"$1")}a(E7e,"globUnescape");function m7e(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}a(m7e,"regExpEscape")});var R$=E(Gs=>{"use strict";var C7e=Gs&&Gs.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),f7e=Gs&&Gs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),N$=Gs&&Gs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&C7e(e,t,A);return f7e(e,t),e},Q7e=Gs&&Gs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.Path=void 0;var _f=N$(require("path")),Ol=N$(t2()),Of=Q7e(require("assert")),B7e=process.platform==="win32",j3=class{static{a(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if(Of.default(e,"Parameter 'itemPath' must not be empty"),e=Ol.safeTrimTrailingSeparator(e),!Ol.hasRoot(e))this.segments=e.split(_f.sep);else{let A=e,r=Ol.dirname(A);for(;r!==A;){let i=_f.basename(A);this.segments.unshift(i),A=r,r=Ol.dirname(A)}this.segments.unshift(A)}else{Of.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let A=0;A<e.length;A++){let r=e[A];Of.default(r,"Parameter 'itemPath' must not contain any empty segments"),r=Ol.normalizeSeparators(e[A]),A===0&&Ol.hasRoot(r)?(r=Ol.safeTrimTrailingSeparator(r),Of.default(r===Ol.dirname(r),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(r)):(Of.default(!r.includes(_f.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(r))}}}toString(){let e=this.segments[0],A=e.endsWith(_f.sep)||B7e&&/^[A-Z]:$/i.test(e);for(let r=1;r<this.segments.length;r++)A?A=!1:e+=_f.sep,e+=this.segments[r];return e}};Gs.Path=j3});var D$=E(Js=>{"use strict";var I7e=Js&&Js.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),y7e=Js&&Js.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),K3=Js&&Js.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&I7e(e,t,A);return y7e(e,t),e},w7e=Js&&Js.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Js,"__esModule",{value:!0});Js.Pattern=void 0;var b7e=K3(require("os")),Pf=K3(require("path")),Cn=K3(t2()),Ru=w7e(require("assert")),N7e=b$(),X3=A2(),n2=R$(),wc=process.platform==="win32",Z3=class t{static{a(this,"Pattern")}constructor(e,A=!1,r,i){this.negate=!1;let n;if(typeof e=="string")n=e.trim();else{r=r||[],Ru.default(r.length,"Parameter 'segments' must not empty");let l=t.getLiteral(r[0]);Ru.default(l&&Cn.hasAbsoluteRoot(l),"Parameter 'segments' first element must be a root path"),n=new n2.Path(r).toString().trim(),e&&(n=`!${n}`)}for(;n.startsWith("!");)this.negate=!this.negate,n=n.substr(1).trim();n=t.fixupPattern(n,i),this.segments=new n2.Path(n).segments,this.trailingSeparator=Cn.normalizeSeparators(n).endsWith(Pf.sep),n=Cn.safeTrimTrailingSeparator(n);let s=!1,o=this.segments.map(l=>t.getLiteral(l)).filter(l=>!s&&!(s=l===""));this.searchPath=new n2.Path(o).toString(),this.rootRegExp=new RegExp(t.regExpEscape(o[0]),wc?"i":""),this.isImplicitPattern=A;let c={dot:!0,nobrace:!0,nocase:wc,nocomment:!0,noext:!0,nonegate:!0};n=wc?n.replace(/\\/g,"/"):n,this.minimatch=new N7e.Minimatch(n,c)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Cn.normalizeSeparators(e),!e.endsWith(Pf.sep)&&this.isImplicitPattern===!1&&(e=`${e}${Pf.sep}`)):e=Cn.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?X3.MatchKind.Directory:X3.MatchKind.All:X3.MatchKind.None}partialMatch(e){return e=Cn.safeTrimTrailingSeparator(e),Cn.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(wc?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(wc?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,A){Ru.default(e,"pattern cannot be empty");let r=new n2.Path(e).segments.map(i=>t.getLiteral(i));if(Ru.default(r.every((i,n)=>(i!=="."||n===0)&&i!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),Ru.default(!Cn.hasRoot(e)||r[0],`Invalid pattern '${e}'. Root segment must not contLine truncated
|
||||
>>> no match, partial?`,t,d,e,u),d===s))}var g;if(typeof c=="string"?(g=l===c,this.debug("string match",c,l,g)):(g=l.match(c),this.debug("pattern match",c,l,g)),!g)return!1}if(i===s&&n===o)return!0;if(i===s)return A;if(n===o)return i===s-1&&t[i]==="";throw new Error("wtf?")};function x7e(t){return t.replace(/\\(.)/g,"$1")}a(x7e,"globUnescape");function v7e(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}a(v7e,"regExpEscape")});var k$=E(Gs=>{"use strict";var k7e=Gs&&Gs.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),F7e=Gs&&Gs.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),v$=Gs&&Gs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&k7e(e,t,A);return F7e(e,t),e},L7e=Gs&&Gs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.Path=void 0;var qf=v$(require("path")),Ol=v$(n2()),Hf=L7e(require("assert")),U7e=process.platform==="win32",e8=class{static{a(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if(Hf.default(e,"Parameter 'itemPath' must not be empty"),e=Ol.safeTrimTrailingSeparator(e),!Ol.hasRoot(e))this.segments=e.split(qf.sep);else{let A=e,r=Ol.dirname(A);for(;r!==A;){let i=qf.basename(A);this.segments.unshift(i),A=r,r=Ol.dirname(A)}this.segments.unshift(A)}else{Hf.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let A=0;A<e.length;A++){let r=e[A];Hf.default(r,"Parameter 'itemPath' must not contain any empty segments"),r=Ol.normalizeSeparators(e[A]),A===0&&Ol.hasRoot(r)?(r=Ol.safeTrimTrailingSeparator(r),Hf.default(r===Ol.dirname(r),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(r)):(Hf.default(!r.includes(qf.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(r))}}}toString(){let e=this.segments[0],A=e.endsWith(qf.sep)||U7e&&/^[A-Z]:$/i.test(e);for(let r=1;r<this.segments.length;r++)A?A=!1:e+=qf.sep,e+=this.segments[r];return e}};Gs.Path=e8});var F$=E(Js=>{"use strict";var T7e=Js&&Js.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),M7e=Js&&Js.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r8=Js&&Js.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&T7e(e,t,A);return M7e(e,t),e},_7e=Js&&Js.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Js,"__esModule",{value:!0});Js.Pattern=void 0;var O7e=r8(require("os")),Yf=r8(require("path")),Cn=r8(n2()),Du=_7e(require("assert")),P7e=x$(),t8=s2(),c2=k$(),wc=process.platform==="win32",A8=class t{static{a(this,"Pattern")}constructor(e,A=!1,r,i){this.negate=!1;let n;if(typeof e=="string")n=e.trim();else{r=r||[],Du.default(r.length,"Parameter 'segments' must not empty");let l=t.getLiteral(r[0]);Du.default(l&&Cn.hasAbsoluteRoot(l),"Parameter 'segments' first element must be a root path"),n=new c2.Path(r).toString().trim(),e&&(n=`!${n}`)}for(;n.startsWith("!");)this.negate=!this.negate,n=n.substr(1).trim();n=t.fixupPattern(n,i),this.segments=new c2.Path(n).segments,this.trailingSeparator=Cn.normalizeSeparators(n).endsWith(Yf.sep),n=Cn.safeTrimTrailingSeparator(n);let s=!1,o=this.segments.map(l=>t.getLiteral(l)).filter(l=>!s&&!(s=l===""));this.searchPath=new c2.Path(o).toString(),this.rootRegExp=new RegExp(t.regExpEscape(o[0]),wc?"i":""),this.isImplicitPattern=A;let c={dot:!0,nobrace:!0,nocase:wc,nocomment:!0,noext:!0,nonegate:!0};n=wc?n.replace(/\\/g,"/"):n,this.minimatch=new P7e.Minimatch(n,c)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Cn.normalizeSeparators(e),!e.endsWith(Yf.sep)&&this.isImplicitPattern===!1&&(e=`${e}${Yf.sep}`)):e=Cn.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?t8.MatchKind.Directory:t8.MatchKind.All:t8.MatchKind.None}partialMatch(e){return e=Cn.safeTrimTrailingSeparator(e),Cn.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(wc?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(wc?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,A){Du.default(e,"pattern cannot be empty");let r=new c2.Path(e).segments.map(i=>t.getLiteral(i));if(Du.default(r.every((i,n)=>(i!=="."||n===0)&&i!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),Du.default(!Cn.hasRoot(e)||r[0],`Invalid pattern '${e}'. Root segment must not contLine truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`));let i=e.split(`
|
||||
`).map(n=>n.trim());for(let n of i)!n||n.startsWith("#")||r.patterns.push(new k$.Pattern(n));return r.searchPaths.push(...a2.getSearchPaths(r.patterns)),r})}static stat(e,A,r){return e8(this,void 0,void 0,function*(){let i;if(A.followSymbolicLinks)try{i=yield qf.promises.stat(e.path)}catch(n){if(n.code==="ENOENT"){if(A.omitBrokenSymbolicLinks){t8.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw n}else i=yield qf.promises.lstat(e.path);if(i.isDirectory()&&A.followSymbolicLinks){let n=yield qf.promises.realpath(e.path);for(;r.length>=e.level;)r.pop();if(r.some(s=>s===n)){t8.debug(`Symlink cycle detected for path '${e.path}' and realpath '${n}'`);return}r.push(n)}return i})}};xr.DefaultGlobber=A8});var U$=E(yh=>{"use strict";var F7e=yh&&yh.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(yh,"__esModule",{value:!0});yh.create=void 0;var L7e=L$();function U7e(t,e){return F7e(this,void 0,void 0,function*(){return yield L7e.DefaultGlobber.create(t,e)})}a(U7e,"create");yh.create=U7e});var u2=E((Fe,P$)=>{Fe=P$.exports=Ve;var Nt;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Nt=a(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):Nt=a(function(){},"debug");Fe.SEMVER_SPEC_VERSION="2.0.0";var Yf=256,o2=Number.MAX_SAFE_INTEGER||9007199254740991,r8=16,T7e=Yf-6,wh=Fe.re=[],bt=Fe.safeRe=[],T=Fe.src=[],U=Fe.tokens={},_$=0;function $e(t){U[t]=_$++}a($e,"tok");var n8="[a-zA-Z0-9-]",i8=[["\\s",1],["\\d",Yf],[n8,T7e]];function Jf(t){for(var e=0;e<i8.length;e++){var A=i8[e][0],r=i8[e][1];t=t.split(A+"*").join(A+"{0,"+r+"}").split(A+"+").join(A+"{1,"+r+"}")}return t}a(Jf,"makeSafeRe");$e("NUMERICIDENTIFIER");T[U.NUMERICIDENTIFIER]="0|[1-9]\\d*";$e("NUMERICIDENTIFIERLOOSE");T[U.NUMERICIDENTIFIERLOOSE]="\\d+";$e("NONNUMERICIDENTIFIER");T[U.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+n8+"*";$e("MAINVERSION");T[U.MAINVERSION]="("+T[U.NUMERICIDENTIFIER]+")\\.("+T[U.NUMERICIDENTIFIER]+")\\.("+T[U.NUMERICIDENTIFIER]+")";$e("MAINVERSIONLOOSE");T[U.MAINVERSIONLOOSE]="("+T[U.NUMERICIDENTIFIERLOOSE]+")\\.("+T[U.NUMERICIDENTIFIERLOOSE]+")\\.("+T[U.NUMERICIDENTIFIERLOOSE]+")";$e("PRERELEASEIDENTIFIER");T[U.PRERELEASEIDENTIFIER]="(?:"+T[U.NUMERICIDENTIFIER]+"|"+T[U.NONNUMERICIDENTIFIER]+")";$e("PRERELEASEIDENTIFIERLOOSE");T[U.PRERELEASEIDENTIFIERLOOSE]="(?:"+T[U.NUMERICIDENTIFIERLOOSE]+"|"+T[U.NONNUMERICIDENTIFIER]+")";$e("PRERELEASE");T[U.PRERELEASE]="(?:-("+T[U.PRERELEASEIDENTIFIER]+"(?:\\."+T[U.PRERELEASEIDENTIFIER]+")*))";$e("PRERELEASELOOSE");T[U.PRERELEASELOOSE]="(?:-?("+T[U.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+T[U.PRERELEASEIDENTIFIERLOOSE]+")*))";$e("BUILDIDENTIFIER");T[U.BUILDIDENTIFIER]=n8+"+";$e("BUILD");T[U.BUILD]="(?:\\+("+T[U.BUILDIDENTIFIER]+"(?:\\."+T[U.BUILDIDENTIFIER]+")*))";$e("FULL");$e("FULLPLAIN");T[U.FULLPLAIN]="v?"+T[U.MAINVERSION]+T[U.PRERELEASE]+"?"+T[U.BUILD]+"?";T[U.FULL]="^"+T[U.FULLPLAIN]+"$";$e("LOOSEPLAIN");T[U.LOOSEPLAIN]="[v=\\s]*"+T[U.MAINVERSIONLOOSE]+T[U.PRERELEASELOOSE]+"?"+T[U.BUILD]+"?";$e("LOOSE");T[U.LOOSE]="^"+T[U.LOOSEPLAIN]+"$";$e("GTLT");T[U.GTLT]="((?:<|>)?=?)";$e("XRANGEIDENTIFIERLOOSE");T[U.XRANGEIDENTIFIERLOOSE]=T[U.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";$e("XRANGEIDENTIFIER");T[U.XRANGEIDENTIFIER]=T[U.NUMERICIDENTIFIER]+"|x|X|\\*";$e("XRANGEPLAIN");T[U.XRANGEPLAIN]="[v=\\s]*("+T[U.XRANGEIDENTIFIER]+")(?:\\.("+T[U.XRANGEIDENTIFIER]+")(?:\\.("+T[U.XRANGEIDENTIFIER]+")(?:"+T[U.PRERELEASE]+")?"+T[U.BUILD]+"?)?)?";$e("XRANGEPLAINLOOSE");T[U.XRANGEPLAINLOOSE]="[v=\\s]*("+T[U.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+T[U.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+T[U.XRANGEIDENTIFIERLOOSE]+")(?:"+T[U.PRERELEASELOOSE]+")?"+T[U.BUILD]+"?)?)?";$e("XRANGE");T[U.XRANGE]="^"+T[U.GTLT]+"\\s*"+T[U.XRANGEPLAIN]+"$";$e("XRANGELOOSE");T[U.XRANGELOOSE]="^"+T[U.GTLT]+"\\s*"+T[U.XRANGEPLAINLOOSE]+"$";$e("COERCE");T[U.COERCE]="(^|[^\\d])(\\d{1,"+r8+"})(?:\\.(\\d{1,"+r8+"}))?(?:\\.(\\d{1,"+r8+"}))?(?:$|[^\\d])";$e("COERCERTL");wh[U.COERCERTL]=new RegExp(T[U.COERCE],"g");bt[U.COERCERTL]=new RegExp(Jf(T[U.COERCE]),"g");$e("LONETILDE");T[U.LONETILDE]="(?:~>?)";$e("TILDETRIM");T[U.TILDETRIM]="(\\s*)"+T[U.LONETILDE]+"\\s+";wh[U.TILDETRIM]=new RegExp(T[U.TILDETRIM],"g");bt[U.TILDETRIM]=new RegExp(Jf(T[U.TILDETRIM]),"g");var M7e="$1~";$e("TILDE");T[U.TILDE]="^"+T[U.LONETILDE]+T[U.XRANGEPLAIN]+"$";$e("TILDELOOSE");T[U.TILDELOOSE]="^"+T[U.LONETILDE]+T[U.XRANGEPLAINLOOSE]+"$";$e("LONECARET");T[U.LONECARET]="(?:\\^)";$e("CARETTRIM");T[U.CARETTRIM]="(\\s*)"+T[U.LONECARET]+"\\s+";wh[U.CARET
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var l=!0,d=BMe(c.globGenerator()),u;u=yield d.next(),e=u.done,!e;l=!0){i=u.value,l=!1;let p=i,g=p2.relative(o,p).replace(new RegExp(`\\${p2.sep}`,"g"),"/");Vf.debug(`Matched: ${g}`),g===""?s.push("."):s.push(`${g}`)}}catch(p){A={error:p}}finally{try{!l&&!e&&(r=d.return)&&(yield r.call(d))}finally{if(A)throw A.error}}return s})}a(SMe,"resolvePaths");Et.resolvePaths=SMe;function xMe(t){return Rh(this,void 0,void 0,function*(){return bMe.promisify(l8.unlink)(t)})}a(xMe,"unlinkFile");Et.unlinkFile=xMe;function V$(t,e=[]){return Rh(this,void 0,void 0,function*(){let A="";e.push("--version"),Vf.debug(`Checking ${t} ${e.join(" ")}`);try{yield IMe.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:r=>A+=r.toString(),stderr:r=>A+=r.toString()}})}catch(r){Vf.debug(r.message)}return A=A.trim(),Vf.debug(A),A})}a(V$,"getVersion");function vMe(){return Rh(this,void 0,void 0,function*(){let t=yield V$("zstd",["--quiet"]),e=wMe.clean(t);return Vf.debug(`zstd version: ${e}`),t===""?xu.CompressionMethod.Gzip:xu.CompressionMethod.ZstdWithoutLong})}a(vMe,"getCompressionMethod");Et.getCompressionMethod=vMe;function kMe(t){return t===xu.CompressionMethod.Gzip?xu.CacheFilename.Gzip:xu.CacheFilename.Zstd}a(kMe,"getCacheFileName");Et.getCacheFileName=kMe;function FMe(){return Rh(this,void 0,void 0,function*(){return l8.existsSync(xu.GnuTarPathOnWindows)?xu.GnuTarPathOnWindows:(yield V$("tar")).toLowerCase().includes("gnu tar")?G$.which("tar"):""})}a(FMe,"getGnuTarPathOnWindows");Et.getGnuTarPathOnWindows=FMe;function LMe(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}a(LMe,"assertDefined");Et.assertDefined=LMe;function UMe(t,e,A=!1){let r=t.slice();return e&&r.push(e),process.platform==="win32"&&!A&&r.push("windows-only"),r.push(NMe),J$.createHash("sha256").update(r.join("|")).digest("hex")}a(UMe,"getCacheVersion");Et.getCacheVersion=UMe;function TMe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}a(TMe,"getRuntimeToken");Et.getRuntimeToken=TMe});function Wf(){return g2>h2.length-16&&(W$.default.randomFillSync(h2),g2=0),h2.slice(g2,g2+=16)}var W$,h2,g2,d8=Le(()=>{W$=Nr(require("crypto")),h2=new Uint8Array(256),g2=h2.length;a(Wf,"rng")});var z$,j$=Le(()=>{z$=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function MMe(t){return typeof t=="string"&&z$.test(t)}var ql,zf=Le(()=>{j$();a(MMe,"validate");ql=MMe});function _Me(t,e=0){let A=(ti[t[e+0]]+ti[t[e+1]]+ti[t[e+2]]+ti[t[e+3]]+"-"+ti[t[e+4]]+ti[t[e+5]]+"-"+ti[t[e+6]]+ti[t[e+7]]+"-"+ti[t[e+8]]+ti[t[e+9]]+"-"+ti[t[e+10]]+ti[t[e+11]]+ti[t[e+12]]+ti[t[e+13]]+ti[t[e+14]]+ti[t[e+15]]).toLowerCase();if(!ql(A))throw TypeError("Stringified UUID is invalid");return A}var ti,Hl,jf=Le(()=>{zf();ti=[];for(let t=0;t<256;++t)ti.push((t+256).toString(16).substr(1));a(_Me,"stringify");Hl=_Me});function OMe(t,e,A){let r=e&&A||0,i=e||new Array(16);t=t||{};let n=t.node||X$,s=t.clockseq!==void 0?t.clockseq:u8;if(n==null||s==null){let p=t.random||(t.rng||Wf)();n==null&&(n=X$=[p[0]|1,p[1],p[2],p[3],p[4],p[5]]),s==null&&(s=u8=(p[6]<<8|p[7])&16383)}let o=t.msecs!==void 0?t.msecs:Date.now(),c=t.nsecs!==void 0?t.nsecs:g8+1,l=o-p8+(c-g8)/1e4;if(l<0&&t.clockseq===void 0&&(s=s+1&16383),(l<0||o>p8)&&t.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p8=o,g8=c,u8=s,o+=122192928e5;let d=((o&268435455)*1e4+c)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;let u=o/4294967296*1e4&268435455;i[r++]=u>>>8&255,i[r++]=u&255,i[r++]=u>>>24&15|16,i[r++]=u>>>16&255,i[r++]=s>>>8|128,i[r++]=s&255;for(let p=0;p<6;++p)i[r+p]=n[p];return e||Hl(i)}var X$,u8,p8,g8,Z$,K$=Le(()=>{d8();jf();p8=0,g8=0;a(OMe,"v1");Z$=OMe});function PMe(t){if(!ql(t))throw TypeError("Invalid UUID");let e,A=new Uint8Array(16);return A[0]=(e=parseInt(t.slice(0,8),16))>>>24,A[1]=e>>>16&255,A[2]=e>>>8&255,A[3]=e&255,A[4]=(e=parseInt(t.slice(9,13),16))>>>8,A[5]=e&255,A[6]=(e=parseInt(t.slice(14,18),16))>>>8,A[7]=e&255,A[8]=(e=parseInt(t.slice(19,23),16))>>>8,A[9]=e&255,A[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,A[11]=e/4294967296&255,A[12]=e>>>24&255,A[13]=e>>>16&255,A[14]=e>>>8&255,A[15]=e&255,A}var E2,h8=Le(()=>{zf();a(PMe,"parse");E2=PMe});function qMe(t){t=unescape(encodeURIComponent(t));let e=[];for(let A=0;A<t.length;++A)e.push(t.charCodeAt(A));return e}function Xf(t,e,A){function r(i,n,s,o){if(typeof i=="string"&&(i=qMe(i)),typeof n=="string"&&(n=E2(n)),n.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+i.length);if(c.set(n),c.set(i,n.length),c=A(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,s){o=o||0;for(let l=0;l<16;++l)s[o+l]=c[l];return s}return Hl(c)}a(r,"generateUUID");try{r.name=t}catch{}return r.DNS=HMe,r.URL=YMe,r}var HMe,YMe,E8=Le(()=>{jf();h8();a(qMe,"stringToBytes
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(f8)});var Io=E((Oee,Yl)=>{(function(){var t,e,A,r,i,n,s,o=[].slice,c={}.hasOwnProperty;t=a(function(){var l,d,u,p,g,h;if(h=arguments[0],g=2<=arguments.length?o.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(l=0,u=g.length;l<u;l++)if(p=g[l],p!=null)for(d in p)c.call(p,d)&&(h[d]=p[d]);return h},"assign"),i=a(function(l){return!!l&&Object.prototype.toString.call(l)==="[object Function]"},"isFunction"),n=a(function(l){var d;return!!l&&((d=typeof l)=="function"||d==="object")},"isObject"),A=a(function(l){return i(Array.isArray)?Array.isArray(l):Object.prototype.toString.call(l)==="[object Array]"},"isArray"),r=a(function(l){var d;if(A(l))return!l.length;for(d in l)if(c.call(l,d))return!1;return!0},"isEmpty"),s=a(function(l){var d,u;return n(l)&&(u=Object.getPrototypeOf(l))&&(d=u.constructor)&&typeof d=="function"&&d instanceof d&&Function.prototype.toString.call(d)===Function.prototype.toString.call(Object)},"isPlainObject"),e=a(function(l){return i(l.valueOf)?l.valueOf():l},"getValue"),Yl.exports.assign=t,Yl.exports.isFunction=i,Yl.exports.isObject=n,Yl.exports.isArray=A,Yl.exports.isEmpty=r,Yl.exports.isPlainObject=s,Yl.exports.getValue=e}).call(Oee)});var Q8=E((Pee,qee)=>{(function(){var t;qee.exports=t=function(){function e(){}return a(e,"XMLDOMImplementation"),e.prototype.hasFeature=function(A,r){return!0},e.prototype.createDocumentType=function(A,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(A,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(A){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(A,r){throw new Error("This DOM method is not implemented.")},e}()}).call(Pee)});var Gee=E((Hee,Yee)=>{(function(){var t;Yee.exports=t=function(){function e(){}return a(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(A){throw new Error(A)},e}()}).call(Hee)});var Wee=E((Jee,Vee)=>{(function(){var t;Vee.exports=t=function(){function e(A){this.arr=A||[]}return a(e,"XMLDOMStringList"),Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(A){return this.arr[A]||null},e.prototype.contains=function(A){return this.arr.indexOf(A)!==-1},e}()}).call(Jee)});var Xee=E((zee,jee)=>{(function(){var t,e,A;e=Gee(),A=Wee(),jee.exports=t=function(){function r(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=Object.create(this.defaultParams)}return a(r,"XMLDOMConfiguration"),Object.defineProperty(r.prototype,"parameterNames",{get:function(){return new A(Object.keys(this.defaultParams))}}),r.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},r.prototype.canSetParameter=function(i,n){return!0},r.prototype.setParameter=function(i,n){return n!=null?this.params[i]=n:delete this.params[i]},r}()}).call(zee)});var KA=E((Zee,Kee)=>{(function(){Kee.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(Zee)});var B8=E(($ee,ete)=>{(function(){var t,e,A;t=KA(),A=rs(),ete.exports=e=function(){function r(i,n,s){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),n==null)throw new Error("Missing attribute name. "+this.debugInfo(n));this.name=this.stringify.name(n),this.value=this.stringify.attValue(s),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return a(r,"XMLAttribute"),Object.defineProperty(r.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(r.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(r.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(r.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(r.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(r.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(r.prototype,"specified",{get:function(){return!0}}),r.prototype.clone=function(){return Object.create(this)},r.prototype.toString=function(i){return this.options.writer.attribute(this,this.options.writer.filterOptions(i))},r.prototype.debugInfo=function(i){return i=i||this.name,i==null?"parent: <"+this.parent.name+">":"attribute: {"+i+"}, parent: <"+this.parent.name+">"},r.prototype.isEqualNode=function(i
Line truncated
|
||||
`,C.offset=(S=I.offset)!=null?S:0,C.dontPrettyTextNodes=(w=(k=I.dontPrettyTextNodes)!=null?k:I.dontprettytextnodes)!=null?w:0,C.spaceBeforeSlash=(D=(v=I.spaceBeforeSlash)!=null?v:I.spacebeforeslash)!=null?D:"",C.spaceBeforeSlash===!0&&(C.spaceBeforeSlash=" "),C.suppressPrettyCount=0,C.user={},C.state=e.None,C},b.prototype.indent=function(I,C,Q){var N;return!C.pretty||C.suppressPrettyCount?"":C.pretty&&(N=(Q||0)+C.offset+1,N>0)?new Array(N).join(C.indent):""},b.prototype.endline=function(I,C,Q){return!C.pretty||C.suppressPrettyCount?"":C.newline},b.prototype.attribute=function(I,C,Q){var N;return this.openAttribute(I,C,Q),N=" "+I.name+'="'+I.value+'"',this.closeAttribute(I,C,Q),N},b.prototype.cdata=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<![CDATA[",C.state=e.InsideTag,N+=I.value,C.state=e.CloseTag,N+="]]>"+this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.comment=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<!-- ",C.state=e.InsideTag,N+=I.value,C.state=e.CloseTag,N+=" -->"+this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.declaration=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<?xml",C.state=e.InsideTag,N+=' version="'+I.version+'"',I.encoding!=null&&(N+=' encoding="'+I.encoding+'"'),I.standalone!=null&&(N+=' standalone="'+I.standalone+'"'),C.state=e.CloseTag,N+=C.spaceBeforeSlash+"?>",N+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.docType=function(I,C,Q){var N,S,w,k,D;if(Q||(Q=0),this.openNode(I,C,Q),C.state=e.OpenTag,k=this.indent(I,C,Q),k+="<!DOCTYPE "+I.root().name,I.pubID&&I.sysID?k+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.sysID&&(k+=' SYSTEM "'+I.sysID+'"'),I.children.length>0){for(k+=" [",k+=this.endline(I,C,Q),C.state=e.InsideTag,D=I.children,S=0,w=D.length;S<w;S++)N=D[S],k+=this.writeChildNode(N,C,Q+1);C.state=e.CloseTag,k+="]"}return C.state=e.CloseTag,k+=C.spaceBeforeSlash+">",k+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),k},b.prototype.element=function(I,C,Q){var N,S,w,k,D,v,x,L,q,le,_,rt,Se,vt;Q||(Q=0),le=!1,_="",this.openNode(I,C,Q),C.state=e.OpenTag,_+=this.indent(I,C,Q)+"<"+I.name,rt=I.attribs;for(q in rt)B.call(rt,q)&&(N=rt[q],_+=this.attribute(N,C,Q));if(w=I.children.length,k=w===0?null:I.children[0],w===0||I.children.every(function(ht){return(ht.type===t.Text||ht.type===t.Raw)&&ht.value===""}))C.allowEmpty?(_+=">",C.state=e.CloseTag,_+="</"+I.name+">"+this.endline(I,C,Q)):(C.state=e.CloseTag,_+=C.spaceBeforeSlash+"/>"+this.endline(I,C,Q));else if(C.pretty&&w===1&&(k.type===t.Text||k.type===t.Raw)&&k.value!=null)_+=">",C.state=e.InsideTag,C.suppressPrettyCount++,le=!0,_+=this.writeChildNode(k,C,Q+1),C.suppressPrettyCount--,le=!1,C.state=e.CloseTag,_+="</"+I.name+">"+this.endline(I,C,Q);else{if(C.dontPrettyTextNodes){for(Se=I.children,D=0,x=Se.length;D<x;D++)if(S=Se[D],(S.type===t.Text||S.type===t.Raw)&&S.value!=null){C.suppressPrettyCount++,le=!0;break}}for(_+=">"+this.endline(I,C,Q),C.state=e.InsideTag,vt=I.children,v=0,L=vt.length;v<L;v++)S=vt[v],_+=this.writeChildNode(S,C,Q+1);C.state=e.CloseTag,_+=this.indent(I,C,Q)+"</"+I.name+">",le&&C.suppressPrettyCount--,_+=this.endline(I,C,Q),C.state=e.None}return this.closeNode(I,C,Q),_},b.prototype.writeChildNode=function(I,C,Q){switch(I.type){case t.CData:return this.cdata(I,C,Q);case t.Comment:return this.comment(I,C,Q);case t.Element:return this.element(I,C,Q);case t.Raw:return this.raw(I,C,Q);case t.Text:return this.text(I,C,Q);case t.ProcessingInstruction:return this.processingInstruction(I,C,Q);case t.Dummy:return"";case t.Declaration:return this.declaration(I,C,Q);case t.DocType:return this.docType(I,C,Q);case t.AttributeDeclaration:return this.dtdAttList(I,C,Q);case t.ElementDeclaration:return this.dtdElement(I,C,Q);case t.EntityDeclaration:return this.dtdEntity(I,C,Q);case t.NotationDeclaration:return this.dtdNotation(I,C,Q);default:throw new Error("Unknown XML node type: "+I.constructor.name)}},b.prototype.processingInstruction=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<?",C.state=e.InsideTag,N+=I.target,I.value&&(N+=" "+I.value),C.state=e.CloseTag,N+=C.spaceBeforeSlash+"?>",N+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.raw=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q),C.state=e.InsideTag,N+=I.value,C.state=e.CloseTag,N+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.text=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q),C.state=e.InsideTag,N+=I.value,C.state=e.CloseTag,N+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.dtdAttList=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<!ATTLIST",C.state=e.InsideTag,N+=" "+I.elementName+" "+I.attributeName+" "+I.attributeTyp
Line truncated
|
||||
`).map(n=>n.trim());for(let n of i)!n||n.startsWith("#")||r.patterns.push(new M$.Pattern(n));return r.searchPaths.push(...d2.getSearchPaths(r.patterns)),r})}static stat(e,A,r){return n8(this,void 0,void 0,function*(){let i;if(A.followSymbolicLinks)try{i=yield Gf.promises.stat(e.path)}catch(n){if(n.code==="ENOENT"){if(A.omitBrokenSymbolicLinks){s8.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw n}else i=yield Gf.promises.lstat(e.path);if(i.isDirectory()&&A.followSymbolicLinks){let n=yield Gf.promises.realpath(e.path);for(;r.length>=e.level;)r.pop();if(r.some(s=>s===n)){s8.debug(`Symlink cycle detected for path '${e.path}' and realpath '${n}'`);return}r.push(n)}return i})}};xr.DefaultGlobber=a8});var P$=E(wh=>{"use strict";var W7e=wh&&wh.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(wh,"__esModule",{value:!0});wh.create=void 0;var z7e=O$();function j7e(t,e){return W7e(this,void 0,void 0,function*(){return yield z7e.DefaultGlobber.create(t,e)})}a(j7e,"create");wh.create=j7e});var E2=E((Fe,J$)=>{Fe=J$.exports=Ve;var Nt;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Nt=a(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):Nt=a(function(){},"debug");Fe.SEMVER_SPEC_VERSION="2.0.0";var Vf=256,u2=Number.MAX_SAFE_INTEGER||9007199254740991,o8=16,X7e=Vf-6,bh=Fe.re=[],bt=Fe.safeRe=[],T=Fe.src=[],U=Fe.tokens={},Y$=0;function $e(t){U[t]=Y$++}a($e,"tok");var l8="[a-zA-Z0-9-]",c8=[["\\s",1],["\\d",Vf],[l8,X7e]];function zf(t){for(var e=0;e<c8.length;e++){var A=c8[e][0],r=c8[e][1];t=t.split(A+"*").join(A+"{0,"+r+"}").split(A+"+").join(A+"{1,"+r+"}")}return t}a(zf,"makeSafeRe");$e("NUMERICIDENTIFIER");T[U.NUMERICIDENTIFIER]="0|[1-9]\\d*";$e("NUMERICIDENTIFIERLOOSE");T[U.NUMERICIDENTIFIERLOOSE]="\\d+";$e("NONNUMERICIDENTIFIER");T[U.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+l8+"*";$e("MAINVERSION");T[U.MAINVERSION]="("+T[U.NUMERICIDENTIFIER]+")\\.("+T[U.NUMERICIDENTIFIER]+")\\.("+T[U.NUMERICIDENTIFIER]+")";$e("MAINVERSIONLOOSE");T[U.MAINVERSIONLOOSE]="("+T[U.NUMERICIDENTIFIERLOOSE]+")\\.("+T[U.NUMERICIDENTIFIERLOOSE]+")\\.("+T[U.NUMERICIDENTIFIERLOOSE]+")";$e("PRERELEASEIDENTIFIER");T[U.PRERELEASEIDENTIFIER]="(?:"+T[U.NUMERICIDENTIFIER]+"|"+T[U.NONNUMERICIDENTIFIER]+")";$e("PRERELEASEIDENTIFIERLOOSE");T[U.PRERELEASEIDENTIFIERLOOSE]="(?:"+T[U.NUMERICIDENTIFIERLOOSE]+"|"+T[U.NONNUMERICIDENTIFIER]+")";$e("PRERELEASE");T[U.PRERELEASE]="(?:-("+T[U.PRERELEASEIDENTIFIER]+"(?:\\."+T[U.PRERELEASEIDENTIFIER]+")*))";$e("PRERELEASELOOSE");T[U.PRERELEASELOOSE]="(?:-?("+T[U.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+T[U.PRERELEASEIDENTIFIERLOOSE]+")*))";$e("BUILDIDENTIFIER");T[U.BUILDIDENTIFIER]=l8+"+";$e("BUILD");T[U.BUILD]="(?:\\+("+T[U.BUILDIDENTIFIER]+"(?:\\."+T[U.BUILDIDENTIFIER]+")*))";$e("FULL");$e("FULLPLAIN");T[U.FULLPLAIN]="v?"+T[U.MAINVERSION]+T[U.PRERELEASE]+"?"+T[U.BUILD]+"?";T[U.FULL]="^"+T[U.FULLPLAIN]+"$";$e("LOOSEPLAIN");T[U.LOOSEPLAIN]="[v=\\s]*"+T[U.MAINVERSIONLOOSE]+T[U.PRERELEASELOOSE]+"?"+T[U.BUILD]+"?";$e("LOOSE");T[U.LOOSE]="^"+T[U.LOOSEPLAIN]+"$";$e("GTLT");T[U.GTLT]="((?:<|>)?=?)";$e("XRANGEIDENTIFIERLOOSE");T[U.XRANGEIDENTIFIERLOOSE]=T[U.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";$e("XRANGEIDENTIFIER");T[U.XRANGEIDENTIFIER]=T[U.NUMERICIDENTIFIER]+"|x|X|\\*";$e("XRANGEPLAIN");T[U.XRANGEPLAIN]="[v=\\s]*("+T[U.XRANGEIDENTIFIER]+")(?:\\.("+T[U.XRANGEIDENTIFIER]+")(?:\\.("+T[U.XRANGEIDENTIFIER]+")(?:"+T[U.PRERELEASE]+")?"+T[U.BUILD]+"?)?)?";$e("XRANGEPLAINLOOSE");T[U.XRANGEPLAINLOOSE]="[v=\\s]*("+T[U.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+T[U.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+T[U.XRANGEIDENTIFIERLOOSE]+")(?:"+T[U.PRERELEASELOOSE]+")?"+T[U.BUILD]+"?)?)?";$e("XRANGE");T[U.XRANGE]="^"+T[U.GTLT]+"\\s*"+T[U.XRANGEPLAIN]+"$";$e("XRANGELOOSE");T[U.XRANGELOOSE]="^"+T[U.GTLT]+"\\s*"+T[U.XRANGEPLAINLOOSE]+"$";$e("COERCE");T[U.COERCE]="(^|[^\\d])(\\d{1,"+o8+"})(?:\\.(\\d{1,"+o8+"}))?(?:\\.(\\d{1,"+o8+"}))?(?:$|[^\\d])";$e("COERCERTL");bh[U.COERCERTL]=new RegExp(T[U.COERCE],"g");bt[U.COERCERTL]=new RegExp(zf(T[U.COERCE]),"g");$e("LONETILDE");T[U.LONETILDE]="(?:~>?)";$e("TILDETRIM");T[U.TILDETRIM]="(\\s*)"+T[U.LONETILDE]+"\\s+";bh[U.TILDETRIM]=new RegExp(T[U.TILDETRIM],"g");bt[U.TILDETRIM]=new RegExp(zf(T[U.TILDETRIM]),"g");var Z7e="$1~";$e("TILDE");T[U.TILDE]="^"+T[U.LONETILDE]+T[U.XRANGEPLAIN]+"$";$e("TILDELOOSE");T[U.TILDELOOSE]="^"+T[U.LONETILDE]+T[U.XRANGEPLAINLOOSE]+"$";$e("LONECARET");T[U.LONECARET]="(?:\\^)";$e("CARETTRIM");T[U.CARETTRIM]="(\\s*)"+T[U.LONECARET]+"\\s+";bh[U.CARET
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var l=!0,d=UMe(c.globGenerator()),u;u=yield d.next(),e=u.done,!e;l=!0){i=u.value,l=!1;let p=i,g=m2.relative(o,p).replace(new RegExp(`\\${m2.sep}`,"g"),"/");jf.debug(`Matched: ${g}`),g===""?s.push("."):s.push(`${g}`)}}catch(p){A={error:p}}finally{try{!l&&!e&&(r=d.return)&&(yield r.call(d))}finally{if(A)throw A.error}}return s})}a(YMe,"resolvePaths");Et.resolvePaths=YMe;function GMe(t){return Dh(this,void 0,void 0,function*(){return OMe.promisify(h8.unlink)(t)})}a(GMe,"unlinkFile");Et.unlinkFile=GMe;function Z$(t,e=[]){return Dh(this,void 0,void 0,function*(){let A="";e.push("--version"),jf.debug(`Checking ${t} ${e.join(" ")}`);try{yield TMe.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:r=>A+=r.toString(),stderr:r=>A+=r.toString()}})}catch(r){jf.debug(r.message)}return A=A.trim(),jf.debug(A),A})}a(Z$,"getVersion");function JMe(){return Dh(this,void 0,void 0,function*(){let t=yield Z$("zstd",["--quiet"]),e=_Me.clean(t);return jf.debug(`zstd version: ${e}`),t===""?vu.CompressionMethod.Gzip:vu.CompressionMethod.ZstdWithoutLong})}a(JMe,"getCompressionMethod");Et.getCompressionMethod=JMe;function VMe(t){return t===vu.CompressionMethod.Gzip?vu.CacheFilename.Gzip:vu.CacheFilename.Zstd}a(VMe,"getCacheFileName");Et.getCacheFileName=VMe;function WMe(){return Dh(this,void 0,void 0,function*(){return h8.existsSync(vu.GnuTarPathOnWindows)?vu.GnuTarPathOnWindows:(yield Z$("tar")).toLowerCase().includes("gnu tar")?j$.which("tar"):""})}a(WMe,"getGnuTarPathOnWindows");Et.getGnuTarPathOnWindows=WMe;function zMe(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}a(zMe,"assertDefined");Et.assertDefined=zMe;function jMe(t,e,A=!1){let r=t.slice();return e&&r.push(e),process.platform==="win32"&&!A&&r.push("windows-only"),r.push(PMe),X$.createHash("sha256").update(r.join("|")).digest("hex")}a(jMe,"getCacheVersion");Et.getCacheVersion=jMe;function XMe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}a(XMe,"getRuntimeToken");Et.getRuntimeToken=XMe});function Xf(){return C2>f2.length-16&&(K$.default.randomFillSync(f2),C2=0),f2.slice(C2,C2+=16)}var K$,f2,C2,E8=Le(()=>{K$=Nr(require("crypto")),f2=new Uint8Array(256),C2=f2.length;a(Xf,"rng")});var $$,eee=Le(()=>{$$=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function ZMe(t){return typeof t=="string"&&$$.test(t)}var ql,Zf=Le(()=>{eee();a(ZMe,"validate");ql=ZMe});function KMe(t,e=0){let A=(Ai[t[e+0]]+Ai[t[e+1]]+Ai[t[e+2]]+Ai[t[e+3]]+"-"+Ai[t[e+4]]+Ai[t[e+5]]+"-"+Ai[t[e+6]]+Ai[t[e+7]]+"-"+Ai[t[e+8]]+Ai[t[e+9]]+"-"+Ai[t[e+10]]+Ai[t[e+11]]+Ai[t[e+12]]+Ai[t[e+13]]+Ai[t[e+14]]+Ai[t[e+15]]).toLowerCase();if(!ql(A))throw TypeError("Stringified UUID is invalid");return A}var Ai,Hl,Kf=Le(()=>{Zf();Ai=[];for(let t=0;t<256;++t)Ai.push((t+256).toString(16).substr(1));a(KMe,"stringify");Hl=KMe});function $Me(t,e,A){let r=e&&A||0,i=e||new Array(16);t=t||{};let n=t.node||tee,s=t.clockseq!==void 0?t.clockseq:m8;if(n==null||s==null){let p=t.random||(t.rng||Xf)();n==null&&(n=tee=[p[0]|1,p[1],p[2],p[3],p[4],p[5]]),s==null&&(s=m8=(p[6]<<8|p[7])&16383)}let o=t.msecs!==void 0?t.msecs:Date.now(),c=t.nsecs!==void 0?t.nsecs:f8+1,l=o-C8+(c-f8)/1e4;if(l<0&&t.clockseq===void 0&&(s=s+1&16383),(l<0||o>C8)&&t.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C8=o,f8=c,m8=s,o+=122192928e5;let d=((o&268435455)*1e4+c)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;let u=o/4294967296*1e4&268435455;i[r++]=u>>>8&255,i[r++]=u&255,i[r++]=u>>>24&15|16,i[r++]=u>>>16&255,i[r++]=s>>>8|128,i[r++]=s&255;for(let p=0;p<6;++p)i[r+p]=n[p];return e||Hl(i)}var tee,m8,C8,f8,Aee,ree=Le(()=>{E8();Kf();C8=0,f8=0;a($Me,"v1");Aee=$Me});function e_e(t){if(!ql(t))throw TypeError("Invalid UUID");let e,A=new Uint8Array(16);return A[0]=(e=parseInt(t.slice(0,8),16))>>>24,A[1]=e>>>16&255,A[2]=e>>>8&255,A[3]=e&255,A[4]=(e=parseInt(t.slice(9,13),16))>>>8,A[5]=e&255,A[6]=(e=parseInt(t.slice(14,18),16))>>>8,A[7]=e&255,A[8]=(e=parseInt(t.slice(19,23),16))>>>8,A[9]=e&255,A[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,A[11]=e/4294967296&255,A[12]=e>>>24&255,A[13]=e>>>16&255,A[14]=e>>>8&255,A[15]=e&255,A}var Q2,Q8=Le(()=>{Zf();a(e_e,"parse");Q2=e_e});function t_e(t){t=unescape(encodeURIComponent(t));let e=[];for(let A=0;A<t.length;++A)e.push(t.charCodeAt(A));return e}function $f(t,e,A){function r(i,n,s,o){if(typeof i=="string"&&(i=t_e(i)),typeof n=="string"&&(n=Q2(n)),n.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+i.length);if(c.set(n),c.set(i,n.length),c=A(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,s){o=o||0;for(let l=0;l<16;++l)s[o+l]=c[l];return s}return Hl(c)}a(r,"generateUUID");try{r.name=t}catch{}return r.DNS=A_e,r.URL=r_e,r}var A_e,r_e,B8=Le(()=>{Kf();Q8();a(t_e,"strin
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(w8)});var Io=E((Gee,Yl)=>{(function(){var t,e,A,r,i,n,s,o=[].slice,c={}.hasOwnProperty;t=a(function(){var l,d,u,p,g,h;if(h=arguments[0],g=2<=arguments.length?o.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(l=0,u=g.length;l<u;l++)if(p=g[l],p!=null)for(d in p)c.call(p,d)&&(h[d]=p[d]);return h},"assign"),i=a(function(l){return!!l&&Object.prototype.toString.call(l)==="[object Function]"},"isFunction"),n=a(function(l){var d;return!!l&&((d=typeof l)=="function"||d==="object")},"isObject"),A=a(function(l){return i(Array.isArray)?Array.isArray(l):Object.prototype.toString.call(l)==="[object Array]"},"isArray"),r=a(function(l){var d;if(A(l))return!l.length;for(d in l)if(c.call(l,d))return!1;return!0},"isEmpty"),s=a(function(l){var d,u;return n(l)&&(u=Object.getPrototypeOf(l))&&(d=u.constructor)&&typeof d=="function"&&d instanceof d&&Function.prototype.toString.call(d)===Function.prototype.toString.call(Object)},"isPlainObject"),e=a(function(l){return i(l.valueOf)?l.valueOf():l},"getValue"),Yl.exports.assign=t,Yl.exports.isFunction=i,Yl.exports.isObject=n,Yl.exports.isArray=A,Yl.exports.isEmpty=r,Yl.exports.isPlainObject=s,Yl.exports.getValue=e}).call(Gee)});var b8=E((Jee,Vee)=>{(function(){var t;Vee.exports=t=function(){function e(){}return a(e,"XMLDOMImplementation"),e.prototype.hasFeature=function(A,r){return!0},e.prototype.createDocumentType=function(A,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(A,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(A){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(A,r){throw new Error("This DOM method is not implemented.")},e}()}).call(Jee)});var jee=E((Wee,zee)=>{(function(){var t;zee.exports=t=function(){function e(){}return a(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(A){throw new Error(A)},e}()}).call(Wee)});var Kee=E((Xee,Zee)=>{(function(){var t;Zee.exports=t=function(){function e(A){this.arr=A||[]}return a(e,"XMLDOMStringList"),Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(A){return this.arr[A]||null},e.prototype.contains=function(A){return this.arr.indexOf(A)!==-1},e}()}).call(Xee)});var tte=E(($ee,ete)=>{(function(){var t,e,A;e=jee(),A=Kee(),ete.exports=t=function(){function r(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=Object.create(this.defaultParams)}return a(r,"XMLDOMConfiguration"),Object.defineProperty(r.prototype,"parameterNames",{get:function(){return new A(Object.keys(this.defaultParams))}}),r.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},r.prototype.canSetParameter=function(i,n){return!0},r.prototype.setParameter=function(i,n){return n!=null?this.params[i]=n:delete this.params[i]},r}()}).call($ee)});var KA=E((Ate,rte)=>{(function(){rte.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(Ate)});var N8=E((ite,nte)=>{(function(){var t,e,A;t=KA(),A=rs(),nte.exports=e=function(){function r(i,n,s){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),n==null)throw new Error("Missing attribute name. "+this.debugInfo(n));this.name=this.stringify.name(n),this.value=this.stringify.attValue(s),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return a(r,"XMLAttribute"),Object.defineProperty(r.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(r.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(r.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(r.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(r.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(r.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(r.prototype,"specified",{get:function(){return!0}}),r.prototype.clone=function(){return Object.create(this)},r.prototype.toString=function(i){return this.options.writer.attribute(this,this.options.writer.filterOptions(i))},r.prototype.debugInfo=function(i){return i=i||this.name,i==null?"parent: <"+this.parent.name+">":"attribute: {"+i+"}, parent: <"+this.parent.name+">"},r.prototype.isEqualNode=function(i
Line truncated
|
||||
`,C.offset=(S=I.offset)!=null?S:0,C.dontPrettyTextNodes=(w=(k=I.dontPrettyTextNodes)!=null?k:I.dontprettytextnodes)!=null?w:0,C.spaceBeforeSlash=(D=(v=I.spaceBeforeSlash)!=null?v:I.spacebeforeslash)!=null?D:"",C.spaceBeforeSlash===!0&&(C.spaceBeforeSlash=" "),C.suppressPrettyCount=0,C.user={},C.state=e.None,C},b.prototype.indent=function(I,C,Q){var N;return!C.pretty||C.suppressPrettyCount?"":C.pretty&&(N=(Q||0)+C.offset+1,N>0)?new Array(N).join(C.indent):""},b.prototype.endline=function(I,C,Q){return!C.pretty||C.suppressPrettyCount?"":C.newline},b.prototype.attribute=function(I,C,Q){var N;return this.openAttribute(I,C,Q),N=" "+I.name+'="'+I.value+'"',this.closeAttribute(I,C,Q),N},b.prototype.cdata=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<![CDATA[",C.state=e.InsideTag,N+=I.value,C.state=e.CloseTag,N+="]]>"+this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.comment=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<!-- ",C.state=e.InsideTag,N+=I.value,C.state=e.CloseTag,N+=" -->"+this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.declaration=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<?xml",C.state=e.InsideTag,N+=' version="'+I.version+'"',I.encoding!=null&&(N+=' encoding="'+I.encoding+'"'),I.standalone!=null&&(N+=' standalone="'+I.standalone+'"'),C.state=e.CloseTag,N+=C.spaceBeforeSlash+"?>",N+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.docType=function(I,C,Q){var N,S,w,k,D;if(Q||(Q=0),this.openNode(I,C,Q),C.state=e.OpenTag,k=this.indent(I,C,Q),k+="<!DOCTYPE "+I.root().name,I.pubID&&I.sysID?k+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.sysID&&(k+=' SYSTEM "'+I.sysID+'"'),I.children.length>0){for(k+=" [",k+=this.endline(I,C,Q),C.state=e.InsideTag,D=I.children,S=0,w=D.length;S<w;S++)N=D[S],k+=this.writeChildNode(N,C,Q+1);C.state=e.CloseTag,k+="]"}return C.state=e.CloseTag,k+=C.spaceBeforeSlash+">",k+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),k},b.prototype.element=function(I,C,Q){var N,S,w,k,D,v,x,L,q,le,_,rt,Se,vt;Q||(Q=0),le=!1,_="",this.openNode(I,C,Q),C.state=e.OpenTag,_+=this.indent(I,C,Q)+"<"+I.name,rt=I.attribs;for(q in rt)B.call(rt,q)&&(N=rt[q],_+=this.attribute(N,C,Q));if(w=I.children.length,k=w===0?null:I.children[0],w===0||I.children.every(function(ht){return(ht.type===t.Text||ht.type===t.Raw)&&ht.value===""}))C.allowEmpty?(_+=">",C.state=e.CloseTag,_+="</"+I.name+">"+this.endline(I,C,Q)):(C.state=e.CloseTag,_+=C.spaceBeforeSlash+"/>"+this.endline(I,C,Q));else if(C.pretty&&w===1&&(k.type===t.Text||k.type===t.Raw)&&k.value!=null)_+=">",C.state=e.InsideTag,C.suppressPrettyCount++,le=!0,_+=this.writeChildNode(k,C,Q+1),C.suppressPrettyCount--,le=!1,C.state=e.CloseTag,_+="</"+I.name+">"+this.endline(I,C,Q);else{if(C.dontPrettyTextNodes){for(Se=I.children,D=0,x=Se.length;D<x;D++)if(S=Se[D],(S.type===t.Text||S.type===t.Raw)&&S.value!=null){C.suppressPrettyCount++,le=!0;break}}for(_+=">"+this.endline(I,C,Q),C.state=e.InsideTag,vt=I.children,v=0,L=vt.length;v<L;v++)S=vt[v],_+=this.writeChildNode(S,C,Q+1);C.state=e.CloseTag,_+=this.indent(I,C,Q)+"</"+I.name+">",le&&C.suppressPrettyCount--,_+=this.endline(I,C,Q),C.state=e.None}return this.closeNode(I,C,Q),_},b.prototype.writeChildNode=function(I,C,Q){switch(I.type){case t.CData:return this.cdata(I,C,Q);case t.Comment:return this.comment(I,C,Q);case t.Element:return this.element(I,C,Q);case t.Raw:return this.raw(I,C,Q);case t.Text:return this.text(I,C,Q);case t.ProcessingInstruction:return this.processingInstruction(I,C,Q);case t.Dummy:return"";case t.Declaration:return this.declaration(I,C,Q);case t.DocType:return this.docType(I,C,Q);case t.AttributeDeclaration:return this.dtdAttList(I,C,Q);case t.ElementDeclaration:return this.dtdElement(I,C,Q);case t.EntityDeclaration:return this.dtdEntity(I,C,Q);case t.NotationDeclaration:return this.dtdNotation(I,C,Q);default:throw new Error("Unknown XML node type: "+I.constructor.name)}},b.prototype.processingInstruction=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<?",C.state=e.InsideTag,N+=I.target,I.value&&(N+=" "+I.value),C.state=e.CloseTag,N+=C.spaceBeforeSlash+"?>",N+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.raw=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q),C.state=e.InsideTag,N+=I.value,C.state=e.CloseTag,N+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.text=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q),C.state=e.InsideTag,N+=I.value,C.state=e.CloseTag,N+=this.endline(I,C,Q),C.state=e.None,this.closeNode(I,C,Q),N},b.prototype.dtdAttList=function(I,C,Q){var N;return this.openNode(I,C,Q),C.state=e.OpenTag,N=this.indent(I,C,Q)+"<!ATTLIST",C.state=e.InsideTag,N+=" "+I.elementName+" "+I.attributeName+" "+I.attributeTyp
Line truncated
|
||||
`||R==="\r"||R===" "}a(I,"isWhitespace");function C(R){return R==='"'||R==="'"}a(C,"isQuote");function Q(R){return R===">"||I(R)}a(Q,"isAttribEnd");function N(R,y){return R.test(y)}a(N,"isMatch");function S(R,y){return!N(R,y)}a(S,"notMatch");var w=0;t.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(R){var y=t.ENTITIES[R],M=typeof y=="number"?String.fromCharCode(y):y;t.ENTITIES[R]=M});for(var k in t.STATE)t.STATE[t.STATE[k]]=k;w=t.STATE;function D(R,y,M){R[y]&&R[y](M)}a(D,"emit");function v(R,y,M){R.textNode&&x(R),D(R,y,M)}a(v,"emitNode");function x(R){R.textNode=L(R.opt,R.textNode),R.textNode&&D(R,"ontext",R.textNode),R.textNode=""}a(x,"closeText");function L(R,y){return R.trim&&(y=y.trim()),R.normalize&&(y=y.replace(/\s+/g," ")),y}a(L,"textopts");function q(R,y){return x(R),R.trackPosition&&(y+=`
|
||||
Line: `+R.line+`
|
||||
Column: `+R.column+`
|
||||
Char: `+R.c),y=new Error(y),R.error=y,D(R,"onerror",y),R}a(q,"error");function le(R){return R.sawRoot&&!R.closedRoot&&_(R,"Unclosed root tag"),R.state!==w.BEGIN&&R.state!==w.BEGIN_WHITESPACE&&R.state!==w.TEXT&&q(R,"Unexpected end"),x(R),R.c="",R.closed=!0,D(R,"onend"),A.call(R,R.strict,R.opt),R}a(le,"end");function _(R,y){if(typeof R!="object"||!(R instanceof A))throw new Error("bad call to strictFail");R.strict&&q(R,y)}a(_,"strictFail");function rt(R){R.strict||(R.tagName=R.tagName[R.looseCase]());var y=R.tags[R.tags.length-1]||R,M=R.tag={name:R.tagName,attributes:{}};R.opt.xmlns&&(M.ns=y.ns),R.attribList.length=0,v(R,"onopentagstart",M)}a(rt,"newTag");function Se(R,y){var M=R.indexOf(":"),F=M<0?["",R]:R.split(":"),kt=F[0],pr=F[1];return y&&R==="xmlns"&&(kt="xmlns",pr=""),{prefix:kt,local:pr}}a(Se,"qname");function vt(R){if(R.strict||(R.attribName=R.attribName[R.looseCase]()),R.attribList.indexOf(R.attribName)!==-1||R.tag.attributes.hasOwnProperty(R.attribName)){R.attribName=R.attribValue="";return}if(R.opt.xmlns){var y=Se(R.attribName,!0),M=y.prefix,F=y.local;if(M==="xmlns")if(F==="xml"&&R.attribValue!==p)_(R,"xml: prefix must be bound to "+p+`
|
||||
Actual: `+R.attribValue);else if(F==="xmlns"&&R.attribValue!==g)_(R,"xmlns: prefix must be bound to "+g+`
|
||||
Actual: `+R.attribValue);else{var kt=R.tag,pr=R.tags[R.tags.length-1]||R;kt.ns===pr.ns&&(kt.ns=Object.create(pr.ns)),kt.ns[F]=R.attribValue}R.attribList.push([R.attribName,R.attribValue])}else R.tag.attributes[R.attribName]=R.attribValue,v(R,"onattribute",{name:R.attribName,value:R.attribValue});R.attribName=R.attribValue=""}a(vt,"attrib");function ht(R,y){if(R.opt.xmlns){var M=R.tag,F=Se(R.tagName);M.prefix=F.prefix,M.local=F.local,M.uri=M.ns[F.prefix]||"",M.prefix&&!M.uri&&(_(R,"Unbound namespace prefix: "+JSON.stringify(R.tagName)),M.uri=F.prefix);var kt=R.tags[R.tags.length-1]||R;M.ns&&kt.ns!==M.ns&&Object.keys(M.ns).forEach(function(f_){v(R,"onopennamespace",{prefix:f_,uri:M.ns[f_]})});for(var pr=0,gr=R.attribList.length;pr<gr;pr++){var Xi=R.attribList[pr],ys=Xi[0],xp=Xi[1],Gr=Se(ys,!0),Xo=Gr.prefix,TQe=Gr.local,C_=Xo===""?"":M.ns[Xo]||"",r4={name:ys,value:xp,prefix:Xo,local:TQe,uri:C_};Xo&&Xo!=="xmlns"&&!C_&&(_(R,"Unbound namespace prefix: "+JSON.stringify(Xo)),r4.uri=Xo),R.tag.attributes[ys]=r4,v(R,"onattribute",r4)}R.attribList.length=0}R.tag.isSelfClosing=!!y,R.sawRoot=!0,R.tags.push(R.tag),v(R,"onopentag",R.tag),y||(!R.noscript&&R.tagName.toLowerCase()==="script"?R.state=w.SCRIPT:R.state=w.TEXT,R.tag=null,R.tagName=""),R.attribName=R.attribValue="",R.attribList.length=0}a(ht,"openTag");function wr(R){if(!R.tagName){_(R,"Weird empty close tag."),R.textNode+="</>",R.state=w.TEXT;return}if(R.script){if(R.tagName!=="script"){R.script+="</"+R.tagName+">",R.tagName="",R.state=w.SCRIPT;return}v(R,"onscript",R.script),R.script=""}var y=R.tags.length,M=R.tagName;R.strict||(M=M[R.looseCase]());for(var F=M;y--;){var kt=R.tags[y];if(kt.name!==F)_(R,"Unexpected close tag");else break}if(y<0){_(R,"Unmatched closing tag: "+R.tagName),R.textNode+="</"+R.tagName+">",R.state=w.TEXT;return}R.tagName=M;for(var pr=R.tags.length;pr-- >y;){var gr=R.tag=R.tags.pop();R.tagName=R.tag.name,v(R,"onclosetag",R.tagName);var Xi={};for(var ys in gr.ns)Xi[ys]=gr.ns[ys];var xp=R.tags[R.tags.length-1]||R;R.opt.xmlns&&gr.ns!==xp.ns&&Object.keys(gr.ns).forEach(function(Gr){var Xo=gr.ns[Gr];v(R,"onclosenamespace",{prefix:Gr,uri:Xo})})}y===0&&(R.closedRoot=!0),R.tagName=R.attribValue=R.attribName="",R.attribList.length=0,R.state=w.TEXT}a(wr,"closeTag");function br(R){var y=R.entity,M=y.toLowerCase(),F,kt="";return R.ENTITIES[y]?R.ENTITIES[y]:R.ENTITIES[M]?R.ENTITIES[M]:(y=M,y.charAt(0)==="#"&&(y.charAt(1)==="x"?(y=y.slice(2),F=parseInt(y,16),kt=F.toString(16)):(y=y.slice(1),F=parseInt(y,10),kt=F.toString(10))),y=y.replace(/^0+/,""),isNaN(F)||kt.toLowerCase()!==y?(_(R,"Invalid character entity"),"&"+R.entity+";"):String.fromCodePoint(F))}a(br,"parseEntity");function pe(R,y){y==="<"?(R.state=w.OPEN_WAKA,R.startTagPosition=R.position):I(y)||(_(R,"Non-whitespace before first tag."),R.textNode=y,R.state=w.TEXT)}a(pe,"beginWhiteSpace");function ot(R,y){var M="";return y<R.length&&(M=R.charAt(y)),M}a(ot,"charAt");function Ct(R){var y=this;if(this.error)throw this.error;if(y.closed)return q(y,"Cannot write after close. Assign an onready handler.");if(R===null)return le(y);typeof R=="object"&&(R=R.toString());for(var M=0,F="";F=ot(R,M++),y.c=F,!!F;)switch(y.trackPosition&&(y.position++,F===`
|
||||
Actual: `+R.attribValue);else{var kt=R.tag,pr=R.tags[R.tags.length-1]||R;kt.ns===pr.ns&&(kt.ns=Object.create(pr.ns)),kt.ns[F]=R.attribValue}R.attribList.push([R.attribName,R.attribValue])}else R.tag.attributes[R.attribName]=R.attribValue,v(R,"onattribute",{name:R.attribName,value:R.attribValue});R.attribName=R.attribValue=""}a(vt,"attrib");function ht(R,y){if(R.opt.xmlns){var M=R.tag,F=Se(R.tagName);M.prefix=F.prefix,M.local=F.local,M.uri=M.ns[F.prefix]||"",M.prefix&&!M.uri&&(_(R,"Unbound namespace prefix: "+JSON.stringify(R.tagName)),M.uri=F.prefix);var kt=R.tags[R.tags.length-1]||R;M.ns&&kt.ns!==M.ns&&Object.keys(M.ns).forEach(function(w_){v(R,"onopennamespace",{prefix:w_,uri:M.ns[w_]})});for(var pr=0,gr=R.attribList.length;pr<gr;pr++){var Xi=R.attribList[pr],ys=Xi[0],vp=Xi[1],Jr=Se(ys,!0),Xo=Jr.prefix,XQe=Jr.local,y_=Xo===""?"":M.ns[Xo]||"",o4={name:ys,value:vp,prefix:Xo,local:XQe,uri:y_};Xo&&Xo!=="xmlns"&&!y_&&(_(R,"Unbound namespace prefix: "+JSON.stringify(Xo)),o4.uri=Xo),R.tag.attributes[ys]=o4,v(R,"onattribute",o4)}R.attribList.length=0}R.tag.isSelfClosing=!!y,R.sawRoot=!0,R.tags.push(R.tag),v(R,"onopentag",R.tag),y||(!R.noscript&&R.tagName.toLowerCase()==="script"?R.state=w.SCRIPT:R.state=w.TEXT,R.tag=null,R.tagName=""),R.attribName=R.attribValue="",R.attribList.length=0}a(ht,"openTag");function wr(R){if(!R.tagName){_(R,"Weird empty close tag."),R.textNode+="</>",R.state=w.TEXT;return}if(R.script){if(R.tagName!=="script"){R.script+="</"+R.tagName+">",R.tagName="",R.state=w.SCRIPT;return}v(R,"onscript",R.script),R.script=""}var y=R.tags.length,M=R.tagName;R.strict||(M=M[R.looseCase]());for(var F=M;y--;){var kt=R.tags[y];if(kt.name!==F)_(R,"Unexpected close tag");else break}if(y<0){_(R,"Unmatched closing tag: "+R.tagName),R.textNode+="</"+R.tagName+">",R.state=w.TEXT;return}R.tagName=M;for(var pr=R.tags.length;pr-- >y;){var gr=R.tag=R.tags.pop();R.tagName=R.tag.name,v(R,"onclosetag",R.tagName);var Xi={};for(var ys in gr.ns)Xi[ys]=gr.ns[ys];var vp=R.tags[R.tags.length-1]||R;R.opt.xmlns&&gr.ns!==vp.ns&&Object.keys(gr.ns).forEach(function(Jr){var Xo=gr.ns[Jr];v(R,"onclosenamespace",{prefix:Jr,uri:Xo})})}y===0&&(R.closedRoot=!0),R.tagName=R.attribValue=R.attribName="",R.attribList.length=0,R.state=w.TEXT}a(wr,"closeTag");function br(R){var y=R.entity,M=y.toLowerCase(),F,kt="";return R.ENTITIES[y]?R.ENTITIES[y]:R.ENTITIES[M]?R.ENTITIES[M]:(y=M,y.charAt(0)==="#"&&(y.charAt(1)==="x"?(y=y.slice(2),F=parseInt(y,16),kt=F.toString(16)):(y=y.slice(1),F=parseInt(y,10),kt=F.toString(10))),y=y.replace(/^0+/,""),isNaN(F)||kt.toLowerCase()!==y?(_(R,"Invalid character entity"),"&"+R.entity+";"):String.fromCodePoint(F))}a(br,"parseEntity");function pe(R,y){y==="<"?(R.state=w.OPEN_WAKA,R.startTagPosition=R.position):I(y)||(_(R,"Non-whitespace before first tag."),R.textNode=y,R.state=w.TEXT)}a(pe,"beginWhiteSpace");function ot(R,y){var M="";return y<R.length&&(M=R.charAt(y)),M}a(ot,"charAt");function Ct(R){var y=this;if(this.error)throw this.error;if(y.closed)return q(y,"Cannot write after close. Assign an onready handler.");if(R===null)return le(y);typeof R=="object"&&(R=R.toString());for(var M=0,F="";F=ot(R,M++),y.c=F,!!F;)switch(y.trackPosition&&(y.position++,F===`
|
||||
`?(y.line++,y.column=0):y.column++),y.state){case w.BEGIN:if(y.state=w.BEGIN_WHITESPACE,F==="\uFEFF")continue;pe(y,F);continue;case w.BEGIN_WHITESPACE:pe(y,F);continue;case w.TEXT:if(y.sawRoot&&!y.closedRoot){for(var kt=M-1;F&&F!=="<"&&F!=="&";)F=ot(R,M++),F&&y.trackPosition&&(y.position++,F===`
|
||||
`?(y.line++,y.column=0):y.column++);y.textNode+=R.substring(kt,M-1)}F==="<"&&!(y.sawRoot&&y.closedRoot&&!y.strict)?(y.state=w.OPEN_WAKA,y.startTagPosition=y.position):(!I(F)&&(!y.sawRoot||y.closedRoot)&&_(y,"Text data outside of root node."),F==="&"?y.state=w.TEXT_ENTITY:y.textNode+=F);continue;case w.SCRIPT:F==="<"?y.state=w.SCRIPT_ENDING:y.script+=F;continue;case w.SCRIPT_ENDING:F==="/"?y.state=w.CLOSE_TAG:(y.script+="<"+F,y.state=w.SCRIPT);continue;case w.OPEN_WAKA:if(F==="!")y.state=w.SGML_DECL,y.sgmlDecl="";else if(!I(F))if(N(m,F))y.state=w.OPEN_TAG,y.tagName=F;else if(F==="/")y.state=w.CLOSE_TAG,y.tagName="";else if(F==="?")y.state=w.PROC_INST,y.procInstName=y.procInstBody="";else{if(_(y,"Unencoded <"),y.startTagPosition+1<y.position){var pr=y.position-y.startTagPosition;F=new Array(pr).join(" ")+F}y.textNode+="<"+F,y.state=w.TEXT}continue;case w.SGML_DECL:(y.sgmlDecl+F).toUpperCase()===d?(v(y,"onopencdata"),y.state=w.CDATA,y.sgmlDecl="",y.cdata=""):y.sgmlDecl+F==="--"?(y.state=w.COMMENT,y.comment="",y.sgmlDecl=""):(y.sgmlDecl+F).toUpperCase()===u?(y.state=w.DOCTYPE,(y.doctype||y.sawRoot)&&_(y,"Inappropriately located doctype declaration"),y.doctype="",y.sgmlDecl=""):F===">"?(v(y,"onsgmldeclaration",y.sgmlDecl),y.sgmlDecl="",y.state=w.TEXT):(C(F)&&(y.state=w.SGML_DECL_QUOTED),y.sgmlDecl+=F);continue;case w.SGML_DECL_QUOTED:F===y.q&&(y.state=w.SGML_DECL,y.q=""),y.sgmlDecl+=F;continue;case w.DOCTYPE:F===">"?(y.state=w.TEXT,v(y,"ondoctype",y.doctype),y.doctype=!0):(y.doctype+=F,F==="["?y.state=w.DOCTYPE_DTD:C(F)&&(y.state=w.DOCTYPE_QUOTED,y.q=F));continue;case w.DOCTYPE_QUOTED:y.doctype+=F,F===y.q&&(y.q="",y.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:y.doctype+=F,F==="]"?y.state=w.DOCTYPE:C(F)&&(y.state=w.DOCTYPE_DTD_QUOTED,y.q=F);continue;case w.DOCTYPE_DTD_QUOTED:y.doctype+=F,F===y.q&&(y.state=w.DOCTYPE_DTD,y.q="");continue;case w.COMMENT:F==="-"?y.state=w.COMMENT_ENDING:y.comment+=F;continue;case w.COMMENT_ENDING:F==="-"?(y.state=w.COMMENT_ENDED,y.comment=L(y.opt,y.comment),y.comment&&v(y,"oncomment",y.comment),y.comment=""):(y.comment+="-"+F,y.state=w.COMMENT);continue;case w.COMMENT_ENDED:F!==">"?(_(y,"Malformed comment"),y.comment+="--"+F,y.state=w.COMMENT):y.state=w.TEXT;continue;case w.CDATA:F==="]"?y.state=w.CDATA_ENDING:y.cdata+=F;continue;case w.CDATA_ENDING:F==="]"?y.state=w.CDATA_ENDING_2:(y.cdata+="]"+F,y.state=w.CDATA);continue;case w.CDATA_ENDING_2:F===">"?(y.cdata&&v(y,"oncdata",y.cdata),v(y,"onclosecdata"),y.cdata="",y.state=w.TEXT):F==="]"?y.cdata+="]":(y.cdata+="]]"+F,y.state=w.CDATA);continue;case w.PROC_INST:F==="?"?y.state=w.PROC_INST_ENDING:I(F)?y.state=w.PROC_INST_BODY:y.procInstName+=F;continue;case w.PROC_INST_BODY:if(!y.procInstBody&&I(F))continue;F==="?"?y.state=w.PROC_INST_ENDING:y.procInstBody+=F;continue;case w.PROC_INST_ENDING:F===">"?(v(y,"onprocessinginstruction",{name:y.procInstName,body:y.procInstBody}),y.procInstName=y.procInstBody="",y.state=w.TEXT):(y.procInstBody+="?"+F,y.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:N(f,F)?y.tagName+=F:(rt(y),F===">"?ht(y):F==="/"?y.state=w.OPEN_TAG_SLASH:(I(F)||_(y,"Invalid character in tag name"),y.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:F===">"?(ht(y,!0),wr(y)):(_(y,"Forward-slash in opening tag not followed by >"),y.state=w.ATTRIB);continue;case w.ATTRIB:if(I(F))continue;F===">"?ht(y):F==="/"?y.state=w.OPEN_TAG_SLASH:N(m,F)?(y.attribName=F,y.attribValue="",y.state=w.ATTRIB_NAME):_(y,"Invalid attribute name");continue;case w.ATTRIB_NAME:F==="="?y.state=w.ATTRIB_VALUE:F===">"?(_(y,"Attribute without value"),y.attribValue=y.attribName,vt(y),ht(y)):I(F)?y.state=w.ATTRIB_NAME_SAW_WHITE:N(f,F)?y.attribName+=F:_(y,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if(F==="=")y.state=w.ATTRIB_VALUE;else{if(I(F))continue;_(y,"Attribute without value"),y.tag.attributes[y.attribName]="",y.attribValue="",v(y,"onattribute",{name:y.attribName,value:""}),y.attribName="",F===">"?ht(y):N(m,F)?(y.attribName=F,y.state=w.ATTRIB_NAME):(_(y,"Invalid attribute name"),y.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(I(F))continue;C(F)?(y.q=F,y.state=w.ATTRIB_VALUE_QUOTED):(_(y,"Unquoted attribute value"),y.state=w.ATTRIB_VALUE_UNQUOTED,y.attribValue=F);continue;case w.ATTRIB_VALUE_QUOTED:if(F!==y.q){F==="&"?y.state=w.ATTRIB_VALUE_ENTITY_Q:y.attribValue+=F;continue}vt(y),y.q="",y.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:I(F)?y.state=w.ATTRIB:F===">"?ht(y):F==="/"?y.state=w.OPEN_TAG_SLASH:N(m,F)?(_(y,"No whitespace between attributes"),y.attribName=F,y.attribValue="",y.state=w.ATTRIB_NAME):_(y,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!Q(F)){F==="&"?y.state=w.ATTRIB_VALUE_ENTITY_U:y.attribValue+=F;continue}vt(y),F===">"?ht(y):y.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(y.tagName)F===">"?wr(y):N(f,F)?y.tagName+=F:y.script?(y.script+="</"+y.tagName,y.tagName="",y.state=w.SCRIPT):(I(F)||_(y,"Invalid tagname in closing tag"),y.state=w.CLOSE_TAG_SAW_WHITE);else{if(I(F))continue;S
Line truncated
|
||||
`;ut.DEFAULT_CONTENT_TYPE="application/octet-stream";ut.prototype.append=function(t,e,A){A=A||{},typeof A=="string"&&(A={filename:A});var r=e5.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),bre.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,A),n=this._multiPartFooter();r(i),r(e),r(n),this._trackLength(i,e,A)};ut.prototype._trackLength=function(t,e,A){var r=0;A.knownLength!=null?r+=+A.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+ut.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof SOe))&&(A.knownLength||this._valuesToMeasure.push(e))};ut.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):DOe.stat(t.path,function(A,r){var i;if(A){e(A);return}i=r.size-(t.start?t.start:0),e(null,i)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(A){t.pause(),e(null,+A.headers["content-length"])}),t.resume()):e("Unknown stream")};ut.prototype._multiPartHeader=function(t,e,A){if(typeof A.header=="string")return A.header;var r=this._getContentDisposition(e,A),i=this._getContentType(e,A),n="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof A.header=="object"&&$8(s,A.header);var o;for(var c in s)s.hasOwnProperty(c)&&(o=s[c],o!=null&&(Array.isArray(o)||(o=[o]),o.length&&(n+=c+": "+o.join("; ")+ut.LINE_BREAK)));return"--"+this.getBoundary()+ut.LINE_BREAK+n+ut.LINE_BREAK};ut.prototype._getContentDisposition=function(t,e){var A,r;return typeof e.filepath=="string"?A=Z8.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?A=Z8.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(A=Z8.basename(t.client._httpMessage.path||"")),A&&(r='filename="'+A+'"'),r};ut.prototype._getContentType=function(t,e){var A=e.contentType;return!A&&t.name&&(A=K8.lookup(t.name)),!A&&t.path&&(A=K8.lookup(t.path)),!A&&t.readable&&t.hasOwnProperty("httpVersion")&&(A=t.headers["content-type"]),!A&&(e.filepath||e.filename)&&(A=K8.lookup(e.filepath||e.filename)),!A&&typeof t=="object"&&(A=ut.DEFAULT_CONTENT_TYPE),A};ut.prototype._multiPartFooter=function(){return function(t){var e=ut.LINE_BREAK,A=this._streams.length===0;A&&(e+=this._lastBoundary()),t(e)}.bind(this)};ut.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ut.LINE_BREAK};ut.prototype.getHeaders=function(t){var e,A={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(A[e.toLowerCase()]=t[e]);return A};ut.prototype.setBoundary=function(t){this._boundary=t};ut.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ut.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),A=0,r=this._streams.length;A<r;A++)typeof this._streams[A]!="function"&&(Buffer.isBuffer(this._streams[A])?t=Buffer.concat([t,this._streams[A]]):t=Buffer.concat([t,Buffer.from(this._streams[A])]),(typeof this._streams[A]!="string"||this._streams[A].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(ut.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ut.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};ut.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};ut.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ut.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}xOe.parallel(this._valuesToMeasure,this._lengthRetriever,function(A,r){if(A){t(A);return}r.forEach(function(i){e+=i}),t(null,e)})};ut.prototype.submit=function(t,e){var A,r,i={method:"post"};return typeof t=="string"?(t=ROe(t),r=$8({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(r=$8(t,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?A=NOe.request(r):A=bOe.request(r),this.getLength(function(n,s){if(n&&n!=="Unknown stream"){this._error(n);return}if(s&&A.setHeader("Content-Length",s),this.pipe(A),e){var o,c=a(function(l,d){return A.removeListener("error",c),A.removeListener("response",o),e.call(this,l,d)},"callback");o=c.bind(this,null),A.on("error",c),A.on("response",o)}}.bind(this)),A};ut.prototype._error=function(t){this.error||(this.error=t,this.pause(),th
Line truncated
|
||||
${yYe.sanitize(this)}`}};ss.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";ss.PARSE_ERROR="PARSE_ERROR";var La=BHe.createClientLogger("core-http");function Nne(t,e){return t?e.httpsAgent:e.httpAgent}a(Nne,"getCachedAgent");var Ab=class extends NHe.Transform{static{a(this,"ReportTransform")}constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,A,r){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),r(void 0)}};function jw(t){return t&&typeof t.pipe=="function"}a(jw,"isReadableStream");function Rne(t,e){return new Promise(A=>{t.once("close",()=>{e?.abort(),A()}),t.once("end",A),t.once("error",A)})}a(Rne,"isStreamComplete");function wYe(t){let e=new Kl;return t.forEach((A,r)=>{e.set(r,A)}),e}a(wYe,"parseHeaders");var rb=class{static{a(this,"NodeFetchHttpClient")}constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={}}async sendRequest(e){var A;if(!e&&typeof e!="object")throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");let r=new Xw.AbortController,i;if(e.abortSignal){if(e.abortSignal.aborted)throw new Xw.AbortError("The operation was aborted.");i=a(l=>{l.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",i)}if(e.timeout&&setTimeout(()=>{r.abort()},e.timeout),e.formData){let l=e.formData,d=new SHe.default,u=a((g,h)=>{typeof h=="function"&&(h=h()),h&&Object.prototype.hasOwnProperty.call(h,"value")&&Object.prototype.hasOwnProperty.call(h,"options")?d.append(g,h.value,h.options):d.append(g,h)},"appendFormValue");for(let g of Object.keys(l)){let h=l[g];if(Array.isArray(h))for(let m=0;m<h.length;m++)u(g,h[m]);else u(g,h)}e.body=d,e.formData=void 0;let p=e.headers.get("Content-Type");p&&p.indexOf("multipart/form-data")!==-1&&(typeof d.getBoundary=="function"?e.headers.set("Content-Type",`multipart/form-data; boundary=${d.getBoundary()}`):e.headers.remove("Content-Type"))}let n=e.body?typeof e.body=="function"?e.body():e.body:void 0;if(e.onUploadProgress&&e.body){let l=e.onUploadProgress,d=new Ab(l);jw(n)?n.pipe(d):d.end(n),n=d}let s=await this.prepareRequest(e),o=Object.assign({body:n,headers:e.headers.rawHeaders(),method:e.method,signal:r.signal,redirect:"manual"},s),c;try{let l=await this.fetch(e.url,o),d=wYe(l.headers),u=((A=e.streamResponseStatusCodes)===null||A===void 0?void 0:A.has(l.status))||e.streamResponseBody;c={headers:d,request:e,status:l.status,readableStreamBody:u?l.body:void 0,bodyAsText:u?void 0:await l.text()};let p=e.onDownloadProgress;if(p){let g=l.body||void 0;if(jw(g)){let h=new Ab(p);g.pipe(h),c.readableStreamBody=h}else{let h=parseInt(d.get("Content-Length"))||void 0;h&&p({loadedBytes:h})}}return await this.processRequest(c),c}catch(l){let d=l;throw d.code==="ENOTFOUND"?new ss(d.message,ss.REQUEST_SEND_ERROR,void 0,e):d.type==="aborted"?new Xw.AbortError("The operation was aborted."):d}finally{if(e.abortSignal&&i){let l=Promise.resolve();jw(n)&&(l=Rne(n));let d=Promise.resolve();jw(c?.readableStreamBody)&&(d=Rne(c.readableStreamBody,r)),Promise.all([l,d]).then(()=>{var u;(u=e.abortSignal)===null||u===void 0||u.removeEventListener("abort",i)}).catch(u=>{La.warning("Error when cleaning up abortListener on httpRequest",u)})}}}getOrCreateAgent(e){var A;let r=ck(e.url);if(e.proxySettings){let{host:i,port:n,username:s,password:o}=e.proxySettings,c=`${i}:${n}:${s}:${o}`,l=(A=this.proxyAgentMap.get(c))!==null&&A!==void 0?A:{},d=Nne(r,l);if(d)return d;let u=fYe(e.url,e.proxySettings,e.headers);return d=u.agent,u.isHttps?l.httpsAgent=u.agent:l.httpAgent=u.agent,this.proxyAgentMap.set(c,l),d}else if(e.keepAlive){let i=Nne(r,this.keepAliveAgents);if(i)return i;let n={keepAlive:e.keepAlive};return r?i=this.keepAliveAgents.httpsAgent=new Bne.Agent(n):i=this.keepAliveAgents.httpAgent=new Qne.Agent(n),i}else return r?Bne.globalAgent:Qne.globalAgent}async fetch(e,A){return xHe.default(e,A)}async prepareRequest(e){let A={};return A.agent=this.getOrCreateAgent(e),A.compress=e.decompressResponse,A}async processRequest(e){}};Z.HttpPipelineLogLevel=void 0;(function(t){t[t.OFF=0]="OFF",t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO"})(Z.HttpPipelineLogLevel||(Z.HttpPipelineLogLevel={}));function bYe(t){let{requestOptions:e,tracingOptions:A}=t,i=fHe.__rest(t,["requestOptions","tracingOptions"]);return e&&(i=Object.assign(Object.assign({},i),e)),A&&(i.tracingContext=A.tracingContext,i.spanOptions=A?.spanOptions),i}a(bYe,"operationOptionsToRequestOptionsBase");var fr=class{static{a(this,"BaseRequestPolicy")}constructor(e,A){this._nextPolicy=e,this._options=A}shouldLog(e){return this._options.shouldLog(e)}log(e,A){this._options.log(e,A)}},ib=class{static{a(this,"RequestPolicyOptions")}constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==Z.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,A){this._logger&&this.shouldLog(e)&&this._logger.log(e,A)}},Wne={explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:C
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},Kw=Object.assign({},Wne);Kw.explicitArray=!1;var yQ=Object.assign({},Wne);yQ.explicitArray=!1;yQ.renderOpts={pretty:!1};function lk(t,e={}){var A;return yQ.rootName=e.rootName,yQ.charkey=(A=e.xmlCharKey)!==null&&A!==void 0?A:Uc,new Tne.Builder(yQ).buildObject(t)}a(lk,"stringifyXML");function zne(t,e={}){var A;Kw.explicitRoot=!!e.includeRoot,Kw.charkey=(A=e.xmlCharKey)!==null&&A!==void 0?A:Uc;let r=new Tne.Parser(Kw);return new Promise((i,n)=>{t?r.parseString(t,(s,o)=>{s?n(s):i(o)}):n(new Error("Document is empty"))})}a(zne,"parseXML");function Lk(t,e){return{create:(A,r)=>new dk(A,r,t,e)}}a(Lk,"deserializationPolicy");var jne=["application/json","text/json"],Xne=["application/xml","application/atom+xml"],NYe={expectedContentTypes:{json:jne,xml:Xne}},dk=class extends fr{static{a(this,"DeserializationPolicy")}constructor(e,A,r,i={}){var n;super(e,A),this.jsonContentTypes=r&&r.json||jne,this.xmlContentTypes=r&&r.xml||Xne,this.xmlCharKey=(n=i.xmlCharKey)!==null&&n!==void 0?n:Uc}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(A=>Zne(this.jsonContentTypes,this.xmlContentTypes,A,{xmlCharKey:this.xmlCharKey}))}};function RYe(t){let e,A=t.request,r=A.operationSpec;if(r){let i=A.operationResponseGetter;i?e=i(r,t):e=r.responses[t.status]}return e}a(RYe,"getOperationResponse");function DYe(t){let e=t.request.shouldDeserialize,A;return e===void 0?A=!0:typeof e=="boolean"?A=e:A=e(t),A}a(DYe,"shouldDeserializeResponse");function Zne(t,e,A,r={}){var i,n,s;let o={rootName:(i=r.rootName)!==null&&i!==void 0?i:"",includeRoot:(n=r.includeRoot)!==null&&n!==void 0?n:!1,xmlCharKey:(s=r.xmlCharKey)!==null&&s!==void 0?s:Uc};return vYe(t,e,A,o).then(c=>{if(!DYe(c))return c;let l=c.request.operationSpec;if(!l||!l.responses)return c;let d=RYe(c),{error:u,shouldReturnResponse:p}=xYe(c,l,d);if(u)throw u;if(p)return c;if(d){if(d.bodyMapper){let g=c.parsedBody;l.isXML&&d.bodyMapper.type.name===Hu.Sequence&&(g=typeof g=="object"?g[d.bodyMapper.xmlElementName]:[]);try{c.parsedBody=l.serializer.deserialize(d.bodyMapper,g,"operationRes.parsedBody",r)}catch(h){throw new ss(`Error ${h} occurred in deserializing the responseBody - ${c.bodyAsText}`,void 0,c.status,c.request,c)}}else l.httpMethod==="HEAD"&&(c.parsedBody=A.status>=200&&A.status<300);d.headersMapper&&(c.parsedHeaders=l.serializer.deserialize(d.headersMapper,c.headers.toJson(),"operationRes.parsedHeaders",r))}return c})}a(Zne,"deserializeResponseBody");function SYe(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}a(SYe,"isOperationSpecEmpty");function xYe(t,e,A){var r;let i=200<=t.status&&t.status<300;if(SYe(e)?i:!!A)if(A){if(!A.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let s=A??e.responses.default,c=((r=t.request.streamResponseStatusCodes)===null||r===void 0?void 0:r.has(t.status))||t.request.streamResponseBody?`Unexpected status code: ${t.status}`:t.bodyAsText,l=new ss(c,void 0,t.status,t.request,t);if(!s)throw l;let d=s.bodyMapper,u=s.headersMapper;try{if(t.parsedBody){let p=t.parsedBody,g;if(d){let m=p;e.isXML&&d.type.name===Hu.Sequence&&(m=typeof p=="object"?p[d.xmlElementName]:[]),g=e.serializer.deserialize(d,m,"error.response.parsedBody")}let h=p.error||g||p;l.code=h.code,h.message&&(l.message=h.message),d&&(l.response.parsedBody=g)}t.headers&&u&&(l.response.parsedHeaders=e.serializer.deserialize(u,t.headers.toJson(),"operationRes.parsedHeaders"))}catch(p){l.message=`Error "${p.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:!1}}a(xYe,"handleErrorResponse");function vYe(t,e,A,r){var i;let n=a(o=>{let c=`Error "${o}" occurred while parsing the response body - ${A.bodyAsText}.`,l=o.code||ss.PARSE_ERROR,d=new ss(c,l,A.status,A.request,A);return Promise.reject(d)},"errorHandler");if(!(((i=A.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(A.status))||A.request.streamResponseBody)&&A.bodyAsText){let o=A.bodyAsText,c=A.headers.get("Content-Type")||"",l=c?c.split(";").map(d=>d.toLowerCase()):[];if(l.length===0||l.some(d=>t.indexOf(d)!==-1))return new Promise(d=>{A.parsedBody=JSON.parse(o),d(A)}).catch(n);if(l.some(d=>e.indexOf(d)!==-1))return zne(o,r).then(d=>(A.parsedBody=d,A)).catch(n)}return Promise.resolve(A)}a(vYe,"parse");var Kne={enable:!0};function $ne(t){return{create:(e,A)=>new uk(e,A,t||Kne)}}a($ne,"keepAlivePolicy");var uk=class extends fr{static{a(this,"KeepAlivePolicy")}constructor(e,A,r){super(e,A),this.keepAliveOptions=r}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}},Dne=["GET","HEAD"],kYe={handleRedirects:!0,maxRetries:20};function Uk(t=20){return{create:(e,A)=>new pk(e,A,t)}}a(Uk,"redirectPolicy");var pk=class extends fr{static{a(this,"RedirectPolicy")}constructor(e,A,r=20){super(e,A),this.maxRetries=r}sendRequest(e){return this._nextPolicy.sendReq
Line truncated
|
||||
`).join(""))}return this._nextPolicy.sendRequest(e)}},sse=[],ase=!1,JYe=new Map;function VYe(){if(!process)return;let t=Zw(Xs.HTTPS_PROXY),e=Zw(Xs.ALL_PROXY),A=Zw(Xs.HTTP_PROXY);return t||e||A}a(VYe,"loadEnvironmentProxyValue");function WYe(t,e,A){if(e.length===0)return!1;let r=So.parse(t).getHost();if(A?.has(r))return A.get(r);let i=!1;for(let n of e)n[0]==="."?(r.endsWith(n)||r.length===n.length-1&&r===n.slice(1))&&(i=!0):r===n&&(i=!0);return A?.set(r,i),i}a(WYe,"isBypassed");function zYe(){let t=Zw(Xs.NO_PROXY);return ase=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}a(zYe,"loadNoProxy");function ose(t){if(!t&&(t=VYe(),!t))return;let{username:e,password:A,urlWithoutAuth:r}=jYe(t),i=So.parse(r);return{host:(i.getScheme()?i.getScheme()+"://":"")+i.getHost(),port:Number.parseInt(i.getPort()||"80"),username:e,password:A}}a(ose,"getDefaultProxySettings");function Yk(t,e){return t||(t=ose()),ase||sse.push(...zYe()),{create:(A,r)=>new Bk(A,r,t,e?.customNoProxyList)}}a(Yk,"proxyPolicy");function jYe(t){let e=t.indexOf("@");if(e===-1)return{urlWithoutAuth:t};let A=t.indexOf("://"),r=A!==-1?A+3:0,i=t.substring(r,e),n=i.indexOf(":"),s=n!==-1,o=s?i.substring(0,n):i,c=s?i.substring(n+1):void 0,l=t.substring(0,r)+t.substring(e+1);return{username:o,password:c,urlWithoutAuth:l}}a(jYe,"extractAuthFromUrl");var Bk=class extends fr{static{a(this,"ProxyPolicy")}constructor(e,A,r,i){super(e,A),this.proxySettings=r,this.customNoProxyList=i}sendRequest(e){var A;return!e.proxySettings&&!WYe(e.url,(A=this.customNoProxyList)!==null&&A!==void 0?A:sse,this.customNoProxyList?void 0:JYe)&&(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}};function XYe(t=30){return{create:(e,A)=>new Ik(e,A,t)}}a(XYe,"rpRegistrationPolicy");var Ik=class extends fr{static{a(this,"RPRegistrationPolicy")}constructor(e,A,r=30){super(e,A),this._retryTimeout=r}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(A=>ZYe(this,e,A))}};function ZYe(t,e,A){if(A.status===409){let r=KYe(A.bodyAsText);if(r){let i=$Ye(e.url);return eGe(t,i,r,e).catch(()=>!1).then(n=>n?(e.headers.set("x-ms-client-request-id",ab()),t._nextPolicy.sendRequest(e.clone())):A)}}return Promise.resolve(A)}a(ZYe,"registerIfNeeded");function cse(t,e=!1){let A=t.clone();return e&&(A.url=t.url),A.headers.set("x-ms-client-request-id",ab()),A.headers.set("Content-Type","application/json; charset=utf-8"),A}a(cse,"getRequestEssentials");function KYe(t){let e,A;if(t){try{A=JSON.parse(t)}catch{}if(A&&A.error&&A.error.message&&A.error.code&&A.error.code==="MissingSubscriptionRegistration"){let r=A.error.message.match(/.*'(.*)'/i);r&&(e=r.pop())}}return e}a(KYe,"checkRPNotRegisteredError");function $Ye(t){let e,A=t.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(A&&A[0])e=A[0];else throw new Error(`Unable to extract subscriptionId from the given url - ${t}.`);return e}a($Ye,"extractSubscriptionUrl");async function eGe(t,e,A,r){let i=`${e}providers/${A}/register?api-version=2016-02-01`,n=`${e}providers/${A}?api-version=2016-02-01`,s=cse(r);if(s.method="POST",s.url=i,(await t._nextPolicy.sendRequest(s)).status!==200)throw new Error(`Autoregistration of ${A} failed. Please try registering manually.`);return lse(t,n,r)}a(eGe,"registerRP");async function lse(t,e,A){let r=cse(A);r.url=e,r.method="GET";let i=await t._nextPolicy.sendRequest(r),n=i.parsedBody;return i.parsedBody&&n.registrationState&&n.registrationState==="Registered"?!0:(await Do.delay(t._retryTimeout*1e3),lse(t,e,A))}a(lse,"getRegistrationStatus");function dse(t){return{create:(e,A)=>new yk(e,A,t)}}a(dse,"signingPolicy");var yk=class extends fr{static{a(this,"SigningPolicy")}constructor(e,A,r){super(e,A),this.authenticationProvider=r}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(A=>this._nextPolicy.sendRequest(A))}};function Gk(t,e,A,r){return{create:(i,n)=>new wk(i,n,t,e,A,r)}}a(Gk,"systemErrorRetryPolicy");var wk=class extends fr{static{a(this,"SystemErrorRetryPolicy")}constructor(e,A,r,i,n,s){super(e,A),this.retryCount=qu(r)?r:Tk,this.retryInterval=qu(i)?i:Mk,this.minRetryInterval=qu(n)?n:FYe,this.maxRetryInterval=qu(s)?s:_k}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(A=>use(this,e,A.response,A))}};async function use(t,e,A,r,i){i=Ase(t,i,r);function n(s,o){return!!(o&&o.code&&(o.code==="ETIMEDOUT"||o.code==="ESOCKETTIMEDOUT"||o.code==="ECONNREFUSED"||o.code==="ECONNRESET"||o.code==="ENOENT"))}if(a(n,"shouldPolicyRetry"),tse(t.retryCount,n,i,A,r))try{return await Do.delay(i.retryInterval),t._nextPolicy.sendRequest(e.clone())}catch(s){return use(t,e,A,s,i)}else return r?Promise.reject(i.error):A}a(use,"retry");var tGe=3,Sne=Xs.HttpConstants.StatusCodes;function Jk(){return{create:(t,e)=>new bk(t,e)}}a(Jk,"throttlingRetryPolicy");var xne="The operation was aborted.",bk=class t extends fr{static{a(this,"ThrottlingRetryPolicy")}constructor(e,A,r){super(e,A),this.numberOfRetries=0,this._handleResponse=r||this._defa
Line truncated
|
||||
`?(y.line++,y.column=0):y.column++);y.textNode+=R.substring(kt,M-1)}F==="<"&&!(y.sawRoot&&y.closedRoot&&!y.strict)?(y.state=w.OPEN_WAKA,y.startTagPosition=y.position):(!I(F)&&(!y.sawRoot||y.closedRoot)&&_(y,"Text data outside of root node."),F==="&"?y.state=w.TEXT_ENTITY:y.textNode+=F);continue;case w.SCRIPT:F==="<"?y.state=w.SCRIPT_ENDING:y.script+=F;continue;case w.SCRIPT_ENDING:F==="/"?y.state=w.CLOSE_TAG:(y.script+="<"+F,y.state=w.SCRIPT);continue;case w.OPEN_WAKA:if(F==="!")y.state=w.SGML_DECL,y.sgmlDecl="";else if(!I(F))if(N(m,F))y.state=w.OPEN_TAG,y.tagName=F;else if(F==="/")y.state=w.CLOSE_TAG,y.tagName="";else if(F==="?")y.state=w.PROC_INST,y.procInstName=y.procInstBody="";else{if(_(y,"Unencoded <"),y.startTagPosition+1<y.position){var pr=y.position-y.startTagPosition;F=new Array(pr).join(" ")+F}y.textNode+="<"+F,y.state=w.TEXT}continue;case w.SGML_DECL:(y.sgmlDecl+F).toUpperCase()===d?(v(y,"onopencdata"),y.state=w.CDATA,y.sgmlDecl="",y.cdata=""):y.sgmlDecl+F==="--"?(y.state=w.COMMENT,y.comment="",y.sgmlDecl=""):(y.sgmlDecl+F).toUpperCase()===u?(y.state=w.DOCTYPE,(y.doctype||y.sawRoot)&&_(y,"Inappropriately located doctype declaration"),y.doctype="",y.sgmlDecl=""):F===">"?(v(y,"onsgmldeclaration",y.sgmlDecl),y.sgmlDecl="",y.state=w.TEXT):(C(F)&&(y.state=w.SGML_DECL_QUOTED),y.sgmlDecl+=F);continue;case w.SGML_DECL_QUOTED:F===y.q&&(y.state=w.SGML_DECL,y.q=""),y.sgmlDecl+=F;continue;case w.DOCTYPE:F===">"?(y.state=w.TEXT,v(y,"ondoctype",y.doctype),y.doctype=!0):(y.doctype+=F,F==="["?y.state=w.DOCTYPE_DTD:C(F)&&(y.state=w.DOCTYPE_QUOTED,y.q=F));continue;case w.DOCTYPE_QUOTED:y.doctype+=F,F===y.q&&(y.q="",y.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:y.doctype+=F,F==="]"?y.state=w.DOCTYPE:C(F)&&(y.state=w.DOCTYPE_DTD_QUOTED,y.q=F);continue;case w.DOCTYPE_DTD_QUOTED:y.doctype+=F,F===y.q&&(y.state=w.DOCTYPE_DTD,y.q="");continue;case w.COMMENT:F==="-"?y.state=w.COMMENT_ENDING:y.comment+=F;continue;case w.COMMENT_ENDING:F==="-"?(y.state=w.COMMENT_ENDED,y.comment=L(y.opt,y.comment),y.comment&&v(y,"oncomment",y.comment),y.comment=""):(y.comment+="-"+F,y.state=w.COMMENT);continue;case w.COMMENT_ENDED:F!==">"?(_(y,"Malformed comment"),y.comment+="--"+F,y.state=w.COMMENT):y.state=w.TEXT;continue;case w.CDATA:F==="]"?y.state=w.CDATA_ENDING:y.cdata+=F;continue;case w.CDATA_ENDING:F==="]"?y.state=w.CDATA_ENDING_2:(y.cdata+="]"+F,y.state=w.CDATA);continue;case w.CDATA_ENDING_2:F===">"?(y.cdata&&v(y,"oncdata",y.cdata),v(y,"onclosecdata"),y.cdata="",y.state=w.TEXT):F==="]"?y.cdata+="]":(y.cdata+="]]"+F,y.state=w.CDATA);continue;case w.PROC_INST:F==="?"?y.state=w.PROC_INST_ENDING:I(F)?y.state=w.PROC_INST_BODY:y.procInstName+=F;continue;case w.PROC_INST_BODY:if(!y.procInstBody&&I(F))continue;F==="?"?y.state=w.PROC_INST_ENDING:y.procInstBody+=F;continue;case w.PROC_INST_ENDING:F===">"?(v(y,"onprocessinginstruction",{name:y.procInstName,body:y.procInstBody}),y.procInstName=y.procInstBody="",y.state=w.TEXT):(y.procInstBody+="?"+F,y.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:N(f,F)?y.tagName+=F:(rt(y),F===">"?ht(y):F==="/"?y.state=w.OPEN_TAG_SLASH:(I(F)||_(y,"Invalid character in tag name"),y.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:F===">"?(ht(y,!0),wr(y)):(_(y,"Forward-slash in opening tag not followed by >"),y.state=w.ATTRIB);continue;case w.ATTRIB:if(I(F))continue;F===">"?ht(y):F==="/"?y.state=w.OPEN_TAG_SLASH:N(m,F)?(y.attribName=F,y.attribValue="",y.state=w.ATTRIB_NAME):_(y,"Invalid attribute name");continue;case w.ATTRIB_NAME:F==="="?y.state=w.ATTRIB_VALUE:F===">"?(_(y,"Attribute without value"),y.attribValue=y.attribName,vt(y),ht(y)):I(F)?y.state=w.ATTRIB_NAME_SAW_WHITE:N(f,F)?y.attribName+=F:_(y,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if(F==="=")y.state=w.ATTRIB_VALUE;else{if(I(F))continue;_(y,"Attribute without value"),y.tag.attributes[y.attribName]="",y.attribValue="",v(y,"onattribute",{name:y.attribName,value:""}),y.attribName="",F===">"?ht(y):N(m,F)?(y.attribName=F,y.state=w.ATTRIB_NAME):(_(y,"Invalid attribute name"),y.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(I(F))continue;C(F)?(y.q=F,y.state=w.ATTRIB_VALUE_QUOTED):(_(y,"Unquoted attribute value"),y.state=w.ATTRIB_VALUE_UNQUOTED,y.attribValue=F);continue;case w.ATTRIB_VALUE_QUOTED:if(F!==y.q){F==="&"?y.state=w.ATTRIB_VALUE_ENTITY_Q:y.attribValue+=F;continue}vt(y),y.q="",y.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:I(F)?y.state=w.ATTRIB:F===">"?ht(y):F==="/"?y.state=w.OPEN_TAG_SLASH:N(m,F)?(_(y,"No whitespace between attributes"),y.attribName=F,y.attribValue="",y.state=w.ATTRIB_NAME):_(y,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!Q(F)){F==="&"?y.state=w.ATTRIB_VALUE_ENTITY_U:y.attribValue+=F;continue}vt(y),F===">"?ht(y):y.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(y.tagName)F===">"?wr(y):N(f,F)?y.tagName+=F:y.script?(y.script+="</"+y.tagName,y.tagName="",y.state=w.SCRIPT):(I(F)||_(y,"Invalid tagname in closing tag"),y.state=w.CLOSE_TAG_SAW_WHITE);else{if(I(F))continue;S
Line truncated
|
||||
`;ut.DEFAULT_CONTENT_TYPE="application/octet-stream";ut.prototype.append=function(t,e,A){A=A||{},typeof A=="string"&&(A={filename:A});var r=n5.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),xre.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,A),n=this._multiPartFooter();r(i),r(e),r(n),this._trackLength(i,e,A)};ut.prototype._trackLength=function(t,e,A){var r=0;A.knownLength!=null?r+=+A.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+ut.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof YOe))&&(A.knownLength||this._valuesToMeasure.push(e))};ut.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):HOe.stat(t.path,function(A,r){var i;if(A){e(A);return}i=r.size-(t.start?t.start:0),e(null,i)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(A){t.pause(),e(null,+A.headers["content-length"])}),t.resume()):e("Unknown stream")};ut.prototype._multiPartHeader=function(t,e,A){if(typeof A.header=="string")return A.header;var r=this._getContentDisposition(e,A),i=this._getContentType(e,A),n="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof A.header=="object"&&i5(s,A.header);var o;for(var c in s)s.hasOwnProperty(c)&&(o=s[c],o!=null&&(Array.isArray(o)||(o=[o]),o.length&&(n+=c+": "+o.join("; ")+ut.LINE_BREAK)));return"--"+this.getBoundary()+ut.LINE_BREAK+n+ut.LINE_BREAK};ut.prototype._getContentDisposition=function(t,e){var A,r;return typeof e.filepath=="string"?A=A5.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?A=A5.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(A=A5.basename(t.client._httpMessage.path||"")),A&&(r='filename="'+A+'"'),r};ut.prototype._getContentType=function(t,e){var A=e.contentType;return!A&&t.name&&(A=r5.lookup(t.name)),!A&&t.path&&(A=r5.lookup(t.path)),!A&&t.readable&&t.hasOwnProperty("httpVersion")&&(A=t.headers["content-type"]),!A&&(e.filepath||e.filename)&&(A=r5.lookup(e.filepath||e.filename)),!A&&typeof t=="object"&&(A=ut.DEFAULT_CONTENT_TYPE),A};ut.prototype._multiPartFooter=function(){return function(t){var e=ut.LINE_BREAK,A=this._streams.length===0;A&&(e+=this._lastBoundary()),t(e)}.bind(this)};ut.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ut.LINE_BREAK};ut.prototype.getHeaders=function(t){var e,A={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(A[e.toLowerCase()]=t[e]);return A};ut.prototype.setBoundary=function(t){this._boundary=t};ut.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ut.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),A=0,r=this._streams.length;A<r;A++)typeof this._streams[A]!="function"&&(Buffer.isBuffer(this._streams[A])?t=Buffer.concat([t,this._streams[A]]):t=Buffer.concat([t,Buffer.from(this._streams[A])]),(typeof this._streams[A]!="string"||this._streams[A].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(ut.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ut.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};ut.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};ut.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ut.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}GOe.parallel(this._valuesToMeasure,this._lengthRetriever,function(A,r){if(A){t(A);return}r.forEach(function(i){e+=i}),t(null,e)})};ut.prototype.submit=function(t,e){var A,r,i={method:"post"};return typeof t=="string"?(t=qOe(t),r=i5({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(r=i5(t,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?A=POe.request(r):A=OOe.request(r),this.getLength(function(n,s){if(n&&n!=="Unknown stream"){this._error(n);return}if(s&&A.setHeader("Content-Length",s),this.pipe(A),e){var o,c=a(function(l,d){return A.removeListener("error",c),A.removeListener("response",o),e.call(this,l,d)},"callback");o=c.bind(this,null),A.on("error",c),A.on("response",o)}}.bind(this)),A};ut.prototype._error=function(t){this.error||(this.error=t,this.pause(),th
Line truncated
|
||||
${MYe.sanitize(this)}`}};ss.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";ss.PARSE_ERROR="PARSE_ERROR";var La=UHe.createClientLogger("core-http");function vne(t,e){return t?e.httpsAgent:e.httpAgent}a(vne,"getCachedAgent");var sb=class extends PHe.Transform{static{a(this,"ReportTransform")}constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,A,r){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),r(void 0)}};function $w(t){return t&&typeof t.pipe=="function"}a($w,"isReadableStream");function kne(t,e){return new Promise(A=>{t.once("close",()=>{e?.abort(),A()}),t.once("end",A),t.once("error",A)})}a(kne,"isStreamComplete");function _Ye(t){let e=new Kl;return t.forEach((A,r)=>{e.set(r,A)}),e}a(_Ye,"parseHeaders");var ab=class{static{a(this,"NodeFetchHttpClient")}constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={}}async sendRequest(e){var A;if(!e&&typeof e!="object")throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");let r=new eb.AbortController,i;if(e.abortSignal){if(e.abortSignal.aborted)throw new eb.AbortError("The operation was aborted.");i=a(l=>{l.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",i)}if(e.timeout&&setTimeout(()=>{r.abort()},e.timeout),e.formData){let l=e.formData,d=new YHe.default,u=a((g,h)=>{typeof h=="function"&&(h=h()),h&&Object.prototype.hasOwnProperty.call(h,"value")&&Object.prototype.hasOwnProperty.call(h,"options")?d.append(g,h.value,h.options):d.append(g,h)},"appendFormValue");for(let g of Object.keys(l)){let h=l[g];if(Array.isArray(h))for(let m=0;m<h.length;m++)u(g,h[m]);else u(g,h)}e.body=d,e.formData=void 0;let p=e.headers.get("Content-Type");p&&p.indexOf("multipart/form-data")!==-1&&(typeof d.getBoundary=="function"?e.headers.set("Content-Type",`multipart/form-data; boundary=${d.getBoundary()}`):e.headers.remove("Content-Type"))}let n=e.body?typeof e.body=="function"?e.body():e.body:void 0;if(e.onUploadProgress&&e.body){let l=e.onUploadProgress,d=new sb(l);$w(n)?n.pipe(d):d.end(n),n=d}let s=await this.prepareRequest(e),o=Object.assign({body:n,headers:e.headers.rawHeaders(),method:e.method,signal:r.signal,redirect:"manual"},s),c;try{let l=await this.fetch(e.url,o),d=_Ye(l.headers),u=((A=e.streamResponseStatusCodes)===null||A===void 0?void 0:A.has(l.status))||e.streamResponseBody;c={headers:d,request:e,status:l.status,readableStreamBody:u?l.body:void 0,bodyAsText:u?void 0:await l.text()};let p=e.onDownloadProgress;if(p){let g=l.body||void 0;if($w(g)){let h=new sb(p);g.pipe(h),c.readableStreamBody=h}else{let h=parseInt(d.get("Content-Length"))||void 0;h&&p({loadedBytes:h})}}return await this.processRequest(c),c}catch(l){let d=l;throw d.code==="ENOTFOUND"?new ss(d.message,ss.REQUEST_SEND_ERROR,void 0,e):d.type==="aborted"?new eb.AbortError("The operation was aborted."):d}finally{if(e.abortSignal&&i){let l=Promise.resolve();$w(n)&&(l=kne(n));let d=Promise.resolve();$w(c?.readableStreamBody)&&(d=kne(c.readableStreamBody,r)),Promise.all([l,d]).then(()=>{var u;(u=e.abortSignal)===null||u===void 0||u.removeEventListener("abort",i)}).catch(u=>{La.warning("Error when cleaning up abortListener on httpRequest",u)})}}}getOrCreateAgent(e){var A;let r=gk(e.url);if(e.proxySettings){let{host:i,port:n,username:s,password:o}=e.proxySettings,c=`${i}:${n}:${s}:${o}`,l=(A=this.proxyAgentMap.get(c))!==null&&A!==void 0?A:{},d=vne(r,l);if(d)return d;let u=FYe(e.url,e.proxySettings,e.headers);return d=u.agent,u.isHttps?l.httpsAgent=u.agent:l.httpAgent=u.agent,this.proxyAgentMap.set(c,l),d}else if(e.keepAlive){let i=vne(r,this.keepAliveAgents);if(i)return i;let n={keepAlive:e.keepAlive};return r?i=this.keepAliveAgents.httpsAgent=new Nne.Agent(n):i=this.keepAliveAgents.httpAgent=new bne.Agent(n),i}else return r?Nne.globalAgent:bne.globalAgent}async fetch(e,A){return GHe.default(e,A)}async prepareRequest(e){let A={};return A.agent=this.getOrCreateAgent(e),A.compress=e.decompressResponse,A}async processRequest(e){}};Z.HttpPipelineLogLevel=void 0;(function(t){t[t.OFF=0]="OFF",t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO"})(Z.HttpPipelineLogLevel||(Z.HttpPipelineLogLevel={}));function OYe(t){let{requestOptions:e,tracingOptions:A}=t,i=FHe.__rest(t,["requestOptions","tracingOptions"]);return e&&(i=Object.assign(Object.assign({},i),e)),A&&(i.tracingContext=A.tracingContext,i.spanOptions=A?.spanOptions),i}a(OYe,"operationOptionsToRequestOptionsBase");var fr=class{static{a(this,"BaseRequestPolicy")}constructor(e,A){this._nextPolicy=e,this._options=A}shouldLog(e){return this._options.shouldLog(e)}log(e,A){this._options.log(e,A)}},ob=class{static{a(this,"RequestPolicyOptions")}constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==Z.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,A){this._logger&&this.shouldLog(e)&&this._logger.log(e,A)}},Kne={explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:C
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},Ab=Object.assign({},Kne);Ab.explicitArray=!1;var NQ=Object.assign({},Kne);NQ.explicitArray=!1;NQ.renderOpts={pretty:!1};function hk(t,e={}){var A;return NQ.rootName=e.rootName,NQ.charkey=(A=e.xmlCharKey)!==null&&A!==void 0?A:Uc,new qne.Builder(NQ).buildObject(t)}a(hk,"stringifyXML");function $ne(t,e={}){var A;Ab.explicitRoot=!!e.includeRoot,Ab.charkey=(A=e.xmlCharKey)!==null&&A!==void 0?A:Uc;let r=new qne.Parser(Ab);return new Promise((i,n)=>{t?r.parseString(t,(s,o)=>{s?n(s):i(o)}):n(new Error("Document is empty"))})}a($ne,"parseXML");function Ok(t,e){return{create:(A,r)=>new Ek(A,r,t,e)}}a(Ok,"deserializationPolicy");var ese=["application/json","text/json"],tse=["application/xml","application/atom+xml"],PYe={expectedContentTypes:{json:ese,xml:tse}},Ek=class extends fr{static{a(this,"DeserializationPolicy")}constructor(e,A,r,i={}){var n;super(e,A),this.jsonContentTypes=r&&r.json||ese,this.xmlContentTypes=r&&r.xml||tse,this.xmlCharKey=(n=i.xmlCharKey)!==null&&n!==void 0?n:Uc}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(A=>Ase(this.jsonContentTypes,this.xmlContentTypes,A,{xmlCharKey:this.xmlCharKey}))}};function qYe(t){let e,A=t.request,r=A.operationSpec;if(r){let i=A.operationResponseGetter;i?e=i(r,t):e=r.responses[t.status]}return e}a(qYe,"getOperationResponse");function HYe(t){let e=t.request.shouldDeserialize,A;return e===void 0?A=!0:typeof e=="boolean"?A=e:A=e(t),A}a(HYe,"shouldDeserializeResponse");function Ase(t,e,A,r={}){var i,n,s;let o={rootName:(i=r.rootName)!==null&&i!==void 0?i:"",includeRoot:(n=r.includeRoot)!==null&&n!==void 0?n:!1,xmlCharKey:(s=r.xmlCharKey)!==null&&s!==void 0?s:Uc};return JYe(t,e,A,o).then(c=>{if(!HYe(c))return c;let l=c.request.operationSpec;if(!l||!l.responses)return c;let d=qYe(c),{error:u,shouldReturnResponse:p}=GYe(c,l,d);if(u)throw u;if(p)return c;if(d){if(d.bodyMapper){let g=c.parsedBody;l.isXML&&d.bodyMapper.type.name===Yu.Sequence&&(g=typeof g=="object"?g[d.bodyMapper.xmlElementName]:[]);try{c.parsedBody=l.serializer.deserialize(d.bodyMapper,g,"operationRes.parsedBody",r)}catch(h){throw new ss(`Error ${h} occurred in deserializing the responseBody - ${c.bodyAsText}`,void 0,c.status,c.request,c)}}else l.httpMethod==="HEAD"&&(c.parsedBody=A.status>=200&&A.status<300);d.headersMapper&&(c.parsedHeaders=l.serializer.deserialize(d.headersMapper,c.headers.toJson(),"operationRes.parsedHeaders",r))}return c})}a(Ase,"deserializeResponseBody");function YYe(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}a(YYe,"isOperationSpecEmpty");function GYe(t,e,A){var r;let i=200<=t.status&&t.status<300;if(YYe(e)?i:!!A)if(A){if(!A.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let s=A??e.responses.default,c=((r=t.request.streamResponseStatusCodes)===null||r===void 0?void 0:r.has(t.status))||t.request.streamResponseBody?`Unexpected status code: ${t.status}`:t.bodyAsText,l=new ss(c,void 0,t.status,t.request,t);if(!s)throw l;let d=s.bodyMapper,u=s.headersMapper;try{if(t.parsedBody){let p=t.parsedBody,g;if(d){let m=p;e.isXML&&d.type.name===Yu.Sequence&&(m=typeof p=="object"?p[d.xmlElementName]:[]),g=e.serializer.deserialize(d,m,"error.response.parsedBody")}let h=p.error||g||p;l.code=h.code,h.message&&(l.message=h.message),d&&(l.response.parsedBody=g)}t.headers&&u&&(l.response.parsedHeaders=e.serializer.deserialize(u,t.headers.toJson(),"operationRes.parsedHeaders"))}catch(p){l.message=`Error "${p.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:!1}}a(GYe,"handleErrorResponse");function JYe(t,e,A,r){var i;let n=a(o=>{let c=`Error "${o}" occurred while parsing the response body - ${A.bodyAsText}.`,l=o.code||ss.PARSE_ERROR,d=new ss(c,l,A.status,A.request,A);return Promise.reject(d)},"errorHandler");if(!(((i=A.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(A.status))||A.request.streamResponseBody)&&A.bodyAsText){let o=A.bodyAsText,c=A.headers.get("Content-Type")||"",l=c?c.split(";").map(d=>d.toLowerCase()):[];if(l.length===0||l.some(d=>t.indexOf(d)!==-1))return new Promise(d=>{A.parsedBody=JSON.parse(o),d(A)}).catch(n);if(l.some(d=>e.indexOf(d)!==-1))return $ne(o,r).then(d=>(A.parsedBody=d,A)).catch(n)}return Promise.resolve(A)}a(JYe,"parse");var rse={enable:!0};function ise(t){return{create:(e,A)=>new mk(e,A,t||rse)}}a(ise,"keepAlivePolicy");var mk=class extends fr{static{a(this,"KeepAlivePolicy")}constructor(e,A,r){super(e,A),this.keepAliveOptions=r}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}},Fne=["GET","HEAD"],VYe={handleRedirects:!0,maxRetries:20};function Pk(t=20){return{create:(e,A)=>new Ck(e,A,t)}}a(Pk,"redirectPolicy");var Ck=class extends fr{static{a(this,"RedirectPolicy")}constructor(e,A,r=20){super(e,A),this.maxRetries=r}sendRequest(e){return this._nextPolicy.sendReq
Line truncated
|
||||
`).join(""))}return this._nextPolicy.sendRequest(e)}},dse=[],use=!1,nGe=new Map;function sGe(){if(!process)return;let t=tb(Xs.HTTPS_PROXY),e=tb(Xs.ALL_PROXY),A=tb(Xs.HTTP_PROXY);return t||e||A}a(sGe,"loadEnvironmentProxyValue");function aGe(t,e,A){if(e.length===0)return!1;let r=So.parse(t).getHost();if(A?.has(r))return A.get(r);let i=!1;for(let n of e)n[0]==="."?(r.endsWith(n)||r.length===n.length-1&&r===n.slice(1))&&(i=!0):r===n&&(i=!0);return A?.set(r,i),i}a(aGe,"isBypassed");function oGe(){let t=tb(Xs.NO_PROXY);return use=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}a(oGe,"loadNoProxy");function pse(t){if(!t&&(t=sGe(),!t))return;let{username:e,password:A,urlWithoutAuth:r}=cGe(t),i=So.parse(r);return{host:(i.getScheme()?i.getScheme()+"://":"")+i.getHost(),port:Number.parseInt(i.getPort()||"80"),username:e,password:A}}a(pse,"getDefaultProxySettings");function zk(t,e){return t||(t=pse()),use||dse.push(...oGe()),{create:(A,r)=>new Nk(A,r,t,e?.customNoProxyList)}}a(zk,"proxyPolicy");function cGe(t){let e=t.indexOf("@");if(e===-1)return{urlWithoutAuth:t};let A=t.indexOf("://"),r=A!==-1?A+3:0,i=t.substring(r,e),n=i.indexOf(":"),s=n!==-1,o=s?i.substring(0,n):i,c=s?i.substring(n+1):void 0,l=t.substring(0,r)+t.substring(e+1);return{username:o,password:c,urlWithoutAuth:l}}a(cGe,"extractAuthFromUrl");var Nk=class extends fr{static{a(this,"ProxyPolicy")}constructor(e,A,r,i){super(e,A),this.proxySettings=r,this.customNoProxyList=i}sendRequest(e){var A;return!e.proxySettings&&!aGe(e.url,(A=this.customNoProxyList)!==null&&A!==void 0?A:dse,this.customNoProxyList?void 0:nGe)&&(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}};function lGe(t=30){return{create:(e,A)=>new Rk(e,A,t)}}a(lGe,"rpRegistrationPolicy");var Rk=class extends fr{static{a(this,"RPRegistrationPolicy")}constructor(e,A,r=30){super(e,A),this._retryTimeout=r}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(A=>dGe(this,e,A))}};function dGe(t,e,A){if(A.status===409){let r=uGe(A.bodyAsText);if(r){let i=pGe(e.url);return gGe(t,i,r,e).catch(()=>!1).then(n=>n?(e.headers.set("x-ms-client-request-id",db()),t._nextPolicy.sendRequest(e.clone())):A)}}return Promise.resolve(A)}a(dGe,"registerIfNeeded");function gse(t,e=!1){let A=t.clone();return e&&(A.url=t.url),A.headers.set("x-ms-client-request-id",db()),A.headers.set("Content-Type","application/json; charset=utf-8"),A}a(gse,"getRequestEssentials");function uGe(t){let e,A;if(t){try{A=JSON.parse(t)}catch{}if(A&&A.error&&A.error.message&&A.error.code&&A.error.code==="MissingSubscriptionRegistration"){let r=A.error.message.match(/.*'(.*)'/i);r&&(e=r.pop())}}return e}a(uGe,"checkRPNotRegisteredError");function pGe(t){let e,A=t.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(A&&A[0])e=A[0];else throw new Error(`Unable to extract subscriptionId from the given url - ${t}.`);return e}a(pGe,"extractSubscriptionUrl");async function gGe(t,e,A,r){let i=`${e}providers/${A}/register?api-version=2016-02-01`,n=`${e}providers/${A}?api-version=2016-02-01`,s=gse(r);if(s.method="POST",s.url=i,(await t._nextPolicy.sendRequest(s)).status!==200)throw new Error(`Autoregistration of ${A} failed. Please try registering manually.`);return hse(t,n,r)}a(gGe,"registerRP");async function hse(t,e,A){let r=gse(A);r.url=e,r.method="GET";let i=await t._nextPolicy.sendRequest(r),n=i.parsedBody;return i.parsedBody&&n.registrationState&&n.registrationState==="Registered"?!0:(await Do.delay(t._retryTimeout*1e3),hse(t,e,A))}a(hse,"getRegistrationStatus");function Ese(t){return{create:(e,A)=>new Dk(e,A,t)}}a(Ese,"signingPolicy");var Dk=class extends fr{static{a(this,"SigningPolicy")}constructor(e,A,r){super(e,A),this.authenticationProvider=r}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(A=>this._nextPolicy.sendRequest(A))}};function jk(t,e,A,r){return{create:(i,n)=>new Sk(i,n,t,e,A,r)}}a(jk,"systemErrorRetryPolicy");var Sk=class extends fr{static{a(this,"SystemErrorRetryPolicy")}constructor(e,A,r,i,n,s){super(e,A),this.retryCount=Hu(r)?r:qk,this.retryInterval=Hu(i)?i:Hk,this.minRetryInterval=Hu(n)?n:WYe,this.maxRetryInterval=Hu(s)?s:Yk}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(A=>mse(this,e,A.response,A))}};async function mse(t,e,A,r,i){i=ase(t,i,r);function n(s,o){return!!(o&&o.code&&(o.code==="ETIMEDOUT"||o.code==="ESOCKETTIMEDOUT"||o.code==="ECONNREFUSED"||o.code==="ECONNRESET"||o.code==="ENOENT"))}if(a(n,"shouldPolicyRetry"),sse(t.retryCount,n,i,A,r))try{return await Do.delay(i.retryInterval),t._nextPolicy.sendRequest(e.clone())}catch(s){return mse(t,e,A,s,i)}else return r?Promise.reject(i.error):A}a(mse,"retry");var hGe=3,Lne=Xs.HttpConstants.StatusCodes;function Xk(){return{create:(t,e)=>new xk(t,e)}}a(Xk,"throttlingRetryPolicy");var Une="The operation was aborted.",xk=class t extends fr{static{a(this,"ThrottlingRetryPolicy")}constructor(e,A,r){super(e,A),this.numberOfRetries=0,this._handleResponse=r||this._defa
Line truncated
|
||||
Polling from: ${A.config.operationLocation}
|
||||
Operation status: ${d}
|
||||
Polling status: ${yse.terminalStates.includes(d)?"Stopped":"Running"}`),d==="succeeded"){let u=s(l,A);if(u!==void 0)return{response:await e(u).catch(Ise({state:A,stateProxy:r,isOperationError:o})),status:d}}return{response:l,status:d}}a(fGe,"pollOperationHelper");async function QGe(t){let{poll:e,state:A,stateProxy:r,options:i,getOperationStatus:n,getResourceLocation:s,getOperationLocation:o,isOperationError:c,withOperationLocation:l,getPollingInterval:d,processResult:u,getError:p,updateState:g,setDelay:h,isDone:m,setErrorAsResult:f}=t,{operationLocation:B}=A.config;if(B!==void 0){let{response:b,status:I}=await fGe({poll:e,getOperationStatus:n,state:A,stateProxy:r,operationLocation:B,getResourceLocation:s,isOperationError:c,options:i});if(wse({status:I,response:b,state:A,stateProxy:r,isDone:m,processResult:u,getError:p,setErrorAsResult:f}),!yse.terminalStates.includes(I)){let C=d?.(b);C&&h(C);let Q=o?.(b,A);if(Q!==void 0){let N=B!==Q;A.config.operationLocation=Q,l?.(Q,N)}else l?.(B,!1)}g?.(A,b)}}a(QGe,"pollOperation");td.pollOperation=QGe});var Xk=E(_A=>{"use strict";Object.defineProperty(_A,"__esModule",{value:!0});_A.pollHttpOperation=_A.isOperationError=_A.getResourceLocation=_A.getOperationStatus=_A.getOperationLocation=_A.initHttpOperation=_A.getStatusFromInitialResponse=_A.getErrorFromResponse=_A.parseRetryAfter=_A.inferLroMode=void 0;var bse=Eb(),Wk=gb();function Nse(t){let{azureAsyncOperation:e,operationLocation:A}=t;return A??e}a(Nse,"getOperationLocationPollingUrl");function Rse(t){return t.headers.location}a(Rse,"getLocationHeader");function Dse(t){return t.headers["operation-location"]}a(Dse,"getOperationLocationHeader");function Sse(t){return t.headers["azure-asyncoperation"]}a(Sse,"getAzureAsyncOperationHeader");function BGe(t){let{location:e,requestMethod:A,requestPath:r,resourceLocationConfig:i}=t;switch(A){case"PUT":return r;case"DELETE":return;case"PATCH":return n()??r;default:return n()}function n(){switch(i){case"azure-async-operation":return;case"original-uri":return r;case"location":default:return e}}a(n,"getDefault")}a(BGe,"findResourceLocation");function xse(t){let{rawResponse:e,requestMethod:A,requestPath:r,resourceLocationConfig:i}=t,n=Dse(e),s=Sse(e),o=Nse({operationLocation:n,azureAsyncOperation:s}),c=Rse(e),l=A?.toLocaleUpperCase();return o!==void 0?{mode:"OperationLocation",operationLocation:o,resourceLocation:BGe({requestMethod:l,location:c,requestPath:r,resourceLocationConfig:i})}:c!==void 0?{mode:"ResourceLocation",operationLocation:c}:l==="PUT"&&r?{mode:"Body",operationLocation:r}:void 0}a(xse,"inferLroMode");_A.inferLroMode=xse;function vse(t){let{status:e,statusCode:A}=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 zk(A);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 Wk.logger.verbose(`LRO: unrecognized operation status: ${e}`),e}}a(vse,"transformStatus");function IGe(t){let{status:e}=t.body??{};return vse({status:e,statusCode:t.statusCode})}a(IGe,"getStatus");function yGe(t){let{properties:e,provisioningState:A}=t.body??{},r=e?.provisioningState??A;return vse({status:r,statusCode:t.statusCode})}a(yGe,"getProvisioningState");function zk(t){return t===202?"running":t<300?"succeeded":"failed"}a(zk,"toOperationStatus");function kse({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let A=parseInt(e);return isNaN(A)?wGe(new Date(e)):A*1e3}}a(kse,"parseRetryAfter");_A.parseRetryAfter=kse;function Fse(t){let e=Tse(t,"error");if(!e){Wk.logger.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Wk.logger.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}a(Fse,"getErrorFromResponse");_A.getErrorFromResponse=Fse;function wGe(t){let e=Math.floor(new Date().getTime()),A=t.getTime();if(e<A)return A-e}a(wGe,"calculatePollingIntervalFromDate");function Lse(t){let{response:e,state:A,operationLocation:r}=t;function i(){switch(A.config.metadata?.mode){case void 0:return zk(e.rawResponse.statusCode);case"Body":return jk(e,A);default:return"running"}}a(i,"helper");let n=i();return n==="running"&&r===void 0?"succeeded":n}a(Lse,"getStatusFromInitialResponse");_A.getStatusFromInitialResponse=Lse;async function bGe(t){let{stateProxy:e,resourceLocationConfig:A,processResult:r,lro:i,setErrorAsResult:n}=t;return(0,bse.initOperation)({init:async()=>{let s=await i.sendInitialRequest(),o=xse({rawResponse:s.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethoLine truncated
|
||||
`,Vle="HTTP/1.1",oze="AES256",cze="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",lze=["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-if-tags","x-ms-source-if-tags"],dze=["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"],uze="BlobUsesCustomerSpecifiedEncryption",pze="BlobDoesNotUseCustomerSpecifiedEncryption",gze=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function hze(t){let e=O.URLBuilder.parse(t),A=e.getPath();return A=A||"/",A=mze(A),e.setPath(A),e.toString()}a(hze,"escapeURLPath");function Eze(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let A=t.split(";");for(let r of A)r.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=r.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}a(Eze,"getProxyUriFromDevConnString");function Ju(t,e){let A=t.split(";");for(let r of A)if(r.trim().startsWith(e))return r.trim().match(e+"=(.*)")[1];return""}a(Ju,"getValueInConnString");function yE(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=Eze(t),t=cze);let A=Ju(t,"BlobEndpoint");if(A=A.endsWith("/")?A.slice(0,-1):A,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let r="",i="",n=Buffer.from("accountKey","base64"),s="";if(i=Ju(t,"AccountName"),n=Buffer.from(Ju(t,"AccountKey"),"base64"),!A){r=Ju(t,"DefaultEndpointsProtocol");let o=r.toLowerCase();if(o!=="https"&&o!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(s=Ju(t,"EndpointSuffix"),!s)throw new Error("Invalid EndpointSuffix in the provided Connection String");A=`${r}://${i}.blob.${s}`}if(i){if(n.length===0)throw new Error("Invalid AccountKey in the provided Connection String")}else throw new Error("Invalid AccountName in the provided Connection String");return{kind:"AccountConnString",url:A,accountName:i,accountKey:n,proxyUri:e}}else{let r=Ju(t,"SharedAccessSignature"),i=Ju(t,"AccountName");if(i||(i=zle(A)),A){if(!r)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}else throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");return{kind:"SASConnString",url:A,accountName:i,accountSas:r}}}a(yE,"extractConnectionStringParts");function mze(t){return encodeURIComponent(t).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}a(mze,"escape");function NA(t,e){let A=O.URLBuilder.parse(t),r=A.getPath();return r=r?r.endsWith("/")?`${r}${e}`:`${r}/${e}`:e,A.setPath(r),new URL(A.toString()).toStr
Line truncated
|
||||
Polling status: ${Dse.terminalStates.includes(d)?"Stopped":"Running"}`),d==="succeeded"){let u=s(l,A);if(u!==void 0)return{response:await e(u).catch(Rse({state:A,stateProxy:r,isOperationError:o})),status:d}}return{response:l,status:d}}a(FGe,"pollOperationHelper");async function LGe(t){let{poll:e,state:A,stateProxy:r,options:i,getOperationStatus:n,getResourceLocation:s,getOperationLocation:o,isOperationError:c,withOperationLocation:l,getPollingInterval:d,processResult:u,getError:p,updateState:g,setDelay:h,isDone:m,setErrorAsResult:f}=t,{operationLocation:B}=A.config;if(B!==void 0){let{response:b,status:I}=await FGe({poll:e,getOperationStatus:n,state:A,stateProxy:r,operationLocation:B,getResourceLocation:s,isOperationError:c,options:i});if(Sse({status:I,response:b,state:A,stateProxy:r,isDone:m,processResult:u,getError:p,setErrorAsResult:f}),!Dse.terminalStates.includes(I)){let C=d?.(b);C&&h(C);let Q=o?.(b,A);if(Q!==void 0){let N=B!==Q;A.config.operationLocation=Q,l?.(Q,N)}else l?.(B,!1)}g?.(A,b)}}a(LGe,"pollOperation");td.pollOperation=LGe});var tF=E(_A=>{"use strict";Object.defineProperty(_A,"__esModule",{value:!0});_A.pollHttpOperation=_A.isOperationError=_A.getResourceLocation=_A.getOperationStatus=_A.getOperationLocation=_A.initHttpOperation=_A.getStatusFromInitialResponse=_A.getErrorFromResponse=_A.parseRetryAfter=_A.inferLroMode=void 0;var xse=Qb(),Kk=Cb();function vse(t){let{azureAsyncOperation:e,operationLocation:A}=t;return A??e}a(vse,"getOperationLocationPollingUrl");function kse(t){return t.headers.location}a(kse,"getLocationHeader");function Fse(t){return t.headers["operation-location"]}a(Fse,"getOperationLocationHeader");function Lse(t){return t.headers["azure-asyncoperation"]}a(Lse,"getAzureAsyncOperationHeader");function UGe(t){let{location:e,requestMethod:A,requestPath:r,resourceLocationConfig:i}=t;switch(A){case"PUT":return r;case"DELETE":return;case"PATCH":return n()??r;default:return n()}function n(){switch(i){case"azure-async-operation":return;case"original-uri":return r;case"location":default:return e}}a(n,"getDefault")}a(UGe,"findResourceLocation");function Use(t){let{rawResponse:e,requestMethod:A,requestPath:r,resourceLocationConfig:i}=t,n=Fse(e),s=Lse(e),o=vse({operationLocation:n,azureAsyncOperation:s}),c=kse(e),l=A?.toLocaleUpperCase();return o!==void 0?{mode:"OperationLocation",operationLocation:o,resourceLocation:UGe({requestMethod:l,location:c,requestPath:r,resourceLocationConfig:i})}:c!==void 0?{mode:"ResourceLocation",operationLocation:c}:l==="PUT"&&r?{mode:"Body",operationLocation:r}:void 0}a(Use,"inferLroMode");_A.inferLroMode=Use;function Tse(t){let{status:e,statusCode:A}=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 $k(A);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 Kk.logger.verbose(`LRO: unrecognized operation status: ${e}`),e}}a(Tse,"transformStatus");function TGe(t){let{status:e}=t.body??{};return Tse({status:e,statusCode:t.statusCode})}a(TGe,"getStatus");function MGe(t){let{properties:e,provisioningState:A}=t.body??{},r=e?.provisioningState??A;return Tse({status:r,statusCode:t.statusCode})}a(MGe,"getProvisioningState");function $k(t){return t===202?"running":t<300?"succeeded":"failed"}a($k,"toOperationStatus");function Mse({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let A=parseInt(e);return isNaN(A)?_Ge(new Date(e)):A*1e3}}a(Mse,"parseRetryAfter");_A.parseRetryAfter=Mse;function _se(t){let e=qse(t,"error");if(!e){Kk.logger.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Kk.logger.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}a(_se,"getErrorFromResponse");_A.getErrorFromResponse=_se;function _Ge(t){let e=Math.floor(new Date().getTime()),A=t.getTime();if(e<A)return A-e}a(_Ge,"calculatePollingIntervalFromDate");function Ose(t){let{response:e,state:A,operationLocation:r}=t;function i(){switch(A.config.metadata?.mode){case void 0:return $k(e.rawResponse.statusCode);case"Body":return eF(e,A);default:return"running"}}a(i,"helper");let n=i();return n==="running"&&r===void 0?"succeeded":n}a(Ose,"getStatusFromInitialResponse");_A.getStatusFromInitialResponse=Ose;async function OGe(t){let{stateProxy:e,resourceLocationConfig:A,processResult:r,lro:i,setErrorAsResult:n}=t;return(0,xse.initOperation)({init:async()=>{let s=await i.sendInitialRequest(),o=Use({rawResponse:s.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethoLine truncated
|
||||
`,Zle="HTTP/1.1",Ize="AES256",yze="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",wze=["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-if-tags","x-ms-source-if-tags"],bze=["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"],Nze="BlobUsesCustomerSpecifiedEncryption",Rze="BlobDoesNotUseCustomerSpecifiedEncryption",Dze=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Sze(t){let e=O.URLBuilder.parse(t),A=e.getPath();return A=A||"/",A=vze(A),e.setPath(A),e.toString()}a(Sze,"escapeURLPath");function xze(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let A=t.split(";");for(let r of A)r.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=r.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}a(xze,"getProxyUriFromDevConnString");function Vu(t,e){let A=t.split(";");for(let r of A)if(r.trim().startsWith(e))return r.trim().match(e+"=(.*)")[1];return""}a(Vu,"getValueInConnString");function wE(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=xze(t),t=yze);let A=Vu(t,"BlobEndpoint");if(A=A.endsWith("/")?A.slice(0,-1):A,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let r="",i="",n=Buffer.from("accountKey","base64"),s="";if(i=Vu(t,"AccountName"),n=Buffer.from(Vu(t,"AccountKey"),"base64"),!A){r=Vu(t,"DefaultEndpointsProtocol");let o=r.toLowerCase();if(o!=="https"&&o!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(s=Vu(t,"EndpointSuffix"),!s)throw new Error("Invalid EndpointSuffix in the provided Connection String");A=`${r}://${i}.blob.${s}`}if(i){if(n.length===0)throw new Error("Invalid AccountKey in the provided Connection String")}else throw new Error("Invalid AccountName in the provided Connection String");return{kind:"AccountConnString",url:A,accountName:i,accountKey:n,proxyUri:e}}else{let r=Vu(t,"SharedAccessSignature"),i=Vu(t,"AccountName");if(i||(i=$le(A)),A){if(!r)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}else throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");return{kind:"SASConnString",url:A,accountName:i,accountSas:r}}}a(wE,"extractConnectionStringParts");function vze(t){return encodeURIComponent(t).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}a(vze,"escape");function NA(t,e){let A=O.URLBuilder.parse(t),r=A.getPath();return r=r?r.endsWith("/")?`${r}${e}`:`${r}/${e}`:e,A.setPath(r),new URL(A.toString()).toStr
Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),r=this.factory.computeHMACSHA256(A);return e.headers.set($t.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${r}`),e}getHeaderValueToSign(e,A){let r=e.headers.get(A);return!r||A===$t.CONTENT_LENGTH&&r==="0"?"":r}getCanonicalizedHeadersString(e){let A=e.headers.headersArray().filter(i=>i.name.toLowerCase().startsWith($t.PREFIX_FOR_STORAGE));A.sort((i,n)=>i.name.toLowerCase().localeCompare(n.name.toLowerCase())),A=A.filter((i,n,s)=>!(n>0&&i.name.toLowerCase()===s[n-1].name.toLowerCase()));let r="";return A.forEach(i=>{r+=`${i.name.toLowerCase().trimRight()}:${i.value.trimLeft()}
|
||||
`}),r}getCanonicalizedResourceString(e){let A=dL(e.url)||"/",r="";r+=`/${this.factory.accountName}${A}`;let i=Bze(e.url),n={};if(i){let s=[];for(let o in i)if(Object.prototype.hasOwnProperty.call(i,o)){let c=o.toLowerCase();n[c]=i[o],s.push(c)}s.sort();for(let o of s)r+=`
|
||||
${o}:${decodeURIComponent(n[o])}`}return r}},PA=class extends FQ{static{a(this,"StorageSharedKeyCredential")}constructor(e,A){super(),this.accountName=e,this.accountKey=Buffer.from(A,"base64")}create(e,A){return new Yb(e,A,this)}computeHMACSHA256(e){return bae.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},Tze="azure-storage-blob",Mze="12.17.0",UQ=class extends W.ServiceClient{static{a(this,"StorageClientContext")}constructor(e,A){if(e===void 0)throw new Error("'url' cannot be null");if(A||(A={}),!A.userAgent){let r=W.getDefaultUserAgentValue();A.userAgent=`${Tze}/${Mze} ${r}`}super(void 0,A),this.requestContentType="application/json; charset=utf-8",this.baseUri=A.endpoint||"{url}",this.url=e,this.version=A.version||"2023-11-03"}},TQ=class{static{a(this,"StorageClient")}constructor(e,A){this.url=hze(e),this.accountName=zle(e),this.pipeline=A,this.storageClientContext=new UQ(this.url,A.toServiceClientOptions()),this.isHttps=Wle(fze(this.url)||"","https"),this.credential=new _t;for(let i of this.pipeline.factories)O.isNode&&i instanceof PA||i instanceof _t?this.credential=i:O.isTokenCredential(i.credential)&&(this.credential=i.credential);let r=this.storageClientContext;r.requestContentType=void 0}},J=P.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function ne(t){var e,A;return{spanOptions:(e=t?.tracingOptions)===null||e===void 0?void 0:e.spanOptions,tracingContext:(A=t?.tracingOptions)===null||A===void 0?void 0:A.tracingContext}}a(ne,"convertTracingToRequestOptionsBase");var _c=class t{static{a(this,"BlobSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let A=new t;for(let r of e)switch(r){case"r":A.read=!0;break;case"a":A.add=!0;break;case"c":A.create=!0;break;case"w":A.write=!0;break;case"d":A.delete=!0;break;case"x":A.deleteVersion=!0;break;case"t":A.tag=!0;break;case"m":A.move=!0;break;case"e":A.execute=!0;break;case"i":A.setImmutabilityPolicy=!0;break;case"y":A.permanentDelete=!0;break;default:throw new RangeError(`Invalid permission: ${r}`)}return A}static from(e){let A=new t;return e.read&&(A.read=!0),e.add&&(A.add=!0),e.create&&(A.create=!0),e.write&&(A.write=!0),e.delete&&(A.delete=!0),e.deleteVersion&&(A.deleteVersion=!0),e.tag&&(A.tag=!0),e.move&&(A.move=!0),e.execute&&(A.execute=!0),e.setImmutabilityPolicy&&(A.setImmutabilityPolicy=!0),e.permanentDelete&&(A.permanentDelete=!0),A}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}},Oc=class t{static{a(this,"ContainerSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let A=new t;for(let r of e)switch(r){case"r":A.read=!0;break;case"a":A.add=!0;break;case"c":A.create=!0;break;case"w":A.write=!0;break;case"d":A.delete=!0;break;case"l":A.list=!0;break;case"t":A.tag=!0;break;case"x":A.deleteVersion=!0;break;case"m":A.move=!0;break;case"e":A.execute=!0;break;case"i":A.setImmutabilityPolicy=!0;break;case"y":A.permanentDelete=!0;break;case"f":A.filterByTags=!0;break;default:throw new RangeError(`Invalid permission ${r}`)}return A}static from(e){let A=new t;return e.read&&(A.read=!0),e.add&&(A.add=!0),e.create&&(A.create=!0),e.write&&(A.write=!0),e.delete&&(A.delete=!0),e.list&&(A.list=!0),e.deleteVersion&&(A.deleteVersion=!0),e.tag&&(A.tag=!0),e.move&&(A.move=!0),e.execute&&(A.execute=!0),e.setImmutabilityPolicy&&(A.setImmutabilityPolicy=!0),e.permanentDelete&&(A.permanentDelete=!0),e.filterByTags&&(A.filterByTags=!0),A}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}},IF=class{static{a(this,"UserDelegationKeyCredential")}constructor(e,A){this.accountName=e,this.userDelegationKey=A,this.key=Buffer.from(A.value,"base64")}computeHMACSHA256(e){return bae.createHmac("sha256",this.key).update(e,"utf8").digest("base64")}};function Pc(t){return t.end?`${t.start}-${t.end}`:t.start}a(Pc,"ipRangeToString");ce.SASProtocol=void 0;(function(t){t.Https="https",t.HttpsAndHttp="https,http"})(ce.SASProtocol||(ce.SASProtocol={}));var vo=class{static{a(this,"SASQueryParameters")}constructor(e,A,r,i,n,s,o,
Line truncated
|
||||
`),n=e.computeHMACSHA256(i);return new vo(t.version,n,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}a(_ze,"generateBlobSASQueryParameters20150405");function Oze(t,e){if(t=bE(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 A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",wE(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}a(Oze,"generateBlobSASQueryParameters20181109");function Pze(t,e){if(t=bE(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 A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",wE(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope)}a(Pze,"generateBlobSASQueryParameters20201206");function qze(t,e){if(t=bE(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",wE(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Rt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Rt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey)}a(qze,"generateBlobSASQueryParametersUDK20181109");function Hze(t,e){if(t=bE(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",wE(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Rt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Rt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId)}a(Hze,"generateBlobSASQueryParametersUDK20200210");function Yze(t,e){if(t=bE(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",wE(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Rt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Rt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope)}a(Yze,"generateBlobSASQueryParametersUDK20201206");function wE(t,e,A){let r=[`/blob/${t}/${e}`];return A&&r.push(`/${A}`),r.join("")}a(wE,"getCanonicalName");function bE(t){let e=t.version?t.version:cL;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}a(bE,"SASSignatureValuesSanityCheckAndAutofill");var MQ=class{static{a(this,"BlobLeaseClient")}constructor(e,A){let r=new UQ(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new ju(r)):(this._isContainer=!1,this._containerOrBlobOperation=new xQ(r)),A||(A=O.generateUuid()),this._leaseId=A}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,A={}){var r,i,n,s,o,c;let{span:l,updatedOptions:d}=J("BlobLeaseClient-acquireLease",A);if(this._isContainer&&(!((r=A.conditions)===null||r===void 0)&&r.ifMatch&&((i=A.conditions)===null||i===void 0?void 0:i.ifMatch)!==xo||!((n=A.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=A.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==xo||!((o=A.conditions)===null||o===void 0)&&o.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.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:A.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},A.conditions),{ifTags:(c=A.conditions)===null||c===void 0?void 0:c.tagConditions}),proposedLeaseId:this._leaseId},ne(d)))}catch(u){throw l.setStatus({code:P.SpanStatusCode.ERROR,message:u.message}),u}finally{l.end()}}async changeLease(e,A={}){var r,i,n,s,o,c;let{span:l,updatedOptions:d}=J("BlobLeaseClient-changeLease",A);if(this._isContainer&&(!((r=A.conditions)===null||r===void 0)&&r.ifMatch&&((i=A.conditions)===null||i===void 0?void 0:i.ifMatch)!==xo||!((n=A.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=A.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==xo||!((o=A.conditions)===null||o===void 0)&&o.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.");try{let u=await this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:A.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},A.conditions),{ifTags:(c=A.conditions)===null||c===void 0?void 0:c.tagConditions})},ne(d)));return this._leaseId=e,u}catch(u){throw l.setStatus({code:P.SpanStatusCode.ERROR,message:u.message}),u}finally{l.end()}}async releaseLease(e={}){var A,r,i,n,s,o;let{span:c,updatedOptions:l}=J("BlobLeaseClient-releaseLease",e);if(this._isContainer&&(!((A=e.conditions)===null||A===void 0)&&A.ifMatch&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==xo||!((i=e.conditions)===null||i===void 0)&&i.ifNoneMatch&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==xo||!((s=e.conditions)===null||s===void 0)&&s.tag
Line truncated
|
||||
`}),r}getCanonicalizedResourceString(e){let A=EL(e.url)||"/",r="";r+=`/${this.factory.accountName}${A}`;let i=Uze(e.url),n={};if(i){let s=[];for(let o in i)if(Object.prototype.hasOwnProperty.call(i,o)){let c=o.toLowerCase();n[c]=i[o],s.push(c)}s.sort();for(let o of s)r+=`
|
||||
${o}:${decodeURIComponent(n[o])}`}return r}},PA=class extends TQ{static{a(this,"StorageSharedKeyCredential")}constructor(e,A){super(),this.accountName=e,this.accountKey=Buffer.from(A,"base64")}create(e,A){return new Wb(e,A,this)}computeHMACSHA256(e){return xae.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},Xze="azure-storage-blob",Zze="12.17.0",_Q=class extends W.ServiceClient{static{a(this,"StorageClientContext")}constructor(e,A){if(e===void 0)throw new Error("'url' cannot be null");if(A||(A={}),!A.userAgent){let r=W.getDefaultUserAgentValue();A.userAgent=`${Xze}/${Zze} ${r}`}super(void 0,A),this.requestContentType="application/json; charset=utf-8",this.baseUri=A.endpoint||"{url}",this.url=e,this.version=A.version||"2023-11-03"}},OQ=class{static{a(this,"StorageClient")}constructor(e,A){this.url=Sze(e),this.accountName=$le(e),this.pipeline=A,this.storageClientContext=new _Q(this.url,A.toServiceClientOptions()),this.isHttps=Kle(Fze(this.url)||"","https"),this.credential=new _t;for(let i of this.pipeline.factories)O.isNode&&i instanceof PA||i instanceof _t?this.credential=i:O.isTokenCredential(i.credential)&&(this.credential=i.credential);let r=this.storageClientContext;r.requestContentType=void 0}},J=P.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function ne(t){var e,A;return{spanOptions:(e=t?.tracingOptions)===null||e===void 0?void 0:e.spanOptions,tracingContext:(A=t?.tracingOptions)===null||A===void 0?void 0:A.tracingContext}}a(ne,"convertTracingToRequestOptionsBase");var _c=class t{static{a(this,"BlobSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let A=new t;for(let r of e)switch(r){case"r":A.read=!0;break;case"a":A.add=!0;break;case"c":A.create=!0;break;case"w":A.write=!0;break;case"d":A.delete=!0;break;case"x":A.deleteVersion=!0;break;case"t":A.tag=!0;break;case"m":A.move=!0;break;case"e":A.execute=!0;break;case"i":A.setImmutabilityPolicy=!0;break;case"y":A.permanentDelete=!0;break;default:throw new RangeError(`Invalid permission: ${r}`)}return A}static from(e){let A=new t;return e.read&&(A.read=!0),e.add&&(A.add=!0),e.create&&(A.create=!0),e.write&&(A.write=!0),e.delete&&(A.delete=!0),e.deleteVersion&&(A.deleteVersion=!0),e.tag&&(A.tag=!0),e.move&&(A.move=!0),e.execute&&(A.execute=!0),e.setImmutabilityPolicy&&(A.setImmutabilityPolicy=!0),e.permanentDelete&&(A.permanentDelete=!0),A}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}},Oc=class t{static{a(this,"ContainerSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let A=new t;for(let r of e)switch(r){case"r":A.read=!0;break;case"a":A.add=!0;break;case"c":A.create=!0;break;case"w":A.write=!0;break;case"d":A.delete=!0;break;case"l":A.list=!0;break;case"t":A.tag=!0;break;case"x":A.deleteVersion=!0;break;case"m":A.move=!0;break;case"e":A.execute=!0;break;case"i":A.setImmutabilityPolicy=!0;break;case"y":A.permanentDelete=!0;break;case"f":A.filterByTags=!0;break;default:throw new RangeError(`Invalid permission ${r}`)}return A}static from(e){let A=new t;return e.read&&(A.read=!0),e.add&&(A.add=!0),e.create&&(A.create=!0),e.write&&(A.write=!0),e.delete&&(A.delete=!0),e.list&&(A.list=!0),e.deleteVersion&&(A.deleteVersion=!0),e.tag&&(A.tag=!0),e.move&&(A.move=!0),e.execute&&(A.execute=!0),e.setImmutabilityPolicy&&(A.setImmutabilityPolicy=!0),e.permanentDelete&&(A.permanentDelete=!0),e.filterByTags&&(A.filterByTags=!0),A}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}},RF=class{static{a(this,"UserDelegationKeyCredential")}constructor(e,A){this.accountName=e,this.userDelegationKey=A,this.key=Buffer.from(A.value,"base64")}computeHMACSHA256(e){return xae.createHmac("sha256",this.key).update(e,"utf8").digest("base64")}};function Pc(t){return t.end?`${t.start}-${t.end}`:t.start}a(Pc,"ipRangeToString");ce.SASProtocol=void 0;(function(t){t.Https="https",t.HttpsAndHttp="https,http"})(ce.SASProtocol||(ce.SASProtocol={}));var vo=class{static{a(this,"SASQueryParameters")}constructor(e,A,r,i,n,s,o,
Line truncated
|
||||
`),n=e.computeHMACSHA256(i);return new vo(t.version,n,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}a(Kze,"generateBlobSASQueryParameters20150405");function $ze(t,e){if(t=NE(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 A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",bE(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}a($ze,"generateBlobSASQueryParameters20181109");function eje(t,e){if(t=NE(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 A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",bE(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope)}a(eje,"generateBlobSASQueryParameters20201206");function tje(t,e){if(t=NE(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",bE(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Rt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Rt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey)}a(tje,"generateBlobSASQueryParametersUDK20181109");function Aje(t,e){if(t=NE(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",bE(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Rt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Rt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId)}a(Aje,"generateBlobSASQueryParametersUDK20200210");function rje(t,e){if(t=NE(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=_c.parse(t.permissions.toString()).toString():i=Oc.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Rt(t.startsOn,!1):"",t.expiresOn?Rt(t.expiresOn,!1):"",bE(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Rt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Rt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new vo(t.version,s,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope)}a(rje,"generateBlobSASQueryParametersUDK20201206");function bE(t,e,A){let r=[`/blob/${t}/${e}`];return A&&r.push(`/${A}`),r.join("")}a(bE,"getCanonicalName");function NE(t){let e=t.version?t.version:gL;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}a(NE,"SASSignatureValuesSanityCheckAndAutofill");var PQ=class{static{a(this,"BlobLeaseClient")}constructor(e,A){let r=new _Q(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new Xu(r)):(this._isContainer=!1,this._containerOrBlobOperation=new FQ(r)),A||(A=O.generateUuid()),this._leaseId=A}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,A={}){var r,i,n,s,o,c;let{span:l,updatedOptions:d}=J("BlobLeaseClient-acquireLease",A);if(this._isContainer&&(!((r=A.conditions)===null||r===void 0)&&r.ifMatch&&((i=A.conditions)===null||i===void 0?void 0:i.ifMatch)!==xo||!((n=A.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=A.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==xo||!((o=A.conditions)===null||o===void 0)&&o.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.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:A.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},A.conditions),{ifTags:(c=A.conditions)===null||c===void 0?void 0:c.tagConditions}),proposedLeaseId:this._leaseId},ne(d)))}catch(u){throw l.setStatus({code:P.SpanStatusCode.ERROR,message:u.message}),u}finally{l.end()}}async changeLease(e,A={}){var r,i,n,s,o,c;let{span:l,updatedOptions:d}=J("BlobLeaseClient-changeLease",A);if(this._isContainer&&(!((r=A.conditions)===null||r===void 0)&&r.ifMatch&&((i=A.conditions)===null||i===void 0?void 0:i.ifMatch)!==xo||!((n=A.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=A.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==xo||!((o=A.conditions)===null||o===void 0)&&o.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.");try{let u=await this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:A.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},A.conditions),{ifTags:(c=A.conditions)===null||c===void 0?void 0:c.tagConditions})},ne(d)));return this._leaseId=e,u}catch(u){throw l.setStatus({code:P.SpanStatusCode.ERROR,message:u.message}),u}finally{l.end()}}async releaseLease(e={}){var A,r,i,n,s,o;let{span:c,updatedOptions:l}=J("BlobLeaseClient-releaseLease",e);if(this._isContainer&&(!((A=e.conditions)===null||A===void 0)&&A.ifMatch&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==xo||!((i=e.conditions)===null||i===void 0)&&i.ifNoneMatch&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==xo||!((s=e.conditions)===null||s===void 0)&&s.tag
Line truncated
|
||||
`):s=[e.accountName,r,i,n,t.startsOn?Rt(t.startsOn,!1):"",Rt(t.expiresOn,!1),t.ipRange?Pc(t.ipRange):"",t.protocol?t.protocol:"",A,""].join(`
|
||||
`);let o=e.computeHMACSHA256(s);return new vo(A,o,r.toString(),i,n,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope)}a(Xle,"generateAccountSASQueryParameters");var JF=class t extends TQ{static{a(this,"BlobServiceClient")}constructor(e,A,r){let i;pd(A)?i=A:O.isNode&&A instanceof PA||A instanceof _t||O.isTokenCredential(A)?i=Gt(A,r):i=Gt(new _t,r),super(e,i),this.serviceContext=new Tb(this.storageClientContext)}static fromConnectionString(e,A){A=A||{};let r=yE(e);if(r.kind==="AccountConnString")if(O.isNode){let i=new PA(r.accountName,r.accountKey);A.proxyOptions||(A.proxyOptions=O.getDefaultProxySettings(r.proxyUri));let n=Gt(i,A);return new t(r.url,n)}else throw new Error("Account connection string is only supported in Node.js environment");else if(r.kind==="SASConnString"){let i=Gt(new _t,A);return new t(r.url+"?"+r.accountSas,i)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}getContainerClient(e){return new Jb(NA(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,A={}){let{span:r,updatedOptions:i}=J("BlobServiceClient-createContainer",A);try{let n=this.getContainerClient(e),s=await n.create(i);return{containerClient:n,containerCreateResponse:s}}catch(n){throw r.setStatus({code:P.SpanStatusCode.ERROR,message:n.message}),n}finally{r.end()}}async deleteContainer(e,A={}){let{span:r,updatedOptions:i}=J("BlobServiceClient-deleteContainer",A);try{return await this.getContainerClient(e).delete(i)}catch(n){throw r.setStatus({code:P.SpanStatusCode.ERROR,message:n.message}),n}finally{r.end()}}async undeleteContainer(e,A,r={}){let{span:i,updatedOptions:n}=J("BlobServiceClient-undeleteContainer",r);try{let s=this.getContainerClient(r.destinationContainerName||e),c=await new ju(s.storageClientContext).restore(Object.assign({deletedContainerName:e,deletedContainerVersion:A},n));return{containerClient:s,containerUndeleteResponse:c}}catch(s){throw i.setStatus({code:P.SpanStatusCode.ERROR,message:s.message}),s}finally{i.end()}}async renameContainer(e,A,r={}){var i;let{span:n,updatedOptions:s}=J("BlobServiceClient-renameContainer",r);try{let o=this.getContainerClient(A),l=await new ju(o.storageClientContext).rename(e,Object.assign(Object.assign({},s),{sourceLeaseId:(i=r.sourceCondition)===null||i===void 0?void 0:i.leaseId}));return{containerClient:o,containerRenameResponse:l}}catch(o){throw n.setStatus({code:P.SpanStatusCode.ERROR,message:o.message}),o}finally{n.end()}}async getProperties(e={}){let{span:A,updatedOptions:r}=J("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},ne(r)))}catch(i){throw A.setStatus({code:P.SpanStatusCode.ERROR,message:i.message}),i}finally{A.end()}}async setProperties(e,A={}){let{span:r,updatedOptions:i}=J("BlobServiceClient-setProperties",A);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:A.abortSignal},ne(i)))}catch(n){throw r.setStatus({code:P.SpanStatusCode.ERROR,message:n.message}),n}finally{r.end()}}async getStatistics(e={}){let{span:A,updatedOptions:r}=J("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},ne(r)))}catch(i){throw A.setStatus({code:P.SpanStatusCode.ERROR,message:i.message}),i}finally{A.end()}}async getAccountInfo(e={}){let{span:A,updatedOptions:r}=J("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},ne(r)))}catch(i){throw A.setStatus({code:P.SpanStatusCode.ERROR,message:i.message}),i}finally{A.end()}}async listContainersSegment(e,A={}){let{span:r,updatedOptions:i}=J("BlobServiceClient-listContainersSegment",A);try{return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({abortSignal:A.abortSignal,marker:e},A),{include:typeof A.include=="string"?[A.include]:A.include}),ne(i)))}catch(n){throw r.setStatus({code:P.SpanStatusCode.ERROR,message:n.message}),n}finally{r.end()}}async findBlobsByTagsSegment(e,A,r={}){let{span:i,updatedOptions:n}=J("BlobServiceClient-findBlobsByTagsSegment",r);try{let s=await this.serviceContext.filterBlobs(Object.assign({abortSignal:r.abortSignal,where:e,marker:A,maxPageSize:r.maxPageSize},ne(n)));return Object.assign(Object.assign({},s),{_response:s._response,blobs:s.blobs.map(c=>{var l;let d="";return((l=c.tags)===null||l===void 0?void 0:l.blobTagSet.length)===1&&(d=c.tags.blobTagSet[0].value),Object.assign(Object.assign({},c),{tags:RQ(c.tags),tagValue:d})})})}catch(s){throw i.setStatus({code:P.SpanStatusCode.ERROR,message:s.message}),s}finally{i.end()}}findBlobsByTagsSegments(e,A,r={}){return V.__asyncGenerator(this,arguments,a(function*(){let n;if(A||A===void 0)do n=yield V.__await(this.findBlobsByTagsSegment(e,A,r)),n.blobs=n.blobs||[],A=n.continuationToken,yield yield V.__awai
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(A),this.code=e,this.name="NetworkError"}};Bn.NetworkError=eN;eN.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var tN=class extends Error{static{a(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Bn.UsageError=tN;tN.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var Zle=E(In=>{"use strict";var rje=In&&In.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),ije=In&&In.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),nje=In&&In.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&rje(e,t,A);return ije(e,t),e},sje=In&&In.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(In,"__esModule",{value:!0});In.uploadCacheArchiveSDK=In.UploadProgress=void 0;var BL=nje(hi()),aje=hL(),oje=QL(),AN=class{static{a(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,A=(100*(e/this.contentLength)).toFixed(1),r=Date.now()-this.startTime,i=(e/(1024*1024)/(r/1e3)).toFixed(1);BL.info(`Sent ${e} of ${this.contentLength} (${A}%), ${i} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let A=a(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(A,e))},"displayCallback");this.timeoutHandle=setTimeout(A,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};In.UploadProgress=AN;function cje(t,e,A){var r;return sje(this,void 0,void 0,function*(){let i=new aje.BlobClient(t),n=i.getBlockBlobClient(),s=new AN((r=A?.archiveSizeBytes)!==null&&r!==void 0?r:0),o={blockSize:A?.uploadChunkSize,concurrency:A?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:s.onProgress()};try{s.startDisplayTimer(),BL.debug(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let c=yield n.uploadFile(e,o);if(c._response.status>=400)throw new oje.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw BL.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{s.stopDisplayTimer()}})}a(cje,"uploadCacheArchiveSDK");In.uploadCacheArchiveSDK=cje});var yL=E(qA=>{"use strict";var lje=qA&&qA.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),dje=qA&&qA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uje=qA&&qA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&lje(e,t,A);return dje(e,t),e},iN=qA&&qA.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(qA,"__esModule",{value:!0});qA.retryHttpClientResponse=qA.retryTypedResponse=qA.retry=qA.isRetryableStatusCode=qA.isServerErrorStatusCode=qA.isSuccessStatusCode=void 0;var Kle=uje(hi()),rN=wg(),NE=Nh();function pje(t){return t?t>=200&&t<300:!1}a(pje,"isSuccessStatusCode");qA.isSuccessStatusCode=pje;function $le(t){return t?t>=500:!0}a($le,"isServerErrorStatusCode");qA.isServerErrorStatusCode=$le;function ede(t){return t?[rN.HttpCodes.BadGateway,rN.HttpCodes.ServiceUnavailable,rN.HttpCodes.GatewayTimeout].includes(t):!1}a(ede,"isRetryableStatusCode");qA.isRetryableStatusCode=ede;function gje(t){return iN(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}a(gje,"sleep");function IL(t,e,A,r=NE.DefaultRetryAttempts
Line truncated
|
||||
Other caches with similar key:`);for(let o of n?.artifactCaches||[])cs.debug(`Cache Key: ${o?.cacheKey}, Cache Version: ${o?.cacheVersion}, Cache Scope: ${o?.scope}, Cache Created: ${o?.creationTime}`)}}})}a(Xje,"printCachesListForDiagnostics");function Zje(t,e,A){return yn(this,void 0,void 0,function*(){let r=new Yje.URL(t),i=(0,DL.getDownloadOptions)(A);r.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield(0,aN.downloadCacheStorageSDK)(t,e,i):i.concurrentBlobDownloads?yield(0,aN.downloadCacheHttpClientConcurrent)(t,e,i):yield(0,aN.downloadCacheHttpClient)(t,e):yield(0,aN.downloadCacheHttpClient)(t,e)})}a(Zje,"downloadCache");Or.downloadCache=Zje;function Kje(t,e,A){return yn(this,void 0,void 0,function*(){let r=SL(),i=DE.getCacheVersion(e,A?.compressionMethod,A?.enableCrossOsArchive),n={key:t,version:i,cacheSize:A?.cacheSize};return yield(0,hd.retryTypedResponse)("reserveCache",()=>yn(this,void 0,void 0,function*(){return r.postJson(XQ("caches"),n)}))})}a(Kje,"reserveCache");Or.reserveCache=Kje;function lde(t,e){return`bytes ${t}-${e}/*`}a(lde,"getContentRange");function $je(t,e,A,r,i){return yn(this,void 0,void 0,function*(){cs.debug(`Uploading chunk of size ${i-r+1} bytes at offset ${r} with content range: ${lde(r,i)}`);let n={"Content-Type":"application/octet-stream","Content-Range":lde(r,i)},s=yield(0,hd.retryHttpClientResponse)(`uploadChunk (start: ${r}, end: ${i})`,()=>yn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,A(),n)}));if(!(0,hd.isSuccessStatusCode)(s.message.statusCode))throw new Error(`Cache service responded with ${s.message.statusCode} during upload chunk.`)})}a($je,"uploadChunk");function eXe(t,e,A,r){return yn(this,void 0,void 0,function*(){let i=DE.getArchiveFileSizeInBytes(A),n=XQ(`caches/${e.toString()}`),s=NL.openSync(A,"r"),o=(0,DL.getUploadOptions)(r),c=DE.assertDefined("uploadConcurrency",o.uploadConcurrency),l=DE.assertDefined("uploadChunkSize",o.uploadChunkSize),d=[...new Array(c).keys()];cs.debug("Awaiting all uploads");let u=0;try{yield Promise.all(d.map(()=>yn(this,void 0,void 0,function*(){for(;u<i;){let p=Math.min(i-u,l),g=u,h=u+p-1;u+=l,yield $je(t,n,()=>NL.createReadStream(A,{fd:s,start:g,end:h,autoClose:!1}).on("error",m=>{throw new Error(`Cache upload failed because file read failed with ${m.message}`)}),g,h)}})))}finally{NL.closeSync(s)}})}a(eXe,"uploadFile");function tXe(t,e,A){return yn(this,void 0,void 0,function*(){let r={size:A};return yield(0,hd.retryTypedResponse)("commitCache",()=>yn(this,void 0,void 0,function*(){return t.postJson(XQ(`caches/${e.toString()}`),r)}))})}a(tXe,"commitCache");function AXe(t,e,A,r){return yn(this,void 0,void 0,function*(){if((0,DL.getUploadOptions)(r).useAzureSdk){if(!A)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,Gje.uploadCacheArchiveSDK)(A,e,r)}else{let n=SL();cs.debug("Upload cache"),yield eXe(n,t,e,r),cs.debug("Commiting cache");let s=DE.getArchiveFileSizeInBytes(e);cs.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);let o=yield tXe(n,t,s);if(!(0,hd.isSuccessStatusCode)(o.statusCode))throw new Error(`Cache service responded with ${o.statusCode} during commit cache.`);cs.info("Cache saved successfully")}})}a(AXe,"saveCache");Or.saveCache=AXe});var oN=E(SE=>{"use strict";Object.defineProperty(SE,"__esModule",{value:!0});SE.isJsonObject=SE.typeofJsonValue=void 0;function rXe(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}a(rXe,"typeofJsonValue");SE.typeofJsonValue=rXe;function iXe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}a(iXe,"isJsonObject");SE.isJsonObject=iXe});var lN=E(xE=>{"use strict";Object.defineProperty(xE,"__esModule",{value:!0});xE.base64encode=xE.base64decode=void 0;var Gc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),cN=[];for(let t=0;t<Gc.length;t++)cN[Gc[t].charCodeAt(0)]=t;cN[45]=Gc.indexOf("+");cN[95]=Gc.indexOf("/");function nXe(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let A=new Uint8Array(e),r=0,i=0,n,s=0;for(let o=0;o<t.length;o++){if(n=cN[t.charCodeAt(o)],n===void 0)switch(t[o]){case"=":i=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:s=n,i=1;break;case 1:A[r++]=s<<2|(n&48)>>4,s=n,i=2;break;case 2:A[r++]=(s&15)<<4|(n&60)>>2,s=n,i=3;break;case 3:A[r++]=(s&3)<<6|n,i=0;break}}if(i==1)throw Error("invalid base64 string.");return A.subarray(0,r)}a(nXe,"base64decode");xE.base64decode=nXe;function sXe(t){let e="",A=0,r,i=0;for(let n=0;n<t.length;n++)switch(r=t[n],A){case 0:e+=Gc[r>>2],i=(r&3)<<4,A=1;break;case 1:e+=Gc[i|r>>4],i=(r&15)<<2,A=2;break;case 2:e+=Gc[i|r>>6],e+=Gc[r&63],A=0;break}return A&&(e+=Gc[i],e+="=",A==1&&(e+="=")),e}a(sXe,"base64encode");xE.base64encode=sXe});var ude=E(dN=>{"use strict";Object.defineProperty(dN,"__esModule",{value:!0});dN.utf8read=void 0;var xL=a(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function aXe(t){if(t.length<1)return"";let e=0,A=[],r=[],i=0,n,s=t.length;for(;e<s;)n=t[e++],n<128?r[i++]=n:n>191&&n<224?r[i++]=(n&31)<<6|t[e++]&63:n>239&&n<365?(n=((n&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,r[i++]=55296+(n>>10),r[i++]=56320+(n&1023)):r[i++]=(n&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(A.push(xL(r)),i=0);return A.length?(i&&A.push(xL(r.slice(0,i))),A.join("")):xL(r.slice(0,i))}a(aXe,"utf8read");dN.utf8read=aXe});var ZQ=E(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.WireType=Fo.mergeBinaryOptions=Fo.UnknownFieldHandler=void 0;var oXe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(A,r,i,n,s)=>{(e(r)?r[t.symbol]:r[t.symbol]=[]).push({no:i,wireType:n,data:s})},t.onWrite=(A,r,i)=>{for(let{no:n,wireType:s,data:o}of t.list(r))i.tag(n,s).raw(o)},t.list=(A,r)=>{if(e(A)){let i=A[t.symbol];return r?i.filter(n=>n.no==r):i}return[]},t.last=(A,r)=>t.list(A,r).slice(-1)[0];let e=a(A=>A&&Array.isArray(A[t.symbol]),"is")})(oXe=Fo.UnknownFieldHandler||(Fo.UnknownFieldHandler={}));function cXe(t,e){return Object.assign(Object.assign({},t),e)}a(cXe,"mergeBinaryOptions");Fo.mergeBinaryOptions=cXe;var lXe;(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"})(lXe=Fo.WireType||(Fo.WireType={}))});var pN=E(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.varint32read=wn.varint32write=wn.int64toString=wn.int64fromString=wn.varint64write=wn.varint64read=void 0;function dXe(){let t=0,e=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<r,!(i&128))return this.assertBounds(),[t,e]}let A=this.buf[this.pos++];if(t|=(A&15)<<28,e=(A&112)>>4,!(A&128))return this.assertBounds(),[t,e];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<r,!(i&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}a(dXe,"varint64read");wn.varint64read=dXe;function uXe(t,e,A){for(let n=0;n<28;n=n+7){let s=t>>>n,o=!(!(s>>>7)&&e==0),c=(o?s|128:s)&255;if(A.push(c),!o)return}let r=t>>>28&15|(e&7)<<4,i=!!(e>>3);if(A.push((i?r|128:r)&255),!!i){for(let n=3;n<31;n=n+7){let s=e>>>n,o=!!(s>>>7),c=(o?s|128:s)&255;if(A.push(c),!o)return}A.push(e>>>31&1)}}a(uXe,"varint64write");wn.varint64write=uXe;var uN=65536*65536;function pXe(t){let e=t[0]=="-";e&&(t=t.slice(1));let A=1e6,r=0,i=0;function n(s,o){let c=Number(t.slice(s,o));i*=A,r=r*A+c,r>=uN&&(i=i+(r/uN|0),r=r%uN)}return a(n,"add1e6digit"),n(-24,-18),n(-18,-12),n(-12,-6),n(-6),[e,r,i]}a(pXe,"int64fromString");wn.int64fromString=pXe;function gXe(t,e){if(e>>>0<=2097151)return""+(uN*e+(t>>>0));let A=t&16777215,r=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,n=A+r*6777216+i*6710656,s=r+i*8147497,o=i*2,c=1e7;n>=c&&(s+=Math.floor(n/c),n%=c),s>=c&&(o+=Math.floor(s/c),s%=c);function l(d,u){let p=d?String(d):"";return u?"0000000".slice(p.length)+p:p}return a(l,"decimalFrom1e7"),l(o,0)+l(s,o)+l(n,1)}a(gXe,"int64toString");wn.int64toString=gXe;function hXe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let A=0;A<9;A++)e.push(t&127|128),t=t>>7;e.push(1)}}a(hXe,"varint32write");wn.varint32write=hXe;function EXe(){let t=this.buf[this.pos++],e=t&127;if(!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,!(t&128))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let A=5;t&128&&A<10;A++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}a(EXe,"varint32read");wn.varint32read=EXe});var md=E(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.PbLong=Ed.PbULong=Ed.detectBi=void 0;var KQ=pN(),Jt;function pde(){let t=new DataView(new ArrayBuffer(8));Jt=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMA
Line truncated
|
||||
`)}};PN.RpcError=rU});var nU=E(HN=>{"use strict";Object.defineProperty(HN,"__esModule",{value:!0});HN.mergeRpcOptions=void 0;var Jde=tr();function _Ze(t,e){if(!e)return t;let A={};qN(t,A),qN(e,A);for(let r of Object.keys(e)){let i=e[r];switch(r){case"jsonOptions":A.jsonOptions=Jde.mergeJsonOptions(t.jsonOptions,A.jsonOptions);break;case"binaryOptions":A.binaryOptions=Jde.mergeBinaryOptions(t.binaryOptions,A.binaryOptions);break;case"meta":A.meta={},qN(t.meta,A.meta),qN(e.meta,A.meta);break;case"interceptors":A.interceptors=t.interceptors?t.interceptors.concat(i):i.concat();break}}return A}a(_Ze,"mergeRpcOptions");HN.mergeRpcOptions=_Ze;function qN(t,e){if(!t)return;let A=e;for(let[r,i]of Object.entries(t))i instanceof Date?A[r]=new Date(i.getTime()):Array.isArray(i)?A[r]=i.concat():A[r]=i}a(qN,"copy")});var aU=E(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.Deferred=ip.DeferredState=void 0;var To;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(To=ip.DeferredState||(ip.DeferredState={}));var sU=class{static{a(this,"Deferred")}constructor(e=!0){this._state=To.PENDING,this._promise=new Promise((A,r)=>{this._resolve=A,this._reject=r}),e&&this._promise.catch(A=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==To.PENDING)throw new Error(`cannot resolve ${To[this.state].toLowerCase()}`);this._resolve(e),this._state=To.RESOLVED}reject(e){if(this.state!==To.PENDING)throw new Error(`cannot reject ${To[this.state].toLowerCase()}`);this._reject(e),this._state=To.REJECTED}resolvePending(e){this._state===To.PENDING&&this.resolve(e)}rejectPending(e){this._state===To.PENDING&&this.reject(e)}};ip.Deferred=sU});var cU=E(YN=>{"use strict";Object.defineProperty(YN,"__esModule",{value:!0});YN.RpcOutputStreamController=void 0;var Vde=aU(),np=tr(),oU=class{static{a(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,A){return A.push(e),()=>{let r=A.indexOf(e);r>=0&&A.splice(r,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,A,r){np.assert((e?1:0)+(A?1:0)+(r?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),A&&this.notifyError(A),r&&this.notifyComplete()}notifyMessage(e){np.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(A=>A(e)),this._lis.nxt.forEach(A=>A(e,void 0,!1))}notifyError(e){np.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(A=>A(e)),this._lis.nxt.forEach(A=>A(void 0,e,!1)),this.clearLis()}notifyComplete(){np.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;np.assert(e,"bad state"),np.assert(!e.p,"iterator contract broken");let A=e.q.shift();return A?"value"in A?Promise.resolve(A):Promise.reject(A):(e.p=new Vde.Deferred,e.p.promise)}}}pushIt(e){let A=this._itState;if(A.p){let r=A.p;np.assert(r.state==Vde.DeferredState.PENDING,"iterator contract broken"),"value"in e?r.resolve(e):r.reject(e),delete A.p}else A.q.push(e)}};YN.RpcOutputStreamController=oU});var dU=E(ME=>{"use strict";var OZe=ME&&ME.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(ME,"__esModule",{value:!0});ME.UnaryCall=void 0;var lU=class{static{a(this,"UnaryCall")}constructor(e,A,r,i,n,s,o){this.method=e,this.requestHeaders=A,this.request=r,this.headers=i,this.response=n,this.status=s,this.trailers=o}then(e,A){return this.promiseFinished().then(r=>e?Promise.resolve(e(r)):r,r=>A?Promise.resolve(A(r)):Promise.reject(r))}promiseFinished(){return OZe(this,void 0,void 0,function*(){let[e,A,r,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:A,status:r,trailers:i}})}};ME.UnaryCall=lU});var pU=E(_E=>{"use strict";var PZe=_E&&_E.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l
Line truncated
|
||||
`));let r=yield UU(A,"create");yield TU(r,t)})}a(LKe,"createTar");yi.createTar=LKe});var gue=E(cr=>{"use strict";var UKe=cr&&cr.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),TKe=cr&&cr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),uB=cr&&cr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&UKe(e,t,A);return TKe(e,t),e},$E=cr&&cr.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(cr,"__esModule",{value:!0});cr.saveCache=cr.restoreCache=cr.isFeatureAvailable=cr.ReserveCacheError=cr.ValidationError=void 0;var Me=uB(hi()),ZN=uB(require("path")),QA=uB(Dh()),KE=uB(dde()),uue=uB(oue()),KN=nN(),Qd=due(),MKe=Nh(),ia=class t extends Error{static{a(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};cr.ValidationError=ia;var sp=class t extends Error{static{a(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};cr.ReserveCacheError=sp;function pue(t){if(!t||t.length===0)throw new ia("Path Validation Error: At least one directory or file path is required")}a(pue,"checkPaths");function MU(t){if(t.length>512)throw new ia(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new ia(`Key Validation Error: ${t} cannot contain commas.`)}a(MU,"checkKey");function _Ke(){return!!process.env.ACTIONS_CACHE_URL}a(_Ke,"isFeatureAvailable");cr.isFeatureAvailable=_Ke;function OKe(t,e,A,r,i=!1){return $E(this,void 0,void 0,function*(){let n=(0,KN.getCacheServiceVersion)();switch(Me.debug(`Cache service version: ${n}`),pue(t),n){case"v2":return yield qKe(t,e,A,r,i);case"v1":default:return yield PKe(t,e,A,r,i)}})}a(OKe,"restoreCache");cr.restoreCache=OKe;function PKe(t,e,A,r,i=!1){return $E(this,void 0,void 0,function*(){A=A||[];let n=[e,...A];if(Me.debug("Resolved Keys:"),Me.debug(JSON.stringify(n)),n.length>10)throw new ia("Key Validation Error: Keys are limited to a maximum of 10.");for(let c of n)MU(c);let s=yield QA.getCompressionMethod(),o="";try{let c=yield KE.getCacheEntry(n,t,{compressionMethod:s,enableCrossOsArchive:i});if(!c?.archiveLocation)return;if(r?.lookupOnly)return Me.info("Lookup only - skipping download"),c.cacheKey;o=ZN.join(yield QA.createTempDirectory(),QA.getCacheFileName(s)),Me.debug(`Archive Path: ${o}`),yield KE.downloadCache(c.archiveLocation,o,r),Me.isDebug()&&(yield(0,Qd.listTar)(o,s));let l=QA.getArchiveFileSizeInBytes(o);return Me.info(`Cache Size: ~${Math.round(l/(1024*1024))} MB (${l} B)`),yield(0,Qd.extractTar)(o,s),Me.info("Cache restored successfully"),c.cacheKey}catch(c){if(c.name===ia.name)throw c;Me.warning(`Failed to restore: ${c.message}`)}finally{try{yield QA.unlinkFile(o)}catch(c){Me.debug(`Failed to delete archive: ${c}`)}}})}a(PKe,"restoreCacheV1");function qKe(t,e,A,r,i=!1){return $E(this,void 0,void 0,function*(){r=Object.assign(Object.assign({},r),{useAzureSdk:!0}),A=A||[];let n=[e,...A];if(Me.debug("Resolved Keys:"),Me.debug(JSON.stringify(n)),n.length>10)throw new ia("Key Validation Error: Keys are limited to a maximum of 10.");for(let o of n)MU(o);let s="";try{let o=uue.internalCacheTwirpClient(),c=yield QA.getCompressionMethod(),l={key:e,restoreKeys:A,version:QA.getCacheVersion(t,c,i)},d=yield o.GetCacheEntryDownloadURL(l);if(!d.ok){Me.debug(`Cache not found for version ${l.version} of keys: ${n.join(", ")}`);return}if(Me.info(`Cache hit for: ${l.key}`),r?.lookupOnly)return Me.info("Lookup only - skipping download"),d.matchedKey;s=ZN.join(yield QA.createTempDirectory(),QA.getCacheFileName(c)),Me.debug(`Archive path: ${s}`),Me.debug(`Starting download of archive to: ${s}`),yield KE.downloadCache(d.signedDownloadUrl,s,r);let u=QA.getArchiveFileSizeInBytes(s);return Me.info(`Cache Size: ~${Math.round(u/(1024*1024))} MB (${u} B)`),Me.isDebug()&&(yield(0,Qd.listTar)(s,c)),yield(0,Qd.extractTar)(s,c),Me.info("Cache restored successfully"),d.matchedKey}catch(o){if(o.name===ia.name)throw o;Me.warning(`Failed to restore: ${o.message}`)}finally{try{s&&(yield QA.unlinkFile(s))}catch(o){Me.debug(`Failed to delete archive: ${o}`)}}})}a(qKe,"restoreCacheV2");function HKe(t,e,A,r=!1){return $E(this,void 0,void 0,function*(){let i=(0,KN.getCacheServiceVersion)(
Line truncated
|
||||
`);let o=e.computeHMACSHA256(s);return new vo(A,o,r.toString(),i,n,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope)}a(tde,"generateAccountSASQueryParameters");var XF=class t extends OQ{static{a(this,"BlobServiceClient")}constructor(e,A,r){let i;pd(A)?i=A:O.isNode&&A instanceof PA||A instanceof _t||O.isTokenCredential(A)?i=Gt(A,r):i=Gt(new _t,r),super(e,i),this.serviceContext=new Pb(this.storageClientContext)}static fromConnectionString(e,A){A=A||{};let r=wE(e);if(r.kind==="AccountConnString")if(O.isNode){let i=new PA(r.accountName,r.accountKey);A.proxyOptions||(A.proxyOptions=O.getDefaultProxySettings(r.proxyUri));let n=Gt(i,A);return new t(r.url,n)}else throw new Error("Account connection string is only supported in Node.js environment");else if(r.kind==="SASConnString"){let i=Gt(new _t,A);return new t(r.url+"?"+r.accountSas,i)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}getContainerClient(e){return new jb(NA(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,A={}){let{span:r,updatedOptions:i}=J("BlobServiceClient-createContainer",A);try{let n=this.getContainerClient(e),s=await n.create(i);return{containerClient:n,containerCreateResponse:s}}catch(n){throw r.setStatus({code:P.SpanStatusCode.ERROR,message:n.message}),n}finally{r.end()}}async deleteContainer(e,A={}){let{span:r,updatedOptions:i}=J("BlobServiceClient-deleteContainer",A);try{return await this.getContainerClient(e).delete(i)}catch(n){throw r.setStatus({code:P.SpanStatusCode.ERROR,message:n.message}),n}finally{r.end()}}async undeleteContainer(e,A,r={}){let{span:i,updatedOptions:n}=J("BlobServiceClient-undeleteContainer",r);try{let s=this.getContainerClient(r.destinationContainerName||e),c=await new Xu(s.storageClientContext).restore(Object.assign({deletedContainerName:e,deletedContainerVersion:A},n));return{containerClient:s,containerUndeleteResponse:c}}catch(s){throw i.setStatus({code:P.SpanStatusCode.ERROR,message:s.message}),s}finally{i.end()}}async renameContainer(e,A,r={}){var i;let{span:n,updatedOptions:s}=J("BlobServiceClient-renameContainer",r);try{let o=this.getContainerClient(A),l=await new Xu(o.storageClientContext).rename(e,Object.assign(Object.assign({},s),{sourceLeaseId:(i=r.sourceCondition)===null||i===void 0?void 0:i.leaseId}));return{containerClient:o,containerRenameResponse:l}}catch(o){throw n.setStatus({code:P.SpanStatusCode.ERROR,message:o.message}),o}finally{n.end()}}async getProperties(e={}){let{span:A,updatedOptions:r}=J("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},ne(r)))}catch(i){throw A.setStatus({code:P.SpanStatusCode.ERROR,message:i.message}),i}finally{A.end()}}async setProperties(e,A={}){let{span:r,updatedOptions:i}=J("BlobServiceClient-setProperties",A);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:A.abortSignal},ne(i)))}catch(n){throw r.setStatus({code:P.SpanStatusCode.ERROR,message:n.message}),n}finally{r.end()}}async getStatistics(e={}){let{span:A,updatedOptions:r}=J("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},ne(r)))}catch(i){throw A.setStatus({code:P.SpanStatusCode.ERROR,message:i.message}),i}finally{A.end()}}async getAccountInfo(e={}){let{span:A,updatedOptions:r}=J("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},ne(r)))}catch(i){throw A.setStatus({code:P.SpanStatusCode.ERROR,message:i.message}),i}finally{A.end()}}async listContainersSegment(e,A={}){let{span:r,updatedOptions:i}=J("BlobServiceClient-listContainersSegment",A);try{return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({abortSignal:A.abortSignal,marker:e},A),{include:typeof A.include=="string"?[A.include]:A.include}),ne(i)))}catch(n){throw r.setStatus({code:P.SpanStatusCode.ERROR,message:n.message}),n}finally{r.end()}}async findBlobsByTagsSegment(e,A,r={}){let{span:i,updatedOptions:n}=J("BlobServiceClient-findBlobsByTagsSegment",r);try{let s=await this.serviceContext.filterBlobs(Object.assign({abortSignal:r.abortSignal,where:e,marker:A,maxPageSize:r.maxPageSize},ne(n)));return Object.assign(Object.assign({},s),{_response:s._response,blobs:s.blobs.map(c=>{var l;let d="";return((l=c.tags)===null||l===void 0?void 0:l.blobTagSet.length)===1&&(d=c.tags.blobTagSet[0].value),Object.assign(Object.assign({},c),{tags:xQ(c.tags),tagValue:d})})})}catch(s){throw i.setStatus({code:P.SpanStatusCode.ERROR,message:s.message}),s}finally{i.end()}}findBlobsByTagsSegments(e,A,r={}){return V.__asyncGenerator(this,arguments,a(function*(){let n;if(A||A===void 0)do n=yield V.__await(this.findBlobsByTagsSegment(e,A,r)),n.blobs=n.blobs||[],A=n.continuationToken,yield yield V.__awai
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(A),this.code=e,this.name="NetworkError"}};Bn.NetworkError=iN;iN.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var nN=class extends Error{static{a(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Bn.UsageError=nN;nN.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var Ade=E(In=>{"use strict";var mje=In&&In.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),Cje=In&&In.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),fje=In&&In.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&mje(e,t,A);return Cje(e,t),e},Qje=In&&In.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(In,"__esModule",{value:!0});In.uploadCacheArchiveSDK=In.UploadProgress=void 0;var NL=fje(hi()),Bje=QL(),Ije=bL(),sN=class{static{a(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,A=(100*(e/this.contentLength)).toFixed(1),r=Date.now()-this.startTime,i=(e/(1024*1024)/(r/1e3)).toFixed(1);NL.info(`Sent ${e} of ${this.contentLength} (${A}%), ${i} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let A=a(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(A,e))},"displayCallback");this.timeoutHandle=setTimeout(A,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};In.UploadProgress=sN;function yje(t,e,A){var r;return Qje(this,void 0,void 0,function*(){let i=new Bje.BlobClient(t),n=i.getBlockBlobClient(),s=new sN((r=A?.archiveSizeBytes)!==null&&r!==void 0?r:0),o={blockSize:A?.uploadChunkSize,concurrency:A?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:s.onProgress()};try{s.startDisplayTimer(),NL.debug(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let c=yield n.uploadFile(e,o);if(c._response.status>=400)throw new Ije.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw NL.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{s.stopDisplayTimer()}})}a(yje,"uploadCacheArchiveSDK");In.uploadCacheArchiveSDK=yje});var DL=E(qA=>{"use strict";var wje=qA&&qA.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),bje=qA&&qA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Nje=qA&&qA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&wje(e,t,A);return bje(e,t),e},oN=qA&&qA.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(qA,"__esModule",{value:!0});qA.retryHttpClientResponse=qA.retryTypedResponse=qA.retry=qA.isRetryableStatusCode=qA.isServerErrorStatusCode=qA.isSuccessStatusCode=void 0;var rde=Nje(hi()),aN=bg(),RE=Rh();function Rje(t){return t?t>=200&&t<300:!1}a(Rje,"isSuccessStatusCode");qA.isSuccessStatusCode=Rje;function ide(t){return t?t>=500:!0}a(ide,"isServerErrorStatusCode");qA.isServerErrorStatusCode=ide;function nde(t){return t?[aN.HttpCodes.BadGateway,aN.HttpCodes.ServiceUnavailable,aN.HttpCodes.GatewayTimeout].includes(t):!1}a(nde,"isRetryableStatusCode");qA.isRetryableStatusCode=nde;function Dje(t){return oN(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}a(Dje,"sleep");function RL(t,e,A,r=RE.DefaultRetryAttempts
Line truncated
|
||||
Other caches with similar key:`);for(let o of n?.artifactCaches||[])cs.debug(`Cache Key: ${o?.cacheKey}, Cache Version: ${o?.cacheVersion}, Cache Scope: ${o?.scope}, Cache Created: ${o?.creationTime}`)}}})}a(lXe,"printCachesListForDiagnostics");function dXe(t,e,A){return yn(this,void 0,void 0,function*(){let r=new rXe.URL(t),i=(0,FL.getDownloadOptions)(A);r.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield(0,dN.downloadCacheStorageSDK)(t,e,i):i.concurrentBlobDownloads?yield(0,dN.downloadCacheHttpClientConcurrent)(t,e,i):yield(0,dN.downloadCacheHttpClient)(t,e):yield(0,dN.downloadCacheHttpClient)(t,e)})}a(dXe,"downloadCache");Or.downloadCache=dXe;function uXe(t,e,A){return yn(this,void 0,void 0,function*(){let r=LL(),i=SE.getCacheVersion(e,A?.compressionMethod,A?.enableCrossOsArchive),n={key:t,version:i,cacheSize:A?.cacheSize};return yield(0,hd.retryTypedResponse)("reserveCache",()=>yn(this,void 0,void 0,function*(){return r.postJson($Q("caches"),n)}))})}a(uXe,"reserveCache");Or.reserveCache=uXe;function hde(t,e){return`bytes ${t}-${e}/*`}a(hde,"getContentRange");function pXe(t,e,A,r,i){return yn(this,void 0,void 0,function*(){cs.debug(`Uploading chunk of size ${i-r+1} bytes at offset ${r} with content range: ${hde(r,i)}`);let n={"Content-Type":"application/octet-stream","Content-Range":hde(r,i)},s=yield(0,hd.retryHttpClientResponse)(`uploadChunk (start: ${r}, end: ${i})`,()=>yn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,A(),n)}));if(!(0,hd.isSuccessStatusCode)(s.message.statusCode))throw new Error(`Cache service responded with ${s.message.statusCode} during upload chunk.`)})}a(pXe,"uploadChunk");function gXe(t,e,A,r){return yn(this,void 0,void 0,function*(){let i=SE.getArchiveFileSizeInBytes(A),n=$Q(`caches/${e.toString()}`),s=vL.openSync(A,"r"),o=(0,FL.getUploadOptions)(r),c=SE.assertDefined("uploadConcurrency",o.uploadConcurrency),l=SE.assertDefined("uploadChunkSize",o.uploadChunkSize),d=[...new Array(c).keys()];cs.debug("Awaiting all uploads");let u=0;try{yield Promise.all(d.map(()=>yn(this,void 0,void 0,function*(){for(;u<i;){let p=Math.min(i-u,l),g=u,h=u+p-1;u+=l,yield pXe(t,n,()=>vL.createReadStream(A,{fd:s,start:g,end:h,autoClose:!1}).on("error",m=>{throw new Error(`Cache upload failed because file read failed with ${m.message}`)}),g,h)}})))}finally{vL.closeSync(s)}})}a(gXe,"uploadFile");function hXe(t,e,A){return yn(this,void 0,void 0,function*(){let r={size:A};return yield(0,hd.retryTypedResponse)("commitCache",()=>yn(this,void 0,void 0,function*(){return t.postJson($Q(`caches/${e.toString()}`),r)}))})}a(hXe,"commitCache");function EXe(t,e,A,r){return yn(this,void 0,void 0,function*(){if((0,FL.getUploadOptions)(r).useAzureSdk){if(!A)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,iXe.uploadCacheArchiveSDK)(A,e,r)}else{let n=LL();cs.debug("Upload cache"),yield gXe(n,t,e,r),cs.debug("Commiting cache");let s=SE.getArchiveFileSizeInBytes(e);cs.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);let o=yield hXe(n,t,s);if(!(0,hd.isSuccessStatusCode)(o.statusCode))throw new Error(`Cache service responded with ${o.statusCode} during commit cache.`);cs.info("Cache saved successfully")}})}a(EXe,"saveCache");Or.saveCache=EXe});var uN=E(xE=>{"use strict";Object.defineProperty(xE,"__esModule",{value:!0});xE.isJsonObject=xE.typeofJsonValue=void 0;function mXe(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}a(mXe,"typeofJsonValue");xE.typeofJsonValue=mXe;function CXe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}a(CXe,"isJsonObject");xE.isJsonObject=CXe});var gN=E(vE=>{"use strict";Object.defineProperty(vE,"__esModule",{value:!0});vE.base64encode=vE.base64decode=void 0;var Gc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),pN=[];for(let t=0;t<Gc.length;t++)pN[Gc[t].charCodeAt(0)]=t;pN[45]=Gc.indexOf("+");pN[95]=Gc.indexOf("/");function fXe(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let A=new Uint8Array(e),r=0,i=0,n,s=0;for(let o=0;o<t.length;o++){if(n=pN[t.charCodeAt(o)],n===void 0)switch(t[o]){case"=":i=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:s=n,i=1;break;case 1:A[r++]=s<<2|(n&48)>>4,s=n,i=2;break;case 2:A[r++]=(s&15)<<4|(n&60)>>2,s=n,i=3;break;case 3:A[r++]=(s&3)<<6|n,i=0;break}}if(i==1)throw Error("invalid base64 string.");return A.subarray(0,r)}a(fXe,"base64decode");vE.base64decode=fXe;function QXe(t){let e="",A=0,r,i=0;for(let n=0;n<t.length;n++)switch(r=t[n],A){case 0:e+=Gc[r>>2],i=(r&3)<<4,A=1;break;case 1:e+=Gc[i|r>>4],i=(r&15)<<2,A=2;break;case 2:e+=Gc[i|r>>6],e+=Gc[r&63],A=0;break}return A&&(e+=Gc[i],e+="=",A==1&&(e+="=")),e}a(QXe,"base64encode");vE.base64encode=QXe});var mde=E(hN=>{"use strict";Object.defineProperty(hN,"__esModule",{value:!0});hN.utf8read=void 0;var UL=a(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function BXe(t){if(t.length<1)return"";let e=0,A=[],r=[],i=0,n,s=t.length;for(;e<s;)n=t[e++],n<128?r[i++]=n:n>191&&n<224?r[i++]=(n&31)<<6|t[e++]&63:n>239&&n<365?(n=((n&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,r[i++]=55296+(n>>10),r[i++]=56320+(n&1023)):r[i++]=(n&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(A.push(UL(r)),i=0);return A.length?(i&&A.push(UL(r.slice(0,i))),A.join("")):UL(r.slice(0,i))}a(BXe,"utf8read");hN.utf8read=BXe});var eB=E(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.WireType=Fo.mergeBinaryOptions=Fo.UnknownFieldHandler=void 0;var IXe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(A,r,i,n,s)=>{(e(r)?r[t.symbol]:r[t.symbol]=[]).push({no:i,wireType:n,data:s})},t.onWrite=(A,r,i)=>{for(let{no:n,wireType:s,data:o}of t.list(r))i.tag(n,s).raw(o)},t.list=(A,r)=>{if(e(A)){let i=A[t.symbol];return r?i.filter(n=>n.no==r):i}return[]},t.last=(A,r)=>t.list(A,r).slice(-1)[0];let e=a(A=>A&&Array.isArray(A[t.symbol]),"is")})(IXe=Fo.UnknownFieldHandler||(Fo.UnknownFieldHandler={}));function yXe(t,e){return Object.assign(Object.assign({},t),e)}a(yXe,"mergeBinaryOptions");Fo.mergeBinaryOptions=yXe;var wXe;(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"})(wXe=Fo.WireType||(Fo.WireType={}))});var mN=E(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.varint32read=wn.varint32write=wn.int64toString=wn.int64fromString=wn.varint64write=wn.varint64read=void 0;function bXe(){let t=0,e=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<r,!(i&128))return this.assertBounds(),[t,e]}let A=this.buf[this.pos++];if(t|=(A&15)<<28,e=(A&112)>>4,!(A&128))return this.assertBounds(),[t,e];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<r,!(i&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}a(bXe,"varint64read");wn.varint64read=bXe;function NXe(t,e,A){for(let n=0;n<28;n=n+7){let s=t>>>n,o=!(!(s>>>7)&&e==0),c=(o?s|128:s)&255;if(A.push(c),!o)return}let r=t>>>28&15|(e&7)<<4,i=!!(e>>3);if(A.push((i?r|128:r)&255),!!i){for(let n=3;n<31;n=n+7){let s=e>>>n,o=!!(s>>>7),c=(o?s|128:s)&255;if(A.push(c),!o)return}A.push(e>>>31&1)}}a(NXe,"varint64write");wn.varint64write=NXe;var EN=65536*65536;function RXe(t){let e=t[0]=="-";e&&(t=t.slice(1));let A=1e6,r=0,i=0;function n(s,o){let c=Number(t.slice(s,o));i*=A,r=r*A+c,r>=EN&&(i=i+(r/EN|0),r=r%EN)}return a(n,"add1e6digit"),n(-24,-18),n(-18,-12),n(-12,-6),n(-6),[e,r,i]}a(RXe,"int64fromString");wn.int64fromString=RXe;function DXe(t,e){if(e>>>0<=2097151)return""+(EN*e+(t>>>0));let A=t&16777215,r=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,n=A+r*6777216+i*6710656,s=r+i*8147497,o=i*2,c=1e7;n>=c&&(s+=Math.floor(n/c),n%=c),s>=c&&(o+=Math.floor(s/c),s%=c);function l(d,u){let p=d?String(d):"";return u?"0000000".slice(p.length)+p:p}return a(l,"decimalFrom1e7"),l(o,0)+l(s,o)+l(n,1)}a(DXe,"int64toString");wn.int64toString=DXe;function SXe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let A=0;A<9;A++)e.push(t&127|128),t=t>>7;e.push(1)}}a(SXe,"varint32write");wn.varint32write=SXe;function xXe(){let t=this.buf[this.pos++],e=t&127;if(!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,!(t&128))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let A=5;t&128&&A<10;A++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}a(xXe,"varint32read");wn.varint32read=xXe});var md=E(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.PbLong=Ed.PbULong=Ed.detectBi=void 0;var tB=mN(),Jt;function Cde(){let t=new DataView(new ArrayBuffer(8));Jt=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMA
Line truncated
|
||||
`)}};GN.RpcError=oU});var lU=E(VN=>{"use strict";Object.defineProperty(VN,"__esModule",{value:!0});VN.mergeRpcOptions=void 0;var Xde=tr();function KZe(t,e){if(!e)return t;let A={};JN(t,A),JN(e,A);for(let r of Object.keys(e)){let i=e[r];switch(r){case"jsonOptions":A.jsonOptions=Xde.mergeJsonOptions(t.jsonOptions,A.jsonOptions);break;case"binaryOptions":A.binaryOptions=Xde.mergeBinaryOptions(t.binaryOptions,A.binaryOptions);break;case"meta":A.meta={},JN(t.meta,A.meta),JN(e.meta,A.meta);break;case"interceptors":A.interceptors=t.interceptors?t.interceptors.concat(i):i.concat();break}}return A}a(KZe,"mergeRpcOptions");VN.mergeRpcOptions=KZe;function JN(t,e){if(!t)return;let A=e;for(let[r,i]of Object.entries(t))i instanceof Date?A[r]=new Date(i.getTime()):Array.isArray(i)?A[r]=i.concat():A[r]=i}a(JN,"copy")});var uU=E(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});np.Deferred=np.DeferredState=void 0;var To;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(To=np.DeferredState||(np.DeferredState={}));var dU=class{static{a(this,"Deferred")}constructor(e=!0){this._state=To.PENDING,this._promise=new Promise((A,r)=>{this._resolve=A,this._reject=r}),e&&this._promise.catch(A=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==To.PENDING)throw new Error(`cannot resolve ${To[this.state].toLowerCase()}`);this._resolve(e),this._state=To.RESOLVED}reject(e){if(this.state!==To.PENDING)throw new Error(`cannot reject ${To[this.state].toLowerCase()}`);this._reject(e),this._state=To.REJECTED}resolvePending(e){this._state===To.PENDING&&this.resolve(e)}rejectPending(e){this._state===To.PENDING&&this.reject(e)}};np.Deferred=dU});var gU=E(WN=>{"use strict";Object.defineProperty(WN,"__esModule",{value:!0});WN.RpcOutputStreamController=void 0;var Zde=uU(),sp=tr(),pU=class{static{a(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,A){return A.push(e),()=>{let r=A.indexOf(e);r>=0&&A.splice(r,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,A,r){sp.assert((e?1:0)+(A?1:0)+(r?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),A&&this.notifyError(A),r&&this.notifyComplete()}notifyMessage(e){sp.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(A=>A(e)),this._lis.nxt.forEach(A=>A(e,void 0,!1))}notifyError(e){sp.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(A=>A(e)),this._lis.nxt.forEach(A=>A(void 0,e,!1)),this.clearLis()}notifyComplete(){sp.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;sp.assert(e,"bad state"),sp.assert(!e.p,"iterator contract broken");let A=e.q.shift();return A?"value"in A?Promise.resolve(A):Promise.reject(A):(e.p=new Zde.Deferred,e.p.promise)}}}pushIt(e){let A=this._itState;if(A.p){let r=A.p;sp.assert(r.state==Zde.DeferredState.PENDING,"iterator contract broken"),"value"in e?r.resolve(e):r.reject(e),delete A.p}else A.q.push(e)}};WN.RpcOutputStreamController=pU});var EU=E(_E=>{"use strict";var $Ze=_E&&_E.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(_E,"__esModule",{value:!0});_E.UnaryCall=void 0;var hU=class{static{a(this,"UnaryCall")}constructor(e,A,r,i,n,s,o){this.method=e,this.requestHeaders=A,this.request=r,this.headers=i,this.response=n,this.status=s,this.trailers=o}then(e,A){return this.promiseFinished().then(r=>e?Promise.resolve(e(r)):r,r=>A?Promise.resolve(A(r)):Promise.reject(r))}promiseFinished(){return $Ze(this,void 0,void 0,function*(){let[e,A,r,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:A,status:r,trailers:i}})}};_E.UnaryCall=hU});var CU=E(OE=>{"use strict";var eKe=OE&&OE.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l
Line truncated
|
||||
`));let r=yield PU(A,"create");yield qU(r,t)})}a(zKe,"createTar");yi.createTar=zKe});var fue=E(cr=>{"use strict";var jKe=cr&&cr.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),XKe=cr&&cr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hB=cr&&cr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&jKe(e,t,A);return XKe(e,t),e},em=cr&&cr.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(cr,"__esModule",{value:!0});cr.saveCache=cr.restoreCache=cr.isFeatureAvailable=cr.ReserveCacheError=cr.ValidationError=void 0;var Me=hB(hi()),tR=hB(require("path")),QA=hB(Sh()),$E=hB(Ede()),mue=hB(pue()),AR=cN(),Qd=Eue(),ZKe=Rh(),ia=class t extends Error{static{a(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};cr.ValidationError=ia;var ap=class t extends Error{static{a(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};cr.ReserveCacheError=ap;function Cue(t){if(!t||t.length===0)throw new ia("Path Validation Error: At least one directory or file path is required")}a(Cue,"checkPaths");function HU(t){if(t.length>512)throw new ia(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new ia(`Key Validation Error: ${t} cannot contain commas.`)}a(HU,"checkKey");function KKe(){return!!process.env.ACTIONS_CACHE_URL}a(KKe,"isFeatureAvailable");cr.isFeatureAvailable=KKe;function $Ke(t,e,A,r,i=!1){return em(this,void 0,void 0,function*(){let n=(0,AR.getCacheServiceVersion)();switch(Me.debug(`Cache service version: ${n}`),Cue(t),n){case"v2":return yield t$e(t,e,A,r,i);case"v1":default:return yield e$e(t,e,A,r,i)}})}a($Ke,"restoreCache");cr.restoreCache=$Ke;function e$e(t,e,A,r,i=!1){return em(this,void 0,void 0,function*(){A=A||[];let n=[e,...A];if(Me.debug("Resolved Keys:"),Me.debug(JSON.stringify(n)),n.length>10)throw new ia("Key Validation Error: Keys are limited to a maximum of 10.");for(let c of n)HU(c);let s=yield QA.getCompressionMethod(),o="";try{let c=yield $E.getCacheEntry(n,t,{compressionMethod:s,enableCrossOsArchive:i});if(!c?.archiveLocation)return;if(r?.lookupOnly)return Me.info("Lookup only - skipping download"),c.cacheKey;o=tR.join(yield QA.createTempDirectory(),QA.getCacheFileName(s)),Me.debug(`Archive Path: ${o}`),yield $E.downloadCache(c.archiveLocation,o,r),Me.isDebug()&&(yield(0,Qd.listTar)(o,s));let l=QA.getArchiveFileSizeInBytes(o);return Me.info(`Cache Size: ~${Math.round(l/(1024*1024))} MB (${l} B)`),yield(0,Qd.extractTar)(o,s),Me.info("Cache restored successfully"),c.cacheKey}catch(c){if(c.name===ia.name)throw c;Me.warning(`Failed to restore: ${c.message}`)}finally{try{yield QA.unlinkFile(o)}catch(c){Me.debug(`Failed to delete archive: ${c}`)}}})}a(e$e,"restoreCacheV1");function t$e(t,e,A,r,i=!1){return em(this,void 0,void 0,function*(){r=Object.assign(Object.assign({},r),{useAzureSdk:!0}),A=A||[];let n=[e,...A];if(Me.debug("Resolved Keys:"),Me.debug(JSON.stringify(n)),n.length>10)throw new ia("Key Validation Error: Keys are limited to a maximum of 10.");for(let o of n)HU(o);let s="";try{let o=mue.internalCacheTwirpClient(),c=yield QA.getCompressionMethod(),l={key:e,restoreKeys:A,version:QA.getCacheVersion(t,c,i)},d=yield o.GetCacheEntryDownloadURL(l);if(!d.ok){Me.debug(`Cache not found for version ${l.version} of keys: ${n.join(", ")}`);return}if(Me.info(`Cache hit for: ${l.key}`),r?.lookupOnly)return Me.info("Lookup only - skipping download"),d.matchedKey;s=tR.join(yield QA.createTempDirectory(),QA.getCacheFileName(c)),Me.debug(`Archive path: ${s}`),Me.debug(`Starting download of archive to: ${s}`),yield $E.downloadCache(d.signedDownloadUrl,s,r);let u=QA.getArchiveFileSizeInBytes(s);return Me.info(`Cache Size: ~${Math.round(u/(1024*1024))} MB (${u} B)`),Me.isDebug()&&(yield(0,Qd.listTar)(s,c)),yield(0,Qd.extractTar)(s,c),Me.info("Cache restored successfully"),d.matchedKey}catch(o){if(o.name===ia.name)throw o;Me.warning(`Failed to restore: ${o.message}`)}finally{try{s&&(yield QA.unlinkFile(s))}catch(o){Me.debug(`Failed to delete archive: ${o}`)}}})}a(t$e,"restoreCacheV2");function A$e(t,e,A,r=!1){return em(this,void 0,void 0,function*(){let i=(0,AR.getCacheServiceVersion)(
Line truncated
|
||||
\r
|
||||
`),Aet=/\r\n/g,ret=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function rm(t){mpe.call(this),t=t||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=Epe(t,"maxHeaderPairs",2e3),this.maxHeaderSize=Epe(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new eet(tet),this.ss.on("info",function(A,r,i,n){r&&!e.maxed&&(e.nread+n-i>=e.maxHeaderSize?(n=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=n-i,e.buffer+=r.toString("binary",i,n)),A&&e._finish()})}a(rm,"HeaderParser");$$e(rm,mpe);rm.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};rm.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};rm.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",t)};rm.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split(Aet),e=t.length,A,r;for(var i=0;i<e;++i){if(t[i].length===0)continue;if((t[i][0]===" "||t[i][0]===" ")&&r){this.header[r][this.header[r].length-1]+=t[i];continue}let n=t[i].indexOf(":");if(n===-1||n===0)return;if(A=ret.exec(t[i]),r=A[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(A[2]||""),++this.npairs===this.maxHeaderPairs)break}};Cpe.exports=rm});var ET=E((pRt,Bpe)=>{"use strict";var hT=require("node:stream").Writable,iet=require("node:util").inherits,net=pT(),Qpe=gpe(),set=fpe(),aet=45,oet=Buffer.from("-"),cet=Buffer.from(`\r
|
||||
`),det=a(function(){},"EMPTY_FN");function qa(t){if(!(this instanceof qa))return new qa(t);if(hT.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new set(t),this._hparser.on("header",function(A){e._inHeader=!1,e._part.emit("header",A)})}a(qa,"Dicer");iet(qa,hT);qa.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let A=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(A+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else hT.prototype.emit.apply(this,arguments)};qa.prototype._write=function(t,e,A){if(!this._hparser&&!this._bparser)return A();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new Qpe(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(t);if(!this._inHeader&&r!==void 0&&r<t.length)t=t.slice(r);else return A()}this._firstWrite&&(this._bparser.push(cet),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=A:A()};qa.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};qa.prototype.setBoundary=function(t){let e=this;this._bparser=new net(`\r
|
||||
--`+t),this._bparser.on("info",function(A,r,i,n){e._oninfo(A,r,i,n)})};qa.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",det),this._part.resume())};qa.prototype._oninfo=function(t,e,A,r){let i,n=this,s=0,o,c=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&A+s<r;)if(e[A+s]===aet)++s,++this._dashes;else{this._dashes&&(i=oet),this._dashes=0;break}if(this._dashes===2&&(A+s<r&&this._events.trailer&&this.emit("trailer",e.slice(A+s,r)),this.reset(),this._finished=!0,n._parts===0&&(n._realFinish=!0,n.emit("finish"),n._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new Qpe(this._partOpts),this._part._read=function(l){n._unpause()},this._isPreamble&&this._events.preamble?this.emit("preamble",this._part):this._isPreamble!==!0&&this._events.part?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&A<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(c=this._part.push(i)),c=this._part.push(e.slice(A,r)),c||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),o=this._hparser.push(e.slice(A,r)),!this._inHeader&&o!==void 0&&o<r&&this._oninfo(!1,e,A+o,r))),t&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:A!==r&&(++this._parts,this._part.on("end",function(){--n._parts===0&&(n._finished?(n._realFinish=!0,n.emit("finish"),n._realFinish=!1):n._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};qa.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let t=this._cb;this._cb=void 0,t()}};Bpe.exports=qa});var cR=E((hRt,ype)=>{"use strict";var Ipe=new TextDecoder("utf-8"),oR=new Map([["utf-8",Ipe],["utf8",Ipe]]);function uet(t,e,A){if(t)if(oR.has(A))try{return oR.get(A).decode(Buffer.from(t,e))}catch{}else try{return oR.set(A,new TextDecoder(A)),oR.get(A).decode(Buffer.from(t,e))}catch{}return t}a(uet,"decodeText");ype.exports=uet});var mT=E((mRt,Npe)=>{"use strict";var lR=cR(),wpe=/%([a-fA-F0-9]{2})/g;function bpe(t,e){return String.fromCharCode(parseInt(e,16))}a(bpe,"encodedReplacer");function pet(t){let e=[],A="key",r="",i=!1,n=!1,s=0,o="";for(var c=0,l=t.length;c<l;++c){let d=t[c];if(d==="\\"&&i)if(n)n=!1;else{n=!0;continue}else if(d==='"')if(n)n=!1;else{i?(i=!1,A="key"):i=!0;continue}else if(n&&i&&(o+="\\"),n=!1,(A==="charset"||A==="lang")&&d==="'"){A==="charset"?(A="lang",r=o.substring(1)):A="value",o="";continue}else if(A==="key"&&(d==="*"||d==="=")&&e.length){d==="*"?A="charset":A="value",e[s]=[o,void 0],o="";continue}else if(!i&&d===";"){A="key",r?(o.length&&(o=lR(o.replace(wpe,bpe),"binary",r)),r=""):o.length&&(o=lR(o,"binary","utf8")),e[s]===void 0?e[s]=o:e[s][1]=o,o="",++s;continue}else if(!i&&(d===" "||d===" "))continue;o+=d}return r&&o.length?o=lR(o.replace(wpe,bpe),"binary",r):o&&(o=lR(o,"binary","utf8")),e[s]===void 0?o&&(e[s]=o):e[s][1]=o,e}a(pet,"parseParams");Npe.exports=pet});var Dpe=E((fRt,Rpe)=>{"use strict";Rpe.exports=a(function(e){if(typeof e!="string")return"";for(var A=e.length-1;A>=0;--A)switch(e.charCodeAt(A)){case 47:case 92:return e=e.slice(A+1),e===".."||e==="."?"":e}return e===".."||e==="."?"":e},"basename")});var kpe=E((BRt,vpe)=>{"use strict";var{Readable:xpe}=require("node:stream"),{inherits:get}=require("node:util"),het=ET(),Spe=mT(),Eet=cR(),met=Dpe(),op=aR(),Cet=/^boundary$/i,fet=/^form-data$/i,Qet=/^charset$/i,Bet=/^filename$/i,Iet=/^name$/i;dR.detect=/^multipart\/form-data/i;function dR(t,e){let A,r,i=this,n,s=e.limits,o=e.isPartAFile||((v,x,L)=>x==="application/octet-stream"||L!==void 0),c=e.parsedConType||[],l=e.defCharset||"utf8",d=e.preservePath,u={highWaterMark:e.fileHwm};for(A=0,r=c.length;A<r;++A)if(Array.isArray(c[A])&&Cet.test(c[A][0])){n=c[A][1];break}function p(){N===0&&k&&!t._done&&(k=!1,i.end())}if(a(p,"checkFinished"),typeof n!="string")throw new Error("Multipart: Boundary not found");let g=op(s,"fieldSize",1*1024*1024),h=op(s,"fileSize",1/0),m=op(s,"files",1/0),f=op(s,"fields",1/0),B=op(s,"parts",1/0),b=op(s,"headerPairs",2e3),I=op(s,"headerSize",80*1024),C=0,Q=0,N=0,S,w,k=!1;this._needDrain=!1,this._pause=!1,this._cb=void 0,this._nparts=0,this._boy=t;let D={boundary:n,maxHeaderPairs:b,maxHeaderSize:I,partHwm:u.highWaterMark,highWaterMark:e.highWaterMark};this.parser=new het(D),this.parser.on("drain",function(){if(i._needDrain=!1,i._cb&&!i._pause){let v=i._cb;i._cb=void 0,v()}}).on("part",a(function v(x){if(++i._nparts>B)return i.parser.removeListener("part",v),i.parser.on("part",im),t.hitPartsLimit=!0,t.emit("partsLimit"),im(x);if(w){let L=w;L.emit("end"),L.removeAllListeners("end")}x.on("header",function(L){let q,le,_,rt,Se,vt,ht=0;if(L["content-type"]&&(_=Spe(L["content-type"][0]),_[0])){for(q=_[0].toLowerCase(),A=0,r=_.length;A<r;++A)if(Qet.test(_[A][0])){rt=_[A][1].toLowerCase();break}}if(q===void 0&&(q="text/plain"),rt===void 0&&(rt=l),L["content-disposition"]){if(_=Spe(L["content-dispo
Line truncated
|
||||
`))}a(Gpe,"isValidHeaderValue");function utt(t,e){let{headersList:A}=e,r=(A.get("referrer-policy")??"").split(","),i="";if(r.length>0)for(let n=r.length;n!==0;n--){let s=r[n-1].trim();if($et.includes(s)){i=s;break}}i!==""&&(t.referrerPolicy=i)}a(utt,"setRequestReferrerPolicyOnRedirect");function ptt(){return"allowed"}a(ptt,"crossOriginResourcePolicyCheck");function gtt(){return"success"}a(gtt,"corsCheck");function htt(){return"success"}a(htt,"TAOCheck");function Ett(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e)}a(Ett,"appendFetchMetadata");function mtt(t){let e=t.origin;if(t.responseTainting==="cors"||t.mode==="websocket")e&&t.headersList.append("origin",e);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&bT(t.origin)&&!bT(BB(t))&&(e=null);break;case"same-origin":pR(t,BB(t))||(e=null);break;default:}e&&t.headersList.append("origin",e)}}a(mtt,"appendRequestOriginHeader");function Ctt(t){return ttt.now()}a(Ctt,"coarsenedSharedCurrentTime");function ftt(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}}a(ftt,"createOpaqueTimingInfo");function Qtt(){return{referrerPolicy:"strict-origin-when-cross-origin"}}a(Qtt,"makePolicyContainer");function Btt(t){return{referrerPolicy:t.referrerPolicy}}a(Btt,"clonePolicyContainer");function Itt(t){let e=t.referrerPolicy;om(e);let A=null;if(t.referrer==="client"){let o=ett();if(!o||o.origin==="null")return"no-referrer";A=new URL(o)}else t.referrer instanceof URL&&(A=t.referrer);let r=yT(A),i=yT(A,!0);r.toString().length>4096&&(r=i);let n=pR(t,r),s=fB(r)&&!fB(t.url);switch(e){case"origin":return i??yT(A,!0);case"unsafe-url":return r;case"same-origin":return n?i:"no-referrer";case"origin-when-cross-origin":return n?r:i;case"strict-origin-when-cross-origin":{let o=BB(t);return pR(r,o)?r:fB(r)&&!fB(o)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return s?"no-referrer":i}}a(Itt,"determineRequestsReferrer");function yT(t,e){return om(t instanceof URL),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}a(yT,"stripURLForReferrer");function fB(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(A){if(A==null||A==="null")return!1;let r=new URL(A);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}a(fB,"isURLPotentiallyTrustworthy");function ytt(t,e){if(QB===void 0)return!0;let A=btt(e);if(A==="no metadata"||A.length===0)return!0;let r=A.sort((s,o)=>o.algo.localeCompare(s.algo)),i=r[0].algo,n=r.filter(s=>s.algo===i);for(let s of n){let o=s.algo,c=s.hash;c.endsWith("==")&&(c=c.slice(0,-2));let l=QB.createHash(o).update(t).digest("base64");if(l.endsWith("==")&&(l=l.slice(0,-2)),l===c)return!0;let d=QB.createHash(o).update(t).digest("base64url");if(d.endsWith("==")&&(d=d.slice(0,-2)),d===c)return!0}return!1}a(ytt,"bytesMatch");var wtt=/((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function btt(t){let e=[],A=!0,r=QB.getHashes();for(let i of t.split(" ")){A=!1;let n=wtt.exec(i);if(n===null||n.groups===void 0)continue;let s=n.groups.algo;r.includes(s.toLowerCase())&&e.push(n.groups)}return A===!0?"no metadata":e}a(btt,"parseMetadata");function Ntt(t){}a(Ntt,"tryUpgradeRequestToAPotentiallyTrustworthyURL");function pR(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}a(pR,"sameOrigin");function Rtt(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}a(Rtt,"createDeferredPromise");function Dtt(t){return t.controller.state==="aborted"}a(Dtt,"isAborted");function Stt(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(Stt,"isCancelled");function xtt(t){return/^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(t)?t.toUpperCase():t}a(xtt,"normalizeMethod");function vtt(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return om(typeof e=="string"),e}a(vtt,"serializeJavascriptValueToJSONString");var ktt=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Ftt(t,e,A){let r={index:0,kind:A,target:t},i={next(){if(Object.getPrototypeOf(this)!==i)throw new TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let{index:n,kind:s,target:o}=r,c=o(),l=c.le
Line truncated
|
||||
`||t===" "||t===" "}a(Zpe,"isHTTPWhiteSpace");function NT(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&Zpe(t[r]);r++);if(A)for(;i>0&&Zpe(t[i]);i--);return t.slice(r,i+1)}a(NT,"removeHTTPWhitespace");function Kpe(t){return t==="\r"||t===`
|
||||
`||t===" "||t==="\f"||t===" "}a(Kpe,"isASCIIWhitespace");function $tt(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&Kpe(t[r]);r++);if(A)for(;i>0&&Kpe(t[i]);i--);return t.slice(r,i+1)}a($tt,"removeASCIIWhitespace");Age.exports={dataURLProcessor:jtt,URLSerializer:$pe,collectASequenceOfCodePoints:ER,collectASequenceOfCodePointsFast:cm,stringPercentDecode:ege,parseMIMEType:RT,collectAnHTTPQuotedString:tge,serializeAMimeType:Ktt}});var mR=E((ORt,age)=>{"use strict";var{Blob:nge,File:rge}=require("buffer"),{types:DT}=require("util"),{kState:ds}=zc(),{isBlobLike:sge}=aa(),{webidl:xt}=Yi(),{parseMIMEType:eAt,serializeAMimeType:tAt}=Ha(),{kEnumerableProperty:ige}=gt(),IB=class t extends nge{static{a(this,"File")}constructor(e,A,r={}){xt.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=xt.converters["sequence<BlobPart>"](e),A=xt.converters.USVString(A),r=xt.converters.FilePropertyBag(r);let i=A,n=r.type,s;e:{if(n){if(n=eAt(n),n==="failure"){n="";break e}n=tAt(n).toLowerCase()}s=r.lastModified}super(AAt(e,r),{type:n}),this[ds]={name:i,lastModified:s,type:n}}get name(){return xt.brandCheck(this,t),this[ds].name}get lastModified(){return xt.brandCheck(this,t),this[ds].lastModified}get type(){return xt.brandCheck(this,t),this[ds].type}},ST=class t{static{a(this,"FileLike")}constructor(e,A,r={}){let i=A,n=r.type,s=r.lastModified??Date.now();this[ds]={blobLike:e,name:i,type:n,lastModified:s}}stream(...e){return xt.brandCheck(this,t),this[ds].blobLike.stream(...e)}arrayBuffer(...e){return xt.brandCheck(this,t),this[ds].blobLike.arrayBuffer(...e)}slice(...e){return xt.brandCheck(this,t),this[ds].blobLike.slice(...e)}text(...e){return xt.brandCheck(this,t),this[ds].blobLike.text(...e)}get size(){return xt.brandCheck(this,t),this[ds].blobLike.size}get type(){return xt.brandCheck(this,t),this[ds].blobLike.type}get name(){return xt.brandCheck(this,t),this[ds].name}get lastModified(){return xt.brandCheck(this,t),this[ds].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(IB.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:ige,lastModified:ige});xt.converters.Blob=xt.interfaceConverter(nge);xt.converters.BlobPart=function(t,e){if(xt.util.Type(t)==="Object"){if(sge(t))return xt.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||DT.isAnyArrayBuffer(t))return xt.converters.BufferSource(t,e)}return xt.converters.USVString(t,e)};xt.converters["sequence<BlobPart>"]=xt.sequenceConverter(xt.converters.BlobPart);xt.converters.FilePropertyBag=xt.dictionaryConverter([{key:"lastModified",converter:xt.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:xt.converters.DOMString,defaultValue:""},{key:"endings",converter:t=>(t=xt.converters.DOMString(t),t=t.toLowerCase(),t!=="native"&&(t="transparent"),t),defaultValue:"transparent"}]);function AAt(t,e){let A=[];for(let r of t)if(typeof r=="string"){let i=r;e.endings==="native"&&(i=rAt(i)),A.push(new TextEncoder().encode(i))}else DT.isAnyArrayBuffer(r)||DT.isTypedArray(r)?r.buffer?A.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):A.push(new Uint8Array(r)):sge(r)&&A.push(r);return A}a(AAt,"processBlobParts");function rAt(t){let e=`
|
||||
`),met=/\r\n/g,Cet=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function im(t){Ipe.call(this),t=t||{};let e=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=Bpe(t,"maxHeaderPairs",2e3),this.maxHeaderSize=Bpe(t,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new het(Eet),this.ss.on("info",function(A,r,i,n){r&&!e.maxed&&(e.nread+n-i>=e.maxHeaderSize?(n=e.maxHeaderSize-e.nread+i,e.nread=e.maxHeaderSize,e.maxed=!0):e.nread+=n-i,e.buffer+=r.toString("binary",i,n)),A&&e._finish()})}a(im,"HeaderParser");get(im,Ipe);im.prototype.push=function(t){let e=this.ss.push(t);if(this.finished)return e};im.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};im.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let t=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",t)};im.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let t=this.buffer.split(met),e=t.length,A,r;for(var i=0;i<e;++i){if(t[i].length===0)continue;if((t[i][0]===" "||t[i][0]===" ")&&r){this.header[r][this.header[r].length-1]+=t[i];continue}let n=t[i].indexOf(":");if(n===-1||n===0)return;if(A=Cet.exec(t[i]),r=A[1].toLowerCase(),this.header[r]=this.header[r]||[],this.header[r].push(A[2]||""),++this.npairs===this.maxHeaderPairs)break}};ype.exports=im});var BT=E((xRt,Npe)=>{"use strict";var QT=require("node:stream").Writable,fet=require("node:util").inherits,Qet=CT(),bpe=fpe(),Bet=wpe(),Iet=45,yet=Buffer.from("-"),wet=Buffer.from(`\r
|
||||
`),bet=a(function(){},"EMPTY_FN");function qa(t){if(!(this instanceof qa))return new qa(t);if(QT.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new Bet(t),this._hparser.on("header",function(A){e._inHeader=!1,e._part.emit("header",A)})}a(qa,"Dicer");fet(qa,QT);qa.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let A=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(A+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else QT.prototype.emit.apply(this,arguments)};qa.prototype._write=function(t,e,A){if(!this._hparser&&!this._bparser)return A();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new bpe(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(t);if(!this._inHeader&&r!==void 0&&r<t.length)t=t.slice(r);else return A()}this._firstWrite&&(this._bparser.push(wet),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=A:A()};qa.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};qa.prototype.setBoundary=function(t){let e=this;this._bparser=new Qet(`\r
|
||||
--`+t),this._bparser.on("info",function(A,r,i,n){e._oninfo(A,r,i,n)})};qa.prototype._ignore=function(){this._part&&!this._ignoreData&&(this._ignoreData=!0,this._part.on("error",bet),this._part.resume())};qa.prototype._oninfo=function(t,e,A,r){let i,n=this,s=0,o,c=!0;if(!this._part&&this._justMatched&&e){for(;this._dashes<2&&A+s<r;)if(e[A+s]===Iet)++s,++this._dashes;else{this._dashes&&(i=yet),this._dashes=0;break}if(this._dashes===2&&(A+s<r&&this._events.trailer&&this.emit("trailer",e.slice(A+s,r)),this.reset(),this._finished=!0,n._parts===0&&(n._realFinish=!0,n.emit("finish"),n._realFinish=!1)),this._dashes)return}this._justMatched&&(this._justMatched=!1),this._part||(this._part=new bpe(this._partOpts),this._part._read=function(l){n._unpause()},this._isPreamble&&this._events.preamble?this.emit("preamble",this._part):this._isPreamble!==!0&&this._events.part?this.emit("part",this._part):this._ignore(),this._isPreamble||(this._inHeader=!0)),e&&A<r&&!this._ignoreData&&(this._isPreamble||!this._inHeader?(i&&(c=this._part.push(i)),c=this._part.push(e.slice(A,r)),c||(this._pause=!0)):!this._isPreamble&&this._inHeader&&(i&&this._hparser.push(i),o=this._hparser.push(e.slice(A,r)),!this._inHeader&&o!==void 0&&o<r&&this._oninfo(!1,e,A+o,r))),t&&(this._hparser.reset(),this._isPreamble?this._isPreamble=!1:A!==r&&(++this._parts,this._part.on("end",function(){--n._parts===0&&(n._finished?(n._realFinish=!0,n.emit("finish"),n._realFinish=!1):n._unpause())})),this._part.push(null),this._part=void 0,this._ignoreData=!1,this._justMatched=!0,this._dashes=0)};qa.prototype._unpause=function(){if(this._pause&&(this._pause=!1,this._cb)){let t=this._cb;this._cb=void 0,t()}};Npe.exports=qa});var pR=E((kRt,Dpe)=>{"use strict";var Rpe=new TextDecoder("utf-8"),uR=new Map([["utf-8",Rpe],["utf8",Rpe]]);function Net(t,e,A){if(t)if(uR.has(A))try{return uR.get(A).decode(Buffer.from(t,e))}catch{}else try{return uR.set(A,new TextDecoder(A)),uR.get(A).decode(Buffer.from(t,e))}catch{}return t}a(Net,"decodeText");Dpe.exports=Net});var IT=E((LRt,vpe)=>{"use strict";var gR=pR(),Spe=/%([a-fA-F0-9]{2})/g;function xpe(t,e){return String.fromCharCode(parseInt(e,16))}a(xpe,"encodedReplacer");function Ret(t){let e=[],A="key",r="",i=!1,n=!1,s=0,o="";for(var c=0,l=t.length;c<l;++c){let d=t[c];if(d==="\\"&&i)if(n)n=!1;else{n=!0;continue}else if(d==='"')if(n)n=!1;else{i?(i=!1,A="key"):i=!0;continue}else if(n&&i&&(o+="\\"),n=!1,(A==="charset"||A==="lang")&&d==="'"){A==="charset"?(A="lang",r=o.substring(1)):A="value",o="";continue}else if(A==="key"&&(d==="*"||d==="=")&&e.length){d==="*"?A="charset":A="value",e[s]=[o,void 0],o="";continue}else if(!i&&d===";"){A="key",r?(o.length&&(o=gR(o.replace(Spe,xpe),"binary",r)),r=""):o.length&&(o=gR(o,"binary","utf8")),e[s]===void 0?e[s]=o:e[s][1]=o,o="",++s;continue}else if(!i&&(d===" "||d===" "))continue;o+=d}return r&&o.length?o=gR(o.replace(Spe,xpe),"binary",r):o&&(o=gR(o,"binary","utf8")),e[s]===void 0?o&&(e[s]=o):e[s][1]=o,e}a(Ret,"parseParams");vpe.exports=Ret});var Fpe=E((TRt,kpe)=>{"use strict";kpe.exports=a(function(e){if(typeof e!="string")return"";for(var A=e.length-1;A>=0;--A)switch(e.charCodeAt(A)){case 47:case 92:return e=e.slice(A+1),e===".."||e==="."?"":e}return e===".."||e==="."?"":e},"basename")});var Mpe=E((_Rt,Tpe)=>{"use strict";var{Readable:Upe}=require("node:stream"),{inherits:Det}=require("node:util"),xet=BT(),Lpe=IT(),vet=pR(),ket=Fpe(),cp=dR(),Fet=/^boundary$/i,Let=/^form-data$/i,Uet=/^charset$/i,Tet=/^filename$/i,Met=/^name$/i;hR.detect=/^multipart\/form-data/i;function hR(t,e){let A,r,i=this,n,s=e.limits,o=e.isPartAFile||((v,x,L)=>x==="application/octet-stream"||L!==void 0),c=e.parsedConType||[],l=e.defCharset||"utf8",d=e.preservePath,u={highWaterMark:e.fileHwm};for(A=0,r=c.length;A<r;++A)if(Array.isArray(c[A])&&Fet.test(c[A][0])){n=c[A][1];break}function p(){N===0&&k&&!t._done&&(k=!1,i.end())}if(a(p,"checkFinished"),typeof n!="string")throw new Error("Multipart: Boundary not found");let g=cp(s,"fieldSize",1*1024*1024),h=cp(s,"fileSize",1/0),m=cp(s,"files",1/0),f=cp(s,"fields",1/0),B=cp(s,"parts",1/0),b=cp(s,"headerPairs",2e3),I=cp(s,"headerSize",80*1024),C=0,Q=0,N=0,S,w,k=!1;this._needDrain=!1,this._pause=!1,this._cb=void 0,this._nparts=0,this._boy=t;let D={boundary:n,maxHeaderPairs:b,maxHeaderSize:I,partHwm:u.highWaterMark,highWaterMark:e.highWaterMark};this.parser=new xet(D),this.parser.on("drain",function(){if(i._needDrain=!1,i._cb&&!i._pause){let v=i._cb;i._cb=void 0,v()}}).on("part",a(function v(x){if(++i._nparts>B)return i.parser.removeListener("part",v),i.parser.on("part",nm),t.hitPartsLimit=!0,t.emit("partsLimit"),nm(x);if(w){let L=w;L.emit("end"),L.removeAllListeners("end")}x.on("header",function(L){let q,le,_,rt,Se,vt,ht=0;if(L["content-type"]&&(_=Lpe(L["content-type"][0]),_[0])){for(q=_[0].toLowerCase(),A=0,r=_.length;A<r;++A)if(Uet.test(_[A][0])){rt=_[A][1].toLowerCase();break}}if(q===void 0&&(q="text/plain"),rt===void 0&&(rt=l),L["content-disposition"]){if(_=Lpe(L["content-dispo
Line truncated
|
||||
`))}a(jpe,"isValidHeaderValue");function Ntt(t,e){let{headersList:A}=e,r=(A.get("referrer-policy")??"").split(","),i="";if(r.length>0)for(let n=r.length;n!==0;n--){let s=r[n-1].trim();if(ptt.includes(s)){i=s;break}}i!==""&&(t.referrerPolicy=i)}a(Ntt,"setRequestReferrerPolicyOnRedirect");function Rtt(){return"allowed"}a(Rtt,"crossOriginResourcePolicyCheck");function Dtt(){return"success"}a(Dtt,"corsCheck");function Stt(){return"success"}a(Stt,"TAOCheck");function xtt(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e)}a(xtt,"appendFetchMetadata");function vtt(t){let e=t.origin;if(t.responseTainting==="cors"||t.mode==="websocket")e&&t.headersList.append("origin",e);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&xT(t.origin)&&!xT(wB(t))&&(e=null);break;case"same-origin":mR(t,wB(t))||(e=null);break;default:}e&&t.headersList.append("origin",e)}}a(vtt,"appendRequestOriginHeader");function ktt(t){return htt.now()}a(ktt,"coarsenedSharedCurrentTime");function Ftt(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}}a(Ftt,"createOpaqueTimingInfo");function Ltt(){return{referrerPolicy:"strict-origin-when-cross-origin"}}a(Ltt,"makePolicyContainer");function Utt(t){return{referrerPolicy:t.referrerPolicy}}a(Utt,"clonePolicyContainer");function Ttt(t){let e=t.referrerPolicy;cm(e);let A=null;if(t.referrer==="client"){let o=gtt();if(!o||o.origin==="null")return"no-referrer";A=new URL(o)}else t.referrer instanceof URL&&(A=t.referrer);let r=DT(A),i=DT(A,!0);r.toString().length>4096&&(r=i);let n=mR(t,r),s=IB(r)&&!IB(t.url);switch(e){case"origin":return i??DT(A,!0);case"unsafe-url":return r;case"same-origin":return n?i:"no-referrer";case"origin-when-cross-origin":return n?r:i;case"strict-origin-when-cross-origin":{let o=wB(t);return mR(r,o)?r:IB(r)&&!IB(o)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return s?"no-referrer":i}}a(Ttt,"determineRequestsReferrer");function DT(t,e){return cm(t instanceof URL),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}a(DT,"stripURLForReferrer");function IB(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(A){if(A==null||A==="null")return!1;let r=new URL(A);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}a(IB,"isURLPotentiallyTrustworthy");function Mtt(t,e){if(yB===void 0)return!0;let A=Ott(e);if(A==="no metadata"||A.length===0)return!0;let r=A.sort((s,o)=>o.algo.localeCompare(s.algo)),i=r[0].algo,n=r.filter(s=>s.algo===i);for(let s of n){let o=s.algo,c=s.hash;c.endsWith("==")&&(c=c.slice(0,-2));let l=yB.createHash(o).update(t).digest("base64");if(l.endsWith("==")&&(l=l.slice(0,-2)),l===c)return!0;let d=yB.createHash(o).update(t).digest("base64url");if(d.endsWith("==")&&(d=d.slice(0,-2)),d===c)return!0}return!1}a(Mtt,"bytesMatch");var _tt=/((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;function Ott(t){let e=[],A=!0,r=yB.getHashes();for(let i of t.split(" ")){A=!1;let n=_tt.exec(i);if(n===null||n.groups===void 0)continue;let s=n.groups.algo;r.includes(s.toLowerCase())&&e.push(n.groups)}return A===!0?"no metadata":e}a(Ott,"parseMetadata");function Ptt(t){}a(Ptt,"tryUpgradeRequestToAPotentiallyTrustworthyURL");function mR(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}a(mR,"sameOrigin");function qtt(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}}a(qtt,"createDeferredPromise");function Htt(t){return t.controller.state==="aborted"}a(Htt,"isAborted");function Ytt(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}a(Ytt,"isCancelled");function Gtt(t){return/^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(t)?t.toUpperCase():t}a(Gtt,"normalizeMethod");function Jtt(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return cm(typeof e=="string"),e}a(Jtt,"serializeJavascriptValueToJSONString");var Vtt=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Wtt(t,e,A){let r={index:0,kind:A,target:t},i={next(){if(Object.getPrototypeOf(this)!==i)throw new TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let{index:n,kind:s,target:o}=r,c=o(),l=c.le
Line truncated
|
||||
`||t===" "||t===" "}a(Age,"isHTTPWhiteSpace");function vT(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&Age(t[r]);r++);if(A)for(;i>0&&Age(t[i]);i--);return t.slice(r,i+1)}a(vT,"removeHTTPWhitespace");function rge(t){return t==="\r"||t===`
|
||||
`||t===" "||t==="\f"||t===" "}a(rge,"isASCIIWhitespace");function pAt(t,e=!0,A=!0){let r=0,i=t.length-1;if(e)for(;r<t.length&&rge(t[r]);r++);if(A)for(;i>0&&rge(t[i]);i--);return t.slice(r,i+1)}a(pAt,"removeASCIIWhitespace");age.exports={dataURLProcessor:cAt,URLSerializer:ige,collectASequenceOfCodePoints:QR,collectASequenceOfCodePointsFast:lm,stringPercentDecode:nge,parseMIMEType:kT,collectAnHTTPQuotedString:sge,serializeAMimeType:uAt}});var BR=E((ADt,uge)=>{"use strict";var{Blob:lge,File:oge}=require("buffer"),{types:FT}=require("util"),{kState:ds}=zc(),{isBlobLike:dge}=aa(),{webidl:xt}=Yi(),{parseMIMEType:gAt,serializeAMimeType:hAt}=Ha(),{kEnumerableProperty:cge}=gt(),bB=class t extends lge{static{a(this,"File")}constructor(e,A,r={}){xt.argumentLengthCheck(arguments,2,{header:"File constructor"}),e=xt.converters["sequence<BlobPart>"](e),A=xt.converters.USVString(A),r=xt.converters.FilePropertyBag(r);let i=A,n=r.type,s;e:{if(n){if(n=gAt(n),n==="failure"){n="";break e}n=hAt(n).toLowerCase()}s=r.lastModified}super(EAt(e,r),{type:n}),this[ds]={name:i,lastModified:s,type:n}}get name(){return xt.brandCheck(this,t),this[ds].name}get lastModified(){return xt.brandCheck(this,t),this[ds].lastModified}get type(){return xt.brandCheck(this,t),this[ds].type}},LT=class t{static{a(this,"FileLike")}constructor(e,A,r={}){let i=A,n=r.type,s=r.lastModified??Date.now();this[ds]={blobLike:e,name:i,type:n,lastModified:s}}stream(...e){return xt.brandCheck(this,t),this[ds].blobLike.stream(...e)}arrayBuffer(...e){return xt.brandCheck(this,t),this[ds].blobLike.arrayBuffer(...e)}slice(...e){return xt.brandCheck(this,t),this[ds].blobLike.slice(...e)}text(...e){return xt.brandCheck(this,t),this[ds].blobLike.text(...e)}get size(){return xt.brandCheck(this,t),this[ds].blobLike.size}get type(){return xt.brandCheck(this,t),this[ds].blobLike.type}get name(){return xt.brandCheck(this,t),this[ds].name}get lastModified(){return xt.brandCheck(this,t),this[ds].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(bB.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:cge,lastModified:cge});xt.converters.Blob=xt.interfaceConverter(lge);xt.converters.BlobPart=function(t,e){if(xt.util.Type(t)==="Object"){if(dge(t))return xt.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||FT.isAnyArrayBuffer(t))return xt.converters.BufferSource(t,e)}return xt.converters.USVString(t,e)};xt.converters["sequence<BlobPart>"]=xt.sequenceConverter(xt.converters.BlobPart);xt.converters.FilePropertyBag=xt.dictionaryConverter([{key:"lastModified",converter:xt.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:xt.converters.DOMString,defaultValue:""},{key:"endings",converter:t=>(t=xt.converters.DOMString(t),t=t.toLowerCase(),t!=="native"&&(t="transparent"),t),defaultValue:"transparent"}]);function EAt(t,e){let A=[];for(let r of t)if(typeof r=="string"){let i=r;e.endings==="native"&&(i=mAt(i)),A.push(new TextEncoder().encode(i))}else FT.isAnyArrayBuffer(r)||FT.isTypedArray(r)?r.buffer?A.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):A.push(new Uint8Array(r)):dge(r)&&A.push(r);return A}a(EAt,"processBlobParts");function mAt(t){let e=`
|
||||
`;return process.platform==="win32"&&(e=`\r
|
||||
`),t.replace(/\r?\n/g,e)}a(rAt,"convertLineEndingsNative");function iAt(t){return rge&&t instanceof rge||t instanceof IB||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}a(iAt,"isFileLike");age.exports={File:IB,FileLike:ST,isFileLike:iAt}});var fR=E((qRt,uge)=>{"use strict";var{isBlobLike:CR,toUSVString:nAt,makeIterator:xT}=aa(),{kState:wi}=zc(),{File:dge,FileLike:oge,isFileLike:sAt}=mR(),{webidl:Ut}=Yi(),{Blob:aAt,File:vT}=require("buffer"),cge=vT??dge,lm=class t{static{a(this,"FormData")}constructor(e){if(e!==void 0)throw Ut.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[wi]=[]}append(e,A,r=void 0){if(Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!CR(A))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=Ut.converters.USVString(e),A=CR(A)?Ut.converters.Blob(A,{strict:!1}):Ut.converters.USVString(A),r=arguments.length===3?Ut.converters.USVString(r):void 0;let i=lge(e,A,r);this[wi].push(i)}delete(e){Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=Ut.converters.USVString(e),this[wi]=this[wi].filter(A=>A.name!==e)}get(e){Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=Ut.converters.USVString(e);let A=this[wi].findIndex(r=>r.name===e);return A===-1?null:this[wi][A].value}getAll(e){return Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=Ut.converters.USVString(e),this[wi].filter(A=>A.name===e).map(A=>A.value)}has(e){return Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=Ut.converters.USVString(e),this[wi].findIndex(A=>A.name===e)!==-1}set(e,A,r=void 0){if(Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!CR(A))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=Ut.converters.USVString(e),A=CR(A)?Ut.converters.Blob(A,{strict:!1}):Ut.converters.USVString(A),r=arguments.length===3?nAt(r):void 0;let i=lge(e,A,r),n=this[wi].findIndex(s=>s.name===e);n!==-1?this[wi]=[...this[wi].slice(0,n),i,...this[wi].slice(n+1).filter(s=>s.name!==e)]:this[wi].push(i)}entries(){return Ut.brandCheck(this,t),xT(()=>this[wi].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return Ut.brandCheck(this,t),xT(()=>this[wi].map(e=>[e.name,e.value]),"FormData","key")}values(){return Ut.brandCheck(this,t),xT(()=>this[wi].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,A=globalThis){if(Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(A,[i,r,this])}};lm.prototype[Symbol.iterator]=lm.prototype.entries;Object.defineProperties(lm.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function lge(t,e,A){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(sAt(e)||(e=e instanceof aAt?new cge([e],"blob",{type:e.type}):new oge(e,"blob",{type:e.type})),A!==void 0){let r={type:e.type,lastModified:e.lastModified};e=vT&&e instanceof vT||e instanceof dge?new cge([e],A,r):new oge(e,A,r)}return{name:t,value:e}}a(lge,"makeEntry");uge.exports={FormData:lm}});var yB=E((YRt,Bge)=>{"use strict";var oAt=Ope(),dm=gt(),{ReadableStreamFrom:cAt,isBlobLike:pge,isReadableStreamLike:lAt,readableStreamClose:dAt,createDeferredPromise:uAt,fullyReadBody:pAt}=aa(),{FormData:gge}=fR(),{kState:Xc}=zc(),{webidl:kT}=Yi(),{DOMException:mge,structuredClone:gAt}=bd(),{Blob:hAt,File:EAt}=require("buffer"),{kBodyUsed:mAt}=BA(),FT=require("assert"),{isErrored:CAt}=gt(),{isUint8Array:Cge,isArrayBuffer:fAt}=require("util/types"),{File:QAt}=mR(),{parseMIMEType:BAt,serializeAMimeType:IAt}=Ha(),jc=globalThis.ReadableStream,hge=EAt??QAt;function fge(t,e=!1){jc||(jc=require("stream/web").ReadableStream);let A=null;t instanceof jc?A=t:pge(t)?A=t.stream():A=new jc({async pull(c){c.enqueue(typeof i=="string"?new TextEncoder().encode(i):i),queueMicrotask(()=>dAt(c))},start(){},type:void 0}),FT(lAt(A));let r=null,i=null,n=null,s=null;if(typeof t=="string")i=t,s="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),s="application/x-www-form-urlencoded;charset=UTF-8";else if(fAt(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(dm.isFormDataLike(t)){let c=`----formdata-undici-0${`${Math.floor(Math.random()*1e11)}`.padStart(11,"0")}`,l=`--${c}\r
|
||||
`),t.replace(/\r?\n/g,e)}a(mAt,"convertLineEndingsNative");function CAt(t){return oge&&t instanceof oge||t instanceof bB||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}a(CAt,"isFileLike");uge.exports={File:bB,FileLike:LT,isFileLike:CAt}});var yR=E((iDt,mge)=>{"use strict";var{isBlobLike:IR,toUSVString:fAt,makeIterator:UT}=aa(),{kState:wi}=zc(),{File:Ege,FileLike:pge,isFileLike:QAt}=BR(),{webidl:Ut}=Yi(),{Blob:BAt,File:TT}=require("buffer"),gge=TT??Ege,dm=class t{static{a(this,"FormData")}constructor(e){if(e!==void 0)throw Ut.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[wi]=[]}append(e,A,r=void 0){if(Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!IR(A))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=Ut.converters.USVString(e),A=IR(A)?Ut.converters.Blob(A,{strict:!1}):Ut.converters.USVString(A),r=arguments.length===3?Ut.converters.USVString(r):void 0;let i=hge(e,A,r);this[wi].push(i)}delete(e){Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=Ut.converters.USVString(e),this[wi]=this[wi].filter(A=>A.name!==e)}get(e){Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=Ut.converters.USVString(e);let A=this[wi].findIndex(r=>r.name===e);return A===-1?null:this[wi][A].value}getAll(e){return Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=Ut.converters.USVString(e),this[wi].filter(A=>A.name===e).map(A=>A.value)}has(e){return Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=Ut.converters.USVString(e),this[wi].findIndex(A=>A.name===e)!==-1}set(e,A,r=void 0){if(Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!IR(A))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=Ut.converters.USVString(e),A=IR(A)?Ut.converters.Blob(A,{strict:!1}):Ut.converters.USVString(A),r=arguments.length===3?fAt(r):void 0;let i=hge(e,A,r),n=this[wi].findIndex(s=>s.name===e);n!==-1?this[wi]=[...this[wi].slice(0,n),i,...this[wi].slice(n+1).filter(s=>s.name!==e)]:this[wi].push(i)}entries(){return Ut.brandCheck(this,t),UT(()=>this[wi].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return Ut.brandCheck(this,t),UT(()=>this[wi].map(e=>[e.name,e.value]),"FormData","key")}values(){return Ut.brandCheck(this,t),UT(()=>this[wi].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,A=globalThis){if(Ut.brandCheck(this,t),Ut.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(A,[i,r,this])}};dm.prototype[Symbol.iterator]=dm.prototype.entries;Object.defineProperties(dm.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function hge(t,e,A){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(QAt(e)||(e=e instanceof BAt?new gge([e],"blob",{type:e.type}):new pge(e,"blob",{type:e.type})),A!==void 0){let r={type:e.type,lastModified:e.lastModified};e=TT&&e instanceof TT||e instanceof Ege?new gge([e],A,r):new pge(e,A,r)}return{name:t,value:e}}a(hge,"makeEntry");mge.exports={FormData:dm}});var NB=E((sDt,Nge)=>{"use strict";var IAt=Gpe(),um=gt(),{ReadableStreamFrom:yAt,isBlobLike:Cge,isReadableStreamLike:wAt,readableStreamClose:bAt,createDeferredPromise:NAt,fullyReadBody:RAt}=aa(),{FormData:fge}=yR(),{kState:Xc}=zc(),{webidl:MT}=Yi(),{DOMException:Ige,structuredClone:DAt}=bd(),{Blob:SAt,File:xAt}=require("buffer"),{kBodyUsed:vAt}=BA(),_T=require("assert"),{isErrored:kAt}=gt(),{isUint8Array:yge,isArrayBuffer:FAt}=require("util/types"),{File:LAt}=BR(),{parseMIMEType:UAt,serializeAMimeType:TAt}=Ha(),jc=globalThis.ReadableStream,Qge=xAt??LAt;function wge(t,e=!1){jc||(jc=require("stream/web").ReadableStream);let A=null;t instanceof jc?A=t:Cge(t)?A=t.stream():A=new jc({async pull(c){c.enqueue(typeof i=="string"?new TextEncoder().encode(i):i),queueMicrotask(()=>bAt(c))},start(){},type:void 0}),_T(wAt(A));let r=null,i=null,n=null,s=null;if(typeof t=="string")i=t,s="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),s="application/x-www-form-urlencoded;charset=UTF-8";else if(FAt(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(um.isFormDataLike(t)){let c=`----formdata-undici-0${`${Math.floor(Math.random()*1e11)}`.padStart(11,"0")}`,l=`--${c}\r
|
||||
Content-Disposition: form-data`;let d=a(B=>B.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),u=a(B=>B.replace(/\r?\n|\r/g,`\r
|
||||
`),"normalizeLinefeeds"),p=new TextEncoder,g=[],h=new Uint8Array([13,10]);n=0;let m=!1;for(let[B,b]of t)if(typeof b=="string"){let I=p.encode(l+`; name="${d(u(B))}"\r
|
||||
\r
|
||||
@@ -174,64 +174,65 @@ ${u(b)}\r
|
||||
`);g.push(I),n+=I.byteLength}else{let I=p.encode(`${l}; name="${d(u(B))}"`+(b.name?`; filename="${d(b.name)}"`:"")+`\r
|
||||
Content-Type: ${b.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);g.push(I,b,h),typeof b.size=="number"?n+=I.byteLength+b.size+h.byteLength:m=!0}let f=p.encode(`--${c}--`);g.push(f),n+=f.byteLength,m&&(n=null),i=t,r=a(async function*(){for(let B of g)B.stream?yield*B.stream():yield B},"action"),s="multipart/form-data; boundary="+c}else if(pge(t))i=t,n=t.size,t.type&&(s=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(dm.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");A=t instanceof jc?t:cAt(t)}if((typeof i=="string"||dm.isBuffer(i))&&(n=Buffer.byteLength(i)),r!=null){let c;A=new jc({async start(){c=r(t)[Symbol.asyncIterator]()},async pull(l){let{value:d,done:u}=await c.next();return u?queueMicrotask(()=>{l.close()}):CAt(A)||l.enqueue(new Uint8Array(d)),l.desiredSize>0},async cancel(l){await c.return()},type:void 0})}return[{stream:A,source:i,length:n},s]}a(fge,"extractBody");function yAt(t,e=!1){return jc||(jc=require("stream/web").ReadableStream),t instanceof jc&&(FT(!dm.isDisturbed(t),"The body has already been consumed."),FT(!t.locked,"The stream is locked.")),fge(t,e)}a(yAt,"safelyExtractBody");function wAt(t){let[e,A]=t.stream.tee(),r=gAt(A,{transfer:[A]}),[,i]=r.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}a(wAt,"cloneBody");async function*Ege(t){if(t)if(Cge(t))yield t;else{let e=t.stream;if(dm.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[mAt]=!0,yield*e}}a(Ege,"consumeBody");function LT(t){if(t.aborted)throw new mge("The operation was aborted.","AbortError")}a(LT,"throwIfAborted");function bAt(t){return{blob(){return QR(this,A=>{let r=SAt(this);return r==="failure"?r="":r&&(r=IAt(r)),new hAt([A],{type:r})},t)},arrayBuffer(){return QR(this,A=>new Uint8Array(A).buffer,t)},text(){return QR(this,Qge,t)},json(){return QR(this,DAt,t)},async formData(){kT.brandCheck(this,t),LT(this[Xc]);let A=this.headers.get("Content-Type");if(/multipart\/form-data/.test(A)){let r={};for(let[o,c]of this.headers)r[o.toLowerCase()]=c;let i=new gge,n;try{n=new oAt({headers:r,preservePath:!0})}catch(o){throw new mge(`${o}`,"AbortError")}n.on("field",(o,c)=>{i.append(o,c)}),n.on("file",(o,c,l,d,u)=>{let p=[];if(d==="base64"||d.toLowerCase()==="base64"){let g="";c.on("data",h=>{g+=h.toString().replace(/[\r\n]/gm,"");let m=g.length-g.length%4;p.push(Buffer.from(g.slice(0,m),"base64")),g=g.slice(m)}),c.on("end",()=>{p.push(Buffer.from(g,"base64")),i.append(o,new hge(p,l,{type:u}))})}else c.on("data",g=>{p.push(g)}),c.on("end",()=>{i.append(o,new hge(p,l,{type:u}))})});let s=new Promise((o,c)=>{n.on("finish",o),n.on("error",l=>c(new TypeError(l)))});if(this.body!==null)for await(let o of Ege(this[Xc].body))n.write(o);return n.end(),await s,i}else if(/application\/x-www-form-urlencoded/.test(A)){let r;try{let n="",s=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let o of Ege(this[Xc].body)){if(!Cge(o))throw new TypeError("Expected Uint8Array chunk");n+=s.decode(o,{stream:!0})}n+=s.decode(),r=new URLSearchParams(n)}catch(n){throw Object.assign(new TypeError,{cause:n})}let i=new gge;for(let[n,s]of r)i.append(n,s);return i}else throw await Promise.resolve(),LT(this[Xc]),kT.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}a(bAt,"bodyMixinMethods");function NAt(t){Object.assign(t.prototype,bAt(t))}a(NAt,"mixinBody");async function QR(t,e,A){if(kT.brandCheck(t,A),LT(t[Xc]),RAt(t[Xc].body))throw new TypeError("Body is unusable");let r=uAt(),i=a(s=>r.reject(s),"errorSteps"),n=a(s=>{try{r.resolve(e(s))}catch(o){i(o)}},"successSteps");return t[Xc].body==null?(n(new Uint8Array),r.promise):(await pAt(t[Xc].body,n,i),r.promise)}a(QR,"specConsumeBody");function RAt(t){return t!=null&&(t.stream.locked||dm.isDisturbed(t.stream))}a(RAt,"bodyUnusable");function Qge(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),new TextDecoder().decode(t))}a(Qge,"utf8DecodeBytes");function DAt(t){return JSON.parse(Qge(t))}a(DAt,"parseJSONFromBytes");function SAt(t){let{headersList:e}=t[Xc],A=e.get("content-type");return A===null?"failure":BAt(A)}a(SAt,"bodyMimeType");Bge.exports={extractBody:fge,safelyExtractBody:yAt,cloneBody:wAt,mixinBody:NAt}});var bge=E((JRt,wge)=>{"use strict";var{InvalidArgumentError:AA,NotSupportedError:xAt}=tA(),Zc=require("assert"),{kHTTP2BuildRequest:vAt,kHTTP2CopyHeaders:kAt,kHTTP1BuildRequest:FAt}=BA(),us=gt(),Ige=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,yge=/[^\t\x20-\x7e\x80-\xff]/,LAt=/[^\u0021-\u00ff]/,Kc=Symbol("handler"),dr={},UT;try{let t=require("diagnostics_channel");dr.create=t.channel("undici:request:create"),dr.bodySent=t.channel("undici:request:bodySent"),dr.headers=t.channel("undici:request:headers"),dr.trailers=t.channel("undici:request:trailers"),dr.error=t.channel("undici:request:error")}catch{dr.create={hasSubscribers:!1},dr.bodySent={hasSubscribers:!1},dr.headers={hasSubscribers:!1},dr.trailLine truncated
|
||||
`);g.push(I,b,h),typeof b.size=="number"?n+=I.byteLength+b.size+h.byteLength:m=!0}let f=p.encode(`--${c}--`);g.push(f),n+=f.byteLength,m&&(n=null),i=t,r=a(async function*(){for(let B of g)B.stream?yield*B.stream():yield B},"action"),s="multipart/form-data; boundary="+c}else if(Cge(t))i=t,n=t.size,t.type&&(s=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(um.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");A=t instanceof jc?t:yAt(t)}if((typeof i=="string"||um.isBuffer(i))&&(n=Buffer.byteLength(i)),r!=null){let c;A=new jc({async start(){c=r(t)[Symbol.asyncIterator]()},async pull(l){let{value:d,done:u}=await c.next();return u?queueMicrotask(()=>{l.close()}):kAt(A)||l.enqueue(new Uint8Array(d)),l.desiredSize>0},async cancel(l){await c.return()},type:void 0})}return[{stream:A,source:i,length:n},s]}a(wge,"extractBody");function MAt(t,e=!1){return jc||(jc=require("stream/web").ReadableStream),t instanceof jc&&(_T(!um.isDisturbed(t),"The body has already been consumed."),_T(!t.locked,"The stream is locked.")),wge(t,e)}a(MAt,"safelyExtractBody");function _At(t){let[e,A]=t.stream.tee(),r=DAt(A,{transfer:[A]}),[,i]=r.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}a(_At,"cloneBody");async function*Bge(t){if(t)if(yge(t))yield t;else{let e=t.stream;if(um.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[vAt]=!0,yield*e}}a(Bge,"consumeBody");function OT(t){if(t.aborted)throw new Ige("The operation was aborted.","AbortError")}a(OT,"throwIfAborted");function OAt(t){return{blob(){return wR(this,A=>{let r=YAt(this);return r==="failure"?r="":r&&(r=TAt(r)),new SAt([A],{type:r})},t)},arrayBuffer(){return wR(this,A=>new Uint8Array(A).buffer,t)},text(){return wR(this,bge,t)},json(){return wR(this,HAt,t)},async formData(){MT.brandCheck(this,t),OT(this[Xc]);let A=this.headers.get("Content-Type");if(/multipart\/form-data/.test(A)){let r={};for(let[o,c]of this.headers)r[o.toLowerCase()]=c;let i=new fge,n;try{n=new IAt({headers:r,preservePath:!0})}catch(o){throw new Ige(`${o}`,"AbortError")}n.on("field",(o,c)=>{i.append(o,c)}),n.on("file",(o,c,l,d,u)=>{let p=[];if(d==="base64"||d.toLowerCase()==="base64"){let g="";c.on("data",h=>{g+=h.toString().replace(/[\r\n]/gm,"");let m=g.length-g.length%4;p.push(Buffer.from(g.slice(0,m),"base64")),g=g.slice(m)}),c.on("end",()=>{p.push(Buffer.from(g,"base64")),i.append(o,new Qge(p,l,{type:u}))})}else c.on("data",g=>{p.push(g)}),c.on("end",()=>{i.append(o,new Qge(p,l,{type:u}))})});let s=new Promise((o,c)=>{n.on("finish",o),n.on("error",l=>c(new TypeError(l)))});if(this.body!==null)for await(let o of Bge(this[Xc].body))n.write(o);return n.end(),await s,i}else if(/application\/x-www-form-urlencoded/.test(A)){let r;try{let n="",s=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let o of Bge(this[Xc].body)){if(!yge(o))throw new TypeError("Expected Uint8Array chunk");n+=s.decode(o,{stream:!0})}n+=s.decode(),r=new URLSearchParams(n)}catch(n){throw Object.assign(new TypeError,{cause:n})}let i=new fge;for(let[n,s]of r)i.append(n,s);return i}else throw await Promise.resolve(),OT(this[Xc]),MT.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}a(OAt,"bodyMixinMethods");function PAt(t){Object.assign(t.prototype,OAt(t))}a(PAt,"mixinBody");async function wR(t,e,A){if(MT.brandCheck(t,A),OT(t[Xc]),qAt(t[Xc].body))throw new TypeError("Body is unusable");let r=NAt(),i=a(s=>r.reject(s),"errorSteps"),n=a(s=>{try{r.resolve(e(s))}catch(o){i(o)}},"successSteps");return t[Xc].body==null?(n(new Uint8Array),r.promise):(await RAt(t[Xc].body,n,i),r.promise)}a(wR,"specConsumeBody");function qAt(t){return t!=null&&(t.stream.locked||um.isDisturbed(t.stream))}a(qAt,"bodyUnusable");function bge(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),new TextDecoder().decode(t))}a(bge,"utf8DecodeBytes");function HAt(t){return JSON.parse(bge(t))}a(HAt,"parseJSONFromBytes");function YAt(t){let{headersList:e}=t[Xc],A=e.get("content-type");return A===null?"failure":UAt(A)}a(YAt,"bodyMimeType");Nge.exports={extractBody:wge,safelyExtractBody:MAt,cloneBody:_At,mixinBody:PAt}});var xge=E((oDt,Sge)=>{"use strict";var{InvalidArgumentError:AA,NotSupportedError:GAt}=tA(),Zc=require("assert"),{kHTTP2BuildRequest:JAt,kHTTP2CopyHeaders:VAt,kHTTP1BuildRequest:WAt}=BA(),us=gt(),Rge=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,Dge=/[^\t\x20-\x7e\x80-\xff]/,zAt=/[^\u0021-\u00ff]/,Kc=Symbol("handler"),dr={},PT;try{let t=require("diagnostics_channel");dr.create=t.channel("undici:request:create"),dr.bodySent=t.channel("undici:request:bodySent"),dr.headers=t.channel("undici:request:headers"),dr.trailers=t.channel("undici:request:trailers"),dr.error=t.channel("undici:request:error")}catch{dr.create={hasSubscribers:!1},dr.bodySent={hasSubscribers:!1},dr.headers={hasSubscribers:!1},dr.trailLine truncated
|
||||
`),this.body=f.stream,this.contentLength=f.length}else us.isBlobLike(i)&&this.contentType==null&&i.type&&(this.contentType=i.type,this.headers+=`content-type: ${i.type}\r
|
||||
`);us.validateHandler(m,r,l),this.servername=us.getServerName(this.host),this[Kc]=m,dr.create.hasSubscribers&&dr.create.publish({request:this})}onBodySent(e){if(this[Kc].onBodySent)try{this[Kc].onBodySent(e)}catch(A){this.onError(A)}}onRequestSent(){dr.bodySent.hasSubscribers&&dr.bodySent.publish({request:this})}onConnect(e){return Zc(!this.aborted),Zc(!this.completed),this[Kc].onConnect(e)}onHeaders(e,A,r,i){return Zc(!this.aborted),Zc(!this.completed),dr.headers.hasSubscribers&&dr.headers.publish({request:this,response:{statusCode:e,headers:A,statusText:i}}),this[Kc].onHeaders(e,A,r,i)}onData(e){return Zc(!this.aborted),Zc(!this.completed),this[Kc].onData(e)}onUpgrade(e,A,r){return Zc(!this.aborted),Zc(!this.completed),this[Kc].onUpgrade(e,A,r)}onComplete(e){return Zc(!this.aborted),this.completed=!0,dr.trailers.hasSubscribers&&dr.trailers.publish({request:this,trailers:e}),this[Kc].onComplete(e)}onError(e){if(dr.error.hasSubscribers&&dr.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Kc].onError(e)}addHeader(e,A){return wB(this,e,A),this}static[FAt](e,A,r){return new t(e,A,r)}static[vAt](e,A,r){let i=A.headers;A={...A,headers:null};let n=new t(e,A,r);if(n.headers={},Array.isArray(i)){if(i.length%2!==0)throw new AA("headers array must be even");for(let s=0;s<i.length;s+=2)wB(n,i[s],i[s+1],!0)}else if(i&&typeof i=="object"){let s=Object.keys(i);for(let o=0;o<s.length;o++){let c=s[o];wB(n,c,i[c],!0)}}else if(i!=null)throw new AA("headers must be an object or an array");return n}static[kAt](e){let A=e.split(`\r
|
||||
`),r={};for(let i of A){let[n,s]=i.split(": ");s==null||s.length===0||(r[n]?r[n]+=`,${s}`:r[n]=s)}return r}};function cp(t,e,A){if(e&&typeof e=="object")throw new AA(`invalid ${t} header`);if(e=e!=null?`${e}`:"",yge.exec(e)!==null)throw new AA(`invalid ${t} header`);return A?e:`${t}: ${e}\r
|
||||
`}a(cp,"processHeaderValue");function wB(t,e,A,r=!1){if(A&&typeof A=="object"&&!Array.isArray(A))throw new AA(`invalid ${e} header`);if(A===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(yge.exec(A)!==null)throw new AA(`invalid ${e} header`);t.host=A}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(A,10),!Number.isFinite(t.contentLength))throw new AA("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=A,r?t.headers[e]=cp(e,A,r):t.headers+=cp(e,A);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new AA("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof A=="string"?A.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new AA("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new AA("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new AA("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new xAt("expect header not supported");if(Ige.exec(e)===null)throw new AA("invalid header key");if(Array.isArray(A))for(let i=0;i<A.length;i++)r?t.headers[e]?t.headers[e]+=`,${cp(e,A[i],r)}`:t.headers[e]=cp(e,A[i],r):t.headers+=cp(e,A[i]);else r?t.headers[e]=cp(e,A,r):t.headers+=cp(e,A)}}}a(wB,"processHeader");wge.exports=TT});var BR=E((WRt,Nge)=>{"use strict";var UAt=require("events"),MT=class extends UAt{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};Nge.exports=MT});var NB=E((jRt,Rge)=>{"use strict";var TAt=BR(),{ClientDestroyedError:_T,ClientClosedError:MAt,InvalidArgumentError:um}=tA(),{kDestroy:_At,kClose:OAt,kDispatch:OT,kInterceptors:lp}=BA(),pm=Symbol("destroyed"),bB=Symbol("closed"),$c=Symbol("onDestroyed"),gm=Symbol("onClosed"),IR=Symbol("Intercepted Dispatch"),PT=class extends TAt{static{a(this,"DispatcherBase")}constructor(){super(),this[pm]=!1,this[$c]=null,this[bB]=!1,this[gm]=[]}get destroyed(){return this[pm]}get closed(){return this[bB]}get interceptors(){return this[lp]}set interceptors(e){if(e){for(let A=e.length-1;A>=0;A--)if(typeof this[lp][A]!="function")throw new um("interceptor must be an function")}this[lp]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((n,s)=>n?i(n):r(s))});if(typeof e!="function")throw new um("invalid callback");if(this[pm]){queueMicrotask(()=>e(new _T,null));return}if(this[bB]){this[gm]?this[gm].push(e):queueMicrotask(()=>e(null,null));return}this[bB]=!0,this[gm].push(e);let A=a(()=>{let r=this[gm];this[gm]=null;for(let i=0;i<r.length;i++)r[i](null,null)},"onClosed");this[OAt]().then(()=>this.destroy()).then(()=>{queueMicrotask(A)})}destroy(e,A){if(typeof e=="function"&&(A=e,e=null),A===void 0)return new Promise((i,n)=>{this.destroy(e,(s,o)=>s?n(s):i(o))});if(typeof A!="function")throw new um("invalid callback");if(this[pm]){this[$c]?this[$c].push(A):queueMicrotask(()=>A(null,null));return}e||(e=new _T),this[pm]=!0,this[$c]=this[$c]||[],this[$c].push(A);let r=a(()=>{let i=this[$c];this[$c]=null;for(let n=0;n<i.length;n++)i[n](null,null)},"onDestroyed");this[_At](e).then(()=>{queueMicrotask(r)})}[IR](e,A){if(!this[lp]||this[lp].length===0)return this[IR]=this[OT],this[OT](e,A);let r=this[OT].bind(this);for(let i=this[lp].length-1;i>=0;i--)r=this[lp][i](r);return this[IR]=r,r(e,A)}dispatch(e,A){if(!A||typeof A!="object")throw new um("handler must be an object");try{if(!e||typeof e!="object")throw new um("opts must be an object.");if(this[pm]||this[$c])throw new _T;if(this[bB])throw new MAt;return this[IR](e,A)}catch(r){if(typeof A.onError!="function")throw new um("invalid onError method");return A.onError(r),!1}}};Rge.exports=PT});var RB=E(($Rt,xge)=>{"use strict";var PAt=require("net"),Dge=require("assert"),Sge=gt(),{InvalidArgumentError:qAt,ConnectTimeoutError:HAt}=tA(),qT,HT;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?HT=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(A=>{if(this._sessionCache.size<this._maxCachedSessions)return;let r=this._sessionCache.get(A);r!==void 0&&r.deref()===void 0&&this._sessionCache.delete(A)})}get(e){let A=this._sessionCache.get(e);return A?A.deref():null}set(e,A){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(A)),this._sessionRegistry.register(A,e))}}:HT=class{static{a(this,"SimpleSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,A){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:r}=this._sessionCache.keys().next();this._sessionCache.delete(r)}this._sessionCache.set(e,A)}}};function YAt({allowH2:t,maxC
Line truncated
|
||||
`,this[Wge]=c??3e5,this[Vge]=i??3e5,this[FB]=b??!0,this[frt]=C,this[LB]=N,this[Rd]=null,this[jge]=w>-1?w:-1,this[Yo]="h1",this[gs]=null,this[xR]=v?{openStreams:0,maxConcurrentStreams:x??100}:null,this[Xge]=`${this[ai].hostname}${this[ai].port?`:${this[ai].port}`:""}`,this[dA]=[],this[uA]=0,this[ps]=0}get pipelining(){return this[Sd]}set pipelining(e){this[Sd]=e,hs(this,!0)}get[pp](){return this[dA].length-this[ps]}get[RA](){return this[ps]-this[uA]}get[up](){return this[dA].length-this[uA]}get[Crt](){return!!this[VA]&&!this[mm]&&!this[VA].destroyed}get[XT](){let e=this[VA];return e&&(e[Gi]||e[tl]||e[fm])||this[up]>=(this[Sd]||1)||this[pp]>0}[mrt](e){ehe(this),this.once("connect",e)}[Irt](e,A){let r=e.origin||this[ai].origin,i=this[Yo]==="h2"?jT[wrt](r,e,A):jT[Nrt](r,e,A);return this[dA].push(i),this[dp]||(me.bodyLength(i.body)==null&&me.isIterable(i.body)?(this[dp]=1,process.nextTick(hs,this)):hs(this,!0)),this[dp]&&this[Dd]!==2&&this[XT]&&(this[Dd]=2),this[Dd]<2}async[Qrt](){return new Promise(e=>{this[up]?this[Rd]=e:e(null)})}async[Brt](e){return new Promise(A=>{let r=this[dA].splice(this[ps]);for(let n=0;n<r.length;n++){let s=r[n];ci(this,s,e)}let i=a(()=>{this[Rd]&&(this[Rd](),this[Rd]=null),A()},"callback");this[gs]!=null&&(me.destroy(this[gs],e),this[gs]=null,this[xR]=null),this[VA]?me.destroy(this[VA].on("close",i),e):queueMicrotask(i),hs(this)})}};function Lrt(t){Ae(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[VA][oi]=t,LR(this[Ho],t)}a(Lrt,"onHttp2SessionError");function Urt(t,e,A){let r=new qo(`HTTP/2: "frameError" received - type ${t}, code ${e}`);A===0&&(this[VA][oi]=r,LR(this[Ho],r))}a(Urt,"onHttp2FrameError");function Trt(){me.destroy(this,new Cm("other side closed")),me.destroy(this[VA],new Cm("other side closed"))}a(Trt,"onHttp2SessionEnd");function Mrt(t){let e=this[Ho],A=new qo(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[VA]=null,e[gs]=null,e.destroyed){Ae(this[pp]===0);let r=e[dA].splice(e[uA]);for(let i=0;i<r.length;i++){let n=r[i];ci(this,n,A)}}else if(e[RA]>0){let r=e[dA][e[uA]];e[dA][e[uA]++]=null,ci(e,r,A)}e[ps]=e[uA],Ae(e[RA]===0),e.emit("disconnect",e[ai],[e],A),hs(e)}a(Mrt,"onHTTP2GoAway");var _o=kge(),_rt=bR(),Ort=Buffer.alloc(0);async function Prt(){let t=process.env.JEST_WORKER_ID?VT():void 0,e;try{e=await WebAssembly.compile(Buffer.from(Oge(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||VT(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(A,r,i)=>0,wasm_on_status:(A,r,i)=>{Ae.strictEqual(yr.ptr,A);let n=r-Po+Oo.byteOffset;return yr.onStatus(new NR(Oo.buffer,n,i))||0},wasm_on_message_begin:A=>(Ae.strictEqual(yr.ptr,A),yr.onMessageBegin()||0),wasm_on_header_field:(A,r,i)=>{Ae.strictEqual(yr.ptr,A);let n=r-Po+Oo.byteOffset;return yr.onHeaderField(new NR(Oo.buffer,n,i))||0},wasm_on_header_value:(A,r,i)=>{Ae.strictEqual(yr.ptr,A);let n=r-Po+Oo.byteOffset;return yr.onHeaderValue(new NR(Oo.buffer,n,i))||0},wasm_on_headers_complete:(A,r,i,n)=>(Ae.strictEqual(yr.ptr,A),yr.onHeadersComplete(r,!!i,!!n)||0),wasm_on_body:(A,r,i)=>{Ae.strictEqual(yr.ptr,A);let n=r-Po+Oo.byteOffset;return yr.onBody(new NR(Oo.buffer,n,i))||0},wasm_on_message_complete:A=>(Ae.strictEqual(yr.ptr,A),yr.onMessageComplete()||0)}})}a(Prt,"lazyllhttp");var zT=null,$T=Prt();$T.catch();var yr=null,Oo=null,RR=0,Po=null,Qm=1,SR=2,e7=3,t7=class{static{a(this,"Parser")}constructor(e,A,{exports:r}){Ae(Number.isFinite(e[DR])&&e[DR]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(_o.TYPE.RESPONSE),this.client=e,this.socket=A,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[DR],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[jge]}setTimeout(e,A){this.timeoutType=A,e!==this.timeoutValue?(WT.clearTimeout(this.timeout),e?(this.timeout=WT.setTimeout(qrt,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(Ae(this.ptr!=null),Ae(yr==null),this.llhttp.llhttp_resume(this.ptr),Ae(this.timeoutType===SR),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||Ort),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){Ae(this.ptr!=null),Ae(yr==null),Ae(!this.paused);let{socket:A,llhttp:r}=this;e.length>RR&&(Po&&r.free(Po),RR=Math.ceil(e.length/4096)*4096,Po=r.malloc(RR)),new Uint8Array(r.memory.buffer,Po,RR).set(e);try{let i;try{Oo=e,yr=this,i=r.llhttp_execute(this.ptr,Po,e.length)}catch(s){throw s}finally{yr=null,Oo=null}let n=r.llhttp_get_error_pos(this.ptr)-Po;if(i===_o.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(n));else if(i===_o.ERROR.PAUSED)this.paused=!0,A.unshift(e.sli
Line truncated
|
||||
`);us.validateHandler(m,r,l),this.servername=us.getServerName(this.host),this[Kc]=m,dr.create.hasSubscribers&&dr.create.publish({request:this})}onBodySent(e){if(this[Kc].onBodySent)try{this[Kc].onBodySent(e)}catch(A){this.onError(A)}}onRequestSent(){dr.bodySent.hasSubscribers&&dr.bodySent.publish({request:this})}onConnect(e){return Zc(!this.aborted),Zc(!this.completed),this[Kc].onConnect(e)}onHeaders(e,A,r,i){return Zc(!this.aborted),Zc(!this.completed),dr.headers.hasSubscribers&&dr.headers.publish({request:this,response:{statusCode:e,headers:A,statusText:i}}),this[Kc].onHeaders(e,A,r,i)}onData(e){return Zc(!this.aborted),Zc(!this.completed),this[Kc].onData(e)}onUpgrade(e,A,r){return Zc(!this.aborted),Zc(!this.completed),this[Kc].onUpgrade(e,A,r)}onComplete(e){return Zc(!this.aborted),this.completed=!0,dr.trailers.hasSubscribers&&dr.trailers.publish({request:this,trailers:e}),this[Kc].onComplete(e)}onError(e){if(dr.error.hasSubscribers&&dr.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Kc].onError(e)}addHeader(e,A){return RB(this,e,A),this}static[WAt](e,A,r){return new t(e,A,r)}static[JAt](e,A,r){let i=A.headers;A={...A,headers:null};let n=new t(e,A,r);if(n.headers={},Array.isArray(i)){if(i.length%2!==0)throw new AA("headers array must be even");for(let s=0;s<i.length;s+=2)RB(n,i[s],i[s+1],!0)}else if(i&&typeof i=="object"){let s=Object.keys(i);for(let o=0;o<s.length;o++){let c=s[o];RB(n,c,i[c],!0)}}else if(i!=null)throw new AA("headers must be an object or an array");return n}static[VAt](e){let A=e.split(`\r
|
||||
`),r={};for(let i of A){let[n,s]=i.split(": ");s==null||s.length===0||(r[n]?r[n]+=`,${s}`:r[n]=s)}return r}};function lp(t,e,A){if(e&&typeof e=="object")throw new AA(`invalid ${t} header`);if(e=e!=null?`${e}`:"",Dge.exec(e)!==null)throw new AA(`invalid ${t} header`);return A?e:`${t}: ${e}\r
|
||||
`}a(lp,"processHeaderValue");function RB(t,e,A,r=!1){if(A&&typeof A=="object"&&!Array.isArray(A))throw new AA(`invalid ${e} header`);if(A===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(Dge.exec(A)!==null)throw new AA(`invalid ${e} header`);t.host=A}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(A,10),!Number.isFinite(t.contentLength))throw new AA("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=A,r?t.headers[e]=lp(e,A,r):t.headers+=lp(e,A);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new AA("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof A=="string"?A.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new AA("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new AA("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new AA("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new GAt("expect header not supported");if(Rge.exec(e)===null)throw new AA("invalid header key");if(Array.isArray(A))for(let i=0;i<A.length;i++)r?t.headers[e]?t.headers[e]+=`,${lp(e,A[i],r)}`:t.headers[e]=lp(e,A[i],r):t.headers+=lp(e,A[i]);else r?t.headers[e]=lp(e,A,r):t.headers+=lp(e,A)}}}a(RB,"processHeader");Sge.exports=qT});var bR=E((lDt,vge)=>{"use strict";var jAt=require("events"),HT=class extends jAt{static{a(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};vge.exports=HT});var SB=E((uDt,kge)=>{"use strict";var XAt=bR(),{ClientDestroyedError:YT,ClientClosedError:ZAt,InvalidArgumentError:pm}=tA(),{kDestroy:KAt,kClose:$At,kDispatch:GT,kInterceptors:dp}=BA(),gm=Symbol("destroyed"),DB=Symbol("closed"),$c=Symbol("onDestroyed"),hm=Symbol("onClosed"),NR=Symbol("Intercepted Dispatch"),JT=class extends XAt{static{a(this,"DispatcherBase")}constructor(){super(),this[gm]=!1,this[$c]=null,this[DB]=!1,this[hm]=[]}get destroyed(){return this[gm]}get closed(){return this[DB]}get interceptors(){return this[dp]}set interceptors(e){if(e){for(let A=e.length-1;A>=0;A--)if(typeof this[dp][A]!="function")throw new pm("interceptor must be an function")}this[dp]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((n,s)=>n?i(n):r(s))});if(typeof e!="function")throw new pm("invalid callback");if(this[gm]){queueMicrotask(()=>e(new YT,null));return}if(this[DB]){this[hm]?this[hm].push(e):queueMicrotask(()=>e(null,null));return}this[DB]=!0,this[hm].push(e);let A=a(()=>{let r=this[hm];this[hm]=null;for(let i=0;i<r.length;i++)r[i](null,null)},"onClosed");this[$At]().then(()=>this.destroy()).then(()=>{queueMicrotask(A)})}destroy(e,A){if(typeof e=="function"&&(A=e,e=null),A===void 0)return new Promise((i,n)=>{this.destroy(e,(s,o)=>s?n(s):i(o))});if(typeof A!="function")throw new pm("invalid callback");if(this[gm]){this[$c]?this[$c].push(A):queueMicrotask(()=>A(null,null));return}e||(e=new YT),this[gm]=!0,this[$c]=this[$c]||[],this[$c].push(A);let r=a(()=>{let i=this[$c];this[$c]=null;for(let n=0;n<i.length;n++)i[n](null,null)},"onDestroyed");this[KAt](e).then(()=>{queueMicrotask(r)})}[NR](e,A){if(!this[dp]||this[dp].length===0)return this[NR]=this[GT],this[GT](e,A);let r=this[GT].bind(this);for(let i=this[dp].length-1;i>=0;i--)r=this[dp][i](r);return this[NR]=r,r(e,A)}dispatch(e,A){if(!A||typeof A!="object")throw new pm("handler must be an object");try{if(!e||typeof e!="object")throw new pm("opts must be an object.");if(this[gm]||this[$c])throw new YT;if(this[DB])throw new ZAt;return this[NR](e,A)}catch(r){if(typeof A.onError!="function")throw new pm("invalid onError method");return A.onError(r),!1}}};kge.exports=JT});var xB=E((EDt,Uge)=>{"use strict";var ert=require("net"),Fge=require("assert"),Lge=gt(),{InvalidArgumentError:trt,ConnectTimeoutError:Art}=tA(),VT,WT;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?WT=class{static{a(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(A=>{if(this._sessionCache.size<this._maxCachedSessions)return;let r=this._sessionCache.get(A);r!==void 0&&r.deref()===void 0&&this._sessionCache.delete(A)})}get(e){let A=this._sessionCache.get(e);return A?A.deref():null}set(e,A){this._maxCachedSessions!==0&&(this._sessionCache.set(e,new WeakRef(A)),this._sessionRegistry.register(A,e))}}:WT=class{static{a(this,"SimpleSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map}get(e){return this._sessionCache.get(e)}set(e,A){if(this._maxCachedSessions!==0){if(this._sessionCache.size>=this._maxCachedSessions){let{value:r}=this._sessionCache.keys().next();this._sessionCache.delete(r)}this._sessionCache.set(e,A)}}};function rrt({allowH2:t,maxC
Line truncated
|
||||
`,this[Kge]=c??3e5,this[Zge]=i??3e5,this[TB]=b??!0,this[Frt]=C,this[MB]=N,this[Rd]=null,this[ehe]=w>-1?w:-1,this[Yo]="h1",this[gs]=null,this[LR]=v?{openStreams:0,maxConcurrentStreams:x??100}:null,this[the]=`${this[oi].hostname}${this[oi].port?`:${this[oi].port}`:""}`,this[dA]=[],this[uA]=0,this[ps]=0}get pipelining(){return this[Sd]}set pipelining(e){this[Sd]=e,hs(this,!0)}get[gp](){return this[dA].length-this[ps]}get[RA](){return this[ps]-this[uA]}get[pp](){return this[dA].length-this[uA]}get[krt](){return!!this[VA]&&!this[Cm]&&!this[VA].destroyed}get[t7](){let e=this[VA];return e&&(e[Gi]||e[tl]||e[Qm])||this[pp]>=(this[Sd]||1)||this[gp]>0}[vrt](e){nhe(this),this.once("connect",e)}[Trt](e,A){let r=e.origin||this[oi].origin,i=this[Yo]==="h2"?e7[_rt](r,e,A):e7[Prt](r,e,A);return this[dA].push(i),this[up]||(me.bodyLength(i.body)==null&&me.isIterable(i.body)?(this[up]=1,process.nextTick(hs,this)):hs(this,!0)),this[up]&&this[Dd]!==2&&this[t7]&&(this[Dd]=2),this[Dd]<2}async[Lrt](){return new Promise(e=>{this[pp]?this[Rd]=e:e(null)})}async[Urt](e){return new Promise(A=>{let r=this[dA].splice(this[ps]);for(let n=0;n<r.length;n++){let s=r[n];li(this,s,e)}let i=a(()=>{this[Rd]&&(this[Rd](),this[Rd]=null),A()},"callback");this[gs]!=null&&(me.destroy(this[gs],e),this[gs]=null,this[LR]=null),this[VA]?me.destroy(this[VA].on("close",i),e):queueMicrotask(i),hs(this)})}};function zrt(t){Ae(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[VA][ci]=t,_R(this[Ho],t)}a(zrt,"onHttp2SessionError");function jrt(t,e,A){let r=new qo(`HTTP/2: "frameError" received - type ${t}, code ${e}`);A===0&&(this[VA][ci]=r,_R(this[Ho],r))}a(jrt,"onHttp2FrameError");function Xrt(){me.destroy(this,new fm("other side closed")),me.destroy(this[VA],new fm("other side closed"))}a(Xrt,"onHttp2SessionEnd");function Zrt(t){let e=this[Ho],A=new qo(`HTTP/2: "GOAWAY" frame received with code ${t}`);if(e[VA]=null,e[gs]=null,e.destroyed){Ae(this[gp]===0);let r=e[dA].splice(e[uA]);for(let i=0;i<r.length;i++){let n=r[i];li(this,n,A)}}else if(e[RA]>0){let r=e[dA][e[uA]];e[dA][e[uA]++]=null,li(e,r,A)}e[ps]=e[uA],Ae(e[RA]===0),e.emit("disconnect",e[oi],[e],A),hs(e)}a(Zrt,"onHTTP2GoAway");var _o=Mge(),Krt=SR(),$rt=Buffer.alloc(0);async function eit(){let t=process.env.JEST_WORKER_ID?ZT():void 0,e;try{e=await WebAssembly.compile(Buffer.from(Gge(),"base64"))}catch{e=await WebAssembly.compile(Buffer.from(t||ZT(),"base64"))}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(A,r,i)=>0,wasm_on_status:(A,r,i)=>{Ae.strictEqual(yr.ptr,A);let n=r-Po+Oo.byteOffset;return yr.onStatus(new xR(Oo.buffer,n,i))||0},wasm_on_message_begin:A=>(Ae.strictEqual(yr.ptr,A),yr.onMessageBegin()||0),wasm_on_header_field:(A,r,i)=>{Ae.strictEqual(yr.ptr,A);let n=r-Po+Oo.byteOffset;return yr.onHeaderField(new xR(Oo.buffer,n,i))||0},wasm_on_header_value:(A,r,i)=>{Ae.strictEqual(yr.ptr,A);let n=r-Po+Oo.byteOffset;return yr.onHeaderValue(new xR(Oo.buffer,n,i))||0},wasm_on_headers_complete:(A,r,i,n)=>(Ae.strictEqual(yr.ptr,A),yr.onHeadersComplete(r,!!i,!!n)||0),wasm_on_body:(A,r,i)=>{Ae.strictEqual(yr.ptr,A);let n=r-Po+Oo.byteOffset;return yr.onBody(new xR(Oo.buffer,n,i))||0},wasm_on_message_complete:A=>(Ae.strictEqual(yr.ptr,A),yr.onMessageComplete()||0)}})}a(eit,"lazyllhttp");var $T=null,i7=eit();i7.catch();var yr=null,Oo=null,vR=0,Po=null,Bm=1,FR=2,n7=3,s7=class{static{a(this,"Parser")}constructor(e,A,{exports:r}){Ae(Number.isFinite(e[kR])&&e[kR]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(_o.TYPE.RESPONSE),this.client=e,this.socket=A,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[kR],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[ehe]}setTimeout(e,A){this.timeoutType=A,e!==this.timeoutValue?(KT.clearTimeout(this.timeout),e?(this.timeout=KT.setTimeout(tit,e,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(Ae(this.ptr!=null),Ae(yr==null),this.llhttp.llhttp_resume(this.ptr),Ae(this.timeoutType===FR),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||$rt),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){Ae(this.ptr!=null),Ae(yr==null),Ae(!this.paused);let{socket:A,llhttp:r}=this;e.length>vR&&(Po&&r.free(Po),vR=Math.ceil(e.length/4096)*4096,Po=r.malloc(vR)),new Uint8Array(r.memory.buffer,Po,vR).set(e);try{let i;try{Oo=e,yr=this,i=r.llhttp_execute(this.ptr,Po,e.length)}catch(s){throw s}finally{yr=null,Oo=null}let n=r.llhttp_get_error_pos(this.ptr)-Po;if(i===_o.ERROR.PAUSED_UPGRADE)this.onUpgrade(e.slice(n));else if(i===_o.ERROR.PAUSED)this.paused=!0,A.unshift(e.sli
Line truncated
|
||||
`;return typeof n=="string"?g+=`host: ${n}\r
|
||||
`:g+=t[Yge],s?g+=`connection: upgrade\r
|
||||
`:g+=t[zge],s?g+=`connection: upgrade\r
|
||||
upgrade: ${s}\r
|
||||
`:t[Sd]&&!p[Gi]?g+=`connection: keep-alive\r
|
||||
`:g+=`connection: close\r
|
||||
`,o&&(g+=o),bi.sendHeaders.hasSubscribers&&bi.sendHeaders.publish({request:e,headers:g,socket:p}),A?me.isBuffer(A)?(Ae(u===A.byteLength,"buffer body must have content length"),p.cork(),p.write(`${g}content-length: ${u}\r
|
||||
\r
|
||||
`,"latin1"),p.write(A),p.uncork(),e.onBodySent(A),e.onRequestSent(),d||(p[Gi]=!0)):me.isBlobLike(A)?typeof A.stream=="function"?kR({body:A.stream(),client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):Ahe({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):me.isStream(A)?the({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):me.isIterable(A)?kR({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):Ae(!1):(u===0?p.write(`${g}content-length: 0\r
|
||||
`,"latin1"),p.write(A),p.uncork(),e.onBodySent(A),e.onRequestSent(),d||(p[Gi]=!0)):me.isBlobLike(A)?typeof A.stream=="function"?TR({body:A.stream(),client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):ahe({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):me.isStream(A)?she({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):me.isIterable(A)?TR({body:A,client:t,request:e,socket:p,contentLength:u,header:g,expectsPayload:d}):Ae(!1):(u===0?p.write(`${g}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(Ae(u===null,"no body must not have content length"),p.write(`${g}\r
|
||||
`,"latin1")),e.onRequestSent()),!0}a(Yrt,"write");function Grt(t,e,A){let{body:r,method:i,path:n,host:s,upgrade:o,expectContinue:c,signal:l,headers:d}=A,u;if(typeof d=="string"?u=jT[brt](d.trim()):u=d,o)return ci(t,A,new Error("Upgrade not supported for H2")),!1;try{A.onConnect(b=>{A.aborted||A.completed||ci(t,A,b||new r7)})}catch(b){ci(t,A,b)}if(A.aborted)return!1;let p,g=t[xR];if(u[Rrt]=s||t[Xge],u[Drt]=i,i==="CONNECT")return e.ref(),p=e.request(u,{endStream:!1,signal:l}),p.id&&!p.pending?(A.onUpgrade(null,null,p),++g.openStreams):p.once("ready",()=>{A.onUpgrade(null,null,p),++g.openStreams}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),!0;u[Srt]=n,u[xrt]="https";let h=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let m=me.bodyLength(r);if(m==null&&(m=A.contentLength),(m===0||!h)&&(m=null),A.contentLength!=null&&A.contentLength!==m){if(t[FB])return ci(t,A,new el),!1;process.emitWarning(new el)}m!=null&&(Ae(r,"no body must not have content length"),u[vrt]=`${m}`),e.ref();let f=i==="GET"||i==="HEAD";return c?(u[krt]="100-continue",p=e.request(u,{endStream:f,signal:l}),p.once("continue",B)):(p=e.request(u,{endStream:f,signal:l}),B()),++g.openStreams,p.once("response",b=>{A.onHeaders(Number(b[Frt]),b,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{A.onComplete([])}),p.on("data",b=>{A.onData(b)===!1&&p.pause()}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),p.once("error",function(b){t[gs]&&!t[gs].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,me.destroy(p,b))}),p.once("frameError",(b,I)=>{let C=new qo(`HTTP/2: "frameError" received - type ${b}, code ${I}`);ci(t,A,C),t[gs]&&!t[gs].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,me.destroy(p,C))}),!0;function B(){r?me.isBuffer(r)?(Ae(m===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),A.onBodySent(r),A.onRequestSent()):me.isBlobLike(r)?typeof r.stream=="function"?kR({client:t,request:A,contentLength:m,h2stream:p,expectsPayload:h,body:r.stream(),socket:t[VA],header:""}):Ahe({body:r,client:t,request:A,contentLength:m,expectsPayload:h,h2stream:p,header:"",socket:t[VA]}):me.isStream(r)?the({body:r,client:t,request:A,contentLength:m,expectsPayload:h,socket:t[VA],h2stream:p,header:""}):me.isIterable(r)?kR({body:r,client:t,request:A,contentLength:m,expectsPayload:h,header:"",h2stream:p,socket:t[VA]}):Ae(!1):A.onRequestSent()}a(B,"writeBodyH2")}a(Grt,"writeH2");function the({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){if(Ae(n!==0||A[RA]===0,"stream body cannot be pipelined"),A[Yo]==="h2"){let m=function(f){r.onBodySent(f)};a(m,"onPipeData");let h=art(e,t,f=>{f?(me.destroy(e,f),me.destroy(t,f)):r.onRequestSent()});h.on("data",m),h.once("end",()=>{h.removeListener("data",m),me.destroy(h)});return}let c=!1,l=new FR({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s}),d=a(function(h){if(!c)try{!l.write(h)&&this.pause&&this.pause()}catch(m){me.destroy(this,m)}},"onData"),u=a(function(){c||e.resume&&e.resume()},"onDrain"),p=a(function(){g(new r7)},"onAbort"),g=a(function(h){if(!c){if(c=!0,Ae(i.destroyed||i[tl]&&A[RA]<=1),i.off("drain",u).off("error",g),e.removeListener("data",d).removeListener("end",g).removeListener("error",g).removeListener("close",p),!h)try{l.end()}catch(m){h=m}l.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?me.destroy(e,h):me.destroy(e)}},"onFinished");e.on("data",d).on("end",g).on("error",g).on("close",p),e.resume&&e.resume(),i.on("drain",u).on("error",g)}a(the,"writeStream");async function Ahe({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){Ae(n===e.size,"blob body must have content length");let c=A[Yo]==="h2";try{if(n!=null&&n!==e.size)throw new el;let l=Buffer.from(await e.arrayBuffer());c?(t.cork(),t.write(l),t.uncork()):(i.cork(),i.write(`${s}content-length: ${n}\r
|
||||
`,"latin1")),e.onRequestSent()),!0}a(rit,"write");function iit(t,e,A){let{body:r,method:i,path:n,host:s,upgrade:o,expectContinue:c,signal:l,headers:d}=A,u;if(typeof d=="string"?u=e7[Ort](d.trim()):u=d,o)return li(t,A,new Error("Upgrade not supported for H2")),!1;try{A.onConnect(b=>{A.aborted||A.completed||li(t,A,b||new o7)})}catch(b){li(t,A,b)}if(A.aborted)return!1;let p,g=t[LR];if(u[qrt]=s||t[the],u[Hrt]=i,i==="CONNECT")return e.ref(),p=e.request(u,{endStream:!1,signal:l}),p.id&&!p.pending?(A.onUpgrade(null,null,p),++g.openStreams):p.once("ready",()=>{A.onUpgrade(null,null,p),++g.openStreams}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),!0;u[Yrt]=n,u[Grt]="https";let h=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let m=me.bodyLength(r);if(m==null&&(m=A.contentLength),(m===0||!h)&&(m=null),A.contentLength!=null&&A.contentLength!==m){if(t[TB])return li(t,A,new el),!1;process.emitWarning(new el)}m!=null&&(Ae(r,"no body must not have content length"),u[Jrt]=`${m}`),e.ref();let f=i==="GET"||i==="HEAD";return c?(u[Vrt]="100-continue",p=e.request(u,{endStream:f,signal:l}),p.once("continue",B)):(p=e.request(u,{endStream:f,signal:l}),B()),++g.openStreams,p.once("response",b=>{A.onHeaders(Number(b[Wrt]),b,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{A.onComplete([])}),p.on("data",b=>{A.onData(b)===!1&&p.pause()}),p.once("close",()=>{g.openStreams-=1,g.openStreams===0&&e.unref()}),p.once("error",function(b){t[gs]&&!t[gs].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,me.destroy(p,b))}),p.once("frameError",(b,I)=>{let C=new qo(`HTTP/2: "frameError" received - type ${b}, code ${I}`);li(t,A,C),t[gs]&&!t[gs].destroyed&&!this.closed&&!this.destroyed&&(g.streams-=1,me.destroy(p,C))}),!0;function B(){r?me.isBuffer(r)?(Ae(m===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),A.onBodySent(r),A.onRequestSent()):me.isBlobLike(r)?typeof r.stream=="function"?TR({client:t,request:A,contentLength:m,h2stream:p,expectsPayload:h,body:r.stream(),socket:t[VA],header:""}):ahe({body:r,client:t,request:A,contentLength:m,expectsPayload:h,h2stream:p,header:"",socket:t[VA]}):me.isStream(r)?she({body:r,client:t,request:A,contentLength:m,expectsPayload:h,socket:t[VA],h2stream:p,header:""}):me.isIterable(r)?TR({body:r,client:t,request:A,contentLength:m,expectsPayload:h,header:"",h2stream:p,socket:t[VA]}):Ae(!1):A.onRequestSent()}a(B,"writeBodyH2")}a(iit,"writeH2");function she({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){if(Ae(n!==0||A[RA]===0,"stream body cannot be pipelined"),A[Yo]==="h2"){let m=function(f){r.onBodySent(f)};a(m,"onPipeData");let h=Brt(e,t,f=>{f?(me.destroy(e,f),me.destroy(t,f)):r.onRequestSent()});h.on("data",m),h.once("end",()=>{h.removeListener("data",m),me.destroy(h)});return}let c=!1,l=new MR({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s}),d=a(function(h){if(!c)try{!l.write(h)&&this.pause&&this.pause()}catch(m){me.destroy(this,m)}},"onData"),u=a(function(){c||e.resume&&e.resume()},"onDrain"),p=a(function(){g(new o7)},"onAbort"),g=a(function(h){if(!c){if(c=!0,Ae(i.destroyed||i[tl]&&A[RA]<=1),i.off("drain",u).off("error",g),e.removeListener("data",d).removeListener("end",g).removeListener("error",g).removeListener("close",p),!h)try{l.end()}catch(m){h=m}l.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?me.destroy(e,h):me.destroy(e)}},"onFinished");e.on("data",d).on("end",g).on("error",g).on("close",p),e.resume&&e.resume(),i.on("drain",u).on("error",g)}a(she,"writeStream");async function ahe({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){Ae(n===e.size,"blob body must have content length");let c=A[Yo]==="h2";try{if(n!=null&&n!==e.size)throw new el;let l=Buffer.from(await e.arrayBuffer());c?(t.cork(),t.write(l),t.uncork()):(i.cork(),i.write(`${s}content-length: ${n}\r
|
||||
\r
|
||||
`,"latin1"),i.write(l),i.uncork()),r.onBodySent(l),r.onRequestSent(),o||(i[Gi]=!0),hs(A)}catch(l){me.destroy(c?t:i,l)}}a(Ahe,"writeBlob");async function kR({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){Ae(n!==0||A[RA]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let p=c;c=null,p()}}a(l,"onDrain");let d=a(()=>new Promise((p,g)=>{Ae(c===null),i[oi]?g(i[oi]):c=p}),"waitForDrain");if(A[Yo]==="h2"){t.on("close",l).on("drain",l);try{for await(let p of e){if(i[oi])throw i[oi];let g=t.write(p);r.onBodySent(p),g||await d()}}catch(p){t.destroy(p)}finally{r.onRequestSent(),t.end(),t.off("close",l).off("drain",l)}return}i.on("close",l).on("drain",l);let u=new FR({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s});try{for await(let p of e){if(i[oi])throw i[oi];u.write(p)||await d()}u.end()}catch(p){u.destroy(p)}finally{i.off("close",l).off("drain",l)}}a(kR,"writeIterable");var FR=class{static{a(this,"AsyncWriter")}constructor({socket:e,request:A,contentLength:r,client:i,expectsPayload:n,header:s}){this.socket=e,this.request=A,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=n,this.header=s,e[tl]=!0}write(e){let{socket:A,request:r,contentLength:i,client:n,bytesWritten:s,expectsPayload:o,header:c}=this;if(A[oi])throw A[oi];if(A.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(i!==null&&s+l>i){if(n[FB])throw new el;process.emitWarning(new el)}A.cork(),s===0&&(o||(A[Gi]=!0),i===null?A.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"),i.write(l),i.uncork()),r.onBodySent(l),r.onRequestSent(),o||(i[Gi]=!0),hs(A)}catch(l){me.destroy(c?t:i,l)}}a(ahe,"writeBlob");async function TR({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:n,header:s,expectsPayload:o}){Ae(n!==0||A[RA]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let p=c;c=null,p()}}a(l,"onDrain");let d=a(()=>new Promise((p,g)=>{Ae(c===null),i[ci]?g(i[ci]):c=p}),"waitForDrain");if(A[Yo]==="h2"){t.on("close",l).on("drain",l);try{for await(let p of e){if(i[ci])throw i[ci];let g=t.write(p);r.onBodySent(p),g||await d()}}catch(p){t.destroy(p)}finally{r.onRequestSent(),t.end(),t.off("close",l).off("drain",l)}return}i.on("close",l).on("drain",l);let u=new MR({socket:i,request:r,contentLength:n,client:A,expectsPayload:o,header:s});try{for await(let p of e){if(i[ci])throw i[ci];u.write(p)||await d()}u.end()}catch(p){u.destroy(p)}finally{i.off("close",l).off("drain",l)}}a(TR,"writeIterable");var MR=class{static{a(this,"AsyncWriter")}constructor({socket:e,request:A,contentLength:r,client:i,expectsPayload:n,header:s}){this.socket=e,this.request=A,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=n,this.header=s,e[tl]=!0}write(e){let{socket:A,request:r,contentLength:i,client:n,bytesWritten:s,expectsPayload:o,header:c}=this;if(A[ci])throw A[ci];if(A.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(i!==null&&s+l>i){if(n[TB])throw new el;process.emitWarning(new el)}A.cork(),s===0&&(o||(A[Gi]=!0),i===null?A.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"):A.write(`${c}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1")),i===null&&A.write(`\r
|
||||
${l.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=l;let d=A.write(e);return A.uncork(),r.onBodySent(e),d||A[JA].timeout&&A[JA].timeoutType===Qm&&A[JA].timeout.refresh&&A[JA].timeout.refresh(),d}end(){let{socket:e,contentLength:A,client:r,bytesWritten:i,expectsPayload:n,header:s,request:o}=this;if(o.onRequestSent(),e[tl]=!1,e[oi])throw e[oi];if(!e.destroyed){if(i===0?n?e.write(`${s}content-length: 0\r
|
||||
`,"latin1"),this.bytesWritten+=l;let d=A.write(e);return A.uncork(),r.onBodySent(e),d||A[JA].timeout&&A[JA].timeoutType===Bm&&A[JA].timeout.refresh&&A[JA].timeout.refresh(),d}end(){let{socket:e,contentLength:A,client:r,bytesWritten:i,expectsPayload:n,header:s,request:o}=this;if(o.onRequestSent(),e[tl]=!1,e[ci])throw e[ci];if(!e.destroyed){if(i===0?n?e.write(`${s}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${s}\r
|
||||
`,"latin1"):A===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),A!==null&&i!==A){if(r[FB])throw new el;process.emitWarning(new el)}e[JA].timeout&&e[JA].timeoutType===Qm&&e[JA].timeout.refresh&&e[JA].timeout.refresh(),hs(r)}}destroy(e){let{socket:A,client:r}=this;A[tl]=!1,e&&(Ae(r[RA]<=1,"pipeline should only contain this request"),me.destroy(A,e))}};function ci(t,e,A){try{e.onError(A),Ae(e.aborted)}catch(r){t.emit("error",r)}}a(ci,"errorRequest");rhe.exports=KT});var nhe=E((pDt,ihe)=>{"use strict";var UR=class{static{a(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)}};ihe.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new UR}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new UR),this.head.push(e)}shift(){let e=this.tail,A=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),A}}});var ahe=E((hDt,she)=>{var{kFree:Jrt,kConnected:Vrt,kPending:Wrt,kQueued:zrt,kRunning:jrt,kSize:Xrt}=BA(),gp=Symbol("pool"),i7=class{static{a(this,"PoolStats")}constructor(e){this[gp]=e}get connected(){return this[gp][Vrt]}get free(){return this[gp][Jrt]}get pending(){return this[gp][Wrt]}get queued(){return this[gp][zrt]}get running(){return this[gp][jrt]}get size(){return this[gp][Xrt]}};she.exports=i7});var l7=E((mDt,mhe)=>{"use strict";var Zrt=NB(),Krt=nhe(),{kConnected:n7,kSize:ohe,kRunning:che,kPending:lhe,kQueued:TB,kBusy:$rt,kFree:eit,kUrl:tit,kClose:Ait,kDestroy:rit,kDispatch:iit}=BA(),nit=ahe(),Nn=Symbol("clients"),Ji=Symbol("needDrain"),MB=Symbol("queue"),s7=Symbol("closed resolve"),a7=Symbol("onDrain"),dhe=Symbol("onConnect"),uhe=Symbol("onDisconnect"),phe=Symbol("onConnectionError"),o7=Symbol("get dispatcher"),hhe=Symbol("add client"),Ehe=Symbol("remove client"),ghe=Symbol("stats"),c7=class extends Zrt{static{a(this,"PoolBase")}constructor(){super(),this[MB]=new Krt,this[Nn]=[],this[TB]=0;let e=this;this[a7]=a(function(r,i){let n=e[MB],s=!1;for(;!s;){let o=n.shift();if(!o)break;e[TB]--,s=!this.dispatch(o.opts,o.handler)}this[Ji]=s,!this[Ji]&&e[Ji]&&(e[Ji]=!1,e.emit("drain",r,[e,...i])),e[s7]&&n.isEmpty()&&Promise.all(e[Nn].map(o=>o.close())).then(e[s7])},"onDrain"),this[dhe]=(A,r)=>{e.emit("connect",A,[e,...r])},this[uhe]=(A,r,i)=>{e.emit("disconnect",A,[e,...r],i)},this[phe]=(A,r,i)=>{e.emit("connectionError",A,[e,...r],i)},this[ghe]=new nit(this)}get[$rt](){return this[Ji]}get[n7](){return this[Nn].filter(e=>e[n7]).length}get[eit](){return this[Nn].filter(e=>e[n7]&&!e[Ji]).length}get[lhe](){let e=this[TB];for(let{[lhe]:A}of this[Nn])e+=A;return e}get[che](){let e=0;for(let{[che]:A}of this[Nn])e+=A;return e}get[ohe](){let e=this[TB];for(let{[ohe]:A}of this[Nn])e+=A;return e}get stats(){return this[ghe]}async[Ait](){return this[MB].isEmpty()?Promise.all(this[Nn].map(e=>e.close())):new Promise(e=>{this[s7]=e})}async[rit](e){for(;;){let A=this[MB].shift();if(!A)break;A.handler.onError(e)}return Promise.all(this[Nn].map(A=>A.destroy(e)))}[iit](e,A){let r=this[o7]();return r?r.dispatch(e,A)||(r[Ji]=!0,this[Ji]=!this[o7]()):(this[Ji]=!0,this[MB].push({opts:e,handler:A}),this[TB]++),!this[Ji]}[hhe](e){return e.on("drain",this[a7]).on("connect",this[dhe]).on("disconnect",this[uhe]).on("connectionError",this[phe]),this[Nn].push(e),this[Ji]&&process.nextTick(()=>{this[Ji]&&this[a7](e[tit],[this,e])}),this}[Ehe](e){e.close(()=>{let A=this[Nn].indexOf(e);A!==-1&&this[Nn].splice(A,1)}),this[Ji]=this[Nn].some(A=>!A[Ji]&&A.closed!==!0&&A.destroyed!==!0)}};mhe.exports={PoolBase:c7,kClients:Nn,kNeedDrain:Ji,kAddClient:hhe,kRemoveClient:Ehe,kGetDispatcher:o7}});var Bm=E((fDt,Bhe)=>{"use strict";var{PoolBase:sit,kClients:Che,kNeedDrain:ait,kAddClient:oit,kGetDispatcher:cit}=l7(),lit=UB(),{InvalidArgumentError:d7}=tA(),u7=gt(),{kUrl:fhe,kInterceptors:dit}=BA(),uit=RB(),p7=Symbol("options"),g7=Symbol("connections"),Qhe=Symbol("factory");function pit(t,e){return new lit(t,e)}a(pit,"defaultFactory");var h7=class extends sit{static{a(this,"Pool")}constructor(e,{connections:A,factory:r=pit,connect:i,connectTimeout:n,tls:s,maxCachedSessions:o,socketPath:c,autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d,allowH2:u,...p}={}){if(super(),A!=null&&(!Number.isFinite(A)||A<0))throw new d7("invalid connections");if(typeof r!="function")throw new d7("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new d7("connect must be a function or an object");typeof i!="function"&&(i=uit({...s,maxCachedSessions:o,allowH2:u,socketPath:c,timeout:n??1e4,...u7.nodeHasAutoSelectFamily&&l?{autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d}:void 0,...i})),this[dit]=p.interceptors&&p.interceptors.Pool&&Array.isArray(p.interceptors.Pool)?p.interceptors.Pool:[],this[g7]=A||null
Line truncated
|
||||
`,"latin1"),A!==null&&i!==A){if(r[TB])throw new el;process.emitWarning(new el)}e[JA].timeout&&e[JA].timeoutType===Bm&&e[JA].timeout.refresh&&e[JA].timeout.refresh(),hs(r)}}destroy(e){let{socket:A,client:r}=this;A[tl]=!1,e&&(Ae(r[RA]<=1,"pipeline should only contain this request"),me.destroy(A,e))}};function li(t,e,A){try{e.onError(A),Ae(e.aborted)}catch(r){t.emit("error",r)}}a(li,"errorRequest");ohe.exports=r7});var lhe=E((xDt,che)=>{"use strict";var OR=class{static{a(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)}};che.exports=class{static{a(this,"FixedQueue")}constructor(){this.head=this.tail=new OR}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new OR),this.head.push(e)}shift(){let e=this.tail,A=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),A}}});var uhe=E((kDt,dhe)=>{var{kFree:nit,kConnected:sit,kPending:ait,kQueued:oit,kRunning:cit,kSize:lit}=BA(),hp=Symbol("pool"),c7=class{static{a(this,"PoolStats")}constructor(e){this[hp]=e}get connected(){return this[hp][sit]}get free(){return this[hp][nit]}get pending(){return this[hp][ait]}get queued(){return this[hp][oit]}get running(){return this[hp][cit]}get size(){return this[hp][lit]}};dhe.exports=c7});var h7=E((LDt,Ihe)=>{"use strict";var dit=SB(),uit=lhe(),{kConnected:l7,kSize:phe,kRunning:ghe,kPending:hhe,kQueued:OB,kBusy:pit,kFree:git,kUrl:hit,kClose:Eit,kDestroy:mit,kDispatch:Cit}=BA(),fit=uhe(),Nn=Symbol("clients"),Ji=Symbol("needDrain"),PB=Symbol("queue"),d7=Symbol("closed resolve"),u7=Symbol("onDrain"),Ehe=Symbol("onConnect"),mhe=Symbol("onDisconnect"),Che=Symbol("onConnectionError"),p7=Symbol("get dispatcher"),Qhe=Symbol("add client"),Bhe=Symbol("remove client"),fhe=Symbol("stats"),g7=class extends dit{static{a(this,"PoolBase")}constructor(){super(),this[PB]=new uit,this[Nn]=[],this[OB]=0;let e=this;this[u7]=a(function(r,i){let n=e[PB],s=!1;for(;!s;){let o=n.shift();if(!o)break;e[OB]--,s=!this.dispatch(o.opts,o.handler)}this[Ji]=s,!this[Ji]&&e[Ji]&&(e[Ji]=!1,e.emit("drain",r,[e,...i])),e[d7]&&n.isEmpty()&&Promise.all(e[Nn].map(o=>o.close())).then(e[d7])},"onDrain"),this[Ehe]=(A,r)=>{e.emit("connect",A,[e,...r])},this[mhe]=(A,r,i)=>{e.emit("disconnect",A,[e,...r],i)},this[Che]=(A,r,i)=>{e.emit("connectionError",A,[e,...r],i)},this[fhe]=new fit(this)}get[pit](){return this[Ji]}get[l7](){return this[Nn].filter(e=>e[l7]).length}get[git](){return this[Nn].filter(e=>e[l7]&&!e[Ji]).length}get[hhe](){let e=this[OB];for(let{[hhe]:A}of this[Nn])e+=A;return e}get[ghe](){let e=0;for(let{[ghe]:A}of this[Nn])e+=A;return e}get[phe](){let e=this[OB];for(let{[phe]:A}of this[Nn])e+=A;return e}get stats(){return this[fhe]}async[Eit](){return this[PB].isEmpty()?Promise.all(this[Nn].map(e=>e.close())):new Promise(e=>{this[d7]=e})}async[mit](e){for(;;){let A=this[PB].shift();if(!A)break;A.handler.onError(e)}return Promise.all(this[Nn].map(A=>A.destroy(e)))}[Cit](e,A){let r=this[p7]();return r?r.dispatch(e,A)||(r[Ji]=!0,this[Ji]=!this[p7]()):(this[Ji]=!0,this[PB].push({opts:e,handler:A}),this[OB]++),!this[Ji]}[Qhe](e){return e.on("drain",this[u7]).on("connect",this[Ehe]).on("disconnect",this[mhe]).on("connectionError",this[Che]),this[Nn].push(e),this[Ji]&&process.nextTick(()=>{this[Ji]&&this[u7](e[hit],[this,e])}),this}[Bhe](e){e.close(()=>{let A=this[Nn].indexOf(e);A!==-1&&this[Nn].splice(A,1)}),this[Ji]=this[Nn].some(A=>!A[Ji]&&A.closed!==!0&&A.destroyed!==!0)}};Ihe.exports={PoolBase:g7,kClients:Nn,kNeedDrain:Ji,kAddClient:Qhe,kRemoveClient:Bhe,kGetDispatcher:p7}});var Im=E((TDt,Nhe)=>{"use strict";var{PoolBase:Qit,kClients:yhe,kNeedDrain:Bit,kAddClient:Iit,kGetDispatcher:yit}=h7(),wit=_B(),{InvalidArgumentError:E7}=tA(),m7=gt(),{kUrl:whe,kInterceptors:bit}=BA(),Nit=xB(),C7=Symbol("options"),f7=Symbol("connections"),bhe=Symbol("factory");function Rit(t,e){return new wit(t,e)}a(Rit,"defaultFactory");var Q7=class extends Qit{static{a(this,"Pool")}constructor(e,{connections:A,factory:r=Rit,connect:i,connectTimeout:n,tls:s,maxCachedSessions:o,socketPath:c,autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d,allowH2:u,...p}={}){if(super(),A!=null&&(!Number.isFinite(A)||A<0))throw new E7("invalid connections");if(typeof r!="function")throw new E7("factory must be a function.");if(i!=null&&typeof i!="function"&&typeof i!="object")throw new E7("connect must be a function or an object");typeof i!="function"&&(i=Nit({...s,maxCachedSessions:o,allowH2:u,socketPath:c,timeout:n??1e4,...m7.nodeHasAutoSelectFamily&&l?{autoSelectFamily:l,autoSelectFamilyAttemptTimeout:d}:void 0,...i})),this[bit]=p.interceptors&&p.interceptors.Pool&&Array.isArray(p.interceptors.Pool)?p.interceptors.Pool:[],this[f7]=A||null
Line truncated
|
||||
${r.count} ${r.noun} ${r.is} pending:
|
||||
|
||||
${e.format(A)}
|
||||
`.trim())}};$Ee.exports=$7});var sme=E((l4t,nme)=>{"use strict";var{kProxy:gst,kClose:hst,kDestroy:Est,kInterceptors:mst}=BA(),{URL:tme}=require("url"),Ame=OB(),Cst=Bm(),fst=NB(),{InvalidArgumentError:YB,RequestAbortedError:Qst}=tA(),rme=RB(),HB=Symbol("proxy agent"),eD=Symbol("proxy client"),tD=Symbol("proxy headers"),eM=Symbol("request tls settings"),Bst=Symbol("proxy tls settings"),ime=Symbol("connect endpoint function");function Ist(t){return t==="https:"?443:80}a(Ist,"defaultProtocolPort");function yst(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new YB("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}a(yst,"buildProxyOptions");function wst(t,e){return new Cst(t,e)}a(wst,"defaultFactory");var tM=class extends fst{static{a(this,"ProxyAgent")}constructor(e){if(super(e),this[gst]=yst(e),this[HB]=new Ame(e),this[mst]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new YB("Proxy opts.uri is mandatory");let{clientFactory:A=wst}=e;if(typeof A!="function")throw new YB("Proxy opts.clientFactory must be a function.");if(this[eM]=e.requestTls,this[Bst]=e.proxyTls,this[tD]=e.headers||{},e.auth&&e.token)throw new YB("opts.auth cannot be used in combination with opts.token");e.auth?this[tD]["proxy-authorization"]=`Basic ${e.auth}`:e.token&&(this[tD]["proxy-authorization"]=e.token);let r=new tme(e.uri),{origin:i,port:n,host:s}=r,o=rme({...e.proxyTls});this[ime]=rme({...e.requestTls}),this[eD]=A(r,{connect:o}),this[HB]=new Ame({...e,connect:async(c,l)=>{let d=c.host;c.port||(d+=`:${Ist(c.protocol)}`);try{let{socket:u,statusCode:p}=await this[eD].connect({origin:i,port:n,path:d,signal:c.signal,headers:{...this[tD],host:s}});if(p!==200&&(u.on("error",()=>{}).destroy(),l(new Qst("Proxy response !== 200 when HTTP Tunneling"))),c.protocol!=="https:"){l(null,u);return}let g;this[eM]?g=this[eM].servername:g=c.servername,this[ime]({...c,servername:g,httpSocket:u},l)}catch(u){l(u)}}})}dispatch(e,A){let{host:r}=new tme(e.origin),i=bst(e.headers);return Nst(i),this[HB].dispatch({...e,headers:{...i,host:r}},A)}async[hst](){await this[HB].close(),await this[eD].close()}async[Est](){await this[HB].destroy(),await this[eD].destroy()}};function bst(t){if(Array.isArray(t)){let e={};for(let A=0;A<t.length;A+=2)e[t[A]]=t[A+1];return e}return t}a(bst,"buildHeaders");function Nst(t){if(t&&Object.keys(t).find(A=>A.toLowerCase()==="proxy-authorization"))throw new YB("Proxy-Authorization should be sent in ProxyAgent constructor")}a(Nst,"throwIfProxyAuthIsSent");nme.exports=tM});var vm=E((u4t,lme)=>{"use strict";var ame=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Rst}=tA(),Dst=OB();cme()===void 0&&ome(new Dst);function ome(t){if(!t||typeof t.dispatch!="function")throw new Rst("Argument agent must implement Agent");Object.defineProperty(globalThis,ame,{value:t,writable:!0,enumerable:!1,configurable:!1})}a(ome,"setGlobalDispatcher");function cme(){return globalThis[ame]}a(cme,"getGlobalDispatcher");lme.exports={setGlobalDispatcher:ome,getGlobalDispatcher:cme}});var ume=E((h4t,dme)=>{"use strict";dme.exports=class{static{a(this,"DecoratorHandler")}constructor(e){this.handler=e}onConnect(...e){return this.handler.onConnect(...e)}onError(...e){return this.handler.onError(...e)}onUpgrade(...e){return this.handler.onUpgrade(...e)}onHeaders(...e){return this.handler.onHeaders(...e)}onData(...e){return this.handler.onData(...e)}onComplete(...e){return this.handler.onComplete(...e)}onBodySent(...e){return this.handler.onBodySent(...e)}}});var Bp=E((m4t,Eme)=>{"use strict";var{kHeadersList:Rn}=BA(),{kGuard:Qp}=zc(),{kEnumerableProperty:Jo}=gt(),{makeIterator:AM,isValidHeaderName:GB,isValidHeaderValue:pme}=aa(),{webidl:Ke}=Yi(),Sst=require("assert"),Dn=Symbol("headers map"),Sn=Symbol("headers map sorted");function gme(t){let e=t.length;for(;/[\r\n\t ]/.test(t.charAt(--e)););return t.slice(0,e+1).replace(/^[\r\n\t ]+/,"")}a(gme,"headerValueNormalize");function hme(t,e){if(Array.isArray(e))for(let A of e){if(A.length!==2)throw Ke.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${A.length}.`});t.append(A[0],A[1])}else if(typeof e=="object"&&e!==null)for(let[A,r]of Object.entries(e))t.append(A,r);else throw Ke.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}a(hme,"fill");var AD=class t{static{a(this,"HeadersList")}cookies=null;constructor(e){e instanceof t?(this[Dn]=new Map(e[Dn]),this[Sn]=e[Sn],this.cookies=e.cookies):(this[Dn]=new Map(e),this[Sn]=null)}contains(e){return e=e.toLowerCase(),this[Dn].has(e)}clear(){this[Dn].clear(),this[Sn]=null,this.cookies=null}append(e,A){this[Sn]=null;let r=e.toLowerCase(),i=this[Dn].get(r);if(i){let n=r==="cookie"?"; ":", ";this[Dn].set(r,{name:i.name,value:`${i.value}${n}${A}`})}else this[Dn].se
Line truncated
|
||||
`.trim())}};ime.exports=iM});var dme=E((R4t,lme)=>{"use strict";var{kProxy:Dst,kClose:Sst,kDestroy:xst,kInterceptors:vst}=BA(),{URL:sme}=require("url"),ame=HB(),kst=Im(),Fst=SB(),{InvalidArgumentError:VB,RequestAbortedError:Lst}=tA(),ome=xB(),JB=Symbol("proxy agent"),iD=Symbol("proxy client"),nD=Symbol("proxy headers"),nM=Symbol("request tls settings"),Ust=Symbol("proxy tls settings"),cme=Symbol("connect endpoint function");function Tst(t){return t==="https:"?443:80}a(Tst,"defaultProtocolPort");function Mst(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new VB("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}a(Mst,"buildProxyOptions");function _st(t,e){return new kst(t,e)}a(_st,"defaultFactory");var sM=class extends Fst{static{a(this,"ProxyAgent")}constructor(e){if(super(e),this[Dst]=Mst(e),this[JB]=new ame(e),this[vst]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new VB("Proxy opts.uri is mandatory");let{clientFactory:A=_st}=e;if(typeof A!="function")throw new VB("Proxy opts.clientFactory must be a function.");if(this[nM]=e.requestTls,this[Ust]=e.proxyTls,this[nD]=e.headers||{},e.auth&&e.token)throw new VB("opts.auth cannot be used in combination with opts.token");e.auth?this[nD]["proxy-authorization"]=`Basic ${e.auth}`:e.token&&(this[nD]["proxy-authorization"]=e.token);let r=new sme(e.uri),{origin:i,port:n,host:s}=r,o=ome({...e.proxyTls});this[cme]=ome({...e.requestTls}),this[iD]=A(r,{connect:o}),this[JB]=new ame({...e,connect:async(c,l)=>{let d=c.host;c.port||(d+=`:${Tst(c.protocol)}`);try{let{socket:u,statusCode:p}=await this[iD].connect({origin:i,port:n,path:d,signal:c.signal,headers:{...this[nD],host:s}});if(p!==200&&(u.on("error",()=>{}).destroy(),l(new Lst("Proxy response !== 200 when HTTP Tunneling"))),c.protocol!=="https:"){l(null,u);return}let g;this[nM]?g=this[nM].servername:g=c.servername,this[cme]({...c,servername:g,httpSocket:u},l)}catch(u){l(u)}}})}dispatch(e,A){let{host:r}=new sme(e.origin),i=Ost(e.headers);return Pst(i),this[JB].dispatch({...e,headers:{...i,host:r}},A)}async[Sst](){await this[JB].close(),await this[iD].close()}async[xst](){await this[JB].destroy(),await this[iD].destroy()}};function Ost(t){if(Array.isArray(t)){let e={};for(let A=0;A<t.length;A+=2)e[t[A]]=t[A+1];return e}return t}a(Ost,"buildHeaders");function Pst(t){if(t&&Object.keys(t).find(A=>A.toLowerCase()==="proxy-authorization"))throw new VB("Proxy-Authorization should be sent in ProxyAgent constructor")}a(Pst,"throwIfProxyAuthIsSent");lme.exports=sM});var km=E((S4t,hme)=>{"use strict";var ume=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:qst}=tA(),Hst=HB();gme()===void 0&&pme(new Hst);function pme(t){if(!t||typeof t.dispatch!="function")throw new qst("Argument agent must implement Agent");Object.defineProperty(globalThis,ume,{value:t,writable:!0,enumerable:!1,configurable:!1})}a(pme,"setGlobalDispatcher");function gme(){return globalThis[ume]}a(gme,"getGlobalDispatcher");hme.exports={setGlobalDispatcher:pme,getGlobalDispatcher:gme}});var mme=E((k4t,Eme)=>{"use strict";Eme.exports=class{static{a(this,"DecoratorHandler")}constructor(e){this.handler=e}onConnect(...e){return this.handler.onConnect(...e)}onError(...e){return this.handler.onError(...e)}onUpgrade(...e){return this.handler.onUpgrade(...e)}onHeaders(...e){return this.handler.onHeaders(...e)}onData(...e){return this.handler.onData(...e)}onComplete(...e){return this.handler.onComplete(...e)}onBodySent(...e){return this.handler.onBodySent(...e)}}});var Ip=E((L4t,Bme)=>{"use strict";var{kHeadersList:Rn}=BA(),{kGuard:Bp}=zc(),{kEnumerableProperty:Jo}=gt(),{makeIterator:aM,isValidHeaderName:WB,isValidHeaderValue:Cme}=aa(),{webidl:Ke}=Yi(),Yst=require("assert"),Dn=Symbol("headers map"),Sn=Symbol("headers map sorted");function fme(t){let e=t.length;for(;/[\r\n\t ]/.test(t.charAt(--e)););return t.slice(0,e+1).replace(/^[\r\n\t ]+/,"")}a(fme,"headerValueNormalize");function Qme(t,e){if(Array.isArray(e))for(let A of e){if(A.length!==2)throw Ke.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${A.length}.`});t.append(A[0],A[1])}else if(typeof e=="object"&&e!==null)for(let[A,r]of Object.entries(e))t.append(A,r);else throw Ke.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}a(Qme,"fill");var sD=class t{static{a(this,"HeadersList")}cookies=null;constructor(e){e instanceof t?(this[Dn]=new Map(e[Dn]),this[Sn]=e[Sn],this.cookies=e.cookies):(this[Dn]=new Map(e),this[Sn]=null)}contains(e){return e=e.toLowerCase(),this[Dn].has(e)}clear(){this[Dn].clear(),this[Sn]=null,this.cookies=null}append(e,A){this[Sn]=null;let r=e.toLowerCase(),i=this[Dn].get(r);if(i){let n=r==="cookie"?"; ":", ";this[Dn].set(r,{name:i.name,value:`${i.value}${n}${A}`})}else this[Dn].se
Line truncated
|
||||
|
||||
Error Code : ${s.statusCode}
|
||||
|
||||
Error Message: ${s.message}`)})).result)===null||A===void 0?void 0:A.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return pfe(this,void 0,void 0,function*(){try{let A=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);A=`${A}&audience=${i}`}gfe.debug(`ID token url is ${A}`);let r=yield t.getCall(A);return gfe.setSecret(r),r}catch(A){throw new Error(`Error message: ${A.message}`)}})}};Jm.OidcClient=WM});var ZM=E(kn=>{"use strict";var zM=kn&&kn.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(kn,"__esModule",{value:!0});kn.summary=kn.markdownSummary=kn.SUMMARY_DOCS_URL=kn.SUMMARY_ENV_VAR=void 0;var hlt=require("os"),jM=require("fs"),{access:Elt,appendFile:mlt,writeFile:Clt}=jM.promises;kn.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";kn.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var XM=class{static{a(this,"Summary")}constructor(){this._buffer=""}filePath(){return zM(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[kn.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${kn.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield Elt(e,jM.constants.R_OK|jM.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,A,r={}){let i=Object.entries(r).map(([n,s])=>` ${n}="${s}"`).join("");return A?`<${e}${i}>${A}</${e}>`:`<${e}${i}>`}write(e){return zM(this,void 0,void 0,function*(){let A=!!e?.overwrite,r=yield this.filePath();return yield(A?Clt:mlt)(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return zM(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,A=!1){return this._buffer+=e,A?this.addEOL():this}addEOL(){return this.addRaw(hlt.EOL)}addCodeBlock(e,A){let r=Object.assign({},A&&{lang:A}),i=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(i).addEOL()}addList(e,A=!1){let r=A?"ol":"ul",i=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(r,i);return this.addRaw(n).addEOL()}addTable(e){let A=e.map(i=>{let n=i.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:o,data:c,colspan:l,rowspan:d}=s,u=o?"th":"td",p=Object.assign(Object.assign({},l&&{colspan:l}),d&&{rowspan:d});return this.wrap(u,c,p)}).join("");return this.wrap("tr",n)}).join(""),r=this.wrap("table",A);return this.addRaw(r).addEOL()}addDetails(e,A){let r=this.wrap("details",this.wrap("summary",e)+A);return this.addRaw(r).addEOL()}addImage(e,A,r){let{width:i,height:n}=r||{},s=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n}),o=this.wrap("img",null,Object.assign({src:e,alt:A},s));return this.addRaw(o).addEOL()}addHeading(e,A){let r=`h${A}`,i=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",n=this.wrap(i,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,A){let r=Object.assign({},A&&{cite:A}),i=this.wrap("blockquote",e,r);return this.addRaw(i).addEOL()}addLink(e,A){let r=this.wrap("a",e,{href:A});return this.addRaw(r).addEOL()}},Efe=new XM;kn.markdownSummary=Efe;kn.summary=Efe});var mfe=E(Fn=>{"use strict";var flt=Fn&&Fn.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),Qlt=Fn&&Fn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Blt=Fn&&Fn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&flt(e,t,A);return Qlt(e,t),e};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.toPlatformPath=Fn.toWin32Path=Fn.toPosixPath=void 0;var Ilt=Blt(require("path"));function ylt(t){return t.replace(/[\\]/g,"/")}a(ylt,"toPosixPath");Fn.toPosixPath=ylt;function wlt(t){return t.replace(/[/]/g,"\\")}a(wlt,"toWin32Path");Fn.toWin32Path=wlt;function blt(t){return t.replace(/[/\\]/g,Ilt.sep)}a(blt,"toPlatformPath");Fn.toPlatformPath=blt});var rI=E(ue=>{"use strict";var Nlt=ue&&ue.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){Line truncated
|
||||
`).filter(r=>r!=="");return e&&e.trimWhitespace===!1?A:A.map(r=>r.trim())}a(Flt,"getMultilineInput");ue.getMultilineInput=Flt;function Llt(t,e){let A=["true","True","TRUE"],r=["false","False","FALSE"],i=KM(t,e);if(A.includes(i))return!0;if(r.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}a(Llt,"getBooleanInput");ue.getBooleanInput=Llt;function Ult(t,e){if(process.env.GITHUB_OUTPUT||"")return Rp.issueFileCommand("OUTPUT",Rp.prepareKeyValueMessage(t,e));process.stdout.write(Qfe.EOL),ga.issueCommand("set-output",{name:t},Vm.toCommandValue(e))}a(Ult,"setOutput");ue.setOutput=Ult;function Tlt(t){ga.issue("echo",t?"on":"off")}a(Tlt,"setCommandEcho");ue.setCommandEcho=Tlt;function Mlt(t){process.exitCode=Bfe.Failure,Ife(t)}a(Mlt,"setFailed");ue.setFailed=Mlt;function _lt(){return process.env.RUNNER_DEBUG==="1"}a(_lt,"isDebug");ue.isDebug=_lt;function Olt(t){ga.issueCommand("debug",{},t)}a(Olt,"debug");ue.debug=Olt;function Ife(t,e={}){ga.issueCommand("error",Vm.toCommandProperties(e),t instanceof Error?t.toString():t)}a(Ife,"error");ue.error=Ife;function Plt(t,e={}){ga.issueCommand("warning",Vm.toCommandProperties(e),t instanceof Error?t.toString():t)}a(Plt,"warning");ue.warning=Plt;function qlt(t,e={}){ga.issueCommand("notice",Vm.toCommandProperties(e),t instanceof Error?t.toString():t)}a(qlt,"notice");ue.notice=qlt;function Hlt(t){process.stdout.write(t+Qfe.EOL)}a(Hlt,"info");ue.info=Hlt;function yfe(t){ga.issue("group",t)}a(yfe,"startGroup");ue.startGroup=yfe;function wfe(){ga.issue("endgroup")}a(wfe,"endGroup");ue.endGroup=wfe;function Ylt(t,e){return ffe(this,void 0,void 0,function*(){yfe(t);let A;try{A=yield e()}finally{wfe()}return A})}a(Ylt,"group");ue.group=Ylt;function Glt(t,e){if(process.env.GITHUB_STATE||"")return Rp.issueFileCommand("STATE",Rp.prepareKeyValueMessage(t,e));ga.issueCommand("save-state",{name:t},Vm.toCommandValue(e))}a(Glt,"saveState");ue.saveState=Glt;function Jlt(t){return process.env[`STATE_${t}`]||""}a(Jlt,"getState");ue.getState=Jlt;function Vlt(t){return ffe(this,void 0,void 0,function*(){return yield Slt.OidcClient.getIDToken(t)})}a(Vlt,"getIDToken");ue.getIDToken=Vlt;var Wlt=ZM();Object.defineProperty(ue,"summary",{enumerable:!0,get:function(){return Wlt.summary}});var zlt=ZM();Object.defineProperty(ue,"markdownSummary",{enumerable:!0,get:function(){return zlt.markdownSummary}});var $M=mfe();Object.defineProperty(ue,"toPosixPath",{enumerable:!0,get:function(){return $M.toPosixPath}});Object.defineProperty(ue,"toWin32Path",{enumerable:!0,get:function(){return $M.toWin32Path}});Object.defineProperty(ue,"toPlatformPath",{enumerable:!0,get:function(){return $M.toPlatformPath}})});var Rfe=E((Ri,t_)=>{"use strict";var jlt=Ri&&Ri.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),Xlt=Ri&&Ri.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Zlt=Ri&&Ri.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&jlt(e,t,A);return Xlt(e,t),e},Klt=Ri&&Ri.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(Ri,"__esModule",{value:!0});Ri._readLinuxVersionFile=Ri._getOsVersion=Ri._findMatch=void 0;var bfe=Zlt(u2()),e_=rI(),Nfe=require("os"),$lt=require("child_process"),GD=require("fs");function edt(t,e,A,r){return Klt(this,void 0,void 0,function*(){let i=Nfe.platform(),n,s,o;for(let c of A){let l=c.version;if(e_.debug(`check ${l} satisfies ${t}`),bfe.satisfies(l,t)&&(!e||c.stable===e)&&(o=c.files.find(d=>{e_.debug(`${d.arch}===${r} && ${d.platform}===${i}`);let u=d.arch===r&&d.platform===i;if(u&&d.platform_version){let p=t_.exports._getOsVersion();p===d.platform_version?u=!0:u=bfe.satisfies(p,d.platform_version)}return u}),o)){e_.debug(`matched ${c.version}`),s=c;break}}return s&&o&&(n=Object.assign({},s),n.files=[o]),n})}a(edt,"_findMatch");Ri._findMatch=edt;function tdt(){let t=Nfe.platform(),e="";if(t==="darwin")e=$lt.execSync("sw_vers -productVersion").toString();else if(t==="linux"){let A=t_.exports._readLinuxVersionFile();if(A){let r=A.split(`
|
||||
`);for(let i of r){let n=i.split("=");if(n.length===2&&(n[0].trim()==="VERSION_ID"||n[0].trim()==="DISTRIB_RELEASE")){e=n[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return e}a(tdt,"_getOsVersion");Ri._getOsVersion=tdt;function Adt(){let t="/etc/lsb-release",e="/etc/os-release",A="";return GD.existsSync(t)?A=GD.readFileSync(t).toString():GD.existsSync(e)&&(A=GD.readFileSync(e).toString()),A}a(Adt,"_readLinuxVersionFile");Ri._readLinuxVersionFile=Adt});var Sfe=E((y6t,Dfe)=>{var rdt=require("crypto");Dfe.exports=a(function(){return rdt.randomBytes(16)},"nodeRNG")});var kfe=E((b6t,vfe)=>{var xfe=[];for(iI=0;iI<256;++iI)xfe[iI]=(iI+256).toString(16).substr(1);var iI;function idt(t,e){var A=e||0,r=xfe;return[r[t[A++]],r[t[A++]],r[t[A++]],r[t[A++]],"-",r[t[A++]],r[t[A++]],"-",r[t[A++]],r[t[A++]],"-",r[t[A++]],r[t[A++]],"-",r[t[A++]],r[t[A++]],r[t[A++]],r[t[A++]],r[t[A++]],r[t[A++]]].join("")}a(idt,"bytesToUuid");vfe.exports=idt});var Lfe=E((R6t,Ffe)=>{var ndt=Sfe(),sdt=kfe();function adt(t,e,A){var r=e&&A||0;typeof t=="string"&&(e=t==="binary"?new Array(16):null,t=null),t=t||{};var i=t.random||(t.rng||ndt)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e)for(var n=0;n<16;++n)e[r+n]=i[n];return e||sdt(i)}a(adt,"v4");Ffe.exports=adt});var Mfe=E(ha=>{"use strict";var odt=ha&&ha.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),cdt=ha&&ha.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ldt=ha&&ha.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&odt(e,t,A);return cdt(e,t),e},Ufe=ha&&ha.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(ha,"__esModule",{value:!0});ha.RetryHelper=void 0;var Tfe=ldt(rI()),A_=class{static{a(this,"RetryHelper")}constructor(e,A,r){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(A),this.maxSeconds=Math.floor(r),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,A){return Ufe(this,void 0,void 0,function*(){let r=1;for(;r<this.maxAttempts;){try{return yield e()}catch(n){if(A&&!A(n))throw n;Tfe.info(n.message)}let i=this.getSleepAmount();Tfe.info(`Waiting ${i} seconds before trying again`),yield this.sleep(i),r++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return Ufe(this,void 0,void 0,function*(){return new Promise(A=>setTimeout(A,e*1e3))})}};ha.RetryHelper=A_});var Jfe=E(je=>{"use strict";var ddt=je&&je.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),udt=je&&je.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jo=je&&je.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&ddt(e,t,A);return udt(e,t),e},ji=je&&je.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})},pdt=je&&je.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(je,"__esModule",{value:!0});je.evaluateVersions=je.isExplicitVersion=je.findFromManifest=je.getManifestFromRepo=je.findAllVersions=je.find=je.cacheFile=je.cacheDir=je.extractZip=je.extractXar=je.extractTar=je.extract7z=je.downloadTool=je.HTTPError=void 0;var mt=jo(rI()),Is=jo(YC()),Ea=jo(require("fs")),gdt=jo(Rfe()),sI=jo(require("os")),Va=jo(require("path")),_fe=jo(HM()),sl=jo(u2()),hdt=jo(require("stream")),Edt=jo(require("util")),Wm=require("assert"),Ofe=pdt(Lfe()),Td=Rg(),mdt=Mfe(),nI=class extends Error{static{a(this,"HTTPError")}constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};je.HTTPError=nI;var i_=process.platform==="win32",Cdt=process.platform==="darwin",fdt="actions/tool-cache";function Qdt(t,e,A,r){return ji(this,void 0,void 0,function*(){e=e||Va.join(Gfe(),Ofe
Line truncated
|
||||
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}a(isDigit,"isDigit");function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}a(isHexit,"isHexit");function isBit(t){return t===CHAR_1||t===CHAR_0}a(isBit,"isBit");function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}a(isOctit,"isOctit");function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}a(isAlphaNumQuoteHyphen,"isAlphaNumQuoteHyphen");function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}a(isAlphaNumHyphen,"isAlphaNumHyphen");var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}a(hasKey,"hasKey");var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}a(InlineTable,"InlineTable");function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}a(isInlineTable,"isInlineTable");var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}a(Table,"Table");function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}a(isTable,"isTable");var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}a(InlineList,"InlineList");function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}a(isInlineList,"isInlineList");var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}a(List,"List");function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}a(isList,"isList");var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{static{a(this,"BoxedBigInt")}constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}a(Integer,"Integer");function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}a(isInteger,"isInteger");var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}a(Float,"Float");function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}a(isFloat,"isFloat");function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}a(tomlType,"tomlType");function makeParserClass(t){class e extends t{static{a(this,"TOMLParser")}constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(r){let i=this.ctx,n=r.key.pop();for(let s of r.key){if(hasKey(i,s)&&(!isTable(i[s])||i[s][_declared]))throw this.error(new TomlError("Can'
Line truncated
|
||||
Error Message: ${s.message}`)})).result)===null||A===void 0?void 0:A.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return Cfe(this,void 0,void 0,function*(){try{let A=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);A=`${A}&audience=${i}`}ffe.debug(`ID token url is ${A}`);let r=yield t.getCall(A);return ffe.setSecret(r),r}catch(A){throw new Error(`Error message: ${A.message}`)}})}};Vm.OidcClient=KM});var A_=E(kn=>{"use strict";var $M=kn&&kn.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(kn,"__esModule",{value:!0});kn.summary=kn.markdownSummary=kn.SUMMARY_DOCS_URL=kn.SUMMARY_ENV_VAR=void 0;var Slt=require("os"),e_=require("fs"),{access:xlt,appendFile:vlt,writeFile:klt}=e_.promises;kn.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";kn.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var t_=class{static{a(this,"Summary")}constructor(){this._buffer=""}filePath(){return $M(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[kn.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${kn.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield xlt(e,e_.constants.R_OK|e_.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,A,r={}){let i=Object.entries(r).map(([n,s])=>` ${n}="${s}"`).join("");return A?`<${e}${i}>${A}</${e}>`:`<${e}${i}>`}write(e){return $M(this,void 0,void 0,function*(){let A=!!e?.overwrite,r=yield this.filePath();return yield(A?klt:vlt)(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return $M(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,A=!1){return this._buffer+=e,A?this.addEOL():this}addEOL(){return this.addRaw(Slt.EOL)}addCodeBlock(e,A){let r=Object.assign({},A&&{lang:A}),i=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(i).addEOL()}addList(e,A=!1){let r=A?"ol":"ul",i=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(r,i);return this.addRaw(n).addEOL()}addTable(e){let A=e.map(i=>{let n=i.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:o,data:c,colspan:l,rowspan:d}=s,u=o?"th":"td",p=Object.assign(Object.assign({},l&&{colspan:l}),d&&{rowspan:d});return this.wrap(u,c,p)}).join("");return this.wrap("tr",n)}).join(""),r=this.wrap("table",A);return this.addRaw(r).addEOL()}addDetails(e,A){let r=this.wrap("details",this.wrap("summary",e)+A);return this.addRaw(r).addEOL()}addImage(e,A,r){let{width:i,height:n}=r||{},s=Object.assign(Object.assign({},i&&{width:i}),n&&{height:n}),o=this.wrap("img",null,Object.assign({src:e,alt:A},s));return this.addRaw(o).addEOL()}addHeading(e,A){let r=`h${A}`,i=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",n=this.wrap(i,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,A){let r=Object.assign({},A&&{cite:A}),i=this.wrap("blockquote",e,r);return this.addRaw(i).addEOL()}addLink(e,A){let r=this.wrap("a",e,{href:A});return this.addRaw(r).addEOL()}},Bfe=new t_;kn.markdownSummary=Bfe;kn.summary=Bfe});var Ife=E(Fn=>{"use strict";var Flt=Fn&&Fn.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),Llt=Fn&&Fn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ult=Fn&&Fn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&Flt(e,t,A);return Llt(e,t),e};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.toPlatformPath=Fn.toWin32Path=Fn.toPosixPath=void 0;var Tlt=Ult(require("path"));function Mlt(t){return t.replace(/[\\]/g,"/")}a(Mlt,"toPosixPath");Fn.toPosixPath=Mlt;function _lt(t){return t.replace(/[/]/g,"\\")}a(_lt,"toWin32Path");Fn.toWin32Path=_lt;function Olt(t){return t.replace(/[/\\]/g,Tlt.sep)}a(Olt,"toPlatformPath");Fn.toPlatformPath=Olt});var sI=E(ue=>{"use strict";var Plt=ue&&ue.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){Line truncated
|
||||
`).filter(r=>r!=="");return e&&e.trimWhitespace===!1?A:A.map(r=>r.trim())}a(Wlt,"getMultilineInput");ue.getMultilineInput=Wlt;function zlt(t,e){let A=["true","True","TRUE"],r=["false","False","FALSE"],i=r_(t,e);if(A.includes(i))return!0;if(r.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}a(zlt,"getBooleanInput");ue.getBooleanInput=zlt;function jlt(t,e){if(process.env.GITHUB_OUTPUT||"")return Dp.issueFileCommand("OUTPUT",Dp.prepareKeyValueMessage(t,e));process.stdout.write(bfe.EOL),ga.issueCommand("set-output",{name:t},Wm.toCommandValue(e))}a(jlt,"setOutput");ue.setOutput=jlt;function Xlt(t){ga.issue("echo",t?"on":"off")}a(Xlt,"setCommandEcho");ue.setCommandEcho=Xlt;function Zlt(t){process.exitCode=Nfe.Failure,Rfe(t)}a(Zlt,"setFailed");ue.setFailed=Zlt;function Klt(){return process.env.RUNNER_DEBUG==="1"}a(Klt,"isDebug");ue.isDebug=Klt;function $lt(t){ga.issueCommand("debug",{},t)}a($lt,"debug");ue.debug=$lt;function Rfe(t,e={}){ga.issueCommand("error",Wm.toCommandProperties(e),t instanceof Error?t.toString():t)}a(Rfe,"error");ue.error=Rfe;function edt(t,e={}){ga.issueCommand("warning",Wm.toCommandProperties(e),t instanceof Error?t.toString():t)}a(edt,"warning");ue.warning=edt;function tdt(t,e={}){ga.issueCommand("notice",Wm.toCommandProperties(e),t instanceof Error?t.toString():t)}a(tdt,"notice");ue.notice=tdt;function Adt(t){process.stdout.write(t+bfe.EOL)}a(Adt,"info");ue.info=Adt;function Dfe(t){ga.issue("group",t)}a(Dfe,"startGroup");ue.startGroup=Dfe;function Sfe(){ga.issue("endgroup")}a(Sfe,"endGroup");ue.endGroup=Sfe;function rdt(t,e){return wfe(this,void 0,void 0,function*(){Dfe(t);let A;try{A=yield e()}finally{Sfe()}return A})}a(rdt,"group");ue.group=rdt;function idt(t,e){if(process.env.GITHUB_STATE||"")return Dp.issueFileCommand("STATE",Dp.prepareKeyValueMessage(t,e));ga.issueCommand("save-state",{name:t},Wm.toCommandValue(e))}a(idt,"saveState");ue.saveState=idt;function ndt(t){return process.env[`STATE_${t}`]||""}a(ndt,"getState");ue.getState=ndt;function sdt(t){return wfe(this,void 0,void 0,function*(){return yield Ylt.OidcClient.getIDToken(t)})}a(sdt,"getIDToken");ue.getIDToken=sdt;var adt=A_();Object.defineProperty(ue,"summary",{enumerable:!0,get:function(){return adt.summary}});var odt=A_();Object.defineProperty(ue,"markdownSummary",{enumerable:!0,get:function(){return odt.markdownSummary}});var i_=Ife();Object.defineProperty(ue,"toPosixPath",{enumerable:!0,get:function(){return i_.toPosixPath}});Object.defineProperty(ue,"toWin32Path",{enumerable:!0,get:function(){return i_.toWin32Path}});Object.defineProperty(ue,"toPlatformPath",{enumerable:!0,get:function(){return i_.toPlatformPath}})});var kfe=E((Ri,s_)=>{"use strict";var cdt=Ri&&Ri.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),ldt=Ri&&Ri.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ddt=Ri&&Ri.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&cdt(e,t,A);return ldt(e,t),e},udt=Ri&&Ri.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(Ri,"__esModule",{value:!0});Ri._readLinuxVersionFile=Ri._getOsVersion=Ri._findMatch=void 0;var xfe=ddt(E2()),n_=sI(),vfe=require("os"),pdt=require("child_process"),zD=require("fs");function gdt(t,e,A,r){return udt(this,void 0,void 0,function*(){let i=vfe.platform(),n,s,o;for(let c of A){let l=c.version;if(n_.debug(`check ${l} satisfies ${t}`),xfe.satisfies(l,t)&&(!e||c.stable===e)&&(o=c.files.find(d=>{n_.debug(`${d.arch}===${r} && ${d.platform}===${i}`);let u=d.arch===r&&d.platform===i;if(u&&d.platform_version){let p=s_.exports._getOsVersion();p===d.platform_version?u=!0:u=xfe.satisfies(p,d.platform_version)}return u}),o)){n_.debug(`matched ${c.version}`),s=c;break}}return s&&o&&(n=Object.assign({},s),n.files=[o]),n})}a(gdt,"_findMatch");Ri._findMatch=gdt;function hdt(){let t=vfe.platform(),e="";if(t==="darwin")e=pdt.execSync("sw_vers -productVersion").toString();else if(t==="linux"){let A=s_.exports._readLinuxVersionFile();if(A){let r=A.split(`
|
||||
`);for(let i of r){let n=i.split("=");if(n.length===2&&(n[0].trim()==="VERSION_ID"||n[0].trim()==="DISTRIB_RELEASE")){e=n[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return e}a(hdt,"_getOsVersion");Ri._getOsVersion=hdt;function Edt(){let t="/etc/lsb-release",e="/etc/os-release",A="";return zD.existsSync(t)?A=zD.readFileSync(t).toString():zD.existsSync(e)&&(A=zD.readFileSync(e).toString()),A}a(Edt,"_readLinuxVersionFile");Ri._readLinuxVersionFile=Edt});var Lfe=E((P6t,Ffe)=>{var mdt=require("crypto");Ffe.exports=a(function(){return mdt.randomBytes(16)},"nodeRNG")});var Mfe=E((H6t,Tfe)=>{var Ufe=[];for(aI=0;aI<256;++aI)Ufe[aI]=(aI+256).toString(16).substr(1);var aI;function Cdt(t,e){var A=e||0,r=Ufe;return[r[t[A++]],r[t[A++]],r[t[A++]],r[t[A++]],"-",r[t[A++]],r[t[A++]],"-",r[t[A++]],r[t[A++]],"-",r[t[A++]],r[t[A++]],"-",r[t[A++]],r[t[A++]],r[t[A++]],r[t[A++]],r[t[A++]],r[t[A++]]].join("")}a(Cdt,"bytesToUuid");Tfe.exports=Cdt});var Ofe=E((G6t,_fe)=>{var fdt=Lfe(),Qdt=Mfe();function Bdt(t,e,A){var r=e&&A||0;typeof t=="string"&&(e=t==="binary"?new Array(16):null,t=null),t=t||{};var i=t.random||(t.rng||fdt)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e)for(var n=0;n<16;++n)e[r+n]=i[n];return e||Qdt(i)}a(Bdt,"v4");_fe.exports=Bdt});var Hfe=E(ha=>{"use strict";var Idt=ha&&ha.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),ydt=ha&&ha.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wdt=ha&&ha.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&Idt(e,t,A);return ydt(e,t),e},Pfe=ha&&ha.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})};Object.defineProperty(ha,"__esModule",{value:!0});ha.RetryHelper=void 0;var qfe=wdt(sI()),a_=class{static{a(this,"RetryHelper")}constructor(e,A,r){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(A),this.maxSeconds=Math.floor(r),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,A){return Pfe(this,void 0,void 0,function*(){let r=1;for(;r<this.maxAttempts;){try{return yield e()}catch(n){if(A&&!A(n))throw n;qfe.info(n.message)}let i=this.getSleepAmount();qfe.info(`Waiting ${i} seconds before trying again`),yield this.sleep(i),r++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return Pfe(this,void 0,void 0,function*(){return new Promise(A=>setTimeout(A,e*1e3))})}};ha.RetryHelper=a_});var Xfe=E(je=>{"use strict";var bdt=je&&je.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),Ndt=je&&je.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jo=je&&je.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&bdt(e,t,A);return Ndt(e,t),e},ji=je&&je.__awaiter||function(t,e,A,r){function i(n){return n instanceof A?n:new A(function(s){s(n)})}return a(i,"adopt"),new(A||(A=Promise))(function(n,s){function o(d){try{l(r.next(d))}catch(u){s(u)}}a(o,"fulfilled");function c(d){try{l(r.throw(d))}catch(u){s(u)}}a(c,"rejected");function l(d){d.done?n(d.value):i(d.value).then(o,c)}a(l,"step"),l((r=r.apply(t,e||[])).next())})},Rdt=je&&je.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(je,"__esModule",{value:!0});je.evaluateVersions=je.isExplicitVersion=je.findFromManifest=je.getManifestFromRepo=je.findAllVersions=je.find=je.cacheFile=je.cacheDir=je.extractZip=je.extractXar=je.extractTar=je.extract7z=je.downloadTool=je.HTTPError=void 0;var mt=jo(sI()),Is=jo(VC()),Ea=jo(require("fs")),Ddt=jo(kfe()),cI=jo(require("os")),Va=jo(require("path")),Yfe=jo(WM()),sl=jo(E2()),Sdt=jo(require("stream")),xdt=jo(require("util")),zm=require("assert"),Gfe=Rdt(Ofe()),Td=Dg(),vdt=Hfe(),oI=class extends Error{static{a(this,"HTTPError")}constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};je.HTTPError=oI;var c_=process.platform==="win32",kdt=process.platform==="darwin",Fdt="actions/tool-cache";function Ldt(t,e,A,r){return ji(this,void 0,void 0,function*(){e=e||Va.join(jfe(),Gfe
Line truncated
|
||||
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}a(isDigit,"isDigit");function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}a(isHexit,"isHexit");function isBit(t){return t===CHAR_1||t===CHAR_0}a(isBit,"isBit");function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}a(isOctit,"isOctit");function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}a(isAlphaNumQuoteHyphen,"isAlphaNumQuoteHyphen");function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}a(isAlphaNumHyphen,"isAlphaNumHyphen");var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}a(hasKey,"hasKey");var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}a(InlineTable,"InlineTable");function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}a(isInlineTable,"isInlineTable");var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}a(Table,"Table");function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}a(isTable,"isTable");var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}a(InlineList,"InlineList");function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}a(isInlineList,"isInlineList");var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}a(List,"List");function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}a(isList,"isList");var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{static{a(this,"BoxedBigInt")}constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}a(Integer,"Integer");function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}a(isInteger,"isInteger");var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}a(Float,"Float");function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}a(isFloat,"isFloat");function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}a(tomlType,"tomlType");function makeParserClass(t){class e extends t{static{a(this,"TOMLParser")}constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(r){let i=this.ctx,n=r.key.pop();for(let s of r.key){if(hasKey(i,s)&&(!isTable(i[s])||i[s][_declared]))throw this.error(new TomlError("Can'
Line truncated
|
||||
`,e&&e.split){let r=e.split(/\n/),i=String(Math.min(r.length,t.line+3)).length,n=" ";for(;n.length<i;)n+=" ";for(let s=Math.max(0,t.line-1);s<Math.min(r.length,t.line+2);++s){let o=String(s+1);if(o.length<i&&(o=" "+o),t.line===s){A+=o+"> "+r[s]+`
|
||||
`,A+=n+" ";for(let c=0;c<t.col;++c)A+=" ";A+=`^
|
||||
`}else A+=o+": "+r[s]+`
|
||||
`}}return t.message=A+`
|
||||
`,t}a(Udt,"prettyError")});var sQe=E((V6t,nQe)=>{"use strict";nQe.exports=_dt;var Tdt=XD(),Mdt=ZD();function _dt(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new Tdt;try{return e.parse(t),e.finish()}catch(A){throw Mdt(A,t)}}a(_dt,"parseString")});var cQe=E((z6t,oQe)=>{"use strict";oQe.exports=Pdt;var Odt=XD(),aQe=ZD();function Pdt(t,e){e||(e={});let A=0,r=e.blocksize||40960,i=new Odt;return new Promise((s,o)=>{setImmediate(n,A,r,s,o)});function n(s,o,c,l){if(s>=t.length)try{return c(i.finish())}catch(d){return l(aQe(d,t))}try{i.parse(t.slice(s,s+o)),setImmediate(n,s+o,o,c,l)}catch(d){l(aQe(d,t))}}}a(Pdt,"parseAsync")});var uQe=E((X6t,dQe)=>{"use strict";dQe.exports=Hdt;var qdt=require("stream"),lQe=XD();function Hdt(t){return t?Ydt(t):Gdt(t)}a(Hdt,"parseStream");function Ydt(t){let e=new lQe;return t.setEncoding("utf8"),new Promise((A,r)=>{let i,n=!1,s=!1;function o(){if(n=!0,!i)try{A(e.finish())}catch(d){r(d)}}a(o,"finish");function c(d){s=!0,r(d)}a(c,"error"),t.once("end",o),t.once("error",c),l();function l(){i=!0;let d;for(;(d=t.read())!==null;)try{e.parse(d)}catch(u){return c(u)}if(i=!1,n)return o();s||t.once("readable",l)}a(l,"readNext")})}a(Ydt,"parseReadable");function Gdt(){let t=new lQe;return new qdt.Transform({objectMode:!0,transform(e,A,r){try{t.parse(e.toString(A))}catch(i){this.emit("error",i)}r()},flush(e){try{this.push(t.finish())}catch(A){this.emit("error",A)}e()}})}a(Gdt,"parseTransform")});var pQe=E((K6t,oI)=>{"use strict";oI.exports=sQe();oI.exports.async=cQe();oI.exports.stream=uQe();oI.exports.prettyError=ZD()});var BQe=E(($6t,d_)=>{"use strict";d_.exports=Jdt;d_.exports.value=l_;function Jdt(t){if(t===null)throw Sp("null");if(t===void 0)throw Sp("undefined");if(typeof t!="object")throw Sp(typeof t);if(typeof t.toJSON=="function"&&(t=t.toJSON()),t==null)return null;let e=Ln(t);if(e!=="table")throw Sp(e);return c_("","",t)}a(Jdt,"stringify");function Sp(t){return new Error("Can only stringify objects, not "+t)}a(Sp,"typeError");function Vdt(){return new Error("Array values can't have mixed types")}a(Vdt,"arrayOneTypeError");function gQe(t){return Object.keys(t).filter(e=>hQe(t[e]))}a(gQe,"getInlineKeys");function Wdt(t){return Object.keys(t).filter(e=>!hQe(t[e]))}a(Wdt,"getComplexKeys");function KD(t){let e=Array.isArray(t)?[]:Object.prototype.hasOwnProperty.call(t,"__proto__")?{["__proto__"]:void 0}:{};for(let A of Object.keys(t))t[A]&&typeof t[A].toJSON=="function"&&!("toISOString"in t[A])?e[A]=t[A].toJSON():e[A]=t[A];return e}a(KD,"toJSON");function c_(t,e,A){A=KD(A);var r,i;r=gQe(A),i=Wdt(A);var n=[],s=e||"";r.forEach(c=>{var l=Ln(A[c]);l!=="undefined"&&l!=="null"&&n.push(s+$D(c)+" = "+CQe(A[c],!0))}),n.length>0&&n.push("");var o=t&&r.length>0?e+" ":"";return i.forEach(c=>{n.push(iut(t,o,c,A[c]))}),n.join(`
|
||||
`)}a(c_,"stringifyObject");function hQe(t){switch(Ln(t)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return t.length===0||Ln(t[0])!=="table";case"table":return Object.keys(t).length===0;default:return!1}}a(hQe,"isInline");function Ln(t){return t===void 0?"undefined":t===null?"null":typeof t=="bigint"||Number.isInteger(t)&&!Object.is(t,-0)?"integer":typeof t=="number"?"float":typeof t=="boolean"?"boolean":typeof t=="string"?"string":"toISOString"in t?isNaN(t)?"undefined":"datetime":Array.isArray(t)?"array":"table"}a(Ln,"tomlType");function $D(t){var e=String(t);return/^[-A-Za-z0-9_]+$/.test(e)?e:EQe(e)}a($D,"stringifyKey");function EQe(t){return'"'+mQe(t).replace(/"/g,'\\"')+'"'}a(EQe,"stringifyBasicString");function zdt(t){return"'"+t+"'"}a(zdt,"stringifyLiteralString");function jdt(t,e){for(;e.length<t;)e="0"+e;return e}a(jdt,"numpad");function mQe(t){return t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,e=>"\\u"+jdt(4,e.codePointAt(0).toString(16)))}a(mQe,"escapeString");function Xdt(t){let e=t.split(/\n/).map(A=>mQe(A).replace(/"(?="")/g,'\\"')).join(`
|
||||
`,t}a(jdt,"prettyError")});var dQe=E((cSt,lQe)=>{"use strict";lQe.exports=Kdt;var Xdt=e4(),Zdt=t4();function Kdt(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new Xdt;try{return e.parse(t),e.finish()}catch(A){throw Zdt(A,t)}}a(Kdt,"parseString")});var gQe=E((dSt,pQe)=>{"use strict";pQe.exports=eut;var $dt=e4(),uQe=t4();function eut(t,e){e||(e={});let A=0,r=e.blocksize||40960,i=new $dt;return new Promise((s,o)=>{setImmediate(n,A,r,s,o)});function n(s,o,c,l){if(s>=t.length)try{return c(i.finish())}catch(d){return l(uQe(d,t))}try{i.parse(t.slice(s,s+o)),setImmediate(n,s+o,o,c,l)}catch(d){l(uQe(d,t))}}}a(eut,"parseAsync")});var mQe=E((pSt,EQe)=>{"use strict";EQe.exports=Aut;var tut=require("stream"),hQe=e4();function Aut(t){return t?rut(t):iut(t)}a(Aut,"parseStream");function rut(t){let e=new hQe;return t.setEncoding("utf8"),new Promise((A,r)=>{let i,n=!1,s=!1;function o(){if(n=!0,!i)try{A(e.finish())}catch(d){r(d)}}a(o,"finish");function c(d){s=!0,r(d)}a(c,"error"),t.once("end",o),t.once("error",c),l();function l(){i=!0;let d;for(;(d=t.read())!==null;)try{e.parse(d)}catch(u){return c(u)}if(i=!1,n)return o();s||t.once("readable",l)}a(l,"readNext")})}a(rut,"parseReadable");function iut(){let t=new hQe;return new tut.Transform({objectMode:!0,transform(e,A,r){try{t.parse(e.toString(A))}catch(i){this.emit("error",i)}r()},flush(e){try{this.push(t.finish())}catch(A){this.emit("error",A)}e()}})}a(iut,"parseTransform")});var CQe=E((hSt,dI)=>{"use strict";dI.exports=dQe();dI.exports.async=gQe();dI.exports.stream=mQe();dI.exports.prettyError=t4()});var NQe=E((ESt,E_)=>{"use strict";E_.exports=nut;E_.exports.value=h_;function nut(t){if(t===null)throw xp("null");if(t===void 0)throw xp("undefined");if(typeof t!="object")throw xp(typeof t);if(typeof t.toJSON=="function"&&(t=t.toJSON()),t==null)return null;let e=Ln(t);if(e!=="table")throw xp(e);return g_("","",t)}a(nut,"stringify");function xp(t){return new Error("Can only stringify objects, not "+t)}a(xp,"typeError");function sut(){return new Error("Array values can't have mixed types")}a(sut,"arrayOneTypeError");function fQe(t){return Object.keys(t).filter(e=>QQe(t[e]))}a(fQe,"getInlineKeys");function aut(t){return Object.keys(t).filter(e=>!QQe(t[e]))}a(aut,"getComplexKeys");function A4(t){let e=Array.isArray(t)?[]:Object.prototype.hasOwnProperty.call(t,"__proto__")?{["__proto__"]:void 0}:{};for(let A of Object.keys(t))t[A]&&typeof t[A].toJSON=="function"&&!("toISOString"in t[A])?e[A]=t[A].toJSON():e[A]=t[A];return e}a(A4,"toJSON");function g_(t,e,A){A=A4(A);var r,i;r=fQe(A),i=aut(A);var n=[],s=e||"";r.forEach(c=>{var l=Ln(A[c]);l!=="undefined"&&l!=="null"&&n.push(s+r4(c)+" = "+yQe(A[c],!0))}),n.length>0&&n.push("");var o=t&&r.length>0?e+" ":"";return i.forEach(c=>{n.push(Cut(t,o,c,A[c]))}),n.join(`
|
||||
`)}a(g_,"stringifyObject");function QQe(t){switch(Ln(t)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return t.length===0||Ln(t[0])!=="table";case"table":return Object.keys(t).length===0;default:return!1}}a(QQe,"isInline");function Ln(t){return t===void 0?"undefined":t===null?"null":typeof t=="bigint"||Number.isInteger(t)&&!Object.is(t,-0)?"integer":typeof t=="number"?"float":typeof t=="boolean"?"boolean":typeof t=="string"?"string":"toISOString"in t?isNaN(t)?"undefined":"datetime":Array.isArray(t)?"array":"table"}a(Ln,"tomlType");function r4(t){var e=String(t);return/^[-A-Za-z0-9_]+$/.test(e)?e:BQe(e)}a(r4,"stringifyKey");function BQe(t){return'"'+IQe(t).replace(/"/g,'\\"')+'"'}a(BQe,"stringifyBasicString");function out(t){return"'"+t+"'"}a(out,"stringifyLiteralString");function cut(t,e){for(;e.length<t;)e="0"+e;return e}a(cut,"numpad");function IQe(t){return t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,e=>"\\u"+cut(4,e.codePointAt(0).toString(16)))}a(IQe,"escapeString");function lut(t){let e=t.split(/\n/).map(A=>IQe(A).replace(/"(?="")/g,'\\"')).join(`
|
||||
`);return e.slice(-1)==='"'&&(e+=`\\
|
||||
`),`"""
|
||||
`+e+'"""'}a(Xdt,"stringifyMultilineString");function CQe(t,e){let A=Ln(t);return A==="string"&&(e&&/\n/.test(t)?A="string-multiline":!/[\b\t\n\f\r']/.test(t)&&/"/.test(t)&&(A="string-literal")),l_(t,A)}a(CQe,"stringifyAnyInline");function l_(t,e){switch(e||(e=Ln(t)),e){case"string-multiline":return Xdt(t);case"string":return EQe(t);case"string-literal":return zdt(t);case"integer":return fQe(t);case"float":return Zdt(t);case"boolean":return Kdt(t);case"datetime":return $dt(t);case"array":return Aut(t.filter(A=>Ln(A)!=="null"&&Ln(A)!=="undefined"&&Ln(A)!=="nan"));case"table":return rut(t);default:throw Sp(e)}}a(l_,"stringifyInline");function fQe(t){return String(t).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}a(fQe,"stringifyInteger");function Zdt(t){if(t===1/0)return"inf";if(t===-1/0)return"-inf";if(Object.is(t,NaN))return"nan";if(Object.is(t,-0))return"-0.0";var e=String(t).split("."),A=e[0],r=e[1]||0;return fQe(A)+"."+r}a(Zdt,"stringifyFloat");function Kdt(t){return String(t)}a(Kdt,"stringifyBoolean");function $dt(t){return t.toISOString()}a($dt,"stringifyDatetime");function eut(t){return t==="float"||t==="integer"}a(eut,"isNumber");function tut(t){var e=Ln(t[0]);return t.every(A=>Ln(A)===e)?e:t.every(A=>eut(Ln(A)))?"float":"mixed"}a(tut,"arrayType");function QQe(t){let e=tut(t);if(e==="mixed")throw Vdt();return e}a(QQe,"validateArray");function Aut(t){t=KD(t);let e=QQe(t);var A="[",r=t.map(i=>l_(i,e));return r.join(", ").length>60||/\n/.test(r)?A+=`
|
||||
`+e+'"""'}a(lut,"stringifyMultilineString");function yQe(t,e){let A=Ln(t);return A==="string"&&(e&&/\n/.test(t)?A="string-multiline":!/[\b\t\n\f\r']/.test(t)&&/"/.test(t)&&(A="string-literal")),h_(t,A)}a(yQe,"stringifyAnyInline");function h_(t,e){switch(e||(e=Ln(t)),e){case"string-multiline":return lut(t);case"string":return BQe(t);case"string-literal":return out(t);case"integer":return wQe(t);case"float":return dut(t);case"boolean":return uut(t);case"datetime":return put(t);case"array":return Eut(t.filter(A=>Ln(A)!=="null"&&Ln(A)!=="undefined"&&Ln(A)!=="nan"));case"table":return mut(t);default:throw xp(e)}}a(h_,"stringifyInline");function wQe(t){return String(t).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}a(wQe,"stringifyInteger");function dut(t){if(t===1/0)return"inf";if(t===-1/0)return"-inf";if(Object.is(t,NaN))return"nan";if(Object.is(t,-0))return"-0.0";var e=String(t).split("."),A=e[0],r=e[1]||0;return wQe(A)+"."+r}a(dut,"stringifyFloat");function uut(t){return String(t)}a(uut,"stringifyBoolean");function put(t){return t.toISOString()}a(put,"stringifyDatetime");function gut(t){return t==="float"||t==="integer"}a(gut,"isNumber");function hut(t){var e=Ln(t[0]);return t.every(A=>Ln(A)===e)?e:t.every(A=>gut(Ln(A)))?"float":"mixed"}a(hut,"arrayType");function bQe(t){let e=hut(t);if(e==="mixed")throw sut();return e}a(bQe,"validateArray");function Eut(t){t=A4(t);let e=bQe(t);var A="[",r=t.map(i=>h_(i,e));return r.join(", ").length>60||/\n/.test(r)?A+=`
|
||||
`+r.join(`,
|
||||
`)+`
|
||||
`:A+=" "+r.join(", ")+(r.length>0?" ":""),A+"]"}a(Aut,"stringifyInlineArray");function rut(t){t=KD(t);var e=[];return Object.keys(t).forEach(A=>{e.push($D(A)+" = "+CQe(t[A],!1))}),"{ "+e.join(", ")+(e.length>0?" ":"")+"}"}a(rut,"stringifyInlineTable");function iut(t,e,A,r){var i=Ln(r);if(i==="array")return nut(t,e,A,r);if(i==="table")return sut(t,e,A,r);throw Sp(i)}a(iut,"stringifyComplex");function nut(t,e,A,r){r=KD(r),QQe(r);var i=Ln(r[0]);if(i!=="table")throw Sp(i);var n=t+$D(A),s="";return r.forEach(o=>{s.length>0&&(s+=`
|
||||
`:A+=" "+r.join(", ")+(r.length>0?" ":""),A+"]"}a(Eut,"stringifyInlineArray");function mut(t){t=A4(t);var e=[];return Object.keys(t).forEach(A=>{e.push(r4(A)+" = "+yQe(t[A],!1))}),"{ "+e.join(", ")+(e.length>0?" ":"")+"}"}a(mut,"stringifyInlineTable");function Cut(t,e,A,r){var i=Ln(r);if(i==="array")return fut(t,e,A,r);if(i==="table")return Qut(t,e,A,r);throw xp(i)}a(Cut,"stringifyComplex");function fut(t,e,A,r){r=A4(r),bQe(r);var i=Ln(r[0]);if(i!=="table")throw xp(i);var n=t+r4(A),s="";return r.forEach(o=>{s.length>0&&(s+=`
|
||||
`),s+=e+"[["+n+`]]
|
||||
`,s+=c_(n+".",e,o)}),s}a(nut,"stringifyArrayOfTables");function sut(t,e,A,r){var i=t+$D(A),n="";return gQe(r).length>0&&(n+=e+"["+i+`]
|
||||
`),n+c_(i+".",e,r)}a(sut,"stringifyComplexTable")});var IQe=E(u_=>{"use strict";u_.parse=pQe();u_.stringify=BQe()});var LQe=require("node:os"),li=Nr(hi());var RQe=require("node:crypto"),DQe=require("node:os"),Km=require("node:path"),ma=require("node:fs"),Md=Nr(hi()),A4=Nr(gue()),cI=Nr(Jfe()),h_=Nr(Rg());var jm=require("node:fs"),p_=Nr(hi()),e4=Nr(IQe());function yQe(t,e){if(!e.length)return;let A=0;if(e.forEach(n=>{try{new URL(n.url)}catch{throw new Error(`Invalid registry URL: ${n.url}`)}n.scope||A++}),A>1)throw new Error("You can't have more than one global registry.");(0,p_.info)(`Writing bunfig.toml to '${t}'.`);let r={};if((0,jm.existsSync)(t))try{let n=(0,jm.readFileSync)(t,{encoding:"utf-8"});r=(0,e4.parse)(n)}catch(n){(0,p_.info)(`Error reading existing bunfig: ${n.message}`),r={}}r.install=r?.install||{},r.install.scopes=r?.install.scopes||{};let i=e.find(n=>!n.scope);i&&(r.install.registry={url:i.url,...i.token?{token:i.token}:{}});for(let n of e)if(n.scope){let s=n.scope.startsWith("@")?n.scope.toLowerCase():`@${n.scope.toLowerCase()}`;r.install.scopes[s]={url:n.url,...n.token?{token:n.token}:{}}}Object.keys(r.install.scopes).length===0&&delete r.install.scopes,(0,jm.writeFileSync)(t,(0,e4.stringify)(r),{encoding:"utf8"})}a(yQe,"writeBunfig");var SQe=Nr(hi());var Xm=Nr(hi()),wQe=require("node:console"),Zm=require("node:fs"),t4=require("node:path");function g_(t,e,A=1e4){return t().catch(r=>{if(e<=0)throw r;return new Promise(i=>setTimeout(i,A)).then(()=>g_(t,e-1,A))})}a(g_,"retry");function bQe(t,e){return t.endsWith(e)?t:((0,Zm.renameSync)(t,t+e),t+e)}a(bQe,"addExtension");var aut={"package.json":t=>{let e=JSON.parse(t);return e.packageManager?.split("bun@")?.[1]??e.engines?.bun},".tool-versions":t=>t.match(/^bun\s*(?<version>.*?)$/m)?.groups?.version,".bumrc":t=>t,".bun-version":t=>t};function NQe(t){let e=process.env.GITHUB_WORKSPACE;if(!e||!t)return;(0,Xm.debug)(`Reading version from ${t}`);let A=(0,t4.resolve)(e,t),r=(0,t4.basename)(t);if(!(0,Zm.existsSync)(A)){(0,Xm.warning)(`File ${A} not found`);return}let i=aut[r]??(()=>{}),n;try{if(n=i((0,Zm.readFileSync)(A,"utf8"))?.trim(),!n){(0,Xm.warning)(`Failed to read version from ${t}`);return}}catch(s){let{message:o}=s;(0,Xm.warning)(`Failed to read ${t}: ${o}`)}finally{if(n)return(0,wQe.info)(`Obtained version ${n} from ${t}`),n}}a(NQe,"readVersionFromFile");var xQe=require("node:process");var vQe=a(async t=>{let e=(0,Km.join)((0,xQe.cwd)(),"bunfig.toml");yQe(e,t.registries);let A=dut(t),r=lut(t),i=(0,Km.join)((0,DQe.homedir)(),".bun","bin");try{(0,ma.mkdirSync)(i,{recursive:!0})}catch(u){if(u.code!=="EEXIST")throw u}(0,Md.addPath)(i);let n=a(u=>process.platform==="win32"?`${u}.exe`:u,"exe"),s=(0,Km.join)(i,n("bun"));try{(0,ma.symlinkSync)(s,(0,Km.join)(i,n("bunx")))}catch(u){if(u.code!=="EEXIST")throw u}let o,c=!1;if(!t.customUrl&&(0,ma.existsSync)(s)){let u=await m_(s);u&&out(u,t.version)&&(o=u,c=!0,(0,Md.info)(`Using existing Bun installation: ${o}`))}if(!o){if(r){let u=(0,RQe.createHash)("sha1").update(A).digest("base64");await(0,A4.restoreCache)([s],u)&&(o=await m_(s),o?(c=!0,(0,Md.info)(`Using a cached version of Bun: ${o}`)):(0,Md.warning)(`Found a cached version of Bun: ${o} (but it appears to be corrupted?)`))}c||((0,Md.info)(`Downloading a new version of Bun: ${A}`),o=await g_(async()=>await cut(A,s),3))}if(!o)throw new Error("Downloaded a new version of Bun, but failed to check its version? Try again.");let[l]=o.split("+");return(0,SQe.saveState)("cache",JSON.stringify({cacheEnabled:r,cacheHit:c,bunPath:s,url:A})),{version:l,revision:o,bunPath:s,url:A,cacheHit:c}},"default");function out(t,e){if(!e||/^(latest|canary|action)$/i.test(e))return!1;let[A]=t.split("+"),r=a(i=>i.replace(/^v/i,""),"normalizeVersion");return r(A)===r(e)}a(out,"isVersionMatch");async function cut(t,e){let A=bQe(await(0,cI.downloadTool)(t),".zip"),r=await(0,cI.extractZip)(A),i=await E_(r);try{(0,ma.renameSync)(i,e)}catch{(0,ma.copyFileSync)(i,e)}return await m_(e)}a(cut,"downloadBun");function lut(t){let{customUrl:e,version:A,noCache:r}=t;return r||e||!A||/latest|canary|action/i.test(A)?!1:(0,A4.isFeatureAvailable)()}a(lut,"isCacheEnabled");function dut(t){let{customUrl:e}=t;if(e)return e;let{version:A,os:r,arch:i,avx2:n,profile:s}=t,o=encodeURIComponent(A??"latest"),c=encodeURIComponent(r??process.platform),l=encodeURIComponent(i??process.arch),d=encodeURIComponent(n??!0),u=encodeURIComponent(s??!1),{href:p}=new URL(`${o}/${c}/${l}?avx2=${d}&profile=${u}`,"https://bun.sh/download/");return p}a(dut,"getDownloadUrl");async function E_(t){for(let e of(0,ma.readdirSync)(t,{withFileTypes:!0})){let{name:A}=e,r=(0,Km.join)(t,A);if(e.isFile()){if(A==="bun"||A==="bun.exe")return r;if(/^bun.*\.zip/.test(A)){let i=await(0,cI.extractZip)(r);return E_(i)}}if(/^bun/.test(A)&&e.isDirectory())return E_(r)}throw new Error("Could not find executable: bun")}a(E_,"extractBun");async function m_(t){let e=await(0,h_.getExecOutput)(t,["--revision"],{ignoreReturnCode:!0});if(e.exit
Line truncated
|
||||
`).map(e=>e.trim()).filter(Boolean).map(uut).filter(Boolean):[]}a(kQe,"parseRegistries");function uut(t){let e=t.match(/^(@[a-z0-9-_.]+|[a-z0-9-_.]+(?=:[a-z]+:\/\/)):(.+)$/i);if(e){let A=e[1],r=e[2].trim(),[i,n]=r.split("|",2).map(s=>s?.trim());try{return new URL(i),{url:i,scope:A,...n&&{token:n}}}catch{throw new Error(`Invalid URL in registry configuration: ${i}`)}}else{let[A,r]=t.split("|",2).map(i=>i?.trim());try{return new URL(A),{url:A,scope:"",...r&&{token:r}}}catch{throw new Error(`Invalid URL in registry configuration: ${A}`)}}}a(uut,"parseLine");process.env.RUNNER_TEMP||(process.env.RUNNER_TEMP=(0,LQe.tmpdir)());var UQe=kQe((0,li.getInput)("registries")),FQe=(0,li.getInput)("registry-url"),put=(0,li.getInput)("scope");FQe&&UQe.push({url:FQe,scope:put,token:"$BUN_AUTH_TOKEN"});vQe({version:(0,li.getInput)("bun-version")||NQe((0,li.getInput)("bun-version-file"))||void 0,customUrl:(0,li.getInput)("bun-download-url")||void 0,registries:UQe,noCache:(0,li.getBooleanInput)("no-cache")||!1}).then(({version:t,revision:e,bunPath:A,url:r,cacheHit:i})=>{(0,li.setOutput)("bun-version",t),(0,li.setOutput)("bun-revision",e),(0,li.setOutput)("bun-path",A),(0,li.setOutput)("bun-download-url",r),(0,li.setOutput)("cache-hit",i),process.exit(0)}).catch(t=>{(0,li.setFailed)(t),process.exit(1)});
|
||||
`,s+=g_(n+".",e,o)}),s}a(fut,"stringifyArrayOfTables");function Qut(t,e,A,r){var i=t+r4(A),n="";return fQe(r).length>0&&(n+=e+"["+i+`]
|
||||
`),n+g_(i+".",e,r)}a(Qut,"stringifyComplexTable")});var RQe=E(m_=>{"use strict";m_.parse=CQe();m_.stringify=NQe()});var zQe=require("node:os"),Gr=Nr(hi());var qQe=require("node:crypto"),HQe=require("node:os"),tC=require("node:path"),ma=require("node:fs"),_d=Nr(hi()),a4=Nr(fue()),pI=Nr(Xfe()),Q_=Nr(Dg());var Xm=require("node:fs"),C_=Nr(hi()),i4=Nr(RQe());function DQe(t,e){if(!e.length)return;let A=0;if(e.forEach(n=>{try{new URL(n.url)}catch{throw new Error(`Invalid registry URL: ${n.url}`)}n.scope||A++}),A>1)throw new Error("You can't have more than one global registry.");(0,C_.info)(`Writing bunfig.toml to '${t}'.`);let r={};if((0,Xm.existsSync)(t))try{let n=(0,Xm.readFileSync)(t,{encoding:"utf-8"});r=(0,i4.parse)(n)}catch(n){(0,C_.info)(`Error reading existing bunfig: ${n.message}`),r={}}r.install=r?.install||{},r.install.scopes=r?.install.scopes||{};let i=e.find(n=>!n.scope);i&&(r.install.registry={url:i.url,...i.token?{token:i.token}:{}});for(let n of e)if(n.scope){let s=n.scope.startsWith("@")?n.scope.toLowerCase():`@${n.scope.toLowerCase()}`;r.install.scopes[s]={url:n.url,...n.token?{token:n.token}:{}}}Object.keys(r.install.scopes).length===0&&delete r.install.scopes,(0,Xm.writeFileSync)(t,(0,i4.stringify)(r),{encoding:"utf8"})}a(DQe,"writeBunfig");var YQe=Nr(hi());var Zm=Nr(hi()),SQe=require("node:console"),Km=require("node:fs"),n4=require("node:path");async function xQe(t,e){let A=new Headers(e?.headers);A.has("User-Agent")||A.set("User-Agent","@oven-sh/setup-bun");let r=await fetch(t,{...e,headers:A});if(!r.ok){let i=await r.text().catch(()=>"");throw new Error(`Failed to fetch url ${t}. (status code: ${r.status}, status text: ${r.statusText})${i?`
|
||||
${i}`:""}`)}return r}a(xQe,"request");function vQe(t,e){return t.endsWith(e)?t:((0,Km.renameSync)(t,t+e),t+e)}a(vQe,"addExtension");function kQe(){let t=process.platform;return t==="win32"?"windows":t}a(kQe,"getPlatform");function FQe(){let t=process.arch;return t==="arm64"?"aarch64":t}a(FQe,"getArchitecture");var But={"package.json":t=>{let e=JSON.parse(t);return e.packageManager?.split("bun@")?.[1]??e.engines?.bun},".tool-versions":t=>t.match(/^bun\s*(?<version>.*?)$/m)?.groups?.version,".bumrc":t=>t,".bun-version":t=>t};function LQe(t){let e=process.env.GITHUB_WORKSPACE;if(!e||!t)return;(0,Zm.debug)(`Reading version from ${t}`);let A=(0,n4.resolve)(e,t),r=(0,n4.basename)(t);if(!(0,Km.existsSync)(A)){(0,Zm.warning)(`File ${A} not found`);return}let i=But[r]??(()=>{}),n;try{if(n=i((0,Km.readFileSync)(A,"utf8"))?.trim(),!n){(0,Zm.warning)(`Failed to read version from ${t}`);return}}catch(s){let{message:o}=s;(0,Zm.warning)(`Failed to read ${t}: ${o}`)}finally{if(n)return(0,SQe.info)(`Obtained version ${n} from ${t}`),n}}a(LQe,"readVersionFromFile");var f_=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,$m=a(t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let e=t.match(f_);if(!e)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return e.shift(),e},"validateAndParse"),UQe=a(t=>t==="*"||t==="x"||t==="X","isWildcard"),TQe=a(t=>{let e=parseInt(t,10);return isNaN(e)?t:e},"tryParse"),Iut=a((t,e)=>typeof t!=typeof e?[String(t),String(e)]:[t,e],"forceType"),yut=a((t,e)=>{if(UQe(t)||UQe(e))return 0;let[A,r]=Iut(TQe(t),TQe(e));return A>r?1:A<r?-1:0},"compareStrings"),Md=a((t,e)=>{for(let A=0;A<Math.max(t.length,e.length);A++){let r=yut(t[A]||"x",e[A]||"x");if(r!==0)return r}return 0},"compareSegments");var uI=a((t,e)=>{let A=$m(t),r=$m(e),i=A.pop(),n=r.pop(),s=Md(A,r);return s!==0?s:i&&n?Md(i.split("."),n.split(".")):i||n?i?-1:1:0},"compareVersions");var _Qe=a((t,e,A)=>{wut(A);let r=uI(t,e);return OQe[A].includes(r)},"compare"),OQe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},MQe=Object.keys(OQe),wut=a(t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(MQe.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${MQe.join("|")}`)},"assertValidOperator");var eC=a((t,e)=>{if(e=e.replace(/([><=]+)\s+/g,"$1"),e.includes("||"))return e.split("||").some(f=>eC(t,f));if(e.includes(" - ")){let[f,B]=e.split(" - ",2);return eC(t,`>=${f} <=${B}`)}else if(e.includes(" "))return e.trim().replace(/\s{2,}/g," ").split(" ").every(f=>eC(t,f));let A=e.match(/^([<>=~^]+)/),r=A?A[1]:"=";if(r!=="^"&&r!=="~")return _Qe(t,e,r);let[i,n,s,,o]=$m(t),[c,l,d,,u]=$m(e),p=[i,n??"x",s??"x"],g=[c,l??"x",d??"x"];if(u&&(!o||Md(p,g)!==0||Md(o.split("."),u.split("."))===-1))return!1;let h=g.findIndex(f=>f!=="0")+1,m=r==="~"?2:h>1?h:1;return!(Md(p.slice(0,m),g.slice(0,m))!==0||Md(p.slice(m),g.slice(m))===-1)},"satisfies");var s4=a(t=>typeof t=="string"&&/^[v\d]/.test(t)&&f_.test(t),"validate");async function PQe(t){let{customUrl:e}=t;return e||await but(t)}a(PQe,"getDownloadUrl");async function but(t){let A=(await(await xQe("https://api.github.com/repos/oven-sh/bun/git/refs/tags",{headers:t.token?{Authorization:`Bearer ${t.token}`}:{}})).json()).filter(m=>m.ref.startsWith("refs/tags/bun-v")||m.ref==="refs/tags/canary").map(m=>m.ref.replace(/refs\/tags\/(bun-v)?/g,"")).filter(Boolean),{version:r,os:i,arch:n,avx2:s,profile:o}=t,c=A.find(m=>m===r);if(c)s4(c)&&(c=`bun-v${c}`);else{A=A.filter(f=>s4(f)).sort(uI);let m=r==="latest"||!r?A.at(-1):A.filter(f=>eC(f,r)).at(-1);if(!m)throw new Error(`No Bun release found matching version '${r}'`);c=`bun-v${m}`}let l=encodeURIComponent(c??r),d=encodeURIComponent(i??kQe()),u=encodeURIComponent(n??FQe()),p=encodeURIComponent(s===!1?"-baseline":""),g=encodeURIComponent(o===!0?"-profile":""),{href:h}=new URL(`${l}/bun-${d}-${u}${p}${g}.zip`,"https://github.com/oven-sh/bun/releases/download/");return h}a(but,"getSemverDownloadUrl");var GQe=require("node:process");var JQe=a(async t=>{let e=(0,tC.join)((0,GQe.cwd)(),"bunfig.toml");DQe(e,t.registries);let A=await PQe(t),r=Dut(t),i=(0,tC.join)((0,HQe.homedir)(),".bun","bin");try{(0,ma.mkdirSync)(i,{recursive:!0})}catch(u){if(u.code!=="EEXIST")throw u}(0,_d.addPath)(i);let n=a(u=>process.platform==="win32"?`${u}.exe`:u,"exe"),s=(0,tC.join)(i,n("bun"));try{(0,ma.symlinkSync)(s,(0,tC.join)(i,n("bunx")))}catch(u){if(u.code!=="EEXIST")throw u}let o,c=!1;if(!t.customUrl&&(0,ma.existsSync)(s)){let u=await I_(s);u&&Nut(u,t.version)&&(o=u,c=!0,(0,_d.info)(`Using existing Bun installation: ${o}`))}if(!o){if(r){let u=(0,qQe.createHash)("sha1").update(A).digest("base64");await(0,a4.restoreCache)([s],u)&&(o=await I_(s),o?(c=!0,(0,_d.info)(`Using a cached version of Bun: ${o}`)):(0,_d.warning)(`Found a cached version of Bun: ${o} (but it appears to be corrupte
Line truncated
|
||||
`).map(e=>e.trim()).filter(Boolean).map(Sut).filter(Boolean):[]}a(VQe,"parseRegistries");function Sut(t){let e=t.match(/^(@[a-z0-9-_.]+|[a-z0-9-_.]+(?=:[a-z]+:\/\/)):(.+)$/i);if(e){let A=e[1],r=e[2].trim(),[i,n]=r.split("|",2).map(s=>s?.trim());try{return new URL(i),{url:i,scope:A,...n&&{token:n}}}catch{throw new Error(`Invalid URL in registry configuration: ${i}`)}}else{let[A,r]=t.split("|",2).map(i=>i?.trim());try{return new URL(A),{url:A,scope:"",...r&&{token:r}}}catch{throw new Error(`Invalid URL in registry configuration: ${A}`)}}}a(Sut,"parseLine");process.env.RUNNER_TEMP||(process.env.RUNNER_TEMP=(0,zQe.tmpdir)());var jQe=VQe((0,Gr.getInput)("registries")),WQe=(0,Gr.getInput)("registry-url"),xut=(0,Gr.getInput)("scope");WQe&&jQe.push({url:WQe,scope:xut,token:"$BUN_AUTH_TOKEN"});JQe({version:(0,Gr.getInput)("bun-version")||LQe((0,Gr.getInput)("bun-version-file"))||void 0,customUrl:(0,Gr.getInput)("bun-download-url")||void 0,registries:jQe,noCache:(0,Gr.getBooleanInput)("no-cache")||!1,token:(0,Gr.getInput)("token")}).then(({version:t,revision:e,bunPath:A,url:r,cacheHit:i})=>{(0,Gr.setOutput)("bun-version",t),(0,Gr.setOutput)("bun-revision",e),(0,Gr.setOutput)("bun-path",A),(0,Gr.setOutput)("bun-download-url",r),(0,Gr.setOutput)("cache-hit",i),process.exit(0)}).catch(t=>{(0,Gr.setFailed)(t),process.exit(1)});
|
||||
/*! Bundled license information:
|
||||
|
||||
undici/lib/fetch/body.js:
|
||||
|
||||
Generated
+5
@@ -461,6 +461,11 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/compare-versions": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz",
|
||||
"integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg=="
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
|
||||
+5
-1
@@ -28,7 +28,8 @@
|
||||
"@actions/glob": "^0.4.0",
|
||||
"@actions/io": "^1.1.2",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"@iarna/toml": "^2.2.5"
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"compare-versions": "^6.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "^1.1.13",
|
||||
@@ -36,5 +37,8 @@
|
||||
"esbuild": "^0.19.2",
|
||||
"prettier": "^3.4.2",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"compare-versions@6.1.1": "patches/compare-versions@6.1.1.patch"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
diff --git a/lib/esm/satisfies.js b/lib/esm/satisfies.js
|
||||
index 7586b71657332f855431c4dd4f05e9394fd9aac3..a6ec29bfc98907c67ed4af71fca73bd8bff88798 100644
|
||||
--- a/lib/esm/satisfies.js
|
||||
+++ b/lib/esm/satisfies.js
|
||||
@@ -40,8 +40,9 @@ export const satisfies = (version, range) => {
|
||||
// else range of either "~" or "^" is assumed
|
||||
const [v1, v2, v3, , vp] = validateAndParse(version);
|
||||
const [r1, r2, r3, , rp] = validateAndParse(range);
|
||||
- const v = [v1, v2, v3];
|
||||
+ const v = [v1, v2 !== null && v2 !== void 0 ? v2 : 'x', v3 !== null && v3 !== void 0 ? v3 : 'x'];
|
||||
const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];
|
||||
+
|
||||
// validate pre-release
|
||||
if (rp) {
|
||||
if (!vp)
|
||||
diff --git a/lib/esm/utils.js b/lib/esm/utils.js
|
||||
index b5cc8b9927ab38fc67032c133b531e95ec4cec15..ec56105fd2d806aa922f1488a27b02c56aff1865 100644
|
||||
--- a/lib/esm/utils.js
|
||||
+++ b/lib/esm/utils.js
|
||||
@@ -28,7 +28,7 @@ const compareStrings = (a, b) => {
|
||||
};
|
||||
export const compareSegments = (a, b) => {
|
||||
for (let i = 0; i < Math.max(a.length, b.length); i++) {
|
||||
- const r = compareStrings(a[i] || '0', b[i] || '0');
|
||||
+ const r = compareStrings(a[i] || 'x', b[i] || 'x');
|
||||
if (r !== 0)
|
||||
return r;
|
||||
}
|
||||
diff --git a/lib/umd/index.js b/lib/umd/index.js
|
||||
index 2cfef261bca520e21ed41fc14950732b8aa6339b..1059784db86635f3aaaba83b5a72c5015e1d8490 100644
|
||||
--- a/lib/umd/index.js
|
||||
+++ b/lib/umd/index.js
|
||||
@@ -152,7 +152,7 @@
|
||||
// else range of either "~" or "^" is assumed
|
||||
const [v1, v2, v3, , vp] = validateAndParse(version);
|
||||
const [r1, r2, r3, , rp] = validateAndParse(range);
|
||||
- const v = [v1, v2, v3];
|
||||
+ const v = [v1, v2 !== null && v2 !== void 0 ? v2 : 'x', v3 !== null && v3 !== void 0 ? v3 : 'x'];
|
||||
const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];
|
||||
// validate pre-release
|
||||
if (rp) {
|
||||
diff --git a/package.json b/package.json
|
||||
index b05b3daf706d7ba4e594233f8791fc3007a8e2cd..e51e76b86f95e9ebf0b5dba3b82aeb119628528d 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -26,7 +26,7 @@
|
||||
"prepublishOnly": "npm run build",
|
||||
"test": "c8 --reporter=lcov mocha"
|
||||
},
|
||||
- "main": "./lib/umd/index.js",
|
||||
+ "main": "./lib/src/index.ts",
|
||||
"module": "./lib/esm/index.js",
|
||||
"types": "./lib/esm/index.d.ts",
|
||||
"sideEffects": false,
|
||||
diff --git a/src/satisfies.ts b/src/satisfies.ts
|
||||
index 66cb171d7f32e68fdda6929d2da223b97a053737..6b4973f037843f264338a01efdc4ace5dcf042cd 100644
|
||||
--- a/src/satisfies.ts
|
||||
+++ b/src/satisfies.ts
|
||||
@@ -43,7 +43,7 @@ export const satisfies = (version: string, range: string): boolean => {
|
||||
// else range of either "~" or "^" is assumed
|
||||
const [v1, v2, v3, , vp] = validateAndParse(version);
|
||||
const [r1, r2, r3, , rp] = validateAndParse(range);
|
||||
- const v = [v1, v2, v3];
|
||||
+ const v = [v1, v2 ?? 'x', v3 ?? 'x'];
|
||||
const r = [r1, r2 ?? 'x', r3 ?? 'x'];
|
||||
|
||||
// validate pre-release
|
||||
+7
-23
@@ -13,9 +13,11 @@ import { addPath, info, warning } from "@actions/core";
|
||||
import { isFeatureAvailable, restoreCache } from "@actions/cache";
|
||||
import { downloadTool, extractZip } from "@actions/tool-cache";
|
||||
import { getExecOutput } from "@actions/exec";
|
||||
import { writeBunfig, Registry } from "./bunfig";
|
||||
import { Registry } from "./registry";
|
||||
import { writeBunfig } from "./bunfig";
|
||||
import { saveState } from "@actions/core";
|
||||
import { addExtension, retry } from "./utils";
|
||||
import { addExtension } from "./utils";
|
||||
import { getDownloadUrl } from "./download-url";
|
||||
import { cwd } from "node:process";
|
||||
|
||||
export type Input = {
|
||||
@@ -27,6 +29,7 @@ export type Input = {
|
||||
profile?: boolean;
|
||||
registries?: Registry[];
|
||||
noCache?: boolean;
|
||||
token?: string;
|
||||
};
|
||||
|
||||
export type Output = {
|
||||
@@ -48,7 +51,7 @@ export default async (options: Input): Promise<Output> => {
|
||||
const bunfigPath = join(cwd(), "bunfig.toml");
|
||||
writeBunfig(bunfigPath, options.registries);
|
||||
|
||||
const url = getDownloadUrl(options);
|
||||
const url = await getDownloadUrl(options);
|
||||
const cacheEnabled = isCacheEnabled(options);
|
||||
|
||||
const binPath = join(homedir(), ".bun", "bin");
|
||||
@@ -105,8 +108,7 @@ export default async (options: Input): Promise<Output> => {
|
||||
|
||||
if (!cacheHit) {
|
||||
info(`Downloading a new version of Bun: ${url}`);
|
||||
// TODO: remove this, temporary fix for https://github.com/oven-sh/setup-bun/issues/73
|
||||
revision = await retry(async () => await downloadBun(url, bunPath), 3);
|
||||
revision = await downloadBun(url, bunPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,24 +194,6 @@ function isCacheEnabled(options: Input): boolean {
|
||||
return isFeatureAvailable();
|
||||
}
|
||||
|
||||
function getDownloadUrl(options: Input): string {
|
||||
const { customUrl } = options;
|
||||
if (customUrl) {
|
||||
return customUrl;
|
||||
}
|
||||
const { version, os, arch, avx2, profile } = options;
|
||||
const eversion = encodeURIComponent(version ?? "latest");
|
||||
const eos = encodeURIComponent(os ?? process.platform);
|
||||
const earch = encodeURIComponent(arch ?? process.arch);
|
||||
const eavx2 = encodeURIComponent(avx2 ?? true);
|
||||
const eprofile = encodeURIComponent(profile ?? false);
|
||||
const { href } = new URL(
|
||||
`${eversion}/${eos}/${earch}?avx2=${eavx2}&profile=${eprofile}`,
|
||||
"https://bun.sh/download/",
|
||||
);
|
||||
return href;
|
||||
}
|
||||
|
||||
async function extractBun(path: string): Promise<string> {
|
||||
for (const entry of readdirSync(path, { withFileTypes: true })) {
|
||||
const { name } = entry;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
import { compareVersions, satisfies, validate } from "compare-versions";
|
||||
import { Input } from "./action";
|
||||
import { getArchitecture, getPlatform, request } from "./utils";
|
||||
|
||||
export async function getDownloadUrl(options: Input): Promise<string> {
|
||||
const { customUrl } = options;
|
||||
if (customUrl) {
|
||||
return customUrl;
|
||||
}
|
||||
|
||||
return await getSemverDownloadUrl(options);
|
||||
}
|
||||
|
||||
async function getSemverDownloadUrl(options: Input): Promise<string> {
|
||||
const res = (await (
|
||||
await request("https://api.github.com/repos/oven-sh/bun/git/refs/tags", {
|
||||
headers: options.token
|
||||
? { "Authorization": `Bearer ${options.token}` }
|
||||
: {},
|
||||
})
|
||||
).json()) as { ref: string }[];
|
||||
|
||||
let tags = res
|
||||
.filter(
|
||||
(tag) =>
|
||||
tag.ref.startsWith("refs/tags/bun-v") || tag.ref === "refs/tags/canary",
|
||||
)
|
||||
.map((item) => item.ref.replace(/refs\/tags\/(bun-v)?/g, ""))
|
||||
.filter(Boolean);
|
||||
|
||||
const { version, os, arch, avx2, profile } = options;
|
||||
|
||||
let tag = tags.find((t) => t === version);
|
||||
if (!tag) {
|
||||
tags = tags.filter((t) => validate(t)).sort(compareVersions);
|
||||
|
||||
const matchedTag =
|
||||
version === "latest" || !version
|
||||
? tags.at(-1)
|
||||
: tags.filter((t) => satisfies(t, version)).at(-1);
|
||||
|
||||
if (!matchedTag) {
|
||||
throw new Error(`No Bun release found matching version '${version}'`);
|
||||
}
|
||||
|
||||
tag = `bun-v${matchedTag}`;
|
||||
} else if (validate(tag)) {
|
||||
tag = `bun-v${tag}`;
|
||||
}
|
||||
|
||||
const eversion = encodeURIComponent(tag ?? version);
|
||||
const eos = encodeURIComponent(os ?? getPlatform());
|
||||
const earch = encodeURIComponent(arch ?? getArchitecture());
|
||||
const eavx2 = encodeURIComponent(avx2 === false ? "-baseline" : "");
|
||||
const eprofile = encodeURIComponent(profile === true ? "-profile" : "");
|
||||
|
||||
const { href } = new URL(
|
||||
`${eversion}/bun-${eos}-${earch}${eavx2}${eprofile}.zip`,
|
||||
"https://github.com/oven-sh/bun/releases/download/",
|
||||
);
|
||||
|
||||
return href;
|
||||
}
|
||||
@@ -30,6 +30,7 @@ runAction({
|
||||
customUrl: getInput("bun-download-url") || undefined,
|
||||
registries: registries,
|
||||
noCache: getBooleanInput("no-cache") || false,
|
||||
token: getInput("token"),
|
||||
})
|
||||
.then(({ version, revision, bunPath, url, cacheHit }) => {
|
||||
setOutput("bun-version", version);
|
||||
|
||||
+34
-12
@@ -3,19 +3,27 @@ import { info } from "node:console";
|
||||
import { existsSync, readFileSync, renameSync } from "node:fs";
|
||||
import { resolve, basename } from "node:path";
|
||||
|
||||
export function retry<T>(
|
||||
fn: () => Promise<T>,
|
||||
retries: number,
|
||||
timeout = 10000,
|
||||
): Promise<T> {
|
||||
return fn().catch((err) => {
|
||||
if (retries <= 0) {
|
||||
throw err;
|
||||
}
|
||||
return new Promise((resolve) => setTimeout(resolve, timeout)).then(() =>
|
||||
retry(fn, retries - 1, timeout),
|
||||
);
|
||||
export async function request(
|
||||
url: string,
|
||||
init?: RequestInit,
|
||||
): Promise<Response> {
|
||||
const headers = new Headers(init?.headers);
|
||||
if (!headers.has("User-Agent")) {
|
||||
headers.set("User-Agent", "@oven-sh/setup-bun");
|
||||
}
|
||||
|
||||
const res = await fetch(url, {
|
||||
...init,
|
||||
headers,
|
||||
});
|
||||
if (!res.ok) {
|
||||
const body = await res.text().catch(() => "");
|
||||
throw new Error(
|
||||
`Failed to fetch url ${url}. (status code: ${res.status}, status text: ${res.statusText})${body ? `\n${body}` : ""}`,
|
||||
);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
export function addExtension(path: string, ext: string): string {
|
||||
@@ -27,6 +35,20 @@ export function addExtension(path: string, ext: string): string {
|
||||
return path;
|
||||
}
|
||||
|
||||
export function getPlatform(): string {
|
||||
const platform = process.platform;
|
||||
if (platform === "win32") return "windows";
|
||||
|
||||
return platform;
|
||||
}
|
||||
|
||||
export function getArchitecture(): string {
|
||||
const arch = process.arch;
|
||||
if (arch === "arm64") return "aarch64";
|
||||
|
||||
return arch;
|
||||
}
|
||||
|
||||
const FILE_VERSION_READERS = {
|
||||
"package.json": (content: string) => {
|
||||
const pkg = JSON.parse(content);
|
||||
|
||||
Reference in new issue
Block a user